:root {
  --canvas: #E7EAE4;
  --col: #D9DED5;
  --col-head: #1D2420;
  --card: #FFFFFF;
  --card-hover: #F6F8F5;
  --ink: #1D2420;
  --muted: #535D57;
  --line: #C3CAC0;
  --field: #FFFFFF;
  --primary: #2F5D50;
  --on-primary: #FFFFFF;
  --primary-soft: #D3E3DC;
  --danger: #A0352A;
  --due-late: #A0352A;
  --due-soon: #7A5A12;
  --done: #2F6B3A;
  --focus: #2F5D50;
  --scrim: rgba(18, 24, 21, 0.5);
  --lift: 0 10px 24px rgba(20, 30, 25, 0.22), 0 2px 6px rgba(20, 30, 25, 0.16);
  --rest: 0 1px 0 rgba(20, 30, 25, 0.14);
  --font: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: #131715; --col: #1C221F; --col-head: #E4E9E5; --card: #262D29; --card-hover: #2D3530;
    --ink: #E4E9E5; --muted: #A3ADA7; --line: #3A4540; --field: #1A201D;
    --primary: #86C4AE; --on-primary: #0F201A; --primary-soft: #23382F;
    --danger: #F0907F; --due-late: #F0907F; --due-soon: #E3C068; --done: #8FD39B; --focus: #86C4AE;
    --scrim: rgba(0, 0, 0, 0.6);
    --lift: 0 12px 28px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.4); --rest: 0 1px 0 rgba(0, 0, 0, 0.4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --canvas: #131715; --col: #1C221F; --col-head: #E4E9E5; --card: #262D29; --card-hover: #2D3530;
  --ink: #E4E9E5; --muted: #A3ADA7; --line: #3A4540; --field: #1A201D;
  --primary: #86C4AE; --on-primary: #0F201A; --primary-soft: #23382F;
  --danger: #F0907F; --due-late: #F0907F; --due-soon: #E3C068; --done: #8FD39B; --focus: #86C4AE;
  --scrim: rgba(0, 0, 0, 0.6);
  --lift: 0 12px 28px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.4); --rest: 0 1px 0 rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--canvas); color: var(--ink);
  font: 400 15px/1.45 var(--font); -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column; min-height: 100dvh;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
a { color: var(--primary); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- top bar ---------- */
.top {
  display: flex; align-items: center; gap: 8px; height: 56px; padding: 0 12px;
  border-bottom: 1px solid var(--line); background: var(--canvas); flex: none;
}
.home { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; color: var(--primary); }
.home svg { width: 22px; height: 22px; fill: currentColor; stroke: none; }
.home:hover { background: var(--col); }
.crumb { display: flex; align-items: center; gap: 4px; min-width: 0; flex: 1; }
.crumb h1 { font-size: 17px; font-weight: 700; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-name {
  border: 0; background: none; padding: 6px 8px; border-radius: 6px; font-size: 17px; font-weight: 700;
  max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left;
}
.board-name:hover { background: var(--col); }
.top-right { display: flex; align-items: center; gap: 6px; }
.faces { display: flex; }
.faces .face + .face { margin-left: -6px; }

.face {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  font-size: 11px; font-weight: 700; color: #fff; background: var(--c, var(--primary));
  box-shadow: 0 0 0 2px var(--canvas); flex: none; letter-spacing: 0.02em;
}
.face.sm { width: 24px; height: 24px; font-size: 10px; box-shadow: 0 0 0 2px var(--card); }

/* ---------- buttons and fields ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 14px;
  border-radius: 8px; border: 1px solid var(--line); background: var(--card); font-weight: 600;
}
.btn:hover { background: var(--card-hover); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--danger); }
.btn.ghost { background: none; border-color: transparent; }
.btn.ghost:hover { background: var(--col); }
.btn[disabled] { opacity: 0.45; cursor: default; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 8px; background: none; color: var(--muted);
}
.icon-btn:hover { background: var(--col); color: var(--ink); }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span { font-weight: 600; font-size: 14px; }
.field small { color: var(--muted); }
input[type="text"], input[type="email"], input[type="date"], input[type="search"], textarea, select {
  width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--field);
}
textarea { resize: vertical; line-height: 1.5; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--focus); outline-offset: -1px; border-color: transparent; }

/* ---------- home ---------- */
.home-wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 28px 16px 64px; }
.home-wrap h2 { font-size: 22px; margin: 0 0 16px; }
.board-rows { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 8px; }
.board-row a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-radius: 10px;
  background: var(--card); color: var(--ink); text-decoration: none; box-shadow: var(--rest); font-weight: 600; font-size: 16px;
}
.board-row a:hover { background: var(--card-hover); }
.board-row .count { color: var(--muted); font-weight: 400; font-size: 14px; white-space: nowrap; }
.board-row.archived a { opacity: 0.7; }
.empty { color: var(--muted); padding: 24px 0; }
.sub { font-size: 15px; color: var(--muted); font-weight: 600; margin: 28px 0 10px; }

/* ---------- board ---------- */
.board {
  flex: 1; display: flex; align-items: flex-start; gap: 12px; padding: 14px 12px 20px;
  overflow-x: auto; overflow-y: hidden; height: calc(100dvh - 56px); overscroll-behavior-x: contain;
}
.col {
  flex: 0 0 288px; display: flex; flex-direction: column; max-height: 100%;
  background: var(--col); border-radius: 12px;
}
.col-head { display: flex; align-items: center; gap: 4px; padding: 8px 6px 4px 12px; cursor: grab; }
.col-head:active { cursor: grabbing; }
.col-name {
  flex: 1; min-width: 0; border: 0; background: none; padding: 6px 4px; border-radius: 6px; font-weight: 700; font-size: 15px;
  color: var(--col-head); text-align: left; overflow-wrap: anywhere;
}
.col-name:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.col-name-input { flex: 1; font-weight: 700; min-height: 36px; padding: 5px 8px; }
.col-count { color: var(--muted); font-size: 13px; padding: 0 4px; }
.cards { list-style: none; margin: 0; padding: 4px 8px 4px; overflow-y: auto; min-height: 44px; display: flex; flex-direction: column; gap: 8px; }
.card {
  list-style: none; position: relative; background: var(--card); border-radius: 9px; box-shadow: var(--rest); padding: 10px 12px;
  cursor: pointer; user-select: none; -webkit-user-select: none; border: 1px solid transparent;
}
.card:hover { background: var(--card-hover); }
.card:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.card .t { overflow-wrap: anywhere; }
.card.is-done .t { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; line-height: 1;
  padding: 4px 7px 4px 6px; border-radius: 5px; background: color-mix(in srgb, var(--lc) 16%, var(--card)); color: var(--ink);
}
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--lc); flex: none; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 8px; color: var(--muted); font-size: 13px; }
.meta:empty { display: none; }
.meta span { display: inline-flex; align-items: center; gap: 4px; }
.meta svg { width: 15px; height: 15px; }
.meta .faces { margin-left: auto; }
.due.late { color: var(--due-late); font-weight: 600; }
.due.soon { color: var(--due-soon); font-weight: 600; }
.due.ok-done, .meta .all-done { color: var(--done); font-weight: 600; }

.add-card { padding: 4px 8px 8px; }
.add-card .btn { width: 100%; justify-content: flex-start; color: var(--muted); }
.add-card textarea { min-height: 64px; margin-bottom: 6px; }
.row { display: flex; gap: 6px; align-items: center; }

.col.add-col { background: none; flex-basis: 288px; }
.col.add-col .btn { width: 100%; justify-content: flex-start; background: color-mix(in srgb, var(--col) 70%, transparent); border-style: dashed; }
.add-col form { background: var(--col); border-radius: 12px; padding: 8px; }

/* drag states: the card lifts and tilts; the slot it will land in is a dashed outline */
.drag-ghost { opacity: 1 !important; background: transparent !important; box-shadow: none !important; border: 2px dashed var(--line) !important; }
.drag-ghost > * { visibility: hidden; }
.drag-chosen { box-shadow: var(--lift); }
/* `rotate` composes with the inline transform Sortable uses to move the dragged copy. */
.sortable-fallback { rotate: 2.5deg; box-shadow: var(--lift) !important; opacity: 1 !important; cursor: grabbing; }
.col.drag-ghost { border-radius: 12px; }
body.dragging, body.dragging * { cursor: grabbing !important; }

/* ---------- card sheet ---------- */
dialog { border: 0; padding: 0; color: var(--ink); background: var(--card); }
dialog::backdrop { background: var(--scrim); }
.sheet {
  width: min(640px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0 0 0 auto;
  box-shadow: var(--lift);
}
.sheet[open] { animation: slide-in 200ms cubic-bezier(.2, .8, .2, 1); }
@keyframes slide-in { from { transform: translateX(40px); opacity: 0; } }
.sheet-inner { display: flex; flex-direction: column; height: 100%; }
.sheet-head { display: flex; align-items: flex-start; gap: 8px; padding: 14px 12px 8px 20px; }
.sheet-head .title-input {
  flex: 1; font-size: 21px; font-weight: 700; line-height: 1.3; border: 1px solid transparent; background: none;
  padding: 4px 6px; margin-left: -7px; min-height: 0; resize: none; overflow: hidden;
}
.sheet-head .title-input:hover { border-color: var(--line); }
.sheet-body { overflow-y: auto; padding: 4px 20px 32px; flex: 1; }
.where { color: var(--muted); font-size: 14px; margin: 0 0 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.where select { width: auto; min-height: 34px; padding: 4px 8px; }
.section { margin: 0 0 24px; }
.section h3 { font-size: 15px; margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.section h3 svg { color: var(--muted); }
.toggles { display: flex; flex-wrap: wrap; gap: 6px; }
.toggle {
  display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 4px 12px 4px 6px; border-radius: 18px;
  border: 1px solid var(--line); background: var(--card); font-size: 14px; font-weight: 600;
}
.toggle.label-t { border-radius: 7px; padding-left: 10px; }
.toggle.label-t::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--lc); }
.toggle[aria-pressed="true"] { background: var(--primary-soft); border-color: var(--primary); }
.toggle[aria-pressed="true"]::after {
  content: ""; width: 12px; height: 7px; border: solid var(--primary); border-width: 0 0 2px 2px; transform: rotate(-45deg) translateY(-2px); margin-left: 2px;
}
.due-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.due-row input[type="date"] { width: auto; }
.check { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; font-weight: 600; }
.check input { width: 20px; height: 20px; accent-color: var(--primary); }
.desc { min-height: 120px; }
.save-note { color: var(--muted); font-size: 13px; min-height: 18px; margin-top: 4px; }
.progress { height: 6px; border-radius: 3px; background: var(--col); overflow: hidden; margin: 0 0 10px; }
.progress i { display: block; height: 100%; background: var(--primary); transition: width 200ms ease-out; }
.checklist { list-style: none; margin: 0 0 8px; padding: 0; }
.checklist li { display: flex; align-items: center; gap: 8px; padding: 2px 0; }
.checklist li label { flex: 1; display: flex; align-items: center; gap: 10px; min-height: 40px; cursor: pointer; }
.checklist li input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--primary); flex: none; }
.checklist li.is-done span { text-decoration: line-through; color: var(--muted); }
.checklist .icon-btn { width: 34px; height: 34px; opacity: 0.6; }
.checklist li:hover .icon-btn { opacity: 1; }
.files { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
.files li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; background: var(--canvas); }
.files a { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.files small { color: var(--muted); white-space: nowrap; }
.comment-form textarea { min-height: 72px; margin-bottom: 6px; }
.comments { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 14px; }
.comments li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; }
.comments .who { font-weight: 700; font-size: 14px; }
.comments .when { color: var(--muted); font-size: 13px; font-weight: 400; margin-left: 6px; }
.comments .body { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 2px; }
.comments .del { border: 0; background: none; color: var(--muted); font-size: 13px; padding: 4px 0; text-decoration: underline; }
.danger-zone { display: flex; flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--line); padding-top: 18px; }
.meta-line { color: var(--muted); font-size: 13px; margin-top: 14px; }

/* ---------- modal + menus ---------- */
.modal { width: min(460px, calc(100vw - 32px)); border-radius: 14px; box-shadow: var(--lift); }
.modal[open] { animation: pop 160ms ease-out; }
@keyframes pop { from { transform: scale(0.97); opacity: 0; } }
.modal form, .modal .pad { padding: 20px; }
.modal h2 { font-size: 18px; margin: 0 0 14px; }
.modal p { margin: 0 0 14px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.menu { display: grid; padding: 8px; }
.menu button {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border: 0; background: none; border-radius: 8px; text-align: left; font-weight: 600;
}
.menu button:hover { background: var(--col); }
.menu button.danger { color: var(--danger); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
.link-box { display: flex; gap: 6px; }
.link-box input { font-size: 13px; }
.label-edit { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.swatch { width: 30px; height: 30px; border-radius: 7px; border: 2px solid transparent; background: var(--lc); }
.swatch[aria-pressed="true"] { border-color: var(--ink); }
.color-dot { width: 28px; height: 28px; border-radius: 6px; background: var(--lc); border: 0; }
.people { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 8px; }
.people li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--card); border-radius: 10px; box-shadow: var(--rest); flex-wrap: wrap; }
.people .who { flex: 1; min-width: 160px; }
.people .who b { display: block; }
.people .who small { color: var(--muted); }
.panel { background: var(--card); border-radius: 12px; padding: 18px; box-shadow: var(--rest); margin-bottom: 20px; }
.panel h3 { margin: 0 0 10px; font-size: 16px; }
.panel p { margin: 0 0 12px; color: var(--muted); }
code { font-size: 13px; background: var(--canvas); padding: 2px 5px; border-radius: 4px; overflow-wrap: anywhere; }

.signed-out { max-width: 440px; margin: 12vh auto; padding: 0 16px; }
.signed-out h2 { font-size: 22px; margin: 0 0 8px; }
.signed-out p { color: var(--muted); }

.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--canvas); padding: 10px 16px; border-radius: 8px; font-weight: 600; z-index: 50;
  transition: opacity 160ms ease-out, transform 160ms ease-out; max-width: calc(100vw - 32px);
  display: flex; align-items: center; gap: 12px;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast button { background: none; border: 0; color: inherit; text-decoration: underline; font-weight: 700; padding: 4px; }

/* ---------- phone ---------- */
@media (max-width: 640px) {
  .board { scroll-snap-type: x mandatory; padding: 12px 16px 16px; gap: 10px; scroll-padding: 16px; }
  .col, .col.add-col { flex-basis: calc(100vw - 48px); scroll-snap-align: start; }
  .sheet { width: 100vw; }
  .sheet-head { padding-left: 16px; }
  .sheet-body { padding: 4px 16px 32px; }
  .top-right .faces { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .sortable-fallback { rotate: none; }
}

/* ---------- top tabs ---------- */
.tabs { display: flex; gap: 2px; margin-right: 8px; }
.tabs a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 8px;
  color: var(--muted); font-weight: 600; text-decoration: none; white-space: nowrap;
}
.tabs a:hover { background: var(--col); color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); background: var(--col); }
/* The page heading repeats the tab name on these pages, so the header crumb is only shown on boards. */
body:not(.on-board) .crumb h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Mine / Everyone ---------- */
.segs { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--col); }
.seg { min-height: 36px; padding: 0 14px; border: 0; border-radius: 8px; background: none; font-weight: 600; color: var(--muted); }
.seg[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: var(--rest); }

/* ---------- My work ---------- */
.work-wrap { max-width: 860px; }
.work-group { margin-bottom: 26px; }
.work-group h3 { display: flex; align-items: center; gap: 6px; font-size: 15px; margin: 0 0 8px; }
.work-group.is-late h3 { color: var(--due-late); }
.work-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.work-row {
  display: grid; grid-template-columns: 22px minmax(0, 1fr) auto auto; align-items: center; gap: 12px;
  padding: 8px 14px; background: var(--card); border-radius: 10px; box-shadow: var(--rest);
}
.work-row input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--primary); }
.work-open {
  display: grid; gap: 2px; min-width: 0; min-height: 44px; align-content: center; padding: 2px 0;
  border: 0; background: none; text-align: left;
}
.work-title { font-weight: 600; overflow-wrap: anywhere; }
.work-where { color: var(--muted); font-size: 13px; }
.work-row .due { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.work-row .due svg { width: 15px; height: 15px; }
.work-row .due.late { color: var(--due-late); }
.work-row .due.soon { color: var(--due-soon); }

/* ---------- Calendar ---------- */
.cal-wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 20px 16px 48px; }
.cal-head { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.cal-head h2 { margin: 0; font-size: 22px; min-width: 190px; }
.cal-head .segs { margin-left: auto; }
.cal-grid {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
}
.cal-wd { background: var(--col); padding: 8px 10px; font-size: 13px; font-weight: 700; color: var(--muted); }
.cal-cell { background: var(--card); min-height: 118px; padding: 6px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal-cell.is-out { background: var(--canvas); }
.cal-cell.is-out .cal-num { color: var(--muted); opacity: 0.7; }
.cal-num { font-size: 13px; font-weight: 700; padding: 2px 4px; align-self: flex-start; border-radius: 6px; }
.cal-cell.is-today .cal-num { background: var(--primary); color: var(--on-primary); }
.cal-chip {
  display: block; width: 100%; text-align: left; border: 0; border-left: 3px solid var(--c, var(--line));
  background: var(--canvas); border-radius: 5px; padding: 4px 6px; font-size: 13px; font-weight: 600; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 26px;
}
.cal-chip:hover { background: var(--col); }
.cal-chip.is-done { color: var(--muted); text-decoration: line-through; }
.cal-chip.is-late { color: var(--due-late); }
.cal-more { border: 0; background: none; text-align: left; font-size: 13px; font-weight: 600; color: var(--primary); padding: 2px 6px; min-height: 26px; }
.cal-day-list { display: grid; gap: 6px; margin-bottom: 12px; }
.cal-day-list .cal-chip { white-space: normal; padding: 9px 10px; min-height: 40px; }
.cal-agenda { display: none; }
.cal-agenda-day { margin-bottom: 18px; }
.cal-agenda-day h3 { font-size: 15px; margin: 0 0 6px; }
.cal-agenda-day.is-today h3 { color: var(--primary); }

@media (max-width: 760px) {
  .cal-grid { display: none; }
  .cal-agenda { display: block; }
  .cal-head .segs { margin-left: 0; }
}
@media (max-width: 640px) {
  .tabs a { padding: 0 9px; }
  body.on-board .tabs { display: none; }
  .work-row { grid-template-columns: 22px minmax(0, 1fr); row-gap: 2px; }
  .work-row .due, .work-row .faces { grid-column: 2; }
  .work-row .faces { display: none; }
}

/* ---------- due time, board picker, feed dialog ---------- */
.due-row input[type="time"] { width: auto; min-height: 42px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--field); }
.due-row input[type="time"]:disabled { opacity: 0.45; }
.hint { color: var(--muted); font-size: 13px; margin: 8px 0 0; }
.cal-time { font-weight: 700; margin-right: 5px; font-variant-numeric: tabular-nums; }
.steps { margin: 14px 0 10px; padding-left: 22px; display: grid; gap: 6px; }
.where select { max-width: 46%; }
