:root {
  --sapin-950: #051a11;
  --sapin-900: #0a2a1d;
  --sapin-800: #0f3a28;
  --sapin-700: #155037;
  --airelle: #a51d2d;
  --airelle-deep: #7c1220;
  --airelle-soft: #b82a3b;
  --or: #d8b464;
  --or-deep: #9a762b;
  --papier: #fdfaf3;
  --papier-2: #f2ead9;
  --encre: #1c2d5a;
  --encre-2: #4d5c86;
  --encre-3: rgba(28, 45, 90, 0.16);
  --encre-4: rgba(28, 45, 90, 0.07);
  --houx: #1f6b47;
  --veto: #b42318;

  --font-hand: 'Kalam', 'Segoe Print', cursive;
  --font-text: 'Spectral', Georgia, serif;

  --pw: min(calc(100vw - 20px), 620px);
  --ph: min(calc(100vh - 20px), 880px);
  --ew: min(84vw, 420px);
  --eh: calc(var(--ew) * 0.66);
  --flap: 0.58;

  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --firs: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='170'%3E%3Cg fill='%23ffffff' fill-opacity='.045'%3E%3Cpath d='M38 14l15 23h-8l13 19h-8l14 21H24l14-21h-8l13-19h-8z'/%3E%3Crect x='35' y='77' width='6' height='9'/%3E%3Cpath d='M113 99l12 18h-6l10 15h-6l11 17H86l11-17h-6l10-15h-6z'/%3E%3Crect x='110' y='149' width='5' height='7'/%3E%3C/g%3E%3C/svg%3E");
}

@supports (height: 100dvh) {
  :root { --ph: min(calc(100dvh - 20px), 880px); }
}

*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  overflow: hidden;
  color: var(--encre);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.6;
  background-color: var(--sapin-900);
  background-image:
    var(--firs),
    radial-gradient(ellipse 90% 70% at 50% 38%, var(--sapin-700) 0%, var(--sapin-800) 38%, var(--sapin-950) 100%);
  -webkit-font-smoothing: antialiased;
}

button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 3px solid var(--or); outline-offset: 3px; }

#snow { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

/* ---------- Envelope stage ---------- */

.stage { position: fixed; inset: 0; z-index: 1; }
.stage[hidden] { display: none; }

.env-group { position: absolute; inset: 0; }
[data-state='closed'] .env-group { animation: float 6s ease-in-out infinite; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-0.6deg); }
  50% { transform: translateY(-7px) rotate(0.6deg); }
}

.env-part {
  position: absolute;
  left: calc(50% - var(--ew) / 2);
  top: calc(50% - var(--eh) / 2);
  width: var(--ew);
  height: var(--eh);
}

.env-inside {
  z-index: 1;
  border-radius: 6px;
  background:
    radial-gradient(circle, rgba(216, 180, 100, 0.55) 1.2px, transparent 1.8px) 0 0 / 15px 15px,
    radial-gradient(circle, rgba(216, 180, 100, 0.35) 1px, transparent 1.6px) 7.5px 7.5px / 15px 15px,
    var(--sapin-800);
  box-shadow: 0 38px 70px -24px rgba(0, 0, 0, 0.75), 0 10px 20px -10px rgba(0, 0, 0, 0.5);
}

.env-pocket { z-index: 4; filter: drop-shadow(0 -1px 0 rgba(0, 0, 0, 0.12)); }
.env-pocket svg { display: block; width: 100%; height: 100%; }

.env-flap {
  z-index: 5;
  height: calc(var(--eh) * var(--flap));
  transform-origin: 50% 0;
  filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.3));
}
.env-flap.is-open { z-index: 2; filter: none; }

.flap-face, .flap-liner {
  position: absolute; inset: 0;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.flap-face {
  background: var(--noise), linear-gradient(180deg, var(--airelle-soft), var(--airelle) 70%);
}
.flap-liner {
  opacity: 0;
  background:
    radial-gradient(circle, rgba(216, 180, 100, 0.55) 1.2px, transparent 1.8px) 0 0 / 15px 15px,
    var(--sapin-700);
}
.env-flap.is-open .flap-liner { opacity: 1; }

.seal {
  position: absolute;
  z-index: 6;
  width: calc(var(--ew) * 0.21);
  aspect-ratio: 1;
  left: calc(50% - var(--ew) * 0.105);
  top: calc(50% - var(--eh) / 2 + var(--eh) * var(--flap) - var(--ew) * 0.105);
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.4));
}
.seal-half { position: absolute; inset: 0; }
.seal-half svg { display: block; width: 100%; height: 100%; }
.seal-half.left { clip-path: polygon(0 0, 54% 0, 46% 38%, 55% 62%, 47% 100%, 0 100%); }
.seal-half.right { clip-path: polygon(53% 0, 100% 0, 100% 100%, 46% 100%, 54% 62%, 45% 38%); }

.env-hit {
  z-index: 7;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  -webkit-tap-highlight-color: transparent;
}
.env-hit:focus-visible { outline-offset: 8px; }
[data-state='closed'] .env-hit:hover ~ .seal { transform: scale(1.04); }
.seal { transition: transform 0.25s ease; }
[data-state]:not([data-state='closed']) .env-hit { pointer-events: none; }

.hint {
  position: absolute;
  left: 0; right: 0;
  top: calc(50% + var(--eh) / 2 + 34px);
  margin: 0;
  text-align: center;
  font-family: var(--font-hand);
  font-size: 1.3rem;
  color: rgba(253, 250, 243, 0.82);
  transition: opacity 0.3s ease;
}
[data-state]:not([data-state='closed']):not([data-state='loading']) .hint { opacity: 0; }

/* ---------- Folded paper (animation stand-in for the letter) ---------- */

.paper {
  position: absolute;
  z-index: 3;
  left: calc(50% - var(--pw) / 2);
  top: calc(50% - var(--ph) / 2);
  width: var(--pw);
  height: var(--ph);
  visibility: hidden;
  pointer-events: none;
}
.paper.is-visible { visibility: visible; }

.fold {
  position: absolute;
  left: 0; right: 0;
  height: calc(100% / 3 + 0.5px);
  background: var(--noise), var(--papier);
  transform-style: preserve-3d;
}
.fold-top { top: 0; z-index: 2; transform-origin: 50% 100%; border-radius: 4px 4px 0 0; }
.fold-mid { top: calc(100% / 3); z-index: 3; }
.fold-bot { bottom: 0; z-index: 1; transform-origin: 50% 0; border-radius: 0 0 4px 4px; }
.fold { box-shadow: 0 0 0 0.5px rgba(28, 45, 90, 0.08), 0 14px 30px -16px rgba(0, 0, 0, 0.45); }

.fold-content {
  position: absolute; inset: 0;
  padding: clamp(20px, 5vw, 44px) clamp(18px, 5.5vw, 48px) 0;
  backface-visibility: hidden;
  overflow: hidden;
}
.fold-mid .fold-content, .fold-bot .fold-content { padding-top: 18px; }
.mock-line {
  height: 9px;
  margin: 0 0 17px;
  border-radius: 5px;
  background: var(--encre-4);
}

/* ---------- The letter ---------- */

.letter {
  position: fixed;
  z-index: 4;
  left: 50%;
  top: 50%;
  width: var(--pw);
  height: var(--ph);
  transform: translate(-50%, -50%);
}
.letter[hidden] { display: none; }

.under-sheet, .sheet {
  position: absolute;
  inset: 0;
  border-radius: 4px;
}
.under-sheet {
  background: var(--noise), var(--papier-2);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
}
.under-sheet.one { transform: rotate(-1.8deg) translate(-5px, 7px); }
.under-sheet.two { transform: rotate(1.3deg) translate(6px, 4px); }

.sheet {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overflow: clip;
  background:
    linear-gradient(180deg, transparent calc(100% / 3 - 1px), rgba(28, 45, 90, 0.05) calc(100% / 3), rgba(255, 255, 255, 0.6) calc(100% / 3 + 1px), transparent calc(100% / 3 + 2px)),
    linear-gradient(180deg, transparent calc(200% / 3 - 1px), rgba(28, 45, 90, 0.05) calc(200% / 3), rgba(255, 255, 255, 0.6) calc(200% / 3 + 1px), transparent calc(200% / 3 + 2px)),
    var(--noise),
    var(--papier);
  box-shadow: 0 30px 70px -22px rgba(0, 0, 0, 0.7), 0 3px 8px rgba(0, 0, 0, 0.2);
}
.sheet[hidden] { display: none; }

.sheet-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(20px, 5vw, 44px) clamp(18px, 5.5vw, 48px) 28px;
  scroll-padding-bottom: 24px;
  scrollbar-width: thin;
  scrollbar-color: rgba(28, 45, 90, 0.25) transparent;
}

.sheet-foot {
  position: relative;
  flex: none;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 10px clamp(12px, 4vw, 26px) calc(10px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--encre-3);
}
.folio {
  justify-self: center;
  font-family: var(--font-hand);
  font-size: 1.05rem;
  color: var(--encre-2);
}

.foot-error {
  position: absolute;
  left: 12px; right: 12px;
  bottom: calc(100% + 10px);
  margin: 0;
  padding: 9px 14px;
  border-radius: 10px;
  background: var(--airelle-deep);
  color: var(--papier);
  font-weight: 500;
  font-size: 0.98rem;
  line-height: 1.4;
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.35);
}
.foot-error[hidden] { display: none; }

/* ---------- Typography on paper ---------- */

.title {
  margin: 0 0 0.6em;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: clamp(2.1rem, 8vw, 2.9rem);
  line-height: 1.05;
  color: var(--encre);
  transform: rotate(-1.2deg);
  transform-origin: left center;
}
.title:focus { outline: none; }
.subtitle {
  margin: 1.8em 0 0.5em;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 1.55rem;
  line-height: 1.15;
  color: var(--encre);
}
.sheet p { margin: 0 0 0.9em; max-width: 62ch; }
.sheet strong { font-weight: 600; }
.muted { color: var(--encre-2); }
.small { font-size: 0.94rem; }

.list { margin: 0 0 1em; padding-left: 1.1em; }
.list li { margin-bottom: 0.45em; padding-left: 0.2em; }
.list li::marker { content: '✶  '; color: var(--airelle); font-size: 0.8em; }

.signature {
  margin-top: 1.2em;
  font-family: var(--font-hand);
  font-size: 1.6rem;
  color: var(--encre);
  transform: rotate(-2deg);
  transform-origin: left center;
}

.callout {
  margin: 1.2em 0;
  padding: 14px 16px;
  border: 1.5px dashed rgba(165, 29, 45, 0.35);
  border-radius: 12px;
}
.callout p:last-child { margin-bottom: 0; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 20px;
  border: 0;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--airelle);
  color: var(--papier);
  box-shadow: 0 2px 0 var(--airelle-deep), 0 8px 16px -8px rgba(0, 0, 0, 0.3);
}
.btn-primary:hover { background: var(--airelle-soft); }
.btn-primary:disabled { opacity: 0.6; cursor: progress; }
.btn-ghost {
  background: transparent;
  color: var(--encre-2);
  padding-inline: 8px;
}
.btn-ghost:hover { color: var(--encre); text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Page 1: who are you ---------- */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0.4em 0 0.8em;
  padding: 0;
  border: 0;
}
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip-face {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 6px 16px;
  border: 1.5px solid var(--encre-3);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  font-family: var(--font-hand);
  font-size: 1.2rem;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.chip-face:hover { border-color: var(--encre-2); }
.chip input:checked + .chip-face { background: var(--encre); border-color: var(--encre); color: var(--papier); }
.chip input:focus-visible + .chip-face { outline: 3px solid var(--or); outline-offset: 2px; }
.chip .done { font-size: 0.85rem; color: var(--houx); }
.chip input:checked + .chip-face .done { color: #9fd8b5; }

.note {
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(216, 180, 100, 0.18);
  font-size: 0.96rem;
}
.note[hidden] { display: none; }

/* ---------- Page 2: dates ---------- */

.date-list { list-style: none; margin: 0 0 1em; padding: 0; }
.date-row {
  display: grid;
  grid-template-columns: 2rem 1fr auto;
  align-items: center;
  gap: 4px 10px;
  margin-bottom: 8px;
  padding: 8px 8px 8px 12px;
  border: 1px solid var(--encre-3);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.65);
}
.date-rank {
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--airelle);
  text-align: center;
}
.date-label { font-weight: 600; line-height: 1.25; }
.date-actions { display: flex; align-items: center; gap: 4px; }
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--encre-3);
  border-radius: 10px;
  background: var(--papier);
  color: var(--encre);
}
.icon-btn:hover:not(:disabled) { border-color: var(--encre-2); }
.icon-btn:disabled { opacity: 0.3; cursor: default; }
.icon-btn svg { width: 18px; height: 18px; }
.off-btn {
  min-height: 40px;
  padding: 4px 10px;
  border: 1px dashed rgba(165, 29, 45, 0.5);
  border-radius: 10px;
  background: transparent;
  color: var(--airelle-deep);
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
}
.off-btn:hover { background: rgba(165, 29, 45, 0.07); }

.date-list.is-off .date-row { background: transparent; border-style: dashed; grid-template-columns: 1fr auto; }
.date-list.is-off .date-label { color: var(--encre-2); text-decoration: line-through; text-decoration-color: var(--airelle); text-decoration-thickness: 1.5px; }
.date-list.is-off .off-btn { border-color: rgba(31, 107, 71, 0.5); color: var(--houx); }
.list-title { margin: 1.2em 0 0.4em; font-family: var(--font-hand); font-size: 1.2rem; color: var(--encre-2); }
.list-title[hidden], .date-list[hidden] { display: none; }

/* ---------- Page 3: menu ---------- */

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0 0 1.2em;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
  color: var(--encre-2);
}
.legend span { font-size: 1.15rem; margin-right: 4px; }

.course { margin-top: 1.6em; }
.course-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 12px; margin-bottom: 0.6em; }
.course-head .subtitle { margin: 0; }
.course-rule { font-family: var(--font-hand); color: var(--airelle); font-size: 1.05rem; }

.dish {
  display: grid;
  grid-template-columns: 84px 1fr;
  grid-template-areas: 'media text' 'vote vote';
  gap: 10px 14px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--encre-3);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.dish.is-missing { border-color: var(--airelle); box-shadow: 0 0 0 3px rgba(165, 29, 45, 0.14); }
.dish-media { grid-area: media; position: relative; }
.dish-img {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--papier-2);
  transition: filter 0.3s ease;
}
.dish-text { grid-area: text; min-width: 0; }
.dish-name { margin: 0; font-size: 1.06rem; font-weight: 600; line-height: 1.3; }
.dish-desc { margin: 2px 0 0 !important; font-size: 0.92rem; font-style: italic; color: var(--encre-2); line-height: 1.35; }
.dish-choice { margin: 4px 0 0 !important; font-family: var(--font-hand); font-size: 1.05rem; color: var(--encre); min-height: 1.4em; }

.dish-vote { grid-area: vote; display: flex; align-items: stretch; gap: 6px; }
.grades { display: flex; flex: 1; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.grade { flex: 1; position: relative; }
.grade input { position: absolute; opacity: 0; pointer-events: none; }
.grade .face {
  display: grid;
  place-items: center;
  height: 46px;
  border: 1.5px solid var(--encre-3);
  border-radius: 12px;
  background: var(--papier);
  font-size: 1.35rem;
  cursor: pointer;
  filter: grayscale(0.55);
  transition: transform 0.15s ease, border-color 0.15s ease, background-color 0.15s ease, filter 0.15s ease;
}
.grade .face:hover { filter: none; border-color: var(--encre-2); }
.grade input:checked + .face {
  filter: none;
  border: 2px solid var(--encre);
  background: rgba(28, 45, 90, 0.09);
  transform: scale(1.06);
}
.grade input:focus-visible + .face { outline: 3px solid var(--or); outline-offset: 2px; }

.veto-btn {
  flex: none;
  min-width: 58px;
  padding: 0 10px;
  border: 1.5px dashed rgba(180, 35, 24, 0.55);
  border-radius: 12px;
  background: transparent;
  color: var(--veto);
  font-weight: 600;
  font-size: 0.92rem;
}
.veto-btn:hover { background: rgba(180, 35, 24, 0.07); }

.veto-box, .veto-note { grid-area: vote; }
.veto-box[hidden], .veto-note[hidden], .dish-vote[hidden] { display: none; }
.veto-box label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.95rem; color: var(--veto); }
.veto-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.veto-actions .btn { min-height: 40px; padding: 6px 14px; font-size: 0.95rem; }
.btn-veto { background: var(--veto); color: var(--papier); }

.veto-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px 8px 14px;
  border-radius: 10px;
  background: rgba(180, 35, 24, 0.07);
  color: var(--veto);
  font-size: 0.95rem;
}
.veto-note q { font-style: italic; }
q { quotes: '« a0' ' a0»'; }
.veto-note .btn { min-height: 38px; padding: 4px 10px; color: var(--veto); }

.stamp {
  position: absolute;
  left: 50%;
  top: 50%;
  padding: 0 6px;
  border: 2.5px solid var(--veto);
  border-radius: 6px;
  background: rgba(253, 250, 243, 0.82);
  color: var(--veto);
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  line-height: 1.4;
  transform: translate(-50%, -50%) rotate(-14deg);
  opacity: 0;
  pointer-events: none;
}
.dish.is-vetoed .stamp { opacity: 1; animation: stamp 0.28s cubic-bezier(.3, 1.6, .5, 1); }
.dish.is-vetoed .dish-img { filter: grayscale(1) contrast(0.85); }
@keyframes stamp { from { transform: translate(-50%, -50%) rotate(-14deg) scale(1.8); opacity: 0; } }

.dessert {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1.5px dashed var(--encre-3);
  border-radius: 14px;
}
.dessert-mark { font-size: 2rem; line-height: 1; }
.dessert p { margin: 0 !important; }

.field { margin: 0 0 1.2em; padding: 0; border: 0; }
.field-label { display: block; margin-bottom: 6px; font-weight: 600; }
.field-hint { display: block; margin: -4px 0 6px; font-size: 0.92rem; color: var(--encre-2); }
textarea {
  display: block;
  width: 100%;
  min-height: 74px;
  padding: 10px 12px;
  border: 1.5px solid var(--encre-3);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.75);
  line-height: 1.45;
  resize: vertical;
}
textarea:focus { outline: none; border-color: var(--encre); box-shadow: 0 0 0 3px rgba(28, 45, 90, 0.12); }
textarea::placeholder { color: rgba(77, 92, 134, 0.7); font-style: italic; }

.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill-face {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 16px;
  border: 1.5px solid var(--encre-3);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  font-size: 0.98rem;
  cursor: pointer;
}
.pill-face:hover { border-color: var(--encre-2); }
.pill input:checked + .pill-face { background: var(--encre); border-color: var(--encre); color: var(--papier); }
.pill input:focus-visible + .pill-face { outline: 3px solid var(--or); outline-offset: 2px; }
.field.is-missing .pill-face { border-color: rgba(165, 29, 45, 0.6); }

/* ---------- Page 4: secret santa ---------- */

.budget {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 1.4em 0 !important;
}
.budget-amount {
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 3.4rem;
  line-height: 1;
  color: var(--airelle);
  transform: rotate(-4deg);
}
.budget-label { color: var(--encre-2); }

/* ---------- Recap ---------- */

.recap {
  position: fixed;
  z-index: 5;
  left: 50%;
  top: 50%;
  width: var(--pw);
  max-height: var(--ph);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(28, 45, 90, 0.25) transparent;
  transform: translate(-50%, -50%);
  padding: clamp(22px, 5vw, 44px) clamp(18px, 5.5vw, 48px);
  border-radius: 4px;
  background: var(--noise), var(--papier);
  box-shadow: 0 30px 70px -22px rgba(0, 0, 0, 0.7), 0 3px 8px rgba(0, 0, 0, 0.2);
}
.recap[hidden] { display: none; }
.recap p { margin: 0 0 0.9em; }

.sent-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.8em;
  font-family: var(--font-hand);
  font-size: 1.05rem;
  color: var(--houx);
}
.sent-mark svg { width: 22px; height: 22px; }

.poll { list-style: none; margin: 0 0 1em; padding: 0; }
.poll li { margin-bottom: 14px; }
.poll-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.poll-label { font-weight: 600; }
.poll-lead { margin-left: 8px; font-family: var(--font-hand); color: var(--airelle); font-weight: 400; }
.poll-count { color: var(--encre-2); font-size: 0.95rem; white-space: nowrap; }
.poll-bar { height: 8px; margin-top: 5px; border-radius: 4px; background: var(--encre-4); overflow: hidden; }
.poll-bar span { display: block; height: 100%; border-radius: 4px; background: var(--houx); }
.poll-off { margin-top: 3px !important; font-size: 0.9rem; color: var(--encre-2); }

.summary { margin: 0 0 1.2em; }
.summary dt { margin-top: 0.9em; font-weight: 600; }
.summary dd { margin: 0.15em 0 0; color: var(--encre); }
.summary ol, .summary ul { margin: 0.2em 0 0; padding-left: 1.3em; }
.summary .veto { color: var(--veto); }

.recap-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 1.6em; }

/* ---------- Status messages on the green ---------- */

.fatal {
  position: fixed;
  z-index: 10;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  width: min(calc(100vw - 32px), 460px);
  margin: 0;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--papier);
  color: var(--airelle-deep);
  font-weight: 600;
  text-align: center;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.6);
}
.fatal[hidden] { display: none; }

@media (max-width: 420px) {
  body { font-size: 1rem; }
  .dish { grid-template-columns: 68px 1fr; padding: 10px; gap: 8px 12px; }
  .dish-img { width: 68px; height: 68px; }
  .grade .face { height: 42px; font-size: 1.2rem; }
  .grades, .dish-vote { gap: 4px; }
  .veto-btn { min-width: 50px; padding: 0 6px; font-size: 0.85rem; }
  .date-row { grid-template-columns: 1.6rem 1fr auto; padding-left: 8px; gap: 4px 6px; }
  .icon-btn { width: 36px; height: 38px; }
  .off-btn { padding: 4px 7px; font-size: 0.82rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
