/* ==========================================================================
   Vrolijk Snacken – design system
   Huisstijl: Vrolijk Digital Impact (kleuren uit de officiële stylesheet van vrolijkdigital.nl)
   Opbouw: tokens · basis · app-shell · componenten · schermen · responsive
   Mobile-first: de basisregels zijn voor de telefoon, media queries breiden uit.
   ========================================================================== */

/* ── Tokens ── */

:root {
  color-scheme: light;

  /* Merkkleuren Vrolijk Digital Impact */
  --brand-navy: #252550;          /* donkerblauw: tekst, tabbalk */
  --brand-blue: #152863;          /* diepblauw: app-kop, vlakken */
  --brand-yellow: #ffca41;        /* geel: hoofdactie, actieve tab, smiley */
  --brand-yellow-hover: #ffe84d;
  --brand-smile: #fdc943;         /* geel van het smiley-logo */
  --brand-mist: #e4eded;          /* lichte tekst en vlakken */
  --brand-sky: #d7ebff;           /* lichtblauw einde van het merkverloop */
  --brand-grey: #d6d6d6;

  /* Rollen */
  --color-primary: var(--brand-navy);
  --color-secondary: var(--brand-blue);
  --color-accent: var(--brand-yellow);
  --color-accent-hover: var(--brand-yellow-hover);
  --color-on-accent: var(--brand-navy);

  --color-background: #eef5fc;     /* tussen wit en het merk-lichtblauw */
  --color-background-alt: #e4eded; /* tweede achtergrondlaag (merk) */
  --color-surface: #ffffff;        /* kaarten en lijsten */
  --color-surface-sunken: #edf3f9; /* invoer-achtergronden, tellers */
  --color-surface-tint: #e6f1fd;   /* geselecteerd (zachte tint van het merk-lichtblauw) */
  --color-shell: var(--brand-blue);
  --color-shell-strong: var(--brand-navy);
  --color-on-shell: #ffffff;
  --color-on-shell-muted: #c9d1e6;

  --color-text: var(--brand-navy);
  --color-text-muted: #5a5a7d;
  --color-border: var(--brand-grey);
  --color-border-strong: #8a8aa6;  /* randen van invoervelden (≥ 3:1) */
  --color-separator: #e3eaf2;

  --color-success: #1e7a52;
  --color-success-soft: #e3f3ea;
  --color-success-line: #b5dcc6;
  --color-warning: #8a5a00;
  --color-warning-soft: #fff4d1;
  --color-warning-line: #f1d58a;
  --color-error: #b3262d;
  --color-error-strong: #951f25;
  --color-error-soft: #fce8e9;
  --color-info: var(--brand-blue);
  --color-info-soft: #dcebfc;
  --color-info-line: #b9d3f2;

  --gradient-light: linear-gradient(180deg, #ffffff 0%, var(--brand-sky) 100%);

  /* Typografie */
  --font-display: 'Exo', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --fs-xs: 0.8125rem;  /* 13px: metadata */
  --fs-sm: 0.875rem;   /* 14px: labels */
  --fs-md: 1rem;       /* 16px: tekst en invoer */
  --fs-lg: 1.125rem;   /* 18px */
  --fs-xl: 1.375rem;   /* 22px: sectiekoppen */
  --fs-2xl: 1.75rem;   /* 28px: schermtitels */
  --fs-3xl: 2.5rem;    /* 40px: grote getallen */

  /* Ruimte (8px-raster) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;

  /* Vorm */
  --radius-sm: 10px;
  --radius-md: 16px;   /* panelen (merk: --radius-panel) */
  --radius-lg: 20px;   /* kaarten (merk: --radius-card) */
  --radius-xl: 28px;   /* bottom sheets */
  --radius-pill: 999px;
  --shadow-card: 0 4px 20px rgb(37 37 80 / 8%);
  --shadow-raised: 0 12px 32px rgb(21 40 99 / 18%);
  --shadow-bar: 0 -6px 24px rgb(21 40 99 / 16%);

  /* Beweging: één as, gedempt, zonder doorschieten */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 150ms;
  --dur-base: 220ms;
  --dur-slow: 700ms;

  /* Afmetingen van de shell */
  --page-pad: 16px;
  --content-max: 720px;
  --bar-h: 56px;
  --tabbar-h: 68px;
  --rail-w: 248px;
  --touch: 44px;
}

/* ── Basis ── */

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 140px;
  scroll-padding-bottom: 160px;
}

body {
  min-height: 100dvh;
  margin: 0;
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
}

/* Het lichte merkverloop als vaste achtergrond achter alle schermen */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--gradient-light);
}

h1, h2, h3, h4, p, ul, ol, figure {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

img, svg {
  display: block;
}

a {
  color: var(--color-secondary);
  text-underline-offset: 3px;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

strong {
  font-weight: 700;
}

::selection {
  background: var(--brand-yellow);
  color: var(--brand-navy);
}

:focus-visible {
  outline: 3px solid var(--color-secondary);
  outline-offset: 2px;
}

.app-header :focus-visible,
.tab-bar :focus-visible,
.home__hero :focus-visible {
  outline-color: var(--brand-yellow);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  z-index: 100;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  background: var(--brand-yellow);
  color: var(--brand-navy);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: calc(env(safe-area-inset-top) + var(--space-2));
}

.icon {
  flex: none;
}

/* ==========================================================================
   App-shell
   ========================================================================== */

/* ── Kop ── */

.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  padding-top: env(safe-area-inset-top);
  background: var(--color-shell);
  color: var(--color-on-shell);
}

.app-bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  max-width: var(--content-max);
  height: var(--bar-h);
  margin: 0 auto;
  padding: 0 max(var(--page-pad), env(safe-area-inset-right)) 0 max(var(--page-pad), env(safe-area-inset-left));
}

.app-bar__brand {
  display: inline-flex;
  flex: none;
  align-items: center;
  min-width: var(--touch);
  min-height: var(--touch);
  border-radius: var(--radius-pill);
}

.brand-mark {
  width: 34px;
  height: 34px;
}

.app-bar__back {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: var(--touch);
  height: var(--touch);
  margin-left: calc(var(--space-2) * -1);
  border-radius: 50%;
  color: var(--color-on-shell);
}

@media (hover: hover) {
  .app-bar__back:hover {
    background: rgb(255 255 255 / 10%);
  }
}

.app-bar__title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 1.3125rem;
  font-style: italic;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.01em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.app-bar__accent {
  color: var(--brand-yellow);
}

/* "Wie ben jij?" rechts in de kop */
.me-button {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: var(--space-2);
  max-width: 180px;
  min-height: var(--touch);
  padding: 4px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-on-shell);
  font-size: var(--fs-sm);
  font-weight: 600;
}

@media (hover: hover) {
  .me-button:hover {
    background: rgb(255 255 255 / 10%);
  }
}

.me-button__avatar {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-mist);
  color: var(--brand-navy);
  font-size: var(--fs-md);
  font-weight: 700;
}

.me-button__name {
  display: none;
  overflow: hidden;
  padding-right: var(--space-2);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.me-button__avatar--photo {
  overflow: hidden;
  background: var(--brand-mist);
}

.me-button__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.me-button--empty .me-button__avatar {
  background: rgb(255 255 255 / 14%);
  color: var(--color-on-shell);
}

/* ── Subtabs van een onderdeel (bijv. Bestellen · Bereiding · …) ── */

.app-tabs {
  background: var(--color-shell);
}

.app-tabs__inner {
  display: flex;
  gap: var(--space-1);
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--page-pad) var(--space-3);
  overflow-x: auto;
  scrollbar-width: none;
  scroll-padding-inline: var(--page-pad);
  scroll-snap-type: x proximity;
}

.app-tabs__inner::-webkit-scrollbar {
  display: none;
}

.app-tabs__link {
  display: inline-flex;
  flex: none;
  align-items: center;
  min-height: var(--touch);
  padding: 0 var(--space-4);
  border-radius: var(--radius-pill);
  color: var(--color-on-shell-muted);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  scroll-snap-align: start;
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

@media (hover: hover) {
  .app-tabs__link:hover {
    background: rgb(255 255 255 / 8%);
    color: var(--color-on-shell);
  }
}

.app-tabs__link[aria-current='page'] {
  background: var(--color-surface);
  color: var(--brand-navy);
}

/* ── Bestelronde-kiezer (alleen bij de Donderdaglunch) ── */

.context-bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-4) max(var(--page-pad), env(safe-area-inset-right)) 0 max(var(--page-pad), env(safe-area-inset-left));
}

.context-bar__label {
  flex: none;
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  font-weight: 600;
}

.context-bar__select {
  flex: 1;
  min-width: 0;
  max-width: 420px;
}

/* ── Tabbalk onderin (zijbalk op desktop) ── */

.tab-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  padding: 6px max(var(--space-2), env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(var(--space-2), env(safe-area-inset-left));
  background: var(--color-shell-strong);
  box-shadow: var(--shadow-bar);
}

.tab-bar__brand {
  display: none;
}

.tab-bar__list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  max-width: 560px;
  margin: 0 auto;
}

/* Home zit op de telefoon onder het logo linksboven; onderin staan de zes onderdelen */
.tab-bar__item--desktop,
.tab-bar__label-full {
  display: none;
}

.tab-bar__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 56px;
  border-radius: var(--radius-md);
  color: var(--color-on-shell-muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.tab-bar__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 32px;
  border-radius: var(--radius-pill);
  transition: background-color var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
}

@media (hover: hover) {
  .tab-bar__link:hover .tab-bar__icon {
    background: rgb(255 255 255 / 8%);
  }
}

.tab-bar__link[aria-current='page'] {
  color: var(--color-on-shell);
}

.tab-bar__link[aria-current='page'] .tab-bar__icon {
  background: var(--brand-yellow);
  color: var(--brand-navy);
}

/* ── Inhoud ── */

.app-main {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-4) max(var(--page-pad), env(safe-area-inset-right)) calc(var(--tabbar-h) + env(safe-area-inset-bottom) + var(--space-6)) max(var(--page-pad), env(safe-area-inset-left));
}

.app-main:focus {
  outline: none;
}

/* Schermovergang: kort en langs één as */
.app-main--enter > * {
  animation: view-enter var(--dur-base) var(--ease-out);
}

@keyframes view-enter {
  from {
    opacity: 0;
    transform: translateX(14px);
  }
}

.connection {
  max-width: calc(var(--content-max) - 2 * var(--page-pad));
  margin: var(--space-3) var(--page-pad) 0;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--color-warning-soft);
  color: var(--color-warning);
  font-size: var(--fs-sm);
  font-weight: 500;
}

.connection--error {
  background: var(--color-error-soft);
  color: var(--color-error);
}

/* ==========================================================================
   Componenten
   ========================================================================== */

/* ── Knoppen ── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 0 var(--space-5);
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  font-size: var(--fs-md);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}

.btn:active:not(:disabled) {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Status "opgeslagen": niet klikbaar, maar wel goed leesbaar */
.btn--saved:disabled {
  border-color: var(--color-success-line);
  background: var(--color-success-soft);
  color: var(--color-success);
  opacity: 1;
  cursor: default;
}

.btn--primary {
  background: var(--color-accent);
  color: var(--color-on-accent);
}

@media (hover: hover) {
  .btn--primary:hover:not(:disabled) {
    background: var(--color-accent-hover);
  }
}

.btn--secondary {
  border-color: var(--color-border-strong);
  background: var(--color-surface);
  color: var(--color-primary);
}

@media (hover: hover) {
  .btn--secondary:hover:not(:disabled) {
    border-color: var(--color-primary);
    background: var(--color-surface-sunken);
  }
}

.btn--dark {
  background: var(--color-primary);
  color: var(--color-on-shell);
}

@media (hover: hover) {
  .btn--dark:hover:not(:disabled) {
    background: var(--color-secondary);
  }
}

.btn--danger {
  background: var(--color-error);
  color: #ffffff;
}

@media (hover: hover) {
  .btn--danger:hover:not(:disabled) {
    background: var(--color-error-strong);
  }
}

.btn--danger-outline {
  border-color: rgb(179 38 45 / 45%);
  background: var(--color-surface);
  color: var(--color-error);
}

@media (hover: hover) {
  .btn--danger-outline:hover:not(:disabled) {
    border-color: var(--color-error);
    background: var(--color-error-soft);
  }
}

.btn--small {
  min-height: var(--touch);
  padding: 0 var(--space-4);
  font-size: 0.9375rem;
}

.btn--block {
  width: 100%;
}

/* Rustige tekstknop, wel met een volwaardig aanraakvlak */
.link-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: var(--touch);
  padding: 0 var(--space-3);
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-secondary);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
}

@media (hover: hover) {
  .link-btn:hover {
    background: var(--color-surface-sunken);
  }
}

.link-btn--danger {
  color: var(--color-error);
}

@media (hover: hover) {
  .link-btn--danger:hover {
    background: var(--color-error-soft);
  }
}

/* ── Formulieren ── */

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field__label {
  font-size: 0.9375rem;
  font-weight: 600;
}

.field__input {
  width: 100%;
  min-height: 52px;
  padding: var(--space-3) var(--space-4);
  border: 1.5px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background-color: var(--color-surface);
  color: var(--color-text);
  font-size: var(--fs-md);
  line-height: 1.4;
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}

.field__input::placeholder {
  color: var(--color-text-muted);
  opacity: 0.85;
}

@media (hover: hover) {
  .field__input:hover {
    border-color: var(--color-primary);
  }
}

.field__input:focus {
  border-color: var(--color-secondary);
  outline: none;
  box-shadow: 0 0 0 4px rgb(21 40 99 / 14%);
}

.field__input[aria-invalid='true'] {
  border-color: var(--color-error);
  box-shadow: 0 0 0 4px rgb(179 38 45 / 12%);
}

textarea.field__input {
  min-height: 96px;
  resize: vertical;
}

select.field__input {
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1.5 1.5 7 7l5.5-5.5' stroke='%23252550' stroke-width='2.2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 16px center;
  background-repeat: no-repeat;
  appearance: none;
  cursor: pointer;
}

.field__input--small {
  min-height: var(--touch);
  padding: var(--space-2) var(--space-3);
}

select.field__input--small {
  padding-right: 40px;
  background-position: right 14px center;
}

.field__hint {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
}

.field__error {
  color: var(--color-error);
  font-size: var(--fs-sm);
  font-weight: 600;
}

.stack-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.inline-form {
  display: flex;
  gap: var(--space-2);
}

.inline-form .field__input {
  flex: 1;
  min-width: 0;
}

/* Selectievakje */
.check {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--touch);
  font-size: var(--fs-md);
  cursor: pointer;
}

.check__input {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--brand-navy);
}

/* Schakelaar */
.switch {
  position: relative;
  display: inline-flex;
  flex: none;
  align-items: center;
  min-width: var(--touch);
  min-height: var(--touch);
  cursor: pointer;
}

.switch__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.switch__track {
  position: relative;
  width: 48px;
  height: 28px;
  border-radius: var(--radius-pill);
  background: var(--color-border-strong);
  transition: background-color var(--dur-base) var(--ease-out);
}

.switch__track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgb(21 40 99 / 30%);
  transition: transform var(--dur-base) var(--ease-out);
}

.switch__input:checked + .switch__track {
  background: var(--color-success);
}

.switch__input:checked + .switch__track::after {
  transform: translateX(20px);
}

.switch__input:focus-visible + .switch__track {
  outline: 3px solid var(--color-secondary);
  outline-offset: 2px;
}

/* Snelkeuze-chip */
.chip {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch);
  padding: 0 var(--space-4);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-primary);
  font-size: 0.9375rem;
  font-weight: 500;
}

@media (hover: hover) {
  .chip:hover {
    border-color: var(--color-primary);
  }
}

/* ── Labels ── */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  background: var(--color-surface-sunken);
  color: var(--color-text-muted);
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-style: normal;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  vertical-align: middle;
  white-space: nowrap;
}

.badge--open,
.badge--success {
  background: var(--color-success-soft);
  color: var(--color-success);
}

.badge--closed,
.badge--neutral {
  background: var(--color-background-alt);
  color: var(--color-primary);
}

.badge--current,
.badge--info {
  background: var(--color-info-soft);
  color: var(--color-info);
}

.badge--warning {
  background: var(--color-warning-soft);
  color: var(--color-warning);
}

.badge--danger {
  background: var(--color-error-soft);
  color: var(--color-error);
}

.badge--accent {
  background: var(--color-info-soft);
  color: var(--color-info);
}

/* "jij"-markering bij je eigen naam: omcirkeld */
.me-tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-left: 6px;
  padding: 0 8px;
  border: 2px solid var(--brand-navy);
  border-radius: var(--radius-pill);
  color: var(--brand-navy);
  font-size: var(--fs-xs);
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
}

/* ── Meldingen ── */

.notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: var(--fs-md);
}

.notice__text {
  flex: 1 1 220px;
}

.notice--info {
  border-color: var(--color-info-line);
  background: var(--color-info-soft);
  color: var(--color-info);
}

.notice--warning {
  border-color: var(--color-warning-line);
  background: var(--color-warning-soft);
  color: var(--color-warning);
}

.notice--success {
  border-color: var(--color-success-line);
  background: var(--color-success-soft);
  color: var(--color-success);
}

.notice a {
  color: inherit;
  font-weight: 600;
}

/* ── Lege toestand en laden ── */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-6) var(--space-4);
  border: 1.5px dashed var(--color-border-strong);
  border-radius: var(--radius-lg);
  background: rgb(255 255 255 / 60%);
  color: var(--color-text-muted);
  text-align: center;
}

.empty-state__title {
  color: var(--color-text);
  font-size: var(--fs-lg);
  font-weight: 700;
}

.empty-state .btn {
  margin-top: var(--space-2);
}

.loading {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.loading__line {
  height: 72px;
  border-radius: var(--radius-lg);
  background: linear-gradient(90deg, rgb(255 255 255 / 55%) 0%, #ffffff 50%, rgb(255 255 255 / 55%) 100%) 0 0 / 200% 100%;
  animation: loading 1.4s linear infinite;
}

.loading__line:first-child {
  width: 60%;
  height: 40px;
}

@keyframes loading {
  to {
    background-position: -200% 0;
  }
}

/* ── Pagina-opbouw ── */

.page {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.page__header {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.page__header--split {
  gap: var(--space-3);
}

.page__title {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-style: italic;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0;
  text-transform: uppercase;
  text-wrap: balance;
}

.page__subtitle,
.page__intro {
  color: var(--color-text-muted);
  font-size: var(--fs-md);
}

.page__subtitle strong {
  color: var(--color-text);
}

.page__deadline {
  display: block;
  color: var(--color-text-muted);
  font-weight: 500;
}

.page__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.page__notices {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.page__notices:empty {
  display: none;
}

/* Paneel: een witte sectie; lijsten erin zijn plat */
.panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-width: 0;
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.panel__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.panel__title,
.section-title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-xl);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.panel__count {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: var(--radius-pill);
  background: var(--color-surface-sunken);
  color: var(--color-primary);
  font-size: var(--fs-sm);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.panel__meta {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
}

.panel__note {
  color: var(--color-text-muted);
  font-size: var(--fs-md);
}

/* ── Glimlachmeter: de mondboog van het smileylogo als voortgang ── */

.smile {
  flex: none;
  overflow: visible;
}

.smile__face {
  fill: var(--brand-smile);
  stroke: var(--brand-navy);
  stroke-width: 3.56;
}

.smile__eye,
.smile__track,
.smile__mouth {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3.56;
}

.smile__eye {
  stroke: var(--brand-navy);
}

.smile__track {
  stroke: rgb(37 37 80 / 9%);
}

.smile__mouth {
  stroke: var(--brand-navy);
  stroke-dasharray: var(--p) 100;
}

.smile--empty .smile__mouth {
  opacity: 0;
}

.smile--animate .smile__mouth {
  animation: smile-draw var(--dur-slow) var(--ease-out) both;
}

@keyframes smile-draw {
  from {
    stroke-dasharray: var(--from) 100;
  }
}

.smile--full.smile--animate .smile__face {
  animation: smile-glow 900ms var(--ease-out) 1;
}

@keyframes smile-glow {
  40% {
    fill: var(--brand-yellow-hover);
  }
}

/* ── Teller (plus/min) ── */

.stepper {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: var(--space-1);
  padding: 2px;
  border-radius: var(--radius-pill);
  background: var(--color-surface-sunken);
}

.stepper__btn {
  display: inline-grid;
  place-items: center;
  width: var(--touch);
  height: var(--touch);
  border: 0;
  border-radius: 50%;
  background: var(--color-surface);
  color: var(--brand-navy);
  box-shadow: 0 1px 3px rgb(21 40 99 / 14%);
  transition: background-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}

@media (hover: hover) {
  .stepper__btn:hover:not(:disabled) {
    background: var(--brand-mist);
  }
}

.stepper__btn:active:not(:disabled) {
  transform: scale(0.92);
}

.stepper__btn--add {
  background: var(--brand-navy);
  color: var(--color-on-shell);
}

@media (hover: hover) {
  .stepper__btn--add:hover:not(:disabled) {
    background: var(--brand-blue);
  }
}

.stepper__btn:disabled {
  background: transparent;
  box-shadow: none;
  color: var(--color-border-strong);
  cursor: not-allowed;
}

.stepper__value {
  min-width: 32px;
  font-size: var(--fs-lg);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.stepper--small .stepper__value {
  min-width: 26px;
  font-size: var(--fs-md);
}

/* ── Meldingen onderin (toast) ── */

.toast-region {
  position: fixed;
  right: var(--space-4);
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + var(--space-3));
  left: var(--space-4);
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  pointer-events: none;
}

.has-order-bar .toast-region {
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 92px);
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: min(100%, 480px);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--brand-navy);
  color: #ffffff;
  font-size: 0.9375rem;
  font-weight: 500;
  box-shadow: var(--shadow-raised);
  pointer-events: auto;
  cursor: pointer;
  animation: toast-in var(--dur-base) var(--ease-out);
}

.toast::before {
  content: '';
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand-sky);
}

.toast--error {
  background: var(--color-error);
}

.toast--error::before {
  background: #ffffff;
}

.toast--info::before {
  background: var(--brand-sky);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

/* ── Dialoog: bottom sheet op de telefoon, venster op grotere schermen ── */

.dialog {
  width: 100%;
  max-width: 100%;
  max-height: calc(100dvh - 24px);
  margin: auto 0 0;
  padding: 0;
  border: 0;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--shadow-raised);
}

.dialog[open] {
  animation: sheet-in 260ms var(--ease-out);
}

.dialog::backdrop {
  background: rgb(21 40 99 / 45%);
}

@keyframes sheet-in {
  from {
    transform: translateY(100%);
  }
}

.dialog__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-5) calc(var(--space-5) + env(safe-area-inset-bottom));
}

.dialog__form::before {
  content: '';
  align-self: center;
  width: 40px;
  height: 5px;
  margin-bottom: var(--space-2);
  border-radius: var(--radius-pill);
  background: var(--color-border);
}

.dialog__title {
  font-size: var(--fs-xl);
  font-weight: 700;
  line-height: 1.25;
}

.dialog__text {
  color: var(--color-text-muted);
}

.dialog__actions {
  display: flex;
  flex-direction: column-reverse;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.dialog__actions .btn {
  width: 100%;
}

/* ==========================================================================
   Schermen
   ========================================================================== */

/* ── Hoofdmenu ── */

.home {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.home__hero {
  margin: calc(var(--space-4) * -1) calc(var(--page-pad) * -1) 0;
  padding: var(--space-3) var(--page-pad) 76px;
  background: var(--color-shell);
  color: var(--color-on-shell);
}

.home__title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-style: italic;
  font-weight: 800;
  line-height: 1.02;
  text-transform: uppercase;
  text-wrap: balance;
}

.home__name {
  color: var(--brand-yellow);
}

.home__subtitle {
  margin-top: var(--space-2);
  color: var(--color-on-shell-muted);
}

.home__tiles {
  display: grid;
  gap: var(--space-3);
  margin-top: -60px;
}

.tile {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  color: var(--color-text);
  text-decoration: none;
  box-shadow: var(--shadow-card);
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}

@media (hover: hover) {
  .tile:hover {
    box-shadow: var(--shadow-raised);
  }
}

.tile:active {
  transform: scale(0.99);
}

.tile__icon {
  display: grid;
  place-items: center;
  align-self: start;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--color-info-soft);
  color: var(--brand-navy);
}

.tile__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.tile__title {
  font-size: var(--fs-lg);
  font-weight: 700;
  line-height: 1.25;
}

.tile__text {
  color: var(--color-text-muted);
  font-size: var(--fs-md);
  line-height: 1.4;
}

.tile__status-line {
  display: block;
}

.tile__status-line + .tile__status-line {
  color: var(--color-text-muted);
  font-weight: 500;
}

.tile__status {
  margin-top: var(--space-1);
  color: var(--color-primary);
  font-size: var(--fs-sm);
  font-weight: 600;
}

.tile__meter {
  display: flex;
  align-self: center;
}

/* ── Inloggen met Google ── */

/* Knop volgens de richtlijnen van Google: wit, grijze rand, het gekleurde G-logo */
.google-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  min-height: 48px;
  padding: 0 var(--space-5);
  border: 1.5px solid var(--brand-grey);
  border-radius: var(--radius-pill);
  background: #ffffff;
  color: #1f1f1f;
  font-size: var(--fs-md);
  font-weight: 600;
  text-decoration: none;
  transition: border-color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
}

@media (hover: hover) {
  .google-btn:hover {
    border-color: var(--color-border-strong);
    background: #f8fafd;
  }
}

.google-btn--block {
  width: 100%;
}

.google-btn__logo {
  flex: none;
}

/* In het naamvenster: inloggen, of gewoon je naam kiezen */
.account-login {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.account-login__or {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  font-weight: 600;
}

.account-login__or::before,
.account-login__or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-separator);
}

.account-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  background: var(--color-surface-sunken);
}

.account-row__picture {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.account-row__text {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
}

.account-row__text strong {
  overflow: hidden;
  color: var(--color-text);
  font-size: var(--fs-md);
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Inlogscherm als inloggen verplicht is: over de hele app heen */
.login-gate {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: max(var(--space-5), env(safe-area-inset-top)) var(--space-4) max(var(--space-5), env(safe-area-inset-bottom));
  background: var(--color-shell);
}

.login-gate__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  width: min(100%, 400px);
  padding: var(--space-6) var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-raised);
  text-align: center;
}

.login-gate__logo {
  width: 72px;
  height: 72px;
}

.login-gate__title {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-style: italic;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.login-gate__title .app-bar__accent {
  color: var(--color-primary);
}

.login-gate__text {
  color: var(--color-text-muted);
}

.is-gated {
  overflow: hidden;
}

/* Meldingen (bijv. "alleen accounts van @...") blijven zichtbaar boven het inlogscherm */
.is-gated .toast-region {
  bottom: max(var(--space-5), env(safe-area-inset-bottom));
  z-index: 210;
}

/* Profielvenster: snelkoppelingen onder "Wie ben jij?" */
.profile-links {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--color-separator);
}

.profile-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 56px;
  border-bottom: 1px solid var(--color-separator);
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
}

.profile-link__label {
  flex: 1;
}

.profile-link__meta {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  font-weight: 500;
}

@media (hover: hover) {
  .profile-link:hover {
    color: var(--color-secondary);
  }
}

/* ── Bestellen ── */

.order-form {
  display: grid;
  gap: var(--space-5);
}

.order-form__main {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-width: 0;
}

.order-form--bar {
  padding-bottom: 88px;
}

.snack-list {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.snack-list > .empty-state {
  border: 0;
}

.snack-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 72px;
  padding: var(--space-3) var(--space-3) var(--space-3) var(--space-4);
  transition: background-color var(--dur-base) var(--ease-out);
}

.snack-card + .snack-card {
  border-top: 1px solid var(--color-separator);
}

.snack-card--selected {
  background: var(--color-surface-tint);
}

.snack-card--sold-out .snack-card__name {
  color: var(--color-text-muted);
}

.snack-card__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.snack-card__name {
  font-size: var(--fs-lg);
  font-weight: 600;
  line-height: 1.3;
}

.snack-card__stock {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
}

.snack-card__stock--warning {
  color: var(--color-warning);
  font-weight: 600;
}

/* Overzicht van je bestelling */
.order-summary {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  scroll-margin-top: 140px;
}

.order-summary__title {
  font-size: var(--fs-xl);
  font-weight: 700;
  line-height: 1.2;
}

.order-summary__meta {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
}

.order-summary__empty {
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--color-surface-sunken);
  color: var(--color-text-muted);
  font-size: var(--fs-md);
}

.order-summary__list {
  display: flex;
  flex-direction: column;
}

.order-summary__item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 52px;
  border-bottom: 1px solid var(--color-separator);
}

.order-summary__qty {
  min-width: 36px;
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-style: italic;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.order-summary__name {
  flex: 1;
  min-width: 0;
  font-weight: 500;
}

.order-summary__remove {
  display: inline-grid;
  place-items: center;
  width: var(--touch);
  height: var(--touch);
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--color-text-muted);
}

@media (hover: hover) {
  .order-summary__remove:hover {
    background: var(--color-error-soft);
    color: var(--color-error);
  }
}

.order-summary__total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: var(--space-2) 0;
  font-size: var(--fs-lg);
}

.order-summary__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-1);
}

/* Vaste bestelbalk boven de tabbalk (telefoon en tablet) */
.order-bar {
  position: fixed;
  right: max(var(--space-3), env(safe-area-inset-right));
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + var(--space-2));
  left: max(var(--space-3), env(safe-area-inset-left));
  z-index: 35;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  max-width: 560px;
  margin: 0 auto;
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-raised);
  animation: bar-in var(--dur-base) var(--ease-out);
}

@keyframes bar-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

.order-bar--away {
  opacity: 0;
  pointer-events: none;
  transform: translateY(24px);
}

.order-bar {
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}

.order-bar__count {
  display: flex;
  flex: 1;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;
}

.order-bar__number {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-style: italic;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.order-bar__label {
  overflow: hidden;
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-overflow: ellipsis;
}

.order-bar .btn {
  padding: 0 var(--space-4);
}

/* De Donderdagvraag in het bestelformulier */
.question-inline {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--color-shell);
  color: var(--color-on-shell);
}

.question-inline .question-card__type {
  align-self: flex-start;
}

.question-inline__hint {
  color: var(--color-on-shell-muted);
  font-size: var(--fs-md);
}

.question-inline__text {
  font-size: var(--fs-lg);
  font-weight: 700;
  line-height: 1.35;
  text-wrap: pretty;
}

.question-inline__saved {
  color: var(--brand-sky);
  font-size: var(--fs-sm);
  font-weight: 600;
}

.question-inline .field__input {
  border-color: transparent;
}

/* Keuzes van een dilemma */
.choice-group {
  display: grid;
  gap: var(--space-2);
}

.choice-group__option {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 56px;
  padding: var(--space-3) var(--space-4);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--fs-md);
  font-weight: 600;
  line-height: 1.3;
  text-align: left;
  transition: border-color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
}

.choice-group__option::before {
  content: '';
  flex: none;
  width: 22px;
  height: 22px;
  border: 2px solid var(--color-border-strong);
  border-radius: 50%;
  background: var(--color-surface);
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}

@media (hover: hover) {
  .choice-group__option:hover:not(:disabled) {
    border-color: var(--color-primary);
  }
}

.choice-group__option--selected {
  border-color: var(--brand-navy);
  background: var(--color-surface-tint);
}

.choice-group__option--selected::before {
  border-color: var(--brand-navy);
  background: var(--brand-navy);
  box-shadow: inset 0 0 0 4px var(--color-surface);
}

.choice-group__option:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── Bereiding ── */

.prep-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--color-shell);
  color: var(--color-on-shell);
}

.prep-summary__figure {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.prep-summary__number {
  font-family: var(--font-display);
  font-size: var(--fs-3xl);
  font-style: italic;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.prep-summary__label {
  color: var(--color-on-shell-muted);
  font-size: var(--fs-md);
}

.prep-summary__people {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-left: auto;
  color: var(--color-on-shell-muted);
  font-size: var(--fs-sm);
}

.prep-summary__people strong {
  display: block;
  color: var(--color-on-shell);
  font-size: var(--fs-md);
}

.prep-list {
  display: grid;
  gap: var(--space-3);
}

.prep-item {
  display: grid;
  grid-template-columns: 76px 1fr;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.prep-item__count {
  display: grid;
  place-items: center;
  height: 76px;
  border-radius: var(--radius-md);
  background: var(--color-info-soft);
  color: var(--brand-navy);
  font-family: var(--font-display);
  font-size: var(--fs-3xl);
  font-style: italic;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.prep-item__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.prep-item__name {
  font-size: var(--fs-xl);
  font-weight: 700;
  line-height: 1.2;
}


.prep-total {
  display: flex;
  justify-content: space-between;
  padding: 0 var(--space-2);
  color: var(--color-text-muted);
  font-weight: 600;
}

/* ── Per persoon ── */

.order-cards {
  display: grid;
  gap: var(--space-3);
}

.order-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.order-card__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
}

.order-card__name {
  min-width: 0;
  font-size: var(--fs-lg);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.order-card__total {
  flex: none;
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  font-weight: 600;
}

.order-card__lines {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.order-card__line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--color-surface-sunken);
  font-weight: 500;
}

.order-card__qty {
  font-weight: 800;
}

.order-card__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-top: var(--space-1);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-separator);
}

.order-card__meta {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
}

.order-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* ── De Donderdagvraag ── */

.question-card {
  --qc-pad: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  overflow: hidden;
  padding: var(--space-5) var(--qc-pad);
  border-radius: var(--radius-lg);
  background: var(--color-shell);
  color: var(--color-on-shell);
  box-shadow: var(--shadow-card);
}

.question-card__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.question-card__type {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--brand-mist);
  color: var(--brand-navy);
  font-size: var(--fs-sm);
  font-weight: 700;
}

.question-card__progress {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-on-shell-muted);
  font-size: var(--fs-sm);
  font-weight: 500;
}

.question-card__text {
  font-family: var(--font-display);
  font-size: 1.625rem;
  font-style: italic;
  font-weight: 800;
  line-height: 1.12;
  text-wrap: balance;
}

/* Het antwoordformulier is het lichte onderste deel van dezelfde kaart */
.question-card__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin: var(--space-2) calc(var(--qc-pad) * -1) calc(var(--space-5) * -1);
  padding: var(--space-5) var(--qc-pad);
  background: var(--color-surface);
  color: var(--color-text);
}

.question-card__label {
  color: var(--color-text);
}

.question-card__status {
  font-size: var(--fs-md);
}

.question-card > .question-card__status {
  color: var(--color-on-shell-muted);
}

/* Uitslag van een dilemma */
.poll {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.poll__option {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.poll__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
}

.poll__label {
  font-weight: 700;
}

.poll__count {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.poll__bar {
  height: 12px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: var(--color-surface-sunken);
}

.poll__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--color-border-strong);
}

.poll__option--leading .poll__fill {
  background: var(--brand-navy);
}

.poll__option--leading .poll__label::after {
  content: 'koploper';
  margin-left: var(--space-2);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--color-info-soft);
  color: var(--color-info);
  font-size: var(--fs-xs);
  font-weight: 700;
  vertical-align: 2px;
}

.poll__names {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
}

.answer-list {
  display: flex;
  flex-direction: column;
}

.answer-list__item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--space-3) 0;
}

.answer-list__item + .answer-list__item {
  border-top: 1px solid var(--color-separator);
}

.answer-list__name {
  font-size: var(--fs-sm);
  font-weight: 700;
}

.answer-list__text {
  overflow-wrap: anywhere;
}

.answer-pending {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-separator);
  font-size: var(--fs-sm);
}

.answer-pending__label {
  width: 100%;
  color: var(--color-text-muted);
  font-weight: 600;
}

.answer-pending__name {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 var(--space-3);
  border: 1.5px dashed var(--color-border-strong);
  border-radius: var(--radius-pill);
}

/* ── Beheer en collega's ── */

.admin-grid {
  display: grid;
  gap: var(--space-5);
}

.admin-list {
  display: flex;
  flex-direction: column;
}

.admin-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  padding: var(--space-3) 0;
}

.admin-row + .admin-row {
  border-top: 1px solid var(--color-separator);
}

.admin-row--muted .admin-row__name {
  color: var(--color-text-muted);
}

.admin-row--selected {
  margin: 0 calc(var(--space-2) * -1);
  padding-inline: var(--space-2);
  border-radius: var(--radius-md);
  background: var(--color-surface-tint);
}

.admin-row__name {
  display: flex;
  flex: 1 1 140px;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-weight: 600;
}

.admin-row__meta {
  width: 100%;
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
}

.admin-row__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-left: auto;
}

.admin-row__hint {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  font-weight: 600;
}

.admin-row__edit {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  width: 100%;
}

.admin-row__edit .field__input {
  flex: 1 1 180px;
}

.admin-row__stock {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  padding-left: 56px;
}

.admin-row__stock-label {
  font-size: var(--fs-sm);
  font-weight: 600;
}

.admin-row__stock-input {
  width: 96px;
  font-variant-numeric: tabular-nums;
}

.admin-row__stock-info {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
}

.admin-row__stock-info--warning {
  color: var(--color-warning);
  font-weight: 700;
}

/* ── Trakteerlijst ── */

.progress-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--color-shell);
  color: var(--color-on-shell);
}

.progress-card__figure {
  font-family: var(--font-display);
  font-size: var(--fs-3xl);
  font-style: italic;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.progress-card__figure span {
  color: var(--color-on-shell-muted);
  font-size: var(--fs-xl);
}

.progress-card__text {
  margin-top: var(--space-1);
  color: var(--color-on-shell-muted);
}

.progress-card__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  grid-column: 1 / -1;
  padding-top: var(--space-3);
  border-top: 1px solid rgb(255 255 255 / 14%);
  color: var(--color-on-shell-muted);
  font-size: var(--fs-sm);
}

.progress-card__footer .link-btn {
  margin-right: calc(var(--space-3) * -1);
  color: var(--color-on-shell);
}

@media (hover: hover) {
  .progress-card__footer .link-btn:hover {
    background: rgb(255 255 255 / 10%);
  }
}

.treat-columns {
  display: grid;
  gap: var(--space-5);
}

.treat-list {
  display: flex;
  flex-direction: column;
}

.treat-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-3) 0;
}

.treat-row + .treat-row {
  border-top: 1px solid var(--color-separator);
}

.treat-row--open {
  margin: 0 calc(var(--space-2) * -1);
  padding: var(--space-3) var(--space-2);
  border-radius: var(--radius-md);
  background: var(--color-surface-tint);
}

.treat-row__main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-3);
}

.treat-row__name {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 600;
}

.treat-row__action {
  margin-left: auto;
}

.treat-row__check {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-success-soft);
  color: var(--color-success);
}

.treat-row--done .treat-row__name {
  flex: 1 1 120px;
}

.treat-row__what {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--color-info-soft);
  color: var(--color-info);
  font-size: var(--fs-sm);
  font-weight: 600;
}

.treat-row__date {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
}

.treat-row__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  width: 100%;
  padding-left: 32px;
}

.treat-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.treat-form__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.treat-form__fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
}

.treat-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.history {
  display: flex;
  flex-direction: column;
}

.history__round + .history__round {
  border-top: 1px solid var(--color-separator);
}

.history__summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-3);
  min-height: 56px;
  padding: var(--space-2) 28px var(--space-2) 0;
  position: relative;
  list-style: none;
  cursor: pointer;
}

.history__summary::-webkit-details-marker {
  display: none;
}

.history__summary::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 6px;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--color-primary);
  border-bottom: 2px solid var(--color-primary);
  transform: translateY(-70%) rotate(45deg);
  transition: transform var(--dur-base) var(--ease-out);
}

.history__round[open] .history__summary::after {
  transform: translateY(-30%) rotate(225deg);
}

.history__title {
  font-weight: 700;
}

.history__meta {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
}

.history__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: 0 0 var(--space-4);
}

.history__item {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-3);
  font-size: var(--fs-md);
}

.history__name {
  font-weight: 600;
}

.history__date {
  margin-left: auto;
  color: var(--color-text-muted);
}

/* ── Wensen en ideeënbus ── */

.panel--form {
  max-width: 560px;
}

/* "Bestellen als Jesse · Wijzigen": je naam komt van je avatar rechtsboven */
.signed-as {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-1) var(--space-2);
  min-height: 52px;
  padding: var(--space-1) var(--space-1) var(--space-1) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--color-surface-sunken);
  color: var(--color-text-muted);
}

.signed-as strong {
  color: var(--color-text);
}

.signed-as--empty {
  background: var(--color-warning-soft);
  color: var(--color-warning);
  font-weight: 600;
}

/* Overzicht: aanvragen en ideeën elk in een eigen blok */
.overview-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 760px;
}

.overview-block + .overview-block {
  padding-top: var(--space-5);
  border-top: 2px solid var(--color-separator);
}

/* Desktop: aanvragen en ideeën naast elkaar, zodat de breedte benut wordt */
@media (min-width: 1024px) {
  .overview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: var(--space-6);
  }

  .overview-grid .overview-block {
    max-width: none;
  }

  .overview-grid .overview-block + .overview-block {
    padding-top: 0;
    border-top: 0;
  }
}

.overview-block .section-title .icon {
  color: var(--color-text-muted);
}

.wish-list {
  display: flex;
  flex-direction: column;
  max-width: 760px;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.wish {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-2) var(--space-4) var(--space-4);
}

.wish + .wish {
  border-top: 1px solid var(--color-separator);
}

.wish__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}

.wish__title {
  font-size: var(--fs-lg);
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.wish__reason,
.wish__idea {
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.wish__idea {
  font-weight: 500;
}

.wish__meta {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
}

.wish__remove {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: var(--touch);
  height: var(--touch);
  margin-top: -6px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--color-text-muted);
}

@media (hover: hover) {
  .wish__remove:hover {
    background: var(--color-error-soft);
    color: var(--color-error);
  }
}

/* Naamkeuze in het "Wie ben jij?"-venster: één tik op je naam */
.name-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  max-height: 40vh;
  overflow-y: auto;
}

.name-chip {
  min-height: var(--touch);
  padding: 0 var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

@media (hover: hover) {
  .name-chip:hover {
    border-color: var(--color-border-strong);
    background: var(--color-surface-sunken);
  }
}

.name-chip[aria-pressed="true"] {
  border-color: var(--brand-navy);
  background: var(--brand-navy);
  color: #ffffff;
}

/* ── Vriezer: hoe vol is de snackvoorraad? ── */

.freezer {
  display: grid;
  grid-template-columns: 144px minmax(0, 1fr);
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  color: var(--color-text);
  text-decoration: none;
  box-shadow: var(--shadow-card);
}

.freezer__image {
  width: 144px;
  height: 108px;
  object-fit: contain;
}

.freezer__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.freezer__label {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  font-weight: 600;
}

.freezer__title {
  font-size: var(--fs-lg);
  font-weight: 700;
  line-height: 1.25;
}

.freezer__text {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
}

.freezer--leeg .freezer__title {
  color: var(--color-error);
}

.admin-freezer {
  max-width: 560px;
  margin-bottom: var(--space-5);
}

.admin-freezer:empty {
  display: none;
}

/* ── App-ervaring: installeren, updates en offline ── */

.icon--inline {
  display: inline-block;
  vertical-align: -3px;
}

/* De app voelt als app: knoppen en navigatie niet per ongeluk selecteren of laten "stuiteren" */
.app-bar,
.app-tabs,
.tab-bar,
.btn,
.stepper,
.name-chip {
  -webkit-user-select: none;
  user-select: none;
}

@media (display-mode: standalone) {
  html,
  body {
    overscroll-behavior-y: none;
  }
}

.connection--offline {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  background: var(--brand-navy);
  color: #ffffff;
}

.connection--offline .icon {
  flex: none;
  margin-top: 1px;
  color: var(--brand-yellow);
}

.offline-state .icon {
  color: var(--color-text-muted);
}

/* Nieuwe versie beschikbaar */
.app-update {
  position: fixed;
  right: var(--space-4);
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + var(--space-3));
  left: var(--space-4);
  z-index: 61;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  width: min(calc(100% - 2 * var(--space-4)), 480px);
  margin: 0 auto;
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--brand-navy);
  color: #ffffff;
  font-size: 0.9375rem;
  font-weight: 600;
  box-shadow: var(--shadow-raised);
  animation: toast-in var(--dur-base) var(--ease-out);
}

.has-order-bar .app-update {
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 92px);
}

/* Installatiepagina */
.install-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  max-width: 760px;
  margin-bottom: var(--space-5);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.install-status p {
  flex: 1;
  min-width: 200px;
}

.install-status__icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
}

.install-status--done {
  background: var(--color-success-soft);
  color: var(--color-success);
}

.install-guides {
  display: grid;
  gap: var(--space-3);
  max-width: 760px;
  margin: var(--space-4) 0 var(--space-5);
}

.install-guide {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.install-guide--mine {
  outline: 2px solid var(--brand-yellow);
}

.install-guide__header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.install-guide__icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--color-info-soft);
  color: var(--brand-navy);
}

.install-guide__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-lg);
  font-weight: 700;
  line-height: 1.25;
}

.install-guide__browsers {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
}

.install-guide__steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0;
  padding-left: 1.4em;
  list-style: decimal;
}

.install-guide__steps li::marker {
  font-weight: 700;
}

.install-faq {
  max-width: 760px;
}

.install-faq__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0;
  padding-left: 1.2em;
  list-style: disc;
}

/* ==========================================================================
   Corvee, verjaardagen en Office Bingo
   ========================================================================== */

/* ── Corvee: vast weekoverzicht ── */

.roster-week {
  display: flex;
  flex-direction: column;
}

.roster-day {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-1) var(--space-3);
  padding: var(--space-3) 0;
}

.roster-day + .roster-day {
  border-top: 1px solid var(--color-separator);
}

.roster-day--today {
  margin: 0 calc(var(--space-2) * -1);
  padding-inline: var(--space-2);
  border-radius: var(--radius-md);
  background: var(--color-surface-tint);
}

.roster-day__name {
  font-weight: 700;
}

.roster-day__team {
  min-width: 0;
}

.roster-day__empty {
  color: var(--color-text-muted);
  font-style: italic;
}

.roster-day__state {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
}

/* Beheer: weekrooster met naamknoppen per dag */
.roster-editor {
  display: grid;
  gap: var(--space-3);
}

.roster-editor__day {
  margin: 0;
  padding: var(--space-3);
  border: 1px solid var(--color-separator);
  border-radius: var(--radius-md);
}

.roster-editor__name {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0 var(--space-1);
  font-weight: 700;
}

.panel--wide {
  grid-column: 1 / -1;
}

/* ── Verjaardagen ── */

.party {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  overflow: hidden;
  padding: var(--space-5) var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--color-shell);
  color: var(--color-on-shell);
}

.party__title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--brand-yellow);
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-style: italic;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.party__names {
  font-size: var(--fs-xl);
}

.party__text {
  color: var(--color-on-shell-muted);
}

.party__confetti,
.bingo-party__confetti {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.party__confetti i,
.bingo-party__confetti i {
  position: absolute;
  top: -12px;
  left: calc(var(--i) * 7.3% + 2%);
  width: 8px;
  height: 14px;
  border-radius: 2px;
  background: var(--brand-yellow);
  animation: confetti 3.2s linear infinite;
  animation-delay: calc(var(--i) * -0.23s);
}

.party__confetti i:nth-child(3n),
.bingo-party__confetti i:nth-child(3n) {
  background: var(--brand-sky);
}

.party__confetti i:nth-child(4n),
.bingo-party__confetti i:nth-child(4n) {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffffff;
}

@keyframes confetti {
  to {
    transform: translateY(260px) rotate(540deg);
  }
}

.birthday-list {
  display: flex;
  flex-direction: column;
}

.birthday {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) 0;
}

.birthday + .birthday {
  border-top: 1px solid var(--color-separator);
}

.birthday__date {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--color-info-soft);
  color: var(--color-info);
  font-size: var(--fs-xs);
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}

.birthday__date strong {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-style: italic;
  font-weight: 800;
}

.birthday__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.birthday__name {
  font-weight: 700;
}

.birthday__when {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
}

.birthday--today .birthday__date {
  background: var(--brand-yellow);
  color: var(--brand-navy);
}

.birthday__cake {
  color: var(--brand-navy);
}

.date-fields {
  display: flex;
  gap: var(--space-2);
}

.date-fields select:first-of-type {
  width: 92px;
}

.date-fields select:last-of-type {
  min-width: 140px;
}

.birthday-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

/* ── Office Bingo ── */

.bingo-layout__board {
  display: flex;
  max-width: 680px;
  flex-direction: column;
  gap: var(--space-4);
  min-width: 0;
}

.bingo-progress {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}

.bingo-progress__text {
  display: flex;
  flex: 1 1 160px;
  flex-direction: column;
}

.bingo-progress__text span {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
}

.bingo-card {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius-lg);
  background: var(--color-shell);
  box-shadow: var(--shadow-card);
}

.bingo-cell {
  display: flex;
  min-height: 84px;
}

.bingo-cell__button,
.bingo-cell--free {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 3px;
  border: 0;
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  overflow-wrap: break-word;
  hyphens: auto;
  -webkit-hyphens: auto;
  transition: background-color var(--dur-base) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}

@media (hover: hover) {
  .bingo-cell__button:hover {
    background: var(--color-surface-tint);
  }
}

.bingo-cell__button:active {
  transform: scale(0.96);
}

.bingo-cell__button:focus-visible {
  outline-color: var(--brand-yellow);
  outline-offset: 1px;
}

.bingo-cell--checked .bingo-cell__button {
  background: var(--color-info-soft);
}

/* Wie het vakje afvinkte: een klein label onder de tekst */
.bingo-cell__by {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  max-width: 100%;
  padding: 1px 6px 1px 4px;
  border-radius: var(--radius-pill);
  background: var(--brand-navy);
  color: #ffffff;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.4;
}

.bingo-cell__by .icon {
  flex: none;
  color: var(--brand-yellow);
}

.bingo-cell__by-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bingo-cell__button {
  min-width: 0;
}

.bingo-cell__text {
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 767px) {
  .bingo-card {
    margin-inline: calc(var(--page-pad) * -1 + 8px);
    /* Concentrisch met de vakjes: buitenrand = vakjeshoek (8px) + rand (4px) */
    border-radius: 12px;
  }
}

.bingo-cell--free {
  flex-direction: column;
  gap: 4px;
  background: var(--brand-yellow);
  color: var(--brand-navy);
  font-weight: 800;
}

.bingo-cell__logo {
  width: 32px;
  height: 32px;
}

.bingo-cell--line .bingo-cell__button,
.bingo-cell--line.bingo-cell--free {
  box-shadow: inset 0 0 0 3px var(--brand-yellow);
}

.bingo-party {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-5);
  background: rgb(21 40 99 / 82%);
  color: #ffffff;
  text-align: center;
  animation: bingo-party-in 300ms var(--ease-out);
}

.bingo-party__word {
  color: var(--brand-yellow);
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 18vw, 7rem);
  font-style: italic;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  animation: bingo-word 700ms var(--ease-out);
}

.bingo-party__text {
  font-size: var(--fs-lg);
}

.bingo-party__top,
.bingo-progress__top {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 700;
}

.bingo-party__top {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  background: var(--brand-yellow);
  color: var(--brand-navy);
}

.bingo-progress__top {
  flex-basis: 100%;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  background: var(--color-warning-soft);
  color: var(--color-text);
}

.bingo-progress__top .icon {
  flex: none;
  color: var(--brand-navy);
}

/* De gebeurtenis bovenin "Wie vinkt dit af?" */
.bingo-who__event {
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: var(--color-surface-tint);
  color: var(--color-text);
  font-weight: 600;
}

@keyframes bingo-party-in {
  from {
    opacity: 0;
  }
}

@keyframes bingo-word {
  from {
    transform: scale(0.4) rotate(-8deg);
  }
}

/* ── Kantoorbeheer ── */

.office-admin {
  display: grid;
  gap: var(--space-5);
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  padding-top: var(--space-2);
}

.task-who {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: var(--color-surface-sunken);
}

.task-who__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.task-who .btn {
  align-self: flex-start;
}

.people-row .birthday-form {
  width: 100%;
  padding-left: 56px;
}

.icon-link {
  display: inline-grid;
  place-items: center;
  width: var(--touch);
  height: var(--touch);
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--color-text-muted);
}

@media (hover: hover) {
  .icon-link:hover {
    background: var(--color-error-soft);
    color: var(--color-error);
  }
}

/* ==========================================================================
   Grotere schermen
   ========================================================================== */

@media (min-width: 400px) {
  .me-button {
    padding-right: var(--space-2);
  }

  .me-button__name {
    display: inline;
  }
}

@media (min-width: 600px) {
  :root {
    --page-pad: 24px;
  }

  .dialog {
    width: min(480px, calc(100vw - 48px));
    margin: auto;
    border-radius: var(--radius-lg);
  }

  .dialog[open] {
    animation: dialog-in var(--dur-base) var(--ease-out);
  }

  .dialog__form {
    padding: var(--space-5);
  }

  .dialog__form::before {
    display: none;
  }

  .dialog__actions {
    flex-direction: row;
    justify-content: flex-end;
  }

  .dialog__actions .btn {
    width: auto;
  }

  .page__header--split {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
  }

  .page__title {
    font-size: 2rem;
  }

  .page__deadline {
    display: inline;
    white-space: nowrap;
  }

  .page__deadline::before {
    content: '\00b7  ';
  }

  .panel {
    padding: var(--space-5);
  }

  .treat-form__fields {
    grid-template-columns: 1fr 180px;
  }

  .question-card {
    --qc-pad: var(--space-6);
    padding: var(--space-6);
  }

  .question-card__form {
    margin-bottom: calc(var(--space-6) * -1);
  }

  .question-card__text {
    font-size: 2rem;
  }

  .choice-group {
    grid-template-columns: 1fr 1fr;
  }
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

@media (min-width: 768px) {

  .bingo-cell {
    min-height: 104px;
  }

  .bingo-cell__button,
  .bingo-cell--free {
    padding: var(--space-2);
    font-size: var(--fs-sm);
  }

  :root {
    --content-max: 760px;
  }

  .home__hero {
    margin: 0;
    padding: var(--space-6) var(--space-6) 84px;
    border-radius: var(--radius-lg);
  }

  .home__title {
    font-size: 2.75rem;
  }

  .home__tiles {
    margin: -64px var(--space-4) 0;
  }

  .order-cards,
  .prep-list {
    grid-template-columns: 1fr 1fr;
  }
}

/* Desktop: tabbalk wordt een zijbalk, inhoud krijgt de ruimte */
@media (min-width: 1024px) {
  .bingo-card {
    gap: 8px;
    max-width: 680px;
    padding: 8px;
  }

  .bingo-cell {
    min-height: 112px;
  }

  .office-admin {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .roster-editor {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }

  :root {
    --content-max: 1120px;
    --page-pad: 40px;
  }

  body {
    padding-left: var(--rail-w);
  }

  .tab-bar {
    top: 0;
    right: auto;
    width: var(--rail-w);
    padding: calc(var(--space-5) + env(safe-area-inset-top)) var(--space-4) var(--space-5);
    box-shadow: none;
  }

  .tab-bar__brand {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin: 0 var(--space-2) var(--space-6);
    color: var(--color-on-shell);
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-style: italic;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    text-transform: uppercase;
  }

  .tab-bar__brand .brand-mark {
    width: 40px;
    height: 40px;
  }

  .tab-bar__list {
    grid-template-columns: 1fr;
    gap: var(--space-1);
    max-width: none;
  }

  .tab-bar__item--desktop,
  .tab-bar__label-full {
    display: block;
  }

  .tab-bar__label-short {
    display: none;
  }

  .tab-bar__link {
    flex-direction: row;
    justify-content: flex-start;
    gap: var(--space-3);
    min-height: 52px;
    padding: 0 var(--space-2);
    font-size: var(--fs-md);
  }

  @media (hover: hover) {
    .tab-bar__link:hover {
      background: rgb(255 255 255 / 6%);
    }
  }

  @media (hover: hover) {
    .tab-bar__link:hover .tab-bar__icon {
      background: transparent;
    }
  }

  .tab-bar__link[aria-current='page'] {
    background: rgb(255 255 255 / 8%);
  }

  .tab-bar__link[aria-current='page'] .tab-bar__icon {
    background: var(--brand-yellow);
  }

  .tab-bar__icon {
    width: 40px;
    height: 40px;
  }

  .app-bar__brand {
    display: none;
  }

  .app-bar__title {
    font-size: 1.5rem;
  }

  body[data-section="home"] .app-bar__title {
    visibility: hidden;
  }


  .app-main {
    padding-bottom: var(--space-7);
  }

  .app-update,
  .has-order-bar .app-update {
    right: var(--space-6);
    bottom: calc(var(--space-6) + 64px);
    left: auto;
  }

  .toast-region,
  .has-order-bar .toast-region {
    right: var(--space-6);
    bottom: var(--space-6);
    left: auto;
    align-items: flex-end;
  }

  .home__tiles {
    grid-template-columns: repeat(3, 1fr);
  }

  .tile {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto 1fr;
    align-items: start;
    padding: var(--space-5);
  }

  .tile__icon {
    grid-column: 1;
    grid-row: 1;
  }

  .tile__meter {
    grid-column: 2;
    grid-row: 1;
  }

  .tile__body {
    grid-column: 1 / -1;
  }

  .order-form {
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: start;
  }

  .order-summary {
    position: sticky;
    top: calc(var(--bar-h) + 80px);
  }

  .order-bar {
    display: none;
  }

  .order-form--bar {
    padding-bottom: 0;
  }

  .admin-grid,
  .treat-columns {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .panel--narrow {
    max-width: 760px;
  }

  .order-cards {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

@media (min-width: 1280px) {
  .tile__title {
    font-size: var(--fs-xl);
  }
}

/* ── Minder beweging ── */

@media (prefers-reduced-motion: reduce) {
  .party__confetti,
  .bingo-party__confetti {
    display: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
