:root {
  --bg: #f6f7f9;
  --panel: #fff;
  --ink: #16181d;
  --muted: #6b7280;
  --line: #e3e6ea;
  --accent: #2f6fed;
  --mine: #eef4ff;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a;
    --panel: #1c1f25;
    --ink: #e9ecf1;
    --muted: #949cab;
    --line: #2b3038;
    --accent: #6f9bff;
    --mine: #232a36;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  padding: 24px;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 ui-sans-serif, -apple-system, "Segoe UI", system-ui, sans-serif;
}
h1 { font-size: 1.35rem; margin: 0; }
h2 { font-size: .95rem; margin: 0 0 10px; letter-spacing: .02em; }
p { margin: 0; }
.muted { color: var(--muted); font-size: .85rem; }

header {
  display: flex; flex-wrap: wrap; gap: 12px;
  align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.header-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.people { color: var(--muted); font-size: .85rem; cursor: default; }

button, .ghost {
  font: inherit; cursor: pointer; border-radius: 8px;
  border: 1px solid var(--accent); background: var(--accent); color: #fff;
  padding: 7px 13px; text-decoration: none;
}
button.ghost, a.ghost {
  background: transparent; color: var(--muted); border-color: var(--line);
}
button.ghost.active { color: var(--accent); border-color: var(--accent); }
button.link {
  background: none; border: none; color: var(--muted);
  padding: 0; font-size: .78rem; text-decoration: underline;
}
input {
  font: inherit; padding: 8px 10px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  width: 100%;
}

.share {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 14px; margin-bottom: 16px;
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}
.share code { font-size: .85rem; }

#columns {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.column {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px;
}
.cards { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.card {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 9px; padding: 9px 11px; font-size: .92rem;
  overflow-wrap: anywhere;
}
.card.mine { background: var(--mine); border-color: var(--accent); }
.card.hidden { color: var(--muted); letter-spacing: 3px; text-align: center; }
.card-foot {
  display: flex; gap: 10px; align-items: center;
  margin-top: 6px; font-size: .78rem;
}
.author { color: var(--accent); font-weight: 600; }

#actions-panel {
  margin-top: 24px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 12px; padding: 16px;
}
#carried {
  margin-bottom: 16px; background: var(--panel);
  border: 1px solid var(--accent); border-radius: 12px; padding: 16px;
}
.actions { list-style: none; padding: 0; margin: 0 0 12px; }
.action {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 7px 0; border-bottom: 1px solid var(--line);
}
.action:last-child { border-bottom: none; }
.action.done .action-text { text-decoration: line-through; color: var(--muted); }
.action input[type=checkbox] { width: auto; margin-top: 3px; }

form { display: flex; gap: 8px; flex-wrap: wrap; }
form input { flex: 1 1 160px; }
form button { flex: 0 0 auto; }

.overlay {
  position: fixed; inset: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
body.centred { display: flex; align-items: center; justify-content: center; min-height: 90vh; }
.card-panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 26px; max-width: 420px; width: 100%;
}
.card-panel h1 { margin-bottom: 8px; }
.card-panel p { margin-bottom: 16px; }
