/* PolkaBoken, MLP look. Fonts live on the site itself (no Google Fonts: visitors' details stay private). */
@font-face { font-family: "Instrument Sans"; src: url("/assets/fonts/instrument-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/assets/fonts/instrument-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "IM Fell English"; src: url("/assets/fonts/im-fell-english-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --red: #C8102E;
  --cream: #F7F4EE;
  --paper: #F2E4C6;
  --ink: #33241A;
  --ink-soft: rgba(51, 36, 26, 0.72);
  --gold: #B8913E;
  --navy: #1C2546;
  --gutter: 16px;
  --title-font: "IM Fell English", Georgia, serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Instrument Sans", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--navy);
}
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
button { font: inherit; color: inherit; }

/* Focus ring that shows on both the cream card and the painting: ink ring with a cream halo. */
.close-btn:focus-visible, .button:focus-visible, .dot:focus-visible {
  outline: 3px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 7px var(--cream);
}
/* Areas that fill the card: the ring sits inside, so the card's edge doesn't cut it off. */
.card-inner:focus-visible, .pages:focus-visible { outline: 3px solid var(--ink); outline-offset: -3px; border-radius: 12px; }

/* ---------- Door page ---------- */
.door-page { min-height: 100vh; min-height: 100dvh; overflow: hidden; }

/* The painting fills the screen edge to edge on phones (a little of the top or sides may be trimmed, never a frame).
   On wide screens (tablets sideways, computers) it stands in the middle, with a soft blurred copy behind it. */
.scene { position: fixed; inset: 0; overflow: hidden; background: var(--navy); }
.scene img { position: absolute; display: block; }
.scene-blur {
  inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: blur(28px) brightness(0.55) saturate(1.1); transform: scale(1.15);
  opacity: 0; transition: opacity 900ms ease;
}
.scene-painting {
  top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 30%;
  transform: scale(1.07); transform-origin: 50% 30%;
  opacity: 0;
  transition: opacity 900ms ease, transform 2200ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.scene.is-in .scene-blur { opacity: 1; }
.scene.is-in .scene-painting { opacity: 1; transform: scale(1); }
.scene.is-settled .scene-painting { transition: none; }
@media (min-aspect-ratio: 4/5) {
  .scene-painting { left: 50%; width: auto; max-width: none; object-fit: fill; transform: translateX(-50%) scale(1.07); }
  .scene.is-in .scene-painting { transform: translateX(-50%) scale(1); }
}
/* Arrived from the calendar's dive into a seal: the painting is already there, exactly as the calendar left it. */
.scene.from-home .scene-painting, .scene.from-home .scene-blur { opacity: 1; transition: none; }
.scene.from-home .scene-painting { transform: none; }
@media (min-aspect-ratio: 4/5) { .scene.from-home .scene-painting { transform: translateX(-50%); } }

/* Round close button, cartoon style: thick ink line and a hard shadow. */
.close-btn {
  position: fixed; z-index: 3;
  top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right));
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--cream); color: var(--ink);
  border: 2.5px solid var(--ink); box-shadow: 0 3px 0 var(--ink);
  text-decoration: none;
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.close-btn:active { transform: translateY(3px); box-shadow: 0 0 0 var(--ink); }
.close-btn svg { width: 18px; height: 18px; }

/* The quest card sits in the calm lower part of the painting. */
.card, .message {
  position: fixed; z-index: 2;
  left: 0; right: 0; margin-inline: auto;
  bottom: calc(var(--gutter) + env(safe-area-inset-bottom));
  width: min(calc(100% - 2 * var(--gutter)), 30rem);
}
/* Cream paper, thick ink line, hard shadow: the front and back of the card, and the message box. */
.card-face, .card-back, .message {
  background: var(--cream);
  border: 2.5px solid var(--ink); border-radius: 22px;
  box-shadow: 0 5px 0 var(--ink), 0 24px 60px rgba(8, 10, 28, 0.45);
  overflow: hidden;
}

/* The card is a real 3D card: it flies in showing its back (sealed), then flips to the quest.
   The flight itself is played by card-flight.js. Until it starts, the card is invisible. */
.card { -webkit-transform-style: preserve-3d; transform-style: preserve-3d; }
.card:not(.is-in) { visibility: hidden; }
.card-face, .card-back { -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.card-face {
  position: relative;
  /* Never taller than the space under the close button; the pages scroll inside if a text is long. */
  display: flex; flex-direction: column;
  max-height: calc(100vh - var(--gutter) - env(safe-area-inset-bottom) - max(12px, env(safe-area-inset-top)) - 56px); /* older phones */
  max-height: calc(100dvh - var(--gutter) - env(safe-area-inset-bottom) - max(12px, env(safe-area-inset-top)) - 56px);
}
.card-back {
  position: absolute; inset: 0;
  transform: rotateY(180deg);
  display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(135deg, var(--red) 0 14px, var(--cream) 14px 28px);
}
/* The seal on the back, with the door's number. */
.seal {
  width: 68px; height: 68px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--cream); color: var(--ink);
  border: 2.5px solid var(--ink); box-shadow: inset 0 0 0 4px var(--cream), inset 0 0 0 6px var(--gold), 0 4px 0 var(--ink);
  font-family: var(--title-font); font-size: 2.1rem; line-height: 1;
}
.seal span { transform: translateY(2px); }

/* The Christmas spirit and its sparkles: drawn over the painting, under the card. */
.sparkles { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
/* One sheet of the card: stripe, heading, text. Every page is a whole sheet, so the whole paper turns. */
.card-stripe {
  height: 12px;
  background: repeating-linear-gradient(135deg, var(--red) 0 9px, var(--cream) 9px 18px);
  border-bottom: 2.5px solid var(--ink);
}
.card-meta { margin: 0; padding: 12px 20px 0; font-size: 0.9rem; font-weight: 600; color: var(--ink-soft); }
.card-title {
  margin: 2px 0 0; padding: 0 20px 14px;
  font-family: var(--title-font); font-weight: 400;
  font-size: 2rem; line-height: 1.1;
  text-wrap: balance;
  overflow-wrap: anywhere; hyphens: auto; /* long Swedish words never run off the card */
}
.card-title:focus { outline: none; } /* focused only so screen readers read the quest */
/* Pages after the first: a small running heading, like at the top of a book page. */
.card-head-running .card-meta { padding-bottom: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-text { padding: 0 20px 20px; }
.card:not(.one-page) .page-text { padding-bottom: 60px; } /* room for the dots floating at the bottom */

/* The card scrolls inside if a text is ever taller than the screen. */
.card-inner { flex: 0 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; }

/* After the card has flipped over, the text and dots fade in. */
.page-text { transition: opacity 450ms ease 150ms, transform 650ms cubic-bezier(0.2, 0.8, 0.2, 1) 150ms; }
.card:not(.is-open) .page-text { opacity: 0; transform: translateY(8px); }
.pager { transition: opacity 400ms ease 350ms; }
.card:not(.is-open) .pager { opacity: 0; }
.card:not(.is-open) .pages, .card:not(.is-open) .pager > * { pointer-events: none; } /* nothing to turn or tap until it has opened */
/* A long card that scrolls: text slides under the dots, so they get a soft paper backing. */
.card.scrolls .pager { background: linear-gradient(to top, var(--cream) 62%, rgba(247, 244, 238, 0)); }

/* Pages you turn like a book (page-turn.js): stacked on top of each other, all as tall as the tallest.
   A page being turned is cut along the fold; the folded part shows the back of the paper, mirrored. */
.pages {
  position: relative;
  touch-action: pan-y; /* sideways swipes turn pages, up and down still scrolls a long text */
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.page { position: absolute; inset: 0; overflow: hidden; }
.pages[tabindex] { cursor: grab; } /* several pages: on a computer, the hand says you can pull them */
.page-front { position: absolute; inset: 0; background: var(--cream); }
.page p { margin: 0; text-wrap: pretty; }
.page-flap {
  display: none; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  transform-origin: 0 0; will-change: transform;
  background: linear-gradient(160deg, #F1ECE2, #E6DDCC);
}
.page-ghost { opacity: 0.09; }
.page-ghost .card-stripe { opacity: 0.5; } /* the text shining through from the other side of the paper */
.fold-strip { position: absolute; top: 0; left: 0; transform-origin: 0 0; pointer-events: none; will-change: transform; }
.fold-cast { display: none; background: linear-gradient(to right, rgba(30, 18, 8, 0.24), rgba(30, 18, 8, 0.06) 35%, rgba(30, 18, 8, 0)); }
.fold-bend { opacity: 0; background: linear-gradient(to right, rgba(30, 18, 8, 0.14), rgba(30, 18, 8, 0)); }
.fold-crease { background: linear-gradient(to right, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 12%, rgba(30, 18, 8, 0.06) 45%, rgba(30, 18, 8, 0)); }

/* The heads-up page: a paper note with a red "Obs!" label. */
.page-box { background: var(--paper); border-radius: 14px; padding: 12px 16px 14px; }
.page .page-label { font-weight: 600; color: var(--red); margin-bottom: 2px; }

/* The quest first, then each extra in its own labelled box, so you can see at a glance what is what. */
.page .page-text > * + * { margin-top: 12px; }
.extra, .steps { border-radius: 14px; padding: 10px 14px 12px; }
.page .box-label {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 3px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.02em;
}
.box-label svg { width: 18px; height: 13px; fill: currentColor; flex: none; }
/* "Med sällskap": the part to do with others, on soft pine green. */
.extra-sallskap { background: #E1ECDD; }
.extra-sallskap .box-label { color: #2C5A37; }
/* "Plan B" and "Gratis": another way to do it, a dashed outline so it reads as an option. */
.extra-planb, .extra-gratis { border: 2px dashed rgba(51, 36, 26, 0.32); padding: 8px 12px 10px; }
.extra-planb .box-label, .extra-gratis .box-label { color: var(--ink-soft); }
/* A short numbered plan (door 4). */
.steps { background: var(--paper); }
.steps .box-label { color: var(--ink); }
.steps ol { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding-left: 28px; }
.steps li + li { margin-top: 6px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0.1em;
  width: 19px; height: 19px; border-radius: 50%; border: 1.5px solid var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700; line-height: 1; background: var(--cream);
}
/* #PB26 as a little red tag, so it stands out in the sentence. */
.hashtag {
  display: inline-block; padding: 0 6px; border-radius: 6px;
  background: rgba(200, 16, 46, 0.1); color: var(--red); font-weight: 700;
}

/* The dots float at the bottom of the card, on top of the paper (they don't turn with the page). */
.pager {
  position: absolute; z-index: 10; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: center; align-items: center; padding: 4px 0 8px;
  pointer-events: none;
}
.pager > * { pointer-events: auto; }
.dots { display: flex; }
/* The "Obs!" sticker at the lower right: says there is a heads-up on another page, and takes you there. */
.obs-tag {
  position: absolute; right: 14px; top: 50%;
  display: inline-flex; align-items: center; gap: 5px;
  min-height: 34px; padding: 4px 10px 4px 11px;
  background: var(--red); color: var(--cream);
  font-weight: 600; font-size: 0.9rem; line-height: 1;
  border: 2px solid var(--ink); border-radius: 8px; box-shadow: 0 3px 0 var(--ink);
  transform: translateY(-50%) rotate(-3deg);
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 200ms ease;
}
.obs-tag::after { content: ""; position: absolute; inset: -6px; } /* a bigger area to tap */
.obs-tag svg { width: 14px; height: 11px; }
.obs-tag:active { transform: translateY(calc(-50% + 3px)) rotate(-3deg); box-shadow: 0 0 0 var(--ink); }
.obs-tag:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
/* Small phones: the dots move to the left, so the sticker never covers one. */
@media (max-width: 359px) { .pager { justify-content: flex-start; padding-left: 8px; } }
.dot {
  width: 44px; height: 40px; padding: 0; border: 0; background: transparent; cursor: pointer;
  display: flex; align-items: center; justify-content: center; border-radius: 50%;
}
.dot::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%;
  border: 2px solid var(--ink); background: transparent; transition: background 150ms ease, transform 150ms ease;
}
.dot[aria-current="true"]::before { background: var(--ink); transform: scale(1.15); }

/* Locked, missing or no internet: same card, no animation. */
.message { padding: 20px; }
.message h1 { margin: 0 0 6px; font-family: var(--title-font); font-weight: 400; font-size: 1.6rem; line-height: 1.15; }
.message p { margin: 0; }
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; margin-top: 14px; padding: 10px 20px;
  background: var(--red); color: #fff; font-weight: 600;
  border: 2.5px solid var(--ink); border-radius: 99px; box-shadow: 0 3px 0 var(--ink);
  cursor: pointer;
}
.button:active { transform: translateY(3px); box-shadow: none; }

/* Phone turned sideways: the painting on the left, the card as a tall panel on the right. */
@media (orientation: landscape) and (max-height: 500px) {
  .scene-painting { left: 27%; }
  .card, .message {
    left: auto; right: max(var(--gutter), env(safe-area-inset-right)); margin: 0;
    bottom: calc(10px + env(safe-area-inset-bottom)); width: min(34rem, 58%);
  }
  /* Compact, and sized by the screen's real height (dvh: what's left after the browser's own bars),
     so title, text and dots fit without scrolling on each phone. */
  .card-face { max-height: calc(100vh - 10px - env(safe-area-inset-bottom) - max(12px, env(safe-area-inset-top)) - 52px); max-height: calc(100dvh - 10px - env(safe-area-inset-bottom) - max(12px, env(safe-area-inset-top)) - 52px); }
  .card-stripe { height: 8px; }
  .card-meta { padding-top: clamp(6px, 2.5dvh, 12px); font-size: 0.8rem; }
  .card-title { font-size: clamp(1.25rem, 7.5dvh, 2rem); padding-bottom: clamp(6px, 2.5dvh, 14px); }
  .card-head-running .card-meta { padding-bottom: clamp(6px, 2.5dvh, 14px); }
  .page-text { font-size: clamp(14px, 4.4dvh, 17px); line-height: 1.42; padding-bottom: clamp(4px, 2dvh, 14px); }
  .card:not(.one-page) .page-text { padding-bottom: 46px; }
  .pager { padding-bottom: 2px; }
  .dot { height: 36px; }
  .page-box { padding: 8px 12px 10px; }
  .page .page-text > * + * { margin-top: clamp(4px, 1.6dvh, 12px); }
  .extra, .steps { padding: clamp(3px, 1.2dvh, 6px) 12px clamp(4px, 1.6dvh, 8px); }
  .extra-planb, .extra-gratis { padding-top: clamp(2px, 0.8dvh, 4px); padding-bottom: clamp(3px, 1.2dvh, 6px); }
  .page .box-label { margin-bottom: 0; font-size: 0.75rem; }
}
/* Used to reset the opening without it animating backwards. */
.no-anim, .no-anim * { transition: none !important; animation: none !important; }

/* Every phone gets the same opening, also with "Reduce Motion" on (Samuel's call, 2026-11-24). */

/* Arriving from the calendar's poof (poof.js, 2026-11-25): the first frame is the same warm light the calendar ended on,
   and it dissolves into glitter as the card's spirit comes in. */
html.poof body::after { content: ""; position: fixed; inset: 0; z-index: 60; pointer-events: none; background: var(--poof-light); opacity: 1; transition: opacity 0.9s cubic-bezier(.4, 0, .2, 1); }
html.poof.poof-go body::after { opacity: 0; }
/* Julgatan prototype (2026-11-25): the painting waits until the card has opened, then it is brushed in (poof.js). */
.scene.paint-later .scene-painting, .scene.paint-later .scene-blur { opacity: 0 !important; }
.scene.from-home:not(.paint-later) .scene-blur { transition: none; }
.scene.from-home .scene-blur { transition: opacity 900ms ease; }
/* Arriving from the cane's dive (poof.js, 2026-11-26): the first frame is the same night the dive ended in.
   The card flies in out of the glitter, then the painting is painted in over this dark. */
html.dive, html.dive body, html.dive .scene { background: #141024; }
html.dive .close-btn { animation: dive-fade-in 0.6s ease 0.4s both; }
/* (changed 2026-11-26) A second after the card has opened, the sharp painting rises out of that dark behind it:
   a slow fade and a gentle settle (lucka.js). */
.scene.from-dive .scene-painting { transform: scale(1.12); transition: opacity 1200ms cubic-bezier(.3, 0, .2, 1), transform 2800ms cubic-bezier(0.16, 0.8, 0.2, 1); }
.scene.from-dive.is-in .scene-painting { transform: scale(1); }
.scene.from-dive.is-settled .scene-painting { transition: none; }
/* The painting's three bands (lucka.js stripsIn): the real painting waits hidden until the bands are in place. */
.scene.strips > .scene-painting, .scene.strips > .scene-blur { opacity: 0 !important; }
.strip { position: absolute; inset: 0; overflow: hidden; will-change: transform; }
@media (min-aspect-ratio: 4/5) {
  .scene.from-dive .scene-painting { transform: translateX(-50%) scale(1.12); }
  .scene.from-dive.is-in .scene-painting { transform: translateX(-50%) scale(1); }
}
@keyframes dive-fade-in { from { opacity: 0; } }

/* ---------- A list behind a button (added 2026-11-28): door 2's movies, door 24's games (lista.js) ---------- */
.list-btn {
  display: flex; align-items: center; gap: 10px; width: 100%;
  min-height: 52px; padding: 10px 14px 10px 16px;
  background: var(--paper); color: var(--ink); text-align: left;
  border: 2.5px solid var(--ink); border-radius: 14px; box-shadow: 0 3px 0 var(--ink);
  font: inherit; cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.list-btn:active { transform: translateY(3px); box-shadow: 0 0 0 var(--ink); }
.list-btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.list-btn-text { flex: 1; font-family: var(--title-font); font-size: 1.25rem; line-height: 1.15; }
.list-btn-count {
  flex: none; min-width: 26px; padding: 2px 7px; border-radius: 99px;
  background: var(--red); color: var(--cream); font-size: 0.8rem; font-weight: 600; text-align: center;
}
.list-btn svg { flex: none; width: 16px; height: 12px; }

.lista {
  position: fixed; inset: 0; z-index: 40;
  width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(20, 16, 36, 0); color: var(--ink);
  overflow: hidden; overflow: clip; /* only the list inside scrolls, never the frame (else the sheet can slide out of view) */
  transition: background 300ms ease;
}
.lista:not([open]) { display: none; }
.lista::backdrop { background: transparent; }
.lista.is-in { background: rgba(20, 16, 36, 0.6); }
.lista-sheet {
  display: flex; flex-direction: column;
  width: min(560px, 100%);
  max-height: calc(100dvh - max(12px, env(safe-area-inset-top)) - 64px);
  background: var(--cream);
  border: 2.5px solid var(--ink); border-bottom: 0; border-radius: 22px 22px 0 0;
  overflow: hidden;
  transform: translateY(104%);
  transition: transform 380ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.lista.is-in .lista-sheet { transform: none; }
.lista-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 8px 20px; }
.lista-title { flex: 1; margin: 0; font-family: var(--title-font); font-weight: 400; font-size: 1.85rem; line-height: 1.1; }
.lista-close {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--cream); color: var(--ink);
  border: 2.5px solid var(--ink); box-shadow: 0 3px 0 var(--ink); cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.lista-close:active { transform: translateY(3px); box-shadow: 0 0 0 var(--ink); }
.lista-close svg { width: 16px; height: 16px; }
.lista-close:focus-visible, .lista-link:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.lista-body {
  overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding: 0 20px calc(28px + env(safe-area-inset-bottom));
}
.lista-intro { margin: 0 0 6px; color: var(--ink-soft); text-wrap: pretty; }
.lista-group { margin-top: 18px; }
.lista-group-title {
  margin: 0; padding-bottom: 6px; border-bottom: 2.5px solid var(--ink);
  font-family: var(--title-font); font-weight: 400; font-size: 1.3rem; line-height: 1.2;
}
.lista-count { font-family: "Instrument Sans", system-ui, sans-serif; font-size: 0.85rem; color: var(--ink-soft); }
.lista-rows { margin: 0; padding: 0; list-style: none; }
.lista-row { display: flex; gap: 10px; padding: 11px 0 12px; }
.lista-row + .lista-row { border-top: 1.5px dashed rgba(51, 36, 26, 0.3); }
.lista-main { flex: 1; min-width: 0; }
.lista-row-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.lista-name {
  margin: 0; font-family: var(--title-font); font-weight: 400; font-size: 1.2rem; line-height: 1.2;
  overflow-wrap: anywhere; transition: color 200ms ease;
}
.lista-year { font-family: "Instrument Sans", system-ui, sans-serif; font-size: 0.85rem; color: var(--ink-soft); white-space: nowrap; }
.lista-badge {
  flex: none; margin-top: 2px; padding: 1px 7px;
  background: var(--paper); border: 1.5px solid var(--ink); border-radius: 6px;
  font-size: 0.75rem; font-weight: 600; line-height: 1.5; white-space: nowrap;
}
.lista-meta { margin: 2px 0 0; font-size: 0.875rem; color: var(--ink-soft); }
.lista-link {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 2px; color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px;
  white-space: nowrap;
}
.lista-meta .lista-link { margin-left: 10px; }
.lista-link svg { width: 9px; height: 9px; fill: var(--red); flex: none; }
.lista-text { margin: 8px 0 0; text-wrap: pretty; }
.lista-rules { margin: 6px 0 0; padding-left: 18px; font-size: 0.9rem; color: var(--ink-soft); }
.lista-rules li + li { margin-top: 2px; }
/* The "Sett" tick: a round candy-red check, with a big area to tap. */
/* Games: each one a short card that opens (door 24). */
.lista-row.is-fold { display: block; padding: 0; }
.lista-row.is-fold + .lista-row.is-fold { border-top: 0; }
.lista-fold { margin-top: 10px; background: #fffdf8; border: 2px solid var(--ink); border-radius: 16px; box-shadow: 0 3px 0 var(--ink); }
.lista-sum { display: block; padding: 12px 14px 10px; cursor: pointer; list-style: none; border-radius: 14px; }
.lista-sum::-webkit-details-marker { display: none; }
.lista-sum:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.lista-sum .lista-row-head { display: flex; align-items: center; }
.lista-sum .lista-name { display: block; }
.lista-sum .lista-name { font-size: 1.35rem; }
.lista-chip {
  flex: none; padding: 3px 9px; border-radius: 999px; background: var(--red); color: #fff;
  font-size: 0.78rem; font-weight: 600; line-height: 1.3; white-space: nowrap;
}
.lista-kort { display: block; margin: 4px 0 0; text-wrap: pretty; }
.lista-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; min-height: 24px; font-size: 0.875rem; font-weight: 600; color: var(--red); }
.lista-more svg { width: 12px; height: 8px; transition: transform 200ms ease; }
.lista-more-close, .lista-fold[open] .lista-more-open { display: none; }
.lista-fold[open] .lista-more-close { display: inline; }
.lista-fold[open] .lista-more svg { transform: rotate(180deg); }
.lista-fold-body { border-top: 1.5px dashed rgba(51, 36, 26, 0.3); margin: 0 14px; padding: 10px 0 14px; }
.lista-need { margin: 0; font-size: 0.95rem; }
.lista-rules-title { margin: 10px 0 0; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.02em; color: var(--ink-soft); }
.lista-fold .lista-rules { margin-top: 4px; }
.lista-tick { position: relative; flex: none; display: flex; padding-top: 2px; cursor: pointer; }
.lista-tick::after { content: ""; position: absolute; inset: -10px -8px -14px -10px; }
.lista-tick input {
  -webkit-appearance: none; appearance: none; margin: 0;
  width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid var(--ink); background: var(--cream); cursor: pointer;
  display: grid; place-content: center;
  transition: background 150ms ease;
}
.lista-tick input::after {
  content: ""; width: 10px; height: 5px; margin-top: -3px;
  border: solid var(--cream); border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg) scale(0);
  transition: transform 150ms ease;
}
.lista-tick input:checked { background: var(--red); }
.lista-tick input:checked::after { transform: rotate(-45deg) scale(1); }
.lista-tick input:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.lista-row.is-seen .lista-name { color: var(--ink-soft); }
.lista-key { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 0 0; font-size: 0.8rem; color: var(--ink-soft); }
.lista-key > div { display: flex; align-items: center; gap: 5px; }
.lista-key dt { margin: 0; }
.lista-key dd { margin: 0; }

/* Desktop and wide screens: the sheet sits in the middle as a card. */
@media (min-width: 700px) and (min-height: 560px) {
  .lista { align-items: center; }
  .lista-sheet { border-bottom: 2.5px solid var(--ink); border-radius: 22px; max-height: 86vh; box-shadow: 0 6px 0 var(--ink); transform: translateY(24px); opacity: 0; transition: transform 380ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 250ms ease; }
  .lista.is-in .lista-sheet { opacity: 1; }
}
/* Phone sideways: the sheet uses the full height. */
@media (orientation: landscape) and (max-height: 500px) {
  .lista-sheet { max-height: calc(100dvh - 8px); }
  .lista-title { font-size: 1.4rem; }
  .lista-head { padding-top: 8px; }
}
