/* Tokens */
:root {
  color-scheme: light;
  --bg: #f6f7f6;
  --surface: #ffffff;
  --surface-2: #eff1f0;
  --hover: #eceeed;
  --border: #e0e3e1;
  --border-strong: #c7ccc9;
  --text: #1b2426;
  --muted: #5c686b;
  --faint: #8d979a;
  --accent: #0b6b78;
  --accent-hover: #095a65;
  --accent-soft: #dcf0f0;
  --on-accent: #ffffff;
  --danger: #c53b34;
  --on-danger: #ffffff;
  --warn: #b26a00;
  --ok: #2a9d6a;
  --p-urgent: #d6332b;
  --p-high: #e07b12;
  --p-normal: #2f7fd6;
  --p-low: #8d979a;
  --side-bg: #0d2a30;
  --side-hover: #173c44;
  --side-on: #1f4d57;
  --side-text: #d5e4e5;
  --side-muted: #86a3a7;
  --side-border: #1c3f47;
  --tag-s: 58%;
  --tag-bg-l: 92%;
  --tag-text-l: 28%;
  --shadow-sm: 0 1px 2px rgb(13 42 48 / 8%);
  --shadow-md: 0 8px 24px rgb(13 42 48 / 14%);
  --shadow-lg: 0 16px 48px rgb(13 42 48 / 26%);
  --radius: 8px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #12191b;
  --surface: #1a2326;
  --surface-2: #222d30;
  --hover: #263236;
  --border: #2c383c;
  --border-strong: #3f4e52;
  --text: #e6ecec;
  --muted: #a0adb0;
  --faint: #76848a;
  --accent: #4cc4c0;
  --accent-hover: #6bd3cf;
  --accent-soft: #173f42;
  --on-accent: #06282b;
  --danger: #f0766e;
  --on-danger: #2a0c0a;
  --warn: #e6a64a;
  --p-urgent: #f0665e;
  --p-high: #ee9a44;
  --p-normal: #5ea5ea;
  --p-low: #8895a0;
  --side-bg: #0c1416;
  --side-hover: #18262a;
  --side-on: #213539;
  --side-border: #1c2a2e;
  --tag-bg-l: 22%;
  --tag-text-l: 80%;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 40%);
  --shadow-md: 0 8px 24px rgb(0 0 0 / 45%);
  --shadow-lg: 0 16px 48px rgb(0 0 0 / 60%);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #12191b;
    --surface: #1a2326;
    --surface-2: #222d30;
    --hover: #263236;
    --border: #2c383c;
    --border-strong: #3f4e52;
    --text: #e6ecec;
    --muted: #a0adb0;
    --faint: #76848a;
    --accent: #4cc4c0;
    --accent-hover: #6bd3cf;
    --accent-soft: #173f42;
    --on-accent: #06282b;
    --danger: #f0766e;
    --danger-soft: #3d2221;
    --warn: #e6a64a;
    --p-urgent: #f0665e;
    --p-high: #ee9a44;
    --p-normal: #5ea5ea;
    --p-low: #8895a0;
    --side-bg: #0c1416;
    --side-hover: #18262a;
    --side-on: #213539;
    --side-border: #1c2a2e;
    --tag-bg-l: 22%;
    --tag-text-l: 80%;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 40%);
    --shadow-md: 0 8px 24px rgb(0 0 0 / 45%);
    --shadow-lg: 0 16px 48px rgb(0 0 0 / 60%);
  }
}

/* Base */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: default; opacity: .35; }
kbd {
  font: 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgb(127 127 127 / 18%);
}
code {
  font: 12px ui-monospace, SFMono-Regular, Menlo, monospace;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--surface-2);
}
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-radius: 4px; }
.icon { display: inline-flex; flex: none; }
.icon svg { display: block; }
.dot {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c);
}
.chev { display: inline-flex; transition: transform .12s; color: var(--faint); }
.chev.open { transform: rotate(90deg); }
.flip { transform: scaleX(-1); }
.live-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
  animation: pulse 1.6s infinite;
}
@keyframes pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Layout */
#app { display: flex; height: 100vh; height: 100dvh; }
#main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.page { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.page-body { flex: 1; min-height: 0; overflow: auto; padding: 8px 24px 48px; }

/* Sidebar */
#sidebar {
  width: 248px;
  flex: none;
  display: flex;
  flex-direction: column;
  background: var(--side-bg);
  color: var(--side-text);
  --accent: #5fe0d0;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 16px 16px 12px; }
.brand-name { font-weight: 650; font-size: 15px; letter-spacing: -.01em; color: #fff; }
.side-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 10px 8px;
  padding: 7px 10px;
  border-radius: 6px;
  background: var(--side-hover);
  color: var(--side-muted);
  text-align: left;
}
.side-search span:nth-child(2) { flex: 1; }
.side-search:hover { color: var(--side-text); background: var(--side-on); }
.nav-main { padding: 0 10px 4px; display: grid; gap: 1px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--side-text);
  text-align: left;
}
.nav-item:hover { background: var(--side-hover); }
.nav-item.on { background: var(--side-on); color: #fff; font-weight: 550; }
.nav-label { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.nav-count { font-size: 12px; color: var(--side-muted); font-variant-numeric: tabular-nums; }
.side-section { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 10px; }
.side-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 4px 6px 10px;
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--side-muted);
}
.side-tool {
  display: inline-flex;
  flex: none;
  padding: 4px;
  border-radius: 4px;
  color: var(--side-muted);
  opacity: 0;
}
.side-tool.visible, .side-tool:focus-visible { opacity: 1; }
.side-tool:hover { background: var(--side-on); color: #fff; }
.space { margin-bottom: 2px; }
.space-head, .list-link {
  display: flex;
  align-items: center;
  gap: 2px;
  border-radius: 6px;
  padding-right: 3px;
}
.space-head:hover, .list-link:hover { background: var(--side-hover); }
.space-head:hover .side-tool, .list-link:hover .side-tool, .space-head:focus-within .side-tool, .list-link:focus-within .side-tool { opacity: 1; }
.space-head.on, .list-link.on { background: var(--side-on); }
.list-link.on { color: #fff; font-weight: 550; }
.space-toggle { display: inline-flex; padding: 7px 2px 7px 5px; border-radius: 4px; }
.space-toggle .chev { color: var(--side-muted); }
.space-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 5px 2px; }
.space-mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: var(--c);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}
.space-lists { margin-left: 25px; padding-left: 7px; border-left: 1px solid var(--side-border); display: grid; gap: 1px; margin-top: 1px; margin-bottom: 4px; }
.list-anchor { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 8px; }
.timer-widget {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 10px 8px;
  padding: 8px 8px 8px 10px;
  border-radius: 6px;
  background: var(--side-on);
  font-size: 13px;
}
.timer-title { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.timer-title:hover { text-decoration: underline; }
.clock { font-variant-numeric: tabular-nums; font-weight: 600; }
.side-foot { padding: 6px 10px 10px; border-top: 1px solid var(--side-border); }

/* Page header */
.page-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 24px 10px;
  flex-wrap: wrap;
}
.icon-btn.nav-toggle { display: none; }
.page-title { min-width: 0; margin-right: auto; }
.page-title h1 { font-size: 20px; font-weight: 650; letter-spacing: -.015em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumb { display: block; font-size: 12px; color: var(--muted); }
.tabs { display: flex; gap: 2px; padding: 3px; border-radius: 8px; background: var(--surface-2); }
.tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 500;
}
.tab:hover { color: var(--text); }
.tab.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* Buttons and fields */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-weight: 500;
  white-space: nowrap;
}
.btn:hover { background: var(--hover); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: var(--on-danger); }
.btn.danger:hover { filter: brightness(.93); }
.new-task kbd { background: rgb(255 255 255 / 22%); }
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 6px;
  color: var(--muted);
}
.icon-btn:hover:not(:disabled) { background: var(--hover); color: var(--text); }
.icon-btn.small { width: 26px; height: 26px; }
.link-btn { color: var(--accent); font-size: 13px; }
.link-btn:hover { text-decoration: underline; }
.field {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--surface);
}
.field:focus-visible { border-color: var(--accent); outline-offset: 0; }
.field-label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }

/* Filter bar */
.filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding: 2px 24px 10px;
  border-bottom: 1px solid var(--border);
}
.search-field {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--faint);
  width: 190px;
}
.search-field:focus-within { border-color: var(--accent); }
.search-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--text); font-size: 13px; }
.control { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); }
.control select {
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  padding: 3px 0;
  cursor: pointer;
  max-width: 120px;
  field-sizing: content;
}
.switch { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); cursor: pointer; }
.switch input { accent-color: var(--accent); margin: 0; }

/* Groups and rows */
.group { margin-top: 14px; }
.group-head {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 6px 4px 2px;
  border-radius: 5px;
  text-align: left;
}
.group-head:hover { background: var(--hover); }
.group-name { font-size: 13px; font-weight: 650; }
.group-count { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.tone-bad .group-name { color: var(--danger); }
.tone-accent .group-name { color: var(--accent); }
.rows { margin-top: 4px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.rows:empty { display: none; }
.row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto 92px 28px 112px;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 5px 12px;
  border-top: 1px solid var(--border);
  cursor: pointer;
}
.row:first-child { border-top: 0; }
.row:hover { background: var(--hover); }
.row.is-open { background: var(--accent-soft); }
.row-main { display: flex; align-items: center; gap: 8px; min-width: 0; }
.row-title { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 500; }
.row-title:hover { text-decoration: underline; }
.row-where { flex: none; max-width: 40%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; color: var(--muted); }
.is-done .row-title, .is-done .card-title, .is-done .sub-title { text-decoration: line-through; color: var(--faint); font-weight: 400; }
.row-tags { display: flex; gap: 4px; max-width: 220px; overflow: hidden; }
.row.row-reminder { grid-template-columns: 20px minmax(0, 1fr) auto 28px; }
.meta-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.check {
  flex: none;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  color: #fff;
  background: var(--surface);
}
.check:hover { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 18%, transparent); }
.check.on { background: var(--ok); border-color: var(--ok); }
.pill {
  justify-self: start;
  display: inline-block;
  max-width: 112px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  padding: 2px 9px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--c) 16%, transparent);
  color: color-mix(in srgb, var(--c) 72%, var(--text));
  font-size: 12px;
  font-weight: 600;
}
.pill:hover { background: color-mix(in srgb, var(--c) 28%, transparent); }
.flag-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px;
  border-radius: 4px;
  color: var(--c);
}
.flag-btn svg path:last-child { fill: currentColor; fill-opacity: .9; }
.flag-btn.unset svg path:last-child { fill: none; }
.flag-btn.unset { color: var(--faint); opacity: .55; }
.flag-btn:hover { background: var(--surface-2); opacity: 1; }
.flag-btn.with-label { color: var(--text); padding: 3px 6px; opacity: 1; font-size: 13px; }
.flag-btn.with-label .icon { color: var(--c); }
.flag-btn.with-label.unset { color: var(--muted); }
.due-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-self: start;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--muted);
}
.due-btn:hover { background: var(--surface-2); }
.due-btn.unset { color: var(--faint); opacity: .55; }
.due-btn.unset:hover { opacity: 1; }
.due-btn.overdue { color: var(--danger); font-weight: 600; }
.due-btn.today { color: var(--accent); font-weight: 600; }
.remind-btn { display: inline-flex; align-items: center; gap: 5px; }
.remind-btn.fired { color: var(--accent); font-weight: 600; }
.tag {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 18px;
  background: hsl(var(--h) var(--tag-s) var(--tag-bg-l));
  color: hsl(var(--h) var(--tag-s) var(--tag-text-l));
}
.tag-x { display: inline-flex; border-radius: 50%; opacity: .6; }
.tag-x:hover { opacity: 1; }
.add-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  padding: 3px 12px;
  border-radius: 6px;
  color: var(--faint);
}
.add-row:focus-within { color: var(--accent); background: var(--surface); box-shadow: inset 0 0 0 1px var(--accent); }
.add-input { flex: 1; min-width: 0; padding: 4px 0; border: 0; outline: 0; background: none; color: var(--text); font-size: 13px; }
.add-input::placeholder { color: var(--faint); }

/* Home */
.day-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 6px 0 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--border);
  overflow: hidden;
}
.stat { padding: 10px 14px; background: var(--surface); }
.stat dt { font-size: 12px; color: var(--muted); }
.stat dd { font-size: 20px; font-weight: 650; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.stat.bad dd { color: var(--danger); }
.empty { padding: 56px 16px; text-align: center; color: var(--muted); }
.empty-title { color: var(--text); font-size: 15px; font-weight: 600; margin-bottom: 4px; }

/* Board */
.board {
  flex: 1;
  min-height: 0;
  display: flex;
  gap: 12px;
  padding: 14px 24px 20px;
  overflow-x: auto;
  align-items: flex-start;
}
.column {
  flex: 0 0 290px;
  display: flex;
  flex-direction: column;
  max-height: 100%;
  padding: 8px;
  border-radius: 10px;
  background: var(--surface-2);
  transition: box-shadow .1s;
}
.column.drop-on { box-shadow: inset 0 0 0 2px var(--accent); }
.column-head { display: flex; align-items: center; gap: 7px; padding: 4px 6px 8px; }
.column-head h2 { font-size: 13px; font-weight: 650; }
.cards { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; min-height: 8px; padding: 1px; }
.card {
  display: grid;
  gap: 7px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  cursor: grab;
}
.card:hover { border-color: var(--border-strong); }
.card.is-open { border-color: var(--accent); }
.card.dragging { opacity: .35; }
.card-where { font-size: 11px; color: var(--muted); }
.card.is-sub { border-left: 3px solid var(--accent); }
.card-parent { display: flex; align-items: center; gap: 4px; min-width: 0; font-size: 11px; color: var(--muted); }
.card-parent span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-parent:hover { color: var(--text); text-decoration: underline; }
.card-top { display: flex; gap: 8px; align-items: flex-start; }
.card-top .check { margin-top: 1px; }
.card-title { font-weight: 500; overflow-wrap: anywhere; }
.card-title:hover { text-decoration: underline; }
.card-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.card-foot { display: flex; align-items: center; gap: 4px; min-height: 24px; }
.card-meta { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.column-note { padding: 8px 8px 2px; font-size: 12px; color: var(--muted); }
.drop-marker { height: 3px; border-radius: 2px; background: var(--accent); flex: none; }
.meter {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--ok) var(--pct), var(--border) var(--pct));
}
.meter.over { background: var(--danger); }

/* Markdown */
.md-view { padding-top: 12px; }
.md-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.md-status { color: var(--muted); font-size: 12px; }
.md-output {
  display: block;
  width: 100%;
  height: calc(100vh - 230px);
  height: calc(100dvh - 230px);
  min-height: 320px;
  resize: vertical;
  color: var(--text);
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  tab-size: 2;
}

.modal-review { width: min(620px, calc(100vw - 32px)); }
.md-review-head { font-size: 13px; font-weight: 650; margin: 12px 0 6px; }
.md-review { display: grid; gap: 4px; max-height: 40vh; overflow-y: auto; padding-left: 18px; font-size: 13px; overflow-wrap: anywhere; }
.md-review.bad { color: var(--danger); }
.md-review.muted { color: var(--muted); }

/* Calendar */
.calendar-wrap { padding-top: 12px; }
.cal-nav { display: flex; align-items: center; gap: 4px; margin-bottom: 10px; flex-wrap: wrap; }
.cal-nav .btn { margin-right: 6px; padding: 4px 10px; }
.cal-title { font-size: 15px; font-weight: 650; margin-left: 8px; }
.cal-title::first-letter { text-transform: uppercase; }
.cal-note { margin-left: auto; font-size: 12px; color: var(--muted); }
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
}
.cal-head { border-top: 1px solid var(--border); border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; }
.cal-week { padding: 6px 8px; background: var(--surface-2); font-size: 12px; font-weight: 600; color: var(--muted); }
.cal-week::first-letter { text-transform: uppercase; }
.cal-cell { min-height: 112px; padding: 5px; background: var(--surface); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-cell.outside { background: var(--bg); }
.cal-cell.outside .cal-day { color: var(--faint); }
.cal-cell.drop-on { box-shadow: inset 0 0 0 2px var(--accent); }
.cal-cell-head { display: flex; align-items: center; justify-content: space-between; min-height: 22px; }
.cal-day { display: grid; place-items: center; min-width: 22px; height: 22px; font-size: 12px; font-weight: 550; border-radius: 50%; font-variant-numeric: tabular-nums; }
.is-today .cal-day { background: var(--accent); color: var(--on-accent); }
.cal-add { display: inline-flex; padding: 3px; border-radius: 4px; color: var(--muted); opacity: 0; }
.cal-cell:hover .cal-add, .cal-add:focus-visible { opacity: 1; }
.cal-add:hover { background: var(--hover); }
.cal-chip {
  display: block;
  padding: 2px 6px;
  border-radius: 4px;
  border-left: 3px solid var(--c);
  background: color-mix(in srgb, var(--c) 12%, var(--surface));
  font-size: 12px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  cursor: grab;
}
.cal-chip:hover { background: color-mix(in srgb, var(--c) 24%, var(--surface)); }
.cal-chip.overdue { border-left-color: var(--danger); color: var(--danger); font-weight: 550; }
.cal-chip.is-done { text-decoration: line-through; color: var(--faint); }
.cal-flag { display: inline-flex; vertical-align: -1px; margin-right: 3px; color: var(--c); }

/* Task panel */
#drawer-scrim { position: fixed; inset: 0; z-index: 20; background: rgb(8 25 29 / 30%); }
#drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 21;
  width: min(620px, 100vw);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: slide-in .16s ease-out;
}
#drawer:focus { outline: none; }
@keyframes slide-in { from { transform: translateX(24px); opacity: .4; } }
.panel { display: flex; flex-direction: column; gap: 14px; padding: 12px 24px 40px; }
.panel-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 32px; }
.panel-top .crumb { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.panel-tools { display: flex; gap: 2px; flex: none; }
.crumb-btn { display: inline-flex; align-items: center; gap: 5px; min-width: 0; font-size: 13px; color: var(--muted); text-align: left; }
.crumb-btn:hover { color: var(--accent); }
.panel-title {
  padding: 2px 6px;
  margin: 0 -6px;
  width: calc(100% + 12px);
  border: 0;
  border-radius: 6px;
  background: none;
  font-size: 21px;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -.012em;
  resize: none;
  overflow: hidden;
}
.panel-title:hover { background: var(--hover); }
.props { display: grid; gap: 2px; }
.prop { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; min-height: 32px; }
.prop-label { font-size: 13px; color: var(--muted); }
.prop-value { min-width: 0; display: flex; align-items: center; }
.prop .pill { max-width: 220px; padding: 3px 10px; }
.prop .due-btn { padding: 3px 6px; }
.prop .due-btn.unset { opacity: 1; }
.bare-input, .bare-select {
  padding: 3px 6px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  font-size: 13px;
  max-width: 100%;
}
.bare-input::placeholder { color: var(--faint); }
.bare-input:hover, .bare-select:hover { background: var(--hover); }
.bare-input:focus-visible { background: var(--surface-2); }
.bare-select { cursor: pointer; }
.tags-edit { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.tag-input { width: 90px; }
.description {
  width: 100%;
  min-height: 72px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  resize: none;
  line-height: 1.5;
}
.description:focus-visible { border-color: var(--accent); outline-offset: 0; background: var(--surface); }
.panel-section { display: grid; gap: 8px; padding-top: 14px; border-top: 1px solid var(--border); }
.panel-section h3 { display: flex; align-items: baseline; gap: 8px; font-size: 13px; font-weight: 650; }
.section-count { font-size: 12px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.sub-list { display: grid; }
.sub { display: flex; align-items: center; gap: 9px; padding: 4px 4px; border-radius: 5px; min-height: 32px; }
.sub:hover { background: var(--hover); }
.sub-title { flex: 1; min-width: 0; text-align: left; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sub-title:hover { text-decoration: underline; }
.panel-section .add-row { padding-left: 5px; }
.time-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.time-row .btn.danger .icon { color: inherit; }
.time-total { color: var(--muted); font-size: 13px; }
.time-log { width: 96px; margin-left: auto; padding: 5px 9px; font-size: 13px; }
.time-entries summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.time-entries ul { margin-top: 4px; }
.time-entries li { display: flex; align-items: center; gap: 12px; font-size: 13px; padding: 2px 0; color: var(--muted); }
.entry-len { margin-left: auto; color: var(--text); font-variant-numeric: tabular-nums; }
.time-entries li .icon-btn + .icon-btn { margin-left: -10px; }
.entry-edit { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; width: 100%; padding: 4px 0; }
.entry-edit .field { padding: 4px 8px; font-size: 13px; }
.entry-edit .entry-length { width: 80px; }
.entry-edit input[type="datetime-local"] { width: auto; flex: 0 1 200px; min-width: 0; }
.entry-ends { flex-basis: 100%; font-size: 12px; color: var(--muted); }
.entry-ends.bad { color: var(--danger); }
.activity { display: grid; gap: 6px; }
.event { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--muted); }
.event time { flex: none; color: var(--faint); }
.comment { padding: 8px 10px; border-radius: var(--radius); background: var(--surface-2); }
.comment-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-body a { color: var(--accent); text-decoration: underline; }
.comment-foot { display: flex; justify-content: space-between; margin-top: 4px; font-size: 12px; color: var(--faint); }
.comment-foot .link-btn { font-size: 12px; color: var(--muted); }
.comment-input { resize: vertical; margin-top: 4px; }

/* Menus, dialogs, toasts */
.menu {
  position: fixed;
  z-index: 60;
  min-width: 170px;
  max-height: 70vh;
  overflow-y: auto;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-md);
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  border-radius: 5px;
  text-align: left;
  white-space: nowrap;
}
.menu-item:hover, .menu-item:focus-visible { background: var(--hover); outline: none; }
.menu-item.danger { color: var(--danger); }
.menu-label { flex: 1; }
.menu-sep { height: 1px; margin: 4px; background: var(--border); }
.menu-date { padding: 4px 8px; font-size: 13px; }
.menu-remind { display: flex; gap: 4px; padding: 2px 4px; }
.menu-remind .field { min-width: 0; flex: 1; padding: 4px 8px; font-size: 13px; }
.digest-row { display: flex; flex-wrap: wrap; margin: 8px 0 12px; color: var(--text); }
.digest-time { width: auto; padding: 3px 8px; }
.modal {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100dvh - 64px);
}
.modal::backdrop { background: rgb(8 25 29 / 45%); }
.modal h2 { font-size: 16px; font-weight: 650; margin-bottom: 10px; }
.modal-text { color: var(--muted); margin-bottom: 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.modal-quick { width: min(560px, calc(100vw - 32px)); margin-top: 14vh; padding: 16px 18px; }
.qa-input { width: 100%; border: 0; outline: 0; background: none; font-size: 17px; font-weight: 550; }
.qa-input::placeholder { color: var(--faint); font-weight: 400; }
.qa-preview { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.qa-preview:empty { display: none; }
.qa-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 8px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  line-height: 18px;
  font-weight: 550;
}
.qa-hint { margin-top: 10px; font-size: 12px; color: var(--muted); }
.qa-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.qa-foot .field { width: auto; max-width: 60%; padding: 5px 8px; }
.modal-palette { width: min(600px, calc(100vw - 32px)); margin-top: 12vh; padding: 0; overflow: hidden; }
.palette-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); color: var(--faint); }
.palette-input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--text); font-size: 16px; }
.palette-results { max-height: 50vh; overflow-y: auto; padding: 6px; }
.palette-item { display: flex; align-items: center; gap: 10px; padding: 7px 9px; border-radius: 6px; cursor: pointer; color: var(--muted); }
.palette-item.on { background: var(--accent-soft); }
.palette-label { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--text); }
.palette-item.is-done .palette-label { text-decoration: line-through; color: var(--faint); }
.palette-hint { flex: none; max-width: 50%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; }
.palette-empty { padding: 18px; text-align: center; color: var(--muted); }
.modal-statuses { width: min(520px, calc(100vw - 32px)); }
.status-list { display: grid; gap: 6px; }
.status-row { display: flex; align-items: center; gap: 6px; }
.status-row .field { flex: 1; min-width: 0; padding: 5px 9px; }
.color-swatch { flex: none; width: 28px; height: 28px; padding: 0; border: 1px solid var(--border-strong); border-radius: 6px; background: none; cursor: pointer; }
.color-swatch::-webkit-color-swatch-wrapper { padding: 2px; }
.color-swatch::-webkit-color-swatch { border: 0; border-radius: 4px; }
.status-kind { flex: none; width: 40px; font-size: 12px; font-weight: 600; color: var(--ok); }
.status-kind.muted { color: var(--muted); font-weight: 500; }
.status-add { display: flex; gap: 8px; margin-top: 12px; }
.status-add .field { flex: 1; }
.shortcuts { display: grid; gap: 7px; }
.shortcuts > div { display: flex; align-items: center; gap: 12px; }
.shortcuts dt { width: 56px; }
.shortcuts dd { color: var(--muted); }
#toasts {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 70;
  transform: translateX(-50%);
  display: grid;
  gap: 8px;
  justify-items: center;
  width: max-content;
  max-width: calc(100vw - 32px);
}
.toast {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 14px;
  border-radius: 8px;
  background: #102a30;
  color: #eaf4f4;
  box-shadow: var(--shadow-md);
  font-size: 13px;
  animation: toast-in .15s ease-out;
}
.toast.error { background: #8d2720; color: #fff; }
.toast-action { color: #5fe0d0; font-weight: 650; }
.toast-action:hover { text-decoration: underline; }
@keyframes toast-in { from { transform: translateY(6px); opacity: 0; } }

/* Timeline and Gantt */
.btn.compact { padding: 3px 10px; font-size: 13px; }
.chart-page { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.chart {
  --label: 300px;
  --weekend: color-mix(in srgb, var(--text) 4%, transparent);
  --grid: color-mix(in srgb, var(--border) 55%, transparent);
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}
.chart-inner { position: relative; width: calc(var(--label) + var(--track)); min-height: 100%; }
.chart-head { position: sticky; top: 0; z-index: 5; display: flex; background: var(--surface-2); border-bottom: 1px solid var(--border-strong); }
.chart-corner {
  position: sticky;
  left: 0;
  z-index: 1;
  flex: none;
  display: flex;
  align-items: flex-end;
  width: var(--label);
  padding: 6px 12px;
  background: var(--surface-2);
  border-right: 1px solid var(--border-strong);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.chart-scale { flex: none; width: var(--track); }
.chart-scale-row { display: flex; height: 24px; }
.chart-scale-row:first-child { border-bottom: 1px solid var(--border); }
.chart-seg {
  flex: none;
  width: calc(var(--day) * var(--n));
  display: flex;
  align-items: center;
  border-right: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.chart-seg span { padding: 0 6px; }
/* Month and year names stay readable while scrolling. Anything clipping this cell would break that. */
.chart-scale-row:first-child .chart-seg { font-weight: 600; color: var(--text); }
.chart-scale-row:first-child .chart-seg span { position: sticky; left: calc(var(--label) + 2px); }
.chart-scale-row:last-child .chart-seg { overflow: hidden; }
.scale-day .chart-scale-row:last-child .chart-seg { justify-content: center; }
.scale-day .chart-scale-row:last-child .chart-seg span { padding: 0; }
.chart-seg.is-today { background: var(--accent); color: var(--on-accent); font-weight: 650; }
.chart-body { position: relative; }
.chart-row { display: flex; border-bottom: 1px solid var(--border); }
.chart-row.drop-on .chart-track, .chart-row.drop-on .chart-label { background-color: var(--accent-soft); }
.chart-label {
  position: sticky;
  left: 0;
  z-index: 3;
  flex: none;
  display: flex;
  align-items: center;
  gap: 7px;
  width: var(--label);
  min-width: 0;
  padding: 0 10px 0 calc(8px + var(--depth, 0) * 20px);
  background: var(--bg);
  border-right: 1px solid var(--border-strong);
}
.lane-row .chart-label { align-items: flex-start; padding-top: 12px; padding-left: 12px; }
.lane-row .chart-label .dot { margin-top: 5px; }
.list-row .chart-label, .list-row .chart-track { background-color: var(--surface-2); }
.chart-label .row-title { font-weight: 450; }
.task-row.is-done .row-title { text-decoration: line-through; color: var(--faint); }
.chart-chev { flex: none; display: inline-flex; padding: 3px; border-radius: 4px; color: var(--muted); }
.chart-chev:hover { background: var(--hover); }
.chart-chev-gap { flex: none; width: 18px; }
.chart-track {
  position: relative;
  flex: none;
  width: var(--track);
  background-image: linear-gradient(90deg, transparent calc(var(--day) * 5), var(--weekend) calc(var(--day) * 5));
  background-size: calc(var(--day) * 7) 100%;
}
.scale-day .chart-track {
  background-image:
    linear-gradient(90deg, transparent calc(var(--day) * 5), var(--weekend) calc(var(--day) * 5)),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: calc(var(--day) * 7) 100%, var(--day) 100%;
}
.scale-month .chart-track { background-image: none; }
.chart-track.can-schedule { cursor: copy; }
.chart-overlay { position: absolute; top: 0; bottom: 0; left: var(--label); width: var(--track); z-index: 2; overflow: hidden; pointer-events: none; }
.chart-month-line { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--border-strong); }
.chart-today { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--accent); }
.chart-links { position: absolute; inset: 0; width: 100%; height: 100%; }
.link { fill: none; stroke: var(--muted); stroke-width: 1.5; }
.link.late { stroke: var(--danger); stroke-dasharray: 4 3; }
.link-draft { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 5 4; }

.bar {
  --c: var(--faint);
  position: absolute;
  height: 24px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--c) 26%, var(--surface));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 65%, var(--surface));
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.bar:hover { background: color-mix(in srgb, var(--c) 36%, var(--surface)); }
.bar.dragging { cursor: grabbing; z-index: 4; box-shadow: inset 0 0 0 1px var(--c), var(--shadow-md); }
.bar.late { box-shadow: inset 0 0 0 1.5px var(--danger); }
.bar.is-done { opacity: .6; }
.bar-fill { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 5px; background: color-mix(in srgb, var(--c) 55%, var(--surface)); pointer-events: none; }
.bar-label {
  position: absolute;
  top: 0;
  left: 8px;
  right: 8px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 500;
  line-height: 24px;
  white-space: nowrap;
  text-overflow: ellipsis;
  pointer-events: none;
}
.bar-label.outside { left: calc(100% + 6px); right: auto; max-width: 260px; color: var(--muted); }
.bar-label.outside.after-link { left: calc(100% + 22px); }
.bar-end { position: absolute; top: 0; bottom: 0; width: 8px; cursor: ew-resize; touch-action: none; z-index: 1; }
.bar-end.start { left: 0; border-radius: 5px 0 0 5px; }
.bar-end.finish { right: 0; border-radius: 0 5px 5px 0; }
.bar-end:hover { background: color-mix(in srgb, var(--c) 70%, transparent); }
.bar-link {
  position: absolute;
  top: 7px;
  left: calc(100% + 5px);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: var(--surface);
  opacity: 0;
  cursor: crosshair;
  touch-action: none;
}
.bar:hover .bar-link, .bar:focus-visible .bar-link, .bar-link:hover { opacity: 1; }
@media (hover: none) { .bar-link { opacity: 1; } }
.bar-ghost { position: absolute; top: 6px; height: 24px; border-radius: 5px; border: 1px dashed var(--accent); pointer-events: none; }
.bar-rollup { position: absolute; height: 10px; border-radius: 3px; background: var(--muted); opacity: .75; }
.bar-rollup:hover { opacity: 1; }
.list-span { position: absolute; top: 15px; height: 6px; border-radius: 3px; background: var(--border-strong); }
.chart-tip {
  position: fixed;
  z-index: 60;
  padding: 3px 8px;
  border-radius: 5px;
  background: var(--side-bg);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
}
.chart-note { padding: 6px 24px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.chart-tray {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  max-height: 84px;
  overflow: auto;
  padding: 8px 24px;
  border-top: 1px solid var(--border-strong);
  background: var(--surface-2);
}
.chart-tray-title { font-size: 12px; font-weight: 650; color: var(--muted); }
.chart-tray-item { max-width: 260px; overflow: hidden; padding: 2px 8px; border-radius: 5px; background: var(--surface); box-shadow: var(--shadow-sm); font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.chart-tray-item:hover { text-decoration: underline; }
.meta-chip.waiting { color: var(--warn); }
.dep-heading { margin-top: 8px; font-size: 12px; font-weight: 600; color: var(--muted); }
.dep-add { margin-top: 6px; max-width: 100%; color: var(--muted); }

/* Narrow screens */
@media (max-width: 1080px) {
  .row { grid-template-columns: 20px minmax(0, 1fr) 92px 28px 112px; }
  .row-tags { display: none; }
}
@media (max-width: 800px) {
  #sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 30;
    transform: translateX(-100%);
    transition: transform .16s ease-out;
    box-shadow: var(--shadow-lg);
  }
  .nav-open #sidebar { transform: none; }
  .nav-open #sidebar-scrim { display: block !important; position: fixed; inset: 0; z-index: 29; background: rgb(8 25 29 / 40%); }
  .icon-btn.nav-toggle { display: inline-flex; margin-left: -6px; }
  .side-tool { opacity: 1; }
  .page-head { padding: 10px 16px 8px; gap: 8px 10px; }
  .page-title { flex: 1; }
  .new-task kbd, .new-task span:not(.icon) { display: none; }
  .new-task { padding: 7px 9px; }
  .tabs { order: 5; width: 100%; }
  .tab { flex: 1; justify-content: center; padding: 5px 4px; }
  .chart { --label: 150px; }
  .chart-note { padding: 6px 16px; }
  .chart-tray { padding: 8px 16px; }
  .filter-bar { padding: 2px 16px 10px; }
  .search-field { width: 100%; }
  .page-body { padding: 4px 16px 40px; }
  .board { padding: 12px 16px 16px; scroll-snap-type: x proximity; }
  .column { flex-basis: min(290px, 84vw); scroll-snap-align: start; }
  .row { grid-template-columns: 20px minmax(0, 1fr) auto auto; gap: 8px; padding: 7px 10px; }
  .row .pill { display: none; }
  .row-where { display: none; }
  .day-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cal-cell { min-height: 72px; padding: 3px; }
  .cal-chip { padding: 1px 3px; font-size: 11px; border-left-width: 2px; }
  .cal-note { width: 100%; margin: 4px 0 0; }
  .panel { padding: 8px 16px 32px; }
  .time-log { margin-left: 0; }
  .event { flex-direction: column; gap: 0; }
}
@media (max-width: 560px) {
  .tab-label { display: none; }
}

/* Sign-in, accounts and sharing */
#app[hidden], #auth[hidden] { display: none; }
#auth { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: var(--bg); }
.auth-card {
  width: min(380px, 100%);
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; font-size: 18px; font-weight: 650; }
.auth-card h1 { font-size: 16px; font-weight: 650; margin-bottom: 6px; }
.auth-card .modal-text { font-size: 13px; }
.auth-card code { overflow-wrap: anywhere; }
.auth-form { display: grid; gap: 12px; margin-top: 12px; }
.auth-form .btn { justify-content: center; }
.auth-error { color: var(--danger); font-size: 13px; }
.auth-help { margin: 12px 0 0; }
.nav-who { margin-left: auto; color: var(--side-muted); font-size: 12px; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.space-shared { display: inline-flex; flex: none; margin-left: 4px; color: var(--side-muted); }
.menu-note { padding: 6px 10px; color: var(--muted); font-size: 12px; max-width: 260px; overflow-wrap: anywhere; }
.author { font-weight: 600; color: var(--text); margin-right: 6px; }
.modal-people { width: min(560px, calc(100vw - 32px)); }
.people-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 2px; }
.people-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 7px 4px; border-bottom: 1px solid var(--border); }
.people-name { flex: 1 1 140px; min-width: 0; overflow-wrap: anywhere; }
.people-handle { display: block; color: var(--muted); font-size: 12px; }
.people-state { color: var(--muted); font-size: 12px; }
.people-add { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; }
.invite-box { display: grid; gap: 8px; margin: 12px 0; padding: 12px; border: 1px solid var(--border-strong); border-radius: var(--radius); }
.invite-box .field { font-size: 12px; }
@media (max-width: 520px) { .people-add { grid-template-columns: 1fr; } }
