:root {
  --paper: #fbf6ec;
  --card: #fffdf8;
  --ink: #1f2a24;
  --muted: #6d7a70;
  --faint: #a8a294;
  --pine: #14452f;
  --pine-dark: #0f3724;
  --pine-soft: #e9f1e9;
  --holly: #b23a32;
  --holly-soft: #fbeae7;
  --gold: #c1913c;
  --gold-soft: #f8f0dd;
  --line: #e6ddcb;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, ui-serif, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --shadow: 0 1px 2px rgba(31, 42, 36, 0.05), 0 16px 40px -28px rgba(31, 42, 36, 0.4);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
  background:
    radial-gradient(1100px 600px at 8% -12%, rgba(193, 145, 60, 0.12), transparent 60%),
    radial-gradient(900px 500px at 102% -4%, rgba(178, 58, 50, 0.09), transparent 55%),
    radial-gradient(700px 500px at 50% 110%, rgba(20, 69, 47, 0.06), transparent 60%),
    var(--paper);
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--pine);
}

a {
  color: var(--pine);
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

input::placeholder {
  color: var(--faint);
  opacity: 1;
}

:focus-visible {
  outline: 3px solid rgba(193, 145, 60, 0.45);
  outline-offset: 1px;
}

.page {
  width: min(1040px, 100% - 40px);
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- Top bar ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--pine);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.brand-mark {
  width: 23px;
  height: 23px;
  color: var(--gold);
  flex: none;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.person-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 11px 4px 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.7);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.person-button:hover {
  border-color: #d3c6ae;
  background: var(--card);
}

.avatar {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #fff;
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
}

.person-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 11px 17px;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.06s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.btn.primary {
  background: var(--pine);
  border-color: var(--pine);
  color: #fff;
}

.btn.primary:hover:not(:disabled) {
  background: var(--pine-dark);
  border-color: var(--pine-dark);
}

.btn.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--pine);
}

.btn.ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.7);
  border-color: #d5cab5;
}

.btn.small {
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 9px;
}

/* ---------- Shared type ---------- */

.eyebrow {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--holly);
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.hint {
  margin: 10px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

/* ---------- Landing ---------- */

.hero {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(28px, 6vw, 72px) 0 32px;
  animation: rise 0.4s ease both;
}

.hero-title {
  margin: 0 0 18px;
  font-size: clamp(44px, 8vw, 78px);
  line-height: 0.96;
  letter-spacing: -0.025em;
}

.hero-title .accent {
  color: var(--holly);
  font-style: italic;
  font-weight: 500;
}

.lede {
  max-width: 54ch;
  margin: 0 0 30px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
}

.create-form {
  padding: 22px;
  margin-bottom: 18px;
}

.create-form label,
.open-form label,
.gate-form label {
  display: block;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.create-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  gap: 12px;
}

.create-form .field label {
  margin-bottom: 6px;
}

.create-grid input,
.gate-form input {
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.create-grid input:focus,
.gate-form input:focus {
  border-color: var(--gold);
  outline: none;
  box-shadow: 0 0 0 3px rgba(193, 145, 60, 0.18);
}

.create-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.create-actions .hint {
  margin: 0;
}

.field-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.field-row input {
  flex: 1 1 260px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.field-row input:focus {
  border-color: var(--gold);
  outline: none;
  box-shadow: 0 0 0 3px rgba(193, 145, 60, 0.18);
}

.open-form {
  margin: 0 0 12px;
  padding: 2px 2px 0;
}

.open-form .field-row {
  margin-top: 6px;
}

.open-form input {
  background: rgba(255, 255, 255, 0.55);
}

.recent {
  margin-top: 34px;
}

.recent h2 {
  margin: 0 0 10px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.recent-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.recent-link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.7);
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.recent-link:hover {
  border-color: #d3c6ae;
  background: var(--card);
}

.recent-title {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-date {
  flex: none;
  font-size: 12px;
  color: var(--faint);
}

/* ---------- Name gate ---------- */

.gate {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: clamp(44px, 10vh, 110px) 0 40px;
  animation: rise 0.4s ease both;
}

.gate-title {
  margin: 0 0 14px;
  font-size: clamp(42px, 7vw, 64px);
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.gate-lede {
  margin: 0 0 26px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
}

.gate-form {
  padding: 22px;
}

.gate-form .field-row {
  margin-top: 8px;
}

.back-link {
  display: inline-block;
  margin-top: 20px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
}

.back-link:hover {
  color: var(--pine);
  text-decoration: underline;
}

/* ---------- Name dialog ---------- */

.name-dialog {
  width: min(420px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 30px 80px -20px rgba(20, 69, 47, 0.45);
}

.name-dialog::backdrop {
  background: rgba(20, 35, 28, 0.45);
  backdrop-filter: blur(2px);
}

.name-dialog form {
  padding: 22px;
}

.name-dialog h2 {
  margin: 0 0 6px;
  font-size: 28px;
  line-height: 1.1;
}

.dialog-hint {
  margin: 0 0 18px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}

.name-dialog label {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.name-dialog input {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.name-dialog input:focus {
  border-color: var(--gold);
  outline: none;
  box-shadow: 0 0 0 3px rgba(193, 145, 60, 0.18);
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

/* ---------- Board ---------- */

.board {
  padding: 8px 0 48px;
  animation: rise 0.35s ease both;
}

.board-head {
  display: grid;
  gap: 16px;
  margin: 4px 0 20px;
}

.board-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.board-heading {
  flex: 1 1 420px;
  min-width: 0;
}

.title-input {
  width: 100%;
  max-width: 660px;
  margin: 0 0 0 -7px;
  padding: 2px 6px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  font-family: var(--serif);
  font-size: clamp(34px, 5vw, 50px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--pine);
}

.title-input:hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.55);
}

.title-input:focus {
  border-color: var(--gold);
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(193, 145, 60, 0.16);
}

.share {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  padding: 9px 10px 9px 14px;
  border: 1px solid #cfe0d3;
  border-radius: 14px;
  background: var(--pine-soft);
}

.share-text {
  min-width: 0;
}

.share-label {
  display: block;
  margin-bottom: 1px;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #4f735d;
}

.share-link {
  display: block;
  width: min(300px, 48vw);
  padding: 2px 0;
  border: none;
  background: transparent;
  font-size: 12.5px;
  color: var(--pine);
  text-overflow: ellipsis;
}

.share-link:focus {
  outline: none;
  text-decoration: underline;
}

.share .btn {
  padding: 9px 13px;
  font-size: 13px;
}

.stats {
  max-width: 520px;
}

.progress {
  height: 8px;
  margin-bottom: 8px;
  border-radius: 999px;
  background: #eae1d1;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--pine) 0%, #3d7a56 55%, var(--gold) 100%);
  transition: width 0.35s ease;
}

.stats p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.stats strong {
  color: var(--ink);
  font-weight: 650;
}

/* ---------- Add form ---------- */

.add-form {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(0, 1.35fr) 132px auto;
  gap: 12px;
  align-items: end;
  padding: 16px;
  margin-bottom: 18px;
}

.add-form .field {
  min-width: 0;
}

.add-form label {
  display: block;
  margin-bottom: 5px;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
}

.add-form input,
.add-form select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}

.add-form input:focus,
.add-form select:focus {
  border-color: var(--gold);
  outline: none;
  box-shadow: 0 0 0 3px rgba(193, 145, 60, 0.16);
}

.add-btn {
  padding: 10px 18px;
  height: 41px;
}

/* ---------- Filters ---------- */

.filters {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin: 0 0 20px;
}

.filters:empty {
  display: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.8);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 550;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.chip:hover {
  border-color: #d3c6ae;
  color: var(--ink);
}

.chip.active {
  background: var(--pine);
  border-color: var(--pine);
  color: #fff;
}

.chip-count {
  font-size: 11px;
  opacity: 0.65;
  font-variant-numeric: tabular-nums;
}

.person-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--faint);
  flex: none;
}

/* ---------- Categories and items ---------- */

.cat-section {
  margin: 0 0 20px;
}

.cat-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px 4px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}

.cat-count {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--faint);
}

.cat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cat-dot, #8a9189);
  flex: none;
}

.cat-starters { --cat-bg: #e9f1e8; --cat-fg: #2a6144; --cat-dot: #4a8a62; }
.cat-mains    { --cat-bg: #fbeae6; --cat-fg: #9a352c; --cat-dot: #b23a32; }
.cat-sides    { --cat-bg: #f8f0dd; --cat-fg: #7c5a1a; --cat-dot: #c1913c; }
.cat-desserts { --cat-bg: #f8e9ef; --cat-fg: #8c3355; --cat-dot: #b4507a; }
.cat-drinks   { --cat-bg: #e8f0f4; --cat-fg: #2b5c73; --cat-dot: #3f7d99; }
.cat-other    { --cat-bg: #efede7; --cat-fg: #5f665f; --cat-dot: #8a9189; }

.items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 122px 152px 30px;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 1px 1px rgba(31, 42, 36, 0.03);
}

.item:hover {
  border-color: #ddd2bd;
}

.item.is-done {
  background: #f7f3e9;
}

.item-check {
  width: 19px;
  height: 19px;
  margin: 0;
  accent-color: var(--pine);
  cursor: pointer;
  justify-self: center;
}

.item-main {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.item-name,
.item-notes {
  width: 100%;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  padding: 4px 7px;
  text-overflow: ellipsis;
}

.item-name {
  font-size: 15px;
  font-weight: 550;
  color: var(--ink);
}

.item-notes {
  font-size: 12.5px;
  color: var(--muted);
}

.item-name:hover,
.item-notes:hover {
  border-color: var(--line);
  background: #fff;
}

.item-name:focus,
.item-notes:focus {
  border-color: var(--gold);
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(193, 145, 60, 0.14);
}

.item.is-done .item-name {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: rgba(109, 122, 112, 0.6);
}

.item.is-done .item-notes {
  opacity: 0.65;
}

.item-category {
  width: 100%;
  padding: 7px 25px 7px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  background-color: var(--cat-bg, #efede7);
  color: var(--cat-fg, #5f665f);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236d7a70' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
}

.item-category:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(193, 145, 60, 0.2);
}

.assignee-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.assignee-wrap .person-dot {
  position: absolute;
  left: 10px;
  width: 7px;
  height: 7px;
  opacity: 0;
  pointer-events: none;
}

.assignee-wrap.has-person .person-dot {
  opacity: 1;
}

.item-assignee {
  width: 100%;
  min-width: 0;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 12.5px;
  text-overflow: ellipsis;
}

.assignee-wrap.has-person .item-assignee {
  padding-left: 23px;
}

.item-assignee:focus {
  border-color: var(--gold);
  outline: none;
  box-shadow: 0 0 0 3px rgba(193, 145, 60, 0.15);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--faint);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.55;
  transition: background-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.item:hover .icon-btn,
.icon-btn:focus-visible {
  opacity: 1;
}

.icon-btn:hover {
  background: var(--holly-soft);
  color: var(--holly);
}

/* ---------- Changelog ---------- */

.changelog {
  margin-top: 26px;
  box-shadow: none;
  overflow: hidden;
}

.changelog summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  color: var(--pine);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.changelog summary::-webkit-details-marker {
  display: none;
}

.changelog summary::after {
  content: '+';
  margin-left: auto;
  color: var(--muted);
  font-size: 17px;
  font-weight: 400;
  line-height: 1;
}

.changelog[open] summary::after {
  content: '–';
}

.changelog-count {
  display: inline-grid;
  place-items: center;
  min-width: 21px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--pine-soft);
  color: var(--pine);
  font-size: 11px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.changelog-count:empty {
  display: none;
}

.event-list {
  list-style: none;
  max-height: 420px;
  margin: 0;
  padding: 2px 16px 12px;
  border-top: 1px solid var(--line);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.event-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px dashed rgba(230, 221, 203, 0.85);
  font-size: 13px;
  line-height: 1.5;
}

.event-item:last-child {
  border-bottom: none;
}

.event-text {
  margin: 0;
  color: var(--ink);
}

.event-actor {
  color: var(--pine);
}

.event-quote {
  font-style: italic;
}

.event-item time {
  flex: none;
  font-size: 11.5px;
  color: var(--faint);
  white-space: nowrap;
}

.event-empty {
  padding: 10px 0 2px;
  color: var(--muted);
  font-size: 13px;
}

/* ---------- Empty and error states ---------- */

.empty {
  padding: 34px 24px;
  border-style: dashed;
  border-color: #d9ceba;
  background: rgba(255, 253, 248, 0.55);
  box-shadow: none;
  text-align: center;
}

.empty h2 {
  margin: 0 0 6px;
  font-size: 24px;
}

.empty p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.empty .btn {
  margin-top: 16px;
}

.notfound {
  max-width: 560px;
  margin: 0 auto;
  padding: clamp(40px, 9vw, 110px) 0;
  text-align: center;
  animation: rise 0.4s ease both;
}

.notfound h1 {
  margin: 0 0 12px;
  font-size: clamp(38px, 7vw, 60px);
  line-height: 1;
}

.notfound p {
  margin: 0 0 24px;
  color: var(--muted);
}

/* ---------- Footer, toast, misc ---------- */

.footer {
  margin-top: auto;
  padding: 28px 0 24px;
  border-top: 1px solid rgba(230, 221, 203, 0.7);
  font-size: 12px;
  color: var(--faint);
  text-align: center;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 50;
  max-width: calc(100% - 40px);
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--pine);
  color: #fff;
  font-size: 13px;
  box-shadow: 0 10px 30px -10px rgba(20, 69, 47, 0.55);
  opacity: 0;
  transform: translate(-50%, 14px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.noscript {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .add-form {
    grid-template-columns: 1fr 1fr;
  }

  .add-name {
    grid-column: 1 / -1;
  }

  .add-btn {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .create-grid {
    grid-template-columns: 1fr;
  }

  .board-top {
    align-items: stretch;
    flex-direction: column;
    gap: 16px;
  }

  .board-heading {
    flex: 0 0 auto;
  }

  .share {
    width: 100%;
  }

  .share-text {
    flex: 1;
  }

  .share-link {
    width: 100%;
  }

  .item {
    grid-template-columns: 22px minmax(0, 1fr) 30px;
    padding: 10px;
    row-gap: 6px;
  }

  .item-check {
    grid-column: 1;
    grid-row: 1;
    align-self: start;
    margin-top: 8px;
  }

  .item-main {
    grid-column: 2;
    grid-row: 1;
  }

  .item-category {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
    width: auto;
    min-width: 104px;
  }

  .assignee-wrap {
    grid-column: 2;
    grid-row: 3;
  }

  .icon-btn.delete {
    grid-column: 3;
    grid-row: 1;
    align-self: start;
    opacity: 1;
  }
}

@media (max-width: 520px) {
  .page {
    width: min(1040px, 100% - 28px);
  }

  .topbar {
    padding-top: 16px;
  }

  .hero {
    padding-top: 32px;
  }

  .create-form {
    padding: 18px;
  }

  .field-row .btn {
    flex: 1 1 100%;
  }

  .board-top {
    gap: 12px;
  }

  .stats {
    max-width: none;
  }

  .person-name {
    max-width: 68px;
  }

  .top-actions .btn.small {
    padding: 8px 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  body {
    background: #fff;
  }

  .topbar,
  .footer,
  .add-form,
  .filters,
  .share,
  .changelog,
  .icon-btn,
  .toast {
    display: none !important;
  }

  .page {
    width: 100%;
  }

  .board {
    padding: 0;
    animation: none;
  }

  .title-input {
    border: none;
    padding: 0;
    margin: 0;
    background: transparent;
  }

  .item {
    grid-template-columns: 22px minmax(0, 1fr) 110px 150px;
    box-shadow: none;
    break-inside: avoid;
  }

  .item-name,
  .item-notes,
  .item-assignee,
  .item-category {
    border: none;
    box-shadow: none;
    background-image: none;
  }

  .assignee-wrap.has-person .item-assignee {
    padding-left: 10px;
  }

  .assignee-wrap .person-dot {
    display: none;
  }
}
