/* Grynli /far. Flat, warm, simple: no gradients, no gloss. Tokens follow Grynli tokens.json (light + dark). */
:root {
  --bg: #F6F9EF; --surface: #FFFFFF; --soft: #E3F0D3; --ink: #1F2A1A; --muted: #55614C; --line: #DCE6CF;
  --gryn: #3E6B22; --action: #467A27; --action-press: #2F5419; --on-action: #FFFFFF; --aerte: #86BC4B; --pea: #5C9A33;
  --fejl: #A33A1F; --sun: #F7D34A; --sun-soft: #FDF1C2; --heart: #E4505F; --stage: #E3F0D3;
  --gl-gryn: #3E6B22; --gl-li: #5C9A33; --gl-stilk: #3E6B22;
  --display: "Fredoka", "Figtree", system-ui, sans-serif; --sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --spring: cubic-bezier(.3, 1.6, .5, 1); --ud: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
/* Dark: follows the phone, unless the page sets data-theme (the switch on / and /start; /far never sets it). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) { --bg: #161B13; --surface: #1F261B; --soft: #26301F; --ink: #ECF2E4; --muted: #A9B59D; --line: #33402B;
    --gryn: #9CD05C; --action: #9CD05C; --action-press: #5C9A33; --on-action: #1F2A1A; --pea: #86BC4B; --fejl: #F0A08A;
    --sun-soft: #3A3317; --stage: #DDEBCB;
    --gl-gryn: #FFFFFF; --gl-li: #9CD05C; --gl-stilk: #C3E39A; color-scheme: dark; }
}
:root[data-theme=dark] { --bg: #161B13; --surface: #1F261B; --soft: #26301F; --ink: #ECF2E4; --muted: #A9B59D; --line: #33402B;
    --gryn: #9CD05C; --action: #9CD05C; --action-press: #5C9A33; --on-action: #1F2A1A; --pea: #86BC4B; --fejl: #F0A08A;
    --sun-soft: #3A3317; --stage: #DDEBCB;
    --gl-gryn: #FFFFFF; --gl-li: #9CD05C; --gl-stilk: #C3E39A; color-scheme: dark; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.5 var(--sans); min-height: 100dvh; overflow-x: hidden; -webkit-tap-highlight-color: transparent; }
.wrap { max-width: 520px; margin: 0 auto; padding: max(14px, env(safe-area-inset-top)) 16px 40px; }
h1, h2 { font-family: var(--display); font-weight: 600; line-height: 1.12; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(30px, 8vw, 40px); color: var(--gryn); }
h2 { font-size: clamp(23px, 6vw, 28px); }
h1:focus, h2:focus { outline: none; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.lead { font-size: 18px; color: var(--muted); max-width: 30em; }
.stack { display: grid; gap: 16px; }
.center { text-align: center; justify-items: center; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

.logo { width: 112px; height: auto; display: block; }
.fig { display: inline-block; line-height: 0; }
.fig svg { width: 100%; height: auto; overflow: visible; }
.fig.lille { width: 44px; } .fig.mellem { width: 84px; } .fig.stor { width: 132px; }
.blink { transform-box: fill-box; transform-origin: center; animation: blink 4.6s infinite; }
@keyframes blink { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }

/* buttons */
button, .primary, .sekundaer { font: 600 17px var(--sans); cursor: pointer; border-radius: 16px; touch-action: manipulation; }
.primary { display: block; width: 100%; min-height: 56px; border: 0; background: var(--action); color: var(--on-action); padding: 12px 18px; text-align: center; text-decoration: none;
  font-family: var(--display); font-size: 19px; box-shadow: 0 4px 0 var(--action-press); transition: transform .12s var(--ud), box-shadow .12s; }
.primary:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--action-press); }
.primary:disabled { opacity: .45; cursor: default; box-shadow: none; }
.primary.stor { min-height: 62px; font-size: 21px; }
.sekundaer { display: block; width: 100%; min-height: 50px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); padding: 10px 16px; text-align: center; text-decoration: none; transition: transform .12s; }
.sekundaer:active { transform: scale(.97); }
.link { border: 0; background: none; color: var(--muted); font: 600 15px var(--sans); text-decoration: underline; text-underline-offset: 3px; padding: 10px; min-height: 44px; }
.link.lille { font-size: 14px; padding: 6px 4px; min-height: 36px; }
:focus-visible { outline: 3px solid var(--aerte); outline-offset: 2px; }

.chips-info { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chips-info .chip { background: var(--soft); color: var(--gryn); font-weight: 600; font-size: 14px; border-radius: 99px; padding: 6px 12px; }

/* ---------- intro: the gang on a stage ---------- */
.intro { gap: 14px; }
.scene { position: relative; width: 100%; height: 170px; display: flex; justify-content: center; align-items: flex-end; gap: 2px; border-radius: 24px; background: var(--soft); margin-bottom: 4px; }
.hopper { position: relative; width: 56px; height: 56px; cursor: pointer; }
.hopper .fig { width: 56px; }
.scene.fysik { display: block; overflow: hidden; }
.scene.fysik .hopper { position: absolute; left: 0; top: 0; will-change: transform; }
.scene:not(.fysik) .hopper { animation: bob 2.6s ease-in-out infinite; animation-delay: calc(var(--n, 0) * -.4s); }
.bb { position: absolute; bottom: calc(100% + 2px); left: 50%; translate: -50% 0; white-space: nowrap; background: var(--surface); color: var(--ink); border: 2px solid var(--line);
  border-radius: 12px; padding: 2px 9px; font: 600 13px var(--display); z-index: 2; pointer-events: none; }
.bb:empty { display: none; }
.bb.pop { animation: pop .34s var(--spring); }
.intro-skaerm .logo { margin-top: 2px; }

/* ---------- runner ---------- */
.flow { display: grid; gap: 12px; }
.top { display: flex; align-items: center; gap: 10px; }
.tilbage { flex: none; border: 0; background: none; color: var(--ink); width: 44px; height: 44px; border-radius: 99px; padding: 0; display: grid; place-items: center; }
.tilbage svg { width: 24px; height: 24px; }
.tilbage:active { background: var(--soft); }
.sti { position: relative; flex: 1; height: 26px; display: flex; align-items: center; }
.spor { position: relative; width: 100%; height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; }
.fyld { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--pea); border-radius: 99px; transition: width .5s var(--ud); }
.mile { position: absolute; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line); }
.mile.forbi { background: var(--sun); border-color: var(--sun); }
.aert { position: absolute; top: 0; left: 0; width: 26px; height: 26px; margin-left: -13px; z-index: 2; transition: left .5s var(--ud); }
.aert svg { width: 26px; height: 26px; display: block; }
.aert.rul svg { animation: rul .5s var(--ud); }
@keyframes rul { from { transform: rotate(-200deg); } to { transform: none; } }
.cnt { font-size: 13px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 38px; text-align: right; }

.vaert { display: flex; align-items: flex-end; gap: 10px; min-height: 88px; }
.figur { position: relative; flex: none; width: 84px; height: 84px; border-radius: 50%; border: 0; padding: 0; background: var(--stage); display: grid; place-items: center; }
.figur svg { width: 72px; height: 72px; overflow: visible; animation: aande 3.2s ease-in-out infinite; transform-origin: 50% 88%; }
.figur:active { transform: scale(.94); }
.figur.skift svg { animation: skift .5s var(--spring); }
.figur.r-fejrer svg { animation: r-fejrer .62s cubic-bezier(.2, 1.45, .35, 1); }
.figur.r-hjerte svg { animation: r-hjerte .6s cubic-bezier(.2, 1.35, .4, 1); }
.figur.r-overrasket svg { animation: r-pop .45s cubic-bezier(.15, 1.5, .4, 1); }
.figur.r-glad svg { animation: r-fnis .5s cubic-bezier(.2, 1.35, .4, 1); }
.figur.r-vinker svg { animation: r-vink .7s ease-in-out; }
@keyframes aande { 0%, 100% { transform: translateY(1px) scale(.98, 1.015); } 50% { transform: translateY(-2px) scale(1.02, .99); } }
@keyframes skift { from { transform: scale(.4) translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes r-fejrer { 0%, 100% { transform: none; } 18% { transform: translateY(4px) scale(1.08, .9); } 55% { transform: translateY(-16px) scale(.94, 1.1) rotate(8deg); } 78% { transform: translateY(1px) scale(1.04, .96) rotate(-3deg); } }
@keyframes r-hjerte { 0%, 100% { transform: none; } 25% { transform: rotate(-7deg) scale(1.06); } 50% { transform: rotate(7deg) scale(1.1); } 75% { transform: rotate(-3deg) scale(1.04); } }
@keyframes r-pop { 0% { transform: scale(.82) translateY(7px); } 55% { transform: scale(1.12) translateY(-6px); } 100% { transform: none; } }
@keyframes r-fnis { 0%, 100% { transform: none; } 25% { transform: rotate(-6deg) scale(1.03); } 50% { transform: rotate(6deg) scale(1.05); } 75% { transform: rotate(-3deg); } }
@keyframes r-vink { 0%, 100% { transform: none; } 30% { transform: rotate(-8deg) translateY(-4px); } 60% { transform: rotate(6deg); } }
.hjerter { position: absolute; inset: 0; pointer-events: none; color: var(--heart); font-size: 15px; font-weight: 700; }
.hjerter i { position: absolute; font-style: normal; animation: hjerte-op .9s ease-out both; }
.hjerter i:nth-child(1) { left: 4px; top: 26px; } .hjerter i:nth-child(2) { left: 38px; top: 4px; animation-delay: .1s; } .hjerter i:nth-child(3) { right: 4px; top: 22px; animation-delay: .2s; }
@keyframes hjerte-op { from { transform: translateY(18px) scale(.4); opacity: 0; } 35% { opacity: 1; } to { transform: translateY(-22px) scale(1.15); opacity: 0; } }

.boble { position: relative; flex: 1; min-width: 0; background: var(--surface); border: 2px solid var(--line); border-radius: 18px 18px 18px 4px; padding: 10px 14px; margin-bottom: 8px;
  font: 500 16px/1.35 var(--display); color: var(--ink); transform-origin: left bottom; }
.boble:empty { visibility: hidden; }
.boble.pop { animation: pop .38s var(--spring); }
.boble [aria-hidden] > span { opacity: 0; animation: bogstav .12s ease-out forwards; animation-delay: var(--d); }
@keyframes pop { from { opacity: 0; transform: scale(.85) translateY(4px); } 70% { transform: scale(1.03); } to { opacity: 1; transform: none; } }
@keyframes bogstav { to { opacity: 1; } }

.trin { display: grid; gap: 14px; }
.trin.gaa-frem { animation: ind-frem .42s var(--spring) both; }
.trin.gaa-tilbage { animation: ind-tilbage .42s var(--spring) both; }
@keyframes ind-frem { from { opacity: 0; transform: translateX(36px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes ind-tilbage { from { opacity: 0; transform: translateX(-36px) scale(.98); } to { opacity: 1; transform: none; } }
.sek { font-size: 13px; font-weight: 700; color: var(--gryn); text-transform: uppercase; letter-spacing: .06em; }
.trin h2 { margin-top: -6px; }
.hint { color: var(--muted); font-size: 15px; margin-top: -6px; }
.hint.lille { font-size: 13px; margin-top: 0; }

.valg { display: grid; gap: 10px; }
.opt { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; text-align: left; border: 2px solid var(--line); border-bottom-width: 4px;
  background: var(--surface); color: var(--ink); padding: 10px 14px; font-weight: 500; transition: background .15s, border-color .15s, transform .12s var(--ud);
  animation: kort-ind .38s var(--spring) both; animation-delay: calc(var(--n) * 35ms + 60ms); }
@keyframes kort-ind { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
.opt:active { transform: translateY(2px) scale(.985); }
.opt .emo { flex: none; font-size: 24px; width: 30px; text-align: center; line-height: 1; }
.opt .txt { flex: 1; }
.opt .mark { flex: none; width: 26px; height: 26px; border-radius: 99px; border: 2px solid var(--line); display: grid; place-items: center; color: var(--on-action); transition: background .15s, border-color .15s; }
.opt.multi .mark { border-radius: 8px; }
.opt .mark svg { width: 16px; height: 16px; stroke-dasharray: 20; stroke-dashoffset: 20; }
.opt[aria-pressed="true"] { background: var(--soft); border-color: var(--gryn); }
.opt[aria-pressed="true"] .mark { background: var(--action); border-color: var(--action); }
.opt[aria-pressed="true"] .mark svg { stroke-dashoffset: 0; transition: stroke-dashoffset .3s .05s var(--ud); }
.opt.hop, .hop { animation: hop-valg .42s var(--spring); }
/* once an option has faded in, its entry animation must not replay when .hop is removed (faelles.js adds .inde) */
.opt.inde { animation: none; }
.opt.inde.hop { animation: hop-valg .42s var(--spring); }
@keyframes hop-valg { 0% { transform: scale(1); } 35% { transform: scale(1.05) translateY(-3px); } 100% { transform: none; } }
.nej { animation: ryst .36s ease-in-out; }
@keyframes ryst { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

.valg.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.valg.to { display: grid; grid-template-columns: 1fr 1fr; }
.opt.chip { width: auto; min-height: 48px; border-radius: 99px; padding: 8px 16px; gap: 8px; border-bottom-width: 3px; }
.valg.to .opt.chip { width: 100%; justify-content: center; }
/* the tick sits on the corner and takes no space, so selecting never reflows the chips */
.opt.chip .mark { position: absolute; top: -7px; right: -5px; width: 22px; height: 22px; border: 2px solid var(--surface); background: var(--action);
  transform: scale(0); transition: transform .22s var(--spring); pointer-events: none; }
.opt.chip[aria-pressed="true"] .mark { transform: scale(1); }
.opt.chip .mark svg { width: 13px; height: 13px; }
.prik { flex: none; width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(0, 0, 0, .15); }
.slogan { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; justify-items: start; align-items: center; padding: 14px 16px; }
.slogan picture { grid-column: 1; }
.slogan img { width: 84px; }
.slogan .sl { grid-column: 1; font-family: var(--display); font-size: 20px; font-weight: 600; color: var(--gryn); line-height: 1.2; }
.slogan .mark { grid-column: 2; grid-row: 1 / span 2; }

.ekstra { display: grid; gap: 8px; }
.ekstra.ind, #noteFelt.ind { animation: fold-ud .32s var(--spring); }
@keyframes fold-ud { from { opacity: 0; transform: translateY(-8px) scale(.98); } to { opacity: 1; transform: none; } }
.ekstra label { font-weight: 600; font-size: 15px; }
.mere { justify-self: start; border: 2px dashed var(--line); background: none; color: var(--gryn); font-size: 15px; border-radius: 99px; padding: 8px 14px; min-height: 44px; }
.mere[aria-expanded="true"] { border-style: solid; }

textarea, input[type=email], input[type=text] { width: 100%; font: 17px var(--sans); color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: 14px; padding: 12px 14px; }
textarea:focus, input:focus { border-color: var(--pea); outline: none; box-shadow: 0 0 0 3px var(--soft); }
textarea { min-height: 110px; resize: vertical; }
.felt { position: relative; }
.taeller { position: absolute; right: 12px; bottom: 10px; font-size: 12px; color: var(--muted); }
.fod { position: sticky; bottom: 0; padding: 10px 0 max(10px, env(safe-area-inset-bottom)); background: var(--bg); margin-top: 4px; }

/* ---------- dishes ---------- */
.retter { display: grid; gap: 10px; }
.ret-felt { background: var(--surface); border: 2px solid var(--line); border-radius: 18px; padding: 10px; display: grid; gap: 8px; cursor: text; transition: border-color .15s, box-shadow .15s; }
.ret-felt:focus-within { border-color: var(--pea); box-shadow: 0 0 0 3px var(--soft); }
.ret-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ret-chips:empty { display: none; }
.ret { display: inline-flex; align-items: center; gap: 2px; background: var(--soft); color: var(--ink); border-radius: 99px; padding: 4px 4px 4px 12px; font-weight: 600; font-size: 15px; max-width: 100%; }
.ret span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ret button { flex: none; width: 32px; height: 32px; border: 0; border-radius: 99px; background: none; color: var(--muted); font-size: 20px; line-height: 1; padding: 0; }
.ret button:hover, .ret button:active { background: var(--surface); color: var(--ink); }
.ret.ny { animation: ret-ind .42s var(--spring); }
.ret.vaek { animation: ret-ud .2s ease-in forwards; }
@keyframes ret-ind { from { opacity: 0; transform: scale(.3) rotate(-8deg); } 60% { transform: scale(1.08) rotate(2deg); } to { opacity: 1; transform: none; } }
@keyframes ret-ud { to { opacity: 0; transform: scale(.4); } }
.ret-input { display: flex; gap: 8px; align-items: center; }
.ret-input input { border: 0; padding: 8px 4px; min-height: 44px; background: transparent; box-shadow: none !important; }
.mik { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--line); background: var(--bg); color: var(--gryn); display: grid; place-items: center; padding: 0; position: relative; }
.mik svg { width: 22px; height: 22px; }
.mik.lytter { background: var(--heart); border-color: var(--heart); color: #fff; }
.mik.lytter::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 3px solid var(--heart); animation: lyt 1s ease-out infinite; }
@keyframes lyt { from { transform: scale(.85); opacity: .8; } to { transform: scale(1.3); opacity: 0; } }
.ret-tolk { font-size: 14px; color: var(--muted); font-style: italic; min-height: 0; }
.ret-tolk:empty { display: none; }
.forslag { display: grid; gap: 8px; }
.forslag-t { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.forslag-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.forslag-chip { border: 2px dashed var(--line); background: var(--surface); color: var(--ink); border-radius: 99px; padding: 7px 13px; min-height: 42px; font-size: 15px; font-weight: 600;
  animation: kort-ind .34s var(--spring) both; animation-delay: calc(var(--n) * 30ms); transition: transform .12s, border-color .15s; }
.forslag-chip:active { transform: scale(.94); }
.forslag-chip.valgt { animation: flyv .2s ease-in forwards; border-style: solid; border-color: var(--pea); }
@keyframes flyv { to { opacity: 0; transform: translateY(-24px) scale(.6); } }
.forslag .link { justify-self: start; }

/* ---------- chapter card, peeking friends, toast ---------- */
.splash { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px; background: color-mix(in srgb, var(--bg) 82%, transparent); animation: tone-ind .2s ease-out both; cursor: pointer; }
.splash.ud { animation: tone-ud .3s ease-in both; }
.splash.ud .splash-kort { animation: kort-ud .3s ease-in both; }
@keyframes tone-ind { from { opacity: 0; } } @keyframes tone-ud { to { opacity: 0; } }
.splash-kort { position: relative; width: min(340px, 100%); background: var(--surface); border: 2px solid var(--line); border-bottom-width: 5px; border-radius: 28px; padding: 22px 18px 0; text-align: center; overflow: hidden; animation: kort-pop .5s var(--spring) both; }
@keyframes kort-pop { from { transform: scale(.6) rotate(-4deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes kort-ud { to { transform: scale(.85) translateY(-30px); opacity: 0; } }
.splash-fig { width: 112px; margin: 0 auto; animation: hop-ind .7s .1s var(--spring) both; }
.splash-fig svg { width: 112px; height: 112px; overflow: visible; }
@keyframes hop-ind { 0% { transform: translateY(40px) scale(.5); opacity: 0; } 60% { transform: translateY(-10px) scale(1.06); opacity: 1; } 100% { transform: none; } }
.splash-hej { font: 600 24px var(--display); color: var(--gryn); margin-top: 4px; }
.splash-nr { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-top: 8px; }
.splash-t { font: 600 28px/1.1 var(--display); margin-top: 2px; }
.splash-venner { display: flex; justify-content: center; gap: 2px; margin-top: 14px; height: 46px; }
.splash-venner span { width: 50px; line-height: 0; animation: kig-op .5s var(--spring) both; animation-delay: calc(.25s + var(--n) * 70ms); }
.splash-venner svg { width: 50px; height: 50px; overflow: visible; }
@keyframes kig-op { from { transform: translateY(40px); } to { transform: translateY(0); } }

.kig { position: fixed; z-index: 30; right: -6px; top: 132px; display: flex; align-items: center; gap: 4px; pointer-events: none; animation: kig 2.6s ease-in-out both; }
.kig svg { width: 58px; height: 58px; overflow: visible; }
.kig-boble { background: var(--surface); border: 2px solid var(--line); border-radius: 14px 14px 4px 14px; padding: 6px 10px; font: 600 14px/1.25 var(--display); max-width: 170px; color: var(--ink); }
@keyframes kig { 0%, 100% { transform: translateX(110%) rotate(10deg); } 16%, 82% { transform: translateX(0) rotate(0); } }
@media (min-width: 700px) { .kig { right: calc(50% - 360px); } }
.toast { position: fixed; z-index: 35; left: 50%; top: 18vh; translate: -50% 0; background: var(--sun); color: #1F2A1A; font: 700 24px var(--display); padding: 10px 22px; border-radius: 99px;
  box-shadow: 0 4px 0 #D9B42A; pointer-events: none; animation: toast 1.9s var(--spring) both; }
@keyframes toast { 0% { transform: scale(.3) rotate(-8deg); opacity: 0; } 18% { transform: scale(1.05) rotate(2deg); opacity: 1; } 28%, 80% { transform: none; opacity: 1; } 100% { transform: translateY(-20px); opacity: 0; } }

.konfetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 50; }
.konfetti i { position: absolute; width: 9px; height: 14px; border-radius: 3px; animation: fald linear forwards; }
@keyframes fald { to { transform: translate(var(--x), 108vh) rotate(var(--r)); } }
.konfetti.sprut i { animation: sprut cubic-bezier(.2, .7, .4, 1) forwards; }
@keyframes sprut { 0% { transform: translate(0, 0) scale(.6); opacity: 1; } 30% { transform: translate(calc(var(--x) * .6), var(--y)) rotate(calc(var(--r) * .4)); opacity: 1; } 100% { transform: translate(var(--x), 45vh) rotate(var(--r)); opacity: 0; } }

/* ---------- loader (official: Ærte hops on the i) ---------- */
.laeser { position: fixed; inset: 0; z-index: 60; background: var(--bg); display: grid; place-content: center; justify-items: center; gap: 18px; padding: 24px; text-align: center; animation: tone-ind .2s ease-out both; }
.laeser.ud { animation: tone-ud .26s ease-in both; }
.laeser .gl-loader { height: 96px; width: auto; }
.laeser p { font: 600 19px var(--display); color: var(--gryn); }
.forlaeser { display: grid; justify-items: center; padding-top: 30vh; opacity: 0; animation: tone-ind .3s .35s ease-out forwards; }
.forlaeser img { height: 84px; width: auto; }

/* ---------- waiting clock ---------- */
.ur { position: relative; width: 84px; height: 84px; }
.ur svg { width: 84px; height: 84px; transform: rotate(-90deg); }
.ur circle { fill: none; stroke-width: 7; }
.ur-bag { stroke: var(--line); }
.ur-fyld { stroke: var(--pea); stroke-linecap: round; stroke-dasharray: 170; stroke-dashoffset: 0; animation: ur var(--t) linear forwards; }
@keyframes ur { to { stroke-dashoffset: 170; } }
.ur span { position: absolute; inset: 0; display: grid; place-items: center; font: 700 26px var(--display); color: var(--gryn); font-variant-numeric: tabular-nums; }

/* ---------- end + match ---------- */
.skaerm.slut, .skaerm.match, .skaerm.intro-skaerm { animation: tone-ind .3s ease-out both; }
.helt { position: relative; border: 0; background: none; padding: 0; cursor: pointer; }
.ring { width: 152px; height: 152px; border-radius: 50%; display: grid; place-items: center; background: var(--sun-soft); border: 6px solid var(--sun); box-shadow: 0 0 0 8px var(--soft); animation: ring-ind .7s var(--spring) both; }
.ring svg { width: 108px; height: 108px; overflow: visible; animation: aande 3s ease-in-out infinite; }
@keyframes ring-ind { from { transform: scale(.3) rotate(-25deg); opacity: 0; } to { transform: none; opacity: 1; } }
.helt .hjerter { font-size: 22px; inset: -10px; }
.helt .hjerter i { animation: hjerte-op 1.6s ease-out infinite; }
.helt .hjerter i:nth-child(1) { left: 6px; top: 50px; } .helt .hjerter i:nth-child(2) { left: 70px; top: -4px; animation-delay: .5s; } .helt .hjerter i:nth-child(3) { right: 6px; top: 40px; animation-delay: 1s; }
.bande { display: flex; justify-content: center; gap: 4px; }
.bande-m { border: 0; background: none; padding: 0; width: 54px; line-height: 0; animation: kig-op .5s var(--spring) both, bob 2.6s ease-in-out infinite; animation-delay: calc(.4s + var(--n) * 80ms), calc(var(--n) * -.45s); }
.bande-m svg { width: 54px; height: 54px; overflow: visible; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

.kort { background: var(--surface); border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 20px; padding: 18px; display: grid; gap: 12px; }
.kort h2 { font-size: 22px; }
.kort-hoved { display: flex; align-items: center; gap: 10px; }
.duo { display: flex; align-items: center; justify-content: center; gap: 4px; }
.duo .fig { width: 58px; }
.duo.stor .fig { width: 92px; }
.duo-hjerte { color: var(--heart); font-size: 26px; animation: dunk 1.2s ease-in-out infinite; }
@keyframes dunk { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.3); } 30% { transform: scale(1); } 45% { transform: scale(1.18); } }
.tak-boks { display: grid; gap: 10px; justify-items: center; text-align: center; animation: fold-ud .45s var(--spring); }
.tak-boks h2:focus { outline: none; }
.fejl { color: var(--fejl); font-weight: 600; font-size: 15px; }
.ok { color: var(--gryn); font-weight: 600; }
.fallback { display: grid; gap: 8px; }
.fallback.ind { animation: fold-ud .3s var(--spring); }
.raekke { display: flex; gap: 8px; }
.raekke > * { flex: 1; }
.tjek { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; font-size: 16px; cursor: pointer; text-align: left; }
.tjek input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--action); }
.tjek.boks { background: var(--surface); border: 2px solid var(--line); border-radius: 16px; padding: 12px 14px; }

.moedes { display: flex; align-items: center; justify-content: center; gap: 0; height: 110px; }
.moedes .m-v, .moedes .m-h { width: 96px; line-height: 0; }
.moedes svg { width: 96px; height: 96px; overflow: visible; }
.m-v { animation: fra-v .8s var(--spring) both; }
.m-h { animation: fra-h .8s var(--spring) both; }
.m-hjerte { color: var(--heart); font-size: 34px; animation: hjerte-pop .5s .65s var(--spring) both, dunk 1.2s 1.2s ease-in-out infinite; }
@keyframes fra-v { from { transform: translateX(-120px) rotate(-20deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fra-h { from { transform: translateX(120px) rotate(20deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes hjerte-pop { from { transform: scale(0); } to { transform: scale(1); } }
.score { font-family: var(--display); font-size: clamp(44px, 13vw, 60px); font-weight: 700; color: var(--gryn); line-height: 1; font-variant-numeric: tabular-nums; }
.score > span[aria-hidden] { display: inline-block; }
.linjer { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; text-align: left; width: 100%; }
.linjer li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; background: var(--surface); border: 2px solid var(--line); border-radius: 16px; padding: 12px 14px;
  animation: kort-ind .45s var(--spring) both; animation-delay: calc(1.4s + var(--n) * 140ms); }
.linjer .ikon { width: 28px; height: 28px; border-radius: 99px; display: grid; place-items: center; font-weight: 700; font-size: 15px; background: var(--soft); color: var(--gryn); }
.linjer .enig .ikon { background: var(--action); color: var(--on-action); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (min-width: 600px) { .wrap { padding-top: 28px; } }

/* Reduced motion: no movement, only instant state changes. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .boble [aria-hidden] > span, .forlaeser { opacity: 1; }
  .splash, .kig, .toast, .konfetti { display: none; }
}
.slut-top { padding-top: 14px; }
.slut-tekst { animation: kort-ind .45s var(--spring) both; animation-delay: 1.3s; }
.skaerm > .stack.center:only-child:not(.intro) { min-height: 72dvh; align-content: center; }
