/* nanos Tasks — team kanban.
   Design system: nanos brand v1 („Precisely what works.") — mint on ink,
   everything else restrained. Two full themes (light/dark via [data-theme]
   on <html>), every color derived from tokens.

   Mint has two jobs and two tokens: --mint is a FILL (buttons, dots, chips)
   and always carries ink text (--on-mint, 8:1 — white on mint is 2.4:1);
   --mint-text is mint as TEXT, darkened on paper to stay above 4.5:1. */

/* --- tokens ----------------------------------------------------------------- */

:root {
  --mint: #5eb782;
  --mint-hi: #4fffaa;   /* neon: highlight moments only, never wallpaper */
  --mint-soft: #7ddf9f; /* hover on mint fills */
  --on-mint: #0a0a0a;
  --mint-text: #247a4c;

  --mint-lt: color-mix(in srgb, var(--mint) 12%, transparent);
  --mint-md: color-mix(in srgb, var(--mint) 24%, transparent);
  --mint-glow: color-mix(in srgb, var(--mint) 34%, transparent);
  --stamp: var(--mint);

  --bg: #faf9f5;        /* paper */
  --topbar: #0a0a0a;    /* ink */
  --surface: #f1f0eb;
  --card: #ffffff;
  --border: #e4e2dc;
  --border-soft: #ecebe6;
  --ink: #0a0a0a;
  --mid: #3d3d3b;
  --muted: #6b6b6b;
  --danger: #c92a2a;
  --overlay: rgba(10, 10, 10, 0.5);
  --shadow-1: 0 1px 2px rgba(10, 10, 10, 0.05), 0 2px 8px rgba(10, 10, 10, 0.05);
  --shadow-hover: 0 14px 32px -14px rgba(10, 10, 10, 0.28);
  --shadow-modal: 0 34px 84px -20px rgba(10, 10, 10, 0.5);

  --bg-off: var(--surface); /* legacy alias */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  --mint-text: var(--mint); /* 7:1 on graphite */
  --mint-lt: color-mix(in srgb, var(--mint) 16%, transparent);
  --mint-md: color-mix(in srgb, var(--mint) 26%, transparent);

  --bg: #0a0a0a;        /* ink */
  --topbar: #000000;
  --surface: #131313;
  --card: #1a1a1a;      /* graphite */
  --border: rgba(255, 255, 255, 0.1);
  --border-soft: rgba(255, 255, 255, 0.055);
  --ink: #faf9f5;
  --mid: #b5b5b0;
  --muted: #8a8a8a;
  --danger: #ff6b6b;
  --overlay: rgba(0, 0, 0, 0.62);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4), 0 2px 12px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 18px 42px -16px rgba(0, 0, 0, 0.72);
  --shadow-modal: 0 40px 90px -20px rgba(0, 0, 0, 0.78);
}

/* --- base ------------------------------------------------------------------- */

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "General Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background: var(--bg);
  color: var(--mid);
  font-size: 15px;
}
#root { height: 100vh; display: flex; flex-direction: column; }

a { color: var(--mint-text); text-decoration: none; }
a:hover { color: var(--ink); }
::selection { background: var(--mint-md); }

h1, h2, h3 { color: var(--ink); }
.dot { color: var(--mint-text); }

@keyframes ovl { from { opacity: 0 } to { opacity: 1 } }
@keyframes mdl { from { opacity: 0; transform: translateY(14px) scale(.985) } to { opacity: 1; transform: none } }
@keyframes scr { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: none } }
@keyframes cardIn { from { opacity: 0; transform: translateY(-6px) scale(.98) } to { opacity: 1; transform: none } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* eyebrow / UI tag (brand §01: 500 · 12 · +18 % · upper) with trailing line —
   the only place uppercase is allowed; headlines stay mixed-case */
.label-line {
  display: flex; align-items: center; gap: 12px;
  font-size: 12px; font-weight: 500; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--mint-text);
  margin-bottom: 14px;
}
.label-line::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.label-line.quiet { color: var(--muted); }

/* --- buttons & inputs ------------------------------------------------------- */

button {
  font: inherit; font-weight: 600; font-size: 13.5px; cursor: pointer;
  border-radius: 4px; padding: 9px 15px; letter-spacing: 0.2px; line-height: 1;
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  transition: all 0.15s var(--ease);
  border: 1px solid var(--border); background: var(--card); color: var(--ink);
}
button:hover { border-color: var(--mid); }
button:disabled { opacity: 0.55; cursor: default; }

button.primary { border-color: var(--mint); background: var(--mint); color: var(--on-mint); }
button.primary:hover { background: var(--mint-soft); border-color: var(--mint-soft); box-shadow: 0 8px 22px var(--mint-glow); }
button.ghost { border-color: transparent; background: transparent; color: var(--muted); }
button.ghost:hover { background: var(--surface); color: var(--ink); border-color: transparent; }
button.danger { border-color: transparent; background: transparent; color: var(--danger); }
button.danger:hover { background: color-mix(in srgb, var(--danger) 12%, transparent); border-color: transparent; }
button.link {
  background: none; border: none; color: var(--mint-text); padding: 0;
  font-weight: 600; border-radius: 0;
}
button.link:hover { text-decoration: underline; box-shadow: none; }

input, textarea, select {
  font: inherit; width: 100%; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 4px;
  background: var(--card); color: var(--ink); font-size: 14px;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--mint);
  box-shadow: 0 0 0 3px var(--mint-lt);
  outline: none;
}
select { width: auto; }

.field { margin-bottom: 14px; }
.field label, label {
  display: block; font-size: 10px; font-weight: 600; letter-spacing: 2px;
  text-transform: uppercase; color: var(--muted); margin-bottom: 6px;
}
.field input, .field textarea, .field select { width: 100%; }
.input-row { display: flex; gap: 8px; }
.input-row input { flex: 1; }

.error { color: var(--danger); font-size: 13px; margin: 6px 0; }
.spinner { padding: 40px; text-align: center; color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 40px; }
.meta { color: var(--muted); font-size: 12px; }

/* --- topbar ----------------------------------------------------------------- */

.topbar {
  display: flex; align-items: center; gap: 11px; padding: 12px 20px;
  background: var(--topbar); color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06); z-index: 5;
}
/* brand: the arch symbol stands in for the wordmark at this size (brand §03) */
.topbar .brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 600; font-size: 19px; letter-spacing: -0.5px; color: #fff;
}
.topbar .brand .arch { width: 20px; height: 20px; }
.brand .product, .card-panel h1 .product { font-weight: 500; color: rgba(255, 255, 255, 0.55); }
.topbar .spacer { flex: 1; }
.topbar button {
  border-color: transparent; background: transparent; color: rgba(255, 255, 255, 0.72);
}
.topbar button:hover { background: rgba(255, 255, 255, 0.08); color: #fff; border-color: transparent; }
.topbar button.outline { border-color: rgba(255, 255, 255, 0.2); color: rgba(255, 255, 255, 0.85); }
.topbar button.outline:hover { border-color: rgba(255, 255, 255, 0.5); color: #fff; background: transparent; }
.topbar button.primary { background: var(--mint); border-color: var(--mint); color: var(--on-mint); }
.topbar .avatar { width: 20px; height: 20px; font-size: 10px; background: var(--mint); color: var(--on-mint); }

/* --- subbar (board header) -------------------------------------------------- */

.subbar {
  display: flex; align-items: center; gap: 13px; padding: 13px 20px;
  background: var(--card); border-bottom: 1px solid var(--border);
}
.subbar strong { color: var(--ink); font-size: 16px; font-weight: 600; letter-spacing: -0.3px; }
.subbar .spacer { flex: 1; }

.role-badge {
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 2px;
  padding: 3px 10px; border-radius: 999px; white-space: nowrap;
  background: var(--surface); color: var(--muted); border: 1px solid var(--border);
}
.role-badge.owner { background: var(--mint); color: var(--on-mint); border-color: transparent; }
.role-badge.editor { background: var(--mint-lt); color: var(--mint-text); border-color: transparent; }
.role-badge.archived { background: var(--ink); color: var(--bg); border-color: transparent; }

/* segmented control (board/whiteboard switch) */
.seg-group {
  display: flex; gap: 2px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 6px; padding: 3px;
  width: fit-content;
}
.seg-group button {
  border: 1px solid transparent; border-radius: 4px; padding: 6px 13px;
  background: transparent; color: var(--mid); font-size: 13px;
}
.seg-group button:hover { color: var(--ink); border-color: transparent; }
.seg-group button.primary { background: var(--mint); color: var(--on-mint); border-color: transparent; box-shadow: none; }

/* --- auth ------------------------------------------------------------------- */

.auth-wrap {
  height: 100vh; display: grid; place-items: center; padding: 24px;
  background: var(--topbar); position: relative;
  animation: scr 0.4s var(--ease);
}
.auth-wrap::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 38%;
  background: radial-gradient(120% 140% at 80% 0%, var(--mint-glow), transparent 60%);
  opacity: 0.5; pointer-events: none;
}
.auth-theme { position: absolute; top: 20px; right: 20px; }
.auth-theme button { border-color: transparent; background: transparent; color: rgba(255, 255, 255, 0.72); }
.auth-theme button:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.card-panel {
  position: relative; width: 100%; max-width: 392px;
  background: var(--card); border-radius: 12px; box-shadow: var(--shadow-modal);
  overflow: hidden; padding: 0;
}
.card-panel .stamp { height: 4px; background: var(--stamp); }
.card-panel .inner { padding: 40px 36px 30px; }
.card-panel h1 {
  margin: 0; font-size: 40px; font-weight: 600; letter-spacing: -1.6px; line-height: 1;
  display: flex; align-items: center; gap: 12px;
}
.card-panel h1 .arch { width: 36px; height: 36px; }
.card-panel h1 .product { color: var(--muted); }
.card-panel .claim { margin: 12px 0 30px; font-size: 15px; color: var(--mid); letter-spacing: 0.2px; }
.card-panel p.sub { margin: 0 0 18px; color: var(--muted); font-size: 13.5px; }
.card-panel .wide { width: 100%; justify-content: center; padding: 12px 15px; font-size: 15px; }
.card-panel .foot {
  margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--border);
  font-size: 11px; letter-spacing: 0.4px; color: var(--muted); text-align: center;
}

/* --- pages (board list, verwaltung) ----------------------------------------- */

.content { flex: 1; overflow: auto; padding: 52px 24px; animation: scr 0.35s var(--ease); }
.content-inner { max-width: 1040px; margin: 0 auto; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 34px; }
.page-head .label-line { margin-bottom: 10px; }
.page-head .label-line::after { display: none; }
.page-head h1 { margin: 0; font-size: 34px; font-weight: 600; letter-spacing: -1.4px; line-height: 1; }

.board-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: 18px;
}
.board-tile {
  position: relative; background: var(--card); border: 1px solid var(--border);
  border-radius: 9px; box-shadow: var(--shadow-1); padding: 24px 20px 20px;
  cursor: pointer; overflow: hidden;
  transition: transform 0.16s var(--ease), box-shadow 0.16s, border-color 0.16s;
}
.board-tile::before {
  content: ""; position: absolute; top: 0; left: 24px; width: 36px; height: 3px;
  background: var(--stamp);
}
.board-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.board-tile h3 { margin: 0 0 8px; font-size: 19px; font-weight: 600; letter-spacing: -0.5px; }
.board-tile .meta { font-size: 12.5px; color: var(--muted); letter-spacing: 0.2px; }

.board-tile .tile-actions {
  margin-top: 16px; display: flex; justify-content: flex-end;
  opacity: 0; transition: opacity 0.16s;
}
.board-tile:hover .tile-actions, .board-tile:focus-within .tile-actions { opacity: 1; }
@media (hover: none) { .board-tile .tile-actions { opacity: 1; } }

/* --- board priority (traffic light, capped top tier) ----------------------- */

.prio-dot {
  display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  flex-shrink: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12);
}
.prio-dot.red { background: #d64545; }
.prio-dot.yellow { background: #e3a008; }
.prio-dot.green { background: #579a5b; }

.tile-head { display: flex; align-items: center; gap: 8px; }
.tile-head h3 { margin: 0 0 8px; }
.tile-head .prio-dot { margin-bottom: 8px; }
.prio-age { color: var(--muted); }

.prio-usage { display: flex; gap: 12px; align-items: center; margin-right: 4px; }
.prio-usage-item {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums;
}

.prio-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; white-space: nowrap;
}
/* a viewer sees the tier but cannot change it — say so visually rather than
   offering a button that looks live and does nothing */
.prio-btn:disabled { opacity: 0.75; cursor: default; box-shadow: none; }
.prio-usage-item.enforced { color: var(--ink); font-weight: 600; }

.modal.modal-narrow { max-width: 460px; }
.prio-option {
  display: flex; align-items: flex-start; gap: 10px; width: 100%;
  text-align: left; padding: 12px 14px; margin-bottom: 8px;
  background: var(--card); border: 1px solid var(--border); border-radius: 8px;
}
.prio-option:hover:not(:disabled) { border-color: var(--mint); }
.prio-option.current { border-color: var(--mint); background: var(--mint-lt); }
.prio-option:disabled { opacity: 0.45; }
.prio-option .prio-dot { margin-top: 5px; }
.prio-option-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.prio-option-text .meta { font-size: 12px; color: var(--muted); }
.prio-current-tag { margin-left: auto; font-size: 11px; color: var(--mint-text); }

/* --- deadlines ------------------------------------------------------------- */

/* only overdue raises its voice — if everything with a date were coloured,
   the colour would stop meaning anything */
.due-chip {
  display: inline-flex; align-items: center; gap: 4px;
  margin: 6px 0 2px; padding: 2px 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.2px;
  border: 1px solid var(--border); color: var(--muted); background: transparent;
  white-space: nowrap;
}
.due-chip.soon { color: var(--ink); border-color: var(--ink); }
.due-chip.overdue {
  color: #fff; background: var(--danger); border-color: transparent;
}
/* a finished card keeps its date for the record but stops claiming attention */
.due-chip.done {
  color: var(--muted); border-color: var(--border-soft);
  text-decoration: line-through; opacity: 0.7;
}
.due-prefix { font-weight: 400; opacity: 0.75; }

.dates-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; }
.dates-btn:disabled { opacity: 0.75; cursor: default; box-shadow: none; }
.dates-btn.overdue { color: var(--danger); border-color: var(--danger); }

/* the "done" column: marked so the rule is visible, but the real teacher is
   the due chip going grey the moment a card lands here */
.column-head .done-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--mint); flex-shrink: 0;
}
.column-head.is-done-col > span:first-of-type { font-weight: 600; }

/* explanatory box inside a modal (archive / delete dialogs) */
.hint-box {
  margin: 14px 0; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: 8px; font-size: 13px; color: var(--muted); line-height: 1.5;
}
.board-tile .tile-foot {
  margin-top: 20px; display: flex; align-items: center; justify-content: space-between;
}
.board-tile .count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.avatar-stack { display: flex; }
.avatar-stack .avatar {
  width: 22px; height: 22px; font-size: 10px; border: 2px solid var(--card);
  margin-left: -6px;
}
.avatar-stack .avatar:first-child { margin-left: 0; }
.board-tile.new {
  display: grid; place-items: center; background: transparent;
  border: 1.5px dashed var(--border); box-shadow: none; color: var(--muted);
  font-weight: 600; font-size: 14px; min-height: 150px;
  transition: border-color 0.16s, color 0.16s;
}
.board-tile.new::before { display: none; }
.board-tile.new:hover { border-color: var(--mint); color: var(--mint-text); transform: none; box-shadow: none; }
.board-tile.archived {
  background: var(--surface); border-color: var(--border-soft); box-shadow: none;
  opacity: 0.72; transition: opacity 0.16s;
}
.board-tile.archived::before { display: none; }
.board-tile.archived:hover { opacity: 1; transform: none; box-shadow: none; }

.archive-section { margin-top: 44px; }
.archive-section summary { cursor: pointer; list-style: none; display: block; }
.archive-section summary::-webkit-details-marker { display: none; }

/* --- kanban ----------------------------------------------------------------- */

.kanban {
  flex: 1; display: flex; gap: 16px; padding: 22px 20px;
  overflow-x: auto; align-items: flex-start; animation: scr 0.3s var(--ease);
}
.column {
  background: var(--surface); border-radius: 9px; width: 300px; min-width: 300px;
  display: flex; flex-direction: column; max-height: 100%;
  border: 1px solid var(--border-soft);
  outline: 1.5px solid transparent; outline-offset: -2px;
  transition: outline 0.15s;
}
.column.drop-active { outline: 1.5px dashed var(--mint); }
/* column reordering: the head is the handle; a mint bar in the gap shows
   where the column will land (outer box-shadow, shrunk to a 3px strip) */
.column-head.is-draggable { cursor: grab; }
.column-head.is-draggable:active { cursor: grabbing; }
.column.col-dragging { opacity: 0.45; }
.column.col-drop-before { box-shadow: -10px 0 0 -7px var(--mint); }
.column.col-drop-after { box-shadow: 10px 0 0 -7px var(--mint); }
.column-head { display: flex; align-items: center; gap: 9px; padding: 14px 15px 11px; }
.column-head::before {
  content: ""; width: 7px; height: 7px; border-radius: 2px;
  background: var(--mint); opacity: 0.85; flex-shrink: 0;
}
.column-head span:first-of-type { font-weight: 600; color: var(--ink); font-size: 14px; letter-spacing: 0.2px; }
.column-head .count {
  font-size: 11px; font-weight: 600; color: var(--muted);
  background: var(--card); border: 1px solid var(--border);
  border-radius: 999px; padding: 1px 8px; font-variant-numeric: tabular-nums;
}
.column-head .spacer { flex: 1; }
.column-head button.ghost { padding: 4px 7px; }
.column-head button.ghost:hover { background: var(--card); }

.cards {
  padding: 0 9px 4px; overflow-y: auto; flex: 1; min-height: 8px;
  display: flex; flex-direction: column; gap: 9px;
}
.kcard {
  background: var(--card); border: 1px solid var(--border);
  border-left: 2px solid transparent; border-radius: 6px;
  box-shadow: var(--shadow-1); padding: 12px 13px; cursor: grab;
  animation: cardIn 0.2s var(--ease);
  transition: transform 0.14s var(--ease), border-color 0.14s, box-shadow 0.14s, opacity 0.14s;
}
.kcard:hover { border-left-color: var(--mint); transform: translateY(-1px); box-shadow: var(--shadow-hover); }
.kcard.dragging { opacity: 0.4; }
.kcard .ktag {
  font-size: 10px; font-weight: 600; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--mint-text); margin-bottom: 7px;
}
.kcard .title { font-size: 14px; line-height: 1.35; color: var(--ink); font-weight: 500; text-wrap: pretty; }
.kcard .assignee {
  margin-top: 11px; display: inline-flex; align-items: center; gap: 7px;
  font-size: 11.5px; color: var(--muted);
}
.avatar {
  width: 19px; height: 19px; border-radius: 50%;
  background: var(--mint-lt); color: var(--mint-text);
  display: inline-grid; place-items: center;
  font-size: 10px; font-weight: 600; flex-shrink: 0;
}

.add-card {
  margin: 7px 9px 10px; text-align: left; justify-content: flex-start;
  font-weight: 600; font-size: 13px; border: 1px solid transparent;
  border-radius: 5px; padding: 8px 10px; background: transparent; color: var(--muted);
  transition: background 0.14s, color 0.14s;
}
.add-card:hover { background: var(--card); color: var(--ink); border-color: transparent; }
.add-column {
  min-width: 300px; width: 300px; height: 48px;
  border: 1.5px dashed var(--border); border-radius: 8px;
  background: transparent; color: var(--muted); font-size: 13.5px;
  justify-content: center;
  transition: border-color 0.16s, color 0.16s;
}
.add-column:hover { border-color: var(--mint); color: var(--mint-text); background: transparent; }

/* --- modals ----------------------------------------------------------------- */

.overlay {
  position: fixed; inset: 0; background: var(--overlay);
  display: grid; place-items: center; z-index: 80; padding: 20px; /* above the full-screen chat on a phone (70) */
  animation: ovl 0.18s ease;
}
.modal {
  position: relative; background: var(--card); border-radius: 12px;
  box-shadow: var(--shadow-modal); width: 100%; max-width: 544px;
  max-height: 90vh; overflow: auto; padding: 26px 28px 24px;
  border-top: 4px solid var(--stamp);
  animation: mdl 0.24s var(--ease);
}
.modal h2 { margin: 0 0 4px; font-size: 21px; font-weight: 600; letter-spacing: -0.5px; }
.modal .sub { margin: 0 0 20px; font-size: 13.5px; color: var(--muted); }
.modal .row {
  display: flex; align-items: center; gap: 10px; justify-content: flex-end;
  margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border);
}
.modal textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.modal .tabs {
  display: flex; gap: 6px; margin-bottom: 22px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 7px; padding: 3px; width: fit-content;
}
.modal .tabs button {
  border: 1px solid transparent; border-radius: 5px; padding: 7px 14px;
  background: transparent; color: var(--mid); font-size: 13px;
}
.modal .tabs button:hover { color: var(--ink); }
.modal .tabs button.primary { background: var(--mint); color: var(--on-mint); box-shadow: none; }
.modal.modal-wide { max-width: min(1100px, 96vw); display: flex; flex-direction: column; }

.member-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 0;
  border-bottom: 1px solid var(--border-soft);
}
.member-row .name { flex: 1; min-width: 0; color: var(--ink); font-size: 14px; }
.member-row .name .meta { font-size: 12px; }
.member-row .avatar { width: 32px; height: 32px; font-size: 12px; }
.member-row select { width: auto; }
.org-hit { cursor: pointer; }
.org-hit:hover .name { color: var(--mint-text); }

/* card attachments */
.member-row .file-icon { font-size: 20px; width: 24px; text-align: center; flex-shrink: 0; }
.member-row .name .fname { overflow-wrap: anywhere; }
.upload-busy { color: var(--muted); font-size: 13px; align-self: center; white-space: nowrap; }
input[type="file"] { padding: 8px; font-size: 13px; }

/* user autocomplete (team modal) */
.ac-list {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 30;
  margin-top: 4px; max-height: 260px; overflow-y: auto;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: var(--shadow-1);
}
.ac-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; cursor: pointer;
}
.ac-item.hi { background: var(--mint-lt); }
.ac-item .avatar { width: 26px; height: 26px; font-size: 10px; flex-shrink: 0; }
.ac-who { min-width: 0; }
.ac-name { color: var(--ink); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-mail { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- whiteboard ------------------------------------------------------------- */

.card-wb-host {
  position: relative; display: flex; flex-direction: column;
  height: min(52vh, 440px);
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
}
.whiteboard-wrap { flex: 1; position: relative; background: var(--surface); }
.excalidraw-host { position: absolute; inset: 0; }
.whiteboard-wrap.wb-full { position: fixed; inset: 0; z-index: 200; background: var(--card); }
.wb-toggle {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
  z-index: 10; background: var(--card); border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 14px; font-size: 12px; font-weight: 600;
  color: var(--mid); box-shadow: var(--shadow-1);
}
.wb-toggle:hover { border-color: var(--mint); color: var(--mint-text); }

/* --- verwaltung ------------------------------------------------------------- */

.admin .label-line { margin-top: 8px; }
.admin h1 {
  margin: 0 0 30px; font-size: 32px; font-weight: 600;
  letter-spacing: -1.2px; line-height: 1;
}
.admin-panel {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 20px; margin-top: 14px;
  box-shadow: var(--shadow-1);
}
.admin-new {
  display: grid; grid-template-columns: 1fr 1fr 1fr auto auto; gap: 12px;
  align-items: end; padding-bottom: 18px; border-bottom: 1px solid var(--border);
}
.admin-new .field { margin-bottom: 0; }
@media (max-width: 760px) { .admin-new { grid-template-columns: 1fr; } }

.tg-state { white-space: nowrap; }

.key-reveal {
  border: 1.5px solid var(--mint); border-radius: 10px;
  padding: 16px 18px; margin-top: 18px; background: var(--mint-lt);
}
.key-reveal .label-line { margin-bottom: 10px; }
.key-reveal .row { justify-content: flex-start; margin-top: 12px; padding-top: 0; border-top: none; }
.mono { font-family: "SF Mono", ui-monospace, Menlo, monospace; font-size: 13px; word-break: break-all; color: var(--ink); }
.code-chip {
  display: inline-block; padding: 6px 12px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px;
  font-size: 18px; letter-spacing: 3px; margin-bottom: 10px;
}

.status-badge {
  font-size: 11px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase;
  padding: 3px 10px; border-radius: 999px; white-space: nowrap;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
}
.status-badge.pending { background: var(--mint-lt); color: var(--mint-text); border-color: transparent; }
.status-badge.sent { border-color: transparent; }
.status-badge.error { color: var(--danger); border-color: var(--danger); background: transparent; }

.reminder-grid { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; }
@media (max-width: 560px) { .reminder-grid { grid-template-columns: 1fr; } }

/* --- notifications: markers, follow, verlauf, digest ------------------------ */

/* a card someone else changed since your last visit: one mint dot. The
   marker says WHERE, the verlauf says WHAT. Gone on the next visit. */
.kcard { position: relative; }
.news-dot {
  position: absolute; top: 9px; right: 9px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--mint); box-shadow: 0 0 0 3px var(--mint-lt);
}
.news-chip {
  display: inline-flex; align-items: center; gap: 5px; margin: 0 0 8px auto;
  font-size: 11.5px; font-weight: 600; color: var(--mint-text);
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
.news-chip::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--mint);
}

.follow-btn { font-size: 13px; }
.follow-btn.is-off { color: var(--muted); }

.notice-bar {
  display: flex; align-items: center; gap: 10px; justify-content: space-between;
  padding: 8px 20px; background: var(--mint-lt); color: var(--ink); font-size: 13.5px;
}
.notice-bar button { padding: 4px 10px; }

/* verlauf: a drawer on the right, the board stays visible behind it */
.drawer-scrim {
  position: fixed; inset: 0; z-index: 60; background: var(--overlay);
  animation: ovl 0.18s ease;
}
.drawer {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(420px, 100vw);
  background: var(--card); border-left: 4px solid var(--stamp);
  box-shadow: var(--shadow-modal); overflow-y: auto; padding: 22px 22px 18px;
  animation: drawerIn 0.24s var(--ease);
}
@keyframes drawerIn { from { transform: translateX(24px); opacity: 0 } to { transform: none; opacity: 1 } }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.drawer-head .label-line { margin-bottom: 4px; }
.history { list-style: none; margin: 0; padding: 0; }
.history-item {
  display: flex; gap: 10px; padding: 10px 8px; border-radius: 6px;
  border-bottom: 1px solid var(--border-soft); font-size: 13.5px; color: var(--mid);
}
.history-item .avatar { margin-top: 1px; }
.history-item.is-new { background: var(--mint-lt); }
.history-item.openable { cursor: pointer; }
.history-item.openable:hover .history-card { color: var(--mint-text); }
.history-text { min-width: 0; }
.history-card { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.history-divider {
  display: flex; align-items: center; gap: 10px; margin: 12px 0 6px;
  font-size: 10px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--muted);
}
.history-divider::before, .history-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* the login overview + admin preview: the mail, in the app */
.modal.digest-modal { max-width: 600px; }
.digest-intro { margin: 6px 0 20px; color: var(--mid); font-size: 14.5px; line-height: 1.5; }
.digest .label-line { margin: 18px 0 10px; }
.digest-list { list-style: none; margin: 0; padding: 0; }
.digest-item {
  padding: 8px 0 8px 12px; margin-bottom: 6px;
  border-left: 3px solid var(--border);
}
/* overdue is the only loud thing — same rule as the due chip */
.digest-item.loud { border-left-color: var(--mint); }
.digest-item.loud .digest-hint { color: var(--mint-text); font-weight: 600; }
.digest-item a, .digest-board a { color: var(--ink); font-weight: 600; font-size: 14.5px; overflow-wrap: anywhere; }
.digest-item a:hover, .digest-board a:hover { color: var(--mint-text); }
.digest-board { padding: 10px 0; border-bottom: 1px solid var(--border-soft); }
.digest-sum { font-size: 13.5px; color: var(--mid); margin-top: 2px; }
.digest-pill {
  display: inline-block; margin-top: 6px; padding: 2px 9px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border-soft); font-size: 12px; color: var(--mid);
}
.digest-more { margin-top: 6px; }

/* profile: a checkbox with a sentence, not a shouty form label */
label.switch-row {
  display: flex; gap: 10px; align-items: flex-start; cursor: pointer;
  text-transform: none; letter-spacing: normal; font-size: 14px; font-weight: 400;
  color: var(--ink); margin-bottom: 8px;
}
label.switch-row input { width: auto; margin-top: 3px; }
.switch-title { display: block; font-weight: 600; }
label.switch-row .sub { display: block; margin: 2px 0 0; color: var(--muted); font-size: 13px; }

/* profile: push devices (components/profile.js, PushSection) */
.push-devices { list-style: none; margin: 4px 0 10px; padding: 0; }
.push-devices li {
  display: flex; align-items: center; gap: 10px; padding: 6px 0;
  border-bottom: 1px solid var(--border-soft); font-size: 14px;
}
.push-devices li .sub { margin: 0; color: var(--muted); font-size: 12.5px; }
.push-devices li button { margin-left: auto; }

.digest-config { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.digest-error { color: var(--danger); font-size: 12px; }
label.inline-check {
  display: inline-flex; align-items: center; gap: 6px; margin: 0; cursor: pointer;
  font-size: 12.5px; font-weight: 600; letter-spacing: normal; text-transform: none; color: var(--mid);
}
label.inline-check input { width: auto; }

/* --- hilfe: the in-app handbook (components/help.js) ------------------------ */
.topbar button.help-btn {
  width: 30px; height: 30px; padding: 0; justify-content: center;
  border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 14px; font-weight: 600;
}
.topbar button.help-btn:hover { border-color: rgba(255, 255, 255, 0.5); }
.drawer.help-drawer { width: min(480px, 100vw); }
.help-search { margin-bottom: 18px; }
.help-drawer .label-line { margin: 18px 0 8px; }
.help-drawer .drawer-head .label-line { margin: 0 0 4px; }
button.help-topic {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  width: 100%; padding: 10px 12px; margin-bottom: 6px; text-align: left;
  white-space: normal; line-height: 1.35; border-color: var(--border-soft);
}
button.help-topic:hover { border-color: var(--mint); }
button.help-topic strong { font-size: 14px; }
button.help-topic .meta { font-weight: 400; }
.help-back { margin-bottom: 12px; }
.help-title { margin: 0 0 12px; font-size: 21px; font-weight: 600; letter-spacing: -0.5px; color: var(--ink); }
.help-body { font-size: 14px; line-height: 1.6; color: var(--mid); }
.help-body h3 {
  margin: 20px 0 6px; font-size: 14px; color: var(--ink);
}
.help-body p { margin: 0 0 10px; }
.help-body ul, .help-body ol { margin: 0 0 10px; padding-left: 20px; }
.help-body li { margin-bottom: 5px; }
.help-body strong { color: var(--ink); }
.help-body button.link { font-size: inherit; line-height: inherit; }
.help-body .prio-dot { display: inline-block; vertical-align: middle; margin-right: 4px; }
.ui-label {
  display: inline-block; padding: 0 6px; border-radius: 4px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--ink); font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.help-body kbd, .help-tip kbd {
  font: inherit; font-size: 12px; font-weight: 600; padding: 0 5px;
  border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px;
  background: var(--card); color: var(--ink);
}
.help-tip {
  margin: 14px 0; padding: 10px 14px; border-left: 3px solid var(--mint);
  background: var(--mint-lt); color: var(--ink); font-size: 13.5px; line-height: 1.5;
}
table.help-roles { width: 100%; border-collapse: collapse; margin: 6px 0 14px; font-size: 13px; }
.help-roles th, .help-roles td { padding: 7px 6px; border-bottom: 1px solid var(--border-soft); }
.help-roles th { font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.help-roles td + td, .help-roles th + th { text-align: center; width: 64px; color: var(--mint-text); font-weight: 600; }
.help-next { margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--border-soft); }
.help-next .meta { display: block; margin-bottom: 6px; }

/* --- chat: the board's own conversation (components/chat.js) ---------------- */

/* kanban/whiteboard and the chat panel side by side */
.board-body { flex: 1; display: flex; min-height: 0; min-width: 0; }
.board-body > .kanban, .board-body > .whiteboard-wrap { min-width: 0; }

/* ⚠️ display beats [hidden] — the panel is switched by a class, not the attribute */
.chat-panel {
  display: none; width: 340px; flex-shrink: 0; flex-direction: column; min-height: 0;
  position: relative; background: var(--card); border-left: 1px solid var(--border);
}
.chat-panel.is-open { display: flex; }
.chat-head { padding: 14px 16px 10px; border-bottom: 1px solid var(--border-soft); }
.chat-head-top { display: flex; align-items: center; gap: 8px; }
.chat-head .label-line { margin: 0; flex: 1; }
.chat-back { display: none; }
.chat-audience { display: block; margin-top: 8px; font-size: 12.5px; }
.chat-error { padding: 6px 16px; font-size: 13px; }

.chat-list { flex: 1; overflow-y: auto; padding: 6px 10px 12px; }
.chat-older { display: flex; justify-content: center; padding: 6px 0; }
.chat-empty { padding: 28px 12px; font-size: 13.5px; }
.chat-day { margin: 16px 0 6px; }

.chat-msg {
  position: relative; display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 9px;
  margin-top: 9px; padding: 3px 26px 3px 6px; border-radius: 6px;
  transition: background 1s var(--ease);
}
.chat-msg.grouped { margin-top: 0; }
.chat-msg:hover { background: var(--surface); }
.chat-msg.is-mention-me { background: var(--mint-lt); box-shadow: inset 3px 0 0 var(--mint); }
.chat-msg.is-flash, .chat-msg.is-mention-me.is-flash { background: var(--mint-md); }
.chat-avatar { width: 26px; height: 26px; font-size: 11px; margin-top: 1px; }
.chat-main { min-width: 0; }
.chat-msg-head { display: flex; align-items: baseline; gap: 8px; }
.chat-name { color: var(--ink); font-size: 13.5px; font-weight: 600; }
.chat-msg-head .meta { font-size: 11.5px; color: var(--muted); }
.chat-text {
  color: var(--ink); font-size: 14px; line-height: 1.45;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.chat-edited { display: inline-block; margin-top: 1px; font-size: 11px; color: var(--muted); }

/* @Vorname as a chip; the ones meant for you are filled */
.mention {
  display: inline-block; padding: 0 6px; border-radius: 999px; line-height: 1.5;
  background: var(--mint-lt); color: var(--mint-text); font-weight: 600; font-size: 13px;
}
.mention.is-me { background: var(--mint); color: var(--on-mint); }

/* "antwort auf": an indented quote, a click jumps to the original */
button.chat-quote {
  display: block; width: 100%; margin: 2px 0 4px; padding: 2px 8px; text-align: left;
  border: none; border-left: 3px solid var(--border); border-radius: 0; background: transparent;
  font-weight: 400; font-size: 12.5px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
button.chat-quote:hover:not(:disabled) { border-left-color: var(--mint); color: var(--ink); }
button.chat-quote:disabled { opacity: 1; cursor: default; }
.chat-quote-label { font-size: 10px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; }

button.chat-more {
  position: absolute; top: 2px; right: 2px; padding: 2px 8px; font-size: 16px; line-height: 1;
  opacity: 0;
}
.chat-msg:hover .chat-more, .chat-msg.menu-open .chat-more, .chat-more:focus-visible { opacity: 1; }
@media (hover: none) { button.chat-more { opacity: 1; } }
.chat-menu {
  position: absolute; top: 26px; right: 4px; z-index: 8; min-width: 130px; padding: 4px;
  display: flex; flex-direction: column; gap: 2px;
  background: var(--card); border: 1px solid var(--border); border-radius: 6px; box-shadow: var(--shadow-1);
}
.chat-menu button { justify-content: flex-start; padding: 7px 10px; }

button.link.chat-card {
  display: block; max-width: 100%; margin-top: 3px; padding: 0; font-size: 12.5px; text-align: left;
  white-space: normal; overflow-wrap: anywhere;
}
.chat-card.is-gone { display: block; margin-top: 3px; font-size: 12.5px; color: var(--muted); }

button.chat-newbelow {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 96px; z-index: 5;
  padding: 7px 14px; border-radius: 999px; font-size: 12.5px; box-shadow: var(--shadow-1);
}

.chat-replying {
  display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-top: 1px solid var(--border-soft);
  background: var(--surface); font-size: 12.5px; color: var(--mid);
}
.chat-replying-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-archived { padding: 8px 14px 0; border-top: 1px solid var(--border-soft); }

.chat-composer { position: relative; padding: 10px 12px 12px; border-top: 1px solid var(--border); }
.chat-composer.is-edit { padding: 4px 0 2px; border-top: none; }
.chat-composer-row { display: flex; gap: 8px; align-items: flex-end; }
.chat-composer textarea { flex: 1; min-height: 40px; max-height: 160px; resize: none; line-height: 1.4; padding: 9px 11px; }
.chat-composer-row button { padding: 10px 13px; }
.chat-hint { margin-top: 6px; font-size: 11px; }
.chat-composer .chat-error { padding: 4px 0 0; }
.chat-picker {
  position: absolute; left: 10px; right: 10px; bottom: calc(100% - 6px); z-index: 9;
  max-height: 260px; overflow-y: auto; padding: 4px 0;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-modal);
}
.chat-picker-hint { padding: 10px 12px; font-size: 13px; color: var(--muted); line-height: 1.45; }
.chat-picker-hint button.link { font-size: 13px; }

/* the header gained a button: let it wrap instead of pushing the last ones out of sight */
.subbar { flex-wrap: wrap; row-gap: 8px; }

/* the toggle in the board header, and the flag on a board tile */
.chat-btn.is-open { border-color: var(--mint); color: var(--mint-text); }
.chat-badge {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--mint); color: var(--on-mint);
  font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.chat-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 3px var(--mint-lt); }
.chat-flag { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 8px auto; font-size: 11.5px; font-weight: 600; color: var(--mint-text); }
.news-chip + .chat-flag { margin-left: 0; }

/* a phone: the chat is a full-screen view, opened from the board header */
@media (max-width: 760px) {
  .chat-panel.is-open { position: fixed; inset: 0; z-index: 70; width: auto; border-left: none; }
  .chat-close { display: none; }
  .chat-back { display: inline-flex; }
  .chat-head { padding-top: 10px; }
  .chat-composer textarea { font-size: 16px; } /* iOS zooms into anything smaller */
  button.chat-newbelow { bottom: 110px; }
}

/* --- card status row (components/card-modal.js) — all screen sizes ---------- */
/* the card's column as one tap: how a card moves where there is no
   drag-and-drop (a phone) or none is wanted (keyboard) */
.status-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.status-chips button {
  border-radius: 999px; padding: 7px 13px; font-size: 13.5px; font-weight: 600;
  background: var(--surface); border-color: var(--border); color: var(--mid);
}
.status-chips button.is-on { background: var(--mint); border-color: var(--mint); color: var(--on-mint); }

/* --- bottom sheet (components/mobile.js) ----------------------------------- */
.overlay.sheet-overlay { display: flex; align-items: flex-end; padding: 0; }
.sheet {
  width: 100%; max-height: 85dvh; overflow: auto; background: var(--card);
  border-radius: 16px 16px 0 0; box-shadow: var(--shadow-modal);
  padding: 8px 16px calc(14px + env(safe-area-inset-bottom));
  animation: sheetIn 0.26s var(--ease);
}
@keyframes sheetIn { from { transform: translateY(40px); opacity: 0 } to { transform: none; opacity: 1 } }
.sheet-grip { width: 38px; height: 4px; border-radius: 2px; background: var(--border); margin: 2px auto 12px; }
.sheet-title {
  font-size: 15px; font-weight: 600; color: var(--ink); margin: 0 4px 10px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sheet-list { display: flex; flex-direction: column; }
.sheet-list > button {
  justify-content: flex-start; width: 100%; min-height: 50px; padding: 0 6px;
  border: none; border-bottom: 1px solid var(--border-soft); border-radius: 0;
  background: transparent; font-size: 16px; font-weight: 500; color: var(--ink);
}
.sheet-note { margin: 14px 6px 4px; font-size: 13px; color: var(--muted); line-height: 1.45; }
button.sheet-done { width: 100%; justify-content: center; margin-top: 12px; min-height: 48px; font-size: 15px; }

/* --- phone (≤ 760px): D.useNarrow() renders the phone layout --------------- */
@media (max-width: 760px) {
  #root { height: 100dvh; }
  /* iOS zooms into any field under 16px — and never zooms back out */
  input, textarea, select { font-size: 16px; }

  /* top bar: only the name; everything else lives in profil / the bottom bar */
  .topbar { padding: 12px 18px; padding-top: max(12px, env(safe-area-inset-top)); }
  .topbar > :not(.brand) { display: none; }

  /* room for the bottom bar under every page */
  .content { padding: 22px 16px calc(92px + env(safe-area-inset-bottom)); }
  .page-head { flex-direction: column; align-items: flex-start; gap: 16px; margin-bottom: 22px; }
  .page-head h1 { font-size: 30px; letter-spacing: -1.1px; }
  .board-grid { grid-template-columns: 1fr; gap: 12px; }

  /* bottom bar */
  .bottom-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    display: grid; grid-template-columns: repeat(3, 1fr);
    background: var(--card); border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .bottom-nav button {
    position: relative; flex-direction: column; justify-content: center; gap: 4px;
    height: 58px; border: none; border-radius: 0; background: transparent;
    color: var(--muted); font-size: 11.5px; font-weight: 600; letter-spacing: 0.2px;
  }
  .bottom-nav button.is-active { color: var(--mint-text); }
  .bottom-nav svg {
    width: 23px; height: 23px; fill: none; stroke: currentColor;
    stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  }
  .bottom-nav .nav-count {
    position: absolute; top: 6px; left: calc(50% + 6px);
    min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
    background: var(--mint); color: var(--on-mint); font-size: 11px; line-height: 18px;
    font-variant-numeric: tabular-nums; text-align: center;
  }

  /* board: header, column tabs, one column */
  .m-head {
    display: flex; align-items: center; gap: 2px;
    padding: 6px 6px; padding-top: max(6px, env(safe-area-inset-top));
    background: var(--card);
  }
  button.m-icon {
    width: 44px; height: 44px; padding: 0; justify-content: center; flex-shrink: 0;
    border: none; background: transparent; color: var(--ink);
  }
  .m-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .m-icon svg circle { fill: currentColor; stroke: none; }
  .m-title { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
  .m-title strong {
    font-size: 18px; font-weight: 600; letter-spacing: -0.4px; color: var(--ink);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .m-meta { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 10px; background: var(--card); }
  .m-tabs {
    display: flex; gap: 6px; overflow-x: auto; padding: 0 16px 12px;
    background: var(--card); border-bottom: 1px solid var(--border);
    scrollbar-width: none; scroll-padding: 0 16px;
  }
  .m-tabs::-webkit-scrollbar { display: none; }
  .m-tabs button {
    flex-shrink: 0; border-radius: 999px; padding: 8px 14px; font-size: 14px;
    background: var(--surface); border-color: transparent; color: var(--mid);
  }
  .m-tabs button.is-on { background: var(--ink); color: var(--bg); }
  .m-tabs .m-count { font-variant-numeric: tabular-nums; opacity: 0.6; margin-left: 2px; }
  .m-tabs .done-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.6; }

  .board-body { flex-direction: column; }
  .m-col {
    flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
    display: flex; flex-direction: column; gap: 10px;
    padding: 14px 16px calc(150px + env(safe-area-inset-bottom));
    touch-action: pan-y;
  }
  .m-col .kcard { cursor: pointer; padding: 14px 15px; }
  .m-col .kcard:hover { transform: none; }
  .m-col .kcard .title { font-size: 15.5px; }
  .m-empty { padding: 28px 8px 8px; text-align: center; color: var(--muted); font-size: 14px; }
  button.m-add {
    width: 100%; min-height: 50px; justify-content: center; margin-top: 4px;
    border: 1.5px dashed var(--border); background: transparent; color: var(--mid); font-size: 15px;
  }
  button.m-chat-fab {
    position: fixed; right: 16px; bottom: calc(74px + env(safe-area-inset-bottom)); z-index: 50;
    width: 56px; height: 56px; padding: 0; justify-content: center; border-radius: 50%;
    border: none; background: var(--ink); color: var(--bg); box-shadow: var(--shadow-hover);
  }
  .m-chat-fab svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
  .m-chat-fab b {
    position: absolute; top: -4px; right: -4px; min-width: 24px; height: 24px; padding: 0 6px;
    border-radius: 12px; background: var(--mint); color: var(--on-mint); font-size: 12px; line-height: 24px;
  }
  .m-chat-fab i {
    position: absolute; top: 4px; right: 4px; width: 12px; height: 12px; border-radius: 50%;
    background: var(--mint); box-shadow: 0 0 0 2px var(--ink);
  }

  /* dialogs become sheets from the bottom, with the actions pinned */
  .overlay { padding: 0; align-items: end; }
  .modal {
    max-width: none; max-height: 92dvh; border-radius: 16px 16px 0 0;
    padding: 20px 16px 0; animation: sheetIn 0.26s var(--ease);
  }
  .modal .tabs { width: auto; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .modal .tabs::-webkit-scrollbar { display: none; }
  .modal .tabs button { flex-shrink: 0; }
  .modal .row {
    position: sticky; bottom: 0; z-index: 2; background: var(--card);
    margin: 18px -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  }
  .modal textarea { min-height: 96px; }

  /* chat: a phone has no shift+enter */
  .chat-hint { display: none; }

  /* profil: what the top bar held */
  .account-list { display: flex; flex-direction: column; gap: 8px; }
  .account-list button { justify-content: flex-start; min-height: 46px; font-size: 15px; }

}

/* für mich (components/mobile.js) — reachable on any screen via #/mine */
.mine .content-inner { max-width: 640px; }
.mine-head { margin: 0 0 6px; font-size: 34px; font-weight: 600; letter-spacing: -1.4px; line-height: 1.05; }
.mine-empty { color: var(--muted); font-size: 15px; line-height: 1.5; }
.mine-group { margin-top: 22px; }
.mine-label {
  display: flex; align-items: center; gap: 8px; margin: 0 0 10px;
  font-size: 11px; font-weight: 600; letter-spacing: 2.5px; text-transform: uppercase; color: var(--muted);
}
.mine-ueber .mine-label { color: var(--danger); }
.mine-n { font-variant-numeric: tabular-nums; letter-spacing: 0; }
button.mine-row {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center;
  width: 100%; margin-bottom: 8px; padding: 13px 14px; text-align: left; white-space: normal;
  border-radius: 8px; border-color: var(--border); background: var(--card); line-height: 1.3;
}
.mine-ueber button.mine-row { border-left: 3px solid var(--danger); }
.mine-title { grid-column: 1; font-size: 15.5px; font-weight: 600; color: var(--ink); }
.mine-sub { grid-column: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; font-weight: 400; color: var(--muted); }
.mine-col { padding: 1px 8px; border-radius: 999px; background: var(--surface); color: var(--mid); font-size: 12px; }
button.mine-row > .due-chip, .mine-at { grid-column: 2; grid-row: 1 / span 2; }
button.mine-mention { border-left: 3px solid var(--mint); }
.mine-at {
  min-width: 34px; height: 26px; padding: 0 8px; border-radius: 13px; text-align: center;
  background: var(--mint); color: var(--on-mint); font-size: 13px; line-height: 26px; font-variant-numeric: tabular-nums;
}
@media (max-width: 760px) {
  .mine-head { font-size: 30px; letter-spacing: -1.2px; }
}
