
  .drop.svelte-1izdw47 {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 32px 16px;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    text-align: center;
    color: var(--text-muted);
  }

  .drop.dragging.svelte-1izdw47 {
    border-color: var(--accent);
    background: var(--accent-soft);
  }

  .drop.svelte-1izdw47 p:where(.svelte-1izdw47) strong:where(.svelte-1izdw47) {
    color: var(--text);
  }

  .group.svelte-28zid4 {
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    padding: 10px 12px;
  }

  .pill.svelte-28zid4 {
    display: inline-block;
    margin-left: 6px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.75rem;
  }

  .rows.svelte-28zid4 {
    display: grid;
    gap: 10px;
    margin-top: 10px;
  }

  .field.svelte-28zid4 {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 6px 10px;
    align-items: center;
  }

  .name.svelte-28zid4 {
    font-size: 0.9rem;
    color: var(--text);
  }

  .field.active.svelte-28zid4 .name:where(.svelte-28zid4) {
    font-weight: 700;
  }

  .extras.svelte-28zid4 {
    grid-column: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .extras.svelte-28zid4 .constant:where(.svelte-28zid4) {
    grid-column: 1 / -1;
  }

  .example.svelte-28zid4 {
    grid-column: 2;
    overflow-wrap: anywhere;
  }

  .example.svelte-28zid4 span:where(.svelte-28zid4) {
    color: var(--text);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  }

  @media (max-width: 560px) {
    .field.svelte-28zid4 {
      grid-template-columns: 1fr;
    }

    .extras.svelte-28zid4,
    .example.svelte-28zid4 {
      grid-column: 1;
    }
  }

  .filter.svelte-19fqf1z {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    gap: 10px;
  }

  .top.svelte-19fqf1z {
    justify-content: space-between;
  }

  .inline.svelte-19fqf1z {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    flex: 1 1 220px;
  }

  .modes.svelte-19fqf1z {
    display: flex;
    gap: 14px;
  }

  .modes.svelte-19fqf1z label:where(.svelte-19fqf1z) {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text);
    font-size: 0.9rem;
  }

  .search.svelte-19fqf1z {
    flex: 1 1 200px;
    width: auto;
  }

  .values.svelte-19fqf1z {
    list-style: none;
    margin: 0;
    padding: 4px;
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
  }

  .values.svelte-19fqf1z label:where(.svelte-19fqf1z) {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 6px;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 400;
    cursor: pointer;
  }

  .values.svelte-19fqf1z label:where(.svelte-19fqf1z):hover {
    background: var(--surface-muted);
  }

  .values.svelte-19fqf1z span:where(.svelte-19fqf1z):first-of-type {
    flex: 1;
    overflow-wrap: anywhere;
  }

  .empty.svelte-19fqf1z {
    font-style: italic;
    color: var(--text-muted);
  }

  .count.svelte-19fqf1z {
    font-variant-numeric: tabular-nums;
    font-size: 0.8rem;
  }

  code.svelte-19fqf1z {
    padding: 0 4px;
    border-radius: 4px;
    background: var(--surface-muted);
  }

  .head.svelte-snyhz5 {
    justify-content: space-between;
  }

  .options.svelte-snyhz5 {
    gap: 16px;
  }

  .inline.svelte-snyhz5 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
  }

  .inline.svelte-snyhz5 select:where(.svelte-snyhz5) {
    width: auto;
  }

  .check.svelte-snyhz5 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-size: 0.9rem;
  }

  .preview-wrap.svelte-snyhz5 {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
  }

  table.svelte-snyhz5 {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
  }

  th.svelte-snyhz5,
  td.svelte-snyhz5 {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
  }

  th.svelte-snyhz5 {
    background: var(--surface-muted);
    font-weight: 600;
  }

  tr.svelte-snyhz5:last-child td:where(.svelte-snyhz5) {
    border-bottom: none;
  }

  details.notice.svelte-snyhz5 summary:where(.svelte-snyhz5) {
    font-weight: 600;
  }

  .toast-region.svelte-1neliqw {
    position: fixed;
    left: 50%;
    bottom: calc(76px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    z-index: 30;
    width: min(520px, calc(100% - 24px));
    pointer-events: none;
  }

  .toast.svelte-1neliqw {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 8px 8px 14px;
    border-radius: var(--radius);
    background: var(--text);
    color: var(--bg);
    box-shadow: 0 6px 24px rgb(0 0 0 / 20%);
    pointer-events: auto;
  }

  .toast.svelte-1neliqw span:where(.svelte-1neliqw) {
    flex: 1;
  }

  .toast.svelte-1neliqw .icon-btn:where(.svelte-1neliqw) {
    color: inherit;
  }

  /* The toast inverts the page colours; its action button must not inherit that text colour. */
  .toast.svelte-1neliqw .btn:where(.svelte-1neliqw) {
    color: var(--text);
  }

  .toast-error.svelte-1neliqw {
    background: var(--danger);
    color: #fff;
  }

  /* While a notification is shown, keep focused elements clear of it (WCAG 2.4.11):
     scroll padding = its offset from the bottom + its height. */
  html:has(.toast-region .toast) {
    scroll-padding-bottom: calc(160px + env(safe-area-inset-bottom));
  }

  /* …and give the last element of the page (the footer link) room to scroll above it. */
  body:has(.toast-region .toast) .app-footer {
    padding-bottom: calc(170px + env(safe-area-inset-bottom));
  }

  @media (min-width: 960px) {
    .toast-region.svelte-1neliqw {
      bottom: 24px;
    }

    html:has(.toast-region .toast) {
      scroll-padding-bottom: 110px;
    }

    body:has(.toast-region .toast) .app-footer {
      padding-bottom: 110px;
    }
  }

  li.svelte-1reb12v {
    display: flex;
    align-items: center;
    gap: 4px;
    border-radius: var(--radius-small);
    border: 1px solid transparent;
  }

  li.svelte-1reb12v:hover {
    background: var(--surface-muted);
  }

  li.editing.svelte-1reb12v {
    border-color: var(--accent);
    background: var(--accent-soft);
  }

  .main.svelte-1reb12v {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
  }

  .avatar.svelte-1reb12v {
    flex: none;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 700;
    font-size: 0.85rem;
  }

  .avatar.svelte-1reb12v img:where(.svelte-1reb12v) {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .text.svelte-1reb12v {
    min-width: 0;
    flex: 1;
    display: grid;
  }

  .name.svelte-1reb12v,
  .sub.svelte-1reb12v {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .name.svelte-1reb12v {
    font-weight: 600;
  }

  .dup.svelte-1reb12v {
    flex: none;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--warning-soft);
    color: var(--warning);
    font-size: 0.72rem;
    font-weight: 700;
  }

  .warn.svelte-1reb12v {
    color: var(--warning);
    display: inline-flex;
  }

  .actions.svelte-1reb12v {
    display: flex;
    flex: none;
  }

  .actions.svelte-1reb12v .danger:where(.svelte-1reb12v):hover {
    color: var(--danger);
  }

  /* Narrow screens: reordering is rarely needed on a phone; keep room for the name. */
  @media (max-width: 480px) {
    .actions.svelte-1reb12v .move:where(.svelte-1reb12v) {
      display: none;
    }
  }

  dialog.svelte-1a5ukrg {
    width: min(420px, calc(100% - 24px));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    padding: var(--space);
  }

  dialog.svelte-1a5ukrg::backdrop {
    background: rgb(0 0 0 / 45%);
  }

  .head.svelte-1a5ukrg {
    justify-content: space-between;
    flex-wrap: nowrap;
  }

  .qr.svelte-1a5ukrg {
    background: #fff;
    padding: 8px;
    border-radius: var(--radius-small);
  }

  .qr.svelte-1a5ukrg svg {
    display: block;
    width: 100%;
    height: auto;
  }

  .head.svelte-1lthy4j {
    justify-content: space-between;
  }

  .count.svelte-1lthy4j {
    display: inline-grid;
    place-items: center;
    min-width: 26px;
    height: 22px;
    margin-left: 6px;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.8rem;
    vertical-align: 2px;
  }

  .empty.svelte-1lthy4j {
    padding: 12px 0;
  }

  .dup-banner.svelte-1lthy4j {
    justify-content: space-between;
  }

  ul.svelte-1lthy4j {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 4px;
  }

  .list.svelte-1lthy4j {
    max-height: min(60vh, 560px);
    overflow-y: auto;
  }

  .group.svelte-1lthy4j {
    display: grid;
    gap: 6px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
  }

  .group-head.svelte-1lthy4j {
    justify-content: space-between;
  }

  .nomatch.svelte-1lthy4j {
    padding: 8px;
  }

  .optional.svelte-rwkeis {
    font-weight: 400;
  }

  .grow.svelte-rwkeis {
    flex: 1 1 180px;
  }

  a.svelte-rwkeis {
    color: var(--accent);
  }

  .help.svelte-rwkeis {
    margin: 8px 0 0;
    padding-left: 18px;
    display: grid;
    gap: 6px;
  }

  .settings.svelte-rwkeis {
    margin-top: 12px;
  }

  .check.svelte-rwkeis {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--text);
    font-size: 0.9rem;
  }

  .check.svelte-rwkeis input:where(.svelte-rwkeis) {
    margin-top: 3px;
  }

  .block.svelte-rwkeis {
    display: block;
    font-weight: 400;
  }

  .address.svelte-1e5vyk7 {
    padding: 12px;
    border: 1px dashed var(--border);
    border-radius: var(--radius-small);
  }

  .between.svelte-1e5vyk7 {
    justify-content: space-between;
    flex-wrap: nowrap;
  }

  .between.svelte-1e5vyk7 select:where(.svelte-1e5vyk7) {
    max-width: 160px;
  }

  fieldset.svelte-di3lp9 {
    border: none;
    margin: 0;
    padding: 0;
    gap: 8px;
  }

  legend.svelte-di3lp9 {
    font-weight: 600;
    margin-bottom: 8px;
    padding: 0;
  }

  .entry.svelte-di3lp9 {
    display: grid;
    grid-template-columns: minmax(96px, 120px) 1fr 36px;
    gap: 8px;
    align-items: center;
  }

  .preview.svelte-h1j2cj {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--surface-muted);
    color: var(--text-muted);
  }

  .preview.svelte-h1j2cj img:where(.svelte-h1j2cj) {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  form.svelte-1fn6oxh {
    scroll-margin-top: 12px;
  }

  .header.svelte-1fn6oxh {
    justify-content: space-between;
  }

  .badge.svelte-1fn6oxh {
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
  }

  .inner.svelte-1fn6oxh {
    margin-top: 12px;
  }

  .link.svelte-1fn6oxh {
    padding: 0;
    border: none;
    background: none;
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
  }

  .actions.svelte-1fn6oxh .hint:where(.svelte-1fn6oxh) {
    flex-basis: 100%;
  }

  .layout.svelte-1n46o8q {
    display: grid;
    gap: 16px;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 12px 16px;
  }

  .work.svelte-1n46o8q,
  .side.svelte-1n46o8q {
    display: grid;
    gap: 12px;
    align-content: start;
    min-width: 0;
  }

  .tabs.svelte-1n46o8q {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 4px;
    border-radius: var(--radius);
    background: var(--surface-muted);
    border: 1px solid var(--border);
  }

  .tabs.svelte-1n46o8q button:where(.svelte-1n46o8q) {
    min-height: 44px;
    border: none;
    border-radius: var(--radius-small);
    background: transparent;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
  }

  .tabs.svelte-1n46o8q button.active:where(.svelte-1n46o8q) {
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow);
  }

  .mobile-bar.svelte-1n46o8q {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: var(--surface);
    border-top: 1px solid var(--border);
  }

  @media (min-width: 960px) {
    .layout.svelte-1n46o8q {
      grid-template-columns: minmax(0, 1.35fr) minmax(340px, 1fr);
      padding: 0 16px 24px;
    }

    .side.svelte-1n46o8q {
      position: sticky;
      top: 16px;
      max-height: calc(100dvh - 32px);
      overflow-y: auto;
    }

    .mobile-bar.svelte-1n46o8q {
      display: none;
    }
  }
/*
 * Global styles: design tokens (light + dark), base elements, shared utility classes, and the
 * static page header of src/index.html.
 * Used by: src/main.ts (imported once; Vite emits it as app.css, loaded after base.css).
 * Uses:    src/base.css (shared static-web-app styles: dialogs, header actions, skip link,
 *          .visually-hidden). Tokens defined here override base.css where both define them.
 * Component-specific rules live in each .svelte file.
 */

:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-muted: #f0f2f5;
  --border: #dde1e7;
  --text: #1b1f27;
  --text-muted: #5d6573;
  --accent: #2f5bd3;
  --accent-strong: #2449ad;
  --accent-soft: #e7edfc;
  --danger: #c23a3a;
  --danger-soft: #fbeaea;
  --warning: #9a6200;
  --warning-soft: #fff4dc;
  --success: #1f7a4d;
  --success-soft: #e3f4ea;
  --radius: 10px;
  --radius-small: 6px;
  --shadow: 0 1px 2px rgb(16 24 40 / 6%), 0 1px 3px rgb(16 24 40 / 8%);
  --space: 16px;
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  color-scheme: light;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111318;
    --surface: #1a1d24;
    --surface-muted: #22262f;
    --border: #323744;
    --text: #e8eaef;
    --text-muted: #9aa2b1;
    --accent: #7d9cf5;
    --accent-strong: #a3b9f8;
    --accent-soft: #232c45;
    --danger: #f08080;
    --danger-soft: #3a2224;
    --warning: #f1c26b;
    --warning-soft: #3a3020;
    --success: #7fd3a6;
    --success-soft: #1e3329;
    --shadow: none;
    color-scheme: dark;
  }
}

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

body {
  margin: 0;
  min-height: 100dvh;
  /* base.css sets its own body font; keep the app's (set on :root above). */
  font: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.25;
}

h2 {
  font-size: 1.1rem;
}

h3 {
  font-size: 0.95rem;
}

p {
  margin: 0;
}

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

/* 16px minimum on inputs: iOS Safari zooms into any focused field smaller than that. */
input,
select,
textarea {
  font-size: max(16px, 1rem);
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: var(--surface);
  min-height: 42px;
}

input[type='checkbox'],
input[type='radio'] {
  width: auto;
  min-height: 0;
  accent-color: var(--accent);
}

textarea {
  resize: vertical;
  min-height: 80px;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* Chrome moves focus into a date field's day/month/year parts, so :focus-visible never
   matches the input itself; :focus-within does (focus is inside its shadow tree). */
input[type='date']:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

label {
  display: grid;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: var(--surface);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}

.btn:hover:not(:disabled) {
  background: var(--surface-muted);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

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

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

@media (prefers-color-scheme: dark) {
  .btn-primary {
    color: #0e1424;
  }
}

.btn-ghost {
  border-color: transparent;
  background: transparent;
}

.btn-danger {
  color: var(--danger);
}

.btn-small {
  min-height: 34px;
  padding: 4px 10px;
  font-size: 0.85rem;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: var(--radius-small);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.icon-btn:hover:not(:disabled) {
  background: var(--surface-muted);
  color: var(--text);
}

.icon-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ---------- Surfaces & helpers ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--space);
}

.muted {
  color: var(--text-muted);
}

.small {
  font-size: 0.85rem;
}

.stack {
  display: grid;
  gap: 12px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.notice {
  padding: 10px 12px;
  border-radius: var(--radius-small);
  font-size: 0.9rem;
}

.notice-error {
  background: var(--danger-soft);
  color: var(--danger);
}

.notice-warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.notice-info {
  background: var(--accent-soft);
  color: var(--text);
}

.notice ul {
  margin: 4px 0 0;
  padding-left: 18px;
}

details > summary {
  cursor: pointer;
  font-weight: 600;
  list-style-position: inside;
}

/* ---------- Page header (static markup in src/index.html) ---------- */

.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  max-width: 1240px;
  margin: 0 auto;
  padding: calc(14px + env(safe-area-inset-top)) 16px 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top h1 {
  font-size: 1.25rem;
}

.privacy-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success);
  font-size: 0.8rem;
  font-weight: 600;
}

/* ---------- Page footer (static markup in src/index.html; support link added by main.ts) ---------- */

.app-footer {
  display: grid;
  justify-items: center;
  gap: 6px;
  max-width: 1240px;
  margin: 0 auto;
  /* Room for the fixed mobile bar of App.svelte. */
  padding: 8px 16px calc(96px + env(safe-area-inset-bottom));
  text-align: center;
}

@media (min-width: 960px) {
  .app-footer {
    padding-bottom: 24px;
  }
}

/* ---------- Phones: 44×44px tap targets, 44px fields (house rule, measured by swp gate) ---------- */

@media (max-width: 640px) {
  .btn,
  .btn-small {
    min-height: 44px;
  }

  .icon-btn {
    width: 44px;
    height: 44px;
  }

  input,
  select {
    min-height: 44px;
  }

  details > summary {
    min-height: 44px;
    padding-block: 12px;
  }

  /* Only the visible box counts, so the box itself is enlarged (not just its label). */
  input[type='checkbox'],
  input[type='radio'] {
    width: 44px;
    height: 44px;
    flex: none;
  }
}

/* The fixed bottom bar of App.svelte (below 960px) must never hide the focused element. */
@media (max-width: 959px) {
  html {
    scroll-padding-bottom: calc(84px + env(safe-area-inset-bottom));
  }
}
/*$vite$:1*/