:root {
  --green: #0f6b3f;
  --green-dark: #0b5331;
  --bg: #f3f5f4;
  --card: #ffffff;
  --text: #17201b;
  --muted: #667069;
  --line: #e2e6e3;
  --win: #1f9d55;
  --draw: #9aa39d;
  --loss: #d9484a;
  --accent: #e0b400;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 4px 14px rgba(0,0,0,.05);
  --sticker-bg: #e8efe9; --sticker-fg: #2b4a38;
  --girls-sticker-bg: #f8d7e0; --girls-sticker-fg: #8a2b47;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101513; --card: #1a211d; --text: #eef2ef; --muted: #98a39c; --line: #2a332e;
    --shadow: 0 1px 2px rgba(0,0,0,.4);
    --sticker-bg: #25312a; --sticker-fg: #b9cfc1; --girls-sticker-bg: #4a2432; --girls-sticker-fg: #f1b4c6;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overscroll-behavior-y: contain; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
}
button { font: inherit; color: inherit; }
a { color: var(--green); }

.top {
  position: sticky; top: 0; z-index: 5; background: var(--green); color: #fff;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px; display: flex; align-items: center; justify-content: space-between;
}
.top h1 { margin: 0; font-size: 20px; display: flex; align-items: center; gap: 8px; }
.top-title { min-width: 0; }
.tagline { margin: 2px 0 0; font-size: 12.5px; line-height: 1.25; color: rgba(255,255,255,.82); }
.tagline[hidden] { display: none; }
.top h1 .top-logo { width: 46px; height: 46px; border-radius: 11px; overflow: hidden; flex: none; display: block; }   /* ikonet beskåret lidt, så bolden fylder mere */
.top h1 .top-logo img { display: block; width: 60px; height: 60px; margin: -7px; max-width: none; }
.top-actions { display: flex; gap: 6px; }
.icon-btn {
  background: rgba(255,255,255,.16); border: 0; color: #fff; width: 40px; height: 40px; border-radius: 10px;
  font-size: 22px; line-height: 1; cursor: pointer;
}
.icon-btn:active { background: rgba(255,255,255,.3); }
.icon-btn.bell, .icon-btn.gear { display: inline-grid; place-items: center; }
.icon-btn.gear svg { fill: rgba(255,255,255,.85); }
.icon-btn.gear.is-on { background: var(--accent); }
.icon-btn.gear.is-on svg { fill: #2b2300; }
.icon-btn.bell svg { fill: rgba(255,255,255,.45); transition: fill .2s; }
.icon-btn.bell.is-on svg { fill: var(--accent); filter: drop-shadow(0 0 3px rgba(224,180,0,.45)); }


.tabs { display: flex; background: var(--green); padding: 0 16px; gap: 4px; }
.tab {
  flex: 1; background: transparent; border: 0; color: rgba(255,255,255,.75); padding: 10px 0 12px;
  font-weight: 600; border-bottom: 3px solid transparent; cursor: pointer;
}
.tab.is-active { color: #fff; border-bottom-color: var(--accent); }

main { padding: 12px 16px 96px; max-width: 640px; margin: 0 auto; }
.view[hidden] { display: none; }

.status { max-width: 640px; margin: 0 auto; padding: 0 16px 16px; color: var(--muted); font-size: 13px; text-align: center; }
.muted { color: var(--muted); }
.error { color: var(--loss); font-size: 14px; }

/* ---------- kort ---------- */
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 14px 10px;
  margin-bottom: 12px; cursor: pointer;
}
.card:active { transform: scale(.995); }
.card-head { display: flex; align-items: center; gap: 10px; }
.logo { width: 40px; height: 40px; border-radius: 50%; object-fit: contain; background: #fff; border: 1px solid var(--line); flex: none; }
.logo.placeholder { display: grid; place-items: center; color: var(--muted); font-weight: 700; }
.card-title { flex: 1; min-width: 0; }
.card-title .name { font-weight: 700; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-title .row { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.chip { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.chip.pokal { background: #fff6cc; color: #6b5600; border-color: #f0dd8a; }
.chip.pokal.ude { background: #f5e3e3; color: #7a2b2b; border-color: #e6bcbc; }
@media (prefers-color-scheme: dark) {
  .chip.pokal { background: #3a3210; color: #f0dd8a; border-color: #5c4f16; }
  .chip.pokal.ude { background: #3a1d1d; color: #f0a8a8; border-color: #5c2e2e; }
}

.position { display: flex; align-items: center; gap: 12px; margin: 12px 0 6px; }
.pos-big { font-size: 30px; font-weight: 800; line-height: 1; color: var(--green); white-space: nowrap; flex: none; }
.pos-big small { font-size: 13px; font-weight: 600; color: var(--muted); }
.pos-detail { font-size: 13px; color: var(--muted); line-height: 1.35; min-width: 0; }
.form { display: flex; gap: 4px; margin-left: auto; }
.dot { width: 14px; height: 14px; border-radius: 50%; background: var(--draw); }
.dot.V { background: var(--win); } .dot.T { background: var(--loss); }

.section-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 10px 0 4px; font-weight: 700; }
/* Kampkasse (som bold.dk): hvid header med kontekst til venstre og spillested til højre, derunder kamprækken med grå tidskolonne */
.mcard { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--card); margin: 6px 0; }
.mhead { display: flex; align-items: center; gap: 8px; min-height: 30px; padding: 4px 10px; border-bottom: 1px solid var(--line); font-size: 12px; }
/* Kontekst og spillested deler pladsen: begge kan krympe, men nålen og lidt af stedet er altid synlige */
.mhead .ctx { display: flex; align-items: center; gap: 4px; flex: 0 1 auto; min-width: 0; overflow: hidden; }
.mhead .ctx .sticker { display: inline-block; line-height: 20px; flex: none; white-space: nowrap; }
.mhead .ctx .sticker:last-child { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }   /* kun det sidste (lange) mærkat forkortes */
.mhead .ctx .section-label { margin: 0; }
.mhead .ctx .date { font-weight: 600; }
.mhead .ctx .tag { margin-left: 2px; }
.mhead .venue { margin-left: auto; display: flex; align-items: center; justify-content: flex-end; gap: 4px; flex: 0 1 auto; min-width: 88px; color: var(--muted); }
.mhead .venue .vn { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mhead .venue a.pin { flex: none; text-decoration: none; padding: 2px 0 2px 2px; }
.mhead .ical { flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; margin: -3px 0 -3px auto; border-radius: 6px; color: var(--green); }
.mhead .ical + .venue { margin-left: 0; }
.mhead .ical svg { width: 17px; height: 17px; fill: currentColor; }
.mhead .ical:active { background: var(--bg); }
.match { display: grid; grid-template-columns: 78px 30px 1fr; gap: 0; align-items: stretch; font-size: 14px; }
/* Kamprækken åbner kampsiden i app'en */
.match.link { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.match.link:active { background: var(--bg); }
.match .when { background: var(--bg); padding: 8px 2px; white-space: nowrap; }
.match .score { margin: 6px 0 6px 8px; }
.match .teams { padding: 6px 10px; }
.match .when { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; color: var(--muted); font-size: 11.5px; line-height: 1.3; }
.match .when span:last-child:not(:only-child) { color: var(--text); font-weight: 600; font-size: 13px; }
.match.live .when { background: var(--win); color: #fff; }
.match.live .when b { font-size: 16px; font-weight: 800; }
.match.live .when span { color: #fff; font-weight: 500; font-size: 11px; }
.match .score { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2px; background: var(--bg); border-radius: 6px; font-weight: 700; font-size: 14px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.score.V { background: rgba(31,157,85,.14); color: var(--win); }
.score.U { background: rgba(154,163,157,.18); color: var(--muted); }
.score.T { background: rgba(217,72,74,.12); color: var(--loss); }
.score.tbd { color: var(--muted); font-weight: 500; }
.match.na .score.tbd { background: transparent; }
.match .teams { min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.match .tl { display: flex; align-items: center; min-width: 0; line-height: 1.3; }
.match .tl .tn { min-width: 0; flex: 0 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.match .tl.won { font-weight: 700; }
.match .tl.mine .tn { color: var(--green); }
.match .tl .tag { flex: none; margin-left: 6px; }
.match .tl .tt { flex: none; margin-left: 6px; font-size: 14px; letter-spacing: -1px; line-height: 1; }
.ha { font-size: 11px; color: var(--muted); font-weight: 600; margin-left: 4px; }
.tag { font-size: 10px; text-transform: uppercase; font-weight: 700; color: #6b5600; background: #fff6cc; border-radius: 4px; padding: 1px 4px; margin-left: 4px; vertical-align: middle; }
@media (prefers-color-scheme: dark) { .tag { background: #3a3210; color: #f0dd8a; } }

.card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 12px; color: var(--muted); }
.card-foot .tools { display: flex; gap: 2px; }
.tool { background: transparent; border: 0; color: var(--muted); padding: 4px 6px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.tool:active { background: var(--bg); }
.card.is-error { border: 1px solid #e6bcbc; }
.card .warn { font-size: 13px; color: var(--loss); margin-top: 8px; }
.card .over { font-size: 13px; color: var(--muted); margin-top: 8px; font-style: italic; }

.skeleton { height: 150px; border-radius: var(--radius); background: linear-gradient(90deg, var(--card), var(--line), var(--card)); background-size: 200% 100%; animation: sk 1.2s infinite; margin-bottom: 12px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- tom tilstand ---------- */
.empty { text-align: center; padding: 40px 12px; color: var(--muted); }
.empty h2 { color: var(--text); font-size: 20px; margin: 0 0 8px; }
.btn-primary, .btn-secondary { border: 0; border-radius: 10px; padding: 11px 18px; font-weight: 600; cursor: pointer; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:disabled { opacity: .6; }
.btn-primary.btn-danger { background: var(--loss); }
.btn-primary.btn-danger:active { background: #b53a3c; }
.btn-secondary { background: var(--bg); color: var(--text); border: 1px solid var(--line); }
.empty .btn-primary { margin-top: 12px; }

/* ---------- kalender ---------- */
.day { margin-bottom: 14px; }
.day h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 6px; }
/* "I dag" fremhæves: grøn etiket og grøn kant om dagens kampe */
.day.today { padding: 2px 0 2px 10px; border-left: 4px solid var(--green); margin-left: -2px; }
.day h3.today { display: inline-block; background: var(--green); color: #fff; padding: 4px 11px; border-radius: 999px; letter-spacing: .04em; margin-bottom: 8px; }
.day.today .mcard { border-color: var(--green); }
.day .list { display: grid; gap: 8px; }
.day .mcard { margin: 0; box-shadow: var(--shadow); }

/* ---------- holdside ---------- */
.back { background: transparent; border: 0; color: var(--green); font-weight: 600; padding: 6px 0 10px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
/* Holdvælger på fanen Stilling */
.team-chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.team-chips::-webkit-scrollbar { display: none; }
.team-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 5px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.team-chip .logo { width: 24px; height: 24px; }
.team-chip.is-active { background: var(--green); border-color: var(--green); color: #fff; }
.tournament { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px; margin-bottom: 14px; }
.tournament h3 { margin: 0 0 2px; font-size: 16px; }
.tournament .sub { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.tournament .sub a { margin-left: 6px; }
table.standings { width: 100%; border-collapse: collapse; font-size: 13px; margin: 6px 0 10px; }
.standings th, .standings td { padding: 5px 3px; text-align: right; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.standings th { color: var(--muted); font-weight: 600; font-size: 11px; border-top: 0; }
.standings td.team, .standings th.team { text-align: left; max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.standings tr.me td { background: rgba(15,107,63,.1); font-weight: 700; }
.standings td.pts { font-weight: 700; }
.standings .mv { font-size: 8px; margin-left: 2px; vertical-align: 1px; }   /* pil: ændring siden seneste spilledag */
.standings .mv.up { color: var(--win); }
.standings .mv.down { color: var(--loss); }
.standings tr.line-solid td { border-bottom: 2px solid var(--loss); }     /* op-/nedrykningsgrænse som på dbu.dk */
.standings tr.line-dashed td { border-bottom: 2px dashed var(--loss); }
.seg.tbl { margin: 0 0 8px; }
.union-line { font-size: 12px; color: var(--muted); margin: 6px 0 10px; }   /* puljens union(er) og bestemmelser */
.union-line a { font-weight: 600; }
.standings tr.line-solid + tr td, .standings tr.line-dashed + tr td { border-top: 0; }
.detach-line { margin: -4px 0 8px; font-size: 12px; }
.detach-line .detach { color: var(--muted); }
.suggestions { border: 1px dashed var(--line); box-shadow: none; }
.suggestion { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.suggestion .who { flex: 1; min-width: 0; }
.suggestion .opp { white-space: normal; }
.btn-secondary.small { padding: 7px 12px; font-size: 13px; white-space: nowrap; }
.btn-cta { border: 0; border-radius: 10px; padding: 11px 18px; font-weight: 700; cursor: pointer; background: var(--accent); color: #2b2300; }   /* gul call-to-action: Følg */
.btn-cta.small { padding: 7px 12px; font-size: 13px; white-space: nowrap; }
.btn-cta:active { filter: brightness(.94); }
.follow-full { display: block; width: 100%; margin: 0 0 12px; font-size: 15px; }
.follow-full:disabled { opacity: .7; cursor: default; }
.choices .pick { display: flex; align-items: center; gap: 6px; border-top: 1px solid var(--line); padding: 8px 10px 8px 12px; }
.choices .pick:first-child { border-top: 0; }
.choices .pick .who { flex: 1; min-width: 0; }
/* .choices button (fuld bredde, gennemsigtig) må ikke ramme knapperne i rækken */
.choices .pick button { display: inline-block; width: auto; flex: none; text-align: center; border-top: 0; }
.choices .pick .btn-secondary { background: var(--bg); border: 1px solid var(--line); }
.choices .pick .btn-cta { background: var(--accent); }
.choices .pick .btn-secondary:disabled { opacity: .6; cursor: default; }

/* ---------- tilføj-panel (eget overlay; <dialog> driller på iOS) ---------- */
.sheet { position: fixed; inset: 0; z-index: 20; display: flex; align-items: flex-start; justify-content: center; padding: calc(12px + env(safe-area-inset-top)) 12px 12px; overflow: auto; -webkit-overflow-scrolling: touch; }
.sheet[hidden] { display: none; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.sheet-panel { position: relative; width: min(100%, 460px); background: var(--card); color: var(--text); border-radius: 16px; padding: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.3); margin-top: 8px; }
.sheet h2 { margin: 0 0 6px; font-size: 19px; }
.sheet p { margin: 0 0 12px; font-size: 14px; }
.input-row { display: flex; gap: 8px; }
.input-row input { flex: 1; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 16px; background: var(--bg); color: var(--text); }
.input-row .btn-secondary { padding: 0 12px; white-space: nowrap; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.choices { margin-top: 10px; max-height: 45vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.choices button { display: block; width: 100%; text-align: left; background: transparent; border: 0; border-top: 1px solid var(--line); padding: 10px 12px; cursor: pointer; }
.choices button:first-child { border-top: 0; }
.choices button:active { background: var(--bg); }
.choices .row { display: block; font-size: 12px; color: var(--muted); }
body.sheet-open { overflow: hidden; }
.sheet h3 { margin: 2px 0 8px; font-size: 16px; }
.sheet .back { padding: 0 0 6px; }
.sheet #add-clubs, .sheet #add-teams { margin-top: 10px; }
.choice-note { padding: 10px 12px; font-size: 13px; color: var(--muted); }
.fchips { display: flex; gap: 6px; overflow-x: auto; padding: 0 0 8px; margin: 0 -18px; padding-left: 18px; padding-right: 18px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.fchips::-webkit-scrollbar { display: none; }
.fchips:empty { display: none; }
.fchip { flex: none; border: 1px solid var(--line); background: var(--bg); color: var(--text); border-radius: 999px; padding: 6px 12px; font-size: 14px; font-weight: 600; cursor: pointer; }
.fchip.is-on { background: var(--green); border-color: var(--green); color: #fff; }
.sheet details { margin-top: 16px; font-size: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.sheet summary { cursor: pointer; color: var(--green); font-weight: 600; }
.sheet details p { margin-top: 10px; }
.sheet details #add-submit { margin-top: 10px; }

/* ---------- kom godt i gang ---------- */
.card.guide { cursor: default; }
.guide-head { display: flex; justify-content: space-between; align-items: center; }
.guide-head h3 { margin: 0; font-size: 17px; }
.guide-intro { margin: 6px 0 2px; font-size: 14px; color: var(--muted); line-height: 1.4; }
.steps { list-style: none; margin: 8px 0 0; padding: 0; }
.step { display: grid; grid-template-columns: 26px 1fr 72px; gap: 10px; align-items: start; padding: 10px 0; border-top: 1px solid var(--line); }
.step:first-child { border-top: 0; }
.step-num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.step.is-open .step-num { background: var(--green); color: #fff; border-color: var(--green); }
.step.is-done .step-num { background: var(--win); color: #fff; border-color: var(--win); }
.step-body { min-width: 0; padding-top: 3px; }
.step-title { font-weight: 700; font-size: 15px; }
.step.is-done .step-title, .step.is-locked .step-title { color: var(--muted); font-weight: 600; }
.step-text { font-size: 13px; color: var(--muted); margin-top: 3px; line-height: 1.35; }
.step.is-done .step-text { display: none; }
.step-actions { margin-top: 8px; }
.step-actions .btn-primary, .step-actions .btn-secondary { padding: 8px 14px; font-size: 14px; }
.step.is-done .step-actions { margin-top: 6px; }
.guide-foot { display: flex; justify-content: flex-end; margin-top: 6px; }
.guide-foot .btn-secondary { padding: 8px 14px; font-size: 14px; }
/* fremdriftslinje (tre trin) + det aktuelle trin */
.strip { list-style: none; display: flex; gap: 6px; margin: 10px 0 2px; padding: 0; }
.strip li { flex: 1; display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); font-size: 12px; color: var(--muted); cursor: pointer; min-width: 0; }
.strip li.is-open { border-color: var(--green); color: var(--text); font-weight: 600; }
.strip li.is-done { color: var(--win); cursor: default; flex: 0 1 auto; }   /* klarede trin fylder kun deres tekst; det åbne får pladsen */
.strip li.is-open { flex: 1.4; }
.strip-num { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--card); border: 1px solid var(--line); flex: none; }
.strip li.is-open .strip-num { background: var(--green); color: #fff; border-color: var(--green); }
.strip li.is-done .strip-num { background: var(--win); color: #fff; border-color: var(--win); }
.strip-lab { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step.focus { grid-template-columns: 1fr 72px; border-top: 0; padding: 8px 0 2px; }
.step.focus .step-title { font-size: 16px; }
/* velkomstsiden: hjemmeskærmen først */
.welcome { position: fixed; inset: 0; z-index: 60; background: var(--green); color: #fff; overflow: auto; padding: max(24px, env(safe-area-inset-top)) 20px 24px; display: flex; align-items: center; justify-content: center; }
body.welcome-open { overflow: hidden; }
.w-box { max-width: 380px; width: 100%; text-align: center; }
.w-logo img { width: 84px; height: 84px; border-radius: 20px; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.welcome h2 { font-size: 24px; margin: 18px 0 8px; line-height: 1.15; }
.w-sub { font-size: 15px; opacity: .9; margin: 0 0 18px; line-height: 1.4; }
.w-art { width: 144px; height: 176px; margin: 0 auto 14px; border-radius: 16px; background: rgba(255,255,255,.14); overflow: hidden; }
.w-art .art { width: 100%; height: 100%; display: block; }
.w-steps { text-align: left; margin: 0 auto 16px; padding: 0 0 0 26px; font-size: 16px; line-height: 1.5; max-width: 320px; }
.w-steps li { margin: 6px 0; }
.w-inapp { font-size: 16px; line-height: 1.45; margin: 0 0 16px; }
.btn-primary.big { font-size: 17px; padding: 14px 26px; background: var(--accent); color: #2b2300; }
.w-later { background: transparent; border: 0; color: rgba(255,255,255,.85); text-decoration: underline; font: inherit; font-size: 14px; margin-top: 16px; cursor: pointer; }
/* klokken: pulserende ring og prik, indtil beskeder er slået til; boble første gang de kan slås til */
.icon-btn.bell { position: relative; }
.icon-btn.bell:not(.is-on)::before { content: ''; position: absolute; inset: 0; border-radius: inherit; border: 2px solid var(--accent); opacity: 0; animation: bellring 2.4s ease-out infinite; pointer-events: none; }
.icon-btn.bell:not(.is-on)::after { content: ''; position: absolute; top: 5px; right: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
@keyframes bellring { 0% { transform: scale(.8); opacity: .9; } 70%, 100% { transform: scale(1.5); opacity: 0; } }
.bell-tip { position: fixed; top: 62px; right: 12px; z-index: 50; background: var(--accent); color: #2b2300; font-weight: 600; font-size: 13px; padding: 8px 12px; border-radius: 10px; box-shadow: 0 6px 18px rgba(0,0,0,.2); cursor: pointer; animation: tipin .3s ease-out; }
.bell-tip::before { content: ''; position: absolute; top: -6px; right: 22px; border: 6px solid transparent; border-top: 0; border-bottom-color: var(--accent); }
@keyframes tipin { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* illustrationer (inline SVG, farver fra temaet) */
.step-art { width: 72px; height: 88px; border-radius: 10px; background: var(--bg); overflow: hidden; }
.step.is-done .step-art, .step.is-locked .step-art { opacity: .5; }
.art { width: 100%; height: 100%; display: block; }
.a-phone { fill: var(--card); stroke: var(--line); stroke-width: 1.5; }
.a-bar { fill: var(--green); }
.a-card { fill: var(--bg); stroke: var(--line); stroke-width: 1; }
.a-logo { fill: var(--green); opacity: .8; }
.a-line { fill: var(--text); opacity: .55; }
.a-faint { opacity: .22; }
.a-pos { font: 700 11px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; fill: var(--green); }
.a-score { fill: rgba(31,157,85,.28); }
.a-dots circle { fill: var(--win); transform-box: fill-box; transform-origin: center; }
.a-dots circle:nth-child(3) { fill: var(--loss); }
.a-dots circle:nth-child(4) { fill: var(--draw); }
.a-share path { fill: none; stroke: var(--green); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.a-sheet > rect:first-child { fill: var(--card); stroke: var(--line); stroke-width: 1.5; }
.a-handle { fill: var(--line); }
.a-row > rect:first-child { fill: var(--bg); }
.a-plusbox { fill: none; stroke: var(--text); stroke-width: 1.2; opacity: .7; }
.a-plus { fill: none; stroke: var(--text); stroke-width: 1.2; stroke-linecap: round; opacity: .7; }
.a-finger { fill: rgba(224,180,0,.8); transform-box: fill-box; transform-origin: center; opacity: 0; }
.a-sheet { transform: translateY(46px); }
.a-btn { fill: var(--green); }
.a-btn-text { fill: #fff; }
.a-appicon { fill: var(--green); transform-box: fill-box; transform-origin: center; transform: scale(0); }
.a-appicon-ball { fill: #fff; transform-box: fill-box; transform-origin: center; transform: scale(0); }
.a-banner { transform: translateY(-34px); }
.a-banner > rect:first-child { fill: var(--card); stroke: var(--line); stroke-width: 1.2; }
.a-bell path { fill: var(--draw); transform-box: fill-box; transform-origin: 50% 8%; }
.step.is-done .a-bell path { fill: var(--accent); }

.step.is-open .a-dots circle { animation: pop 4s ease-out infinite; }
.step.is-open .a-dots circle:nth-child(2) { animation-delay: .3s; }
.step.is-open .a-dots circle:nth-child(3) { animation-delay: .6s; }
.step.is-open .a-dots circle:nth-child(4) { animation-delay: .9s; }
.step.is-open .a-finger { animation: tap 6s ease-in-out infinite; }
.step.is-open .a-finger-5 { animation-duration: 5s; }
.step.is-open .a-sheet { animation: sheet 6s ease-in-out infinite; }
.step.is-open .a-row1 > rect:first-child { animation: rowhl 6s infinite; }
.step.is-open .a-appicon, .step.is-open .a-appicon-ball { animation: appicon 5s ease-out infinite; }
.step.is-open .a-bell path { animation: ring 6s ease-in-out infinite; }
.step.is-open .a-banner { animation: banner 6s ease-out infinite; }
@keyframes pop { 0% { transform: scale(0); } 8% { transform: scale(1.3); } 12%, 100% { transform: scale(1); } }
@keyframes tap { 0% { opacity: 0; transform: translateY(8px); } 8% { opacity: 1; transform: translateY(0); } 14% { transform: scale(.7); } 20%, 100% { opacity: 0; transform: scale(1); } }
@keyframes sheet { 0%, 18% { transform: translateY(46px); } 30%, 85% { transform: translateY(0); } 100% { transform: translateY(46px); } }
@keyframes rowhl { 0%, 45% { fill: var(--bg); } 55%, 80% { fill: #fff0b3; } 90%, 100% { fill: var(--bg); } }
@keyframes appicon { 0%, 28% { transform: scale(0); } 38% { transform: scale(1.2); } 44%, 90% { transform: scale(1); } 100% { transform: scale(0); } }
@keyframes ring { 0%, 30% { fill: var(--draw); transform: rotate(0); } 36% { transform: rotate(16deg); fill: var(--accent); } 40% { transform: rotate(-13deg); } 44% { transform: rotate(10deg); } 48% { transform: rotate(-6deg); } 52%, 100% { transform: rotate(0); fill: var(--accent); } }
@keyframes banner { 0%, 52% { transform: translateY(-34px); } 60%, 90% { transform: translateY(0); } 100% { transform: translateY(-34px); } }

/* klokken i toppen "nudger" med jævne mellemrum, indtil beskeder er slået til */
.icon-btn.bell:not(.is-on) svg { transform-origin: 50% 12%; animation: nudge 8s ease-in-out infinite; }
@keyframes nudge { 0%, 86%, 100% { transform: rotate(0); } 88% { transform: rotate(16deg); } 90% { transform: rotate(-13deg); } 92% { transform: rotate(10deg); } 94% { transform: rotate(-7deg); } 96% { transform: rotate(4deg); } 98% { transform: rotate(-2deg); } }

@media (prefers-reduced-motion: reduce) {
  .icon-btn.bell svg, .art * { animation: none !important; }
  .a-sheet, .a-banner { transform: none; }
  .a-appicon, .a-appicon-ball { transform: scale(1); }
}

/* ---------- forside: ét kort pr. klub, kompakte holdrækker ---------- */
.club { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 12px; overflow: hidden; }
.club-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px 8px; }
.club-head .logo { width: 34px; height: 34px; }
.club-head .name { font-weight: 700; font-size: 16px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-row { padding: 10px 14px 12px; border-top: 1px solid var(--line); cursor: pointer; }
.team-row + .team-row { border-top: 8px solid var(--bg); }   /* gråt bånd mellem klubbens hold, så hvert hold står som sin egen blok */
.team-row:active { background: var(--bg); }
.team-row.is-error { box-shadow: inset 3px 0 0 var(--loss); }
.team-line { display: flex; align-items: center; gap: 8px; }
.team-line .stickers { flex: 1; min-width: 0; margin: 0; }
.team-line .form { margin-left: 0; }
.team-line .dot { width: 9px; height: 9px; }
.team-line .tools, .club-head .tools { display: flex; gap: 2px; }
.pos { font-weight: 800; color: var(--green); font-size: 17px; white-space: nowrap; font-variant-numeric: tabular-nums; flex: none; }
.pos small { font-weight: 600; color: var(--muted); font-size: 12px; }
.stickers { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.sticker { display: inline-flex; align-items: center; height: 20px; box-sizing: border-box; font-size: 11px; font-weight: 700; letter-spacing: .02em; padding: 0 7px; border-radius: 5px; background: var(--sticker-bg); color: var(--sticker-fg); line-height: 1; }
.sticker.girls { background: var(--girls-sticker-bg); color: var(--girls-sticker-fg); }
.sticker.pokal { padding: 0 5px; }
.sticker.pokal svg { width: 14px; height: 14px; fill: currentColor; display: block; }
.sticker.pokal .strike { stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; display: none; }
.sticker.pokal.in { background: rgba(31,157,85,.16); color: var(--win); }
.sticker.pokal.ude { background: rgba(217,72,74,.14); color: var(--loss); }
.sticker.pokal.ude .strike { display: block; }
.team-name { color: var(--muted); font-size: 13px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-row .mcard { margin: 8px 0 0; }
.match.na .tl { color: var(--muted); }
.team-row .warn { margin-top: 6px; font-size: 13px; color: var(--loss); }
.team-row .skeleton { margin: 0; }
/* Redigeringstilstand (tandhjul): fast bjælke lige under toppen */
.edit-bar { position: sticky; top: calc(var(--top-h, 64px) + 8px); z-index: 4; display: flex; justify-content: space-between; align-items: center; gap: 10px;
  margin: 0 0 10px; padding: 8px 10px 8px 14px; border-radius: 12px; background: var(--accent); color: #2b2300; font-size: 13px; font-weight: 600; box-shadow: var(--shadow); }
.edit-bar .btn-primary.small { flex: none; }
.tool.x { color: var(--loss); }
.btn-primary.small { padding: 7px 12px; font-size: 13px; white-space: nowrap; }
.share-choices { display: grid; gap: 8px; margin-top: 4px; }
.share-choices button { width: 100%; }

/* ---------- flydende knap: fejl eller idé ---------- */
.fab { position: fixed; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 6; width: 52px; height: 52px; border-radius: 50%; border: 0;
  background: var(--green); box-shadow: 0 4px 14px rgba(0,0,0,.28); display: grid; place-items: center; cursor: pointer; }
.fab svg { width: 26px; height: 26px; fill: #fff; }
.fab:active { background: var(--green-dark); }
.fab.add { background: var(--accent); }           /* find hold (se eller følg): den vigtigste handling, derfor gul og yderst til højre */
.fab.add svg { fill: #2b2300; width: 32px; height: 32px; }
.fab.add:active { background: #c9a200; }
.fab.bulb { left: 16px; right: auto; width: 46px; height: 46px; bottom: calc(21px + env(safe-area-inset-bottom)); }   /* fejl og idéer: nederst til venstre */
.fab.bulb { background: var(--card); color: var(--muted); border: 1px solid var(--line); box-shadow: 0 2px 8px rgba(0,0,0,.12); }   /* dæmpet: hvid med grå pære */
.fab.bulb:active { background: var(--bg); }
.fab.bulb svg { width: 23px; height: 23px; fill: var(--muted); }
.fab.ask { right: 80px; width: auto; padding: 0 16px 0 12px; border-radius: 26px; display: inline-flex; align-items: center; gap: 7px; color: #fff; font: inherit; font-size: 15px; font-weight: 700; }
.fab.ask svg { width: 26px; height: 26px; }
.ask-card { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: var(--radius); padding: 11px 12px 11px 12px; margin: 6px 0 12px; cursor: pointer; box-shadow: var(--shadow); -webkit-tap-highlight-color: transparent; }
.ask-card:active { background: var(--bg); }
.ask-card .ic { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--green); display: grid; place-items: center; }
.ask-card .ic svg { width: 24px; height: 24px; fill: #fff; }
.ask-card .tx { flex: 1; min-width: 0; }
.ask-card .ttl { font-weight: 700; font-size: 15px; }
.ask-card .q { color: var(--green); font-weight: 600; font-size: 14px; margin-top: 1px; }
.ask-card .muted { font-size: 12px; margin-top: 2px; }
.ask-card .chev { flex: none; color: var(--muted); font-size: 22px; }
.lock-card .teaser { text-align: left; display: inline-block; margin: 6px auto 4px; padding-left: 18px; color: var(--text); font-size: 14px; }
.lock-card .teaser li { margin: 2px 0; }
.om-dig .push-row.sel { justify-content: space-between; padding-left: 30px; }
.push-select { font: inherit; font-size: 14px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); max-width: 60%; }
.push-sub { color: var(--muted); font-size: 12px; padding: 4px 0 2px 30px; }
.fb-link { text-align: center; font-size: 13px; margin: 10px 0 0; }
.fb-link a { color: var(--green); }

/* ---------- beta, links, logoer ---------- */
.beta { font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; background: var(--accent); color: #2b2300; border-radius: 5px; padding: 3px 6px; line-height: 1; }
.club-links { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; margin-top: 2px; }
.club-links a { text-decoration: none; }
.mini-logo { flex: none; width: 18px; height: 18px; border-radius: 50%; object-fit: contain; background: #fff; border: 1px solid var(--line); margin-right: 6px; }
.mini-logo.none { display: inline-block; background: var(--bg); }
.club-icons { display: flex; gap: 4px; margin-left: auto; flex: none; }
.club-icons a { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--bg); text-decoration: none; font-size: 15px; color: var(--green); }
.club-icons .ico svg { width: 17px; height: 17px; fill: currentColor; display: block; }
.ptr { position: fixed; left: 50%; top: 100px; transform: translate(-50%, 0); z-index: 4; width: 40px; height: 40px; border-radius: 50%; margin-top: -48px;
  background: var(--card); box-shadow: 0 2px 10px rgba(0,0,0,.2); display: grid; place-items: center; opacity: 0; transition: transform .25s, opacity .2s; pointer-events: none; }
.ptr.is-visible { opacity: 1; }
.ptr svg { width: 22px; height: 22px; fill: var(--muted); transition: fill .15s; }
.ptr.is-ready svg { fill: var(--green); }
.ptr.is-busy svg { fill: var(--green); animation: ptr-spin .8s linear infinite; }
@keyframes ptr-spin { to { transform: rotate(360deg); } }

/* ---------- feedback ---------- */
#form-fb textarea, #form-fb input { width: 100%; box-sizing: border-box; font: inherit; color: inherit; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-top: 8px; }
#form-fb textarea { resize: vertical; }
#form-fb .small { font-size: 12px; margin: 8px 0 0; }

/* Analyse */
.sq-tools { gap: 10px; flex-wrap: wrap; }
.badge { display: inline-block; padding: 1px 7px; border-radius: 999px; background: var(--accent); color: #2b2300; font-size: 10px; font-weight: 800; letter-spacing: .3px; text-transform: uppercase; vertical-align: middle; }
.an-back { display: inline-block; margin: 2px 0 10px; font-weight: 600; text-decoration: none; }
.an-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.an-head .logo { width: 48px; height: 48px; }
.an-head h2 { margin: 0; font-size: 20px; }
.an-head .sub { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.an-head.pair h2 { font-size: 17px; }
.an-head .seg { margin: 6px 0 0; }
/* Holdnavne i stillingstabellen er links til holdets Performance i Analyse */
.standings td.team a.tlink { color: inherit; text-decoration: underline; text-decoration-color: rgba(15,107,63,.4); text-underline-offset: 2px; }
/* Note under en kamp i Performance ("nr. 10 slog nr. 2") */
.mcard .mnote { font-size: 12px; color: var(--muted); padding: 6px 12px 7px; border-top: 1px solid var(--line); }
.an-progress { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 14px; }
.an-progress .phase { font-weight: 700; font-size: 15px; }
.progress { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin: 10px 0 8px; }
.progress i { display: block; height: 100%; background: var(--green); transition: width .6s; }
.an-season { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px; margin-bottom: 12px; }
.an-sum { font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.an-sum small { color: var(--muted); font-weight: 500; font-size: 12px; }
.stats { display: grid; gap: 3px; }
.stat { display: grid; grid-template-columns: 42px 1fr; gap: 8px; align-items: baseline; font-size: 13px; }
.stat b { font-size: 16px; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }   /* plads til "7–0" (største sejr) */
.stat small { color: var(--muted); font-size: 12px; }
.stat .bar { position: relative; height: 4px; margin: 5px 10px 3px 0; background: var(--line); border-radius: 2px; }   /* benchmark mod puljen */
.stat .bar i { display: block; height: 100%; background: var(--loss); border-radius: 2px; }   /* under puljesnit: rød */
.stat .bar.good i { background: var(--win); }                                                   /* på eller over: grøn */
.stat .bar u { position: absolute; top: -3px; width: 2px; height: 10px; margin-left: -1px; background: var(--text); border-radius: 1px; }   /* puljesnit */
.sq-match { margin: 8px 0 0; box-shadow: var(--shadow); }
.sq-match.upset { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.sq-meta { padding: 6px 12px 7px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.sq-meta .txt { flex: 1; min-width: 0; }
.sq-meta .chev { flex: none; }
.sq-meta:active { background: var(--bg); }
.sq-match .stats { padding: 8px 12px 10px; border-top: 1px solid var(--line); }
.sq-tools { display: flex; justify-content: space-between; padding: 6px 12px 9px; font-size: 12px; }
/* samme spilledag: linje + udfoldede holdkort + "Vis hele tabellen" i én blok, lysegul kant til kant når tallet er over 0 */
.sd-wrap.hl { background: #fff6cc; }
.sd-wrap .stat.sd { grid-template-columns: 42px 1fr auto; padding: 6px 12px 4px; cursor: default; }
.sd-wrap.hl .stat.sd { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.sd-wrap .stat.sd .chev { color: var(--green); font-size: 13px; font-weight: 700; align-self: center; padding: 2px 0 0 6px; }
.sd-wrap .sd-box { margin: 4px 12px 6px; background: rgba(255,255,255,.75); }
.sq-match .stats { padding-bottom: 4px; }
.sq-wrap { overflow-x: auto; border-top: 1px solid var(--line); -webkit-overflow-scrolling: touch; }
.sq-wrap table { border-collapse: collapse; font-size: 12px; min-width: 100%; }
.sq-wrap th, .sq-wrap td { padding: 4px 9px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; border-top: 1px solid var(--line); }
.sq-wrap th { color: var(--muted); font-weight: 600; font-size: 11px; border-top: 0; }
.sq-wrap th small { display: block; font-weight: 400; font-size: 10px; }
.sq-wrap th.p, .sq-wrap td.p { text-align: left; position: sticky; left: 0; background: var(--card); font-weight: 700; box-shadow: 1px 0 0 var(--line); }
.sq-wrap td:nth-child(2) { font-weight: 700; }
.sq-wrap td.z { color: #b9bfc6; font-weight: 400; }
.sq-wrap tr.group td { text-align: left; color: var(--muted); font-size: 11px; font-weight: 600; background: var(--bg); position: static; }
/* Tabellen under sammenligningen: rækkerne tones som brikkerne (gradient over kortfarven, så den klæbende kolonne forbliver dækkende) */
.sq-wrap tr.g-here td { background: linear-gradient(rgba(224,180,0,.2), rgba(224,180,0,.2)) var(--card); }
.sq-wrap tr.g-both td { background: linear-gradient(rgba(15,107,63,.14), rgba(15,107,63,.14)) var(--card); }
.sq-wrap tr.g-there td { background: linear-gradient(rgba(154,163,157,.22), rgba(154,163,157,.22)) var(--card); }
/* spilleren, der er trykket på: kraftigere tone, fed og en streg i venstre kant */
.sq-wrap tr.hl td { background: linear-gradient(rgba(15,107,63,.12), rgba(15,107,63,.12)) var(--card); font-weight: 700; }
.sq-wrap tr.g-here.hl td { background: linear-gradient(rgba(224,180,0,.45), rgba(224,180,0,.45)) var(--card); }
.sq-wrap tr.g-both.hl td { background: linear-gradient(rgba(15,107,63,.3), rgba(15,107,63,.3)) var(--card); }
.sq-wrap tr.g-there.hl td { background: linear-gradient(rgba(154,163,157,.45), rgba(154,163,157,.45)) var(--card); }
.sq-wrap tr.hl td.p { box-shadow: inset 3px 0 0 var(--text), 1px 0 0 var(--line); }
.sq-wrap tr.hl td.z { color: var(--muted); }
/* Sammenligning af to holdkort: tre grupper (kun her / begge / kun dér) med løbenumre som brikker; farver fra paletten */
.cmp { border-top: 1px solid var(--line); padding: 8px 12px 10px; }
.cmp-head { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.cmp-head select { flex: 1; min-width: 0; font: inherit; font-size: 13px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); }
.cmp-groups { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 10px; }
.grp { border-radius: 10px; padding: 8px 4px; background: var(--bg); }
.grp.mid { background: var(--sticker-bg); }
.grp .gh { font-size: 11px; color: var(--muted); text-align: center; line-height: 1.2; margin-bottom: 8px; }
.grp .gh b { display: block; font-size: 20px; color: var(--text); line-height: 1; margin-bottom: 2px; font-variant-numeric: tabular-nums; }
.grp .gc { display: grid; grid-template-columns: repeat(3, 26px); gap: 4px; justify-content: center; }
.pl { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; font-size: 12px; font-weight: 700; cursor: pointer; -webkit-tap-highlight-color: transparent; font-variant-numeric: tabular-nums; }
.pl.both { background: var(--green); color: #fff; }
.pl.both.rare { background: rgba(15,107,63,.14); color: var(--green); }
.pl.here { background: var(--accent); color: #2b2300; }
.pl.here.rare { background: rgba(224,180,0,.22); color: #6b5600; }
.pl.there { background: var(--draw); color: #fff; }
.pl.there.rare { background: rgba(154,163,157,.22); color: var(--muted); }
.pl.is-on { box-shadow: 0 0 0 2px var(--text); }
@media (prefers-color-scheme: dark) { .pl.both.rare { color: #9fd3b6; } .pl.here.rare { color: #f0dd8a; } }
.cmp-sum { font-size: 13px; margin: 10px 0 0; }
.cmp .foot { margin-top: 6px; }
.an-links { display: grid; gap: 6px; margin: 12px 0; font-size: 13px; font-weight: 600; }
/* Kampsiden: fakta fra dbu.dk's kampside i to kolonner */
.facts { display: grid; gap: 0; margin: 8px 0 4px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; font-size: 13px; }
.fact { display: grid; grid-template-columns: 96px 1fr; gap: 8px; padding: 6px 12px; border-top: 1px solid var(--line); }
.fact:first-child { border-top: 0; }
.fact .k { color: var(--muted); font-size: 12px; padding-top: 1px; }
.fact .v { min-width: 0; overflow-wrap: anywhere; }
.fact .v small { display: block; color: var(--muted); font-size: 11.5px; }
.fact .v a.pin { text-decoration: none; }
.fact .v .links a { display: block; font-weight: 600; line-height: 1.5; }   /* kampsidens links: dbu.dk og bestemmelser */
.mpage .an-head { margin-bottom: 8px; }
.mpage .an-head h2 { font-size: 18px; }
.mpage .mcard.upset { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
/* Vælger mellem kampens to hold (trupanalyse) */
.seg.two { display: flex; width: 100%; box-sizing: border-box; margin: 2px 0 8px; }
.seg.two button { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 6px 10px; }
.sq-sec .sq-match { margin-top: 0; }
.match .tl .form { margin-left: auto; padding-left: 8px; flex: none; gap: 3px; }   /* kampform på kampsiden, højrestillet */
.match .tl .form .dot { width: 9px; height: 9px; }
.match .tl .form .dot.none { background: #fff; border: 1px solid var(--line); box-sizing: border-box; }   /* kamp endnu ikke spillet */
.sq-season { font-size: 12px; color: var(--muted); margin: 10px 0 0; }
.sq-season b { color: var(--text); font-weight: 600; }
.foot { font-size: 11px; color: var(--muted); margin: 10px 0 0; }

/* Stilling: vælger mellem holdets kampe og hele puljen */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; margin: 2px 0 6px; background: var(--bg); }
.seg button { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 999px; cursor: pointer; }
.seg button.is-on { background: var(--green); color: #fff; }
.tournament .mcard.ours { border-color: var(--green); }

.chat { display: flex; flex-direction: column; min-height: 60vh; }
.chat-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.chat-head .an-back { margin: 0; }
.chat-head .ttl { flex: 1; min-width: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-list { display: flex; flex-direction: column; gap: 8px; padding-bottom: 8px; }
.cm { max-width: 92%; border-radius: 14px; padding: 9px 12px; font-size: 15px; line-height: 1.4; word-wrap: break-word; }
.cm.user { align-self: flex-end; background: var(--green); color: #fff; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.cm.ai { align-self: stretch; max-width: 100%; background: var(--card); box-shadow: var(--shadow); border-bottom-left-radius: 4px; }
.cm.ai p { margin: 0 0 8px; } .cm.ai p:last-child { margin-bottom: 0; }
.cm.ai ul, .cm.ai ol { margin: 0 0 8px; padding-left: 20px; }
.cm.ai h4, .cm.ai h5, .cm.ai h6 { margin: 6px 0 4px; font-size: 15px; }
.cm.ai table { border-collapse: collapse; font-size: 13px; margin: 4px 0 8px; max-width: 100%; display: block; overflow-x: auto; }
.cm.ai th, .cm.ai td { border-top: 1px solid var(--line); padding: 4px 8px; text-align: left; white-space: nowrap; }
.cm.ai th { color: var(--muted); font-weight: 600; font-size: 12px; border-top: 0; }
.cm.ai code { font-size: 13px; background: var(--bg); padding: 1px 4px; border-radius: 4px; }
.cm.ai.intro { color: var(--muted); font-size: 14px; }
.cm.status { align-self: flex-start; color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 8px; padding: 4px 6px; }
.cm.status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: pulse 1s infinite; }
@keyframes pulse { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
.cm.err { align-self: stretch; max-width: 100%; background: rgba(217,72,74,.1); color: var(--loss); font-size: 13px; }
.chat-sugg { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.chat-sugg button { border: 1px solid var(--line); background: var(--card); color: var(--green); font: inherit; font-size: 13px; font-weight: 600; padding: 6px 10px; border-radius: 999px; cursor: pointer; }
.chat-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 7; display: flex; align-items: flex-end; gap: 8px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); }
.chat-input { flex: 1; resize: none; border: 1px solid var(--line); border-radius: 18px; padding: 9px 14px; font: inherit; font-size: 16px; line-height: 1.3; background: var(--bg); color: var(--text); max-height: 96px; }
.chat-send { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--accent); color: #1b1b1b; font-size: 16px; cursor: pointer; }
.chat-send:disabled { opacity: .5; }
/* Chatten: eget panel oven på app'en, glider op nedefra */
.chat-panel { position: fixed; inset: 0; z-index: 15; background: var(--bg); overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding: calc(10px + env(safe-area-inset-top)) 16px calc(84px + env(safe-area-inset-bottom)); animation: chat-up .22s ease-out; }
.chat-panel > * { max-width: 720px; margin-left: auto; margin-right: auto; }
@keyframes chat-up { from { transform: translateY(32px); opacity: 0; } to { transform: none; opacity: 1; } }
.chat-close { flex: none; border: 0; background: none; color: var(--muted); font-size: 20px; line-height: 1; padding: 6px 4px 6px 8px; cursor: pointer; }
body.chat-open, body.admin-open { overflow: hidden; }
body.chat-open .fab, body.admin-open .fab { display: none; }
/* Admin-siden (hold på logoet, egen kode): nøgletal, søjler pr. dag og lister */
.admin-panel { z-index: 16; }
.top-logo { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.admin-card h3 { margin: 0 0 8px; font-size: 15px; }
.admin-card h4 { margin: 12px 0 4px; font-size: 13px; color: var(--muted); font-weight: 600; }
.admin-card .small { font-size: 12px; margin: 8px 0 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); gap: 8px; margin: 2px 0 10px; }
.tile { background: var(--bg); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.tile b { display: block; font-size: 21px; font-weight: 800; color: var(--green); line-height: 1.15; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tile.wide b { font-size: 18px; }
.tile small { font-size: 11px; color: var(--muted); margin-left: 5px; font-weight: 600; }
.tile span { font-size: 12px; color: var(--muted); }
.bars { display: flex; align-items: flex-end; gap: 2px; height: 90px; margin: 6px 0 2px; }
.bars i { flex: 1; min-width: 2px; background: var(--green); border-radius: 3px 3px 0 0; opacity: .85; }
.bars i.zero { background: var(--line); height: 2px !important; }
.bars i:hover { opacity: 1; }
.bars-x { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.hbar { display: grid; grid-template-columns: minmax(70px, 110px) 1fr 44px; align-items: center; gap: 8px; font-size: 13px; padding: 3px 0; }
.hbar span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar i { display: block; height: 10px; background: var(--green); border-radius: 3px; opacity: .85; min-width: 2px; }
.hbar b { text-align: right; font-variant-numeric: tabular-nums; }
.alist { margin: 0; padding: 0; list-style: none; }
.alist li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 14px; }
.alist li > span { min-width: 0; }
.alist li .sub { font-size: 12px; color: var(--muted); }
.alist li b { font-variant-numeric: tabular-nums; flex: none; }
.alist li.club-row { display: block; padding: 0; }
.club-line { display: flex; align-items: center; gap: 10px; padding: 7px 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.club-line > span:first-child { flex: 1; min-width: 0; }
.club-line .chev { color: var(--muted); font-size: 18px; line-height: 1; transition: transform .15s; }
.club-row.is-open .club-line .chev { transform: rotate(90deg); }
.alist.nested { margin: 0 0 6px 14px; }
.alist.nested li { font-size: 13px; padding: 4px 0; }
.alist-head { display: flex; justify-content: space-between; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 2px 22px 4px 0; }
.chip.new { font-size: 10px; padding: 0 6px; margin-left: 6px; vertical-align: 1px; }
.alist-more { display: block; width: 100%; border: 0; background: none; color: var(--green); font-weight: 600; font-size: 13px; padding: 8px 0 2px; cursor: pointer; }
.lock-card { text-align: center; padding: 22px 16px; }
.lock-card .lock-big svg { width: 36px; height: 36px; fill: var(--muted); }
.lock-card h3 { margin: 6px 0 2px; }
.lock-card form { display: flex; gap: 8px; justify-content: center; margin-top: 10px; }
.lock-card input { flex: 1; max-width: 220px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 15px; background: var(--card); color: var(--text); }
.lock-card .err { color: var(--loss); font-size: 12px; min-height: 16px; margin: 8px 0 0; }

/* Emojis på resultater (💣 💥 🔥 👑 🧤 🍿) */
.when .tags { font-size: 12px; letter-spacing: -1px; line-height: 1; margin-top: 1px; }
.when .pens { font-size: 11px; color: var(--muted); line-height: 1.1; margin-top: 1px; }

/* Klokke-dialog */
.push-team { border-top: 1px solid var(--line); padding: 10px 0 6px; }
.push-team:first-child { border-top: 0; padding-top: 0; }
.push-name { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.push-name .logo { width: 22px; height: 22px; }
.push-row { display: flex; align-items: center; gap: 10px; padding: 6px 0 6px 30px; font-size: 14px; cursor: pointer; }
.push-row input { width: 20px; height: 20px; accent-color: var(--green); margin: 0; }
#dlg-push .dialog-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 12px; }
/* Samme spilledag: gul trupknap på kampene og grønt trupikon i Analyse */
.sd-ic svg { width: 16px; height: 16px; fill: currentColor; }
.sd-box { margin: 8px 0 4px; padding: 8px 10px; border-radius: 8px; background: rgba(127, 127, 127, .08); font-size: 13px; }
.sd-box ul { margin: 0 0 6px; padding-left: 18px; }
.sd-box a { font-size: 12px; }
