/* ───────────────────────────────────────────────────────────
   Startpagina — civic editorial
   Fraunces (display) + Instrument Sans (UI), lokaal geladen.
   ─────────────────────────────────────────────────────────── */

@font-face {
  font-family: 'Fraunces';
  src: url('fonts/fraunces-latin.woff2') format('woff2');
  font-weight: 300 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                 U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191,
                 U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fraunces';
  src: url('fonts/fraunces-latin-ext.woff2') format('woff2');
  font-weight: 300 700;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
                 U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                 U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Instrument Sans';
  src: url('fonts/instrument-sans-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                 U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191,
                 U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Sans';
  src: url('fonts/instrument-sans-latin-ext.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
                 U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                 U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ── Kleur ─────────────────────────────────────────────────── */

:root {
  --paper:      #f2eee4;
  --paper-deep: #e8e2d4;
  --surface:    #fbf8f1;
  --ink:        #1b1a17;
  --ink-soft:   #6a6458;
  --ink-faint:  #9c9587;
  --line:       rgb(27 26 23 / 14%);
  --line-soft:  rgb(27 26 23 / 8%);
  --accent:     #a8452a;
  --shadow:     0 1px 2px rgb(27 26 23 / 5%), 0 10px 24px -12px rgb(27 26 23 / 22%);
  --shadow-lift:0 2px 4px rgb(27 26 23 / 6%), 0 18px 34px -14px rgb(27 26 23 / 30%);
  --grain:      .05;

  --c-terracotta: #a8452a;
  --c-petrol:     #1f5450;
  --c-mustard:    #97701a;
  --c-plum:       #713f5f;
  --c-forest:     #45663a;
  --c-indigo:     #38538a;
  --c-slate:      #4f5560;

  --display: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --sans: 'Instrument Sans', ui-sans-serif, -apple-system, 'Segoe UI', sans-serif;
  --gap: clamp(0.75rem, 1.4vw, 1.1rem);
  --pad: clamp(1.25rem, 5vw, 4rem);
  --radius: 4px;
}

:root[data-theme='dark'] {
  --paper:      #121519;
  --paper-deep: #0d1013;
  --surface:    #191d23;
  --ink:        #ece7dc;
  --ink-soft:   #a19b8d;
  --ink-faint:  #6f6a60;
  --line:       rgb(236 231 220 / 14%);
  --line-soft:  rgb(236 231 220 / 7%);
  --accent:     #dd7350;
  --shadow:     0 1px 2px rgb(0 0 0 / 30%), 0 12px 28px -14px rgb(0 0 0 / 70%);
  --shadow-lift:0 2px 6px rgb(0 0 0 / 34%), 0 22px 40px -16px rgb(0 0 0 / 80%);
  --grain:      .07;

  --c-terracotta: #dd7350;
  --c-petrol:     #62b3a6;
  --c-mustard:    #cfa03c;
  --c-plum:       #c07fac;
  --c-forest:     #86b76e;
  --c-indigo:     #7c9ada;
  --c-slate:      #96a0af;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --paper:      #121519;
    --paper-deep: #0d1013;
    --surface:    #191d23;
    --ink:        #ece7dc;
    --ink-soft:   #a19b8d;
    --ink-faint:  #6f6a60;
    --line:       rgb(236 231 220 / 14%);
    --line-soft:  rgb(236 231 220 / 7%);
    --accent:     #dd7350;
    --shadow:     0 1px 2px rgb(0 0 0 / 30%), 0 12px 28px -14px rgb(0 0 0 / 70%);
    --shadow-lift:0 2px 6px rgb(0 0 0 / 34%), 0 22px 40px -16px rgb(0 0 0 / 80%);
    --grain:      .07;

    --c-terracotta: #dd7350;
    --c-petrol:     #62b3a6;
    --c-mustard:    #cfa03c;
    --c-plum:       #c07fac;
    --c-forest:     #86b76e;
    --c-indigo:     #7c9ada;
    --c-slate:      #96a0af;
  }
}

/* ── Basis ─────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

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

body {
  margin: 0;
  min-height: 100dvh;
  padding: clamp(1.75rem, 4vw, 3.25rem) var(--pad) 0;
  display: flex;
  flex-direction: column;
  font-family: var(--sans);
  font-size: 16px;
  color: var(--ink);
  background:
    radial-gradient(120% 80% at 12% -10%, color-mix(in oklab, var(--accent) 9%, transparent), transparent 62%),
    linear-gradient(var(--paper), var(--paper-deep));
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: var(--grain);
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

body > *:not(.grain) { position: relative; z-index: 1; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: var(--pad);
  top: 1rem;
  padding: .5rem .9rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
}

/* ── Masthead ──────────────────────────────────────────────── */

.masthead {
  max-width: 1520px;
  width: 100%;
  margin: 0 auto;
}

.masthead__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.kicker {
  margin: 0;
  font-size: .69rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.stamp {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: .6rem;
  color: var(--ink-soft);
}
.stamp__time {
  font-family: var(--display);
  font-variation-settings: 'opsz' 60;
  font-weight: 500;
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.stamp__date {
  font-size: .78rem;
  letter-spacing: .01em;
}

.wordmark {
  margin: clamp(.5rem, 1.4vw, 1rem) 0 clamp(.9rem, 2vw, 1.4rem);
  font-family: var(--display);
  font-variation-settings: 'opsz' 144;
  font-weight: 400;
  font-size: clamp(2.3rem, 6.4vw, 4.4rem);
  line-height: .95;
  letter-spacing: -.022em;
  text-wrap: balance;
}
.wordmark em {
  font-style: normal;
  font-weight: 600;
  color: var(--accent);
}

.rules {
  display: grid;
  gap: 3px;
}
.rules i {
  display: block;
  height: 1px;
  background: var(--line);
}
.rules i:last-child { opacity: .45; }

.toolbar {
  display: flex;
  align-items: center;
  gap: .7rem;
  flex-wrap: wrap;
  padding: .85rem 0 clamp(1.4rem, 3vw, 2.4rem);
}

.search {
  position: relative;
  flex: 1 1 15rem;
  min-width: 0;
  display: flex;
  align-items: center;
}
.search__icon {
  position: absolute;
  left: .7rem;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: var(--ink-faint);
  stroke-width: 1.7;
  stroke-linecap: round;
  pointer-events: none;
}
.search input {
  width: 100%;
  font: inherit;
  font-size: .92rem;
  color: var(--ink);
  background: color-mix(in oklab, var(--surface) 70%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .62rem 2.4rem .62rem 2.3rem;
  transition: border-color .18s, background .18s;
}
.search input::placeholder { color: var(--ink-faint); }
.search input:focus {
  outline: none;
  border-color: color-mix(in oklab, var(--accent) 55%, var(--line));
  background: var(--surface);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 14%, transparent);
}
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search__hint {
  position: absolute;
  right: .6rem;
  font-family: var(--sans);
  font-size: .68rem;
  color: var(--ink-faint);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: .05rem .34rem;
  pointer-events: none;
  transition: opacity .15s;
}
.search input:focus ~ .search__hint,
.search input:not(:placeholder-shown) ~ .search__hint { opacity: 0; }

.toolbar__actions {
  display: flex;
  gap: .45rem;
  margin-left: auto;
}

/* ── Knoppen ───────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  font: inherit;
  font-size: .86rem;
  font-weight: 500;
  line-height: 1;
  padding: .62rem .8rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .16s, border-color .16s, color .16s, transform .12s;
}
.btn:active { transform: translateY(1px); }
.btn .icon {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.btn--ghost {
  color: var(--ink-soft);
  border-color: var(--line);
  background: color-mix(in oklab, var(--surface) 55%, transparent);
}
.btn--ghost:hover {
  color: var(--ink);
  background: var(--surface);
  border-color: color-mix(in oklab, var(--ink) 22%, transparent);
}

.btn--solid {
  color: var(--paper);
  background: var(--ink);
  padding-inline: .95rem;
}
:root[data-theme='dark'] .btn--solid { color: var(--paper-deep); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .btn--solid { color: var(--paper-deep); }
}
.btn--solid:hover { background: var(--accent); }

.btn--danger {
  color: var(--c-terracotta);
  border-color: color-mix(in oklab, var(--c-terracotta) 35%, transparent);
  background: transparent;
}
.btn--danger:hover { background: color-mix(in oklab, var(--c-terracotta) 12%, transparent); }
.btn--quiet {
  color: var(--ink-faint);
  border-color: var(--line);
}
.btn--quiet:hover {
  color: var(--c-terracotta);
  background: color-mix(in oklab, var(--c-terracotta) 10%, transparent);
}

.btn--wide {
  width: 100%;
  justify-content: flex-start;
  margin-top: .5rem;
}
.btn--close { padding: .45rem; }

#theme-btn .icon--moon { display: none; }
:root[data-theme='dark'] #theme-btn .icon--sun { display: none; }
:root[data-theme='dark'] #theme-btn .icon--moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) #theme-btn .icon--sun { display: none; }
  :root:not([data-theme='light']) #theme-btn .icon--moon { display: block; }
}

.linkbtn {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--line);
}
.linkbtn:hover { text-decoration-color: currentColor; }

/* ── Board ─────────────────────────────────────────────────── */

.board {
  max-width: 1520px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
}
.board:focus { outline: none; }

.group { margin-bottom: clamp(1.7rem, 3.4vw, 2.9rem); }

.group__head {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin-bottom: .85rem;
}
.group__name {
  margin: 0;
  font-family: var(--sans);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .19em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.group__count {
  font-size: .64rem;
  font-weight: 600;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}
.group__rule {
  flex: 1;
  height: 1px;
  background: var(--line);
}
.group__add {
  font: inherit;
  font-size: .74rem;
  color: var(--ink-faint);
  background: none;
  border: 0;
  padding: .2rem .3rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity .16s, color .16s;
}
.group:hover .group__add,
.group__add:focus-visible { opacity: 1; }
.group__add:hover { color: var(--accent); }

.group__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 232px), 1fr));
  gap: var(--gap);
  min-height: 2rem;
}
.group__grid.is-target {
  outline: 1px dashed color-mix(in oklab, var(--accent) 45%, transparent);
  outline-offset: 7px;
  border-radius: var(--radius);
}

/* ── Tegel ─────────────────────────────────────────────────── */

.tile-wrap {
  position: relative;
  animation: rise .55s cubic-bezier(.2, .7, .3, 1) both;
  animation-delay: calc(var(--i, 0) * 26ms);
}
.tile-wrap.is-dragging { opacity: .35; }

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

.tile {
  --tile-accent: var(--c-slate);
  position: relative;
  display: flex;
  align-items: center;
  gap: .8rem;
  height: 100%;
  padding: .9rem 1rem;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .18s cubic-bezier(.2,.7,.3,1), box-shadow .18s, border-color .18s;
}
.tile::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--tile-accent);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .26s cubic-bezier(.2,.7,.3,1);
}
.tile:hover,
.tile:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
  border-color: color-mix(in oklab, var(--tile-accent) 40%, var(--line));
}
.tile:hover::before,
.tile:focus-visible::before { transform: scaleY(1); }

.tile.is-top {
  border-color: color-mix(in oklab, var(--accent) 60%, var(--line));
  box-shadow: var(--shadow), 0 0 0 3px color-mix(in oklab, var(--accent) 16%, transparent);
}
.tile.is-top::before { transform: scaleY(1); }

.tile__mark {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 3px;
  overflow: hidden;
  background: color-mix(in oklab, var(--tile-accent) 12%, transparent);
  color: var(--tile-accent);
  font-family: var(--display);
  font-variation-settings: 'opsz' 40;
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 1;
}
.tile__mark img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}
.tile__mark.is-emoji { font-family: var(--sans); font-size: 1.35rem; }

.tile__body {
  min-width: 0;
  display: grid;
  gap: .15rem;
}
.tile__name {
  font-family: var(--display);
  font-variation-settings: 'opsz' 24;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.22;
  letter-spacing: -.012em;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  overflow-wrap: break-word;
  hyphens: auto;
}
.tile__host {
  font-size: .7rem;
  letter-spacing: .045em;
  color: var(--ink-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tile__edit {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--ink-faint);
  background: color-mix(in oklab, var(--surface) 88%, transparent);
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: pointer;
  opacity: 0;
  transition: opacity .16s, color .16s, border-color .16s;
}
.tile__edit .icon {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tile-wrap:hover .tile__edit,
.tile__edit:focus-visible { opacity: 1; }
.tile__edit:hover {
  color: var(--ink);
  border-color: var(--line);
}

.group__empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 1.1rem 1rem;
  font-size: .84rem;
  color: var(--ink-faint);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}
.group__empty button { color: var(--accent); }

.empty {
  max-width: 1520px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 0;
  font-family: var(--display);
  font-variation-settings: 'opsz' 40;
  font-size: 1.1rem;
  color: var(--ink-faint);
}

.colophon {
  max-width: 1520px;
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 0 1.6rem;
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  font-size: .74rem;
  color: var(--ink-faint);
  border-top: 1px solid var(--line-soft);
  margin-top: 2rem;
}

/* ── Dialogen ──────────────────────────────────────────────── */

.sheet {
  width: min(38rem, calc(100vw - 2rem));
  padding: 0;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 30px 70px -20px rgb(0 0 0 / 40%);
}
.sheet::backdrop {
  background: rgb(12 14 17 / 46%);
  backdrop-filter: blur(3px);
}
.sheet[open] { animation: sheet-in .24s cubic-bezier(.2,.7,.3,1); }
@keyframes sheet-in {
  from { opacity: 0; transform: translateY(10px) scale(.99); }
}

.sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem .9rem;
  border-bottom: 1px solid var(--line-soft);
}
.sheet__body {
  padding: 1.25rem;
  display: grid;
  gap: 1.05rem;
  max-height: min(70vh, 40rem);
  overflow: auto;
}
.sheet__foot {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .9rem 1.25rem 1.1rem;
  border-top: 1px solid var(--line-soft);
}
.spacer { flex: 1; }

.field { display: grid; gap: .38rem; min-width: 0; align-content: start; }
.field--swatches { border: 0; padding: 0; margin: 0; }
.field label,
.field__label,
.field legend {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 0;
}
.field__note {
  margin: 0;
  font-size: .76rem;
  line-height: 1.45;
  color: var(--ink-faint);
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.05rem;
}

.field input[type='text'],
.field input[type='search'],
.field select {
  font: inherit;
  font-size: .92rem;
  width: 100%;
  color: var(--ink);
  background: color-mix(in oklab, var(--paper) 55%, var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .58rem .7rem;
}
.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 15px) 55%, calc(100% - 10px) 55%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 1.9rem;
}
.field input:focus,
.field select:focus {
  outline: none;
  border-color: color-mix(in oklab, var(--accent) 55%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 14%, transparent);
}
.field input:invalid:not(:placeholder-shown) {
  border-color: color-mix(in oklab, var(--c-terracotta) 55%, var(--line));
}

.icon-input {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.icon-input__preview {
  flex: none;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
  font-size: 1.2rem;
  font-family: var(--display);
  font-weight: 600;
  color: var(--ink-soft);
  overflow: hidden;
}
.icon-input__preview img { width: 24px; height: 24px; object-fit: contain; }

.choices { display: flex; gap: .4rem; flex-wrap: wrap; }
.choice {
  display: flex;
  align-items: center;
  gap: .45rem;
  font: inherit;
  font-size: .78rem;
  color: var(--ink-soft);
  background: color-mix(in oklab, var(--paper) 55%, var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .35rem .55rem .35rem .4rem;
  cursor: pointer;
  transition: border-color .16s, color .16s;
}
.choice:hover { color: var(--ink); border-color: color-mix(in oklab, var(--ink) 25%, transparent); }
.choice[aria-pressed='true'] {
  color: var(--ink);
  border-color: color-mix(in oklab, var(--accent) 60%, var(--line));
  box-shadow: 0 0 0 2px color-mix(in oklab, var(--accent) 14%, transparent);
}
.choice__mark {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 2px;
  overflow: hidden;
  font-family: var(--display);
  font-weight: 600;
  font-size: .85rem;
  color: var(--ink-soft);
  background: color-mix(in oklab, var(--ink) 7%, transparent);
}
.choice__mark img { width: 18px; height: 18px; object-fit: contain; }
.choice__mark.is-emoji { font-family: var(--sans); font-size: 1rem; }

.swatches { display: flex; gap: .45rem; flex-wrap: wrap; }
.swatch {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--sw);
  cursor: pointer;
  transition: transform .14s, box-shadow .14s;
}
.swatch[aria-pressed='true'] {
  transform: scale(1.1);
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--ink);
}
.swatch--auto {
  background: conic-gradient(var(--c-terracotta), var(--c-mustard), var(--c-forest),
                             var(--c-petrol), var(--c-indigo), var(--c-plum), var(--c-terracotta));
}

.check {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-size: .88rem;
  color: var(--ink-soft);
  cursor: pointer;
}
.check input { width: 16px; height: 16px; accent-color: var(--accent); }

.move { display: flex; align-items: center; gap: .4rem; }
.move__note { font-size: .76rem; color: var(--ink-faint); }

.grouplist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .4rem;
}
.grouplist li {
  display: flex;
  align-items: center;
  gap: .4rem;
}
.grouplist input {
  flex: 1;
  font: inherit;
  font-size: .9rem;
  color: var(--ink);
  background: color-mix(in oklab, var(--paper) 55%, var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .48rem .6rem;
}
.grouplist input:focus {
  outline: none;
  border-color: color-mix(in oklab, var(--accent) 55%, var(--line));
}
.grouplist .btn { padding: .45rem; }

.btnrow { display: flex; gap: .45rem; flex-wrap: wrap; margin-top: .2rem; }

/* ── Toast ─────────────────────────────────────────────────── */

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .7rem 1rem;
  font-size: .86rem;
  color: var(--paper);
  background: var(--ink);
  border-radius: var(--radius);
  box-shadow: 0 18px 40px -14px rgb(0 0 0 / 55%);
  animation: toast-in .22s cubic-bezier(.2,.7,.3,1);
}
:root[data-theme='dark'] .toast { color: var(--paper-deep); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .toast { color: var(--paper-deep); }
}
.toast .linkbtn { color: var(--c-mustard); font-weight: 600; text-decoration-color: currentColor; }
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 10px); }
}

/* ── Klein scherm ──────────────────────────────────────────── */

@media (max-width: 640px) {
  .field-row { grid-template-columns: 1fr; }
  .toolbar__actions { margin-left: 0; width: 100%; }
  .toolbar__actions .btn--solid { margin-left: auto; }
  .search { flex-basis: 100%; }
  .tile__edit { opacity: 1; }
  .group__add { opacity: 1; }
}

/* ── Rustige weergave ──────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-delay: 0ms !important;
    transition-duration: .001ms !important;
  }
  .tile:hover { transform: none; }
}

@media print {
  .toolbar, .tile__edit, .colophon, .grain { display: none; }
}
