/* Skip Card - elektrisk violet, lime og varm pink på næsten sort. Unbounded (tal og overskrifter) + Figtree (tekst), selvhostet. */
@font-face { font-family: "Unbounded"; src: url("/fonts/unbounded-latin.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/fonts/figtree-latin.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }

:root {
  --bg: #0c0a11; --flade: #15111d; --flade2: #1e1829; --flade3: #2a2238; --linje: rgba(236, 228, 255, .12);
  --tekst: #f3efff; --daemp: #b8afcc; --violet: #a77bff; --violet-dyb: #6d3df0; --lime: #c8f542; --pink: #ff5aa8; --koral: #ff8a5c;
  --display: "Unbounded", system-ui, sans-serif; --krop: "Figtree", system-ui, sans-serif;
  --r: 14px; --gutter: 16px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--flade3) var(--bg); }
body { margin: 0; background: var(--bg); color: var(--tekst); font: 400 1.0625rem/1.6 var(--krop); overflow-x: hidden; }
::selection { background: var(--lime); color: #14091f; }
a { color: var(--lime); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; border-radius: 6px; }
img, svg { display: block; }
.wrap { width: min(100% - 2 * var(--gutter), 1080px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--lime); color: #14091f; padding: 8px 12px; border-radius: 8px; z-index: 50; font-weight: 700; }
.skip:focus { left: 8px; }

/* Top og bund */
.top { border-bottom: 1px solid var(--linje); }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--tekst); text-decoration: none; font: 700 1.05rem/1 var(--display); letter-spacing: -.01em; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.menu { display: flex; gap: 2px 14px; flex-wrap: wrap; font-size: .95rem; }
.menu a { color: var(--daemp); text-decoration: none; padding: 8px 2px; }
.menu a[aria-current="page"], .menu a:hover { color: var(--tekst); }
.menu a.sprog { color: var(--lime); }
.bund { border-top: 1px solid var(--linje); margin-top: 72px; padding: 40px 0 56px; color: var(--daemp); font-size: .95rem; }
.bund-grid { display: grid; gap: 28px; grid-template-columns: 1.4fr 1fr 1fr; }
.bund h2 { font: 600 .82rem/1.2 var(--display); color: var(--tekst); margin: 0 0 12px; }
.bund ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bund a { color: var(--daemp); }
.bund a:hover { color: var(--tekst); }
.bund p { max-width: 42ch; margin: 12px 0 0; }
@media (max-width: 640px) {
  .top-inner { flex-wrap: nowrap; min-height: 54px; }
  .menu { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; font-size: .9rem; gap: 12px; margin-right: calc(-1 * var(--gutter)); padding-right: var(--gutter); }
  .menu::-webkit-scrollbar { display: none; }
  .menu a { white-space: nowrap; }
  .brand span { display: none; }
  .bund .brand span { display: inline; }
}
@media (max-width: 720px) { .bund-grid { grid-template-columns: 1fr 1fr; } .bund-grid > :first-child { grid-column: 1 / -1; } }

/* Spilsiden */
.spil-top { padding: 14px 0 2px; }
.spil-top h1 { font: 800 clamp(1.5rem, 1.1rem + 2vw, 2.3rem)/1.05 var(--display); letter-spacing: -.03em; margin: 0; }
.spil { width: min(100% - 2 * var(--gutter), 780px); margin-inline: auto; }
#spil { container-type: inline-size; }
.faner { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0 8px; scrollbar-width: none; }
.faner::-webkit-scrollbar { display: none; }
.faner a { flex: none; font: 600 .78rem/1 var(--display); color: var(--daemp); text-decoration: none; padding: 9px 12px; border-radius: 999px; border: 1px solid var(--linje); }
.faner a[aria-current="page"] { background: var(--tekst); color: #120c1c; border-color: var(--tekst); }
.faner a:hover { color: var(--tekst); }
#spil-info { display: flex; flex-wrap: wrap; gap: 4px 14px; min-height: 1.5em; font-size: .85rem; color: var(--daemp); margin-bottom: 6px; }
#spil-info .haendelse { color: var(--lime); font-weight: 700; }
#spil-info .trin { display: inline-flex; gap: 4px; align-items: center; }
#spil-info .trin i { width: 14px; height: 6px; border-radius: 3px; background: var(--flade3); }
#spil-info .trin i.klaret { background: var(--lime); }
#spil-info .trin i.nu { background: var(--pink); }

/* Bordet */
#bord {
  --kw: min(clamp(40px, calc((100cqw - 26px - 4 * 8px) / 5.25), 88px), max(44px, calc((100svh - 320px) / 7.4))); --kh: calc(var(--kw) * 1.4); --mk: calc(var(--kw) * .5);
  position: relative; display: grid; gap: 12px; align-content: start;
  background: radial-gradient(120% 70% at 50% 0%, #1d1530 0%, var(--flade) 60%); border: 1px solid var(--linje); border-radius: 20px;
  padding: 12px; min-height: calc(var(--kh) * 4.4 + 110px); user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
}
#bord button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.modsp-rk { display: grid; gap: 8px; grid-template-columns: 1fr; }
.modsp-rk.antal-2, .modsp-rk.antal-3 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.modsp { display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 8px 10px; padding: 8px 10px; border-radius: 14px; background: rgba(255, 255, 255, .03); border: 1px solid transparent; }
.modsp.aktiv { border-color: var(--pink); }
.antal-2 .modsp, .antal-3 .modsp { grid-template-columns: auto 1fr auto; }
.antal-2 .m-navn, .antal-3 .m-navn { grid-column: 1 / -1; }
.antal-2 .m-hylder, .antal-3 .m-hylder { gap: 3px; }
.antal-3 { --mk: calc(var(--kw) * .4); }
.m-navn { display: grid; line-height: 1.15; }
.m-navn b { font: 700 .82rem/1.2 var(--display); }
.m-navn span { font-size: .75rem; color: var(--daemp); }
.m-skip { font-style: normal; font-size: .7rem; font-weight: 700; color: var(--pink); }
.m-stack, .m-haand { display: flex; align-items: center; gap: 4px; font: 700 .8rem/1 var(--display); }
.m-haand { color: var(--daemp); }
.m-hylder { display: flex; gap: 5px; }
.m-hylde { position: relative; border-radius: 6px; }
.dybde { position: absolute; right: -4px; bottom: -4px; min-width: 16px; height: 16px; padding: 0 3px; border-radius: 8px; background: var(--flade3); color: var(--tekst); font: 700 .62rem/16px var(--krop); text-align: center; }

.midte { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; justify-items: center; padding: 6px 0; }
.deck, .tower { position: relative; display: grid; justify-items: center; gap: 4px; }
.deck .tal, .mit-stack .tal { font: 600 .72rem/1 var(--display); color: var(--daemp); }
.mit-stack .tal { display: grid; justify-items: center; text-align: center; line-height: 1.15; max-width: calc(var(--kw) + 8px); }
.mit-stack .tal b { color: var(--tekst); font-weight: 800; font-size: .9rem; }
.tower .naeste { font: 600 .66rem/1.1 var(--krop); color: var(--daemp); text-align: center; text-transform: uppercase; letter-spacing: .04em; }
.tower-tom { display: grid; place-items: center; font: 700 1.1rem/1 var(--display); color: var(--flade3); }

.kig { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--lime); justify-content: center; }
.mig { display: grid; grid-template-columns: auto 1fr; gap: 10px; column-gap: 12px; align-items: start; padding-top: 6px; border-top: 1px dashed var(--linje); }
.mit-stack { display: grid; justify-items: center; gap: 5px; }
.mine-hylder { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; justify-items: center; }
.hylde { position: relative; border-radius: 10px; min-height: calc(var(--kh) * 1.52); width: var(--kw); }
.vifte { display: grid; }
.vifte > * + * { margin-top: calc(var(--kh) * -.74); }
.vifte .under { pointer-events: none; }
.haand { display: flex; justify-content: center; gap: 6px; min-height: calc(var(--kh) * 1.06 + 8px); padding-top: 6px; }
.haand .kort.stor { --kw: min(clamp(44px, calc((100cqw - 26px - 4 * 6px) / 5.3), 92px), max(48px, calc((100svh - 320px) / 6.9))); --kh: calc(var(--kw) * 1.4); }

/* Kort */
.kort { --c: var(--violet); position: relative; width: var(--kw); height: var(--kh); border-radius: calc(var(--kw) * .13); display: block; background: #1c1628; border: 2px solid var(--c); color: var(--c); box-shadow: 0 3px 8px rgba(0, 0, 0, .45); font-family: var(--display); overflow: hidden; }
.kort.mini { --kw: var(--mk); --kh: calc(var(--mk) * 1.4); border-width: 1.5px; box-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
.kort .hj { position: absolute; left: 7%; top: 5%; font-weight: 700; font-size: calc(var(--kw) * .2); line-height: 1; }
.kort .hj.ned { left: auto; top: auto; right: 7%; bottom: 5%; transform: rotate(180deg); }
.kort .tal-stor { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: calc(var(--kw) * .5); letter-spacing: -.04em; }
.kort.mini .hj { display: none; }
.kort.mini .tal-stor { font-size: calc(var(--kw) * .52); }
.k-n.v1 { --c: oklch(.74 .17 295); } .k-n.v2 { --c: oklch(.75 .17 310); } .k-n.v3 { --c: oklch(.76 .18 325); } .k-n.v4 { --c: oklch(.76 .19 340); }
.k-n.v5 { --c: oklch(.76 .19 355); } .k-n.v6 { --c: oklch(.77 .17 12); } .k-n.v7 { --c: oklch(.78 .16 32); } .k-n.v8 { --c: oklch(.81 .15 55); }
.k-n.v9 { --c: oklch(.85 .15 80); } .k-n.v10 { --c: oklch(.88 .17 100); } .k-n.v11 { --c: oklch(.89 .2 118); } .k-n.v12 { --c: oklch(.88 .2 135); }
.k-n { background: linear-gradient(160deg, color-mix(in oklch, var(--c) 18%, #1c1628), #17121f 70%); }
.k-w { --c: var(--lime); background: var(--lime); color: #2a0f5c; }
.k-w .symbol, .k-p .symbol { position: absolute; left: 50%; top: 44%; width: 52%; height: auto; aspect-ratio: 1; transform: translate(-50%, -50%); }
.k-w .navn, .k-p .navn { position: absolute; left: 0; right: 0; bottom: 8%; text-align: center; font-weight: 700; font-size: calc(var(--kw) * .14); text-transform: uppercase; letter-spacing: .02em; }
.kort.mini .navn { display: none; }
.kort.mini .symbol { top: 50%; width: 64%; }
.k-p { background: #0f0b16; }
.p-skip { --c: var(--violet); } .p-bomb { --c: var(--pink); } .p-steal { --c: var(--lime); } .p-rewind { --c: var(--koral); } .p-peek { --c: #8fd3ff; }
.kort .som { position: absolute; right: 5%; top: 5%; min-width: 1.6em; padding: 1px 3px; border-radius: 5px; background: #2a0f5c; color: var(--lime); font: 800 calc(var(--kw) * .15)/1.3 var(--display); text-align: center; }
.kort.bag { --c: #3b2b63; background: repeating-linear-gradient(135deg, #2c1d55 0 6px, #34236a 6px 12px); }
.kort.bag::after { content: ""; position: absolute; inset: 22%; border-radius: 30%; border: 2px solid var(--lime); opacity: .7; transform: rotate(-12deg); }
.kort.mini.bag::after { border-width: 1.5px; }
.tom { display: block; width: var(--kw); height: var(--kh); border-radius: calc(var(--kw) * .13); border: 2px dashed var(--linje); }
.tom.mini { width: var(--mk); height: calc(var(--mk) * 1.4); border-width: 1.5px; }

/* Almindelige spillekort (Classic) */
.k-alm { --c: #d9d0c0; background: #f7f2e8; color: #17141d; font-family: var(--krop); }
.k-alm.roed { color: #c4223a; }
.k-alm .hj { display: grid; justify-items: center; gap: 1px; font-family: var(--display); }
.k-alm .hj svg { width: calc(var(--kw) * .17); height: calc(var(--kw) * .17); }
.k-alm .midt-kulor { position: absolute; left: 50%; top: 56%; width: 46%; height: auto; aspect-ratio: 1; transform: translate(-50%, -50%); }
.k-alm.mini .hj { display: grid; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: calc(var(--kw) * .36); }
.k-alm.mini .midt-kulor { display: none; }
.k-alm .wild-maerke { position: absolute; left: 0; right: 0; bottom: 6%; text-align: center; font: 700 calc(var(--kw) * .12)/1 var(--display); text-transform: uppercase; color: var(--violet-dyb); }
.k-alm.mini .wild-maerke { display: none; }
.k-alm.konge { box-shadow: 0 0 0 2px var(--violet) inset, 0 3px 8px rgba(0, 0, 0, .45); }

/* Tilstande på kort og mål */
.kilde { border-radius: calc(var(--kw) * .13); transition: transform .16s cubic-bezier(.2, .8, .2, 1); touch-action: none; }
.kilde.kan:hover { transform: translateY(-3px); }
.kilde.valgt { transform: translateY(-8px); }
.kilde.valgt .kort { outline: 3px solid var(--lime); outline-offset: 2px; }
.maal { outline: 2px dashed var(--lime); outline-offset: 4px; border-radius: 12px; background: rgba(200, 245, 66, .07) !important; }
.mig.aktiv .mit-stack .tal b { color: var(--lime); }
.spoeg { position: fixed; z-index: 60; pointer-events: none; margin: 0; padding: 0; border: 0; background: none; }
.spoeg .kort { box-shadow: 0 14px 30px rgba(0, 0, 0, .55); }

/* Handlinger og status */
#status { min-height: 3em; margin: 10px 2px 0; font-size: .95rem; color: var(--tekst); }
#handling { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
#handling .mellem { flex: 1; }
.knap { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--linje); background: var(--flade2); color: var(--tekst); font: 600 .9rem/1 var(--krop); cursor: pointer; text-decoration: none; }
.knap:hover:not(:disabled) { background: var(--flade3); }
.knap:disabled { opacity: .4; cursor: default; }
.knap.primaer { background: var(--lime); color: #14091f; border-color: var(--lime); }
.knap.primaer:hover { background: #d8ff63; }
.knap .ikon { width: 18px; height: 18px; }
@media (max-width: 480px) { #handling .knap span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } #handling .knap.primaer span { position: static; width: auto; height: auto; clip: auto; } #handling .knap { padding: 0 12px; } }

/* Lag inde i bordet (indstillinger og slut) */
.panel { position: absolute; left: 10px; right: 10px; bottom: 10px; max-height: calc(100% - 20px); overflow: auto; z-index: 20; background: var(--flade2); border: 1px solid var(--linje); border-radius: 16px; padding: 18px; box-shadow: 0 -10px 40px rgba(0, 0, 0, .5); animation: op .26s cubic-bezier(.2, .8, .2, 1); }
@keyframes op { from { transform: translateY(16px); opacity: 0; } }
.panel fieldset { border: 0; padding: 0; margin: 0 0 14px; }
.panel legend { font: 600 .78rem/1 var(--display); margin-bottom: 8px; color: var(--daemp); }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; }
.seg span { display: inline-block; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--linje); font-size: .92rem; cursor: pointer; }
.seg input:checked + span { background: var(--tekst); color: #120c1c; border-color: var(--tekst); font-weight: 700; }
.seg input:focus-visible + span { outline: 3px solid var(--lime); outline-offset: 2px; }
.panel-knapper { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.panel-knapper p { flex-basis: 100%; margin: 0 0 4px; color: var(--daemp); }
.slut-panel { text-align: left; }
.slut-titel { font: 800 1.6rem/1.1 var(--display); letter-spacing: -.03em; margin: 0 0 6px; color: var(--lime); }
[data-slut="tabt"] .slut-titel { color: var(--pink); }
.slut-panel .point { color: var(--daemp); margin: 0 0 14px; }

/* Liggende mobil */
@media (orientation: landscape) and (max-height: 520px) {
  .top-inner { min-height: 44px; }
  .spil-top { padding-top: 6px; }
  .spil-top h1 { font-size: 1.25rem; }
  .faner { padding: 4px 0; }
  .faner a { padding: 7px 10px; }
  #spil-info:empty { display: none; }
  #bord { --kw: 42px; grid-template-columns: 1fr 1.1fr; column-gap: 16px; min-height: 0; }
  .modsp-rk { grid-column: 1; grid-row: 1; }
  .midte { grid-column: 1; grid-row: 2; }
  .kig { grid-column: 1; grid-row: 3; }
  .mig { grid-column: 2; grid-row: 1; border-top: 0; padding-top: 0; }
  .haand { grid-column: 2; grid-row: 2; align-items: end; }
  .haand .kort.stor { --kw: 44px; }
  .hylde { min-height: calc(var(--kh) * 1.4); }
  .vifte > * + * { margin-top: calc(var(--kh) * -.8); }
}
@media (min-width: 900px) { #bord { padding: 18px; gap: 16px; } }

/* Tekstsider */
.indhold { width: min(100% - 2 * var(--gutter), 720px); margin-inline: auto; }
.indhold h1 { font: 800 clamp(1.8rem, 1.2rem + 2.6vw, 3rem)/1.05 var(--display); letter-spacing: -.035em; margin: 40px 0 18px; text-wrap: balance; hyphens: auto; overflow-wrap: break-word; }
.indhold h2 { font: 700 clamp(1.2rem, 1rem + .9vw, 1.6rem)/1.2 var(--display); letter-spacing: -.02em; margin: 2.4em 0 .6em; text-wrap: balance; }
.indhold h3 { font: 700 1.05rem/1.3 var(--display); margin: 1.8em 0 .4em; }
.indhold p, .indhold li { max-width: 68ch; }
.indhold .ingress { font-size: 1.2rem; color: var(--daemp); }
.indhold ol, .indhold ul { padding-left: 1.3em; }
.indhold li { margin: .35em 0; }
.indhold strong { color: #fff; }
.under-spil { margin-top: 48px; }
.tabel-wrap { overflow-x: auto; margin: 1em 0; border: 1px solid var(--linje); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--linje); white-space: nowrap; }
th { font: 600 .78rem/1.2 var(--display); color: var(--daemp); background: var(--flade); }
tr:last-child td { border-bottom: 0; }
.kortraekke { display: flex; flex-wrap: wrap; gap: 10px; margin: 1.2em 0; --kw: 58px; --kh: 81px; --mk: 30px; }
.kortraekke figure { margin: 0; display: grid; justify-items: center; gap: 6px; font-size: .82rem; color: var(--daemp); max-width: 9em; text-align: center; }
.diagram { margin: 1.4em 0; }
.diagram svg { width: 100%; height: auto; }
.cta { display: inline-flex; margin-top: 8px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .kilde.valgt { transform: none; }
}
