/* Layout: one column of project cards, project pages with tabs (top bar on desktop, bottom bar on phone),
   and a dot-grid "wall" where post-its are stuck and dragged. */
:root {
  --bg: #eef0f3;
  --surface: #ffffff;
  --surface-2: #f5f6f8;
  --ink: #1b2130;
  --muted: #5d6577;
  --line: #dcdfe6;
  --accent: #0d7c72;
  --accent-ink: #ffffff;
  --accent-soft: #d6efec;
  --danger: #c92a2a;
  --danger-soft: #fde8e8;
  --board: #e4e8ee;
  --board-dot: #c4cad4;
  --shadow: 0 1px 2px rgb(20 28 40 / .06), 0 4px 14px rgb(20 28 40 / .06);
  --shadow-lift: 0 10px 30px rgb(20 28 40 / .18);

  /* project status (semantic, not the accent) */
  --st-idea: #7048c8;
  --st-active: #2b8a3e;
  --st-paused: #b76e00;
  --st-done: #3b6fd8;
  --on-active: #ffffff; /* tick drawn on the green "done" circle */
  /* item types & roadmap horizons */
  /* colour of each task type (overridden per project on <body>) */
  --c-task: #868e96;
  --c-bug: #e03131;
  --c-idea: #f59f00;
  --c-improvement: #7048c8;
  --h-now: #2b8a3e;
  --h-next: #3b6fd8;
  --h-later: #868e96;
  --h-done: #5c6370;

  /* post-its stay paper-coloured in both themes */
  --pi-ink: #2b2717;
  --pi-yellow: #fff1a6;
  --pi-pink: #ffc9de;
  --pi-blue: #bfe3ff;
  --pi-green: #c8f0c0;
  --pi-orange: #ffd3a8;
  --pi-purple: #dccbff;

  --f-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --f-body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-hand: "Kalam", "Comic Sans MS", "Chalkboard SE", cursive;

  --r: 12px;
  --tabbar-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --on-active: #0b2412;
    --h-now: #51cf66; --h-next: #74a7ff; --h-later: #a6adb8; --h-done: #8b94a3;
    --bg: #12161d; --surface: #1b212b; --surface-2: #222935; --ink: #e8ecf2; --muted: #9aa3b2;
    --line: #2e3644; --accent: #3cc2b4; --accent-ink: #062b27; --accent-soft: #143b38;
    --danger: #ff6b6b; --danger-soft: #3a1d20; --board: #171c24; --board-dot: #2c3441;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 4px 14px rgb(0 0 0 / .25); --shadow-lift: 0 12px 30px rgb(0 0 0 / .5);
    --st-idea: #a98bff; --st-active: #51cf66; --st-paused: #fcc419; --st-done: #74a7ff;
    --pi-yellow: #f3e08a; --pi-pink: #f2b3cb; --pi-blue: #a9d2f2; --pi-green: #b5e3ac; --pi-orange: #f2c08f; --pi-purple: #c9b6f5;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --on-active: #0b2412;
    --h-now: #51cf66; --h-next: #74a7ff; --h-later: #a6adb8; --h-done: #8b94a3;
  --bg: #12161d; --surface: #1b212b; --surface-2: #222935; --ink: #e8ecf2; --muted: #9aa3b2;
  --line: #2e3644; --accent: #3cc2b4; --accent-ink: #062b27; --accent-soft: #143b38;
  --danger: #ff6b6b; --danger-soft: #3a1d20; --board: #171c24; --board-dot: #2c3441;
  --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 4px 14px rgb(0 0 0 / .25); --shadow-lift: 0 12px 30px rgb(0 0 0 / .5);
  --st-idea: #a98bff; --st-active: #51cf66; --st-paused: #fcc419; --st-done: #74a7ff;
  --pi-yellow: #f3e08a; --pi-pink: #f2b3cb; --pi-blue: #a9d2f2; --pi-green: #b5e3ac; --pi-orange: #f2c08f; --pi-purple: #c9b6f5;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; overflow-x: clip; overscroll-behavior-y: contain; touch-action: manipulation; }
body {
  margin: 0; min-height: 100dvh;
  background: var(--bg); color: var(--ink);
  font: 400 15px/1.5 var(--f-body);
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3 { font-family: var(--f-display); line-height: 1.15; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
h1 { font-size: 1.75rem; font-weight: 800; }
h2 { font-size: 1.25rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.label { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- buttons & fields ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  min-height: 42px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-weight: 600; cursor: pointer;
  text-decoration: none; white-space: nowrap; transition: background .15s, transform .1s;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.danger { color: var(--danger); border-color: var(--danger); background: transparent; }
.btn.danger.solid { background: var(--danger); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.icon { width: 42px; padding: 0; font-size: 1.15rem; }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: .88rem; }
.btn[disabled] { opacity: .5; pointer-events: none; }

.field { display: grid; gap: 6px; }
.field > span { font-size: .85rem; font-weight: 600; color: var(--muted); }
.input, select.input, textarea.input {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface-2); font-size: 16px; /* 16px stops iOS zoom */
}
textarea.input { min-height: 96px; resize: vertical; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.stack { display: grid; gap: 14px; }
.grow { flex: 1; min-width: 0; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  padding-top: env(safe-area-inset-top, 0px);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1200px; margin: 0 auto; min-height: 60px;
  display: flex; align-items: center; gap: 10px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--f-display); font-weight: 800; font-size: 1.15rem; color: var(--ink); text-decoration: none; }
.brand img { width: 30px; height: 30px; }
.topbar .title { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.topbar .title h1 { font-size: 1.15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.emoji-badge {
  flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  font-size: 1.25rem; background: color-mix(in srgb, var(--pc, var(--accent)) 18%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--pc, var(--accent)) 35%, transparent);
}
.emoji-badge.lg { width: 56px; height: 56px; font-size: 1.8rem; border-radius: 14px; }

.page {
  max-width: 1200px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 20px 40px;
}

/* ---------- avatars & pills ---------- */
.avatar {
  --h: 200; flex: none; width: 28px; height: 28px; border-radius: 50%;
  display: inline-grid; place-items: center; font-size: .72rem; font-weight: 700;
  background: hsl(var(--h) 55% 85%); color: hsl(var(--h) 60% 22%);
  border: 2px solid var(--surface);
}
.avatar.lg { width: 40px; height: 40px; font-size: .9rem; }
.avatars { display: flex; }
.avatars .avatar + .avatar { margin-left: -8px; }
.pill {
  --c: var(--muted);
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px;
  font-size: .78rem; font-weight: 700; white-space: nowrap;
  color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent);
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.idea { --c: var(--st-idea); }
.pill.active { --c: var(--st-active); }
.pill.paused { --c: var(--st-paused); }
.pill.done { --c: var(--st-done); }
.role { font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.role.admin { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: var(--accent-soft); }

.progress { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--line); }
.progress > i { display: block; height: 100%; border-radius: inherit; background: var(--pc, var(--accent)); transition: width .4s ease; }

/* ---------- projects list ---------- */
.list-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; justify-content: space-between; margin-bottom: 16px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; min-height: 36px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line);
  background: var(--surface); font-weight: 600; font-size: .88rem; cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip .num { opacity: .65; margin-left: 4px; }

.projects { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.pcard {
  display: grid; gap: 14px; padding: 16px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  color: inherit; text-decoration: none; transition: transform .15s, box-shadow .15s;
}
.pcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.pcard-head { display: flex; gap: 12px; align-items: flex-start; }
.pcard-head .grow h2 { font-size: 1.1rem; overflow-wrap: anywhere; }
.pcard .desc { color: var(--muted); font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-progress { display: grid; gap: 6px; }
.pcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .85rem; color: var(--muted); }
.pcard-foot .stats { display: flex; gap: 12px; }

.empty {
  display: grid; place-items: center; gap: 12px; text-align: center; padding: 48px 16px;
  border: 2px dashed var(--line); border-radius: var(--r); color: var(--muted);
}
.empty .big { color: var(--muted); display: flex; justify-content: center; margin-bottom: 4px; }

.fab {
  position: fixed; z-index: 15;
  right: calc(18px + env(safe-area-inset-right, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  height: 56px; padding: 0 20px; border-radius: 16px; border: 0;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 1rem;
  box-shadow: var(--shadow-lift); cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
}
.with-tabbar .fab { bottom: calc(var(--tabbar-h) + 14px + env(safe-area-inset-bottom, 0px)); }

/* ---------- project tabs ---------- */
.tabs { display: flex; gap: 4px; max-width: 1200px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.tab {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px; border: 0; background: none;
  font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; cursor: pointer; text-decoration: none;
}
.tab[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.tab .ico { font-size: 1.05rem; }
.tab .count { font-size: .75rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 99px; padding: 0 7px; }

@media (max-width: 719px) {
  .tabs {
    position: fixed; z-index: 25; left: 0; right: 0; bottom: 0; margin: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--surface); border-top: 1px solid var(--line); gap: 0;
  }
  .tab { flex: 1; flex-direction: column; gap: 2px; height: var(--tabbar-h); justify-content: center; padding: 6px 2px; font-size: .72rem; border-bottom: 0; border-top: 2px solid transparent; position: relative; }
  .tab[aria-current="page"] { border-top-color: var(--accent); color: var(--accent); }
  .tab .ico { font-size: 1.3rem; }
  .tab .count { position: absolute; top: 4px; left: calc(50% + 8px); font-size: .65rem; }
  .with-tabbar .page { padding-bottom: calc(var(--tabbar-h) + 90px + env(safe-area-inset-bottom, 0px)); }
  .hide-sm { display: none !important; }
}
@media (min-width: 720px) { .hide-lg { display: none !important; } }

/* ---------- overview ---------- */
.overview { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .overview { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: grid; gap: 14px; align-content: start; min-width: 0; }
.hero { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.ring { --p: 0; --pc: var(--accent); flex: none; width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--pc) calc(var(--p) * 1%), var(--surface-2) 0); }
.ring > div { width: 88px; height: 88px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; text-align: center; }
.ring strong { font-family: var(--f-display); font-size: 1.6rem; font-weight: 800; line-height: 1; }
.ring small { display: block; font-size: .7rem; color: var(--muted); margin-top: 2px; }
.kv { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 520px) { .kv { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kv > div.warn strong { color: color-mix(in srgb, var(--c-bug) 78%, var(--ink)); }
.kv > div { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.kv strong { display: block; font-family: var(--f-display); font-size: 1.35rem; }
.description { white-space: pre-wrap; overflow-wrap: anywhere; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .9rem; color: var(--muted); }
.meta a { overflow-wrap: anywhere; }
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.feed li { display: flex; gap: 10px; font-size: .9rem; align-items: flex-start; }
.feed li .grow { overflow-wrap: anywhere; }
.feed time { color: var(--muted); font-size: .78rem; display: block; }
.top-ideas { display: grid; gap: 8px; }
.mini-note { padding: 10px 12px; border-radius: 4px; background: var(--note); color: var(--pi-ink); font-family: var(--f-hand); font-size: 1.02rem; line-height: 1.3; display: flex; gap: 10px; justify-content: space-between; cursor: pointer; border: 0; text-align: left; width: 100%; }
.mini-note span:first-child { overflow-wrap: anywhere; }
.mini-note span:last-child { flex: none; white-space: nowrap; font-family: var(--f-body); font-size: .85rem; font-weight: 700; }

/* ---------- tasks ---------- */
.quick-add { display: flex; gap: 8px; margin-bottom: 16px; }
.quick-add .input { flex: 1; min-width: 0; }
.columns { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
.col { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; display: grid; gap: 8px; min-height: 120px; align-content: start; }
.col.drop { outline: 2px dashed var(--accent); outline-offset: -4px; }
.col-head { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 6px; }
.col-head h3 { display: flex; align-items: center; gap: 8px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.col-empty { color: var(--muted); font-size: .85rem; text-align: center; padding: 18px 8px; }
.task {
  display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 8px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line); cursor: pointer; min-height: 52px;
}
.task[draggable="true"] { cursor: grab; }
.task.dragging { opacity: .4; }
.task .t-title { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.task.is-done .t-title { text-decoration: line-through; color: var(--muted); }
.check {
  flex: none; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface);
  display: grid; place-items: center; cursor: pointer; padding: 0; font-size: .9rem; color: transparent;
}
.check.doing { border-color: var(--st-paused); color: var(--st-paused); }
.check.done { border-color: var(--st-active); background: var(--st-active); color: #fff; }
.seg { display: flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 3px; margin-bottom: 12px; }
.seg button { flex: 1; min-height: 38px; border: 0; background: none; border-radius: 9px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
@media (max-width: 719px) {
  .columns { grid-template-columns: minmax(0, 1fr); }
  .columns .col:not(.shown) { display: none; }
  .col { background: none; border: 0; padding: 0; }
  .col-head { display: none; }
}

/* ---------- post-it wall ---------- */
.board-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.board-wrap {
  position: relative; overflow: hidden; border-radius: var(--r); border: 1px solid var(--line);
  height: min(72dvh, 900px); background-color: var(--bg); overscroll-behavior: contain;
}
.board-wrap.wall { touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; outline-offset: -2px; }
.board-wrap.wall:active { cursor: grabbing; }
@media (max-width: 719px) { .board-wrap { height: calc(100dvh - 230px - var(--tabbar-h) - env(safe-area-inset-bottom, 0px) - env(safe-area-inset-top, 0px)); min-height: 320px; } }
.board {
  position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform;
  background-color: var(--board); border-radius: 18px; box-shadow: 0 0 0 2px var(--line);
  background-image: radial-gradient(var(--board-dot) 1.4px, transparent 1.6px); background-size: 24px 24px;
}
.board.animating { transition: transform .3s ease; }

/* floating controls on the wall */
.wall-bar {
  position: absolute; z-index: 5; left: 50%; translate: -50% 0; bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  display: flex; gap: 2px; padding: 5px; max-width: calc(100% - 24px); overflow-x: auto; scrollbar-width: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lift);
  cursor: default; touch-action: pan-x;
}
.wall-bar::-webkit-scrollbar { display: none; }
.wb { flex: none; min-width: 42px; height: 42px; padding: 0 10px; border: 0; border-radius: 12px; background: none; color: var(--ink); font-weight: 700; font-size: 1.15rem; cursor: pointer; }
.wb:hover { background: var(--surface-2); }
.wb:active { background: var(--accent-soft); }
.wb.txt { font-size: .88rem; white-space: nowrap; }
.wb.zoom-val { min-width: 64px; font-size: .82rem; font-variant-numeric: tabular-nums; color: var(--muted); }
.minimap {
  position: absolute; z-index: 4; right: 12px; bottom: calc(70px + env(safe-area-inset-bottom, 0px)); width: 132px; aspect-ratio: 5 / 4; /* same shape as the wall: no empty edges */
  background: var(--board); border: 0; box-shadow: 0 0 0 1px var(--line), var(--shadow-lift); border-radius: 8px; overflow: hidden;
  touch-action: none; cursor: crosshair;
}
.mm-world { position: absolute; }
.mm-note { position: absolute; border-radius: 1px; background: var(--muted); }
.mm-note.c-yellow { background: var(--pi-yellow); } .mm-note.c-pink { background: var(--pi-pink); } .mm-note.c-blue { background: var(--pi-blue); }
.mm-note.c-green { background: var(--pi-green); } .mm-note.c-orange { background: var(--pi-orange); } .mm-note.c-purple { background: var(--pi-purple); }
.mm-view { position: absolute; box-sizing: border-box; border: 2px solid var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); border-radius: 3px; }
.wall-top { display: none; }
.board-wrap.fs {
  position: fixed; inset: 0; z-index: 70; height: auto; min-height: 0; border: 0; border-radius: 0; background-color: var(--bg);
}
.board-wrap.fs .wall-top {
  display: flex; align-items: center; gap: 8px; position: absolute; z-index: 5; left: 0; right: 0; top: 0; cursor: default;
  padding: calc(8px + env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) 8px max(12px, env(safe-area-inset-left, 0px));
  background: linear-gradient(var(--bg) 55%, transparent); touch-action: none; pointer-events: none;
}
.board-wrap.fs .wall-top > * { pointer-events: auto; }
.wall-title { flex: 1; text-align: center; font-weight: 700; color: var(--muted); }
html.wall-open, html.wall-open body { overflow: hidden; }
@media (max-width: 420px) { .wb.zoom-val { display: none; } .minimap { width: 104px; } }
.note {
  --rot: 0deg;
  position: absolute; width: 190px; min-height: 170px; padding: 14px 14px 40px;
  background: var(--note); color: var(--pi-ink); border-radius: 2px 2px 14px 2px;
  box-shadow: 0 1px 1px rgb(0 0 0 / .08), 0 6px 14px -4px rgb(0 0 0 / .25);
  transform: rotate(var(--rot)); font-family: var(--f-hand); font-size: 1.12rem; line-height: 1.3;
  touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab;
  transition: box-shadow .15s, transform .15s;
}
.note::before { /* strip of tape */
  content: ""; position: absolute; top: -9px; left: 50%; width: 64px; height: 20px; translate: -50% 0;
  background: rgb(255 255 255 / .45); border: 1px solid rgb(0 0 0 / .05); rotate: calc(var(--rot) * -2);
}
.note.dragging { cursor: grabbing; transform: rotate(0deg) scale(1.04); box-shadow: var(--shadow-lift); z-index: 1000000 !important; transition: none; }
.note .n-text { white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; }
.note .n-text:empty::before { content: "Post-it vide…"; opacity: .45; }
.note .n-foot { position: absolute; left: 10px; right: 8px; bottom: 6px; display: flex; align-items: center; justify-content: space-between; font-family: var(--f-body); font-size: .72rem; opacity: .8; gap: 6px; }
.note .n-foot .who { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.vote {
  flex: none; display: inline-flex; align-items: center; gap: 4px; min-height: 28px; padding: 0 8px; border-radius: 99px;
  border: 1px solid rgb(0 0 0 / .14); background: rgb(255 255 255 / .35); color: var(--pi-ink); font-weight: 700; font-size: .8rem; cursor: pointer;
}
.vote.on { background: var(--pi-ink); color: var(--note); border-color: var(--pi-ink); }
.c-yellow { --note: var(--pi-yellow); } .c-pink { --note: var(--pi-pink); } .c-blue { --note: var(--pi-blue); }
.c-green { --note: var(--pi-green); } .c-orange { --note: var(--pi-orange); } .c-purple { --note: var(--pi-purple); }

.note-grid { display: grid; gap: 22px 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); padding: 14px 4px; }
.note-grid .note { position: relative; width: auto; min-height: 150px; cursor: pointer; touch-action: auto; }
@media (max-width: 400px) { .note-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .note-grid .note { font-size: 1rem; padding: 12px 10px 38px; } }

.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 40px; height: 40px; border-radius: 10px; border: 2px solid rgb(0 0 0 / .12); background: var(--note); cursor: pointer; }
.swatch[aria-pressed="true"] { outline: 3px solid var(--ink); outline-offset: 2px; }
.color-input { width: 52px; height: 44px; padding: 2px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); }

/* ---------- members ---------- */
.members { display: grid; gap: 8px; }
.member { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); flex-wrap: wrap; }
.member .grow { display: grid; min-width: 120px; }
.member .grow strong { overflow-wrap: anywhere; }
.member select { min-height: 36px; padding: 4px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); }
.suggest { display: grid; gap: 4px; }
.suggest button { display: flex; gap: 10px; align-items: center; text-align: left; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; }

/* ---------- auth ---------- */
.auth { min-height: 100dvh; display: grid; place-items: center; padding-block: 24px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.auth-card { width: min(100%, 420px); display: grid; gap: 22px; }
.auth-card .panel { padding: 22px; }
.auth-hero { display: grid; gap: 14px; justify-items: start; }
.auth-hero .sample { display: flex; gap: 10px; }
.auth-hero .note { position: relative; width: 120px; min-height: 96px; padding: 10px 10px 12px; font-size: .98rem; cursor: default; }
.error { color: var(--danger); background: var(--danger-soft); padding: 10px 12px; border-radius: 10px; font-size: .9rem; }
.link-btn { border: 0; background: none; color: var(--accent); font-weight: 600; cursor: pointer; padding: 4px; }

/* ---------- sheet (dialog) ---------- */
dialog#sheet {
  border: 0; padding: 0; margin: auto; width: min(100% - 32px, 520px); max-height: min(90dvh, 820px);
  border-radius: 18px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lift);
}
dialog#sheet::backdrop { background: rgb(10 14 20 / .45); }
.sheet-body { padding: 20px; display: grid; gap: 16px; overflow: auto; max-height: inherit; padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sheet-note { padding: 16px; border-radius: 4px; background: var(--note); }
.sheet-note textarea { width: 100%; min-height: 160px; border: 0; background: transparent; color: var(--pi-ink); font-family: var(--f-hand); font-size: 1.25rem; line-height: 1.35; resize: vertical; outline: none; }
.sheet-note textarea::placeholder { color: rgb(43 39 23 / .5); }
@media (max-width: 719px) {
  dialog#sheet { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 20px 20px 0 0; max-height: 92dvh; }
  dialog#sheet[open] { animation: sheet-up .22s ease-out; }
  .sheet-body::before { content: ""; justify-self: center; width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: -8px 0 -4px; }
}
@keyframes sheet-up { from { transform: translateY(40px); opacity: .4; } }

/* ---------- toasts ---------- */
#toasts { position: fixed; z-index: 100; left: 50%; translate: -50% 0; top: calc(12px + env(safe-area-inset-top, 0px)); display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow-lift); font-weight: 600; animation: toast-in .2s ease-out; }
.toast.err { background: var(--danger); color: #fff; }
@keyframes toast-in { from { transform: translateY(-10px); opacity: 0; } }

.loading { display: grid; place-items: center; min-height: 60dvh; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.info { color: var(--accent); background: var(--accent-soft); padding: 10px 12px; border-radius: 10px; font-size: .9rem; }
code { font-size: .9em; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; border: 1px solid var(--line); }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.code-input { font-size: 1.4rem; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.key-badge { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.key-badge svg { width: 26px; height: 26px; }
.passkeys { display: grid; gap: 8px; }
.passkey { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); color: var(--muted); }
.passkey .grow { display: grid; color: var(--ink); min-width: 0; }
.passkey .grow strong { overflow-wrap: anywhere; }
.btn svg { flex: none; }

/* ---------- tasks v2 ---------- */
.task-tools { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 12px; }
.task-tools .views { margin: 0; flex: 1; max-width: 460px; }
.task-tools + .chips { margin-bottom: 14px; }
.task .t-main { flex: 1; min-width: 0; display: grid; gap: 4px; }
.t-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .75rem; color: var(--muted); }
.type-tag { --tc: var(--c-task); display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 700; padding: 1px 8px 1px 6px; border-radius: 99px; color: color-mix(in srgb, var(--tc) 55%, var(--ink)); background: color-mix(in srgb, var(--tc) 18%, transparent); white-space: nowrap; }
.type-tag i { font-style: normal; display: inline-flex; }
.type-tag.ty-task { --tc: var(--c-task); } .type-tag.ty-bug { --tc: var(--c-bug); } .type-tag.ty-idea { --tc: var(--c-idea); } .type-tag.ty-improvement { --tc: var(--c-improvement); }
.prio { font-size: .72rem; font-weight: 700; }
.prio.high { color: var(--danger); }
.prio.high::before { content: "▲ "; }
.prio.low { color: var(--muted); font-weight: 600; }
.prio.low::before { content: "▼ "; }
.has-desc { color: var(--muted); }
.t-epic { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.t-epic::before { content: "◆ "; color: var(--accent); }

.epic-card { display: grid; gap: 10px; padding: 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); cursor: pointer; box-shadow: var(--shadow); }
.epic-card[draggable="true"] { cursor: grab; }
.epic-card.dragging { opacity: .4; }
.epic-card h3 { font-size: 1rem; overflow-wrap: anywhere; }
.epic-card .desc { color: var(--muted); font-size: .88rem; white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.epic-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.done-epics { margin-top: 16px; }
.done-epics summary { cursor: pointer; font-weight: 600; color: var(--muted); }

.group { display: grid; gap: 8px; margin-bottom: 22px; }
.group-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.group-head .group-title { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border: 0; background: none; padding: 4px 0; text-align: left; cursor: pointer; color: var(--ink); }
h3.group-title { cursor: default; color: var(--muted); }
.group-title h3 { overflow-wrap: anywhere; }
.hz { font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.hz.now { --c: var(--h-now); } .hz.next { --c: var(--h-next); } .hz.later { --c: var(--h-later); } .hz.done { --c: var(--h-done); }
.items { display: grid; gap: 8px; }
.group .col-empty { text-align: left; padding: 6px 2px; }

.chooser { display: grid; gap: 10px; }
.choice { display: grid; gap: 2px; text-align: left; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; }
.choice strong { font-size: 1rem; display: flex; align-items: center; gap: 8px; }
.choice strong::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--c, var(--accent)); }
.choice span { color: var(--muted); font-size: .88rem; }
.choice.ch-epic { --c: var(--accent); } .choice.ch-task { --c: var(--c-task); } .choice.ch-bug { --c: var(--c-bug); } .choice.ch-idea { --c: var(--c-idea); } .choice.ch-improvement { --c: var(--c-improvement); }
.choice:hover { background: var(--surface); }

.now-epic { display: grid; gap: 8px; width: 100%; text-align: left; border: 0; background: none; padding: 0; cursor: pointer; color: var(--ink); }
.now-epic b { overflow-wrap: anywhere; }
.views button { white-space: nowrap; }
@media (max-width: 719px) { .views button { font-size: .86rem; padding: 0 4px; } }

/* ---------- avatars ---------- */
.avatar.emoji { font-size: 1rem; line-height: 1; }
.avatar.lg.emoji { font-size: 1.35rem; }
.avatar.xl { width: 64px; height: 64px; font-size: 1.3rem; border-width: 3px; }
.avatar.xl.emoji { font-size: 2.1rem; }
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
.emoji-opt { height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); font-size: 1.4rem; cursor: pointer; padding: 0; line-height: 1; }
.emoji-opt.initials { font-size: .85rem; font-weight: 700; color: var(--muted); }
.emoji-opt[aria-pressed="true"] { outline: 3px solid var(--accent); outline-offset: 1px; background: var(--accent-soft); }
.avatar-picker .swatches { gap: 8px; }
.avatar-picker .swatch { width: 34px; height: 34px; border-radius: 50%; }
.avatar-picker .swatch.auto { font-size: .75rem; font-weight: 700; color: #1b2130; }

.prog-edit { display: grid; gap: 4px; max-width: 320px; }
.prog-edit input { width: 100%; accent-color: var(--accent); }
.now-progress { display: grid; gap: 6px; max-width: 320px; }

/* ---------- project links ---------- */
.links { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.link-chip { --lc: var(--accent); display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); text-decoration: none; min-width: 0; min-height: 56px; transition: border-color .15s, transform .1s; }
.link-chip:hover { border-color: var(--lc); }
.link-chip:active { transform: scale(.98); }
.lk-ico { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--lc); background: color-mix(in srgb, var(--lc) 14%, transparent); }
.lk-text { display: grid; min-width: 0; flex: 1; }
.lk-text b, .lk-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lk-text small { color: var(--muted); font-size: .78rem; }
.lk-out { color: var(--muted); font-size: 1.1rem; }
.lk-url { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lk-github { --lc: var(--ink); } .lk-supabase { --lc: #2fb479; } .lk-claude { --lc: #d97757; }
.lk-design { --lc: #a259ff; } .lk-store { --lc: var(--st-done); } .lk-doc { --lc: var(--muted); } .lk-site { --lc: var(--accent); }
.member .lk-ico { color: var(--lc, var(--accent)); }

.note.just-added { animation: note-pop .9s ease-out; }
@keyframes note-pop { 0% { transform: rotate(var(--rot)) scale(.9); box-shadow: 0 0 0 4px var(--accent); } 60% { transform: rotate(var(--rot)) scale(1.04); } 100% { transform: rotate(var(--rot)); } }

/* ---------- task types & project styles ---------- */
.task { --tc: var(--c-task); border-left: 4px solid var(--tc); }
.t-task { --tc: var(--c-task); } .t-bug { --tc: var(--c-bug); } .t-idea { --tc: var(--c-idea); } .t-improvement { --tc: var(--c-improvement); }
.check.todo, .check { border-color: color-mix(in srgb, var(--tc, var(--line)) 55%, var(--line)); }
.chip-t::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--tc); margin-right: 7px; display: inline-block; }
.chip-t.ty-bug { --tc: var(--c-bug); } .chip-t.ty-idea { --tc: var(--c-idea); } .chip-t.ty-improvement { --tc: var(--c-improvement); } .chip-t.ty-task { --tc: var(--c-task); }
.seg.wrap { flex-wrap: wrap; }
.seg.wrap button { flex: 1 1 calc(50% - 6px); }
.seg button.type-opt { --tc: var(--c-task); }
.seg button.type-opt-bug { --tc: var(--c-bug); } .seg button.type-opt-idea { --tc: var(--c-idea); } .seg button.type-opt-improvement { --tc: var(--c-improvement); }
.seg button.type-opt[aria-pressed="true"] { background: color-mix(in srgb, var(--tc) 24%, var(--surface)); box-shadow: inset 0 0 0 2px var(--tc); color: var(--ink); }



/* Papier: little pieces of paper */
.task { --r: 0deg; position: relative; border: 0; border-radius: 3px 3px 14px 3px; color: #2b2717; background: color-mix(in srgb, var(--tc) 38%, #fffdf2); box-shadow: 0 1px 1px rgb(0 0 0 / .08), 0 6px 12px -6px rgb(0 0 0 / .35); transform: rotate(var(--r)); font-family: var(--f-hand); font-size: 1.08rem; line-height: 1.25; }
.items > .task:nth-child(odd), .col > .task:nth-of-type(odd) { --r: -.5deg; }
.items > .task:nth-child(even), .col > .task:nth-of-type(even) { --r: .6deg; }
.task::before { content: ""; position: absolute; top: -7px; left: 50%; width: 46px; height: 14px; translate: -50% 0; background: rgb(255 255 255 / .55); border: 1px solid rgb(0 0 0 / .06); }
.task .t-meta, .task .has-desc, .task .t-epic { color: rgb(43 39 23 / .7); font-family: var(--f-body); }
.task .type-tag { color: #2b2717; background: color-mix(in srgb, var(--tc) 55%, #fffdf2); font-family: var(--f-body); }
.task.is-done .t-title { color: rgb(43 39 23 / .55); }
.task .check { border-color: rgb(43 39 23 / .45); background: rgb(255 255 255 / .6); }



.task.dragging { transform: none; }

/* style picker in project settings */
.style-field .sub { font-size: .8rem; font-weight: 600; color: var(--muted); margin-top: 6px; }
.type-colors { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.tc-pick { display: flex; align-items: center; gap: 8px; font-size: .88rem; font-weight: 600; color: var(--ink); }
.tc-pick input { width: 40px; height: 36px; padding: 2px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; }
.style-preview { padding: 14px 6px 8px; border-radius: 12px; border: 1px dashed var(--line); margin-top: 4px; }
.style-preview .task { cursor: default; }

/* activity panel, folded by default */
.panel-toggle { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 0; cursor: pointer; text-align: left; color: var(--ink); }
.panel-toggle h3 { flex: 1; }
.panel-toggle .count { font-size: .75rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 99px; padding: 0 8px; color: var(--muted); }
.panel-toggle .chev { color: var(--muted); }
.act-last { overflow-wrap: anywhere; }
.task .prio.low { color: rgb(43 39 23 / .65); }
.task .prio.high { color: #a61e1e; }

/* the "done" tick: always a solid green circle with a bold tick, whatever the style or theme */
.task .check, .check { width: 32px; height: 32px; }
.task .check.done { background: var(--st-active); border-color: var(--st-active); color: var(--on-active); }
.check.done svg { display: block; }
.dot-doing { width: 12px; height: 12px; border-radius: 50%; background: var(--st-paused); display: block; }

/* ---------- phone robustness ---------- */
body { overflow-x: hidden; overflow-x: clip; max-width: 100%; }
/* iOS zooms the whole page when a field is smaller than 16px: that is what slid the app sideways */
input, select, textarea { font-size: 16px; }
.field, .field > *, .row > *, .members, .member > * { min-width: 0; }
select, input { max-width: 100%; }
input[type="date"] { display: block; min-width: 0; min-height: 44px; -webkit-appearance: none; appearance: none; }
input[type="range"] { width: 100%; height: 34px; touch-action: pan-y; accent-color: var(--accent); margin: 0; }
html:has(dialog[open]) { overflow: hidden; }
dialog#sheet { overscroll-behavior: contain; }
.sheet-body { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.chips, .seg { overscroll-behavior-x: contain; }
.note { -webkit-touch-callout: none; }
@media (max-width: 719px) {
  .topbar { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
  .tabs { -webkit-transform: translateZ(0); transform: translateZ(0); will-change: transform; }
  .fab { -webkit-transform: translateZ(0); transform: translateZ(0); }
  .kbd .tabs, .kbd .fab { display: none; }
  .with-tabbar.kbd .page { padding-bottom: 40px; }
  dialog#sheet { margin-bottom: var(--kb, 0px); max-height: min(92dvh, calc(var(--vvh, 100dvh) * .96)); }
}
/* task cards: long titles and the chantier name must wrap or be cut inside the card, never widen it */
.task { min-width: 0; max-width: 100%; }
.task .t-main { grid-template-columns: minmax(0, 1fr); }
.task .t-main > * { min-width: 0; }
.t-meta { min-width: 0; max-width: 100%; }
.t-epic { min-width: 0; max-width: 100%; }
.t-title { overflow-wrap: anywhere; }
.col, .group, .items, .columns { min-width: 0; }

/* cards: the content column may never be wider than the card (a long unbreakable label used to stretch it) */
.panel, .pcard, .epic-card, .group, .col { grid-template-columns: minmax(0, 1fr); }
.panel > *, .pcard > *, .epic-card > * { min-width: 0; max-width: 100%; }
.btn.wrap-text { white-space: normal; height: auto; min-height: 44px; padding-top: 8px; padding-bottom: 8px; text-align: center; line-height: 1.3; flex-wrap: wrap; }
.btn { max-width: 100%; }
.hero > * { min-width: 0; }

/* toast with a button (undo) */
.toast.has-act { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.toast-act { pointer-events: auto; border: 0; background: none; color: inherit; font: inherit; font-weight: 800; text-decoration: underline; cursor: pointer; padding: 6px 4px; }
.toast.has-act { pointer-events: auto; }

/* drawn icons */
.ico { flex: none; vertical-align: -.2em; }
.with-ico { display: inline-flex; align-items: center; gap: 5px; }
.vote .ico { vertical-align: 0; }
.lk-out { display: inline-flex; }
.btn .ico, .wb .ico { vertical-align: -.25em; }
.emoji-badge .ico, .avatar .ico { width: 1em; height: 1em; vertical-align: 0; }
.emoji-opt { display: grid; place-items: center; color: var(--ink); }
.emoji-opt .ico { vertical-align: 0; }
.avatar.emoji .ico { stroke-width: 2.200; }

/* quick-add type button: filled with the colour of the chosen type, named in text */
.qa-type { --tc: var(--c-task); flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 12px; min-height: 46px; border: 0; border-radius: 12px; cursor: pointer; font-weight: 700; font-size: .88rem; white-space: nowrap;
  background: var(--tc); color: #fff; color: oklch(from var(--tc) clamp(0, (0.68 - l) * 1000, 1) 0 0); box-shadow: inset 0 -2px 0 rgb(0 0 0 / .12); }
.qa-type.ty-bug { --tc: var(--c-bug); } .qa-type.ty-idea { --tc: var(--c-idea); } .qa-type.ty-improvement { --tc: var(--c-improvement); }
.qa-type:active { filter: brightness(.92); }
@media (max-width: 430px) {
  .quick-add { flex-wrap: wrap; }
  .qa-type { flex: 1 1 100%; min-height: 40px; }
  .quick-add .input { flex: 1 1 0; }
}

/* chantiers: roadmap modes */
.columns.rm { grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); }
@media (max-width: 719px) {
  .columns.rm { grid-template-columns: minmax(0, 1fr); }
  .columns.rm .col:not(.shown) { display: grid; }
  .columns.rm .col { background: var(--surface-2); border: 1px solid var(--line); padding: 12px; }
  .columns.rm .col-head { display: flex; }
}
.col { grid-template-columns: minmax(0, 1fr); }

/* light markdown */
.md-hint { display: block; margin-top: 4px; }
.md-preview { margin-top: 6px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); border: 1px dashed var(--line); font-size: .92rem; }
.note .n-text strong, .description strong, .desc strong { font-weight: 800; }
.note .n-text u, .description u, .desc u { text-underline-offset: 2px; }

/* emoji drawn in SVG, centred by measurement */
.emo { width: 1.25em; height: 1.25em; display: block; overflow: visible; }
.avatar .emo, .emoji-badge .emo { margin: auto; }
/* the 4 names share one cell: the button is always as wide as the longest, whatever is chosen */
.qa-lbl { display: inline-grid; justify-items: start; }
.qa-lbl > span { grid-area: 1 / 1; }
.qa-lbl > .off { visibility: hidden; }

/* changelog */
.topbar [data-action="account"] { position: relative; }
.news-dot { position: absolute; top: 4px; right: 4px; width: 11px; height: 11px; border-radius: 50%; background: var(--danger, #e03131); border: 2px solid var(--bg); }
.news-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); color: var(--ink); text-align: left; cursor: pointer; }
.news-row > span:first-child { flex: 1; min-width: 0; display: grid; }
.news-row small { color: var(--muted); }
.news-row .ico { color: var(--muted); transform: rotate(-90deg); }
.cl-ver { border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); padding: 0 12px; }
.cl-ver summary { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 0; cursor: pointer; }
.cl-ver ul { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 6px; font-size: .92rem; }
.cl-pill { font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); }
.cl-pill.soon { background: var(--surface); color: var(--muted); border: 1px solid var(--line); }

/* chantiers as big post-its with the tasks stuck on top */
.seg.sm { margin-bottom: 12px; } .seg.sm button { min-height: 32px; font-size: .85rem; }
.ep-grid { display: grid; gap: 22px 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); align-items: start; margin-top: 6px; }
.ep-sheet { --ep: var(--pi-green); position: relative; min-width: 0; padding: 18px 12px 12px; margin-top: 10px; border-radius: 6px 6px 14px 6px; color: var(--pi-ink);
  background: color-mix(in srgb, var(--ep) 78%, var(--surface)); box-shadow: 0 6px 14px rgb(0 0 0 / .13), 0 1px 0 rgb(255 255 255 / .35) inset; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.ep-sheet.hz-now { --ep: var(--pi-green); } .ep-sheet.hz-next { --ep: var(--pi-blue); } .ep-sheet.hz-later { --ep: var(--pi-purple); } .ep-sheet.hz-done { --ep: var(--pi-yellow); }
.ep-tape { position: absolute; top: -10px; left: 50%; width: 74px; height: 20px; translate: -50% 0; rotate: -2deg; background: rgb(255 255 255 / .55); box-shadow: 0 1px 3px rgb(0 0 0 / .15); border-radius: 2px; }
.ep-head { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ep-title { flex: 1; min-width: 0; min-height: 0; height: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border: 0; background: none; padding: 0; text-align: left; cursor: pointer; color: inherit; }
.ep-title h4 { margin: 0; font-family: var(--f-hand); font-size: 1.25rem; line-height: 1.15; overflow-wrap: anywhere; }
.ep-add { flex: none; min-height: 34px; height: 34px; background: rgb(255 255 255 / .45); color: var(--pi-ink); min-width: 34px; padding: 0; font-size: 1.15rem; }
.ep-bar { height: 6px; background: rgb(255 255 255 / .55); border-color: transparent; }
.ep-count { font-size: .78rem; opacity: .75; margin: -2px 0 4px; }
.ep-stack { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); padding: 0 2px; }
.ep-stack .task { box-shadow: 0 3px 7px rgb(0 0 0 / .18); min-height: 46px; }
.ep-stack .task:nth-child(odd) { rotate: -.7deg; } .ep-stack .task:nth-child(even) { rotate: .6deg; translate: 3px 0; }
.ep-stack .task:hover { rotate: 0deg; }
.ep-loose { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
.columns > .col > .ep-sheet + .ep-sheet, .columns > .col > .ep-sheet + .ep-loose, .columns > .col > .ep-loose + .ep-sheet { margin-top: 18px; }
.ep-sheet .hz { background: rgb(255 255 255 / .5); color: var(--pi-ink); }
