@font-face { font-family: "Italianno"; font-weight: 400; font-display: block;
  src: url("/fonts/italianno-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Italianno"; font-weight: 400; font-display: block;
  src: url("/fonts/italianno-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cormorant Garamond"; font-weight: 300 700; font-display: swap;
  src: url("/fonts/cormorant-garamond-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant Garamond"; font-weight: 300 700; font-display: swap;
  src: url("/fonts/cormorant-garamond-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 300 700; font-display: swap;
  src: url("/fonts/cormorant-garamond-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 300 700; font-display: swap;
  src: url("/fonts/cormorant-garamond-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* Theme tokens (paper, ink, faces) live in themes.css. */
:root {
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-peel: cubic-bezier(.65, 0, .25, 1);
  --gutter: clamp(24px, 7vw, 56px);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html {
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: var(--paper);
  scrollbar-width: thin;
  scrollbar-color: var(--hair) transparent;
  scrollbar-gutter: stable; /* the intro hides the scrollbar; keep the column from shifting when it returns */
}
html:has(body.is-program) { scroll-snap-type: none; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.4;
  text-align: center;
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
  font-synthesis: none; /* faces with one weight stay true rather than smeared bold */
}
/* Paper grain sits on a fixed sheet; on desktop that sheet becomes the card. */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background: var(--paper);
  pointer-events: none;
}
body::after {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background-image: var(--grain);
  opacity: var(--grain-alpha);
  mix-blend-mode: var(--grain-blend);
  pointer-events: none;
}
::selection { background: var(--ink); color: var(--paper); }
a { color: inherit; }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 6px; border-radius: 2px; }
p, h1, h2 { margin: 0; }

.script {
  font-family: var(--script); font-weight: var(--script-weight); font-style: var(--script-style);
  text-transform: var(--script-case); letter-spacing: var(--script-track); line-height: 1; color: var(--accent);
}
.cap { font-size: 12px; letter-spacing: .32em; padding-left: .32em; text-transform: uppercase; color: var(--soft); font-weight: 600; }

/* ---------- Pages ---------- */
.page {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  scroll-snap-align: start;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: max(env(safe-area-inset-top), 40px) var(--gutter) calc(env(safe-area-inset-bottom) + 76px);
}
.inner {
  align-self: center;
  width: 100%;
  max-width: 26rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Cover + finale share one card grammar */
.hello { font-size: calc(clamp(64px, 19vw, 96px) * var(--script-scale)); padding: 0 .14em .08em calc(.14em + max(var(--script-track), 0em)); }
.event {
  margin: 1.5rem 0 .35rem;
  font-size: 15px; font-weight: 600; letter-spacing: .34em; padding-left: .34em;
  text-transform: uppercase; line-height: 1.6; text-wrap: balance;
}
.when { font-style: italic; color: var(--soft); font-size: 19px; text-wrap: balance; }
.dot { padding: 0 .1em; }
.rule { display: block; width: 64px; height: 1px; background: var(--line); margin: 1.9rem auto; transform-origin: center; }
.welcome { font-style: italic; font-size: 21px; line-height: 1.45; max-width: 30ch; text-wrap: pretty; }
.welcome p + p { margin-top: .8em; }
.sign { margin-top: 1.1rem; font-style: italic; font-size: 19px; color: var(--soft); display: flex; align-items: center; gap: .7rem; }
.sign::before { content: ""; width: 22px; height: 1px; background: var(--hair); }
.aside-link {
  display: inline-block; margin-top: 2rem;
  font-size: 12px; letter-spacing: .32em; padding: .7rem 0 .7rem .32em; text-transform: uppercase; font-weight: 600;
  color: var(--soft); text-decoration: none;
  border-bottom: 1px solid transparent; transition: color .3s, border-color .3s;
}
.aside-link:hover { color: var(--ink); border-bottom-color: var(--hair); }
.aside-link[hidden] { display: none; }

/* Course */
.label {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  font-size: 15px; font-weight: 600; letter-spacing: .42em; text-transform: uppercase;
}
.label span { padding-left: .42em; }
.hair { width: 44px; height: 2px; overflow: visible; flex: none; }
.hair path, .orn path { fill: none; stroke: var(--line); stroke-width: .9; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.name {
  margin: 1.5rem 0 .7rem;
  font-size: clamp(25px, 7.4vw, 30px);
  font-weight: 500;
  letter-spacing: .1em; padding-left: .1em;
  text-transform: uppercase;
  line-height: 1.25;
  text-wrap: balance;
}
.desc { font-style: italic; font-size: 20px; line-height: 1.4; max-width: 28ch; text-wrap: balance; }
.desc { list-style: none; margin: 0; padding: 0; }
.desc li { display: inline; }
.ph { white-space: nowrap; }
.bar { color: var(--hair); font-style: normal; }
.orn { width: 190px; height: 27px; margin: 1.6rem auto 1.4rem; overflow: visible; }
.orn .o-heart { fill: var(--line); }
.orn .o-petal, .orn .o-leaf { stroke-width: .8; }
.pair { display: flex; flex-direction: column; gap: .35rem; align-items: center; }
.pair-text { font-style: italic; font-size: 20px; }
.allergens { margin-top: 1.6rem; display: flex; flex-direction: column; align-items: center; gap: .35rem; max-width: 30ch; }
.al-list { font-style: italic; font-size: 18px; color: var(--soft); text-wrap: balance; }
.al { white-space: nowrap; }
.diet { color: var(--ink); margin-bottom: .5rem; }

/* Finale */
.closing { margin-top: 1.4rem; font-style: italic; font-size: 22px; line-height: 1.45; max-width: 26ch; text-wrap: balance; }
.mono { font-size: calc(clamp(64px, 19vw, 92px) * var(--script-scale)); line-height: 1.15; padding: 0 .25em 0 calc(.25em + max(var(--script-track), 0em)); transform: translateX(var(--script-nudge, 0)); }
.amp { font-size: .62em; vertical-align: .12em; padding: 0 .04em; }
.finale-links { display: flex; flex-direction: column; align-items: center; margin-top: 1rem; }
.finale-links .aside-link { margin-top: .2rem; }

/* Next-course cue */
.next {
  justify-self: center;
  display: inline-flex; flex-direction: column; align-items: center; gap: .55rem;
  text-decoration: none; color: var(--soft);
  font-style: italic; font-size: 17px;
  padding: .4rem 1rem;
  -webkit-tap-highlight-color: transparent;
}
.next i { display: block; width: 1px; height: 34px; background: linear-gradient(var(--hair), transparent); position: relative; overflow: hidden; }
.next i::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--ink); animation: drip 2.8s var(--ease-out) infinite 1.2s; }
.next:hover { color: var(--ink); }
@keyframes drip { 0% { top: -40%; } 60%, 100% { top: 110%; } }

/* Step indicator */
.steps {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 18px);
  transform: translateX(-50%);
  display: flex; align-items: center; gap: .2rem;
  z-index: 5;
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out);
}
.steps a {
  position: relative; display: grid; place-items: center;
  min-width: 44px; height: 44px;
  font-size: 14px; letter-spacing: .12em; font-weight: 600;
  color: var(--soft); text-decoration: none; transition: color .4s;
}
.steps a::after {
  content: ""; position: absolute; left: 50%; bottom: 8px; width: 14px; height: 1px; margin-left: -7px;
  background: var(--line); transform: scaleX(0); transition: transform .5s var(--ease-out);
}
.steps a[aria-current="step"] { color: var(--ink); }
.steps a[aria-current="step"]::after { transform: scaleX(1); }
.steps .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--hair); }
/* Many courses: quiet dots instead of numerals */
.steps.dots { gap: 0; }
.steps.dots a { min-width: 30px; }
.steps.dots a::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--hair); transition: background .4s, transform .4s var(--ease-out); }
.steps.dots a[aria-current="step"]::before { background: var(--ink); transform: scale(1.3); }
.steps.dots a::after { display: none; }
.js .steps.is-hidden { opacity: 0; transform: translate(-50%, 10px); pointer-events: none; }

.preview-tag {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 20;
  font-size: 11px; letter-spacing: .28em; padding: .45rem .9rem .45rem 1.18rem; text-transform: uppercase;
  background: var(--ink); color: var(--paper); border-radius: 99px; font-weight: 600;
}

/* ---------- Program subpage ---------- */
.program { max-width: 30rem; margin: 0 auto; padding: max(env(safe-area-inset-top), 56px) var(--gutter) 72px; }
.program-head { display: flex; flex-direction: column; align-items: center; }
.program-head .rule { margin-bottom: 1rem; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { display: flex; flex-direction: column; align-items: center; gap: .2rem; padding: 1.5rem 0; }
.timeline li + li { border-top: 1px solid color-mix(in srgb, var(--hair) 45%, transparent); }
.t-time { font-size: 13px; letter-spacing: .3em; padding-left: .3em; font-weight: 600; color: var(--soft); font-variant-numeric: lining-nums tabular-nums; }
.t-title { font-size: 22px; letter-spacing: .1em; padding-left: .1em; text-transform: uppercase; font-weight: 500; }
.t-note { font-style: italic; font-size: 19px; color: var(--soft); }
.program .back { margin-top: 1.4rem; }

/* ---------- Intro: "Meny" is written, then takes its place ---------- */
.intro { display: none; }
.js.intro-on { overflow: hidden; }
.js.intro-on .intro {
  display: grid; place-items: center;
  position: fixed; inset: 0; z-index: 10;
  background: var(--paper);
  cursor: pointer;
}
.js.intro-on .intro::after { /* same grain as the card, so the hand-off is seamless */
  content: ""; position: absolute; inset: 0; background-image: var(--grain);
  opacity: var(--grain-alpha); mix-blend-mode: var(--grain-blend); pointer-events: none;
}
.js.intro-on .intro.fading::after { opacity: 0; transition: opacity .9s ease-out .35s; }
.intro-word {
  position: relative; z-index: 1;
  font-size: calc(clamp(84px, 28vw, 124px) * var(--script-scale)); padding: 0 .14em .08em calc(.14em + max(var(--script-track), 0em));
  transform-origin: 0 0; will-change: transform;
}
.js.intro-on .intro-word { animation: write 1.8s var(--ease-peel) .15s both; }
.js.intro-on .cover .hello { visibility: hidden; }
@keyframes write { from { clip-path: inset(-30% 100% -30% -30%); } to { clip-path: inset(-30% -30% -30% -30%); } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Each page is set as it arrives ---------- */
/* The intro word has already written the cover's heading: it arrives set. */
.js .page .hello.landed { transition: none; clip-path: none; }
@media (prefers-reduced-motion: no-preference) {
  .js .page .hello, .js .page .mono { transition: clip-path 1.5s var(--ease-peel) .1s; clip-path: inset(-30% -30% -30% -30%); }
  .js .page:not(.is-in) :is(.hello, .mono) { clip-path: inset(-30% 100% -30% -30%); }

  .js .page :is(.label span, .event, .when, .name, .desc, .pair, .allergens, .welcome, .sign, .closing, .aside-link) {
    transition: opacity 1.1s var(--ease-out), transform 1.1s var(--ease-out), letter-spacing 1.4s var(--ease-out);
  }
  .js .page:not(.is-in) :is(.label span, .event, .when, .name, .desc, .pair, .allergens, .welcome, .sign, .closing, .aside-link) {
    opacity: 0; transform: translateY(12px);
  }
  .js .page:not(.is-in) .event { letter-spacing: .5em; }
  .js .page:not(.is-in) .name { letter-spacing: .26em; }
  .js .page:not(.is-in) .label span { letter-spacing: .7em; }
  .js .page.is-in :is(.event, .name) { transition-delay: .45s; }
  .js .page.is-in :is(.when, .desc) { transition-delay: .65s; }
  .js .page.is-in :is(.welcome, .pair, .closing) { transition-delay: 1s; }
  .js .page.is-in :is(.sign, .allergens) { transition-delay: 1.2s; }
  .js .page.is-in .aside-link { transition-delay: 1.4s; }

  .js .page .rule { transition: transform 1.2s var(--ease-out) .8s; }
  .js .page:not(.is-in) .rule { transform: scaleX(0); }

  /* Hairlines draw outward from the label, the ornament after the description. */
  /* Dash a touch longer than the path: with non-scaling strokes Chrome measures in screen units, and a
     scaled-up ornament would otherwise stop just short of its end. */
  .js .page :is(.hair, .orn) path { stroke-dasharray: 1.5; stroke-dashoffset: 0; }
  .js .page .hair path { transition: stroke-dashoffset 1.1s var(--ease-out) .15s; }
  /* The flourish grows from its flower: petals, then leaves, then vines and their scrolls outward. */
  .js .page .orn path { transition: stroke-dashoffset 1.2s var(--ease-peel) .9s; }
  .js .page .orn .o-leaf { transition-delay: 1.2s; }
  .js .page .orn .o-vine { transition-duration: 1.6s; transition-delay: 1.35s; }
  .js .page .orn .o-scroll { transition-duration: 1.1s; transition-delay: 1.9s; }
  .js .page .orn .o-heart { transition: opacity .6s ease-out .9s, transform .8s var(--ease-out) .9s; transform-origin: 100px 14px; }
  .js .page:not(.is-in) .orn .o-heart { opacity: 0; transform: scale(.2); }
  .js .page:not(.is-in) :is(.hair, .orn) path { stroke-dashoffset: 1.5; }

  .js .page .next { transition: opacity 1s var(--ease-out) 1.6s; }
  .js .page:not(.is-in) .next { opacity: 0; transition-delay: 0s; }

  .js .is-program .timeline li { animation: rise .9s var(--ease-out) both; }
  .js .is-program .timeline li:nth-child(2) { animation-delay: .08s; }
  .js .is-program .timeline li:nth-child(3) { animation-delay: .16s; }
  .js .is-program .timeline li:nth-child(n+4) { animation-delay: .24s; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .next i::after { animation: none; }
}

/* ---------- Desktop: the card lies on a table ---------- */
@media (min-width: 760px) {
  html { background: var(--table); }
  body { font-size: 21px; }
  body::before, body::after {
    left: 50%; right: auto; width: min(36rem, 88vw); transform: translateX(-50%);
    top: 4vh; bottom: 4vh;
  }
  body::before { box-shadow: var(--shadow); outline: 1px solid color-mix(in srgb, var(--hair) 50%, transparent); outline-offset: -14px; }
  .inner { max-width: 28rem; }
  .page { padding-top: 9vh; padding-bottom: calc(4vh + 124px); }
  .page .next { margin-bottom: 4px; }
  .hello { font-size: calc(104px * var(--script-scale)); }
  .event { font-size: 16px; }
  .label { font-size: 16px; }
  .name { font-size: 32px; }
  .desc, .pair-text, .welcome { font-size: 22px; }
  .al-list { font-size: 19px; }
  .cap, .aside-link { font-size: 13px; }
  .steps { bottom: calc(4vh + 22px); }
  .program { padding-top: 12vh; }
}
@media (max-height: 640px) {
  .orn { margin: 1rem auto .9rem; }
  .allergens { margin-top: 1.1rem; }
  .rule { margin: 1.3rem auto; }
  .name { margin-top: 1.1rem; }
}
.preview-tag ~ .program { padding-top: calc(max(env(safe-area-inset-top), 56px) + 40px); }


/* ---------- Quiz (an insert in the menu card) ---------- */
html:has(body.is-quiz) { scroll-snap-type: none; }
.quiz { max-width: 30rem; margin: 0 auto; padding: max(env(safe-area-inset-top), 48px) var(--gutter) 24px; min-height: calc(100svh - 72px); display: grid; align-content: center; }
.preview-tag ~ .quiz { padding-top: calc(max(env(safe-area-inset-top), 48px) + 40px); }
.quiz-card { display: flex; flex-direction: column; align-items: center; gap: 0; animation: rise .9s var(--ease-out) both; }
.quiz-card .event { margin-top: 1.2rem; }
.quiz-card .rule { margin: 1.6rem auto; }
.quiz-card.question .label { margin-bottom: .4rem; }
.q-count { margin-bottom: 1.6rem; }
.q-prompt { font-style: italic; font-weight: 400; font-size: clamp(24px, 6.8vw, 30px); line-height: 1.3; text-wrap: balance; margin: 0 0 1.8rem; max-width: 24ch; }
.line-input {
  width: 100%; max-width: 22rem; margin: .2rem auto 0; display: block;
  font: italic 22px/1.3 var(--serif); color: var(--ink); text-align: center;
  background: transparent; border: 0; border-bottom: 1px solid var(--hair); border-radius: 0;
  padding: .55rem .25rem; transition: border-color .3s;
}
.line-input::placeholder { color: var(--soft); opacity: .75; }
.line-input:focus { outline: none; border-bottom-color: var(--ink); }
.line-input:disabled { color: var(--soft); border-bottom-style: dotted; }
.track-fields { display: grid; gap: .9rem; width: 100%; }
.one-field { position: relative; width: 100%; max-width: 22rem; margin: 0 auto; }
.one-field .line-input { max-width: none; }
.one-field:has(.unit) .line-input { padding-inline: 4.5rem; }
.unit { position: absolute; right: .25rem; bottom: .7rem; font-style: italic; color: var(--soft); font-size: 18px; pointer-events: none; }
.choices { display: grid; gap: .25rem; width: 100%; }
.choice {
  font: 600 15px/1.4 var(--serif); letter-spacing: .24em; text-transform: uppercase; color: var(--soft);
  background: none; border: 0; padding: .85rem .5rem .85rem .74em; cursor: pointer; position: relative;
  transition: color .3s;
}
.choice::after { content: ""; position: absolute; left: 50%; bottom: .45rem; width: 28px; height: 1px; margin-left: -14px; background: var(--ink); transform: scaleX(0); transition: transform .5s var(--ease-out); }
.choice:hover:not(:disabled) { color: var(--ink); }
.choice[aria-checked="true"] { color: var(--ink); }
.choice[aria-checked="true"]::after { transform: scaleX(1); }
.choice:disabled { cursor: default; }
.quiz-msg { margin-top: 1rem; min-height: 1.4em; font-style: italic; font-size: 16px; color: var(--soft); }
.timer { display: block; width: 120px; height: 1px; background: color-mix(in srgb, var(--hair) 35%, transparent); margin: -0.6rem auto 1.6rem; overflow: hidden; }
.timer i { display: block; height: 100%; background: var(--line); transform-origin: left center; }
.answer { font-size: calc(clamp(40px, 12vw, 58px) * var(--script-scale)); line-height: 1.15; margin: .5rem 0 1rem; padding: 0 .15em .1em; text-wrap: balance; animation: write 1.4s var(--ease-peel) both; }
.mine { font-style: italic; color: var(--soft); font-size: 18px; }
.points { margin-top: .8rem; color: var(--ink); }
.join { display: flex; flex-direction: column; align-items: center; gap: .3rem; width: 100%; margin-top: 1.6rem; }
.as-button { background: none; border: 0; cursor: pointer; font-family: var(--serif); margin-top: 1rem; }
.board { list-style: none; margin: 0; padding: 0; width: 100%; max-width: 22rem; }
.board li { display: grid; grid-template-columns: 2.4rem 1fr auto; align-items: baseline; gap: .6rem; padding: .7rem 0; }
.board li + li { border-top: 1px solid color-mix(in srgb, var(--hair) 45%, transparent); }
.b-rank { font-size: 13px; letter-spacing: .2em; font-weight: 600; color: var(--soft); text-align: left; }
.b-name { font-size: 17px; letter-spacing: .16em; text-transform: uppercase; font-weight: 500; text-align: left; }
.b-pts { font-style: italic; font-size: 19px; color: var(--soft); }
.board li:first-child .b-name { color: var(--ink); }
.demo-host { display: grid; justify-items: center; gap: .9rem; margin-top: 2.2rem; }
.demo-host-btn {
  font: inherit; font-size: 18px; font-weight: 600; min-height: 48px; padding: .5rem 1.8rem; border: 1px solid var(--ink); border-radius: 99px;
  background: none; color: var(--ink); cursor: pointer; transition: color .2s, background .2s;
}
.demo-host-btn:hover { background: var(--ink); color: var(--paper); }
.demo-host p { max-width: 32ch; text-align: center; font-style: var(--italic); font-size: 16px; line-height: 1.4; color: var(--soft); }
.team-tag { text-align: center; margin-top: 2rem; font-size: 12px; letter-spacing: .28em; text-transform: uppercase; color: var(--soft); font-weight: 600; }
.quiz-back { display: table; margin: 0 auto calc(env(safe-area-inset-bottom) + 24px); }
.quiz-line[hidden] { display: none; }
.now-mark { margin-top: .9rem; font-size: 11px; letter-spacing: .34em; padding-left: .34em; text-transform: uppercase; font-weight: 600; color: var(--soft); display: inline-flex; align-items: center; gap: .6rem; }
.now-mark::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--hair); animation: breathe 2.4s ease-in-out infinite; }
.now-mark[hidden] { display: none; }
@keyframes breathe { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) {
  .quiz-card, .answer { animation: none; }
  .timer i { transition: none !important; }
  .now-mark::before { animation: none; }
}

/* Inside the landing page's demo phone: no scrollbar, no chrome. */
html.framed { scrollbar-width: none; scrollbar-gutter: auto; }
html.framed::-webkit-scrollbar { display: none; }

/* Two-word script titles on the quiz page wrap gracefully on phones */
.quiz-title { font-size: calc(clamp(52px, 15vw, 84px) * var(--script-scale)); line-height: 1.05; text-wrap: balance; max-width: 9ch; }

/* ---------- Theme faces ---------- */
/* Caps are set in the theme's display face; "italic" text follows the theme (a grotesque has none). */
:is(.event, .label, .name, .t-title, .b-name, .choice) { font-family: var(--display); }
:is(.when, .welcome, .sign, .desc, .pair-text, .al-list, .closing, .next, .t-note, .q-prompt, .line-input, .unit, .quiz-msg, .mine, .b-pts) { font-style: var(--italic); }

/* Brasserie: deco caps want air; the thin face gets a touch more size. */
[data-theme="brasserie"] .name { letter-spacing: .16em; font-size: clamp(26px, 7.8vw, 32px); }
[data-theme="brasserie"] .event { letter-spacing: .4em; }
[data-theme="brasserie"] .orn { width: 200px; }

/* Vinkällare: Didone caps run a little lighter and tighter. */
[data-theme="vinkallare"] .name { font-weight: 500; letter-spacing: .08em; }
[data-theme="vinkallare"] .orn { width: 170px; height: 30px; }

/* Herbarium: the sprig grows from its stem, leaves after, bud last. */
[data-theme="herbarium"] .name { font-weight: 400; letter-spacing: .08em; }
[data-theme="herbarium"] .orn { width: 210px; height: 30px; }
@media (prefers-reduced-motion: no-preference) {
  .js[data-theme="herbarium"] .page .orn .o-vine { transition-duration: 1.4s; transition-delay: .9s; }
  .js[data-theme="herbarium"] .page .orn .o-leaf { transition-duration: .9s; transition-delay: 1.5s; }
  .js[data-theme="herbarium"] .page .orn .o-petal { transition-delay: 2s; }
}

/* Galleri: numbers instead of hairlines, a short rule instead of a flourish, no tracking games. */
[data-theme="galleri"] body { font-size: 17px; line-height: 1.5; }
[data-theme="galleri"] .label { letter-spacing: .24em; font-size: 12px; font-weight: 600; gap: 0; }
[data-theme="galleri"] .label .hair { display: none; }
[data-theme="galleri"] .label span::before { content: attr(data-n) "\2002\2014\2002"; letter-spacing: .08em; font-variant-numeric: tabular-nums; }
[data-theme="galleri"] .name { font-size: clamp(24px, 6.8vw, 28px); font-weight: 600; letter-spacing: -.01em; text-transform: none; padding-left: 0; }
[data-theme="galleri"] .event { font-size: 12px; letter-spacing: .28em; }
[data-theme="galleri"] :is(.desc, .pair-text, .welcome, .closing) { font-size: 17px; color: var(--soft); }
[data-theme="galleri"] .desc { max-width: 30ch; }
[data-theme="galleri"] .bar { color: var(--hair); }
[data-theme="galleri"] .orn { width: 48px; height: 10px; margin: 1.8rem auto 1.6rem; }
[data-theme="galleri"] .rule { width: 32px; }
[data-theme="galleri"] .t-title { text-transform: none; letter-spacing: -.005em; font-weight: 600; }
[data-theme="galleri"] .b-name { text-transform: none; letter-spacing: 0; font-weight: 600; }
[data-theme="galleri"] .choice { letter-spacing: .16em; font-size: 13px; }

/* The host marks the course being served: a quiet line at the top while the guest reads another page. */
.now-bar {
  position: fixed; top: calc(env(safe-area-inset-top) + 10px); left: 50%; transform: translateX(-50%); z-index: 6;
  display: inline-flex; align-items: center; gap: .6rem; white-space: nowrap;
  padding: .55rem 1rem .55rem 1.2rem; border-radius: 99px; text-decoration: none;
  font-family: var(--display); font-size: 11px; letter-spacing: .28em; text-transform: uppercase; font-weight: 600;
  color: var(--ink); background: color-mix(in srgb, var(--paper) 88%, transparent);
  border: 1px solid color-mix(in srgb, var(--hair) 70%, transparent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  animation: rise .6s var(--ease-out) both;
}
.now-bar::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--line); animation: breathe 2.4s ease-in-out infinite; }
.now-bar[hidden] { display: none; }
.preview-tag ~ .now-bar { top: calc(env(safe-area-inset-top) + 52px); }
@media (prefers-reduced-motion: reduce) { .now-bar, .now-bar::before { animation: none; } }

/* ---------- Guest forms: reply (OSA) and toasts, on the menu's paper ---------- */
html:has(body.is-form) { scroll-snap-type: none; }
.guest-form .program-head .rule { margin-bottom: 1.4rem; }
.form-note { margin: 0 auto 1.6rem; text-align: center; }
.form-done { margin: 0 auto 1.6rem; max-width: 30ch; text-align: center; font-style: var(--italic); font-size: 19px; color: var(--ink); }
.guest-fields { display: flex; flex-direction: column; align-items: center; gap: .35rem; width: 100%; }
.guest-fields > .cap { margin-top: 1.2rem; }
.guest-fields .form-head { margin-top: .2rem; color: var(--ink); }
.form-area { resize: vertical; min-height: 4.2em; font-size: 20px; }
.form-set { border: 0; margin: 1.2rem 0 0; padding: 0; width: 100%; display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.form-set legend { padding: 0 0 0 .32em; margin: 0 auto .5rem; }
.form-choices { grid-template-columns: 1fr 1fr; max-width: 22rem; }
.form-pick, .form-chip { position: relative; cursor: pointer; }
.form-pick input, .form-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.form-pick span {
  display: block; padding: .85rem .5rem .85rem .74em; text-align: center;
  font: 600 14px/1.4 var(--display); letter-spacing: .22em; text-transform: uppercase; color: var(--soft); position: relative;
}
.form-pick span::after { content: ""; position: absolute; left: 50%; bottom: .45rem; width: 28px; height: 1px; margin-left: -14px; background: var(--line); transform: scaleX(0); transition: transform .5s var(--ease-out); }
.form-pick input:checked + span { color: var(--ink); }
.form-pick input:checked + span::after { transform: scaleX(1); }
.form-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem .5rem; max-width: 26rem; }
.form-chip span {
  display: inline-block; padding: .45rem .8rem; border: 1px solid color-mix(in srgb, var(--hair) 70%, transparent); border-radius: 99px;
  font-style: var(--italic); font-size: 16px; color: var(--soft); transition: color .2s, border-color .2s, background .2s;
}
.form-chip input:checked + span { color: var(--paper); background: var(--ink); border-color: var(--ink); }
:is(.form-pick, .form-chip) input:focus-visible + span { outline: 1px solid var(--ink); outline-offset: 4px; }
.form-more { width: 100%; margin-top: 1.2rem; display: flex; flex-direction: column; align-items: center; gap: .35rem; }
/* "Tyvärr inte": only the name and the send button are left. Switching back shows the rest as it was. */
.guest-fields:has([name="coming"][value="0"]:checked) :is(.form-hint:not(.form-privacy), .form-more, .person-add, .person:not(:first-child), .person legend, .person-vote, .person-al) { display: none; }
.guest-fields:has([name="coming"][value="0"]:checked) .person { border: 0; padding-block: 0; }
/* The form's buttons look like buttons, not like the page's text links: outlined to add a guest, filled to send. */
.guest-fields :is(.person-add, .form-send) {
  width: 100%; max-width: 18rem; min-height: 48px; padding: .6rem 1rem .6rem 1.22em; border: 1px solid var(--ink); border-radius: 99px;
  font-size: 14px; letter-spacing: .22em; font-variant-numeric: lining-nums; color: var(--ink); transition: color .2s, background .2s;
}
.guest-fields .form-send { margin-top: 1.6rem; background: var(--ink); color: var(--paper); }
@media (hover: hover) {
  .guest-fields .person-add:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
  .guest-fields .form-send:hover { background: color-mix(in srgb, var(--ink) 86%, var(--paper)); }
}
.guest-fields :is(.person-add, .form-send):focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }
.guest-form > .rule { margin: 2.4rem auto; }
.form-mine { margin-top: 2rem; }

/* Greetings the host chose to show on the closing card */
.greetings { list-style: none; margin: 1.6rem 0 .4rem; padding: 0; display: flex; flex-direction: column; gap: 1.1rem; max-width: 30ch; }
.greetings li { display: flex; flex-direction: column; align-items: center; gap: .2rem; }
.g-text { font-style: var(--italic); font-size: 19px; line-height: 1.4; text-wrap: balance; }
.g-name { font-size: 11px; letter-spacing: .3em; padding-left: .3em; text-transform: uppercase; font-weight: 600; color: var(--soft); }

.form-title { font-size: calc(clamp(52px, 15vw, 80px) * var(--script-scale)); line-height: 1.05; text-wrap: balance; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* OSA for a party: one card per person */
.form-hint { margin: 1.2rem auto 0; max-width: 30ch; text-align: center; font-style: var(--italic); font-size: 16px; color: var(--soft); }
.form-privacy { max-width: 36ch; }
.form-privacy a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.people { display: flex; flex-direction: column; gap: 1rem; width: 100%; margin-top: 1rem; }
.person { border: 1px solid color-mix(in srgb, var(--hair) 60%, transparent); margin: 0; padding: 1rem 1rem 1.1rem; display: flex; flex-direction: column; align-items: center; gap: .7rem; }
.person[hidden] { display: none; }
.person legend { padding: 0 .4em 0 .72em; margin: 0 auto; font-variant-numeric: lining-nums; }
.person .line-input { max-width: none; }
.person-remove { margin-top: 0; font-size: 11px; }
.person-add { margin-top: .9rem; }
.person-add + .person-add { margin-top: .3rem; }

.form-deadline { margin: -.6rem auto 1.4rem; text-align: center; }

/* Long pages on wide screens (programme, OSA, toasts, quiz): the card grows with its content instead of
   staying fixed to the window, so nothing scrolls out past its edges onto the table. */
@media (min-width: 760px) {
  body:is(.is-program, .is-quiz) { position: relative; min-height: 100vh; padding: 4vh 0; }
  body:is(.is-program, .is-quiz)::before, body:is(.is-program, .is-quiz)::after { position: absolute; top: 4vh; bottom: 4vh; }
}

/* OSA: each person's allergies are always in the open, so nobody misses them. */
.person-al { width: 100%; display: flex; flex-direction: column; align-items: center; gap: .6rem; margin-top: .6rem; }
.person-al .cap { color: var(--ink); text-align: center; }

/* The invitation (OSA): the courses guests vote on. */
.person-vote { width: 100%; display: flex; flex-direction: column; align-items: center; gap: .35rem; }
.person-vote .cap { font-size: 11px; color: var(--soft); }
/* Dishes stack, one equal pill per line: names run long, and a wrapped row left one stranded. */
.person-vote .form-chips { flex-direction: column; align-items: stretch; width: 100%; max-width: 18rem; }
.person-vote .form-chip span { display: block; padding: .6rem 1.1rem; border-radius: 1.4rem; line-height: 1.25; text-align: center; text-wrap: balance; overflow-wrap: anywhere; }
.person-vote + .person-vote { margin-top: .6rem; }
