:root {
  --bg: #0b1c33;
  --panel: #071426;
  --gold: #d7a55b;
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.62);
  --row: #0a1a30;
  --sparta: #102438;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  overflow-x: clip;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Barlow", "Segoe UI", sans-serif;
  font-weight: 400;
  line-height: 1.35;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.15rem 1.5rem 0.85rem;
}

.updated {
  flex: 1 0 100%;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.logo {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  display: block;
}

.wordmark {
  font-family: "Oswald", "Barlow Condensed", "Arial Narrow", sans-serif;
  font-weight: 600;
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.season {
  margin: 0;
  flex: 0 0 auto;
  border: 1px solid var(--gold);
  border-radius: 999px;
  padding: 0.38rem 0.9rem;
  color: var(--gold);
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

main {
  max-width: 1120px;
  min-width: 0;
  margin: 0 auto;
  padding: 0.4rem 1.5rem 2rem;
}

.view { min-width: 0; max-width: 100%; }

.hero {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(0, 1.2fr);
  gap: 1rem;
  align-items: stretch;
}

.place {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.35rem 1.4rem 1.5rem;
  min-height: 100%;
}

.place-num {
  margin: 0;
  color: var(--gold);
  font-family: "Oswald", "Barlow Condensed", sans-serif;
  font-weight: 600;
  font-size: clamp(7.5rem, 14vw, 11.5rem);
  line-height: 0.78;
  letter-spacing: -0.04em;
}

.place-label {
  margin: calc(0.35rem + 30px) 0 0;
  font-family: "Oswald", "Barlow Condensed", sans-serif;
  font-weight: 500;
  font-size: 1.35rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
}

.rule {
  width: 4.5rem;
  height: 0;
  margin: 1.15rem 0 1rem;
  border: 0;
  border-top: 2px solid var(--gold);
}

.points {
  margin: 0;
  font-family: "Oswald", "Barlow Condensed", sans-serif;
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.points span { color: var(--gold); }

.goals {
  margin: 0.15rem 0 0;
  font-size: 1.25rem;
  font-weight: 500;
}

.after {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--gold);
  border-radius: 14px;
}

.table-panel {
  padding: 1.15rem 0 0.55rem;
  overflow: hidden;
  max-width: 100%;
}

.table-scroll {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-scroll > table {
  width: max-content;
  min-width: 100%;
}
.table-panel > h2 { margin-left: 1.15rem; margin-right: 1.15rem; }
/* Empty-state note inside Kamper (and similar) — match h2 indent so text clears gold frame */
.table-panel > .edit-lead {
  margin-left: 1.15rem;
  margin-right: 1.15rem;
  padding-bottom: 0.35rem;
}

h2 {
  margin: 0 0 0.7rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--gold);
  font-family: "Oswald", "Barlow Condensed", sans-serif;
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-variant-numeric: tabular-nums;
}

th, td { border: 0; }

th, td {
  padding: 0.62rem 0.45rem;
  text-align: center;
  font-weight: 500;
}

th {
  color: var(--muted);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

td { font-size: 1.02rem; }

tbody tr:nth-child(even),
tbody tr:nth-child(even) td { background: var(--row); }

th.num, td.num { text-align: center; white-space: nowrap; }
.rank-table th:last-child,
.rank-table td:last-child { width: 5.2rem; padding-right: 0.7rem; }

.rank-table td:first-child,
.rank-table th:first-child { width: 2.2rem; text-align: center; padding-left: 0.7rem; }

.stat-table td.num { color: var(--gold); font-weight: 600; width: 5.5rem; }
.stat-table th.num { color: var(--muted); font-weight: 600; width: 5.5rem; }

[hidden] { display: none !important; }

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem 0.75rem;
  border-bottom: 1px solid rgba(215, 165, 91, 0.35);
}

.nav a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-family: "Oswald", "Barlow Condensed", sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding-bottom: 0.15rem;
  border-bottom: 1px solid transparent;
}

.nav a.is-active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.view[data-view="poengliga"] td.num {
  color: var(--gold);
  font-weight: 600;
}

.pts { color: var(--gold); font-weight: 600; }

tr.sparta td {
  background: var(--sparta);
  font-weight: 600;
}

tr.sparta td:first-child {
  color: var(--gold);
  box-shadow: inset 3px 0 0 var(--gold);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
  align-items: stretch;
  min-width: 0;
}

/* Forside: Neste kamp + Forrige kamp øverst, Spillere + Målvakt nederst. */
.game-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 0; margin-bottom: 1rem; }
/* Spillere/Målvakter-kortene: side om side (dobbel bredde mot før), kompakte topp 5-tabeller.
   (Egen klasse: .stat-cards brukes av admin.) */
.front-stat-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mini-wrap { min-width: 0; margin-top: 0.35rem; }
.mini-table { width: 100%; border-collapse: collapse; table-layout: auto; font-size: 1rem; }
.mini-table th {
  padding: 0 0.3rem 0.35rem;
  color: var(--muted);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-align: left;
  border-bottom: 1px solid var(--gold);
}
.mini-table td { padding: 0.55rem 0.3rem; border-bottom: 1px solid rgba(255, 255, 255, 0.08); vertical-align: baseline; }
.mini-table tbody tr:last-child td { border-bottom: 0; }
.mini-table .mt-n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mini-table .mt-c { text-align: center; }
.mini-table th.mt-n { text-align: right; }
.mini-table .mt-rank { width: 1.4rem; padding-left: 0; color: var(--gold); font-family: "Oswald", sans-serif; }
.mini-table .mt-name { width: 100%; overflow-wrap: anywhere; text-align: left; }
.mini-table .mt-n { padding-left: 0.5rem; }
.mini-table td.mt-gold { color: var(--gold); font-family: "Oswald", sans-serif; font-size: 1.1rem; }
.mini-table .history-player-link { display: inline; min-height: 0; padding: 0; }
@media (max-width: 560px) {
  .mini-table { font-size: 0.92rem; }
  .mini-table th, .mini-table td { padding-left: 0.2rem; padding-right: 0.2rem; }
  .mini-table .mt-opt { display: none; }
}

.squad-cards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0;
  margin-bottom: 1rem;
}

.card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  padding: 1.1rem 1.15rem 1.2rem;
}

.card-kicker {
  margin: 0.15rem 0 0.35rem;
  color: var(--muted);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.card-title {
  margin: 0.1rem 0 0.45rem;
  font-family: "Oswald", "Barlow Condensed", sans-serif;
  font-weight: 500;
  font-size: 1.65rem;
  line-height: 1.1;
}

.card-meta {
  margin: 0.1rem 0;
  color: var(--muted);
  font-size: 1rem;
}

.leaders {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
}

.leaders li {
  display: grid;
  grid-template-columns: 1.6rem 1fr auto;
  gap: 0.55rem;
  align-items: baseline;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 1.05rem;
}

.leaders li:last-child { border-bottom: 0; }

.leaders .rank {
  color: var(--gold);
  font-family: "Oswald", sans-serif;
  font-size: 1.15rem;
}

.leaders .name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.leaders .value {
  color: var(--gold);
  font-family: "Oswald", sans-serif;
  font-size: 1.45rem;
  font-weight: 500;
}

.keeper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: auto 0 0;
}

.keeper div {
  padding-top: 0.55rem;
  border-top: 1px solid var(--gold);
}

.keeper dt {
  color: var(--muted);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.keeper dd {
  margin: 0.1rem 0 0;
  color: var(--gold);
  font-family: "Oswald", sans-serif;
  font-size: 2rem;
  font-weight: 500;
  line-height: 1;
}

footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.2rem 1.5rem 1.6rem;
}

footer p {
  margin: 0;
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

footer p + p { margin-top: 0.35rem; }

.attendance { margin-bottom: 1rem; }

.attendance-top { padding: 0 1.15rem 1.1rem; }

.attendance-top .card-kicker { margin-top: 0; }

.attendance-figures {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 0.85rem;
}

.attendance-figures dt { text-transform: uppercase; }

.attendance-empty { padding: 0 1.15rem 0.6rem; }

@media (max-width: 820px) {
  .attendance-figures { grid-template-columns: 1fr; gap: 0.75rem; }

  .topbar, main, .nav, footer { padding-left: 1rem; padding-right: 1rem; }
  .topbar { flex-wrap: wrap; gap: 0.65rem; }
  .hero, .cards, .squad-cards, .game-cards, .front-stat-cards { grid-template-columns: 1fr; }
  .place { padding-bottom: 0.2rem; }
  .place-num { font-size: 7.5rem; }
  .wordmark { letter-spacing: 0.06em; font-size: 1.25rem; }
  .logo { width: 52px; height: 52px; }
  .season { font-size: 0.8rem; padding: 0.32rem 0.7rem; }
  .nav {
    flex-wrap: nowrap;
    gap: 0.55rem 0.85rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.85rem;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a {
    flex: 0 0 auto;
    letter-spacing: 0.08em;
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0.45rem 0.2rem;
  }
  h2 { letter-spacing: 0.1em; }
  .card h2 { letter-spacing: 0.06em; overflow-wrap: anywhere; }
  .card-title, .card-meta, .card-kicker { overflow-wrap: anywhere; }
  .season { max-width: 100%; text-align: center; }
  .full-standings th,
  .full-standings td { padding: 0.42rem 0.28rem; }
  .full-standings th.name,
  .full-standings td.name {
    white-space: normal;
    overflow-wrap: break-word;
    min-width: 5.5rem;
    max-width: 9rem;
    text-align: left;
  }
}

.team-stats {
  margin-top: 1rem;
  width: 100%;
}

.team-stats th:first-child,
.team-stats td:first-child {
  width: auto;
  text-align: center;
}

.team-stats td:first-child { color: var(--text); }
.team-stats th:first-child { color: var(--muted); }

.team-stats th.num,
.team-stats td.num {
  width: 5.5rem;
}

.team-stats td.num {
  color: var(--gold);
  font-weight: 600;
}

.team-stats th.num {
  color: var(--muted);
  font-weight: 600;
}

.team-stats tr.sparta td:first-child {
  color: var(--text);
  box-shadow: inset 3px 0 0 var(--gold);
}

.full-standings {
  width: 100%;
  font-size: 0.92rem;
}

.full-standings th,
.full-standings td {
  padding: 0.5rem 0.35rem;
  white-space: nowrap;
}

.full-standings th,
.full-standings td,
.full-standings th.num,
.full-standings td.num,
.full-standings th:first-child,
.full-standings td:first-child,
.full-standings th:last-child,
.full-standings td:last-child {
  text-align: center;
}

.full-standings th:first-child,
.full-standings td:first-child {
  width: 2rem;
  padding-left: 0.55rem;
}

.full-standings th:last-child,
.full-standings td:last-child {
  padding-right: 0.55rem;
}

.full-standings th,
.full-standings th.num {
  color: var(--muted);
  font-weight: 600;
}

.full-standings td.num {
  width: auto;
  color: var(--text);
  font-weight: 500;
}

.full-standings td.pts,
.full-standings td.pct {
  color: var(--gold);
  font-weight: 600;
}

.full-standings tr.sparta td:first-child {
  color: var(--gold);
}


.roster {
  font-size: 0.84rem;
}

.roster th,
.roster td {
  padding: 0.4rem 0.28rem;
  white-space: nowrap;
}

.roster th,
.roster td,
.roster th:first-child,
.roster td:first-child,
.roster th:nth-child(2),
.roster td:nth-child(2),
.roster td.num {
  text-align: center;
}

.roster th:first-child,
.roster td:first-child {
  width: 2.4rem;
}

.roster td.pts {
  color: var(--gold);
  font-weight: 600;
}

.edit-panel {
  max-width: 34rem;
  padding: 1.15rem 1.25rem 1.4rem;
}

.edit-lead,
.edit-note,
.edit-status {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.edit-panel label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.edit-panel input,
.edit-panel select {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--gold);
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
  font: 1rem/1.3 "Barlow", sans-serif;
  letter-spacing: 0;
  text-transform: none;
}

.edit-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 1rem;
}

.edit-panel button {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  font-family: "Oswald", "Barlow Condensed", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.edit-status { min-height: 1.2em; }


.history-intro { margin-bottom: 1rem; }
.history-intro h2 { margin-bottom: 0.45rem; }

/* Season detail: Sesong card | Liga card (same Liga as Sesonger list). */
.history-season-head {
  margin-top: 0;
  margin-bottom: 1rem;
}
.history-season-head > .history-intro {
  margin-bottom: 0;
}
.history-season-liga h2 {
  overflow-wrap: anywhere;
}

.history-data-ask {
  margin: 0.85rem 0 0;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(215, 165, 91, 0.32);
  border-radius: 8px;
  background: rgba(215, 165, 91, 0.08);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.95rem;
  line-height: 1.45;
  letter-spacing: 0.02em;
}
.history-mail-link {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid rgba(215, 165, 91, 0.55);
  overflow-wrap: anywhere;
}
.history-mail-link:hover {
  color: #f0c989;
  border-bottom-color: #f0c989;
}

.history-back {
  display: inline-block;
  margin: 0 0 0.85rem;
  color: var(--gold);
  text-decoration: none;
  font-family: "Oswald", "Barlow Condensed", sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.history-season-link,
.history-player-link {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid rgba(215, 165, 91, 0.45);
}

.history-season-link:hover,
.history-player-link:hover,
.history-back:hover {
  color: var(--gold);
}

.history-search { margin-bottom: 1rem; }

.history-search-form {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.history-search-form input[type="search"] {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--gold);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  font: 1rem/1.3 "Barlow", sans-serif;
  max-width: 22rem;
}

.history-search-list {
  list-style: none;
  margin: 0.2rem 0 0;
  padding: 0;
}

.history-search-list li {
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 1.02rem;
}

.history-search-list li:last-child { border-bottom: 0; }

.history-leaders { margin-top: 1rem; margin-bottom: 1rem; }

.cards.history-leaders-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.history-leaders-2 > .panel {
  margin-top: 0;
  height: 100%;
  min-width: 0;
}

.history-leaders .card h2,
.history-leaders-2 > .panel > h2 {
  letter-spacing: 0.12em;
  font-size: 0.95rem;
}

#history-root > .panel.table-panel { margin-top: 1rem; }

.history-attendance .attendance-figures-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.attendance-note {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.attendance-away { margin-top: 0.85rem; font-size: 0.92rem; }

.attendance-subhead {
  margin: 0.4rem 1.15rem 0.5rem;
  color: var(--muted);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.attendance-split {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 0 1rem;
}

.attendance-col { min-width: 0; }

.attendance-foot { padding: 0.45rem 1.15rem 0; font-size: 0.85rem; }

#history-root > .history-attendance { margin-top: 0; }

.history-attendance-season,
.history-shots-season { margin-bottom: 1rem; }

@media (max-width: 820px) {
  .history-search-form input[type="search"] { max-width: 100%; }
  .history-attendance .attendance-figures-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem; }
  .history-attendance .keeper dd { font-size: 1.7rem; }
  .attendance-split { grid-template-columns: 1fr; }
  .attendance-col + .attendance-col { margin-top: 1.1rem; }
}

@media (max-width: 560px) {
  .history-attendance .hide-sm { display: none; }
  #history-root[data-mode="player"] .hide-sm { display: none; }
}

/* Historikk · Sesonger: kilde-stempler (Kilde = siste kolonne) */
.source-stamp {
  display: inline-block;
  max-width: 100%;
  padding: 0.12rem 0.48rem;
  border: 1px solid rgba(215, 165, 91, 0.55);
  border-radius: 999px;
  color: var(--gold);
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.25;
  white-space: nowrap;
  vertical-align: middle;
}
.source-stamp-hockeyno {
  background: rgba(215, 165, 91, 0.14);
}
.source-stamp-arkiv {
  border-color: rgba(180, 190, 205, 0.45);
  color: #c5ced9;
  background: rgba(180, 190, 205, 0.08);
}
.source-stamp-ep {
  border-color: rgba(120, 180, 230, 0.5);
  color: #9ec8ea;
  background: rgba(120, 180, 230, 0.1);
}
.source-stamp-wiki {
  border-color: rgba(170, 150, 210, 0.5);
  color: #c4b4de;
  background: rgba(170, 150, 210, 0.1);
}
.source-stamp-aviser {
  border-color: rgba(210, 160, 120, 0.55);
  color: #e0b892;
  background: rgba(210, 160, 120, 0.1);
}
.full-standings th.col-kilde,
.full-standings td.col-kilde {
  text-align: center;
  white-space: nowrap;
}
@media (max-width: 560px) {
  .source-stamp {
    font-size: 0.66rem;
    padding: 0.1rem 0.4rem;
  }
}

/* Samlet spillerprofil: nåværende sesong (hockey.no) i samme tabell som historikk */
#history-root[data-mode="player"] tr.history-modern-row td { background: rgba(215, 165, 91, 0.07); }
.history-era-split { margin-top: 0.75rem; font-size: 0.95rem; }
.history-era-note { margin: 0.6rem 0 1rem; }

@media (max-width: 380px) {
  .history-attendance .attendance-figures-4 { grid-template-columns: 1fr; }
}

/* Historikk: in-page subnav + panels */
.subnav {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.45rem;
  margin: 0.35rem 0 1rem;
  padding: 0 0 2px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-margin-top: 0.5rem;
}
.subnav::-webkit-scrollbar { display: none; }
.subnav a {
  flex: 0 0 auto;
  padding: 0.38rem 0.95rem;
  border: 1px solid rgba(215, 165, 91, 0.45);
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  font: 500 0.85rem/1.2 "Oswald", "Barlow Condensed", sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.subnav a:hover { color: var(--gold); border-color: var(--gold); }
.subnav a.is-active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--panel);
}
.subnav a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.history-panel { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
#history-root .history-panel > * { margin-top: 0; margin-bottom: 0; }
.history-search-note { margin-top: 0.6rem; font-size: 0.88rem; }
@media (max-width: 820px) {
  .subnav { gap: 0.4rem; margin-bottom: 0.85rem; padding-bottom: 4px; }
  .subnav a {
    padding: 0.55rem 1rem;
    letter-spacing: 0.06em;
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
  }
}

/* ---- Admin ---- */
.admin-main { display: flex; flex-direction: column; gap: 1rem; }
.admin-main #admin-app { display: flex; flex-direction: column; gap: 1rem; }
.admin-main #admin-app[hidden], .admin-main [hidden] { display: none; }
.admin-main .edit-panel { max-width: 46rem; width: 100%; }
.admin-main #gate { max-width: 26rem; }
.admin-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.admin-title {
  margin: 0;
  font-family: "Oswald", "Barlow Condensed", sans-serif;
  font-weight: 500;
  font-size: 1.5rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}
.admin-bar-actions { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.admin-btn, .admin-link {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font: 0.9rem/1.2 "Oswald", "Barlow Condensed", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}
.admin-btn:hover, .admin-link:hover, .edit-panel button:hover { background: rgba(215, 165, 91, 0.12); }
.admin-stats { padding: 1.15rem 1.25rem 1.2rem; }
.stat-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}
.stat-card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.8rem 0.9rem;
  background: var(--bg);
  border: 1px solid rgba(215, 165, 91, 0.45);
  border-radius: 10px;
}
.stat-label {
  color: var(--muted);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.stat-value {
  font-family: "Oswald", "Barlow Condensed", sans-serif;
  font-size: 1.9rem;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.admin-sub {
  margin: 1.2rem 0 0.5rem;
  color: var(--muted);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.day-chart {
  display: flex;
  align-items: stretch;
  gap: 0.3rem;
  height: 9rem;
}
.day-col {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  min-width: 0;
}
.day-bar {
  width: 100%;
  max-width: 2.2rem;
  background: var(--gold);
  border-radius: 4px 4px 0 0;
  opacity: 0.85;
}
.day-val { font-size: 0.75rem; color: var(--text); min-height: 1em; font-variant-numeric: tabular-nums; }
.day-lab { font-size: 0.7rem; color: var(--muted); margin-top: 0.25rem; white-space: nowrap; }
.admin-cols {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 1.25rem;
}
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.admin-table th, .admin-table td {
  padding: 0.35rem 0.4rem;
  border-bottom: 1px solid rgba(215, 165, 91, 0.2);
  text-align: left;
}
.admin-table th { color: var(--muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; }
.admin-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.admin-table code { color: var(--muted); font-size: 0.82rem; }
.admin-table td.muted { color: var(--muted); }
.edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 0.9rem;
}
/* Utvidet besøksstatistikk (Trond 2026-10-17) */
.stat-cards.stat-cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat-delta { display: block; font-size: 0.85rem; color: var(--muted); margin-top: 0.15rem; font-variant-numeric: tabular-nums; }
.admin-cols.admin-cols-even { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 0.4rem; }
.admin-wrap { table-layout: fixed; }
.admin-wrap th.num, .admin-wrap td.num { width: 4.2rem !important; }
.admin-wrap td, .admin-wrap td a { white-space: normal !important; overflow-wrap: anywhere !important; max-width: none !important; text-overflow: clip !important; overflow: visible !important; }
.admin-wrap td a { color: var(--text); }
.hour-chart { gap: 0.15rem; }
.wd-chart { height: 7rem; }
@media (max-width: 640px) {
  .hour-chart .lab-thin { visibility: hidden; }
  .hour-chart .day-val { font-size: 0.55rem; }
  .stat-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-cols, .admin-cols.admin-cols-even, .edit-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-table th, .admin-table td { padding: 0.3rem 0.25rem; }
  .day-lab { font-size: 0.6rem; }
}

/* ---- Admin: Historikk ---- */
.edit-panel textarea {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--gold);
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
  font: 1rem/1.4 "Barlow", sans-serif;
  letter-spacing: 0;
  text-transform: none;
  resize: vertical;
  min-height: 2.6rem;
}
.edit-panel input:focus, .edit-panel select:focus, .edit-panel textarea:focus {
  outline: 2px solid rgba(215, 165, 91, 0.55);
  outline-offset: 1px;
}
.edit-panel input[type="date"], .edit-panel input[type="time"] { color-scheme: dark; min-height: 2.45rem; }
.admin-tabs {
  display: flex;
  gap: 0.4rem;
  margin: 1rem 0 0;
  border-bottom: 1px solid rgba(215, 165, 91, 0.35);
}
.edit-panel .admin-tab {
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  color: var(--muted);
  padding: 0.5rem 1.1rem;
  margin-bottom: -1px;
}
.edit-panel .admin-tab[aria-selected="true"] {
  color: var(--gold);
  border-color: rgba(215, 165, 91, 0.6);
  background: var(--panel);
}
.edit-panel .btn-quiet { border-color: rgba(215, 165, 91, 0.45); color: var(--muted); }
.hist-search { margin-bottom: 0.4rem; }
.hist-count { color: var(--muted); letter-spacing: 0.04em; text-transform: none; font-weight: 400; }
.hist-meta {
  margin-top: 1rem;
  padding: 0.55rem 0.75rem;
  background: var(--bg);
  border-left: 3px solid var(--gold);
  border-radius: 6px;
  color: var(--text);
}
.period-grid {
  display: grid;
  grid-template-columns: 7.5rem 6rem 6rem;
  justify-content: start;
  gap: 0.4rem 0.6rem;
  align-items: center;
}
.period-grid input {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--gold);
  border-radius: 8px;
  padding: 0.4rem 0.55rem;
  font: 1rem/1.3 "Barlow", sans-serif;
  width: 100%;
  text-align: center;
}
.period-head, .period-lab {
  color: var(--muted);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.period-head { text-align: center; }
@media (max-width: 640px) {
  .edit-panel .admin-tab { flex: 1 1 0; }
  .period-grid { grid-template-columns: 6.5rem minmax(0, 1fr) minmax(0, 1fr); justify-content: stretch; }
  .edit-actions { flex-wrap: wrap; }
}

/* Spillere: Aktive Spillere vs Legende Spillere — compact */
.group-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.15rem 0 0.65rem;
  padding: 0;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible;
}
.group-card {
  padding: 0.6rem 0.85rem 0.7rem;
  box-shadow: none !important;
}
.group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.15rem 0.6rem;
  margin-bottom: 0.2rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid rgba(215, 165, 91, 0.45);
}
.group-card h2 {
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--text);
  font-size: 0.88rem;
  letter-spacing: 0.16em;
}
.group-points { margin: 0; white-space: nowrap; font-family: "Oswald", "Barlow Condensed", sans-serif; }
.group-points-num {
  color: var(--gold);
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1;
}
.group-points-label {
  color: var(--muted);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.group-meta { font-size: 0.85rem; line-height: 1.3; margin: 0.15rem 0 0; }
.group-figures {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 0.45rem;
}
.group-figures div { padding-top: 0.3rem; border-top-color: rgba(215, 165, 91, 0.5); }
.group-figures dt { text-transform: uppercase; font-size: 0.68rem; letter-spacing: 0.1em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.group-figures dd { font-size: 1.1rem; }
@media (max-width: 820px) {
  .group-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .group-cards { grid-template-columns: 1fr; gap: 0.6rem; }
}

.group-total {
  grid-column: 1 / -1;
  margin: 0;
  text-align: center;
  color: var(--gold);
  font-family: "Oswald", "Barlow Condensed", sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}


/* Historikk: show ~N body rows, scroll for the rest */
.table-scroll.scroll-y-25,
.table-scroll.scroll-y-20,
.table-scroll.scroll-y-15 {
  overflow-y: auto;
  overscroll-behavior: contain;
}
.table-scroll.scroll-y-25 {
  max-height: calc(2.5rem + 25 * 2.35rem);
}
.table-scroll.scroll-y-20 {
  max-height: calc(2.5rem + 20 * 2.35rem);
}
.table-scroll.scroll-y-15 {
  max-height: calc(2.5rem + 15 * 2.35rem);
}
.table-scroll.scroll-y-25 thead th,
.table-scroll.scroll-y-20 thead th,
.table-scroll.scroll-y-15 thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--panel);
  box-shadow: 0 1px 0 rgba(215, 165, 91, 0.35);
}

.group-cards + .squad-cards {
  margin-top: 0;
  margin-bottom: 1rem;
}

/* Sortable table headers */
.full-standings th.sortable {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.full-standings th.sortable:hover,
.full-standings th.sortable:focus-visible {
  color: var(--text);
  outline: none;
}
.full-standings th.sortable:hover {
  box-shadow: inset 0 -2px 0 rgba(215, 165, 91, 0.45);
}
.full-standings th.sortable:focus-visible {
  text-decoration: underline;
  text-decoration-color: rgba(215, 165, 91, 0.7);
  text-underline-offset: 0.3em;
}
.full-standings th.sorted,
.full-standings th.sorted.num,
.full-standings th.sorted:hover {
  color: var(--gold);
  box-shadow: inset 0 -2px 0 var(--gold);
}
.full-standings th.sorted::after {
  display: inline-block;
  margin-left: 0.25em;
  font-size: 0.7em;
  vertical-align: 0.1em;
  color: var(--gold);
}
.full-standings th.sorted.desc::after { content: "▼"; }
.full-standings th.sorted.asc::after { content: "▲"; }
@media (max-width: 720px) {
  .full-standings th.sortable {
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
  }
}

.season-stats-panel {
  margin-bottom: 1.15rem;
}
.season-wiki-wrap {
  margin: 0.45rem 0 0.2rem 0;
  font-size: 0.9rem;
}
a.season-wiki-link {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
a.season-wiki-link:hover {
  color: var(--gold);
}

/* Scrollbars everywhere: navy track (not white) */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(215, 165, 91, 0.55) var(--panel);
}
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
*::-webkit-scrollbar-track {
  background: var(--panel);
}
*::-webkit-scrollbar-thumb {
  background: rgba(215, 165, 91, 0.45);
  border-radius: 8px;
  border: 2px solid var(--panel);
}
*::-webkit-scrollbar-thumb:hover {
  background: rgba(215, 165, 91, 0.7);
}
*::-webkit-scrollbar-corner {
  background: var(--panel);
}

.season-league-panel {
  margin-bottom: 1.15rem;
}
.season-league-panel h3.season-league-stage {
  margin: 0.85rem 0 0.45rem;
  font-size: 1rem;
  font-weight: 650;
  color: var(--gold);
  letter-spacing: 0.02em;
}
.season-league-panel .table-scroll + h3.season-league-stage {
  margin-top: 1.15rem;
}

.season-playoff-summary {
  margin-bottom: 1.15rem;
}
.season-playoff-summary .season-playoff-notes {
  margin: 0.35rem 0 0.15rem;
  line-height: 1.45;
}
.season-playoff-panel h2 {
  letter-spacing: 0.02em;
}

/* Sluttspill / serietabell: luft mot gullramme */
.season-playoff-panel > h3.season-league-stage,
.season-league-panel > h3.season-league-stage {
  margin-left: 1.15rem;
  margin-right: 1.15rem;
}
.season-playoff-panel .table-scroll,
.season-league-panel .table-scroll {
  padding-left: 1.15rem;
  padding-right: 1.15rem;
  box-sizing: border-box;
}
.season-playoff-panel .season-playoff-legend {
  margin-left: 1.15rem;
  margin-right: 1.15rem;
}
.season-playoff-games th:first-child,
.season-playoff-games td:first-child {
  padding-left: 0.65rem;
}

/* Sluttspill kamp-for-kamp */
.season-playoff-games td.po-res {
  font-weight: 700;
  text-align: center;
  width: 2.2rem;
}
.season-playoff-games th.po-res { text-align: center; }
.season-playoff-games td.po-periods {
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}
.season-playoff-games tr.po-win td {
  background: rgba(79, 176, 122, 0.10);
}
.season-playoff-games tr.po-win td:first-child {
  box-shadow: inset 3px 0 0 #4fb07a;
}
.season-playoff-games tr.po-win td.po-res,
.season-playoff-games tr.po-win td.pts {
  color: #7fd6a2;
}
.season-playoff-games tr.po-loss td.po-res {
  color: #e07a7a;
}
.season-playoff-games tr.po-loss td.pts {
  color: var(--text);
  font-weight: 500;
}
.season-playoff-games .season-playoff-legend {
  margin: 0.6rem 0 0;
  font-size: 0.78rem;
}

/* Incomplete-data footnotes (season / player history) — footer-like, not alarming */
.history-data-notes {
  margin: 1.1rem 0 0.4rem;
  padding: 0.85rem 1.15rem 1rem;
  border: 1px solid rgba(215, 165, 91, 0.28);
  border-radius: 10px;
  background: rgba(7, 20, 38, 0.55);
}
.history-data-notes-title {
  margin: 0 0 0.45rem;
  color: rgba(215, 165, 91, 0.78);
  font-family: "Oswald", sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.history-data-notes-list {
  margin: 0;
  padding: 0 0 0 1.05rem;
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.84rem;
  letter-spacing: 0.03em;
  line-height: 1.45;
}
.history-data-notes-list li + li { margin-top: 0.28rem; }
.history-data-notes-text {
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.88rem;
  letter-spacing: 0.03em;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

/* ============================================================
   Mobile friendliness (2026-10-06)
   Mostly media-query scoped; desktop layout unchanged.
   ============================================================ */

/* Reliable horizontal table scroll + scroll affordance */
.table-scroll {
  overscroll-behavior-x: contain;
}
.table-panel {
  /* keep scroll inside the gold card, not the page */
  min-width: 0;
}

@media (max-width: 640px) {
  /* 1) Historikk Oversikt 2×2 → stack (higher specificity than .cards.history-leaders-2) */
  .cards.history-leaders-2 {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  /* Tighter page chrome — more room for tables */
  .topbar, main, .nav, footer {
    padding-left: 0.7rem;
    padding-right: 0.7rem;
  }
  .table-panel > h2 {
    margin-left: 0.75rem;
    margin-right: 0.75rem;
  }
  .table-panel > .edit-lead {
    margin-left: 0.75rem;
    margin-right: 0.75rem;
  }
  .card { padding: 0.95rem 0.85rem 1.05rem; }

  /* Wide tables: readable type + padding */
  .full-standings {
    font-size: 0.88rem;
  }
  .full-standings th,
  .full-standings td {
    padding: 0.52rem 0.4rem;
  }
  .roster th,
  .roster td {
    padding: 0.48rem 0.32rem;
    font-size: 0.82rem;
  }

  /* Sticky name column (Navn/Spiller/Lag/Team/Sesong) while scrolling sideways.
     Case A: label is first column. Case B: # (.num) then name.
     Cap width so long names do not monopolize the viewport — stats (K/M/A/P …)
     stay visible without scrolling first. */
  .table-scroll .full-standings th.name:first-child,
  .table-scroll .full-standings td.name:first-child,
  .table-scroll .full-standings th.num:first-child + th.name,
  .table-scroll .full-standings td.num:first-child + td.name {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--panel);
    box-shadow: 4px 0 8px -4px rgba(0, 0, 0, 0.55);
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: min(8.5rem, 38vw);
    max-width: min(8.5rem, 38vw);
    min-width: 5.5rem;
    padding-left: 0.55rem;
    padding-right: 0.45rem;
  }
  /* Links inside sticky name cells must clip too (inline-flex tap targets fight ellipsis) */
  .table-scroll .full-standings td.name:first-child .history-player-link,
  .table-scroll .full-standings td.num:first-child + td.name .history-player-link,
  .table-scroll .full-standings td.name:first-child .history-season-link,
  .table-scroll .full-standings td.num:first-child + td.name .history-season-link {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    min-height: 0;
    padding: 0;
  }
  .table-scroll .full-standings tbody tr:nth-child(even) td.name:first-child,
  .table-scroll .full-standings tbody tr:nth-child(even) td.num:first-child + td.name {
    background: var(--row);
  }
  .table-scroll .full-standings tbody tr.sparta td.name:first-child,
  .table-scroll .full-standings tbody tr.sparta td.num:first-child + td.name {
    background: var(--sparta);
  }
  /* Corner: sticky thead + sticky left */
  .table-scroll .full-standings thead th.name:first-child,
  .table-scroll .full-standings thead th.num:first-child + th.name {
    z-index: 3;
    background: var(--panel);
  }

  /* Avoid nested vertical scroll traps on phone — page scroll only */
  .table-scroll.scroll-y-25,
  .table-scroll.scroll-y-20,
  .table-scroll.scroll-y-15 {
    max-height: none;
    overflow-y: visible;
  }
  .table-scroll.scroll-y-25 thead th,
  .table-scroll.scroll-y-20 thead th,
  .table-scroll.scroll-y-15 thead th {
    /* still sticky against the viewport while the table is on screen */
    position: sticky;
    top: 0;
    z-index: 2;
  }

  /* Larger tap targets on in-content links */
  .history-player-link,
  .history-season-link,
  .history-back,
  .history-mail-link,
  a.season-wiki-link {
    padding: 0.15rem 0;
    min-height: 2.5rem;
    display: inline-flex;
    align-items: center;
  }
  .history-search-list li {
    padding: 0.65rem 0;
  }
  .history-search-form input[type="search"] {
    min-height: 2.75rem;
    font-size: 1rem; /* iOS zoom-prevention */
  }

  /* Prevent accidental page-wide horizontal overflow */
  .panel, .table-panel, .cards, .view, .history-panel {
    max-width: 100%;
    min-width: 0;
  }
}

@media (max-width: 560px) {
  .topbar, main, .nav, footer {
    padding-left: 0.55rem;
    padding-right: 0.55rem;
  }
  .place-num { font-size: 5.8rem; }
  .place-label { letter-spacing: 0.22em; font-size: 1.05rem; }
  .wordmark { font-size: 1.1rem; letter-spacing: 0.04em; }
  .logo { width: 44px; height: 44px; }

  .table-scroll .full-standings th.name:first-child,
  .table-scroll .full-standings td.name:first-child,
  .table-scroll .full-standings th.num:first-child + th.name,
  .table-scroll .full-standings td.num:first-child + td.name {
    min-width: 5rem;
    width: min(7.5rem, 36vw);
    max-width: min(7.5rem, 36vw);
  }

}

@media (max-width: 380px) {
  .nav a { font-size: 0.88rem; letter-spacing: 0.05em; }
  .subnav a { padding: 0.5rem 0.85rem; font-size: 0.8rem; }
  .season { font-size: 0.72rem; padding: 0.28rem 0.55rem; }
}

/* Spillerprofil: «Kamper i andre ligaer» (Elite Prospects) — egen seksjon, teller ikke i Sparta-totaler */
.history-external-lead { margin: -0.2rem 1.15rem 0.7rem; }
.history-external-lead a { color: var(--gold); }
.history-external-span { color: var(--muted, #9aa3ad); font-size: 0.85em; white-space: nowrap; }
.history-external tr.history-external-intl td { background: rgba(215, 165, 91, 0.05); }
.history-external-details { margin: 0.6rem 0 0.2rem; }
.history-external-details > summary {
  cursor: pointer;
  padding: 0.45rem 1.15rem;
  color: var(--gold);
  font-weight: 600;
  list-style-position: inside;
}
.history-external-details[open] > summary { margin-bottom: 0.3rem; }
@media (max-width: 560px) {
  .history-external-lead { margin-left: 0.75rem; margin-right: 0.75rem; font-size: 0.85rem; }
  .history-external-details > summary { padding: 0.45rem 0.75rem; }
  .history-external-span { display: block; }
}
.history-external .full-standings th.name:first-child,
.history-external .full-standings td.name:first-child { text-align: left; }
@media (max-width: 820px) {
  /* Liganavn kan være lange («National League (Sveits)») — bryt linjen i stedet for å kutte */
  .history-external > .table-scroll .full-standings th.name:first-child,
  .history-external > .table-scroll .full-standings td.name:first-child {
    white-space: normal;
    text-overflow: clip;
    overflow-wrap: normal;
    word-break: normal;
    line-height: 1.25;
    width: min(10.5rem, 46vw);
    max-width: min(10.5rem, 46vw);
  }
  .history-external-details .full-standings td.name:not(:first-child),
  .history-external-details .full-standings th.name:not(:first-child) { white-space: nowrap; max-width: none; overflow-wrap: normal; }
  .history-external-league strong { display: block; }
}

/* Historikk · Oversikt: Kamper i NHL | Kamper i SHL (Elite Prospects) */
.history-ext-leagues .history-external-lead { margin-top: -0.2rem; }
.history-ext-league td.num:nth-child(4) { white-space: nowrap; }

/* Historikk · Oversikt: Sparta-spillere på landslaget (NIHF 1984 + Elite Prospects) */
.history-landslag td.num { white-space: nowrap; }
.history-landslag td.history-landslag-events { white-space: normal; min-width: 11rem; max-width: 16rem; line-height: 1.3; }
.history-landslag .full-standings thead th, .history-landslag .full-standings thead th .th-full { white-space: normal; line-height: 1.15; }
.history-landslag td.num span[title] { cursor: help; border-bottom: 1px dotted var(--muted, #9aa3ad); }
/* Landslag (desktop): tabellen skal passe panelet; lange celler brytes i stedet for sidescroll. */
.history-landslag .table-scroll > table { width: 100%; }
/* Andre A-landskamper (2026-10-08): tall + kort sesongliste; full liste i title */
.history-landslag td.ls-oa-col { white-space: normal; min-width: 6.5rem; max-width: 8.5rem; line-height: 1.25; }
.history-landslag th.ls-oa-col { white-space: normal; min-width: 6.5rem; max-width: 8rem; line-height: 1.15; }
.history-landslag .ls-oa { cursor: help; }
.history-landslag .ls-oa-gp { display: block; font-weight: 600; }
.history-landslag .ls-oa-detail { display: block; font-size: 0.74rem; color: var(--muted, #9aa3ad); font-weight: 400; }
.history-landslag .ls-oa-sp { color: var(--gold, #d7a55b); }
.history-landslag .ls-oa-spline { display: block; }
.history-landslag .ls-events-oa { display: block; font-size: 0.82rem; color: var(--muted, #9aa3ad); font-style: italic; }
.history-landslag .ls-footnote { margin: 0.5rem 1.15rem 0.2rem; font-size: 0.78rem; }

/* Spillerprofil: «Alle sesonger» — Sparta-rader uthevet; sesong først, lag/liga på én linje (horisontal scroll på mobil) */
.history-allseasons tr.history-allseasons-sparta td { background: rgba(215, 165, 91, 0.10); }
.history-allseasons tr.history-allseasons-sparta2 td { background: rgba(215, 165, 91, 0.04); }
.history-allseasons > .table-scroll .full-standings td.name,
.history-allseasons > .table-scroll .full-standings th.name { white-space: nowrap; }
@media (max-width: 820px) {
  .history-allseasons > .table-scroll .full-standings th.name:first-child,
  .history-allseasons > .table-scroll .full-standings td.name:first-child {
    white-space: nowrap;
    width: auto;
    max-width: none;
  }
  .history-allseasons > .table-scroll .full-standings td.name:not(:first-child),
  .history-allseasons > .table-scroll .full-standings th.name:not(:first-child) { max-width: none; overflow-wrap: normal; }
  .history-allseasons .history-external-details .full-standings th.name:first-child,
  .history-allseasons .history-external-details .full-standings td.name:first-child { white-space: normal; line-height: 1.25; }
}
.history-external-note { margin: 0.4rem 1.15rem 0.2rem; font-size: 0.85rem; }
.history-allseasons .full-standings th.name,
.history-allseasons .full-standings td.name { text-align: left; }
.history-allseasons tr.history-allseasons-sparta td:first-child { box-shadow: inset 3px 0 0 var(--gold); }

/* ============================================================
   Historikk · Oversikt på mobil (2026-10-08): landslag + NHL/AHL/SHL/KHL
   .table-fit-m = tabellen skal passe skjermbredden (ingen sidescroll / swipe-felle).
   .is-collapsed = bare de 10 første radene + «Vis alle (N)». Desktop uendret.
   ============================================================ */
.ls-events-short, .history-landslag .ls-meta, .table-toggle, .th-short, .lead-short { display: none; }
.ls-name { display: block; }
.history-landslag .ls-meta {
  font-size: 0.74rem;
  line-height: 1.25;
  color: var(--muted, #9aa3ad);
  font-weight: 400;
}
@media (max-width: 640px) {
  .table-fit-m .hide-m { display: none; }
  /* Passer bredden (Oversikt: NHL/AHL/SHL/KHL + landslag): ikke scroll-container i det hele tatt.
     overflow-x: clip lager (i motsetning til hidden/auto) ingen scroll-container, så overflow-y forblir visible. */
  .table-fit-m .table-scroll,
  .table-fit-m .table-scroll.scroll-y-15 {
    overflow-x: clip;
    overflow-y: visible;
    touch-action: pan-y pinch-zoom;
  }
  .table-fit-m .table-scroll > table {
    width: 100%;
    min-width: 0;
  }
  .table-fit-m .full-standings { font-size: 0.82rem; }
  .table-fit-m .full-standings th,
  .table-fit-m .full-standings td { padding: 0.42rem 0.28rem; }
  .table-fit-m .full-standings th { white-space: normal; line-height: 1.15; }
  .table-fit-m .full-standings th:first-child,
  .table-fit-m .full-standings td:first-child { width: 1.6rem; padding-left: 0.45rem; }
  /* Fullt navn (inntil 2 linjer) i stedet for sticky kolonne med «…» */
  .table-fit-m .table-scroll .full-standings th.num:first-child + th.name,
  .table-fit-m .table-scroll .full-standings td.num:first-child + td.name {
    position: static;
    box-shadow: none;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    width: auto;
    max-width: none;
    min-width: 0;
    padding-left: 0.3rem;
    line-height: 1.2;
  }
  .table-fit-m .table-scroll .full-standings td.num:first-child + td.name .history-player-link {
    display: inline;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    min-height: 0;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: manual;
  }
  .table-fit-m .table-scroll .full-standings td.num:first-child + td.name .history-player-link { padding: 0; }
  .history-ext-league.table-fit-m td.num:nth-child(4) { white-space: normal; }

  /* Landslag: kompakt mesterskap + meta-linje */
  .history-landslag .ls-events-full { display: none; }
  .history-landslag .ls-events-short { display: block; line-height: 1.25; }
  .history-landslag .ls-meta { display: block; margin-top: 0.15rem; }
  .history-landslag td.history-landslag-events { min-width: 0; max-width: none; width: auto; }
  .history-landslag .full-standings td.ls-name-col,
  .history-landslag .full-standings th.ls-name-col { width: 30%; }
  .table-fit-m .th-full { display: none; }
  .table-fit-m .th-short { display: inline; }
  .table-fit-m .lead-full { display: none; }
  .table-fit-m .lead-short { display: inline; }
  .history-landslag td.num { white-space: nowrap; }
  /* Andre A på mobil: bare tallet (sesonger står i meta-linja / title) */
  .history-landslag td.ls-oa-col, .history-landslag th.ls-oa-col { min-width: 0; max-width: none; width: auto; white-space: nowrap; }
  .history-landslag .ls-oa-detail { display: none; }
  .history-landslag .ls-events-oa { font-size: 0.78rem; line-height: 1.25; }

}

/* ============================================================
   Touch-scroll-felle (2026-10-08, Trond: «stopper opp ved AHL-tabellen»)
   Årsak: .scroll-y-15/20/25 har overscroll-behavior: contain (begge akser). På mobil ble max-height
   fjernet, men en tabellwrapper med overflow-x ≠ visible får alltid overflow-y: auto (CSS-regel), så
   wrapperen var fortsatt en scroll-container med overscroll-behavior-y: contain. Chrome på Android
   lenker da ikke sveipet videre til siden → siden «stopper» når fingeren treffer AHL (første tabell
   med >15 rader). Samme felle i Spillere/Målvakter/Tilskuere.
   Gjelder smal skjerm og alle berøringsenheter (hover: none + pointer: coarse). Desktop med mus uendret.
   ============================================================ */
@media (max-width: 640px), (hover: none) and (pointer: coarse) {
  /* Ingen vertikale indre scroll-containere: siden scroller; sveip lenkes alltid videre til siden. */
  .table-scroll,
  .table-scroll.scroll-y-25,
  .table-scroll.scroll-y-20,
  .table-scroll.scroll-y-15 {
    max-height: none;
    overscroll-behavior-y: auto;
  }
  /* Sammenslått visning: 10 rader + «Vis alle (N)» (Oversikt: AHL, SHL, landslag) */
  .is-collapsed .full-standings tbody tr:nth-child(n + 11) { display: none; }
  .table-toggle {
    display: block;
    margin: 0.55rem auto 0.1rem;
    min-height: 2.5rem;
    padding: 0.45rem 1.2rem;
    border: 1px solid rgba(215, 165, 91, 0.55);
    border-radius: 999px;
    background: transparent;
    color: var(--gold);
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    cursor: pointer;
  }
}

/* Lagstatistikk: spesiallag-tabell (hockey.no-kolonner). 2026-10-10 */
.special-teams th:first-child,
.special-teams td:first-child {
  width: auto;
  text-align: left;
  padding-left: 0.75rem;
  padding-right: 0.6rem;
}
.special-teams th.num,
.special-teams td.num { min-width: 2.6rem; }
.table-note {
  margin: 0.7rem 1.15rem 0.2rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}
@media (max-width: 640px) {
  .special-teams { font-size: 0.8rem; }
  .special-teams th,
  .special-teams td { padding: 0.4rem 0.24rem; }
  .special-teams th.num,
  .special-teams td.num { min-width: 0; }
  .special-teams th:first-child,
  .special-teams td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--panel, #0f1b2d);
    min-width: 0;
    max-width: 7.5rem;
    white-space: normal;
    overflow-wrap: anywhere;
    padding-left: 0.5rem;
  }
  .table-note { font-size: 0.78rem; margin-left: 0.9rem; margin-right: 0.9rem; }
}
@media (max-width: 640px) {
  .special-teams tr.sparta td:first-child { background: linear-gradient(var(--sparta), var(--sparta)), var(--panel); }
}

/* ============================================================
   Historikk · Rekorder (2026-10-11)
   Kategori-chips (sticky, sidescroll på mobil) + kortgrid. Topp 10 + «Vis alle (N)» (inntil 50) på alle skjermer.
   Ingen indre scroll-containere: kortene vokser, siden scroller.
   ============================================================ */
.rek-chips {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: 0;
  padding: 0.55rem 0 0.55rem;
  background: var(--bg);
  box-shadow: 0 6px 10px -8px rgba(0, 0, 0, 0.6);
  scroll-margin-top: 0;
}
.rek-chips a { letter-spacing: 0.06em; }
.rek-kat[hidden] { display: none; }
.rek-kat { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.rek-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr));
  gap: 1rem;
  align-items: start;
}
.rek-card { margin: 0 !important; min-width: 0; scroll-margin-top: 4.2rem; }
.rek-card > h2.rek-title { letter-spacing: 0.1em; font-size: 0.95rem; }
.rek-card .rek-anchor { color: inherit; text-decoration: none; }
.rek-card .rek-anchor:hover { color: var(--gold); }
.rek-card .rek-anchor:hover::after { content: " #"; color: var(--gold); opacity: 0.7; }
.rek-note { font-size: 0.82rem; line-height: 1.3; }
.rek-card .table-scroll { max-height: none; overflow-y: visible; }
.rek-card td.rek-extra { white-space: normal; font-size: 0.8rem; color: var(--muted, #9aa3ad); line-height: 1.25; }
.rek-card th.rek-extra { white-space: nowrap; }
.rek-collapsed .full-standings tbody tr:nth-child(n + 11) { display: none; }
.rek-toggle {
  display: block;
  margin: 0.55rem auto 0.1rem;
  min-height: 2.3rem;
  padding: 0.4rem 1.2rem;
  border: 1px solid rgba(215, 165, 91, 0.55);
  border-radius: 999px;
  background: transparent;
  color: var(--gold);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
}
.rek-toggle:hover { border-color: var(--gold); }
.rek-card.rek-target { outline: 2px solid var(--gold); outline-offset: 2px; }
.rek-more-link { margin: -0.2rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; justify-content: flex-end; }
.rek-more-link a {
  color: var(--gold);
  text-decoration: none;
  font: 500 0.9rem/1.2 "Oswald", "Barlow Condensed", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.rek-more-link a:hover { text-decoration: underline; }
@media (max-width: 640px) {
  .rek-grid { grid-template-columns: minmax(0, 1fr); }
  .rek-chips { margin: 0 -0.25rem; padding-left: 0.25rem; padding-right: 0.25rem; }
  .rek-more-link { justify-content: flex-start; }
  .rek-card .full-standings td.rek-extra { font-size: 0.74rem; }
}

/* ── Historikk · Motstandere (2026-10-11) ── */
.history-opp-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted rgba(215, 165, 91, 0.55);
}
.history-opp-link:hover { color: var(--gold); border-bottom-style: solid; }
.card-title .history-opp-link { border-bottom-width: 1px; }
.opp-search {
  width: 100%;
  max-width: 28rem;
  margin-top: 0.6rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid rgba(215, 165, 91, 0.45);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
}
.opp-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 0 1.2rem; }
.opp-item { display: flex; flex-direction: column; padding: 0.5rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.07); min-width: 0; }
.opp-item[hidden] { display: none; }
.opp-item-link { font-weight: 600; font-size: 1rem; align-self: flex-start; }
.opp-item-meta { color: var(--muted); font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.opp-item-former { color: var(--muted); font-size: 0.75rem; opacity: 0.85; }
.opp-more > summary { cursor: pointer; color: var(--gold); margin: 0.2rem 0 0.5rem; font-size: 0.9rem; }
.opp-head .opp-former { font-style: italic; }
.opp-head .opp-next { color: var(--gold); }
.opp-chips .opp-chip-sep { flex: 0 0 auto; align-self: center; color: var(--muted); padding: 0 0.1rem; }
.opp-grid { margin: 0; }
.opp-card { margin: 0 !important; min-width: 0; }
.opp-card .table-scroll { max-height: none; overflow-y: visible; }
.opp-card .opp-sub { margin: 0.5rem 1.15rem 0.4rem; }
.opp-card td.rek-extra { white-space: normal; font-size: 0.8rem; color: var(--muted, #9aa3ad); line-height: 1.25; }
.opp-card tr.opp-decade td { color: var(--muted); font-size: 0.85rem; }
.opp-collapsed .full-standings tbody tr:nth-child(n + 11) { display: none; }
.opp-form { display: flex; gap: 0.35rem; margin: 0 1.15rem 0.6rem; }
.opp-form-dot {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.7rem; height: 1.7rem; border-radius: 50%;
  font: 600 0.8rem/1 "Oswald", sans-serif; color: #111;
}
.opp-form-dot.opp-S { background: #5fbf7f; }
.opp-form-dot.opp-U { background: #c9b26b; }
.opp-form-dot.opp-T { background: #d0675f; }
.opp-card tr.po-win td:nth-child(5) { color: #5fbf7f; font-weight: 600; }
.opp-card tr.po-loss td:nth-child(5) { color: #d0675f; font-weight: 600; }
@media (max-width: 640px) {
  .opp-card .full-standings td.rek-extra { font-size: 0.74rem; }
  .opp-list { grid-template-columns: minmax(0, 1fr); }
}

/* Spillerstall (Trond 2026-10-11): alle kolonner midtstilt, unntatt Navn (venstrestilt for lesbarhet). */
#roster-full th,
#roster-full td { text-align: center; }
#roster-full th:nth-child(2),
#roster-full td:nth-child(2) { text-align: left; }

/* ── Historikk · Rekorder · Lagrekorder (2026-10-11): største seire/tap, flest mål i én kamp ── */
.rek-lag-lead { margin: 0 0.2rem; }
.rek-lag-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); }
.rek-lag-card td.rek-lag-date,
.rek-lag-card td.rek-lag-res,
.rek-lag-card td.rek-lag-ha { white-space: nowrap; }
.rek-lag-card td.rek-lag-ha, .rek-lag-card th.rek-lag-ha { text-align: center; width: 2.4rem; }
/* Dato-kolonnen står rett etter #: overstyr «navnekolonne»-regelen (td.num:first-child + td.name) som bryter linjen. */
.rek-lag-card .table-scroll .full-standings td.num:first-child + td.rek-lag-date,
.rek-lag-card.table-fit-m .table-scroll .full-standings td.num:first-child + td.rek-lag-date { white-space: nowrap; width: 1%; }
.rek-lag-card .full-standings td.rek-lag-opp { white-space: normal; line-height: 1.2; }
.rek-lag-card .table-scroll > table { width: 100%; }
.rek-lag-card .full-standings th.rek-lag-ha, .rek-lag-card .full-standings td.rek-lag-ha,
.rek-lag-card .full-standings th.rek-lag-res, .rek-lag-card .full-standings td.rek-lag-res { min-width: 0; max-width: none; }
@media (max-width: 640px) {
  .rek-lag-grid { grid-template-columns: minmax(0, 1fr); }
  .rek-lag-card .full-standings td.rek-lag-date { font-size: 0.76rem; }
  .rek-lag-card .full-standings td.rek-lag-res { font-size: 0.8rem; }
}

/* Spillersøk i toppen (2026-10-11) */
.player-search { position: relative; flex: 0 1 18rem; margin-left: auto; min-width: 0; }
.player-search input {
  width: 100%; box-sizing: border-box;
  background: var(--panel); color: #fff;
  border: 1px solid rgba(215, 165, 91, 0.45); border-radius: 999px;
  padding: 0.45rem 0.95rem; font: inherit; font-size: 0.95rem;
}
.player-search input::placeholder { color: var(--muted); }
.player-search input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 2px rgba(215, 165, 91, 0.25); }
.player-search-list {
  position: absolute; z-index: 50; top: calc(100% + 0.35rem); left: 0; right: 0;
  min-width: 17rem; max-height: min(70vh, 26rem); overflow-y: auto;
  margin: 0; padding: 0.3rem 0; list-style: none;
  background: var(--panel); border: 1px solid rgba(215, 165, 91, 0.45); border-radius: 0.6rem;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}
.player-search-item a { display: block; padding: 0.45rem 0.85rem; color: #fff; text-decoration: none; }
.player-search-item.is-active a, .player-search-item a:hover { background: var(--sparta); }
.player-search-item.is-active .player-search-name { color: var(--gold); }
.player-search-name { display: block; font-weight: 600; }
.player-search-meta { display: block; color: var(--muted); font-size: 0.8rem; }
.player-search-empty { padding: 0.5rem 0.85rem; color: var(--muted); font-size: 0.9rem; }
@media (max-width: 820px) {
  .player-search { order: 3; flex: 1 0 100%; margin-left: 0; }
  .player-search input { font-size: 16px; } /* hindrer iOS-zoom */
  .player-search-list { min-width: 0; }
  .updated { order: 4; }
}

/* Admin · Hull i arkivet (2026-10-11) */
.admin-main .edit-panel.gap-panel { max-width: none; }
.gap-panel .table-scroll { margin: 0.4rem 0 0.8rem; }
.gap-panel .table-scroll > table { width: 100%; }
.gap-panel .full-standings th { white-space: normal; line-height: 1.15; vertical-align: bottom; }
.gap-panel .full-standings td.num, .gap-panel .full-standings th.num { width: auto; min-width: 0; }
.gap-panel .gap-th-short { display: none; }
.gap-panel tr.gap-total td { font-weight: 600; border-top: 1px solid rgba(215, 165, 91, 0.45); }
.gap-panel button.gap-season { background: none; border: 0; padding: 0; margin: 0; color: var(--gold); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.gap-sub { margin: 1rem 0 0.3rem; font-size: 0.9rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.gap-sub.gap-sub-title { color: var(--gold); font-size: 1rem; }
.gap-detail td.gap-date, .gap-detail td.gap-res, .gap-detail td.gap-ha { white-space: nowrap; }
.gap-detail td.gap-what { white-space: normal; min-width: 12rem; line-height: 1.25; }
.gap-detail td.gap-opp { white-space: normal; }
.gap-what-m { display: none; }
@media (max-width: 640px) {
  .gap-panel .gap-th-full { display: none; }
  .gap-panel .gap-th-short { display: inline; }
  .gap-panel .gap-hide-m { display: none; }
  .gap-panel .full-standings td, .gap-panel .full-standings th { padding-left: 0.22rem; padding-right: 0.22rem; font-size: 0.85rem; }
  .gap-panel .table-scroll.gap-summary .full-standings td.name, .gap-panel .table-scroll.gap-summary .full-standings th.name { min-width: 2.8rem; width: 2.8rem; padding-left: 0.3rem; }
  .gap-panel .full-standings th { letter-spacing: 0.02em; }
  .gap-detail th.gap-what, .gap-detail td.gap-what, .gap-detail th.gap-ha, .gap-detail td.gap-ha { display: none; }
  .gap-detail .gap-what-m { display: block; color: var(--muted); font-size: 0.8rem; line-height: 1.25; margin-top: 0.15rem; }
}
.gap-panel .full-standings td.name, .gap-panel .full-standings th.name { text-align: left; }
.gap-panel a { color: var(--gold); }
/* Hull i arkivet · smal sesongtabell (2026-10-13) */
.gap-panel .table-scroll.gap-summary { overflow-x: visible; padding: 0 0.15rem; }
.gap-panel .table-scroll.gap-summary > table { width: auto; min-width: 0; max-width: 100%; table-layout: auto; }
.gap-panel .gap-summary .gap-th-full { display: none; }
.gap-panel .gap-summary .gap-th-short { display: inline; }
.gap-panel .gap-summary .full-standings th, .gap-panel .gap-summary .full-standings td { padding: 0.36rem 0.3rem; white-space: nowrap; }
.gap-panel .gap-summary .full-standings th.num, .gap-panel .gap-summary .full-standings td.num { text-align: center; width: 1%; min-width: 0; }
.gap-panel .gap-summary .full-standings th[title] { cursor: help; }
@media (max-width: 640px) {
  .gap-panel .gap-summary .full-standings th, .gap-panel .gap-summary .full-standings td { padding: 0.3rem 0.16rem; font-size: 0.8rem; }
  .gap-panel .gap-summary .full-standings th { font-size: 0.72rem; letter-spacing: 0; }
  .gap-panel .table-scroll.gap-summary .full-standings td.name, .gap-panel .table-scroll.gap-summary .full-standings th.name { min-width: 0; width: auto; padding-left: 0.25rem; }
}

/* Milepæler (2026-10-11) */
.ms-card .ms-list { list-style: none; margin: 0.4rem 0 0.6rem; padding: 0; }
.ms-card .ms-item { padding: 0.35rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.07); line-height: 1.3; }
.ms-card .ms-item:last-child { border-bottom: 0; }
.ms-card .ms-need { color: var(--gold); }
.ms-card .ms-reached-line { margin: 0.3rem 0 0.5rem; }
.ms-more { color: var(--gold); text-decoration: none; font-size: 0.9rem; }
.ms-more:hover { text-decoration: underline; }
.ms-full .ms-lead { padding: 0 1.15rem; }
.ms-sub { margin: 1rem 1.15rem 0.4rem; font-size: 0.95rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.ms-full td.ms-date { white-space: nowrap; }
.ms-upcoming.ms-collapsed tbody tr:nth-child(n+16) { display: none; }
.ms-upcoming .rek-toggle { margin: 0.5rem 1.15rem 0.9rem; }
@media (max-width: 640px) {
  /* Milepæler: få kolonner → hele navnet (bryt linjen) i stedet for ellipsis. */
  .ms-full .table-scroll .full-standings td.name:first-child,
  .ms-full .table-scroll .full-standings th.name:first-child { white-space: normal; text-overflow: clip; width: auto; max-width: 11rem; line-height: 1.2; }
  .ms-full .table-scroll .full-standings td.name:first-child .history-player-link { white-space: normal; text-overflow: clip; overflow: visible; display: inline; }
  .ms-full td.ms-date { font-size: 0.85rem; }
}
.ms-full td.pts { white-space: nowrap; }

/* Header-lenker (Trond 2026-10-13): logo/tittel → forsiden, sparta.no til høyre */
a.brand-link { color: inherit; text-decoration: none; }
a.brand-link:hover .wordmark, a.brand-link:focus-visible .wordmark { color: var(--gold); }
.site-link {
  flex: 0 0 auto; color: var(--gold); text-decoration: none;
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif; font-weight: 600;
  letter-spacing: 0.06em; font-size: 0.95rem;
}
.site-link:hover, .site-link:focus-visible { text-decoration: underline; }

/* Kampsider, Sesongkurve, På denne dagen (2026-10-13) */
a.kamp-link { color: inherit; text-decoration: underline; text-decoration-color: rgba(212,175,55,0.55); text-underline-offset: 2px; }
a.kamp-link:hover { color: var(--gold); }
.last-score.kamp-link { text-decoration: none; }
.kamp-head .history-back { display: inline-block; margin-bottom: 0.5rem; }
.kamp-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem 0.9rem; margin: 0.2rem 0 0.4rem; }
.kamp-score { color: var(--gold); font-size: 1.6em; font-weight: 700; }
.kamp-sources { overflow-wrap: anywhere; }
.history-data-notes-list a { color: rgba(215, 165, 91, 0.85); overflow-wrap: anywhere; }
.history-data-notes-list li { overflow-wrap: anywhere; }
.auto-notes, .kamp-notes { margin-top: 1.4rem; }
.curve-wrap { width: 100%; overflow: hidden; }
.curve-svg { width: 100%; height: auto; display: block; }
.curve-grid { stroke: rgba(255,255,255,0.12); stroke-width: 1; }
.curve-pts { fill: none; stroke: var(--gold); stroke-width: 2.5; }
.curve-rank { fill: none; stroke: rgba(255,255,255,0.55); stroke-width: 1.5; stroke-dasharray: 5 4; }
.curve-dot { stroke: var(--gold); stroke-width: 2; cursor: pointer; }
.curve-dot.is-w { fill: var(--gold); }
.curve-dot.is-l { fill: #1b1b1b; }
.curve-rdot { fill: rgba(255,255,255,0.75); }
.curve-axis, .curve-x { fill: rgba(255,255,255,0.6); font-size: 11px; }
.curve-x { text-anchor: middle; }
.curve-legend { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.curve-key::before { content: ""; display: inline-block; width: 18px; height: 0; margin-right: 0.4rem; vertical-align: middle; border-top: 2.5px solid var(--gold); }
.curve-key-rank::before { border-top: 1.5px dashed rgba(255,255,255,0.6); }
.otd-year { color: var(--gold); margin-right: 0.2rem; }

/* Forside: På denne dagen + Milepæler side om side (2026-10-13) */
.otd-ms-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: stretch; }
.otd-ms-row > .card { margin: 0; height: 100%; }
.otd-ms-row > .card[hidden] { display: none; }
.otd-ms-row:has(> .card[hidden]) { grid-template-columns: 1fr; }
@media (max-width: 760px) { .otd-ms-row { grid-template-columns: 1fr; } }
.curve-card { margin-top: 1rem; }
/* Forside: lik avstand mellom alle rader (2026-10-13) */
[data-view="oversikt"]:not([hidden]) { display: flex; flex-direction: column; gap: 1rem; }
[data-view="oversikt"] > * { margin-top: 0 !important; margin-bottom: 0 !important; }
[data-view="oversikt"] > [hidden] { display: none !important; }
.otd-list > li[hidden], .otd-more[hidden] { display: none; }
.share-btn { background: transparent; border: 1px solid var(--gold); color: var(--gold); border-radius: 999px; padding: 0.2rem 0.8rem; font: inherit; font-size: 0.85rem; cursor: pointer; margin: 0.2rem 0 0.4rem; }
.share-btn:hover { background: rgba(212,175,55,0.12); }
.share-btn { width: auto; display: inline-block; }
button.share-btn { width: auto !important; display: inline-block !important; }
button.share-btn { align-self: flex-start; justify-self: start; }
.att-chart { margin-top: 1rem; padding: 0 1rem 1rem; box-sizing: border-box; }
.att-svg { width: 100%; height: auto; display: block; }
.att-bar { fill: var(--gold); opacity: 0.85; cursor: pointer; }
.att-bar:hover { opacity: 1; }
.att-bar.is-few { opacity: 0.35; }
.att-bar.is-cur { fill: #fff; }
.att-yax { text-anchor: end; }

/* Innbyrdes oppgjør: luft mot kortkanten (2026-10-13) */
.kamp-h2h { padding-left: 1rem; padding-right: 1rem; }
.kamp-h2h .table-wrap, .kamp-h2h > div { overflow-x: auto; }

/* Luft mot kortkanter overalt (Trond 2026-10-13): tekst/tabeller skal aldri ligge inntil eller utenfor kortrammen. */
.table-panel > p, .table-panel > .card-meta, .table-panel > h3, .table-panel .attendance-foot { padding-left: 1rem; padding-right: 1rem; box-sizing: border-box; }
.table-panel table th:first-child, .table-panel table td:first-child { padding-left: .75rem; }
.table-panel table th:last-child, .table-panel table td:last-child { padding-right: .75rem; }
@media (max-width: 720px) {
  .table-panel { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* «På denne dagen» kompakt (Trond 2026-10-13): ingen kulepunkter/innrykk, linje 2 = målscorere. */
.otd-list { list-style: none; margin: 0; padding: 0; }
.otd-list > li.otd-item { margin: 0; padding: .45rem 0; line-height: 1.35; border-top: 1px solid rgba(255,255,255,.08); }
.otd-list > li.otd-item:first-child { border-top: 0; padding-top: .1rem; }
.otd-list > li.otd-item::before { content: none !important; display: none !important; }
.otd-list a { padding: 0 !important; line-height: inherit; }
.otd-scorers { font-size: .82em; color: var(--muted, #9aa7b8); line-height: 1.3; margin-top: .1rem; }
.otd-scorers a { color: inherit; }
.otd-list a, .otd-list a.history-player-link, .otd-list a.history-opp-link, .otd-list a.kamp-link { display: inline !important; min-height: 0 !important; padding: 0 !important; margin: 0 !important; border-bottom: 0 !important; line-height: inherit !important; text-decoration: underline; text-decoration-color: rgba(255,255,255,.18); text-underline-offset: 2px; }
.otd-list > li.otd-item { min-height: 0 !important; display: block !important; }

/* Smale datokolonner (dd.mm.yy), Trond 2026-10-13 */
table th.date-col, table td.date-col { white-space: nowrap !important; }
@media (max-width: 720px) { table th.date-col, table td.date-col { width: 1% !important; min-width: 0 !important; max-width: none !important; } }
@media (max-width: 720px) {
  .table-panel.table-fit-m .full-standings th:last-child, .table-panel.table-fit-m .full-standings td:last-child { padding-right: .5rem !important; }
  .table-panel.table-fit-m .full-standings th:first-child, .table-panel.table-fit-m .full-standings td:first-child { padding-left: .5rem !important; }
}
@media (max-width: 720px) { .opp-card.table-fit-m .table-scroll { overflow-x: auto; } }
table th.date-col, table td.date-col { text-align: center !important; }

@media (max-width: 720px) {
/* Kolonner tilpasses innholdet (Trond 2026-10-13): tall/korte kolonner krymper, tekstkolonnen (navn/lag/kamp) tar resten. */
table th.num, table td.num, table th.shrink-col, table td.shrink-col,
.rank-table td:last-child, .rank-table th:first-child, .stat-table td.num, .stat-table th.num,
.rek-lag-card td.rek-lag-ha, .rek-lag-card th.rek-lag-ha, .special-teams td.num {
  width: 1% !important; min-width: 0 !important; white-space: nowrap;
}
}
@media (max-width: 720px) { .table-fit-m .full-standings td:first-child { width: 1% !important; } }
.full-standings th.name:not(.shrink-col):not(.date-col), .full-standings td.name:not(.shrink-col):not(.date-col) { text-align: left; }

/* Kampside: assist-navn (Trond 2026-10-13) */
.kamp-assists { white-space: normal; }
.kamp-assists .as-item { white-space: nowrap; display: inline; }
.kamp-assists a, .kamp-assists span { display: inline !important; min-height: 0 !important; padding: 0 !important; }
.kamp-assists .nm-short { display: none !important; }
@media (max-width: 720px) {
  .kamp-assists .nm-full { display: none !important; }
  .kamp-assists .nm-short { display: inline !important; }
}
td:has(> .kamp-assists), td:has(.kamp-assists) { white-space: normal !important; width: auto !important; }
@media (max-width: 720px) { [data-view="kamp"] .hide-sm { display: none !important; } }
@media (max-width: 720px) {
/* Alle kolonner så smale som mulig, tabeller venstrestilt i kortet (Trond 2026-10-13). */
table, table.full-standings, .mini-table, .stat-table, .rank-table, .table-fit-m .table-scroll > table, .table-scroll > table {
  width: auto !important; max-width: 100%; margin-left: 0; margin-right: auto;
}
table th, table td { width: auto; }
table th.num, table td.num, table th.shrink-col, table td.shrink-col, table th.date-col, table td.date-col { width: auto !important; }
}
@media (max-width: 720px) { table, .table-scroll > table, .table-fit-m .table-scroll > table { min-width: 0 !important; } }
.otd-list > li.otd-item[hidden] { display: none !important; }
.otd-sub { font-size: .72em; color: var(--muted, #9aa7b8); letter-spacing: .04em; text-transform: none; font-weight: 400; }
/* Tabeller krymper til innholdet, luft inni kortet (Trond 2026-10-13, mobil Tilskuere). */
table th.name, table td.name, table th, table td { min-width: 0 !important; }
table td.name, table th.name { width: auto !important; }
.table-panel .table-scroll { padding-left: .6rem; padding-right: .6rem; box-sizing: border-box; }
.table-panel .table-scroll > table { margin-right: .6rem; }
@media (max-width: 480px) { .full-standings th, .full-standings td { padding-left: .26rem; padding-right: .26rem; } .full-standings th { letter-spacing: .02em; } }
@media (max-width: 720px) { table td.team-col { white-space: nowrap; } table td.team-col > a, table td.team-col > span { display: inline-block !important; max-width: 6rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; } }

/* Desktop (Trond 2026-10-13): kolonnene fordeler plassen jevnt i kortet; tall høyrejustert som før, datoer nowrap. */
@media (min-width: 721px) {
  .table-scroll > table, table.full-standings { width: 100% !important; }
  .full-standings th, .full-standings td { width: auto; }
}
@media (max-width: 720px) { table.table-fill, .table-scroll > table.table-fill, .table-fit-m .table-scroll > table.table-fill { width: 100% !important; } }
/* Sammenhengende radstriper (Trond 2026-10-13): ingen mellomrom/skygger mellom celler. */
table { border-collapse: collapse !important; border-spacing: 0 !important; }
table th, table td { border-left: 0 !important; border-right: 0 !important; }
@media (max-width: 720px) {
  .table-scroll .full-standings th.name:first-child, .table-scroll .full-standings td.name:first-child,
  .table-scroll .full-standings th.num:first-child + th.name, .table-scroll .full-standings td.num:first-child + td.name { box-shadow: none !important; }
  /* Fyllte (få-kolonne) tabeller: ingen klebrig navnekolonne/maksbredde – navnet får plassen. */
  .table-scroll .full-standings.table-fill td.name, .table-scroll .full-standings.table-fill th.name { position: static !important; max-width: none !important; width: auto !important; }
}
.history-player-link, td a { vertical-align: baseline; }
/* Navnelenke-understrek kun under selve teksten (ikke hele cellebredden). */
td a.history-player-link { display: inline-block !important; max-width: 100%; width: auto !important; }
/* Unødvendige scrollbarer (Trond 2026-10-13): margin-right + width:100% ga 10px falsk overflyt. Padding i wrapperen gir luft også ved scroll. */
.table-panel .table-scroll > table, .table-scroll > table { margin-right: 0 !important; margin-left: 0 !important; }
.table-scroll { overflow-x: auto !important; box-sizing: border-box; max-width: 100%; }
@media (max-width: 380px) { .table-panel .table-scroll { padding-left: .45rem; padding-right: .45rem; } }
/* Tilskuerlister på mobil som desktop (Trond 2026-10-13): topp 20 i fast boks, vertikal scroll for resten.
   overscroll-behavior auto => sveip lenkes videre til siden ved topp/bunn (ingen scroll-felle). */
@media (max-width: 720px), (hover: none) and (pointer: coarse) {
  .table-scroll.scroll-y-20 { overflow-y: auto !important; max-height: var(--rows20, calc(2.5rem + 20 * 2.1rem)) !important; overscroll-behavior: auto !important; touch-action: pan-x pan-y pinch-zoom; }
  .table-scroll.scroll-y-20 thead th { position: sticky; top: 0; z-index: 3; }
}
.table-scroll.scroll-y-20 { max-height: var(--rows20, calc(2.5rem + 20 * 2.35rem)); }
/* Alle scroll-bokser: nøyaktig 10 rader + sticky header, desktop og mobil (Trond 2026-10-13). Sveip lenkes videre til siden. */
.table-scroll.scroll-y-25, .table-scroll.scroll-y-20, .table-scroll.scroll-y-15,
.table-fit-m .table-scroll.scroll-y-15 { overflow-y: auto !important; max-height: var(--rows10, calc(2.5rem + 10 * 2.35rem)) !important; overscroll-behavior: auto !important; }
.table-scroll.scroll-y-25 thead th, .table-scroll.scroll-y-20 thead th, .table-scroll.scroll-y-15 thead th { position: sticky; top: 0; z-index: 3; }
/* Tilskuere-lister på mobil fyller kortet (Trond 2026-10-13): Lag tar restbredden, #/Dato/Tilsk. smale, Tilsk. høyre ved kanten. */
@media (max-width: 720px) {
  .table-scroll.scroll-y-20 > table { width: 100% !important; }
  .table-scroll.scroll-y-20 > table th:not(.team-col):not(:has(+ * )), .table-scroll.scroll-y-20 > table td:last-child { text-align: right; }
  .table-scroll.scroll-y-20 > table th, .table-scroll.scroll-y-20 > table td { width: 1%; white-space: nowrap; }
  .table-scroll.scroll-y-20 > table .team-col { width: auto !important; }
  .table-scroll.scroll-y-20 > table td.team-col > a, .table-scroll.scroll-y-20 > table td.team-col > span { max-width: 9.5rem; }
}

/* Klebrige celler arver nøyaktig radbakgrunn (Trond 2026-10-13): --rb = radens grunnfarge, --hl = evt. halvgjennomsiktig markering. */
tbody tr { --rb: var(--panel); --hl: transparent; }
tbody tr:nth-child(even) { --rb: var(--row); }
tr.sparta { --rb: var(--sparta); }
#history-root[data-mode="player"] tr.history-modern-row { --rb: var(--panel); --hl: rgba(215,165,91,.07); }
.history-external tr.history-external-intl { --rb: var(--panel); --hl: rgba(215,165,91,.05); }
.history-allseasons tr.history-allseasons-sparta { --rb: var(--panel); --hl: rgba(215,165,91,.10); }
.history-allseasons tr.history-allseasons-sparta2 { --rb: var(--panel); --hl: rgba(215,165,91,.04); }
@media (max-width: 720px), (hover: none) and (pointer: coarse) {
  .table-scroll .full-standings tbody td.name:first-child,
  .table-scroll .full-standings tbody td.num:first-child + td.name,
  .table-scroll .full-standings tbody td.num:first-child,
  .special-teams tbody td:first-child { background: linear-gradient(var(--hl), var(--hl)), var(--rb) !important; box-shadow: none !important; }
  .table-scroll .full-standings tbody tr.sparta td:first-child, .special-teams tbody tr.sparta td:first-child { box-shadow: inset 3px 0 0 var(--gold) !important; }
}
/* Sidescrollende tabeller på mobil: én linje per celle, ingen bryting/avkorting (Trond 2026-10-13). Navn følger kortnavnregelen. */
@media (max-width: 720px) {
  .table-scroll > table:not(.table-fill) th, .table-scroll > table:not(.table-fill) td { white-space: nowrap !important; }
  .table-scroll > table:not(.table-fill) td > span, .table-scroll > table:not(.table-fill) td > a:not(.history-player-link) { white-space: nowrap !important; overflow-wrap: normal !important; }
}
@media (max-width: 720px) { .nm-nowrap { white-space: nowrap !important; } }
/* Alle tabeller (desktop + mobil): én linje per celle, tabellen sidescroller i kortet ved behov (Trond 2026-10-13).
   Unntak: celler med spillernavn (kortnavnregelen på mobil tar dem). */
table th, table td { white-space: nowrap !important; }
table td * { white-space: inherit !important; }
@media (max-width: 720px) { table td:has(> a.history-player-link:only-child), table td:has(> a.history-player-link:only-child) > a:not(.nm-nowrap) { white-space: normal !important; } }
.table-scroll, .table-fit-m .table-scroll, .table-fit-m .table-scroll.scroll-y-15 { overflow-x: auto !important; }
table td:has(.kamp-assists), table td .kamp-assists, table td .history-opp-link, table td .history-season-link, table td .kamp-link { white-space: nowrap !important; }
@media (min-width: 721px) { table td .history-player-link { white-space: nowrap !important; } }
table td wbr { display: none; }
/* Scroll-wrapper innrykk + scrollbar uten høydeforskjell (Trond 2026-10-13).
   Innrykk via margin (ikke padding) => innhold klippes ved innrykket, rader går aldri inn i kortkanten.
   Tynn scrollbar; JS gir ikke-scrollende wrappere samme bunnpolstring som scrollbarens høyde => like høye kort. */
.table-panel .table-scroll { padding-left: 0 !important; padding-right: 0 !important; margin-left: .6rem; margin-right: .6rem; max-width: none !important; scrollbar-width: thin; scrollbar-color: rgba(215,165,91,.45) transparent; }
@media (max-width: 380px) { .table-panel .table-scroll { margin-left: .45rem; margin-right: .45rem; } }
.table-scroll::-webkit-scrollbar { height: 8px; }
.table-scroll::-webkit-scrollbar-thumb { background: rgba(215,165,91,.45); border-radius: 4px; }
.table-scroll::-webkit-scrollbar-track { background: transparent; }
/* Kortpar i Rekorder: like høye, tabell + «Vis alle» bunnjustert (ulik lengde på undertekst jevnes ut over tabellen). */
@media (min-width: 721px) {
  .rek-grid { align-items: stretch !important; }
  .rek-grid > .rek-card { display: flex; flex-direction: column; }
  .rek-grid > .rek-card > .table-scroll { margin-top: auto; }
}
.mini-table td.mt-name, .mini-table th.mt-name { max-width: 0; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap !important; } .mini-table td.mt-name > a { display: block; overflow: hidden; text-overflow: ellipsis; }
/* Sidescroll med finger (Trond 2026-10-13): gammel «pan-y» på .table-fit-m blokkerte horisontal sveip etter at tabellene ble scrollbare. */
.table-scroll, .table-fit-m .table-scroll, .table-fit-m .table-scroll.scroll-y-15, .table-scroll[class*=scroll-y-] { touch-action: pan-x pan-y pinch-zoom !important; -webkit-overflow-scrolling: touch; }
.history-ext-league table th:last-child, .history-ext-league table td:last-child { text-align: left !important; }

/* Motstandersammendrag (Neste kamp + kommende kampside) og Kamparkiv (Trond 2026-10-13) */
.opp-sum { margin-top: 0.9rem; padding-top: 0.75rem; border-top: 1px solid var(--line, rgba(255,255,255,0.12)); }
.opp-sum-title { margin: 0 0 0.2rem; }
.opp-sum .table-scroll { margin: 0.45rem 0; }
.opp-sum-facts { list-style: none; margin: 0.4rem 0; padding: 0; }
.opp-sum-facts li { margin: 0.15rem 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.opp-sum-k { color: var(--muted); font-size: 0.85rem; }
.opp-sum-sc { margin: 0.6rem 0 0; }
.opp-sum td .opp-form-dot, .ka-table td .opp-form-dot { width: 1.3rem; height: 1.3rem; font-size: 0.7rem; vertical-align: middle; }
.ka-panel > .ka-filters { padding: 0 1rem; box-sizing: border-box; }
.ka-panel > .ka-more { margin-left: 1rem; }
.ka-dir, .ka-clear { align-self: flex-end; }
.ka-filters { display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; align-items: flex-end; margin: 0.5rem 0 0.75rem; }
.ka-f { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.ka-l { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.ka-f select, .ka-f input { max-width: 12rem; font: inherit; font-size: 0.9rem; padding: 0.3rem 0.4rem; border-radius: 6px; border: 1px solid rgba(255,255,255,0.18); background: rgba(0,0,0,0.25); color: inherit; }
.ka-more { margin-top: 0.6rem; }
.hn-compare { margin-top: 1rem; }
.hn-compare-table td { white-space: pre-line !important; vertical-align: top; }
.hn-compare-table tr.hn-diff td:first-child { color: var(--gold, #d4af37); font-weight: 600; }
.hn-approve { margin-top: 0.6rem; }
.hn-check { display: inline-flex; gap: 0.3rem; align-items: center; margin: 0 1rem 0.4rem 0; }
@media (max-width: 640px) {
  .ka-filters { display: grid; grid-template-columns: 1fr 1fr; }
  .ka-f select, .ka-f input { max-width: none; width: 100%; box-sizing: border-box; }
  .ka-table .ka-season { display: none; }
}
.table-panel > .opp-sum { padding: 0 1rem; margin-top: 0; border-top: 0; box-sizing: border-box; }
.table-panel > .opp-sum .table-scroll { padding-left: 0; padding-right: 0; }
.opp-sum-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gap-hn { white-space: nowrap; } .hn-noid { color: var(--muted); font-size: 0.8rem; } .hn-fetch { white-space: nowrap; }
/* Hull i arkivet · sesongtabell krymper til innholdet (Trond 2026-10-13) */
.gap-panel .table-scroll.gap-summary > table.full-standings { width: auto !important; min-width: 0 !important; max-width: 100%; margin-left: 0; margin-right: auto; }
.gap-panel .gap-summary .full-standings th, .gap-panel .gap-summary .full-standings td { width: auto !important; }
.gap-panel .gap-summary .full-standings th.num, .gap-panel .gap-summary .full-standings td.num { text-align: center !important; }
/* Hull i arkivet · desktop fyller kortet, jevne kolonner; mobil smalest mulig (Trond 2026-10-13 23:20) */
@media (min-width: 721px) {
  .gap-panel .table-scroll.gap-summary > table.full-standings { width: 100% !important; table-layout: fixed; }
}

/* Historikk · Mestere (2026-10-15): sesonglister brytes, smale kolonner på mobil */
.mestere-titles { margin: 0.4rem 0 0; padding-left: 1.1rem; line-height: 1.5; }
.mestere-card .full-standings td.mestere-seas { white-space: normal; font-size: 0.86em; }
.mestere-card .table-scroll > table { width: 100%; }
@media (max-width: 640px) {
  .mestere-card .full-standings td.mestere-seas { font-size: 0.78em; line-height: 1.2; min-width: 3.4rem; }
  .mestere-card .full-standings td.mestere-seas, .mestere-card .full-standings th.mestere-seas { padding-left: 0.2rem; padding-right: 0.2rem; }
  .mestere-card .full-standings td.name a { display: inline-block; max-width: 100%; overflow-wrap: anywhere; }
  /* 2026-10-15: lange navn brytes (maks to linjer) i stedet for å presse tabellen ut av kortet. */
  .mestere-card .table-scroll .full-standings td.name, .mestere-card .table-scroll .full-standings th.name { white-space: normal !important; max-width: 8.5rem !important; }
  .mestere-card .table-scroll .full-standings td.name * { white-space: normal !important; overflow-wrap: break-word !important; max-width: 100% !important; }
}

/* Motstandere · Spesialteam (Trond 2026-10-15): tre kolonner som alltid får plass i kortet – ingen sidescroll. */
.opp-st-card .table-scroll { overflow-x: visible !important; }
.opp-st-card .table-scroll > table { width: 100% !important; min-width: 0 !important; table-layout: auto; }
.opp-st-card .table-scroll > table th, .opp-st-card .table-scroll > table td { white-space: normal !important; position: static !important; max-width: none !important; }
.opp-st-card .table-scroll > table td:first-child { white-space: nowrap !important; width: 1%; }
.opp-st-card .table-scroll > table td:last-child, .opp-st-card .table-scroll > table th:last-child { white-space: nowrap !important; width: 1%; text-align: right; }
@media (max-width: 640px) {
  .opp-st-card .table-scroll > table th, .opp-st-card .table-scroll > table td { padding-left: 0.3rem !important; padding-right: 0.3rem !important; font-size: 0.86rem; }
}

/* Spillerstall: luft mellom milepæltabellene (Trond 2026-10-15) */
.ms-full .ms-sub { margin: 28px 0 10px; }
.ms-full .ms-lead + .ms-sub { margin-top: 16px; }
#milestones-full { margin-top: 1rem; }

/* Admin besøk (Trond 2026-10-17): lange spiller-/kamptitler brytes i stedet for å flyte over tallkolonnene. */
.admin-wrap td a, .admin-wrap td a.nm-nowrap { white-space: normal !important; overflow-wrap: anywhere !important; }

/* Draktnummer-historikk (Trond 2026-10-17) */
.jersey-history { overflow-wrap: anywhere; }
.drakt-pick { margin: 0.6rem 0 0.4rem; }
.drakt-input { width: 6rem; padding: 0.4rem 0.5rem; font: inherit; background: var(--bg); color: var(--text); border: 1px solid rgba(215,165,91,0.45); border-radius: 8px; }
.drakt-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.4rem; }
.drakt-chip { min-width: 2.2rem; text-align: center; padding: 0.25rem 0.35rem; border: 1px solid rgba(215,165,91,0.35); border-radius: 6px; color: var(--text); text-decoration: none; font-variant-numeric: tabular-nums; }
.drakt-chip.active, .drakt-chip:hover { background: var(--gold); color: var(--bg); }
.drakt-card td.drakt-seas, .drakt-card td { overflow-wrap: anywhere; }
.drakt-card td.drakt-seas, .drakt-card th.drakt-seas { white-space: normal !important; overflow-wrap: anywhere; min-width: 0 !important; }
@media (max-width: 720px) { .drakt-card td.name a.history-player-link { white-space: normal !important; } }
