/* ======================================================
   Odense Backgammonklub – designsystem
   Farver fra logoet: sort, rød og hvid – på varmt "papir".
   ====================================================== */

:root {
  color-scheme: light;

  --paper:    #f6f2ea;
  --paper-2:  #efe9dd;
  --card:     #fffdf9;
  --ink:      #16130f;
  --ink-2:    #4a443b;
  --ink-3:    #7a7266;
  --line:     #e2dacb;
  --line-2:   #d3c9b6;

  --red:      #c8102e;
  --red-ink:  #a50d26;
  --red-soft: #fbe3e6;
  --gold:     #b98a1b;
  --felt:     #1f3b2d;

  --up:       #17803d;
  --down:     #c8102e;

  --board-dark: #16130f;
  --board-felt: #234536;
  --board-wood: #6b4a2b;
  --board-pt-a: #e9e1d0;
  --board-pt-b: #c8102e;

  --radius:   18px;
  --radius-s: 10px;
  --shadow:   0 1px 2px rgb(22 19 15 / .06), 0 8px 24px -12px rgb(22 19 15 / .18);
  --shadow-l: 0 2px 4px rgb(22 19 15 / .06), 0 24px 48px -20px rgb(22 19 15 / .35);

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper:    #12100d;
    --paper-2:  #1a1713;
    --card:     #1e1a16;
    --ink:      #f3eee4;
    --ink-2:    #c9c0b0;
    --ink-3:    #948a7a;
    --line:     #2f2a23;
    --line-2:   #3d362d;
    --red:      #ef3b55;
    --red-ink:  #ff6b7f;
    --red-soft: #3a1219;
    --gold:     #e0b44a;
    --up:       #4cc274;
    --down:     #ff6b7f;
    --board-pt-a: #d9cfba;
    --shadow:   0 1px 2px rgb(0 0 0 / .3), 0 8px 24px -12px rgb(0 0 0 / .6);
    --shadow-l: 0 2px 4px rgb(0 0 0 / .3), 0 24px 48px -20px rgb(0 0 0 / .8);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper:    #12100d;
  --paper-2:  #1a1713;
  --card:     #1e1a16;
  --ink:      #f3eee4;
  --ink-2:    #c9c0b0;
  --ink-3:    #948a7a;
  --line:     #2f2a23;
  --line-2:   #3d362d;
  --red:      #ef3b55;
  --red-ink:  #ff6b7f;
  --red-soft: #3a1219;
  --gold:     #e0b44a;
  --up:       #4cc274;
  --down:     #ff6b7f;
  --board-pt-a: #d9cfba;
  --shadow:   0 1px 2px rgb(0 0 0 / .3), 0 8px 24px -12px rgb(0 0 0 / .6);
  --shadow-l: 0 2px 4px rgb(0 0 0 / .3), 0 24px 48px -20px rgb(0 0 0 / .8);
}

/* ---------- Grundlag ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
@view-transition { navigation: auto; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--font);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
a:hover { color: var(--red-ink); text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 .4em; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1em; text-wrap: pretty; }
.muted { color: var(--ink-3); }
.serif { font-family: var(--serif); font-style: italic; font-weight: 500; letter-spacing: -0.01em; }
.num { font-variant-numeric: tabular-nums; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(56px, 8vw, 104px); }
.section.alt { background: var(--paper-2); }
.section.tight { padding-block: clamp(36px, 5vw, 64px); }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .55em;
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--red-ink); margin-bottom: .8em;
}
.eyebrow::before { content: ""; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 10px solid currentColor; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--ink-2); max-width: 62ch; }

/* ---------- Knapper ---------- */
.btn {
  --bg: var(--red); --fg: #fff;
  display: inline-flex; align-items: center; gap: .5em;
  padding: .8em 1.3em; border-radius: 999px; border: 0;
  background: var(--bg); color: var(--fg);
  font: 700 1rem/1 var(--font); text-decoration: none; cursor: pointer;
  box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--bg) 70%, transparent);
  transition: transform .15s ease, box-shadow .15s ease, background .15s;
}
.btn:hover { color: var(--fg); transform: translateY(-1px); box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--bg) 80%, transparent); }
.btn.ghost { --bg: transparent; --fg: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.btn.ghost:hover { --fg: var(--red-ink); box-shadow: inset 0 0 0 1.5px currentColor; }
.btn.light { --bg: #fff; --fg: #16130f; }
.btn.small { padding: .55em 1em; font-size: .9rem; }
.btn svg { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, background .2s;
  view-transition-name: header;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand:hover { color: var(--ink); }
.logo-mark { width: 34px; height: 34px; color: var(--ink); }
.brand-text { font-size: 1.02rem; letter-spacing: -0.01em; line-height: 1.1; }
.brand-text strong { font-weight: 800; }

.nav { margin-left: auto; }
.nav ul { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav a {
  display: block; padding: 8px 12px; border-radius: 999px;
  font-size: .93rem; font-weight: 600; color: var(--ink-2); text-decoration: none;
  transition: background .15s, color .15s;
}
.nav a:hover { background: var(--paper-2); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--ink); color: var(--paper); }

.header-tools { display: flex; gap: 4px; }
.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px;
  border: 0; background: transparent; color: var(--ink); cursor: pointer;
}
.icon-btn:hover { background: var(--paper-2); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.i-moon { display: none; }
:root[data-theme="dark"] .i-sun { display: none; }
:root[data-theme="dark"] .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: none; }
  :root:not([data-theme="light"]) .i-moon { display: block; }
}
.menu-btn { display: none; }

@media (max-width: 1300px) {
  .brand-text { display: none; }
  .nav a { padding: 8px 9px; font-size: .88rem; }
}
@media (max-width: 1060px) {
  .brand-text { display: inline; }
  .menu-btn { display: grid; }
  .js .nav {
    position: fixed; inset: 72px 0 auto 0; margin: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 12px var(--gutter) 20px;
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .18s, transform .18s, visibility .18s;
    box-shadow: var(--shadow-l);
  }
  .js .nav.open { transform: none; opacity: 1; visibility: visible; }
  .js .nav ul { flex-direction: column; gap: 4px; }
  .js .nav a { padding: 12px 16px; font-size: 1.05rem; border-radius: 12px; }
  .nav { order: 3; width: 100%; }
  html:not(.js) .header-inner { flex-wrap: wrap; height: auto; padding-block: 12px; }
  html:not(.js) .nav ul { flex-wrap: wrap; }
  .header-tools { margin-left: auto; }
}

@media (max-width: 480px) {
  .header-inner { gap: 8px; height: 64px; }
  .js .nav { inset: 64px 0 auto 0; }
  .brand-text { font-size: .9rem; }
  .logo-mark { width: 30px; height: 30px; }
  .icon-btn { width: 36px; height: 36px; }
}

/* ---------- Søgning ---------- */
.search {
  width: min(560px, calc(100% - 32px)); margin: 12vh auto auto; padding: 0;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); color: var(--ink); box-shadow: var(--shadow-l);
}
.search::backdrop { background: rgb(10 8 6 / .45); backdrop-filter: blur(3px); }
.search-box { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.search-box svg { width: 20px; height: 20px; fill: none; stroke: var(--ink-3); stroke-width: 2; stroke-linecap: round; flex-shrink: 0; }
.search-box input { flex: 1; border: 0; background: transparent; font: 500 1.1rem var(--font); color: var(--ink); outline: none; min-width: 0; }
kbd { font: 600 .72rem var(--mono); color: var(--ink-3); border: 1px solid var(--line-2); border-radius: 6px; padding: 2px 6px; }
.search-results { list-style: none; margin: 0; padding: 8px; max-height: 50vh; overflow: auto; }
.search-results a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 10px; text-decoration: none; }
.search-results a:hover, .search-results a[aria-selected="true"] { background: var(--paper-2); color: var(--ink); }
.search-results .r { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.search-results .none { padding: 12px; color: var(--ink-3); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: #14110e; color: #f6f2ea;
  padding-block: clamp(48px, 7vw, 96px) clamp(64px, 9vw, 120px);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: var(--hero-img, url("../../img/obk-hero.jpg")) center / cover no-repeat;
  opacity: .3; filter: saturate(.8);
  animation: heroZoom 24s ease-out both;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(80% 60% at 85% 20%, rgb(200 16 46 / .35), transparent 60%),
    linear-gradient(180deg, rgb(20 17 14 / .55), #14110e 92%);
}
@keyframes heroZoom { from { transform: scale(1.08); } to { transform: scale(1); } }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero h1 { color: #fff; margin-bottom: .3em; }
.hero h1 .serif { color: #ff8a9b; font-weight: 400; }
.hero .lead { color: #d8d0c2; }
.hero .eyebrow { color: #ff8a9b; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero .btn.ghost { --fg: #fff; box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / .35); }
.hero .btn.ghost:hover { --fg: #fff; box-shadow: inset 0 0 0 1.5px #fff; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 32px; padding: 0; list-style: none; color: #cfc6b7; font-size: .95rem; }
.hero-facts li { display: flex; align-items: center; gap: 8px; }
.hero-facts li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

/* ---------- Bræt (interaktivt) ---------- */
.board-wrap { position: relative; }
.board {
  width: 100%; height: auto; display: block;
  filter: drop-shadow(0 30px 40px rgb(0 0 0 / .5));
}
.board .frame { fill: var(--board-wood); }
.board .felt { fill: var(--board-felt); }
.board .pt-a { fill: var(--board-pt-a); }
.board .pt-b { fill: var(--board-pt-b); }
.board .bar { fill: #4f361f; }
.board .chk-w { fill: #f6f2ea; stroke: #b9ad97; stroke-width: 1.2; }
.board .chk-b { fill: #1a1612; stroke: #000; stroke-width: 1.2; }
.board .chk { transition: transform .55s cubic-bezier(.3,1.4,.5,1); }
.board-dice { position: absolute; right: 26%; top: 50%; translate: 50% -50%; display: flex; gap: 10px; pointer-events: none; }
.board-dice .die { width: clamp(30px, 5vw, 44px); height: auto; }
.die rect { fill: #fff; stroke: rgb(0 0 0 / .15); stroke-width: 2; }
.die circle { fill: #16130f; }
.board-dice .die rect { fill: #f8f4ec; }
.board-dice.rolling .die { animation: roll .6s cubic-bezier(.2,.8,.3,1.2); }
.board-dice.rolling .die:nth-child(2) { animation-delay: .07s; }
@keyframes roll {
  0% { transform: translate(-60px, -40px) rotate(-200deg) scale(.7); opacity: 0; }
  70% { transform: translate(4px, 2px) rotate(12deg) scale(1.05); opacity: 1; }
  100% { transform: none; }
}
.roll-row { display: flex; align-items: center; gap: 14px 18px; margin-top: 18px; flex-wrap: wrap; }
.roll-btn { flex-shrink: 0; }
.move-note { margin: 0; flex: 1; min-width: 200px; color: #d8d0c2; font-size: .95rem; line-height: 1.45; }
.move-note b { color: #fff; }
.move-note .mv { font-family: var(--mono); font-size: .9em; color: #ff8a9b; white-space: nowrap; }
.board .chk.moved { stroke: #ff8a9b; stroke-width: 2.5; }
.story-card {
  margin-top: 18px; padding: 18px 20px; border-radius: var(--radius);
  background: rgb(255 255 255 / .07); border: 1px solid rgb(255 255 255 / .12);
  backdrop-filter: blur(6px); color: #e9e2d5; font-size: .98rem; min-height: 5.2em;
}
.story-card .story-year { display: block; font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #ff8a9b; margin-bottom: 4px; }
.story-card a { color: #fff; }
.story-card .story-text { animation: fadeup .45s ease; }
@keyframes fadeup { from { opacity: 0; transform: translateY(6px); } }

/* ---------- Næste klubaften ---------- */
.next-strip { margin-top: -56px; position: relative; z-index: 2; }
.next-card {
  display: grid; grid-template-columns: auto 1fr auto; gap: 24px 32px; align-items: center;
  padding: clamp(20px, 3vw, 32px); border-radius: calc(var(--radius) + 6px);
  background: var(--card); box-shadow: var(--shadow-l); border: 1px solid var(--line);
}
.date-tile {
  display: grid; place-items: center; width: 92px; height: 98px; border-radius: 16px;
  background: var(--ink); color: var(--paper); text-align: center; line-height: 1;
}
.date-tile .wd { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #ff8a9b; }
.date-tile .d { font-size: 2.4rem; font-weight: 800; letter-spacing: -0.04em; margin: 2px 0; }
.date-tile .m { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; opacity: .8; }
.next-card h3 { font-size: 1.4rem; margin-bottom: .2em; }
.next-card p { margin: 0; color: var(--ink-2); }
.countdown { display: flex; gap: 8px; }
.countdown div { min-width: 64px; text-align: center; padding: 10px 6px; border-radius: 12px; background: var(--paper-2); }
.countdown b { display: block; font-size: 1.7rem; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.countdown span { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.next-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
@media (max-width: 860px) {
  .next-card { grid-template-columns: auto 1fr; }
  .countdown { grid-column: 1 / -1; }
  .countdown div { flex: 1; min-width: 0; }
}

/* ---------- Sektionshoved ---------- */
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: clamp(24px, 4vw, 40px); flex-wrap: wrap; }
.section-head h2 { margin-bottom: .15em; }
.section-head .lead { margin: .3em 0 0; }
.more { font-weight: 700; text-decoration: none; white-space: nowrap; color: var(--red-ink); }
.more span { display: inline-block; transition: transform .15s; }
.more:hover span { transform: translateX(3px); }

/* ---------- Kort ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.card-pad { padding: clamp(18px, 2.4vw, 28px); }
.grid { display: grid; gap: clamp(16px, 2vw, 24px); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* Tre veje ind i klubben */
.way { position: relative; display: flex; flex-direction: column; text-decoration: none; color: var(--ink); transition: transform .2s, box-shadow .2s; }
.way:hover { color: var(--ink); transform: translateY(-3px); box-shadow: var(--shadow-l); }
.way-img { aspect-ratio: 4 / 3; overflow: hidden; }
.way-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.way:hover .way-img img { transform: scale(1.04); }
.way .card-pad { flex: 1; display: flex; flex-direction: column; }
.way .tag { align-self: flex-start; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: var(--red-soft); color: var(--red-ink); margin-bottom: 12px; }
.way h3 { font-size: 1.35rem; }
.way p { color: var(--ink-2); margin: 0; }
.way .go { margin-top: auto; padding-top: 16px; font-weight: 700; color: var(--red-ink); }

/* ---------- Nyheder ---------- */
.news-card { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); transition: transform .2s, box-shadow .2s; height: 100%; }
.news-card:hover { color: var(--ink); transform: translateY(-3px); box-shadow: var(--shadow-l); }
/* WordPress-billederne er bannere i 768×335 – samme format her, så intet beskæres */
.news-img { aspect-ratio: 768 / 335; background: #fff; overflow: hidden; border-bottom: 1px solid var(--line); }
.news-img img { width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform .5s ease; }
.news-card:hover .news-img img { transform: scale(1.03); }
.news-card .card-pad { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.news-meta { display: flex; gap: 10px; align-items: center; font-size: .82rem; color: var(--ink-3); font-weight: 600; }
.news-meta .cat { color: var(--red-ink); text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; }
.news-card h3 { font-size: 1.2rem; margin: 0; }
.news-card p { color: var(--ink-2); font-size: .96rem; margin: 0; }

.article { max-width: 760px; margin-inline: auto; }
.article-head { text-align: center; max-width: 860px; margin-inline: auto; }
.article-head h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
.article-hero { max-width: 1000px; margin: 32px auto 40px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-l); }
.prose { font-size: 1.08rem; line-height: 1.75; }
.prose h2 { font-size: 1.6rem; margin-top: 1.6em; }
.prose h3 { font-size: 1.25rem; margin-top: 1.4em; }
.prose img, .prose figure { border-radius: var(--radius-s); margin: 1.6em 0; max-width: 100%; height: auto; }
.prose figure img { margin: 0; }
.prose figcaption { font-size: .88rem; color: var(--ink-3); margin-top: 8px; }
.prose blockquote { margin: 1.6em 0; padding: .4em 0 .4em 1.2em; border-left: 3px solid var(--red); font-family: var(--serif); font-size: 1.2rem; font-style: italic; color: var(--ink-2); }
.prose a { color: var(--red-ink); }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; display: block; overflow-x: auto; }
.prose td, .prose th { border-bottom: 1px solid var(--line); padding: 8px; }
.prose iframe { max-width: 100%; }
.back-link { display: flex; width: max-content; gap: 6px; font-weight: 700; text-decoration: none; color: var(--ink-2); margin-bottom: 20px; }

.pager { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 48px; }
.pager .btn[aria-disabled="true"] { opacity: .4; pointer-events: none; }

/* ---------- Masterpoints ---------- */
.mp-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 960px) { .mp-layout { grid-template-columns: 1fr; } }

.standings { list-style: none; margin: 0; padding: 6px; counter-reset: none; }
.standings li {
  display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 12px; position: relative;
}
.standings li + li { border-top: 1px solid var(--line); }
.standings li:hover { background: var(--paper-2); }
.standings .pos { font-weight: 800; font-size: 1.05rem; color: var(--ink-3); text-align: center; font-variant-numeric: tabular-nums; }
.standings li:nth-child(1) .pos { color: var(--gold); }
.standings .who { min-width: 0; }
.standings .who a { font-weight: 700; text-decoration: none; }
.standings .who small { display: block; color: var(--ink-3); font-size: .82rem; }
.standings .bar { height: 4px; border-radius: 4px; background: var(--paper-2); margin-top: 6px; overflow: hidden; }
.standings .bar i { display: block; height: 100%; border-radius: 4px; background: var(--red); }
.standings .pts { font-size: 1.25rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.standings .pts small { font-size: .72rem; font-weight: 600; color: var(--ink-3); margin-left: 2px; }

.podium { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 8px; margin-top: 12px; }
.podium .step { display: flex; flex-direction: column; align-items: stretch; text-align: center; min-width: 0; }
.podium .step > a { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.podium .step a { font-weight: 700; text-decoration: none; font-size: .95rem; }
.podium .step small { display: block; color: var(--ink-3); font-size: .8rem; margin-bottom: 6px; }
.podium .block {
  display: grid; place-items: center; border-radius: 10px 10px 4px 4px;
  font-weight: 800; font-size: 1.4rem; color: #fff;
}
.podium .p1 .block { height: 96px; background: linear-gradient(180deg, #d9a92a, #a97a10); }
.podium .p2 .block { height: 70px; background: linear-gradient(180deg, #a8a29a, #7c766d); }
.podium .p3 .block { height: 52px; background: linear-gradient(180deg, #b77b46, #8a5427); }
.podium .avatar { margin: 0 auto 8px; }

.latest-list { list-style: none; padding: 0; margin: 0; }
.latest-list li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.latest-list li:last-child { border-bottom: 0; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--paper-2); color: var(--ink-2); white-space: nowrap; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; }

/* Resultatfarver (kontroloversigt) */
.r-main-win   { --c: #d4a017; }
.r-main-final { --c: #9a948b; }
.r-main-semi  { --c: #b0703a; }
.r-cons-win   { --c: #2a78d6; }
.r-cons-loss  { --c: #86b6ef; }
.r-part       { --c: var(--line-2); }
.r-other      { --c: var(--ink-3); }
.chip .dot { background: var(--c); }

.matrix-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.matrix { border-collapse: separate; border-spacing: 0; font-size: .85rem; min-width: 100%; }
.matrix th, .matrix td { padding: 6px 4px; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; }
.matrix thead th { position: sticky; top: 0; background: var(--paper-2); font-weight: 700; color: var(--ink-2); font-size: .72rem; z-index: 1; }
.matrix thead th.t-mon { color: var(--red-ink); }
.matrix .name { position: sticky; left: 0; background: var(--card); text-align: left; padding-left: 14px; padding-right: 14px; font-weight: 600; z-index: 2; }
.matrix thead .name { z-index: 3; background: var(--paper-2); }
.matrix .tot { font-weight: 800; font-variant-numeric: tabular-nums; padding-inline: 12px; }
.matrix .cell span {
  display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px;
  background: color-mix(in srgb, var(--c) 28%, transparent); color: var(--ink); font-weight: 800; font-size: .75rem;
  box-shadow: inset 0 0 0 1.5px var(--c);
}
.matrix .cell.r-part span { background: transparent; box-shadow: none; color: var(--ink-3); }
.legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }

/* ---------- Faneblade / filtre ---------- */
.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--paper-2); border: 1px solid var(--line); gap: 2px; flex-wrap: wrap; }
.seg a, .seg button {
  padding: 7px 14px; border-radius: 999px; font: 600 .9rem var(--font); color: var(--ink-2);
  text-decoration: none; border: 0; background: transparent; cursor: pointer;
}
.seg a:hover, .seg button:hover { color: var(--ink); }
.seg [aria-current="true"], .seg [aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 24px; }

/* ---------- Statistik ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 32px; }
@media (max-width: 760px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { padding: 18px 20px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.kpi b { display: block; font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi span { font-size: .85rem; color: var(--ink-3); font-weight: 600; }

.stat-group { margin-top: 48px; }
.stat-group > h2 { font-size: 1.5rem; display: flex; align-items: center; gap: 10px; }
.stat-group > p { color: var(--ink-2); }

.rank-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; }
.rank-card > header { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.rank-card h3 { margin: 0; font-size: 1.08rem; }
.rank-card header p { margin: 2px 0 0; font-size: .85rem; color: var(--ink-3); line-height: 1.4; }
.rank-icon { display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; background: var(--paper-2); font-size: 1.2rem; }
.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-list li { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: baseline; padding: 7px 0; border-top: 1px solid var(--line); font-size: .95rem; }
.rank-list .pos { color: var(--ink-3); font-weight: 700; font-variant-numeric: tabular-nums; }
.rank-list .who { min-width: 0; }
.rank-list .who .vs { color: var(--ink-3); font-size: .85rem; }
.rank-list .who small { color: var(--ink-3); font-size: .8rem; }
.rank-list .val { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rank-list .lead-row { padding-block: 10px; }
.rank-list .lead-row .who { font-weight: 700; }
.rank-list .lead-row .val { font-size: 1.15rem; }
.rank-list a { text-decoration: none; }
.rank-list a:hover { text-decoration: underline; }
.up { color: var(--up); }
.down { color: var(--down); }
.empty { color: var(--ink-3); font-size: .95rem; margin: 8px 0 0; }
.badge-rec { display: inline-flex; align-items: center; gap: 3px; font-size: .68rem; font-weight: 800; letter-spacing: .06em; padding: 1px 6px; border-radius: 6px; background: var(--red-soft); color: var(--red-ink); vertical-align: 1px; margin-left: 4px; }

/* ---------- Grafer ---------- */
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .axis-text { fill: var(--ink-3); font: 500 11px var(--font); }
.chart .series { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { opacity: .12; }
.chart .muted-series { stroke: var(--line-2); stroke-width: 1.5; }
.chart .hair { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .dot { stroke: var(--card); stroke-width: 2; }
.chart-tip {
  position: absolute; pointer-events: none; z-index: 5; min-width: 140px;
  padding: 10px 12px; border-radius: 10px; background: var(--ink); color: var(--paper);
  font-size: .82rem; line-height: 1.4; box-shadow: var(--shadow-l);
  transform: translate(-50%, calc(-100% - 14px)); white-space: nowrap;
}
.chart-tip b { font-size: 1rem; font-variant-numeric: tabular-nums; }
.chart-tip .k { display: inline-block; width: 12px; height: 2px; vertical-align: middle; margin-right: 6px; border-radius: 2px; }
.chart-tip .row { display: flex; justify-content: space-between; gap: 16px; }
.chart-tip .row span { opacity: .75; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.chart-legend button {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink-2); font: 600 .82rem var(--font); cursor: pointer;
}
.chart-legend button i { width: 14px; height: 3px; border-radius: 2px; background: var(--c, var(--line-2)); }
.chart-legend button[aria-pressed="false"] { opacity: .55; }
.chart-legend button[aria-pressed="false"] i { background: var(--line-2); }
.chart-legend button:hover { border-color: var(--line-2); color: var(--ink); }

/* ---------- Spillere ---------- */
.avatar {
  position: relative; display: inline-grid; place-items: center; flex-shrink: 0;
  border-radius: 50%; overflow: hidden; background: var(--ink); color: var(--paper);
  font-weight: 800; letter-spacing: -0.02em;
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.avatar-sm { width: 32px; height: 32px; font-size: .75rem; }
.avatar-md { width: 48px; height: 48px; font-size: 1rem; }
.avatar-lg { width: 112px; height: 112px; font-size: 2.2rem; box-shadow: 0 0 0 4px var(--card), 0 0 0 6px var(--red); }

.player-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.player-card { display: flex; gap: 14px; align-items: center; padding: 16px; text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s; }
.player-card:hover { color: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow-l); }
.player-card .nm { font-weight: 700; line-height: 1.25; }
.player-card .meta { font-size: .85rem; color: var(--ink-3); }
.player-card .rt { margin-left: auto; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.player-card .rt small { display: block; font-size: .72rem; color: var(--ink-3); font-weight: 600; }
.player-card.inactive { opacity: .6; }

.profile-head { display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center; }
.profile-head h1 { font-size: clamp(2rem, 5vw, 3.4rem); margin: 0; }
.profile-head .sub { color: var(--ink-2); margin-top: 6px; display: flex; gap: 8px 16px; flex-wrap: wrap; }
.rating-big { text-align: right; }
.rating-big b { display: block; font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.rating-big span { font-size: .85rem; color: var(--ink-3); font-weight: 600; }
@media (max-width: 760px) {
  .profile-head { grid-template-columns: auto 1fr; }
  .rating-big { grid-column: 1 / -1; text-align: left; }
}
.form-row { display: flex; gap: 4px; }
.form-row i { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-style: normal; font-size: .7rem; font-weight: 800; color: #fff; }
.form-row .W { background: var(--up); }
.form-row .L { background: var(--down); }

.persona { display: flex; gap: 14px; align-items: center; }
.persona .label { font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.persona .nm { font-weight: 700; font-size: 1.1rem; }
.persona .rec { font-size: .88rem; color: var(--ink-2); }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th { text-align: left; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table .r { text-align: right; font-variant-numeric: tabular-nums; }
.table tbody tr:hover { background: var(--paper-2); }

/* Duel */
.duel-pick { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; }
.duel-pick select { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink); font: 600 1rem var(--font); }
.duel-vs { font-family: var(--serif); font-style: italic; font-size: 1.6rem; color: var(--red-ink); }
.duel-score { display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; align-items: center; text-align: center; margin: 32px 0; }
.duel-score .side .nm { font-weight: 800; font-size: 1.2rem; margin-top: 10px; }
.duel-score .side .avatar { margin-inline: auto; }
.duel-score .big { font-size: clamp(3rem, 8vw, 5.5rem); font-weight: 800; letter-spacing: -0.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.duel-score .big .sep { color: var(--ink-3); margin-inline: .15em; }
.duel-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--paper-2); gap: 2px; }
.duel-bar i:first-child { background: var(--red); }
.duel-bar i:last-child { background: var(--ink); }
@media (max-width: 640px) { .duel-pick { grid-template-columns: 1fr; } .duel-vs { text-align: center; } }

/* ---------- Kalender ---------- */
.cal-month { margin-top: 40px; }
.cal-month h2 { font-size: 1.3rem; text-transform: capitalize; padding-bottom: 10px; border-bottom: 2px solid var(--ink); }
.cal-list { list-style: none; margin: 0; padding: 0; }
.cal-item { display: grid; grid-template-columns: 76px 1fr auto; gap: 20px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cal-item .day { text-align: center; line-height: 1.05; }
.cal-item .day b { display: block; font-size: 1.9rem; font-weight: 800; letter-spacing: -0.04em; }
.cal-item .day span { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); }
.cal-item h3 { margin: 0 0 2px; }
.cal-item p { margin: 0; color: var(--ink-2); font-size: .93rem; }
.cal-item.hl { background: linear-gradient(90deg, var(--red-soft), transparent 70%); border-radius: 12px; padding-inline: 12px; border-bottom-color: transparent; }
.cal-item.hl .day b { color: var(--red-ink); }
@media (max-width: 640px) { .cal-item { grid-template-columns: 60px 1fr; } .cal-item .btn { grid-column: 2; justify-self: start; } }

/* ---------- Kom og spil ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.split.rev > :first-child { order: 2; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split.rev > :first-child { order: 0; } }
.photo { border-radius: calc(var(--radius) + 4px); overflow: hidden; box-shadow: var(--shadow-l); aspect-ratio: 1 / 1; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.facts { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 12px; }
.facts li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; }
.facts svg { width: 22px; height: 22px; fill: none; stroke: var(--red); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-top: 2px; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 40px 16px 0; font-weight: 700; font-size: 1.08rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 12px; font-size: 1.5rem; font-weight: 400; color: var(--red); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-2); margin: 0 0 16px; max-width: 70ch; }
.lang-card { display: grid; grid-template-columns: 1fr 1fr; }
.lang-card > div { padding: clamp(20px, 3vw, 36px); }
.lang-card > div + div { border-left: 1px solid var(--line); }
@media (max-width: 640px) { .lang-card { grid-template-columns: 1fr; } .lang-card > div + div { border-left: 0; border-top: 1px solid var(--line); } }

/* ---------- På denne dag / citat ---------- */
.quote-band { background: var(--ink); color: var(--paper); }
.quote-band .eyebrow { color: #ff8a9b; }
.quote-band blockquote { margin: 0; font-family: var(--serif); font-size: clamp(1.3rem, 2.6vw, 2rem); line-height: 1.4; max-width: 40ch; }
.quote-band blockquote a { color: #fff; }

/* ---------- Side-hero (undersider) ---------- */
.page-hero { padding-block: clamp(40px, 6vw, 80px) clamp(24px, 4vw, 40px); }
.page-hero h1 { margin-bottom: .2em; }

/* ---------- Footer ---------- */
.site-footer { margin-top: clamp(48px, 8vw, 96px); background: #14110e; color: #d8d0c2; font-size: .95rem; }
/* Backgammon-tunger i overgangen til sidefoden */
.board-edge {
  height: 28px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='28'%3E%3Cpath d='M0 0h48L24 28z' fill='%23c8102e'/%3E%3C/svg%3E") 0 0 / 96px 28px repeat-x,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='28'%3E%3Cpath d='M0 0h48L24 28z' fill='%23e9e1d0'/%3E%3C/svg%3E") 48px 0 / 96px 28px repeat-x,
    #14110e;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding-block: 48px 32px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer .brand, .site-footer .brand:hover { color: #fff; }
.site-footer .logo-mark { color: #fff; }
.footer-brand p { margin-top: 14px; max-width: 36ch; color: #a9a091; }
.footer-h { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: #8d8475; margin-bottom: 14px; }
.footer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-footer a { color: #f3eee4; text-decoration: none; }
.site-footer a:hover { color: #ff8a9b; }
.site-footer .muted { color: #8d8475; }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-block: 20px calc(20px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid #2a251f; font-size: .85rem; }

/* ---------- Fejlside ---------- */
.error-page { text-align: center; padding-block: 96px; }
.error-page .lead { margin-inline: auto; }
.dice-pair { display: flex; justify-content: center; gap: 12px; margin-bottom: 24px; }
.dice-pair .die { width: 56px; }
.dice-pair .die rect { fill: var(--card); stroke: var(--line-2); }
.dice-pair .die circle { fill: var(--red); }
.debug { text-align: left; background: var(--paper-2); padding: 16px; border-radius: 10px; overflow-x: auto; font-size: .8rem; }

/* ---------- Scroll-animation ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* ======================================================
   Admin
   ====================================================== */
.admin-bar { background: var(--paper-2); border-bottom: 1px solid var(--line); }
.admin-bar-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-block: 12px; }
.admin-user { display: flex; align-items: center; gap: 12px; margin: 0; font-size: .9rem; }
.admin-main { padding-block: 32px 16px; }
.admin-main h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.alert { padding: 12px 16px; border-radius: 12px; font-weight: 600; margin-bottom: 16px; border: 1px solid; }
.alert-ok   { background: color-mix(in srgb, var(--up) 12%, var(--card)); border-color: color-mix(in srgb, var(--up) 40%, transparent); }
.alert-warn { background: color-mix(in srgb, var(--gold) 14%, var(--card)); border-color: color-mix(in srgb, var(--gold) 45%, transparent); }
.alert-err  { background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 40%, transparent); }
.alert ul { margin: 6px 0 0; padding-left: 20px; font-weight: 500; }

.field { display: grid; gap: 6px; }
.field label, .lbl { font-size: .82rem; font-weight: 700; color: var(--ink-2); }
.input, .admin select {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--card); color: var(--ink); font: 500 1rem var(--font);
}
.input:focus, .admin select:focus { outline: 2px solid var(--red); outline-offset: 1px; border-color: transparent; }
.input.num { width: 7em; text-align: right; font-variant-numeric: tabular-nums; }
.form-row-inline { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.form-row-inline .field { flex: 1; min-width: 140px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn.danger { --bg: var(--red-soft); --fg: var(--red-ink); box-shadow: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.login-card { max-width: 420px; margin: 8vh auto; }
.login-card .logo-mark { width: 48px; height: 48px; margin-bottom: 12px; }

.status-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.status-chip.done { background: color-mix(in srgb, var(--up) 15%, transparent); color: var(--up); }
.status-chip.todo { background: color-mix(in srgb, var(--gold) 18%, transparent); color: var(--gold); }
.status-chip.future { background: var(--paper-2); color: var(--ink-3); }
.status-chip.locked { background: var(--ink); color: var(--paper); }

.reg-list { list-style: none; margin: 0; padding: 0; }
.reg-list li { display: grid; grid-template-columns: 1fr 220px; gap: 12px; align-items: center; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.reg-list li.changed { background: color-mix(in srgb, var(--gold) 12%, transparent); border-radius: 8px; }
.reg-list li.has-code .nm { font-weight: 700; }
.reg-list .nm small { color: var(--ink-3); font-weight: 500; }
.reg-list select { padding: 7px 10px; }
.reg-list select.c-MAIN_WIN { box-shadow: inset 4px 0 0 #d4a017; }
.reg-list select.c-MAIN_FINAL_LOSS { box-shadow: inset 4px 0 0 #9a948b; }
.reg-list select.c-MAIN_SEMI_LOSS { box-shadow: inset 4px 0 0 #b0703a; }
.reg-list select.c-CONSO_WIN { box-shadow: inset 4px 0 0 #2a78d6; }
.reg-list select.c-CONSO_LOSS { box-shadow: inset 4px 0 0 #86b6ef; }
.reg-list select.c-PARTICIPATION { box-shadow: inset 4px 0 0 var(--line-2); }
@media (max-width: 560px) { .reg-list li { grid-template-columns: 1fr; gap: 4px; } }
.sticky-save {
  position: sticky; bottom: 0; z-index: 5; margin-top: 16px;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-l);
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
}
.log-list { list-style: none; margin: 0; padding: 0; font-size: .92rem; }
.log-list li { display: grid; grid-template-columns: 150px 110px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.log-list .t { color: var(--ink-3); font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .log-list li { grid-template-columns: 1fr; gap: 2px; } }

/* Registrering: deltager-chips og placeringer */
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.pick {
  position: relative; display: flex; align-items: center; gap: 8px; min-height: 44px;
  padding: 8px 12px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--card);
  cursor: pointer; user-select: none; font-weight: 600; transition: background .12s, border-color .12s, color .12s;
}
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick span::before {
  content: ""; display: inline-block; width: 16px; height: 16px; margin-right: 8px; vertical-align: -3px;
  border-radius: 5px; border: 1.5px solid var(--line-2); background: var(--paper);
}
.pick:hover { border-color: var(--ink-3); }
.pick.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pick.on span::before { background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; border-color: var(--red); }
.pick:has(input:focus-visible) { outline: 3px solid var(--red); outline-offset: 2px; }
.pick[hidden] { display: none; }
.role-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 860px) { .role-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .role-grid { grid-template-columns: 1fr; } }
.role select { border-left: 5px solid var(--c, var(--line-2)); }
.role-MAIN_WIN { --c: #d4a017; }
.role-MAIN_FINAL_LOSS { --c: #9a948b; }
.role-MAIN_SEMI_LOSS { --c: #b0703a; }
.role-CONSO_WIN { --c: #2a78d6; }
.role-CONSO_LOSS { --c: #86b6ef; }

/* DBgF-kørsel */
.run-log { display: block; width: 100%; height: 360px; border: 0; border-radius: 12px; background: #14110e; color: #e9e2d5; padding: 12px; overflow: auto; font: 13px/1.5 var(--mono); white-space: pre-wrap; }
iframe.run-log { padding: 0; }

/* Næste klubaften i hero – kun mobil */
.next-mobile { display: none; }
@media (max-width: 900px) {
  .next-mobile {
    display: flex; gap: 16px; align-items: center; margin-top: 24px; padding: 14px;
    border-radius: var(--radius); text-decoration: none; color: #f6f2ea;
    background: rgb(255 255 255 / .08); border: 1px solid rgb(255 255 255 / .16);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  }
  .next-mobile:hover { color: #fff; border-color: rgb(255 255 255 / .35); }
  .next-mobile .date-tile { width: 72px; height: 80px; flex-shrink: 0; background: #f6f2ea; color: #16130f; }
  .next-mobile .date-tile .wd { color: var(--red); }
  .next-mobile .date-tile .d { font-size: 2rem; }
  .nm-body { display: flex; flex-direction: column; gap: 1px; line-height: 1.35; min-width: 0; font-size: .95rem; }
  .nm-label { font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #ff8a9b; margin-bottom: 2px; }
  .nm-body strong { font-size: 1.15rem; color: #fff; }
  .nm-place { color: #cfc6b7; }
  .nm-count { margin-top: 4px; font-size: .85rem; color: #cfc6b7; font-variant-numeric: tabular-nums; }
  .nm-count b { color: #fff; }
  .next-strip { display: none; }
  .hero-facts { display: none; }
  .hero { padding-bottom: clamp(48px, 9vw, 120px); }
}

/* ======================================================
   Kampe / Månedens kamp
   ====================================================== */
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 50%; vertical-align: -2px; flex-shrink: 0; }
.swatch.w { background: #f6f2ea; box-shadow: inset 0 0 0 1.5px #b9ad97; }
.swatch.b { background: #1a1612; box-shadow: inset 0 0 0 1.5px #000; }
:root[data-theme="dark"] .swatch.b { box-shadow: inset 0 0 0 1.5px #5a5248; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .swatch.b { box-shadow: inset 0 0 0 1.5px #5a5248; } }

.match-board { width: 100%; height: auto; display: block; filter: drop-shadow(0 18px 28px rgb(0 0 0 / .35)); }
.match-board .tray { fill: #3b2918; }
.match-board .pt-num { fill: #e9dcc4; font: 600 10px var(--font); opacity: .55; }
.match-board .chk { transition: transform .5s cubic-bezier(.3,1.2,.5,1), r .3s; }
.match-board .chk-off { r: 7px; }
.mb-cube rect { fill: #f8f4ec; stroke: #16130f; stroke-width: 1.5; }
.mb-cube text { font: 800 15px var(--font); fill: #16130f; }
.mb-cube { transition: transform .4s ease; }
.mb-die rect { fill: #f8f4ec; stroke: rgb(0 0 0 / .2); stroke-width: 3; }
.mb-die circle { fill: #16130f; }
.mb-die.b rect { fill: #1f1a15; stroke: #000; }
.mb-die.b circle { fill: #f6f2ea; }

.match-score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 18px 24px; margin-bottom: 24px; }
.ms-side { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; min-width: 0; }
.ms-side.b { justify-content: flex-end; text-align: right; }
.ms-side .nm { overflow: hidden; text-overflow: ellipsis; }
.ms-side.winner .nm::after { content: " 🏆"; }
.ms-result { text-align: center; line-height: 1; }
.ms-result b { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.ms-result span { margin: 0 .25em; color: var(--ink-3); font-size: 1.6rem; }
.ms-result small { display: block; margin-top: 6px; color: var(--ink-3); font-size: .78rem; font-weight: 600; }
@media (max-width: 560px) { .match-score { grid-template-columns: 1fr; text-align: center; } .ms-side, .ms-side.b { justify-content: center; } }

.match-layout { display: grid; grid-template-columns: 1.55fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 1000px) { .match-layout { grid-template-columns: 1fr; } }
.match-viewer { scroll-margin-top: 90px; }
.step-meta { margin: 14px 0 2px; font-size: .85rem; }
.step-info { margin: 0; font-size: 1.15rem; font-weight: 700; display: flex; align-items: center; gap: 8px; min-height: 1.6em; }
.step-info::before { content: ""; width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.step-info.w::before { background: #f6f2ea; box-shadow: inset 0 0 0 1.5px #b9ad97; }
.step-info.b::before { background: #1a1612; }
.step-err { margin: 6px 0 0; min-height: 1.7em; font-size: .92rem; }
.step-err.big, .step-err.small, .step-err.ok { display: inline-block; padding: 3px 10px; border-radius: 999px; font-weight: 700; }
.step-err.big { background: var(--red-soft); color: var(--red-ink); }
.step-err.small { background: color-mix(in srgb, var(--gold) 16%, transparent); color: var(--gold); }
.step-err.ok { background: color-mix(in srgb, var(--up) 14%, transparent); color: var(--up); }
.step-controls { display: flex; align-items: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.step-controls input[type=range] { flex: 1; min-width: 120px; accent-color: var(--red); }
.step-controls .icon-btn { background: var(--paper-2); font-size: .95rem; }
.game-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.game-chips .chip { border: 1px solid var(--line); cursor: pointer; font-variant-numeric: tabular-nums; min-width: 32px; justify-content: center; }
.game-chips .chip[aria-current="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.match-stats th { text-align: center; font-size: .78rem; }
.match-stats td { font-variant-numeric: tabular-nums; font-weight: 600; }
.match-stats td.win { color: var(--up); font-weight: 800; }
.worst-list { list-style: none; margin: 0; padding: 0; }
.worst-list li + li { border-top: 1px solid var(--line); }
.worst-list button { display: grid; grid-template-columns: 64px 1fr; gap: 10px; width: 100%; padding: 10px 4px; text-align: left; border: 0; background: none; color: var(--ink); font: inherit; font-size: .92rem; cursor: pointer; border-radius: 8px; }
.worst-list button:hover { background: var(--paper-2); }
.worst-list .err { font-weight: 800; color: var(--red-ink); font-variant-numeric: tabular-nums; }
.linklike { border: 0; background: none; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); cursor: pointer; }
.match-select { display: flex; align-items: center; gap: 8px; font-size: .88rem; }
.match-select select { padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink); font: 600 .92rem var(--font); max-width: min(420px, 70vw); }
.match-card { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s; }
.match-card:hover { color: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow-l); }
.match-card.featured { box-shadow: inset 0 0 0 2px var(--gold), var(--shadow); }
.match-card .tag { align-self: flex-start; font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); }
.match-card h3 { margin: 0; }
.mc-score { display: flex; gap: 8px; align-items: baseline; margin: 4px 0; font-size: 1.05rem; }
.mc-score .win { font-weight: 800; }

/* Forsiden */
.motm { background: linear-gradient(180deg, var(--paper), var(--paper-2)); }
.motm-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 24px; align-items: start; }
@media (max-width: 900px) { .motm-grid { grid-template-columns: 1fr; } }
.motm-score { display: grid; gap: 8px; margin-bottom: 20px; }
.motm-score > div { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; font-size: 1.15rem; }
.motm-score b { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.motm-score .win span { font-weight: 800; }
.motm-score .win span::after { content: " 🏆"; }
.motm-bars { margin-bottom: 20px; }
.motm-bars .lbl { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); margin: 0 0 6px; }
.mbar { display: grid; grid-template-columns: 90px 1fr 56px; align-items: center; gap: 10px; margin-bottom: 6px; font-size: .92rem; }
.mbar > i { display: block; height: 10px; width: var(--w); border-radius: 0 4px 4px 0; min-width: 4px; }
.mbar > i.w { background: #d8cdb8; box-shadow: inset 0 0 0 1px #b9ad97; }
.mbar > i.b { background: #3a332b; }
.mbar b { text-align: right; font-variant-numeric: tabular-nums; }
.mbar.luck em { position: relative; height: 10px; background: linear-gradient(90deg, transparent calc(50% - 1px), var(--line-2) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)); }
.mbar.luck em i { position: absolute; top: 0; height: 100%; width: var(--w); }
.mbar.luck em i.pos { left: 50%; background: var(--up); border-radius: 0 4px 4px 0; }
.mbar.luck em i.neg { right: 50%; background: var(--down); border-radius: 4px 0 0 4px; }
.puzzle-answer { padding-top: 4px; }
@media (hover: none) { .kbd-tip { display: none; } }
.match-board-wrap { touch-action: pan-y; }

/* ======================================================
   Instagram og Facebook
   ====================================================== */
.social-icon svg { fill: none; stroke: currentColor; stroke-width: 2; }
.social-icon svg.fill, .social-btn svg.fill, .footer-social svg.fill { fill: currentColor; stroke: none; }
.social-icon.ig:hover { color: #d62976; background: color-mix(in srgb, #d62976 10%, transparent); }
.social-icon.fb:hover { color: #1877f2; background: color-mix(in srgb, #1877f2 10%, transparent); }

.social-buttons { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.social-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 10px; border-radius: 999px;
  font: 700 .9rem var(--font); text-decoration: none; color: #fff; transition: transform .15s, box-shadow .15s;
}
.social-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.social-btn:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 8px 18px -8px rgb(0 0 0 / .5); }
.social-btn.ig { background: linear-gradient(45deg, #f09433, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888); }
.social-btn.fb { background: #1877f2; }

.hero-follow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 20px; color: #cfc6b7; font-weight: 600; font-size: .95rem; }

.nav-social { display: none; }
.footer-social { display: inline-flex; align-items: center; gap: 8px; }
.footer-social svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }

@media (max-width: 1060px) {
  .js .nav .nav-social { display: block; padding: 14px 16px 4px; border-top: 1px solid var(--line); margin-top: 8px; }
  .js .nav .nav-social .social-buttons { display: flex; }
  .js .nav .nav-social .social-btn { flex: 1; justify-content: center; padding-block: 12px; font-size: 1rem; }
}
@media (max-width: 520px) {
  .header-tools .social-icon { display: none; }
}

/* Plads til ikonerne i toppen */
.nav a { white-space: nowrap; }
@media (min-width: 1061px) and (max-width: 1560px) {
  .header-inner { gap: 16px; }
  .nav a { padding: 8px 10px; font-size: .9rem; }
  .brand-text { font-size: .95rem; }
}
/* Knapperne i mobilmenuen må ikke arve menulinkenes udseende */
.js .nav .nav-social a.social-btn { display: flex; align-items: center; justify-content: center; gap: 8px; color: #fff; border-radius: 999px; padding: 12px 14px; font-size: 1rem; white-space: nowrap; }
.js .nav .nav-social a.social-btn.ig { background: linear-gradient(45deg, #f09433, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888); }
.js .nav .nav-social a.social-btn.fb { background: #1877f2; }
.js .nav .nav-social a.social-btn:hover { color: #fff; filter: brightness(1.08); }
