/* =========================================================
   Hjernet 2 – ny visuel identitet
   »Mindre skærm, mere hukommelse«: roligt papir, mørk blæk, én dyb indigo.
   Lægges sidst, så den styrer udtrykket på alle sider.
   ========================================================= */
:root {
  --page: #F6F3EE; --bg: #F6F3EE; --card: #FFFFFF; --soft: #EFEAE2; --line: #E0D8CC; --vig: transparent;
  --ink: #1C2433; --navy: #1C2433; --muted: #1C2433;
  --blue: #2F4BB3; --blue-hover: #253C93; --blue-soft: #ECEEFA; --blue-line: #C9D0EF;
  --grape: #2F4BB3; --grape-dark: #253C93; --grape-soft: #ECEEFA;
  --mint-dark: #0F7A57; --coral-dark: #B4321E;
  --shadow: none; --card-shadow: none;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --r-card: 18px;
}
html[data-theme="dark"] {
  --page: #12151B; --bg: #12151B; --card: #1A1F28; --soft: #222833; --line: #343C49;
  --ink: #ECEFF4; --navy: #F2F4F8; --muted: #ECEFF4;
  --blue: #A9B8F6; --blue-hover: #3C5BD6; --blue-soft: #232A44; --blue-line: #3D477A;
  --grape: #A9B8F6; --grape-dark: #C3CEF9; --grape-soft: #232A44;
  --mint-dark: #5FD3A8; --coral-dark: #FF9A8A;
}
body, html { background: var(--page) !important; }
body::before, body::after { display: none !important; }

/* Skrift: rolige overskrifter i bogskrift – ordblinde-tilstand beholder den læsevenlige skrift */
h1, h2, .th-title, .cert-n { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 4.2vw, 3.1rem); line-height: 1.1; color: var(--ink); }
h2 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); line-height: 1.2; }
html[data-a11y~="ordblind"] h1, html[data-a11y~="ordblind"] h2, html[data-a11y~="ordblind"] .th-title { font-family: inherit; letter-spacing: 0; }
.lead { font-size: 1.1rem; max-width: 62ch; }

/* Sidehoved: roligt og let */
.top { background: color-mix(in srgb, var(--page) 92%, transparent) !important; border-bottom: 1px solid var(--line) !important; box-shadow: none !important; }
#nav a { border-radius: 0 !important; background: none !important; border-bottom: 3px solid transparent !important; font-weight: 700; }
#nav a.active, #nav a[aria-current="page"] { border-bottom-color: var(--blue) !important; color: var(--ink) !important; }
@media (max-width: 700px) {
  #nav { background: var(--card) !important; border-top: 1px solid var(--line) !important; box-shadow: 0 -2px 12px rgba(28, 36, 51, .06) !important; }
  #nav a { border-bottom: 0 !important; border-radius: 12px !important; }
  #nav a.active, #nav a[aria-current="page"] { background: var(--blue-soft) !important; }
}

/* Flader: flade kort, tynde kanter, luft */
.box, .game, .pack-card, .tile, .tech-card, .mp-list li, .dp-steps li, .wall-list li, .rv-card {
  background: var(--card) !important; border: 1px solid var(--line) !important; border-radius: var(--r-card) !important; box-shadow: none !important; }
.box { padding: clamp(18px, 2.4vw, 26px) !important; }
.btn { border-radius: 12px !important; box-shadow: none !important; }
.btn.go { background: #2F4BB3 !important; border-color: #2F4BB3 !important; color: #fff !important; }
.btn.go:hover { background: #253C93 !important; border-color: #253C93 !important; }
html[data-theme="dark"] .btn.go { background: #3C5BD6 !important; border-color: #3C5BD6 !important; }
.btn:not(.go):not(.ghost) { background: var(--card) !important; border: 1px solid var(--line) !important; color: var(--ink) !important; }
.mp-bar i, .dp-bar i { background: var(--mint-dark) !important; }

/* ---------- Forsiden »I dag« ---------- */
.today-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(18px, 4vw, 48px); align-items: center;
  padding: clamp(22px, 4vw, 44px) 0 clamp(18px, 3vw, 30px); }
.th-date { margin: 0 0 6px; font-size: .95rem; font-weight: 700; text-transform: capitalize; letter-spacing: .02em; }
.today-hero h1 { margin: 0 0 14px; font-size: clamp(2.4rem, 5vw, 3.6rem); }
.th-title { margin: 0; font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.25; }
.th-sub { margin: 8px 0 0; font-size: 1.08rem; max-width: 52ch; }
.th-act { margin-top: 22px; } .th-act .btn { min-height: 56px; padding: 12px 28px; font-size: 1.1rem; }
.th-ring { position: relative; width: clamp(140px, 18vw, 180px); aspect-ratio: 1; }
.th-ring svg { width: 100%; height: 100%; } .ring-bg { fill: none; stroke: var(--soft); stroke-width: 10; }
.ring-fg { fill: none; stroke: var(--mint-dark); stroke-width: 10; stroke-linecap: round; transition: stroke-dasharray .8s ease; }
.th-ring > div { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.th-ring b { font-family: var(--serif); font-size: clamp(2rem, 3.6vw, 2.6rem); line-height: 1; } .th-ring span { font-size: .85rem; font-weight: 700; max-width: 9ch; }
@media (max-width: 640px) { .today-hero { grid-template-columns: 1fr; } .th-ring { order: -1; width: 120px; } .th-act .btn { width: 100%; justify-content: center; } }
@media (prefers-reduced-motion: reduce) { .ring-fg { transition: none; } }

/* Dagens plan: kompakt tjekliste */
.day-plan { margin-bottom: 20px; }
.day-plan .dp-head h2 { font-size: 1.25rem; }

/* Dine emner: hvert emne et landskab */
.mastery .mp-list { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr)); gap: 14px; }
.mastery .mp-list li { padding: 18px !important; gap: 8px; }
.mastery .mp-top b { font-family: var(--serif); font-size: 1.15rem; }
.mastery .mp-list li > .btn { align-self: flex-start; margin-top: 4px; }
.exp-path span.on { background: #2F4BB3 !important; border-color: #2F4BB3 !important; }
html[data-theme="dark"] .exp-path span.on { background: #6F86E8 !important; border-color: #6F86E8 !important; }

/* Dagens teknik og »Find noget nyt« */
.tech-day h2 { margin: 2px 0 8px; } .tech-day .tech-ex { margin-bottom: 12px; }
.find-new .fn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 12px; margin-top: 12px; }
.fn-item { display: flex; flex-direction: column; gap: 4px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); background: var(--page); min-height: 44px; }
.fn-item:hover { border-color: var(--blue); } .fn-item:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.fn-item span { font-size: .95rem; }
.today-hero + .day-plan, .day-plan + .home-online, .mastery, .tech-day, .find-new, .class-goal { margin-top: 18px; }

/* Min udvikling */
.dev-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: 12px; margin: 18px 0; }
.dev-stats > div { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px; display: flex; flex-direction: column; gap: 4px; }
.dev-stats b { font-family: var(--serif); font-size: 2.2rem; line-height: 1; } .dev-stats span { font-weight: 600; }

/* Små detaljer */
.flow-exit { margin-bottom: 8px; }
.crumbs { font-size: .95rem; }
/* Ingen gammel side-ramme: papiret går hele vejen */
main#main { background: transparent !important; box-shadow: none !important; border: 0 !important; }
/* Ingen streak, der straffer en pause */
.top #streak { display: none !important; }
/* Ekspeditionen erstatter fremgangsbjælken i »Dine emner« */
.mastery li:has(.exp-path) > .mp-bar { display: none; }
.exp-path { gap: 5px !important; } .exp-path span { height: 10px !important; border-radius: 5px !important; }
.exp-path span.exp-goal { flex: 1.6; } .exp-path span.exp-goal.on { background: var(--mint-dark) !important; border-color: var(--mint-dark) !important; }
.th-date { text-transform: none; }
/* Mig */
.mig-top { padding: clamp(18px, 3vw, 34px) 0 18px; } .mig-top h1 { margin: 0 0 10px; } .mig-top .th-title { margin: 0; }
.mig-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: 14px; }
.mig-tile { display: flex; flex-direction: column; gap: 4px; padding: 20px; min-height: 120px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card);
  text-decoration: none; color: var(--ink); }
.mig-tile:hover { border-color: var(--blue); } .mig-tile:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.mig-tile b { font-family: var(--serif); font-size: 1.25rem; } .mig-tile small { font-size: .95rem; }
.mig-ic { font-size: 1.4rem; } .mig-ic .ic { width: 26px; height: 26px; color: var(--blue); }
html[data-a11y~="ordblind"] .mig-tile b { font-family: inherit; }

/* =========================================================
   Opdatering: ingen bogskrift, blå i stedet for grøn, værkstedet på linje
   ========================================================= */
:root { --serif: inherit; --brand: #2F4BB3; --brand-2: #6F86E8; --brand-soft: #E3E8FA; }
html[data-theme="dark"] { --brand: #8EA2F2; --brand-2: #5C72D6; --brand-soft: #2A3254; }
h1, h2, .th-title, .cert-n, .mastery .mp-top b, .mig-tile b, .th-ring b, .dev-stats b { font-family: inherit !important; letter-spacing: -.005em; }
h1 { font-weight: 800; } h2, .th-title, .mig-tile b, .mastery .mp-top b { font-weight: 800; }
.today-hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.2rem); }

/* Forsiden i brandets blå */
.ring-fg { stroke: var(--brand) !important; } .ring-bg { stroke: var(--brand-soft) !important; }
.mp-bar i, .dp-bar i { background: var(--brand) !important; }
.exp-path span.on { background: var(--brand) !important; border-color: var(--brand) !important; }
.exp-path span.exp-goal.on { background: var(--brand) !important; border-color: var(--brand) !important; box-shadow: 0 0 0 2px var(--brand-soft); }
.dp-steps li.is-done .dp-mark, .is-done .dp-mark { color: var(--brand) !important; }
.dp-steps li.is-next { border-color: var(--brand) !important; box-shadow: 0 0 0 3px var(--brand-soft) !important; }
.master-cert.pass { border-color: var(--brand) !important; }
.class-goal .mp-bar i { background: var(--brand) !important; }

/* Værkstedet: kortene flugter (rækker deles på tværs af kortene) */
.tech-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 17.5rem), 1fr)) !important; grid-auto-rows: auto; align-items: stretch; }
@supports (grid-template-rows: subgrid) {
  .tech-grid .tech-card { display: grid !important; grid-row: span 6; grid-template-rows: subgrid; gap: 8px; align-content: start; }
}
.tech-card .row { align-self: end; margin-top: 4px; }
.tech-card .e { font-size: 1.5rem; line-height: 1; } .tech-card .e .ic { width: 30px; height: 30px; color: var(--brand); }
.tech-card .tech-how { margin: 0; }
.tech-card.is-open { border-color: var(--brand) !important; box-shadow: 0 0 0 3px var(--brand-soft) !important; }
.ws-try { min-width: 8.5rem; justify-content: center; }

/* Værkstedsbordet */
@keyframes wsIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes popIn { from { opacity: 0; transform: scale(.85) translateY(6px); } to { opacity: 1; transform: none; } }
.ws-bench { margin-top: 18px; border: 2px solid var(--brand) !important; animation: wsIn .35s cubic-bezier(.2, .7, .2, 1) both; display: flex; flex-direction: column; gap: 14px; }
.ws-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; } .ws-head h2 { margin: 0; }
.ws-steps { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; } .ws-steps span { padding: 6px 12px; border-radius: 10px; background: var(--brand-soft); font-weight: 700; font-size: .92rem; }
.ws-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 12px; }
.ws-form label, .ws-story { display: flex; flex-direction: column; gap: 6px; font-weight: 700; } .ws-form .w-full, .ws-story { grid-column: 1 / -1; }
.ws-form input, .ws-form select, .ws-form textarea, .ws-story textarea { min-height: 48px; padding: 10px 12px; font: inherit; font-weight: 500; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); }
.ws-form input:focus, .ws-form textarea:focus, .ws-form select:focus, .ws-story textarea:focus { outline: 3px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.ws-preview { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.flipcard { position: relative; width: min(100%, 340px); height: 150px; perspective: 900px; border: 0; background: none; padding: 0; cursor: pointer; font: inherit; }
.flipcard span { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink);
  font-size: 1.15rem; font-weight: 800; text-align: center; backface-visibility: hidden; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.flipcard .fc-back { transform: rotateY(180deg); background: var(--brand-soft); } .flipcard.flip .fc-front { transform: rotateY(-180deg); } .flipcard.flip .fc-back { transform: rotateY(0); }
.flipcard:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 16px; }
.hs-chips { display: flex; flex-wrap: wrap; gap: 8px; min-height: 8px; }
.hs-chip { padding: 8px 12px; border: 1.5px solid var(--brand); border-radius: 10px; background: var(--card); font-weight: 700; animation: popIn .3s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i) * 40ms); }
.fig-row { display: flex; flex-wrap: wrap; gap: 12px; min-height: 8px; }
.fig { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 14px; min-width: 88px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--card);
  animation: popIn .35s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i) * 90ms); }
.fig b { font-size: 2rem; line-height: 1; } .fig .ic { width: 34px; height: 34px; color: var(--brand); } .fig small { font-weight: 700; }
.route-demo { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.route-demo li { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px 12px 32px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--card);
  animation: popIn .35s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i) * 120ms); }
.rd-dot { position: absolute; left: 12px; top: 16px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }
.route-demo small { font-weight: 600; }

/* Tegneværktøjet */
.draw-q { margin: 0 0 6px; } .draw-tools { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; margin-top: 8px; }
.dt-group { display: flex; gap: 6px; align-items: center; }
.draw-col { width: 44px; height: 44px; border-radius: 12px; border: 3px solid transparent; background: var(--c); cursor: pointer; }
.draw-erase { background: #fff !important; border: 2px dashed var(--line); color: var(--ink); font-weight: 800; }
.draw-col.on { border-color: var(--ink); box-shadow: 0 0 0 2px var(--card) inset; }
.draw-w { width: 44px; height: 44px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); cursor: pointer; display: grid; place-items: center; }
.draw-w i { display: block; width: var(--w); height: var(--w); border-radius: 50%; background: var(--ink); } .draw-w.on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.draw-col:focus-visible, .draw-w:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

/* Subtile overgange på kort og knapper */
.mig-tile, .fn-item, .tech-card, .mp-list li { transition: border-color .2s, transform .2s, box-shadow .2s; }
.mig-tile:hover, .fn-item:hover { transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .ws-bench, .hs-chip, .fig, .route-demo li, .flipcard span { animation: none !important; transition: none !important; } .mig-tile:hover, .fn-item:hover { transform: none; } }
html[data-calm] .ws-bench, html[data-calm] .hs-chip, html[data-calm] .fig, html[data-calm] .route-demo li { animation: none !important; }
.fig b { font-size: 2.2rem !important; font-weight: 800; color: var(--brand); }
@media (max-width: 760px) { #main .btn.sm, #main .btn { min-height: 44px; } }   /* store nok til en barnefinger */

/* Dagens plan: blå kant, når den er klaret – og ingen streg over teksten */
.day-plan.done, .learn-today.day-plan.done { border-color: var(--brand) !important; box-shadow: 0 0 0 3px var(--brand-soft) !important; }
.dp-steps li.is-done b { text-decoration: none !important; opacity: 1 !important; }
.dp-steps li.is-done { border-color: var(--brand-soft) !important; }

/* »Øv emnet«: valg af antal og tid */
.pp-group { border: 0; padding: 0; margin: 0 0 14px; } .pp-group legend { font-weight: 800; margin-bottom: 8px; padding: 0; }
.pp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pp-chip { position: relative; display: inline-flex; } .pp-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pp-chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); font-weight: 700; }
.pp-chip input:checked + span { background: #2F4BB3; border-color: #2F4BB3; color: #fff; }
.pp-chip input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: 2px; }

/* Tidsbegrænsning i øvningen */
.rv-timer { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.rv-track { flex: 1; height: 8px; border-radius: 4px; background: var(--brand-soft); overflow: hidden; }
.rv-track i { display: block; height: 100%; width: 100%; background: var(--brand); transition: width .2s linear; }
.rv-timer b { flex: none; min-width: 4rem; text-align: right; font-size: .9rem; }
.rv-timer.low .rv-track i { background: var(--coral-dark); }

/* Dansende huskevæsener (tilfældigt tempo pr. væsen) */
@keyframes danceHop { 0%, 100% { transform: translateY(0); } 30% { transform: translateY(-6px); } 55% { transform: translateY(0) scaleY(.94); } 70% { transform: translateY(-2px); } }
@keyframes danceSway { 0%, 100% { transform: rotate(0) translateX(0); } 25% { transform: rotate(-7deg) translateX(var(--dx)); } 75% { transform: rotate(7deg) translateX(calc(-1 * var(--dx))); } }
@keyframes danceSpin { 0%, 70%, 100% { transform: rotate(0) scale(1); } 80% { transform: rotate(-12deg) scale(1.06); } 90% { transform: rotate(12deg) scale(1.06); } }
.mp-pets > * { display: inline-block; transform-origin: 50% 90%; }
.mp-pets > .dance-hop { animation: danceHop var(--dd) ease-in-out var(--dl) infinite; }
.mp-pets > .dance-sway { animation: danceSway var(--dd) ease-in-out var(--dl) infinite; }
.mp-pets > .dance-spin { animation: danceSpin calc(var(--dd) * 1.6) ease-in-out var(--dl) infinite; }
@media (prefers-reduced-motion: reduce) { .mp-pets > * { animation: none !important; } .rv-timer i { transition: none; } }
html[data-calm] .mp-pets > * { animation: none !important; }
#main .learn-today.day-plan.done, #main section.day-plan.done { border: 2px solid var(--brand) !important; box-shadow: 0 0 0 3px var(--brand-soft) !important; }

/* Låst af læreren: udvisket med »Låst« ovenpå */
.locked-wrap, .is-locked { position: relative; }
.locked-inner, .is-locked > *:not(.locked-badge) { filter: blur(5px); opacity: .75; user-select: none; pointer-events: none; }
.locked-badge { position: absolute; inset: 0; display: grid; place-items: center; z-index: 2; pointer-events: none; }
.locked-badge::before { content: ""; }
.locked-badge { font-weight: 800; font-size: 1.15rem; color: var(--ink); }
.locked-badge { background: none; }
.locked-wrap > .locked-badge { align-items: start; padding-top: 18vh; }
.is-locked > .locked-badge, .locked-wrap > .locked-badge { text-shadow: 0 0 8px var(--page), 0 0 16px var(--page); }
.tech-grid .tech-card.is-locked .locked-badge { grid-row: 1 / -1; grid-column: 1; }
@media (prefers-reduced-motion: reduce) { .locked-inner, .is-locked > * { transition: none; } }

/* ui-design-brain: skelet ved indlæsning (rolig puls – ingen spinner) */
@keyframes skelPulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
.skel-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; background: var(--card); }
.skel { display: block; height: 14px; border-radius: 7px; background: var(--soft); animation: skelPulse 1.4s ease-in-out infinite; }
.skel.w40 { width: 40%; } .skel.w50 { width: 50%; } .skel.w60 { width: 60%; } .skel.w70 { width: 70%; } .skel.w80 { width: 80%; } .skel.w90 { width: 90%; }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }
/* ui-design-brain: X i hjørnet på dialoger */
.dlg-x { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 12px; background: none; color: var(--ink); font-size: 1.15rem; font-weight: 700; cursor: pointer; }
.dlg-x:hover { background: var(--soft); } .dlg-x:focus-visible { outline: 3px solid #2F4BB3; outline-offset: 2px; }
.leave-dlg, .pdlg { position: relative; } .leave-dlg > h2, .pdlg > h2 { padding-right: 52px; }
/* ui-design-brain: beskeder kan lukkes */
#toast { display: flex; align-items: center; gap: 10px; pointer-events: auto; }
#toast .toast-x { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 8px; background: rgba(255,255,255,.14); color: inherit; font-weight: 800; cursor: pointer; }
#toast .toast-x:hover { background: rgba(255,255,255,.26); } #toast .toast-x:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
@media (max-width: 760px) { #toast .toast-x { width: 44px; height: 44px; } }
/* ui-design-brain: eksterne links og synlig label på søgning */
.ext-ic { margin-left: 3px; font-size: .9em; }
.search-lbl { display: flex; flex-direction: column; gap: 6px; font-weight: 700; max-width: 360px; width: 100%; }
.search-lbl input { min-height: 44px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font: inherit; font-weight: 500; }
.search-lbl input:focus { outline: 3px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
#toast:not(.show) { pointer-events: none !important; }   /* en skjult besked må ikke fange klik */
.ext-ic { display: inline-block; vertical-align: -1px; margin-left: 3px; }

/* Vælg – skift mening – svar */
.mc-opts .mc-opt { transition: border-color .15s, background-color .15s, box-shadow .15s; }
.mc-opts .mc-opt.on { border-color: var(--brand) !important; background: var(--brand-soft) !important; box-shadow: 0 0 0 3px var(--brand-soft) !important; }
.mc-opts .mc-opt.on .mc-key { background: #2F4BB3 !important; color: #fff !important; }
html[data-theme="dark"] .mc-opts .mc-opt.on .mc-key { background: #3C5BD6 !important; }
.mc-row { margin-top: 14px; } .mc-submit { min-width: 9rem; justify-content: center; }
/* Farlige handlinger: tydeligt røde */
.btn.danger { background: #B4321E !important; border-color: #B4321E !important; color: #fff !important; }
.btn.danger:hover { background: #8F2716 !important; border-color: #8F2716 !important; }
html[data-theme="dark"] .btn.danger { background: #C2412D !important; border-color: #C2412D !important; }
.issue-link { margin-top: 12px; }
/* Røde knapper skal vinde over reglen for sekundære knapper */
.btn.danger:not(.go):not(.ghost) { background: #B4321E !important; border-color: #B4321E !important; color: #fff !important; }
.btn.danger:not(.go):not(.ghost):hover { background: #8F2716 !important; border-color: #8F2716 !important; }
html[data-theme="dark"] .btn.danger:not(.go):not(.ghost) { background: #C2412D !important; border-color: #C2412D !important; }

/* =========================================================
   Import, egne kort, foldbare huskepakker og konto
   ========================================================= */
.drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 32px 16px; border: 2px dashed var(--line); border-radius: 16px; background: var(--page); text-align: center; cursor: pointer; transition: border-color .2s, background-color .2s; }
.drop:hover, .drop.over, .drop:focus-within { border-color: var(--brand); background: var(--brand-soft); }
.drop input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop:focus-within { outline: 3px solid var(--brand); outline-offset: 2px; }
.drop-ic, .auth-ic { font-size: 2rem; margin: 0; } .drop-ic .ic, .auth-ic .ic { width: 40px; height: 40px; color: var(--brand); }
.imp-in textarea, .imp-grid select, .imp-glist input, .imp-list textarea, .imp-list select, .imp-bar select, .mine-bar select {
  min-height: 44px; padding: 8px 10px; font: inherit; border: 1.5px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); }
.imp-in textarea { width: 100%; margin-top: 6px; }
.imp-in label[for=impText] { font-weight: 700; }
.imp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: 12px; align-items: end; margin-top: 10px; }
.imp-grid > label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; } .imp-grid .row { grid-column: 1 / -1; }
.chk { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; min-height: 44px; } .chk input { width: 20px; height: 20px; }
.inline { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; flex-wrap: wrap; }
.imp-warn { color: var(--coral-dark); font-weight: 700; }
.imp-glist { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.imp-glist li { display: flex; align-items: center; gap: 10px; } .imp-glist input { flex: 1; max-width: 22rem; } .imp-glist span { font-weight: 600; min-width: 4.5rem; }
.imp-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 0 12px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.imp-head { display: grid; grid-template-columns: 32px 1fr 1fr 11rem 44px; gap: 8px; font-weight: 800; font-size: .9rem; padding: 0 2px 6px; }
.imp-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.imp-list li { display: grid; grid-template-columns: 32px 1fr 1fr 11rem 44px; gap: 8px; align-items: start; padding: 6px 2px; border-radius: 10px; }
.imp-list li.flag { background: color-mix(in srgb, var(--coral-dark) 8%, transparent); }
.imp-list li.off > textarea, .imp-list li.off > select { opacity: .5; text-decoration: line-through; }
.imp-list .imp-sel { width: 20px; height: 20px; margin-top: 12px; } .imp-list textarea { width: 100%; resize: vertical; }
.imp-flag { grid-column: 2 / -1; color: var(--coral-dark); font-weight: 700; margin-top: -2px; }
@media (max-width: 760px) { .imp-head { display: none; } .imp-list li { grid-template-columns: 32px 1fr 44px; } .imp-list li > select { grid-column: 2 / 3; } .imp-list li > textarea[data-f=a] { grid-column: 2 / 3; } .imp-list .imp-tog { grid-row: 1; grid-column: 3; } }
.imp-go { margin-top: 16px; }
.imp-help ul { margin: 8px 0; padding-left: 1.2rem; } .imp-help li { margin-bottom: 6px; } .imp-help code { background: var(--soft); padding: 1px 6px; border-radius: 6px; }
/* Foldbare grupper (huskepakker og egne kort) */
.pk-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 6px 0 16px; } .pk-by { font-weight: 700; }
.seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--card); }
.seg-btn { min-height: 44px; padding: 8px 16px; border: 0; background: none; color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.seg-btn + .seg-btn { border-left: 1.5px solid var(--line); } .seg-btn.on { background: #2F4BB3; color: #fff; }
html[data-theme="dark"] .seg-btn.on { background: #3C5BD6; } .seg-btn:focus-visible { outline: 3px solid var(--brand); outline-offset: -3px; }
.pk-group { margin-bottom: 12px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card); }
.pk-group > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; min-height: 56px; cursor: pointer; list-style: none; border-radius: var(--r-card); }
.pk-group > summary::-webkit-details-marker { display: none; }
.pk-group > summary::after { content: ""; flex: none; width: 10px; height: 10px; border-right: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink); transform: rotate(45deg); margin: -4px 4px 0 auto; transition: transform .2s; }
.pk-group[open] > summary::after { transform: rotate(-135deg); margin-top: 4px; }
.pk-group > summary:hover { background: var(--page); } .pk-group > summary:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.pk-title { font-size: 1.2rem; font-weight: 800; } .pk-meta { font-weight: 600; font-size: .95rem; margin-left: auto; }
.pk-group > .games, .pk-group > .pk-note, .pk-group > .mine-actions, .pk-group > .mine-list { padding: 0 20px 18px; }
.pk-group.box { padding: 0 !important; }
.mine-list { list-style: none; margin: 0; display: flex; flex-direction: column; gap: 2px; } .mine-list .chk { align-items: flex-start; } .mine-list .chk input { margin-top: 3px; }
.mine-actions { align-items: center; flex-wrap: wrap; }
@media (prefers-reduced-motion: reduce) { .pk-group > summary::after { transition: none; } }
/* Konto */
.auth-done { text-align: center; } .auth-done .row { justify-content: center; }
.login-box { max-width: 34rem; }
/* Print: flag på kortene */
.p-flag svg { width: 60px; height: auto; display: block; margin-bottom: 4px; }
.pk-group > summary > h2.pk-title { margin: 0; font-size: 1.2rem; }
/* Kort, der springes over: tydeligt markeret, men stadig læselige (kontrastkrav) */
.imp-list li.off > textarea, .imp-list li.off > select { opacity: 1 !important; }
.imp-list li.off { background: var(--soft); }
.imp-list li.off > textarea { text-decoration: line-through; text-decoration-thickness: 2px; }
.inline select, #impChunk { min-height: 44px; padding: 6px 10px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); font: inherit; }

/* =========================================================
   Interaktive grafer (charts.js)
   ========================================================= */
.hjc { margin: 8px 0 0; position: relative; }
.hjc-plot { position: relative; width: 100%; border-radius: 12px; outline: none; touch-action: pan-y; cursor: crosshair; }
.hjc-plot:focus-visible { outline: 3px solid var(--brand, #2F4BB3); outline-offset: 4px; }
.hjc-plot svg { display: block; width: 100%; height: auto; overflow: visible; }
.hjc-grid { stroke: var(--line, #E0D8CC); stroke-width: 1; }
.hjc-axis { stroke: var(--ink, #1C2433); stroke-opacity: .35; stroke-width: 1.5; }
.hjc-yt, .hjc-xt { fill: var(--ink, #1C2433); font: 600 12px/1 inherit; font-family: inherit; }
.hjc-line { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; animation: hjcDraw .9s cubic-bezier(.2,.7,.2,1) both; }
.hjc-area { opacity: .12; stroke: none; animation: hjcFade .9s ease both; }
.hjc-dot { stroke: var(--card, #fff); stroke-width: 1.5; }
.hjc-mark { stroke: var(--card, #fff); stroke-width: 2.5; }
.hjc-bar { transform-box: fill-box; transform-origin: bottom; animation: hjcGrow .6s cubic-bezier(.2,.7,.2,1) both; animation-delay: var(--d, 0ms); transition: opacity .15s; }
.hjc-bar.dim { opacity: .35; }
.hjc-cross { stroke: var(--ink, #1C2433); stroke-opacity: .4; stroke-width: 1; stroke-dasharray: 4 4; }
.hjc-c0 { stroke: var(--brand, #2F4BB3); fill: var(--brand, #2F4BB3); } .hjc-line.hjc-c0, .hjc-line.hjc-c1, .hjc-line.hjc-c2 { fill: none; }
.hjc-c1 { stroke: #1B7F86; fill: #1B7F86; } .hjc-c2 { stroke: #B4581E; fill: #B4581E; }
html[data-theme="dark"] .hjc-c1, .panel-dark .hjc-c1 { stroke: #5CC8CF; fill: #5CC8CF; } html[data-theme="dark"] .hjc-c2 { stroke: #F0A06A; fill: #F0A06A; }
.hjc-tip { position: absolute; top: -6px; transform: translateY(-100%); z-index: 3; display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border-radius: 10px;
  background: var(--ink, #1C2433); color: var(--card, #fff); font-size: .9rem; white-space: nowrap; pointer-events: none; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.hjc-tip b { font-weight: 800; } .hjc-tip span { display: flex; align-items: center; gap: 6px; } .hjc-tip strong { font-size: 1.05rem; }
.hjc-tip i, .hjc-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: currentColor; }
.hjc-tip i.hjc-c0, .hjc-legend i.hjc-c0 { background: var(--brand, #2F4BB3); } .hjc-tip i.hjc-c1, .hjc-legend i.hjc-c1 { background: #1B7F86; } .hjc-tip i.hjc-c2, .hjc-legend i.hjc-c2 { background: #B4581E; }
html[data-theme="dark"] .hjc-tip i.hjc-c0 { background: #8EA2F2; }
.hjc-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; font-weight: 600; font-size: .92rem; } .hjc-legend span { display: inline-flex; align-items: center; gap: 6px; }
.hjc-table { margin-top: 8px; font-size: .92rem; } .hjc-table summary { cursor: pointer; font-weight: 600; min-height: 32px; display: inline-flex; align-items: center; }
.hjc-table table { border-collapse: collapse; margin-top: 6px; } .hjc-table th, .hjc-table td { padding: 4px 12px 4px 0; text-align: left; border-bottom: 1px solid var(--line, #E0D8CC); } .hjc-table td { text-align: right; }
@keyframes hjcDraw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes hjcGrow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes hjcFade { from { opacity: 0; } to { opacity: .12; } }
@media (prefers-reduced-motion: reduce) { .hjc-line, .hjc-area, .hjc-bar { animation: none !important; } }
html[data-calm] .hjc-line, html[data-calm] .hjc-area, html[data-calm] .hjc-bar { animation: none !important; }
.dev-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 4px 0 4px; }
.hjc-sum { border-top: 1px solid rgba(255,255,255,.25); margin-top: 3px; padding-top: 3px; }

/* Importsiden: sådan gør du – trin 1-2-3 */
.imp-hero { margin: 6px 0 18px; }
.imp-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 12px; }
.imp-steps > li { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 18px 16px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.imp-steps > li b { font-size: 1.05rem; }
.imp-n { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #2F4BB3; color: #fff; font-weight: 800; }
html[data-theme="dark"] .imp-n { background: #3C5BD6; }
.imp-ex { display: block; margin-top: auto; padding: 10px 12px; border-radius: 12px; background: var(--page); border: 1px dashed var(--line); font-size: .95rem; line-height: 1.5; }
.imp-note { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.imp-cards { display: flex; gap: 8px; border-style: solid; }
.imp-cards > span { flex: 1; display: flex; flex-direction: column; padding: 8px 10px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); font-weight: 700; }
.imp-cards small, .imp-quiz small { font-weight: 600; font-size: .8rem; }
.imp-quiz { display: flex; flex-direction: column; gap: 6px; border-style: solid; } .imp-quiz > small { font-size: .95rem; font-weight: 800; }
.imp-q-opts { display: flex; gap: 6px; flex-wrap: wrap; }
.imp-q-opts i { font-style: normal; padding: 4px 10px; border-radius: 8px; border: 1.5px solid var(--line); background: var(--card); font-weight: 600; }
.imp-q-opts i.ok { border-color: var(--brand); background: var(--brand-soft); }
@media (min-width: 760px) { .imp-steps > li:not(:last-child)::after { content: ""; position: absolute; right: -9px; top: 32px; width: 6px; height: 6px; border-top: 2px solid var(--line); border-right: 2px solid var(--line); transform: rotate(45deg); } }

/* =========================================================
   3-minutterstesten (forsiden for besøgende)
   ========================================================= */
.mt-wrap { display: flex; justify-content: center; padding: clamp(16px, 4vw, 40px) 0 clamp(24px, 5vw, 56px); }
.mt-stage { width: min(100%, 44rem); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; min-height: 26rem; justify-content: center;
  padding: clamp(22px, 4vw, 44px); background: var(--card); border: 1px solid var(--line); border-radius: 28px; box-shadow: 0 18px 50px rgba(28,36,51,.08); }
.mt-kicker { margin: 0; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; font-size: .85rem; color: var(--brand); }
.mt-h1 { margin: 0; font-size: clamp(2.2rem, 6vw, 3.6rem); line-height: 1.05; font-weight: 800; }
.mt-h2 { margin: 0; font-size: clamp(1.4rem, 3.4vw, 2rem); font-weight: 800; }
.mt-sub { margin: 0; font-size: 1.15rem; max-width: 34ch; }
.mt-cta { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 6px; }
.mt-big { min-height: 64px !important; padding: 16px 40px !important; font-size: 1.25rem !important; border-radius: 16px !important; animation: mtPulse 2.4s ease-in-out infinite; }
@keyframes mtPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(47,75,179,.35); } 50% { box-shadow: 0 0 0 12px rgba(47,75,179,0); } }
.mt-login { margin: 4px 0 0; font-size: 1rem; } .mt-login a, .mt-login .linkbtn { font-weight: 700; }
.mt-dots { list-style: none; display: flex; gap: 8px; margin: 0 0 6px; padding: 0; flex-wrap: wrap; justify-content: center; }
.mt-dots li { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--soft); font-weight: 700; font-size: .92rem; }
.mt-dots li span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--card); font-size: .85rem; }
.mt-dots li.on { background: var(--brand-soft); } .mt-dots li.on span { background: #2F4BB3; color: #fff; }
.mt-dots li.done span { background: #0F7A57; color: #fff; }
.mt-hint { margin: 0; font-weight: 700; }
.mt-word { min-height: 8rem; display: grid; place-items: center; }
.mt-w { font-size: clamp(3rem, 11vw, 5.5rem); font-weight: 800; letter-spacing: -.02em; animation: mtIn .45s cubic-bezier(.2,.7,.2,1) both; }
@keyframes mtIn { from { opacity: 0; transform: translateY(18px) scale(.94); } to { opacity: 1; transform: none; } }
.mt-prog { width: min(100%, 22rem); height: 8px; border-radius: 4px; background: var(--soft); overflow: hidden; }
.mt-prog i { display: block; height: 100%; background: var(--brand); transition: width .4s ease; }
.mt-count { margin: 0; font-weight: 700; font-size: .95rem; }
.mt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(46%, 8.5rem), 1fr)); gap: 8px; width: 100%; }
.mt-chip { min-height: 52px; padding: 10px; border: 2px solid var(--line); border-radius: 14px; background: var(--page); color: var(--ink); font: inherit; font-size: 1.1rem; font-weight: 700; cursor: pointer;
  transition: transform .12s, border-color .15s, background-color .15s; }
.mt-chip:hover { border-color: var(--brand); } .mt-chip:active { transform: scale(.96); }
.mt-chip.on { border-color: #2F4BB3; background: #2F4BB3; color: #fff; animation: mtPop .2s ease; }
html[data-theme="dark"] .mt-chip.on { background: #3C5BD6; border-color: #3C5BD6; }
@keyframes mtPop { 50% { transform: scale(1.06); } }
.mt-chip:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.mt-score, .mt-vs > div { display: flex; flex-direction: column; align-items: center; }
.mt-num { font-size: clamp(3.4rem, 10vw, 5rem); font-weight: 800; line-height: 1; }
.mt-vs { display: flex; align-items: center; gap: clamp(16px, 5vw, 40px); } .mt-vs span { font-weight: 700; }
.mt-up .mt-num { color: #0F7A57; } html[data-theme="dark"] .mt-up .mt-num { color: #5FD3A8; }
.mt-arrow { font-size: 2.2rem; font-weight: 800; color: var(--brand); }
.mt-story { margin: 0; font-size: clamp(1.5rem, 4.4vw, 2.3rem); font-weight: 700; line-height: 1.35; max-width: 22ch; animation: mtIn .5s cubic-bezier(.2,.7,.2,1) both; }
.mt-story mark { background: var(--brand-soft); color: inherit; padding: 0 .15em; border-radius: 6px; font-weight: 800; }
.mt-more { border-top: 1px solid var(--line); padding-top: 12px; }
.sfx-btn { display: inline-grid; place-items: center; }
@media (prefers-reduced-motion: reduce) { .mt-big, .mt-w, .mt-story, .mt-chip.on { animation: none !important; } .mt-prog i { transition: none; } }
html[data-calm] .mt-big, html[data-calm] .mt-w, html[data-calm] .mt-story { animation: none !important; }
/* Svar i øvningen: kort blink – grøn eller rød */
.review .card.fx-ok { animation: fxOk .5s ease; } .review .card.fx-bad { animation: fxBad .45s ease; }
@keyframes fxOk { 0% { box-shadow: 0 0 0 0 rgba(15,122,87,.45); } 100% { box-shadow: 0 0 0 16px rgba(15,122,87,0); } }
@keyframes fxBad { 0%, 100% { transform: none; } 25% { transform: translateX(-6px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }
/* Nyt niveau */
.lvl-up { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(18,21,27,.35); animation: fadeIn .2s ease both; cursor: pointer; }
.lvl-up.out { animation: fadeOut .5s ease both; }
.lvl-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 32px 40px; border-radius: 24px; background: var(--card); color: var(--ink); box-shadow: 0 30px 80px rgba(0,0,0,.25); animation: lvlPop .5s cubic-bezier(.2,1.4,.4,1) both; }
.lvl-card b { font-size: 2.4rem; font-weight: 800; color: #2F4BB3; } html[data-theme="dark"] .lvl-card b { color: #8EA2F2; }
.lvl-ring { position: absolute; inset: -6px; border-radius: 28px; border: 3px solid #2F4BB3; opacity: 0; animation: lvlRing 1.2s ease-out .15s; }
@keyframes lvlPop { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }
@keyframes lvlRing { from { opacity: .8; transform: scale(.95); } to { opacity: 0; transform: scale(1.25); } }
@keyframes fadeIn { from { opacity: 0; } } @keyframes fadeOut { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .review .card.fx-ok, .review .card.fx-bad, .lvl-card, .lvl-ring, .lvl-up { animation: none !important; } }
html[data-calm] .review .card.fx-ok, html[data-calm] .review .card.fx-bad, html[data-calm] .lvl-card, html[data-calm] .lvl-ring { animation: none !important; }
.mt-chip { transition: transform .12s, border-color .15s, background-color .15s, color .15s; }
.mt-login .linkbtn { background: none; border: 0; padding: 0; color: var(--brand); text-decoration: underline; cursor: pointer; font: inherit; font-weight: 700; min-height: 0; }
.pt-fly { position: fixed; z-index: 60; padding: 4px 10px; border-radius: 999px; background: #2F4BB3; color: #fff; font-weight: 800; font-size: .95rem; pointer-events: none; animation: ptFly 1.1s cubic-bezier(.2,.7,.2,1) both; }
@keyframes ptFly { 0% { opacity: 0; transform: translateY(6px) scale(.9); } 20% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-26px); } }
.mt-chip { transition: transform .12s, border-color .15s !important; }   /* farven skifter øjeblikkeligt – ingen ulæselige mellemtrin */

/* Dine svære kort */
.mc-list { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.mc-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--page);
  animation: wsIn .4s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i, 0) * 50ms); }
.mc-q { font-weight: 700; } .mc-n { flex: none; font-size: .9rem; font-weight: 700; padding: 2px 8px; border-radius: 8px; background: var(--brand-soft); }

/* Flow: blødt skift mellem siderne */
@keyframes flowIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
#main.flow-in > * { animation: flowIn .45s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--fi, 0) * 55ms); }
/* Pænere tryk og hover på kort og knapper */
.btn { transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease !important; }
.btn:hover:not([aria-disabled="true"]) { transform: translateY(-1px); }
.btn:active:not([aria-disabled="true"]) { transform: translateY(0) scale(.98); }
.btn.go:hover:not([aria-disabled="true"]) { box-shadow: 0 6px 18px rgba(47,75,179,.28) !important; }
.mastery .mp-list li, .pack-card, .fn-item, .mig-tile, .tech-card { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.mastery .mp-list li:hover, .pack-card:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(28,36,51,.08) !important; }
.th-ring svg .ring-fg { transition: stroke-dasharray 1.1s cubic-bezier(.2,.7,.2,1); }
@media (prefers-reduced-motion: reduce) { #main.flow-in > *, .mc-list li { animation: none !important; } .btn:hover, .mastery .mp-list li:hover, .pack-card:hover { transform: none !important; } }
html[data-calm] #main.flow-in > *, html[data-calm] .mc-list li { animation: none !important; }
/* Temaskift: alt skifter farve samtidig og blødt */
html.theme-switching, html.theme-switching *, html.theme-switching *::before, html.theme-switching *::after {
  transition: background-color .3s ease, color .3s ease, border-color .3s ease, fill .3s ease, stroke .3s ease, box-shadow .3s ease !important; animation: none !important; }
/* Hover: blå kant og et lille løft – ingen skygge oven i kanten (»skygge ELLER kant«) */
.mastery .mp-list li:hover, .pack-card:hover { box-shadow: none !important; border-color: var(--brand) !important; }

/* Huskepakker: vælg niveau */
.lvl-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 14px; margin-top: 8px; }
.lvl-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 22px 20px; min-height: 44px; text-align: left; cursor: pointer; font: inherit; color: var(--ink);
  background: var(--card); border: 1.5px solid var(--line); border-radius: 20px; transition: transform .18s ease, border-color .18s ease;
  animation: flowIn .45s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i, 0) * 70ms); }
.lvl-opt:hover { border-color: var(--brand); transform: translateY(-3px); } .lvl-opt:active { transform: scale(.98); }
.lvl-opt:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.lvl-opt b { font-size: 1.3rem; font-weight: 800; } .lvl-d { line-height: 1.45; }
.lvl-n { margin-top: auto; padding-top: 6px; font-weight: 700; font-size: .92rem; color: var(--brand); }
.lvl-ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--brand-soft); margin-bottom: 4px; }
.lvl-ic .ic { width: 28px; height: 28px; color: var(--brand); }
.lvl-ic.sm { width: 34px; height: 34px; border-radius: 10px; margin: 0; } .lvl-ic.sm .ic { width: 20px; height: 20px; }
.lvl-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 6px 0 14px; padding: 8px 10px 8px 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); width: fit-content; max-width: 100%; }
@media (prefers-reduced-motion: reduce) { .lvl-opt { animation: none; transition: none; } .lvl-opt:hover { transform: none; } }
html[data-calm] .lvl-opt { animation: none; }

/* =========================================================
   Importsiden – mindre prototype, mere produkt
   ========================================================= */
.imp-stepper { list-style: none; display: flex; gap: 6px; padding: 0; margin: 4px 0 14px; flex-wrap: wrap; }
.imp-stepper li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; background: var(--soft); font-weight: 700; }
.imp-stepper li span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--card); font-size: .9rem; }
.imp-stepper li.on { background: var(--brand-soft); } .imp-stepper li.on span { background: #2F4BB3; color: #fff; }
.imp-stepper li.done span { background: #0F7A57; color: #fff; }
html[data-theme="dark"] .imp-stepper li.on span { background: #3C5BD6; }
.imp-steps .imp-q-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.imp-steps .imp-q-opts i { text-align: center; }
.imp-more { font-size: .85rem; font-weight: 700; color: var(--brand); margin-top: -4px; }
.imp-in .drop { border-width: 2px; border-radius: 18px; padding: 28px 16px; transition: border-color .2s ease, background-color .2s ease, transform .2s ease; }
.imp-in .drop:hover, .imp-in .drop.over { border-color: var(--brand); background: var(--brand-soft); }
.imp-in .drop.over { transform: scale(1.01); }
.imp-in .drop-ic { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--brand-soft); margin: 0 auto 8px; }
.imp-in .drop-ic .ic { width: 28px; height: 28px; color: var(--brand); }
.imp-busy { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px 16px; text-align: center; }
.imp-busy b { font-size: 1.2rem; }
.imp-spin { width: 40px; height: 40px; border-radius: 50%; border: 4px solid var(--brand-soft); border-top-color: var(--brand); animation: impSpin .8s linear infinite; }
@keyframes impSpin { to { transform: rotate(360deg); } }
.imp-auto { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin: 0 0 14px; border-radius: 14px; background: var(--brand-soft); border: 1px solid var(--blue-line, var(--line)); animation: flowIn .4s ease both; }
.imp-auto .ic { width: 20px; height: 20px; color: var(--brand); flex: none; margin-top: 2px; }
.imp-go { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.imp-sum { font-size: 1.05rem; }
.imp-list li { transition: background-color .2s ease, border-color .2s ease; }
@media (prefers-reduced-motion: reduce) { .imp-spin { animation-duration: 2.4s; } .imp-auto { animation: none; } .imp-in .drop.over { transform: none; } }

/* =========================================================
   Huller væk: Indstillinger og Profil i spalter – hver boks er kun så høj som sit indhold
   (før: gitter med lige høje rækker → op til 600 px tom plads under korte bokse)
   ========================================================= */
.settings, .profile-grid { display: block !important; columns: 2 24rem; column-gap: 18px; }
.settings > *, .profile-grid > * { break-inside: avoid; margin: 0 0 18px !important; width: 100%; display: inline-block; vertical-align: top; }
/* Huskekort: tomt huskeidé-felt fylder ikke */
#main div.h:empty { display: none; }
/* Huskepakker: knapperne flugter i bunden af hvert kort */
.pack-card { display: flex; flex-direction: column; }
.pack-card > .row:last-child { margin-top: auto; padding-top: 6px; }

/* Nedtælling efter svar: pulserende bjælke med pause-ikon */
.rv-auto { position: relative; display: block; width: 100%; height: 34px; margin: 14px 0 4px; padding: 0; border: 0; border-radius: 999px; background: var(--soft); overflow: hidden; cursor: pointer; }
.rv-auto-fill { position: absolute; inset: 0; transform-origin: left center; background: var(--brand); border-radius: inherit;
  animation: rvAuto var(--dur, 6000ms) linear both, rvPulse 1.4s ease-in-out infinite; }
.verdict.no ~ .rv-auto .rv-auto-fill, .card:has(.verdict.no) .rv-auto-fill { background: #B4581E; }
.rv-auto-ic { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.rv-auto-ic svg { filter: drop-shadow(0 1px 2px rgba(0,0,0,.35)); }
.rv-auto:hover .rv-auto-fill { filter: brightness(1.08); }
.rv-auto:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
@keyframes rvAuto { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes rvPulse { 0%, 100% { opacity: 1; } 50% { opacity: .78; } }
@media (prefers-reduced-motion: reduce) { .rv-auto-fill { animation: rvAuto var(--dur, 6000ms) linear both; } }
html[data-calm] .rv-auto-fill { animation: rvAuto var(--dur, 6000ms) linear both; }
/* Ikonet står altid på mørk bund: venstre halvdel af bjælken */
.rv-auto-ic { mix-blend-mode: normal; }

/* Forsiden på telefon: Dine emner fader ud efter halvandet emne */
.mastery.mp-peek { position: relative; }
.mastery.mp-peek .mp-list { overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 120px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 120px), transparent); }
.mastery .mp-more { display: flex; justify-content: center; margin-top: -54px; position: relative; z-index: 1; }
.mastery.mp-peek > a.btn.sm[href="#vaesner"] { display: none; }   /* knappen ovenpå fade-out'en erstatter linket på telefon */
.rv-auto-ic svg { width: 30px; height: 30px; padding: 7px; box-sizing: border-box; border-radius: 50%; background: #1C2433; color: #fff; filter: none; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
html[data-theme="dark"] .rv-auto-ic svg { background: #ECEFF4; color: #1C2433; }

/* Nedtælling: tynd bjælke + tydelig hvid »Pause«-knap, der stikker ud over bjælken */
.rv-auto { height: 44px; margin: 16px 0 6px; background: none !important; overflow: visible !important; border-radius: 0; }
.rv-auto::before { content: ""; position: absolute; left: 0; right: 0; top: 16px; height: 12px; border-radius: 999px; background: var(--soft); }
.rv-auto-fill { inset: auto !important; left: 0 !important; right: 0 !important; top: 16px !important; height: 12px; border-radius: 999px; }
.rv-auto-ic { inset: auto !important; left: 50% !important; top: 50% !important; transform: translate(-50%, -50%);
  display: inline-flex !important; align-items: center; gap: 6px; height: 40px; padding: 0 16px 0 12px; border-radius: 999px;
  background: #fff; color: #2F4BB3 !important; border: 2px solid #2F4BB3; font-weight: 800; font-size: 1rem;
  box-shadow: 0 4px 14px rgba(28,36,51,.22); transition: transform .15s ease, box-shadow .15s ease; }
.rv-auto-ic svg { width: 20px !important; height: 20px !important; padding: 0 !important; background: none !important; box-shadow: none !important; color: #2F4BB3 !important; }
.rv-auto:hover .rv-auto-ic { transform: translate(-50%, -50%) scale(1.06); box-shadow: 0 6px 18px rgba(47,75,179,.35); }
.rv-auto:active .rv-auto-ic { transform: translate(-50%, -50%) scale(.97); }
.rv-auto:focus-visible { outline: none; } .rv-auto:focus-visible .rv-auto-ic { outline: 3px solid var(--brand); outline-offset: 3px; }
html[data-theme="dark"] .rv-auto-ic { background: #1A1F28; color: #8EA2F2 !important; border-color: #8EA2F2; box-shadow: 0 4px 14px rgba(0,0,0,.5); }
html[data-theme="dark"] .rv-auto-ic svg { color: #8EA2F2 !important; }
@media (prefers-reduced-motion: reduce) { .rv-auto-ic { transition: none; } }

/* =========================================================
   3-minutterstesten: valg af test · huskeruten · tydelige huskeord
   ========================================================= */
/* Huskeordene i historien springer i øjnene */
.mt-story mark, .rt-cap mark { background: #2F4BB3; color: #fff; padding: .02em .32em; border-radius: 8px; font-weight: 900; font-size: 1.12em;
  box-shadow: 0 3px 0 rgba(28,36,51,.18); display: inline-block; animation: markPop .5s cubic-bezier(.2,1.4,.4,1) .15s both; }
html[data-theme="dark"] .mt-story mark, html[data-theme="dark"] .rt-cap mark { background: #3C5BD6; }
@keyframes markPop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }

/* Vælg test */
.mt-choose { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 14px; width: 100%; margin-top: 6px; }
.mt-pick-test { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 18px; text-align: left; cursor: pointer; font: inherit; color: var(--ink);
  background: var(--page); border: 2px solid var(--line); border-radius: 20px; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.mt-pick-test:hover { transform: translateY(-4px); border-color: var(--brand); box-shadow: 0 14px 30px rgba(47,75,179,.16); }
.mt-pick-test:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.mt-pick-test b { font-size: 1.35rem; font-weight: 800; margin-top: 6px; }
.mt-pt-go { margin-top: 8px; font-weight: 800; color: var(--brand); }
.mt-pt-art { display: flex; gap: 6px; flex-wrap: wrap; height: 84px; align-items: center; width: 100%; }
.mt-pt-art span { padding: 6px 12px; border-radius: 10px; background: #2F4BB3; color: #fff; font-weight: 800; animation: ptFloat 3.2s ease-in-out infinite; }
.mt-pt-art span:nth-child(2) { animation-delay: .5s; background: #1B7F86; } .mt-pt-art span:nth-child(3) { animation-delay: 1s; background: #B4581E; }
.mt-pt-art.house { justify-content: center; } .mt-pt-art .mt-house.mini { height: 84px; width: auto; animation: ptFloat 3.6s ease-in-out infinite; }
@keyframes ptFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* Huset */
.mt-house { width: 100%; max-width: 26rem; height: auto; overflow: visible; }
.mt-house.big { max-width: 26rem; }
.h-roof { fill: var(--soft); stroke: var(--line); stroke-width: 2; }
.h-wall { fill: var(--card); stroke: var(--ink); stroke-opacity: .35; stroke-width: 2; }
.h-room rect { fill: var(--card); stroke: var(--line); stroke-width: 2; transition: fill .6s ease, stroke .6s ease; }
.h-room text { fill: var(--ink); font: 700 12px/1 inherit; font-family: inherit; }
.h-room .h-item { font-size: 13px; font-weight: 800; fill: #2F4BB3; }
.h-room.seen rect { fill: color-mix(in srgb, #2F4BB3 9%, var(--card)); }
.h-room.on rect { fill: color-mix(in srgb, #2F4BB3 22%, var(--card)); stroke: #2F4BB3; }
.h-door { fill: #B4581E; }
.h-path { fill: none; stroke: #2F4BB3; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dashoffset: 0; opacity: .55; transition: stroke-dasharray .9s cubic-bezier(.4,.1,.2,1); }
.h-walker { transition: transform .9s cubic-bezier(.4,.1,.2,1); }
.h-walker circle { fill: #2F4BB3; opacity: .25; animation: walkerPulse 1.4s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
.h-walker .h-walker-core { fill: #2F4BB3; opacity: 1; animation: none; }
html[data-theme="dark"] .h-room .h-item, html[data-theme="dark"] .h-path { fill: #8EA2F2; stroke: #8EA2F2; }
html[data-theme="dark"] .h-room .h-item { stroke: none; }
html[data-theme="dark"] .h-walker circle, html[data-theme="dark"] .h-walker .h-walker-core { fill: #8EA2F2; }
@keyframes walkerPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.6); } }
.mt-house.mini .h-room text { font-size: 0; } .mt-house.mini .h-walker { display: none; }
.rt-cap { margin: 0; font-size: clamp(1.3rem, 4vw, 1.8rem); font-weight: 700; line-height: 1.35; min-height: 2.6em; animation: mtIn .5s cubic-bezier(.2,.7,.2,1) both; }
.rt-cap b { color: var(--brand); }
.rt-wait { font-weight: 700; } 

/* Svar: pladser i rækkefølge */
.rt-slots { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr)); gap: 8px; width: 100%; }
.rt-slots li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 2px dashed var(--line); border-radius: 14px; background: var(--page); text-align: left; transition: border-color .2s ease, background-color .2s ease; }
.rt-slots li.next { border-color: var(--brand); border-style: solid; }
.rt-slots li.full { border-style: solid; border-color: #2F4BB3; background: var(--brand-soft); animation: mtPop .25s ease; }
.rt-n { display: grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 50%; background: var(--card); font-weight: 800; font-size: .9rem; }
.rt-room { font-size: .85rem; font-weight: 700; flex: none; }
.rt-slot { flex: 1; min-height: 38px; border: 0; background: none; font: inherit; font-weight: 800; color: var(--ink); text-align: right; cursor: pointer; padding: 0 4px; }
.rt-slot:disabled { cursor: default; opacity: .6; }
.rt-grid .mt-chip.used { opacity: .35; text-decoration: line-through; }
@media (prefers-reduced-motion: reduce) { .h-walker, .h-path, .h-room rect { transition: none; } .h-walker circle, .mt-pt-art span, .mt-pt-art .mt-house.mini, .mt-story mark, .rt-cap mark { animation: none !important; } .mt-pick-test:hover { transform: none; } }
html[data-calm] .h-walker, html[data-calm] .h-path { transition: none; }
html[data-calm] .h-walker circle, html[data-calm] .mt-pt-art span, html[data-calm] .mt-pt-art .mt-house.mini, html[data-calm] .mt-story mark, html[data-calm] .rt-cap mark { animation: none !important; }
.h-room text { font-size: 10px !important; letter-spacing: -.01em; } .h-room .h-item { font-size: 11px !important; }

/* =====================================================
   Abonnement · Del kort · Udfordr en ven (billing.js, social.js)
   ===================================================== */
.bill-hero, .sh-hero { position: relative; text-align: center; padding: 34px 20px 26px; margin-bottom: 18px; border-radius: 20px; overflow: hidden;
  background: radial-gradient(120% 140% at 10% 0%, var(--brand-soft, var(--blue-soft)) 0%, transparent 55%), radial-gradient(120% 140% at 100% 100%, var(--sun-soft) 0%, transparent 60%), var(--card);
  border: 1px solid var(--line); animation: shRise .5s cubic-bezier(.2, .8, .2, 1) both; }
.bill-hero h1, .sh-hero h1 { margin: 6px 0 8px; font-size: clamp(1.7rem, 4.2vw, 2.5rem); }
.bill-hero .lead, .sh-hero .lead { max-width: 640px; margin: 0 auto 14px; }
.sh-hero .row { justify-content: center; }
.sh-hero .kicker { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: var(--muted); margin: 0; }
.bill-gift, .ch-swords { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: var(--brand, var(--blue)); color: #fff; box-shadow: 0 8px 24px rgba(60, 91, 214, .3); animation: shPop .6s .1s cubic-bezier(.3, 1.6, .5, 1) both; }
.bill-gift .ic, .ch-swords .ic { width: 32px; height: 32px; }
.bill-gift.sm { width: 48px; height: 48px; border-radius: 14px; flex: none; animation: none; }
.bill-gift.sm .ic { width: 24px; height: 24px; }
.bill-count { display: inline-flex; flex-direction: column; align-items: center; padding: 10px 22px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.bill-count b { font-size: 2.2rem; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--brand, var(--blue)); }
.bill-count span { font-size: .9rem; color: var(--muted); font-weight: 700; }
.bill-status.bad { border-color: var(--coral); }
.bill-big { font-size: 1.35rem; font-weight: 800; margin: 4px 0; }
.bill-big.sm { font-size: 1.1rem; }
.bill-plans, .bill-methods { border: 0; padding: 0; margin: 14px 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.bill-methods legend { font-weight: 800; margin-bottom: 8px; }
.bill-plan, .bill-method { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 18px; border: 2px solid var(--line); border-radius: 16px; background: var(--card); cursor: pointer; transition: border-color .15s, transform .15s, box-shadow .15s; }
.bill-method { flex-direction: row; align-items: center; gap: 12px; padding: 14px 16px; }
.bill-plan:hover, .bill-method:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.bill-plan.on, .bill-method.on { border-color: var(--brand, var(--blue)); box-shadow: 0 0 0 3px var(--brand-soft, var(--blue-soft)); }
.bill-plan input, .bill-method input { position: absolute; opacity: 0; pointer-events: none; }
.bill-plan:has(input:focus-visible), .bill-method:has(input:focus-visible) { outline: 3px solid var(--brand, var(--blue)); outline-offset: 3px; }
.bill-pt { font-size: 1.05rem; }
.bill-price strong { font-size: 1.8rem; font-variant-numeric: tabular-nums; }
.bill-plan small, .bill-method small { color: var(--muted); display: block; }
.bill-badge { position: absolute; top: -11px; right: 14px; background: var(--mint); color: #fff; font-weight: 800; font-size: .8rem; padding: 3px 10px; border-radius: 99px; }
html[data-theme="dark"] .bill-badge { background: #1F9E73; color: #fff; }
.bill-mic { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--soft); flex: none; }
.bill-mic.big { width: 64px; height: 64px; border-radius: 18px; }
.bill-mic.big .ic { width: 30px; height: 30px; }
.bill-sum { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 2px 12px; padding: 14px 0; border-top: 1px dashed var(--line); margin-top: 6px; }
.bill-sum b { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.bill-sum small { grid-column: 1 / -1; color: var(--muted); }
.bill-go { width: 100%; justify-content: center; }
.bill-note { display: flex; gap: 8px; align-items: flex-start; font-size: .9rem; color: var(--muted); margin-top: 12px; }
.bill-faq details { border-top: 1px solid var(--line); padding: 10px 0; }
.bill-faq summary { cursor: pointer; font-weight: 800; }
.bill-faq details p { margin: 8px 0 0; }
.bill-mock { text-align: center; }
.land-price { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-top: 18px; }
.land-price > div { flex: 1 1 260px; }
.land-price h2 { margin: 0 0 4px; }
.land-price p { margin: 0; }
.bill-warn a { font-weight: 800; }

.sh-link input { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .95rem; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--soft); color: var(--ink); }
.sh-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; margin: 14px 0 4px; }
.sh-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-weight: 800; text-decoration: none; cursor: pointer; font: inherit; transition: transform .12s, border-color .12s; }
.sh-btn:hover { transform: translateY(-2px); border-color: var(--brand, var(--blue)); }
.sh-btn .ic { width: 24px; height: 24px; }
.sh-list { display: grid; gap: 8px; padding-left: 1.4em; }
.sh-list li span { display: block; color: var(--muted); }
.sh-mine li, .ch-pick li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.sh-mine li:first-child, .ch-pick li:first-child { border-top: 0; }
.sh-mine small, .ch-pick small { display: block; color: var(--muted); }
.ch-start { max-width: 420px; margin: 8px auto 0; text-align: left; }
.ch-start .row { flex-wrap: nowrap; }
.ch-start input { flex: 1; min-width: 0; }
.ch-board ol { list-style: none; padding: 0; margin: 0; counter-reset: none; }
.ch-board li { display: grid; grid-template-columns: 36px 1fr auto auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; animation: shRise .4s both; }
.ch-board li:nth-child(odd) { background: var(--soft); }
.ch-board li.me { background: var(--brand-soft, var(--blue-soft)); outline: 2px solid var(--brand, var(--blue)); }
.ch-board li small { grid-column: 2; color: var(--muted); margin-top: -6px; }
.ch-rank { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--card); border: 1px solid var(--line); font-weight: 800; }
.ch-board li:first-child .ch-rank { background: var(--sun); border-color: var(--sun-dark); color: #3A2E12; }
.ch-sc { font-weight: 800; font-variant-numeric: tabular-nums; }
.ch-t { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .9rem; }
.ch-review { display: grid; gap: 8px; padding-left: 1.4em; }
.ch-review li span { display: block; }
.ch-review li.ok span { color: var(--mint-dark); }
.ch-review li.no span { color: var(--coral-dark); }

/* Quizzen (delte kort og udfordringer) */
.qz { max-width: 720px; margin: 0 auto; animation: shRise .35s both; }
.qz-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--muted); font-weight: 700; }
.qz-prog { height: 10px; border-radius: 99px; background: var(--soft); overflow: hidden; margin: 10px 0; border: 1px solid var(--line); }
.qz-prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand, var(--blue)), var(--mint)); border-radius: inherit; transition: width .4s cubic-bezier(.2, .8, .2, 1); }
.qz-n { margin: 8px 0 0; color: var(--muted); font-weight: 700; }
.qz-q { font-size: clamp(1.35rem, 3.4vw, 1.9rem); margin: 6px 0 18px; }
.qz-opts { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.qz-opt { display: flex; align-items: center; gap: 12px; text-align: left; padding: 14px 16px; min-height: 58px; border-radius: 14px; border: 2px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; transition: transform .12s, border-color .12s, background .2s; }
.qz-opt:hover:not([disabled]) { transform: translateY(-2px); border-color: var(--brand, var(--blue)); }
.qz-opt kbd { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--soft); border: 1px solid var(--line); font: inherit; font-size: .85rem; flex: none; }
.qz-opt.sel { border-color: var(--brand, var(--blue)); background: var(--brand-soft, var(--blue-soft)); }
.qz-opt.right { border-color: var(--mint); background: var(--mint-soft); animation: shPop .35s both; }
.qz-opt.wrong { border-color: var(--coral); background: var(--coral-soft); animation: shShake .35s both; }
.qz-opt.dim { opacity: .55; }
.qz-opt[disabled] { cursor: default; }
.qz-fb { margin-top: 16px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); animation: shRise .3s both; }
.qz-fb.ok { border-color: var(--mint); }
.qz-fb.no { border-color: var(--coral); }
.qz-fb p { margin: 6px 0 0; }
.qz-fb .btn { margin-top: 12px; }
.qz-end { text-align: center; padding: 24px 0; }
.qz-end .row { justify-content: center; }
.qz-score { display: inline-flex; align-items: baseline; gap: 6px; padding: 14px 26px; border-radius: 22px; background: var(--brand, var(--blue)); color: #fff; animation: shPop .6s cubic-bezier(.3, 1.6, .5, 1) both; }
.qz-score b { font-size: 3rem; line-height: 1; }
.qz-score span { font-weight: 800; }
.qz-end.won .qz-score { background: linear-gradient(135deg, var(--mint), var(--brand, var(--blue))); }
.qz-end.won h1 { animation: shPop .6s .15s both; }
@keyframes shRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes shPop { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }
@keyframes shShake { 0%, 100% { transform: none; } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) { .bill-hero, .sh-hero, .bill-gift, .ch-swords, .qz, .qz-opt, .qz-fb, .qz-score, .ch-board li, .qz-end.won h1 { animation: none !important; transition: none !important; } }
html.calm .bill-hero, html.calm .sh-hero, html.calm .qz, html.calm .qz-opt, html.calm .qz-score, html.calm .ch-board li { animation: none !important; }
@media (max-width: 560px) { .ch-board li { grid-template-columns: 30px 1fr auto; } .ch-t { display: none; } .qz-opts { grid-template-columns: 1fr; } }
html[data-theme="dark"] .bill-gift, html[data-theme="dark"] .ch-swords, html[data-theme="dark"] .qz-score { background: #3C5BD6; }
html[data-theme="dark"] .qz-end.won .qz-score { background: linear-gradient(135deg, #1F9E73, #3C5BD6); }
.bill-hero .lead, .sh-hero .lead { text-align: center !important; margin-left: auto !important; margin-right: auto !important; }
