* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: #0f172a;
  color: #f8fafc;
}

/* Tre rækker: topbjælke, kort (fylder resten), panel */
body {
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100dvh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
}
.topbar h1 { margin: 0; font-size: 1.15rem; letter-spacing: 0.02em; }
.brand {
  display: flex; align-items: center; gap: 8px;
  font-family: 'Barlow Condensed', system-ui, sans-serif;
  font-style: italic; font-weight: 800;
  font-size: 1.6rem !important; letter-spacing: 0.04em !important;
}
.brand-logo { width: 30px; height: 30px; flex: none; }

.team-chip {
  display: inline-flex; align-items: center; gap: 8px;
  max-width: 60%;
  padding: 4px 12px;
  border-radius: 999px;
  background: #1e293b;
  font-size: 0.85rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.team-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }

.map-wrap { position: relative; min-height: 0; }
#map { position: absolute; inset: 0; }
.map-status {
  position: absolute; left: 8px; top: 8px;
  padding: 3px 8px; border-radius: 6px;
  background: rgba(15, 23, 42, 0.8);
  font-size: 0.75rem; color: #cbd5e1;
  pointer-events: none;
}

.season-bar {
  position: absolute; right: 8px; top: 8px;
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
  max-width: 60%;
}
.season-select {
  min-height: 36px; max-width: 100%;
  padding: 0 10px; border-radius: 8px;
  border: 1px solid #334155; background: rgba(15, 23, 42, 0.9); color: #f8fafc;
  font: inherit; font-size: 0.85rem;
}
.season-note {
  padding: 3px 8px; border-radius: 6px;
  background: rgba(15, 23, 42, 0.8);
  font-size: 0.75rem; color: #cbd5e1; text-align: right;
}

/* Panel i bunden – nemt at nå med tommelfingeren */
.panel {
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  max-height: 55dvh;
  overflow-y: auto;
}
.stack { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.label { font-size: 0.9rem; font-weight: 600; }
.muted { margin: 0; font-size: 0.85rem; color: #cbd5e1; }

.input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid #334155;
  background: #0b1222;
  color: #f8fafc;
  font: inherit;
  font-size: 16px; /* 16px forhindrer at iPhone zoomer ind */
}
.select { flex: 0 0 auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
#view-login .input { flex: none; width: 100%; }

.btn {
  min-height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid #334155;
  background: #1e293b;
  color: #f8fafc;
  font: inherit; font-size: 0.95rem;
  cursor: pointer;
}
.btn-primary { background: #ea580c; border-color: #ea580c; font-weight: 600; }
.btn:focus-visible, .input:focus-visible, .link-btn:focus-visible, .swatch:focus-visible {
  outline: 2px solid #fb923c; outline-offset: 2px;
}

.link-btn {
  background: none; border: none; padding: 6px 0;
  color: #93c5fd; font: inherit; font-size: 0.85rem; cursor: pointer;
}
.small-actions { gap: 16px; }

.colors { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch {
  width: 32px; height: 32px; border-radius: 50%;
  border: 3px solid transparent; cursor: pointer;
}
.swatch[aria-checked="true"] { border-color: #f8fafc; }

.trip-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.trip-row {
  width: 100%; text-align: left;
  padding: 10px 12px; border-radius: 8px;
  border: 1px solid #334155; background: #111a2e; color: #f8fafc;
  font: inherit; font-size: 0.85rem; cursor: pointer;
}

.board-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px;
  background: #111a2e; font-size: 0.9rem;
}
.board-row.is-mine { outline: 1px solid #fb923c; }
.board-rank { width: 1.8em; color: #94a3b8; font-variant-numeric: tabular-nums; }
.board-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-count { color: #cbd5e1; font-variant-numeric: tabular-nums; }

.maplibregl-popup-content { color: #0f172a; font-size: 0.9rem; }
