:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #202124;
  background: #fff;
  line-height: 1.55;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea, select { font: inherit; }
button {
  cursor: pointer;
  border: 0;
  border-radius: 999px;
  background: #f1f3f4;
  color: #3c4043;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
}
button:hover { background: #e8eaed; }
:focus-visible { outline: 2px solid #5f6368; outline-offset: 2px; }
.topbar {
  min-height: 67px;
  border-bottom: 1px solid #e8eaed;
  box-shadow: 0 1px 2px rgba(60, 64, 67, .06);
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 28px;
}
.brand { display: flex; align-items: center; gap: 9px; font-size: 18px; font-weight: 700; letter-spacing: -.6px; color: #202124; text-decoration: none; }
.brand img { width: 27px; }
.home-link { color: #5f6368; text-decoration: none; font-size: 13px; font-weight: 600; padding: 9px 13px; border-radius: 7px; }
.home-link:hover { background: #f1f3f4; }
main { padding: 36px 28px; }
.heading { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 20px; }
.eyebrow { color: #70757a; font-size: 11px; font-weight: 700; letter-spacing: 1.8px; margin: 0 0 6px; }
h1 { color: #202124; font-size: 28px; letter-spacing: -.8px; margin: 0 0 8px; }
.intro { color: #70757a; font-size: 14px; margin: 0; }
.primary { background: #303134; color: #fff; }
.primary:hover { background: #202124; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.board-title, .actions { display: flex; align-items: center; gap: 8px; }
.board-title span, .storage-note { color: #70757a; font-size: 12px; }
.storage-note { margin: 8px 0 20px; }
#message { font-size: 13px; color: #3c4043; }
#message:empty { display: none; }
.board { display: flex; gap: 18px; overflow-x: auto; padding-bottom: 24px; align-items: flex-start; }
.column { background: #f1f3f4; border-radius: 12px; width: 280px; min-width: 280px; padding: 12px; }
.column.drag-over { outline: 2px dashed #5f6368; outline-offset: -4px; }
.column-head { display: flex; align-items: center; gap: 8px; background: #e8eaed; color: #3c4043; border-radius: 8px; padding: 10px; margin-bottom: 10px; font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.count { margin-left: auto; }
.cards { display: grid; gap: 8px; }
.card { background: #fff; border: 1px solid #e8eaed; border-radius: 8px; padding: 16px; box-shadow: 0 1px 2px rgba(60,64,67,.08); cursor: grab; }
.card:active { cursor: grabbing; }
.card h3 { font-size: 14px; line-height: 1.4; margin: 0 0 8px; overflow-wrap: anywhere; }
.card p { color: #64748b; font-size: 12px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.card-footer { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 16px; }
.card-footer span { color: #70757a; font-size: 11px; }
.card-footer button { padding: 3px 9px; font-size: 12px; }
.empty { color: #70757a; font-size: 13px; margin: 0; padding: 8px; }
dialog { border: 1px solid #e8eaed; border-radius: 12px; padding: 0; width: min(500px, calc(100% - 28px)); box-shadow: 0 20px 60px #0004; }
dialog::backdrop { background: #20212499; }
form { padding: 22px; }
.dialog-heading { display: flex; justify-content: space-between; align-items: start; margin-bottom: 18px; }
.dialog-heading h2 { font-size: 20px; margin: 0; }
.close { background: transparent; font-size: 26px; line-height: 1; padding: 0 4px; }
label { display: block; font-size: 13px; font-weight: 700; margin: 17px 0 7px; }
label span { font-weight: 400; color: #70757a; }
input, textarea, select { width: 100%; border: 1px solid #dadce0; border-radius: 8px; padding: 10px; color: #202124; background: #fff; }
textarea { resize: vertical; }
.dialog-actions { display: flex; gap: 8px; margin-top: 24px; align-items: center; }
.spacer { flex: 1; }
.delete {
  background: #fceeed;
  color: #a51e17;
}
.delete:hover { background: #f8d8d5; }
.delete:focus-visible { outline-color: #b3261e; }
@media (max-width: 650px) {
  .topbar { padding: 12px; gap: 10px; }
  main { padding: 24px 12px; }
  .heading { align-items: flex-start; flex-wrap: wrap; }
  .home-link { padding: 9px 4px; }
  .card-footer button { min-height: 40px; min-width: 48px; }
  .dialog-actions { flex-wrap: wrap; }
  .toast { right: 12px; bottom: max(16px, env(safe-area-inset-bottom)); max-width: calc(100vw - 24px); }

}

#confirm-dialog { width: min(440px, calc(100% - 28px)); }
.confirm-form h2 { font-size: 17px; margin: 0 0 10px; }
.confirm-form p { color: #5f6368; font-size: 14px; margin: 0; }
#confirm-action.destructive { background: #b3261e; }
#confirm-action.destructive:hover { background: #8c1d18; }
.field-error { display: block; color: #b3261e; font-size: 12px; margin-top: 4px; }
.field-error:empty { display: none; }
.toast { position: fixed; bottom: 24px; right: 24px; z-index: 10000; max-width: calc(100vw - 48px); padding: 12px 20px; border-radius: 8px; background: #15803d; color: #fff; font-size: 14px; font-weight: 600; box-shadow: 0 4px 16px #0003; }
.toast[hidden] { display: none; }
