/* =========================================================
   Wie betaalt wat

   Design-tokens overgenomen van shadcn/ui (neutral base,
   Tailwind v4 globals.css) en met de hand naar platte CSS
   gezet: OKLCH-neutralen, --radius-schaal, 1px borders,
   shadow-xs/sm en de 3px focus-ring.
   ========================================================= */

:root {
  /* shadcn neutral — light */
  --background: oklch(1 0 0);
  --foreground: oklch(0.145 0 0);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.145 0 0);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.145 0 0);
  --primary: oklch(0.205 0 0);
  --primary-foreground: oklch(0.985 0 0);
  --secondary: oklch(0.97 0 0);
  --secondary-foreground: oklch(0.205 0 0);
  --muted: oklch(0.97 0 0);
  --muted-foreground: oklch(0.556 0 0);
  --accent: oklch(0.97 0 0);
  --accent-foreground: oklch(0.205 0 0);
  --destructive: oklch(0.577 0.245 27.325);
  --success: oklch(0.52 0.13 160);
  --border: oklch(0.922 0 0);
  --input: oklch(0.922 0 0);
  --ring: oklch(0.708 0 0);

  /* Avatartint: laag chroma, zodat kleurcodering niet schreeuwt */
  --avatar-bg-l: 0.955;
  --avatar-bg-c: 0.022;
  --avatar-fg-l: 0.46;
  --avatar-fg-c: 0.06;

  /* shadcn radius-schaal: --radius 0.625rem */
  --radius: 0.625rem;
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);

  --shadow-xs: 0 1px 2px 0 oklch(0 0 0 / 5%);
  --shadow-sm: 0 1px 3px 0 oklch(0 0 0 / 8%), 0 1px 2px -1px oklch(0 0 0 / 8%);
  --shadow-lg: 0 10px 15px -3px oklch(0 0 0 / 10%), 0 4px 6px -4px oklch(0 0 0 / 10%);

  --focus-ring: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);

  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);

  --actionbar-h: 76px;
  --pad: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* shadcn neutral — dark */
    --background: oklch(0.145 0 0);
    --foreground: oklch(0.985 0 0);
    --card: oklch(0.205 0 0);
    --card-foreground: oklch(0.985 0 0);
    --popover: oklch(0.269 0 0);
    --popover-foreground: oklch(0.985 0 0);
    --primary: oklch(0.922 0 0);
    --primary-foreground: oklch(0.205 0 0);
    --secondary: oklch(0.269 0 0);
    --secondary-foreground: oklch(0.985 0 0);
    --muted: oklch(0.269 0 0);
    --muted-foreground: oklch(0.708 0 0);
    --accent: oklch(0.269 0 0);
    --accent-foreground: oklch(0.985 0 0);
    --destructive: oklch(0.704 0.191 22.216);
    --success: oklch(0.75 0.14 162);
    --border: oklch(1 0 0 / 10%);
    --input: oklch(1 0 0 / 15%);
    --ring: oklch(0.556 0 0);

    --avatar-bg-l: 0.31;
    --avatar-bg-c: 0.028;
    --avatar-fg-l: 0.87;
    --avatar-fg-c: 0.05;

    --shadow-xs: 0 1px 2px 0 oklch(0 0 0 / 30%);
    --shadow-sm: 0 1px 3px 0 oklch(0 0 0 / 40%);
    --shadow-lg: 0 10px 15px -3px oklch(0 0 0 / 60%), 0 4px 6px -4px oklch(0 0 0 / 50%);
  }
}

/* ---------------------------------------------------------
   Base
   --------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
  border-color: var(--border);
}

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

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 0.875rem; /* text-sm */
  line-height: 1.43;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

h1, h2, h3, p, ul, fieldset, legend {
  margin: 0;
  padding: 0;
}

ul {
  list-style: none;
}

svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

:focus-visible {
  outline: none;
  border-color: var(--ring);
  box-shadow: var(--focus-ring);
}

/* ---------------------------------------------------------
   Layout
   --------------------------------------------------------- */

.app {
  max-width: 34rem;
  margin-inline: auto;
  min-height: 100dvh;
}

.content {
  display: grid;
  gap: 0.75rem;
  padding: 0.25rem var(--pad) calc(var(--actionbar-h) + var(--safe-b) + 1rem);
}

/* Grid-items krijgen min-width:auto; de intrinsieke breedte van een
   <input> zou de kaart dan breder maken dan het scherm. */
.content > *,
.sheet__body > * {
  min-width: 0;
}

/* ---------------------------------------------------------
   Topbar
   --------------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: calc(var(--safe-t) + 0.875rem) 0.5rem 0.875rem var(--pad);
  background: color-mix(in oklab, var(--background) 85%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}

.topbar--scrolled {
  border-bottom-color: var(--border);
}

.topbar__title {
  flex: 1;
  min-width: 0;
}

.title-input {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: var(--foreground);
  font: inherit;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-overflow: ellipsis;
}

.title-input::placeholder {
  color: var(--muted-foreground);
  font-weight: 600;
}

.title-input:focus,
.title-input:focus-visible {
  outline: none;
  box-shadow: none;
  border-color: transparent;
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 4px;
}

/* ---------------------------------------------------------
   Menu (popover)
   --------------------------------------------------------- */

.menu {
  position: absolute;
  top: calc(100% - 0.25rem);
  right: 0.5rem;
  min-width: 11rem;
  padding: 0.25rem;
  background: var(--popover);
  color: var(--popover-foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: pop-in 0.12s ease-out;
}

.menu[hidden] {
  display: none;
}

.menu__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 2.25rem;
  padding: 0 0.5rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.menu__item svg {
  color: var(--muted-foreground);
}

.menu__item--danger,
.menu__item--danger svg {
  color: var(--destructive);
}

@keyframes pop-in {
  from { opacity: 0; transform: translateY(-4px) scale(0.98); }
}

/* ---------------------------------------------------------
   Card
   --------------------------------------------------------- */

.card {
  padding: 1rem;
  background: var(--card);
  color: var(--card-foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.card[hidden] {
  display: none;
}

.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 1.5rem;
  margin-bottom: 0.25rem;
}

.card__label {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
}

.card__value {
  font-size: 0.875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.card__value[hidden] {
  display: none;
}

/* ---------------------------------------------------------
   Disclosure (details/summary)
   --------------------------------------------------------- */

.disclosure {
  padding-block: 0;
}

.disclosure__summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding-block: 0.5rem;
  cursor: pointer;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}

.disclosure__summary::-webkit-details-marker {
  display: none;
}

.disclosure__summary > .card__label,
.disclosure__summary > .field__label {
  flex: none;
}

.disclosure__value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-size: 0.875rem;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.disclosure__hint {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--muted-foreground);
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chevron {
  color: var(--muted-foreground);
  transition: transform 0.18s ease;
}

.disclosure[open] > .disclosure__summary .chevron {
  transform: rotate(180deg);
}

.disclosure__content {
  padding-bottom: 0.875rem;
  animation: reveal 0.16s ease-out;
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(-2px); }
}

.disclosure--nested {
  border-top: 1px solid var(--border);
}

.disclosure--nested .disclosure__value {
  color: var(--muted-foreground);
}

/* ---------------------------------------------------------
   Personen
   --------------------------------------------------------- */

.people {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 0.5rem;
}

.people:empty {
  display: none;
}

/* Badge met verwijderknop */
.person-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 2.25rem;
  padding: 0 0.25rem 0 0.375rem;
  background: var(--secondary);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--secondary-foreground);
  font-weight: 500;
}

.person-chip__remove {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--muted-foreground);
  cursor: pointer;
}

.person-chip__remove svg {
  width: 0.875rem;
  height: 0.875rem;
}

/* Avatar */

.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 1.625rem;
  height: 1.625rem;
  border-radius: 999px;
  background: oklch(var(--avatar-bg-l) var(--avatar-bg-c) var(--h));
  color: oklch(var(--avatar-fg-l) var(--avatar-fg-c) var(--h));
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  user-select: none;
}

/* ---------------------------------------------------------
   Input
   --------------------------------------------------------- */

.inline-form {
  display: flex;
  gap: 0.5rem;
}

.input {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 2.25rem;
  padding: 0 0.75rem;
  background: transparent;
  border: 1px solid var(--input);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  color: var(--foreground);
  font: inherit;
  font-size: 1rem; /* ≥16px voorkomt auto-zoom op iOS */
}

.input::placeholder {
  color: var(--muted-foreground);
}

.input:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: var(--focus-ring);
}

/* Safari op iOS zoomt automatisch in op een veld met een letter kleiner dan
   16px. Verkleinen mag dus alleen als er helemaal geen aanraakscherm in het
   spel is — een iPad met trackpad meldt zich namelijk ook als `pointer: fine`.
   Snapt een browser deze query niet, dan blijft het 16px: de veilige kant. */
@media (min-width: 768px) and (not (any-pointer: coarse)) {
  .input {
    font-size: 0.875rem;
  }
}

/* ---------------------------------------------------------
   Uitgaven
   --------------------------------------------------------- */

.items:empty {
  display: none;
}

.item + .item {
  border-top: 1px solid var(--border);
}

.item__btn {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: calc(100% + 1rem);
  min-height: 3.25rem;
  padding: 0.5rem;
  margin-inline: -0.5rem;
  border: 0;
  border-radius: var(--radius-md);
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

.item__body {
  flex: 1;
  min-width: 0;
}

.item__desc {
  overflow: hidden;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item__meta {
  overflow: hidden;
  color: var(--muted-foreground);
  font-size: 0.8125rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item__amount {
  flex: none;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.empty {
  padding: 0.5rem 0 0.875rem;
  color: var(--muted-foreground);
}

.empty[hidden] {
  display: none;
}

/* ---------------------------------------------------------
   Uitkomst
   --------------------------------------------------------- */

.settlements {
  display: grid;
}

.settlement {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 3rem;
  padding: 0.5rem 0;
}

.settlement + .settlement {
  border-top: 1px solid var(--border);
}

.settlement__names {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow: hidden;
}

.settlement__name {
  overflow: hidden;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settlement__arrow {
  width: 0.875rem;
  height: 0.875rem;
  color: var(--muted-foreground);
}

.settlement__amount {
  flex: none;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.settled {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0;
  color: var(--muted-foreground);
}

.settled svg {
  color: var(--success);
}

/* Saldo (achter uitklap) */

.balances {
  display: grid;
  gap: 0.75rem;
}

.balance {
  display: grid;
  grid-template-columns: 1.625rem 1fr auto;
  align-items: center;
  gap: 0.25rem 0.625rem;
}

.balance__name {
  min-width: 0;
  overflow: hidden;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.balance__amount {
  font-size: 0.8125rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.balance__amount--pos { color: var(--success); }
.balance__amount--neg { color: var(--destructive); }
.balance__amount--zero { color: var(--muted-foreground); }

/* Balk met nul in het midden: links betalen, rechts krijgen */
.balance__bar {
  position: relative;
  grid-column: 2 / -1;
  height: 0.25rem;
  background: var(--muted);
  border-radius: 999px;
  overflow: hidden;
}

.balance__bar::before {
  content: "";
  position: absolute;
  inset-block: 0;
  left: 50%;
  width: 1px;
  background: var(--border);
}

.balance__fill {
  position: absolute;
  inset-block: 0;
  border-radius: 999px;
}

.balance__fill--pos { left: 50%; background: var(--success); }
.balance__fill--neg { right: 50%; background: var(--destructive); }

.note {
  margin-top: 0.875rem;
  color: var(--muted-foreground);
  font-size: 0.8125rem;
}

/* ---------------------------------------------------------
   Button
   --------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.75rem; /* mobiel: comfortabel raakbaar */
  padding: 0 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font: inherit;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease, border-color 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

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

.btn__icon {
  width: 1rem;
  height: 1rem;
}

.btn--block {
  display: flex;
  width: 100%;
}

.btn--primary {
  background: var(--primary);
  color: var(--primary-foreground);
  box-shadow: var(--shadow-xs);
}

.btn--soft {
  background: var(--background);
  border-color: var(--border);
  box-shadow: var(--shadow-xs);
  color: var(--foreground);
}

.btn--danger {
  background: var(--destructive);
  color: oklch(0.985 0 0);
  box-shadow: var(--shadow-xs);
}

.btn--ghost-danger {
  background: none;
  color: var(--destructive);
}

.btn--ghost-danger[hidden] {
  display: none;
}

#shareBtn {
  height: 2.25rem;
  margin-top: 0.75rem;
  color: var(--muted-foreground);
}

@media (hover: hover) {
  .btn--primary:hover:not(:disabled) { background: color-mix(in oklab, var(--primary) 90%, var(--background)); }
  .btn--soft:hover:not(:disabled) { background: var(--accent); }
  .btn--ghost-danger:hover:not(:disabled) { background: color-mix(in oklab, var(--destructive) 10%, transparent); }
  .icon-btn:hover,
  .menu__item:hover,
  .person-chip__remove:hover,
  .item__btn:hover { background: var(--accent); }
  .disclosure__summary:hover .chevron { color: var(--foreground); }
  .picker__option:hover { background: var(--accent); }
}

.icon-btn {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: var(--radius-md);
  background: none;
  color: var(--muted-foreground);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.link-btn {
  height: 2rem;
  padding: 0 0.5rem;
  margin: 0.5rem 0 0 -0.5rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--muted-foreground);
  font: inherit;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

/* ---------------------------------------------------------
   Actionbar
   --------------------------------------------------------- */

.actionbar {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 15;
  padding-bottom: var(--safe-b);
  background: linear-gradient(to top, var(--background) 55%, transparent);
  pointer-events: none;
}

.actionbar__inner {
  max-width: 34rem;
  margin-inline: auto;
  padding: 0.75rem var(--pad);
  pointer-events: auto;
}

/* ---------------------------------------------------------
   Sheet (drawer)
   --------------------------------------------------------- */

.sheet {
  width: 100%;
  max-width: 100%;
  max-height: 92dvh;
  padding: 0;
  margin: auto auto 0;
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  background: var(--background);
  color: var(--foreground);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.sheet::backdrop,
.modal::backdrop {
  background: oklch(0 0 0 / 50%);
}

.sheet[open] {
  animation: sheet-up 0.28s cubic-bezier(0.32, 0.72, 0, 1);
}

.sheet[open]::backdrop,
.modal[open]::backdrop {
  animation: fade-in 0.2s ease-out;
}

@keyframes sheet-up {
  from { transform: translateY(100%); }
}

@keyframes fade-in {
  from { opacity: 0; }
}

.sheet__inner {
  display: flex;
  flex-direction: column;
  max-height: 92dvh;
}

.sheet__grip {
  width: 2.25rem;
  height: 0.25rem;
  margin: 0.5rem auto 0;
  background: var(--muted);
  border-radius: 999px;
}

.sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 0.75rem 0.25rem 1.25rem;
}

.sheet__title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.sheet__body {
  flex: 1;
  display: grid;
  gap: 1.25rem;
  padding: 0.5rem 1.25rem 1rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.sheet__foot {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem calc(1rem + var(--safe-b));
  border-top: 1px solid var(--border);
  background: var(--background);
}

.field {
  display: grid;
  gap: 0.75rem;
  min-width: 0;
}

.field__label {
  font-weight: 500;
  line-height: 1;
}

/* Bedrag */

.amount {
  display: flex;
  align-items: baseline;
  gap: 0.375rem;
  padding: 0.625rem 0.75rem;
  background: transparent;
  border: 1px solid var(--input);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
}

.amount:focus-within {
  border-color: var(--ring);
  box-shadow: var(--focus-ring);
}

.amount__currency {
  color: var(--muted-foreground);
  font-size: 1.25rem;
  font-weight: 500;
}

.amount__input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  color: var(--foreground);
  font: inherit;
  font-size: 1.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* De ring zit op .amount, niet op het veld zelf */
.amount__input:focus,
.amount__input:focus-visible {
  outline: none;
  box-shadow: none;
  border-color: transparent;
}

.amount__input::placeholder {
  color: var(--muted-foreground);
}

/* Personen-kiezer (toggle group) */

.picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.picker__option {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 2.5rem;
  padding: 0 0.75rem 0 0.375rem;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--muted-foreground);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.12s ease, background-color 0.12s ease, color 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

/* Geselecteerd = gevulde chip met vinkje; geen zware omlijning. */
.picker__option[aria-checked="true"],
.picker__option[aria-pressed="true"] {
  background: var(--secondary);
  border-color: transparent;
  color: var(--secondary-foreground);
}

.picker__check {
  display: grid;
  place-items: center;
  flex: none;
  width: 1.625rem;
  height: 1.625rem;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-foreground);
}

.picker__check svg {
  width: 0.8125rem;
  height: 0.8125rem;
  stroke-width: 2.75;
}

.picker__share {
  color: var(--muted-foreground);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------
   Dialog
   --------------------------------------------------------- */

.modal {
  width: calc(100% - 2.5rem);
  max-width: 24rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--background);
  color: var(--foreground);
  box-shadow: var(--shadow-lg);
}

.modal[open] {
  animation: pop-in 0.14s ease-out;
}

.modal__inner {
  padding: 1.5rem;
}

.modal__title {
  margin-bottom: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.modal__text {
  color: var(--muted-foreground);
}

.modal__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

/* ---------------------------------------------------------
   Toast
   --------------------------------------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--actionbar-h) + var(--safe-b) + 0.5rem);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: calc(100% - 2rem);
  max-width: 26rem;
  padding: 0.75rem;
  padding-left: 1rem;
  transform: translateX(-50%);
  background: var(--popover);
  color: var(--popover-foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.2s cubic-bezier(0.32, 0.72, 0, 1);
}

.toast[hidden] {
  display: none;
}

.toast__text {
  flex: 1;
  min-width: 0;
}

.toast__action {
  flex: none;
  height: 2rem;
  padding: 0 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}

.toast__action[hidden] {
  display: none;
}

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 0.75rem); }
}

/* ---------------------------------------------------------
   Groter scherm
   --------------------------------------------------------- */

@media (min-width: 640px) {
  .content,
  .actionbar__inner {
    padding-inline: 0;
  }

  .topbar {
    padding-inline: 0 0.25rem;
  }

  .menu {
    right: 0.25rem;
  }

  .actionbar {
    background: none;
  }

  .actionbar__inner {
    padding-block: 0.875rem;
    background: linear-gradient(to top, var(--background) 55%, transparent);
  }

  .btn {
    height: 2.25rem;
  }

  .btn--block {
    height: 2.5rem;
  }

  .sheet {
    max-width: 26rem;
    margin: auto;
    border-bottom: 1px solid var(--border);
    border-radius: var(--radius-xl);
  }

  .sheet[open] {
    animation: pop-in 0.16s ease-out;
  }

  .sheet__foot {
    padding-bottom: 1rem;
  }

  .sheet__grip {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
