/* ============================================================
   Board — reminder app for the things that used to live on the fridge
   Type:   Bricolage Grotesque (display) + Plus Jakarta Sans (UI)
   Colour: category-owned. Chrome stays quiet so the colours mean something.
   ============================================================ */

:root {
  color-scheme: light;

  --ground:  #FBF9F5;
  --surface: #FFFFFF;
  --sunk:    #F3F0EA;
  --ink:     #14120F;
  --muted:   #6E675E;
  --faint:   #A9A196;
  --line:    #E9E4DA;
  --line-2:  #D8D2C6;

  --amber:  #F59E0B;  --amber-t:  #FDF0D6;
  --coral:  #F0563E;  --coral-t:  #FCE3DD;
  --rose:   #E5457F;  --rose-t:   #FBDFEA;
  --violet: #7C5CFF;  --violet-t: #E9E4FF;
  --sky:    #0EA5E9;  --sky-t:    #DAEFFC;
  --teal:   #0FB5A6;  --teal-t:   #D6F4F0;
  --lime:   #5CA80F;  --lime-t:   #E6F4D4;
  --slate:  #64748B;  --slate-t:  #E7EAEF;

  --danger:  #DC2626; --danger-t:  #FCE4E4;
  --warn:    #D97706; --warn-t:    #FCEEDA;
  --good:    #16A34A; --good-t:    #DFF3E4;

  --shadow-1: 0 1px 2px rgba(20,18,15,.05), 0 1px 3px rgba(20,18,15,.04);
  --shadow-2: 0 4px 12px rgba(20,18,15,.07), 0 2px 4px rgba(20,18,15,.04);
  --shadow-3: 0 24px 60px rgba(20,18,15,.16), 0 4px 12px rgba(20,18,15,.08);

  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 22px;

  --display: "Bricolage Grotesque", "Trebuchet MS", system-ui, sans-serif;
  --ui: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ground:  #14141A;
    --surface: #1C1C24;
    --sunk:    #23232C;
    --ink:     #F1EFEA;
    --muted:   #A19C94;
    --faint:   #6E6A64;
    --line:    #2C2C36;
    --line-2:  #3A3A46;

    --amber-t:  #3A2E12; --coral-t: #3B211C; --rose-t:  #3A1B29;
    --violet-t: #262052; --sky-t:   #102E3F; --teal-t:  #0D3330;
    --lime-t:   #23300F; --slate-t: #262B33;
    --danger-t: #3B1B1B; --warn-t:  #38270F; --good-t:  #143020;

    --shadow-1: 0 1px 2px rgba(0,0,0,.4);
    --shadow-2: 0 4px 14px rgba(0,0,0,.45);
    --shadow-3: 0 24px 60px rgba(0,0,0,.6);
  }
}

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

/* `hidden` must beat every display rule below it — sheets are display:flex. */
[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* The one flourish: every category colour, hairline thin, across the top. */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: 4px;
  z-index: 60;
  background: linear-gradient(90deg,
    var(--amber) 0 12.5%, var(--coral) 12.5% 25%, var(--rose) 25% 37.5%,
    var(--violet) 37.5% 50%, var(--sky) 50% 62.5%, var(--teal) 62.5% 75%,
    var(--lime) 75% 87.5%, var(--slate) 87.5% 100%);
}

.wrap { width: 100%; max-width: 780px; margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.grow { flex: 1; }

/* ---------------- buttons & fields ---------------- */

.btn {
  display: inline-flex; align-items: center; gap: 7px; justify-content: center;
  border: 1px solid transparent; border-radius: var(--r-md);
  padding: 10px 16px; font: 600 14px/1 var(--ui); letter-spacing: -.005em;
  cursor: pointer; background: none; color: inherit;
  transition: background .16s ease, border-color .16s ease, transform .08s ease, opacity .16s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: var(--ground); }
.btn-primary:hover { opacity: .88; }
.btn-ghost { border-color: var(--line-2); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { background: var(--sunk); }
.btn-danger-ghost { color: var(--danger); border-color: transparent; }
.btn-danger-ghost:hover { background: var(--danger-t); }
.btn-block { width: 100%; padding: 13px; font-size: 15px; }

:where(button, input, select, textarea, a):focus-visible {
  outline: 2px solid var(--violet); outline-offset: 2px; border-radius: var(--r-sm);
}

.field { display: block; margin-bottom: 18px; }
.field > span {
  display: block; margin-bottom: 7px;
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
.field > span em { font-style: normal; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--faint); }

input[type=text], input[type=email], input[type=tel], input[type=password], textarea, select {
  width: 100%; padding: 11px 13px;
  border: 1px solid var(--line-2); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink);
  font: 400 15px/1.45 var(--ui);
}
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--faint); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 36px; }

.hint { margin: 8px 0 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.hint code { font-size: 12px; background: var(--sunk); padding: 3px 6px; border-radius: 5px; word-break: break-all; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 560px) { .two { grid-template-columns: 1fr; } }

/* ---------------- gate (login / setup) ---------------- */

.gate { min-height: 100svh; display: grid; place-items: center; padding: 24px; }
.gate-card {
  width: 100%; max-width: 420px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-xl);
  padding: 34px 30px; box-shadow: var(--shadow-2);
}
.gate-mark { display: flex; flex-direction: column; gap: 5px; width: 34px; margin-bottom: 22px; }
.gate-mark i { height: 5px; border-radius: 3px; display: block; }
.gate-mark i:nth-child(1) { background: var(--amber); width: 100%; }
.gate-mark i:nth-child(2) { background: var(--teal);  width: 100%; }
.gate-mark i:nth-child(3) { background: var(--violet); width: 62%; }
.gate h1 { margin: 0 0 8px; font-family: var(--display); font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.gate-sub { margin: 0 0 26px; color: var(--muted); font-size: 14.5px; }
.gate-err { margin: -6px 0 14px; color: var(--danger); font-size: 13.5px; font-weight: 600; }

/* ---------------- top bar ---------------- */

.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--ground) 86%, transparent);
  backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 12px; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.brand-mark { display: flex; flex-direction: column; gap: 3px; width: 18px; }
.brand-mark i { height: 3px; border-radius: 2px; display: block; }
.brand-mark i:nth-child(1) { background: var(--amber); }
.brand-mark i:nth-child(2) { background: var(--teal); }
.brand-mark i:nth-child(3) { background: var(--violet); width: 62%; }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: -.02em; }
.topbar-actions { display: flex; gap: 8px; }
.topbar-actions .btn { padding: 9px 12px; }

.board-pick select {
  width: auto; max-width: 190px; padding: 9px 34px 9px 12px;
  font: 600 13.5px/1 var(--ui); border-radius: var(--r-md); border-color: var(--line-2);
}

/* ---------------- archive header / read-only ---------------- */

.viewbar {
  display: flex; align-items: center; gap: 16px; margin-bottom: 22px;
  padding: 16px 18px; border-radius: var(--r-lg);
  background: var(--slate-t); border: 1px solid var(--line);
}
.viewbar h2 { margin: 0; font-family: var(--display); font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.viewbar p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.viewbar .btn { margin-left: auto; }

.readonly-note {
  display: flex; align-items: center; gap: 10px; margin-bottom: 18px;
  padding: 12px 16px; border-radius: var(--r-lg);
  background: var(--violet-t); color: var(--violet);
  font-size: 13.5px; font-weight: 600;
}

.admin-only[hidden] { display: none !important; }

.cat-name {
  font: 600 14.5px/1.3 var(--ui); border: 1px solid transparent; background: none;
  padding: 4px 7px; border-radius: 7px; width: 100%; color: var(--ink);
}
.cat-name:hover { border-color: var(--line-2); }
.cat-name:focus { border-color: var(--violet); background: var(--surface); outline: none; }

/* ---------------- pulse (summary tiles) ---------------- */

.app { padding-top: 24px; padding-bottom: 80px; }

.pulse { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 22px; }
.tile {
  border-radius: var(--r-lg); padding: 14px 16px; border: 1px solid transparent;
  display: flex; flex-direction: column; gap: 2px; text-align: left;
  font: inherit; cursor: pointer;
  transition: transform .1s ease, box-shadow .16s ease;
}
.tile:hover { transform: translateY(-1px); box-shadow: var(--shadow-1); }
.tile b { font-family: var(--display); font-size: 30px; font-weight: 700; line-height: 1.05; font-variant-numeric: tabular-nums; }
.tile span { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; opacity: .8; }
.tile[data-tone=danger] { background: var(--danger-t); color: var(--danger); }
.tile[data-tone=warn]   { background: var(--warn-t);   color: var(--warn); }
.tile[data-tone=calm]   { background: var(--teal-t);   color: var(--teal); }
.tile.on { outline: 2px solid currentColor; outline-offset: -2px; }
@media (prefers-color-scheme: dark) {
  .tile[data-tone=danger] { color: #FCA5A5; }
  .tile[data-tone=warn]   { color: #FCD34D; }
  .tile[data-tone=calm]   { color: #5EEAD4; }
}

/* ---------------- toolbar / filters ---------------- */

.toolbar { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.chips { display: flex; gap: 7px; flex-wrap: wrap; flex: 1; min-width: 0; }
.chip {
  border: 1px solid var(--line-2); background: var(--surface); color: var(--muted);
  border-radius: 999px; padding: 6px 13px; font: 600 13px/1.35 var(--ui); cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  transition: background .14s ease, color .14s ease, border-color .14s ease;
}
.chip:hover { border-color: var(--faint); }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.chip.on { color: var(--ink); border-color: currentColor; background: var(--sunk); }
.chip[data-color].on { background: var(--tint); border-color: var(--hue); color: var(--hue); }
.chip .n { font-variant-numeric: tabular-nums; opacity: .6; }

.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.switch input { width: 34px; height: 20px; appearance: none; background: var(--line-2); border-radius: 999px; position: relative; cursor: pointer; transition: background .16s ease; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .16s ease; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.switch input:checked { background: var(--teal); }
.switch input:checked::after { transform: translateX(14px); }

/* ---------------- add row ---------------- */

.add-row {
  width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 15px 18px; margin-bottom: 12px;
  border: 1.5px dashed var(--line-2); border-radius: var(--r-lg);
  background: none; color: var(--muted); font: 600 15px/1 var(--ui); cursor: pointer;
  transition: border-color .16s ease, color .16s ease, background .16s ease;
}
.add-row:hover { border-color: var(--violet); color: var(--violet); background: var(--violet-t); }
.add-plus { font-size: 20px; line-height: 1; font-weight: 500; }

/* ---------------- item list ---------------- */

.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }

.item {
  --hue: var(--slate); --tint: var(--slate-t);
  position: relative; display: flex; align-items: flex-start; gap: 12px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 14px 15px 14px 18px;
  box-shadow: var(--shadow-1);
  touch-action: pan-y;
}
.item::before {
  content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px;
  border-radius: 0 4px 4px 0; background: var(--hue);
}
.item.dragging { box-shadow: var(--shadow-3); z-index: 5; position: relative; opacity: .97; }
.item.placeholder { opacity: .35; }
.item.is-done { opacity: .55; }
.item.is-done .item-title { text-decoration: line-through; text-decoration-color: var(--faint); }

.handle {
  flex: none; width: 22px; height: 26px; margin: -2px -4px 0 -6px;
  display: grid; place-items: center; cursor: grab; color: var(--faint);
  background: none; border: 0; border-radius: 6px; touch-action: none;
}
.handle:hover { color: var(--muted); background: var(--sunk); }
.handle:active { cursor: grabbing; }

.tick {
  flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%;
  border: 2px solid var(--line-2); background: none; cursor: pointer;
  display: grid; place-items: center; color: transparent;
  transition: border-color .14s ease, background .14s ease, color .14s ease;
}
.tick:hover { border-color: var(--good); }
.tick.on { background: var(--good); border-color: var(--good); color: #fff; }

.item-main { flex: 1; min-width: 0; }
.item-title { font-weight: 600; font-size: 15.5px; letter-spacing: -.01em; word-wrap: break-word; }
.item-notes { margin: 3px 0 0; font-size: 13.5px; color: var(--muted); }
.item-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }

.tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: -.005em;
  background: var(--tint); color: var(--hue);
}
.tag-plain { background: var(--sunk); color: var(--muted); font-weight: 600; }
.tag-danger { background: var(--danger-t); color: var(--danger); }
.tag-warn { background: var(--warn-t); color: var(--warn); }
.tag svg { flex: none; }
@media (prefers-color-scheme: dark) {
  .tag-danger { color: #FCA5A5; } .tag-warn { color: #FCD34D; }
}

.item-edit {
  flex: none; background: none; border: 0; color: var(--faint); cursor: pointer;
  border-radius: 8px; width: 30px; height: 30px; display: grid; place-items: center;
}
.item-edit:hover { color: var(--ink); background: var(--sunk); }

.empty { text-align: center; color: var(--muted); padding: 48px 20px; font-size: 15px; }

/* ---------------- sheets (modals) ---------------- */

.sheet-backdrop { position: fixed; inset: 0; background: rgba(20,18,15,.42); z-index: 90; animation: fade .18s ease; }
@keyframes fade { from { opacity: 0 } }

.sheet {
  position: fixed; z-index: 100; background: var(--surface);
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(560px, calc(100vw - 32px)); max-height: min(88vh, 900px);
  display: flex; flex-direction: column;
  border-radius: var(--r-xl); border: 1px solid var(--line);
  box-shadow: var(--shadow-3); animation: pop .2s cubic-bezier(.2,.8,.3,1);
}
.sheet-wide { width: min(680px, calc(100vw - 32px)); }
@keyframes pop { from { opacity: 0; transform: translate(-50%, calc(-50% + 12px)) scale(.98); } }

@media (max-width: 560px) {
  .sheet { top: auto; bottom: 0; transform: none; width: 100%; max-height: 92svh;
           border-radius: var(--r-xl) var(--r-xl) 0 0; animation: slideup .22s cubic-bezier(.2,.8,.3,1); }
  @keyframes slideup { from { transform: translateY(20px); opacity: 0; } }
}

.sheet-head { display: flex; align-items: center; gap: 12px; padding: 20px 22px 14px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { margin: 0; font-family: var(--display); font-size: 20px; font-weight: 700; letter-spacing: -.02em; flex: 1; }
.icon-btn { background: none; border: 0; font-size: 26px; line-height: 1; color: var(--faint); cursor: pointer; width: 32px; height: 32px; border-radius: 8px; }
.icon-btn:hover { color: var(--ink); background: var(--sunk); }
.sheet-body { padding: 20px 22px; overflow-y: auto; flex: 1; }
.sheet-foot { display: flex; align-items: center; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--sunk); border-radius: 0 0 var(--r-xl) var(--r-xl); }
@media (max-width: 560px) { .sheet-foot { border-radius: 0; padding-bottom: max(14px, env(safe-area-inset-bottom)); } }

/* ---------------- segmented control ---------------- */

.seg { display: flex; gap: 5px; flex-wrap: wrap; }
.seg button {
  flex: 1 1 auto; min-width: fit-content;
  padding: 9px 12px; border: 1px solid var(--line-2); background: var(--surface);
  border-radius: var(--r-md); font: 600 13px/1.2 var(--ui); color: var(--muted); cursor: pointer;
  transition: all .14s ease;
}
.seg button:hover { border-color: var(--faint); }
.seg button.on { background: var(--ink); border-color: var(--ink); color: var(--ground); }

/* ---------------- category picker ---------------- */

.cat-picker { display: flex; gap: 7px; flex-wrap: wrap; }
.cat-opt {
  padding: 7px 13px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--line-2); background: var(--surface);
  font: 700 13px/1.3 var(--ui); color: var(--muted);
  display: inline-flex; align-items: center; gap: 7px;
}
.cat-opt .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--hue); flex: none; }
.cat-opt.on { background: var(--tint); border-color: var(--hue); color: var(--hue); }

/* ---------------- people pickers ---------------- */

.people { display: flex; gap: 7px; flex-wrap: wrap; }
.person {
  padding: 7px 12px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--line-2); background: var(--surface);
  font: 600 13px/1.3 var(--ui); color: var(--muted);
  display: inline-flex; align-items: center; gap: 7px;
}
.person .av {
  width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  font-size: 10px; font-weight: 800; color: #fff; flex: none;
}
.person.on { border-color: var(--ink); color: var(--ink); background: var(--sunk); }
.person:disabled { opacity: .45; cursor: not-allowed; }

/* ---------------- calendar ---------------- */

.date-field { display: flex; align-items: center; gap: 8px; }
.date-trigger {
  flex: 1; display: flex; align-items: center; gap: 10px;
  padding: 11px 13px; border: 1px solid var(--line-2); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink); font: 500 15px/1.3 var(--ui); cursor: pointer; text-align: left;
}
.date-trigger:hover { border-color: var(--faint); }
.date-trigger svg { color: var(--violet); flex: none; }
.date-clear { border: 1px solid var(--line-2); background: var(--surface); color: var(--muted); border-radius: var(--r-md); width: 40px; height: 42px; font-size: 20px; cursor: pointer; }
.date-clear:hover { color: var(--danger); border-color: var(--danger); }

.cal { margin-top: 10px; border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 14px; background: var(--surface); box-shadow: var(--shadow-1); }
.cal-quick { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.cal-quick button { border: 1px solid var(--line-2); background: var(--sunk); border-radius: 999px; padding: 5px 11px; font: 600 12.5px/1.3 var(--ui); color: var(--muted); cursor: pointer; }
.cal-quick button:hover { color: var(--violet); border-color: var(--violet); background: var(--violet-t); }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-head strong { font-family: var(--display); font-size: 15.5px; font-weight: 700; letter-spacing: -.01em; }
.cal-nav { display: flex; gap: 4px; }
.cal-nav button { width: 30px; height: 30px; border: 1px solid var(--line-2); background: var(--surface); border-radius: 8px; cursor: pointer; color: var(--muted); font-size: 15px; line-height: 1; }
.cal-nav button:hover { color: var(--ink); background: var(--sunk); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-dow { text-align: center; font-size: 11px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; padding-bottom: 6px; }
.cal-day {
  height: 38px; border: 0; background: none; border-radius: 9px; cursor: pointer;
  font: 500 13.5px/1 var(--ui); color: var(--ink); font-variant-numeric: tabular-nums;
  display: grid; place-items: center;
}
.cal-day:hover { background: var(--sunk); }
.cal-day.muted { color: var(--faint); }
.cal-day.today { box-shadow: inset 0 0 0 1.5px var(--line-2); font-weight: 700; }
.cal-day.sel { background: var(--violet); color: #fff; font-weight: 700; }

/* ---------------- settings extras ---------------- */

.tabs { display: flex; gap: 4px; margin-bottom: 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tabs button { border: 0; background: none; padding: 9px 12px; font: 600 13.5px/1 var(--ui); color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--violet); }

.rows { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; }
.row {
  display: flex; align-items: center; gap: 11px; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface);
}
.row .av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; flex: none; }
.row .who { flex: 1; min-width: 0; }
.row .who b { display: block; font-size: 14.5px; font-weight: 600; }
.row .who small { color: var(--muted); font-size: 12.5px; }
.row .del { border: 0; background: none; color: var(--faint); cursor: pointer; font-size: 19px; width: 30px; height: 30px; border-radius: 7px; }
.row .del:hover { color: var(--danger); background: var(--danger-t); }

.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-form input { flex: 1 1 150px; width: auto; }
.swatches { display: flex; gap: 5px; flex-wrap: wrap; }
.swatches button { width: 24px; height: 24px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.swatches button.on { border-color: var(--ink); }

.disclose { border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; margin-bottom: 18px; background: var(--surface); }
.disclose summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.disclose summary em { font-style: normal; color: var(--faint); font-weight: 500; font-size: 12.5px; }
.disclose > *:not(summary) { margin-top: 12px; }

.test-row { display: flex; gap: 8px; align-items: center; }
.test-row input { flex: 1; }

/* ---------------- toast ---------------- */

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  background: var(--ink); color: var(--ground);
  padding: 11px 18px; border-radius: 999px; font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow-3); z-index: 200; animation: pop .18s ease;
  max-width: calc(100vw - 32px);
}
.toast[data-tone=bad] { background: var(--danger); color: #fff; }

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