:root {
  --green: #0e6b3a;
  --green-light: #167a44;
  --clay: #ef7d2d;
  --clay-dark: #d96a1f;
  --bg: #f4f6f3;
  --card: #ffffff;
  --border: #dfe3de;
  --text: #1f2a24;
  --muted: #6b756f;
  --gold: #e0a800;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}
header.topbar {
  background: var(--green);
  color: #fff;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 4px solid var(--clay);
}
header.topbar .brand {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: inherit;
}
header.topbar .brand img {
  height: 52px;
  width: 52px;
  border-radius: 50%;
  background: #fff;
}
header.topbar .brand .brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
header.topbar .brand .brand-text small {
  font-weight: 400;
  font-size: 0.68rem;
  color: #cfe9d9;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
header.topbar nav a {
  color: #e8f0e6;
  text-decoration: none;
  margin-left: 18px;
  font-size: 0.92rem;
}
header.topbar nav a.active { color: #fff; font-weight: 700; border-bottom: 2px solid var(--gold); }
.nav-logout-form { display: inline; }
.nav-logout-button {
  background: none;
  border: none;
  color: #e8f0e6;
  font-size: 0.92rem;
  cursor: pointer;
  margin-left: 18px;
  font-family: inherit;
  padding: 0;
}
.nav-toggle-checkbox { display: none; }
.nav-toggle-label {
  display: none;
  font-size: 1.6rem;
  line-height: 1;
  color: #fff;
  cursor: pointer;
  padding: 4px 6px;
}

/* Mobiles Menü: Nav-Links werden hinter einem Burger-Toggle eingeklappt und
   stapeln sich untereinander statt in einer Zeile zu überlaufen. Reines
   CSS (Checkbox-Hack), kein JS nötig. */
@media (max-width: 860px) {
  header.topbar { flex-wrap: wrap; padding: 10px 16px; }
  header.topbar .brand { font-size: 1rem; gap: 8px; }
  header.topbar .brand img { height: 40px; width: 40px; }
  .nav-toggle-label { display: block; }
  header.topbar nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin-top: 14px;
    order: 3;
  }
  .nav-toggle-checkbox:checked ~ nav { display: flex; }
  header.topbar nav a {
    margin-left: 0;
    padding: 12px 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  }
  header.topbar nav a.active { border-bottom: 1px solid var(--gold); }
  .nav-logout-form { display: block; padding: 12px 6px 4px; }
  .nav-logout-button { margin-left: 0; }
}
.admin-badge {
  background: var(--gold);
  color: #2a1f00;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
}
main {
  max-width: 1300px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}
h1 { font-size: 1.5rem; margin-bottom: 4px; }
p.subtitle { color: var(--muted); margin-top: 0; margin-bottom: 24px; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 22px;
  margin-bottom: 20px;
  overflow-x: auto;
}
.card h2 { font-size: 1.05rem; margin-top: 0; margin-bottom: 14px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 4px; margin-top: 12px; color: #3a453e; }
input, select {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.92rem;
  background: #fff;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.player-block { border: 1px dashed var(--border); border-radius: 8px; padding: 12px 14px; margin-top: 14px; }
.player-block h3 { margin: 0 0 4px; font-size: 0.9rem; color: var(--green-light); }
button.primary {
  background: var(--green-light);
  color: #fff;
  border: none;
  padding: 11px 22px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 20px;
}
button.secondary {
  background: #fff;
  color: var(--green-light);
  border: 1px solid var(--green-light);
  padding: 9px 16px;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}
button.ghost {
  background: transparent;
  border: none;
  color: var(--clay);
  font-size: 0.82rem;
  cursor: pointer;
  text-decoration: underline;
}
.tag {
  display: inline-block;
  background: #eef3ec;
  color: var(--green);
  border-radius: 10px;
  padding: 2px 9px;
  font-size: 0.72rem;
  font-weight: 700;
  margin-left: 6px;
}
.tag.seeded { background: #fff3d6; color: #7a5b00; }
.tabs { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.tabs button {
  border: 1px solid var(--border);
  background: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--muted);
}
.tabs button.active { background: var(--green-light); color: #fff; border-color: var(--green-light); }
.phase-link { margin: -8px 0 18px; }
.phase-link a { color: var(--green-light); font-weight: 600; font-size: 0.85rem; text-decoration: none; }
.phase-link a:hover { text-decoration: underline; }
.settings-layout { display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: start; }
.settings-content { min-width: 0; }
.settings-content .settings-section { display: none; }
.settings-content .settings-section.active { display: block; }
.settings-nav { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 2px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 8px; }
.settings-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px; text-decoration: none;
  color: var(--text); font-size: 0.9rem;
}
.settings-nav a .ico { font-size: 1.05rem; width: 20px; text-align: center; }
.settings-nav a:hover { background: #f0f3ef; }
.settings-nav a.active { background: var(--green-light); color: #fff; font-weight: 600; }
@media (max-width: 820px) {
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { position: static; flex-direction: row; overflow-x: auto; }
}
@media (max-width: 720px) {
  .groups-wrap { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  main { padding: 20px 14px 50px; }
}
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
table.hof-table { table-layout: fixed; }
table.hof-table td, table.hof-table th { overflow-wrap: break-word; }
th, td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.03em; }
tr.highlight { background: #eef6ec; }

/* Spielergebnisse-Block innerhalb der Gruppenkarte: eigener, sichtbar
   abgesetzter Kasten statt nur einer kleinen Überschrift, damit er sich
   klar von der Tabelle darüber abhebt. */
.pairings-block {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 2px solid var(--border);
}
.pairings-block h3 {
  font-size: 0.72rem;
  margin: 0 0 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}
table.pairings-table { background: #fafcf9; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
table.pairings-table th { background: #f0f3ee; }
table.pairings-table tr:nth-child(even) td { background: #f4f6f3; }
table.pairings-table td, table.pairings-table th { border-bottom: 1px solid var(--border); }
table.pairings-table tr:last-child td { border-bottom: none; }

.pill-row { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.pill {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.85rem;
  background: #fafcf9;
}
.pill b { display: block; font-size: 1.1rem; color: var(--green); }
.groups-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.group-box { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.group-box header { background: var(--green); color: #fff; padding: 8px 14px; font-weight: 700; font-size: 0.85rem; }
.group-box ul { list-style: none; margin: 0; padding: 0; }
.group-box li { padding: 9px 14px; border-bottom: 1px solid var(--border); font-size: 0.88rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.group-box li:last-child { border-bottom: none; }
.group-box li[draggable="true"] { cursor: grab; }
.group-box li[draggable="true"]:active { cursor: grabbing; }
.group-box .dnd-dropzone { min-height: 20px; transition: background 0.1s ease; }
.bracket { display: flex; gap: 44px; overflow-x: auto; padding: 20px 4px 30px; font-family: Georgia, "Times New Roman", serif; }
.round { display: flex; flex-direction: column; justify-content: flex-start; min-width: 270px; }
.round-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--green);
  text-align: center;
  margin-bottom: 14px;
  letter-spacing: 0.12em;
  font-weight: 700;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--clay);
}

.match-box {
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  border-radius: 4px;
  background: #fff;
  overflow: hidden;
  position: relative;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  height: 64px;
  box-sizing: border-box;
}
.match-box .team {
  padding: 7px 10px;
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  gap: 10px;
}
.match-box .team:last-child { border-bottom: none; }
.match-box .team.winner { background: #f7fbf6; }
.match-box .team.winner .name { font-weight: 700; color: var(--green); }
.match-box .team .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-box .team .seed { color: var(--muted); font-weight: 400; font-size: 0.72rem; margin-right: 3px; }

.match-box .sets { display: flex; gap: 5px; flex-shrink: 0; }
.match-box .sets .set-score {
  width: 18px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 0.78rem;
  color: var(--muted);
}
.match-box .team.winner .sets .set-score { color: var(--green); font-weight: 700; }
.match-box .sets .set-score.tiebreak-won { position: relative; }
.match-box .sets .set-score.tiebreak-won::after {
  content: '*';
  position: absolute;
  top: -2px;
  right: 1px;
  font-size: 0.6rem;
  color: var(--clay);
}
.match-box .team .pending { color: var(--muted); font-size: 0.76rem; font-style: italic; }

/* Grand-Slam-style connector lines between rounds. Match boxes have a fixed
   height H=64px, so the vertical rhythm can be computed exactly in pixels.
   With g(1)=28 as the base gap between two matches in round 1, the gap
   doubles each round following g(r+1) = 2*g(r) + H (the standard bracket
   formula), and each round's top offset is the running sum of half-steps
   — that's what centers round 2 between its two round-1 feeders, round 3
   between its two round-2 feeders, and so on:
     round 1: gap=28   marginTop=0
     round 2: gap=120  marginTop=46   (= (64+28)/2)
     round 3: gap=304  marginTop=138  (= 46 + (64+120)/2)
   The connector line height for a round equals (H + thatRound'sGap) / 2 —
   the distance from a match's center to the shared midpoint feeding the
   next round. */
/* Uses the adjacent-sibling combinator (match-box directly followed by
   another match-box) rather than :not(:last-child), so it only ever
   applies BETWEEN two matches of the same round — trailing non-match
   elements like .third-place-wrap after the final's single match-box are
   never mistaken for "another match to space out". */
.round .match-box + .match-box { margin-top: 28px; }
.round:nth-child(2) { margin-top: 46px; }
.round:nth-child(2) .match-box + .match-box { margin-top: 120px; }
.round:nth-child(3) { margin-top: 138px; }
.round:nth-child(3) .match-box + .match-box { margin-top: 304px; }
.round:nth-child(4) { margin-top: 322px; }

.bracket .round:not(:last-child) .match-box::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -22px;
  width: 22px;
  height: 1px;
  background: var(--clay);
}
.round:nth-child(1) .match-box:nth-child(odd)::before {
  content: ''; position: absolute; right: -22px; top: 50%; height: 46px; width: 1px; background: var(--clay);
}
.round:nth-child(1) .match-box:nth-child(even)::before {
  content: ''; position: absolute; right: -22px; bottom: 50%; height: 46px; width: 1px; background: var(--clay);
}
.round:nth-child(2) .match-box:nth-child(odd)::before {
  content: ''; position: absolute; right: -22px; top: 50%; height: 92px; width: 1px; background: var(--clay);
}
.round:nth-child(2) .match-box:nth-child(even)::before {
  content: ''; position: absolute; right: -22px; bottom: 50%; height: 92px; width: 1px; background: var(--clay);
}
.round:nth-child(3) .match-box:nth-child(odd)::before {
  content: ''; position: absolute; right: -22px; top: 50%; height: 184px; width: 1px; background: var(--clay);
}
.round:nth-child(3) .match-box:nth-child(even)::before {
  content: ''; position: absolute; right: -22px; bottom: 50%; height: 184px; width: 1px; background: var(--clay);
}

/* Spiel um Platz 3: same visual design as a regular match-box, just placed
   further down within the finale column, clearly separated from the final. */
.third-place-wrap { margin-top: 36px; }
.third-place-wrap .round-title { border-bottom-color: var(--gold); color: #7a5b00; }
.pdf-preview {
  border: 1px solid var(--border);
  background: #fff;
  padding: 26px 30px;
  font-family: Georgia, serif;
  max-width: 560px;
  margin: 0 auto;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}
.pdf-preview h2 { text-align: center; margin-bottom: 2px; }
.pdf-preview p.meta { text-align: center; color: var(--muted); font-size: 0.85rem; margin-top: 0; }
.pdf-preview table { margin-top: 16px; }
.set-inputs { display: flex; gap: 6px; align-items: center; }
.set-inputs input { width: 46px; text-align: center; padding: 6px; }
.set-inputs span.vs { color: var(--muted); font-size: 0.8rem; }
/* ---- Ergebniserfassung: Akkordeon-Liste statt vieler großer Kacheln ---- */
.match-list { display: flex; flex-direction: column; gap: 8px; }
.match {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: 8px;
  padding: 0;
  overflow: visible;
}
details.match { border-left-color: var(--green-light); }
details.match[open] { border-left-color: var(--green-light); }
.match-summary {
  list-style: none;
  cursor: default;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
details.match summary.match-summary { cursor: pointer; }
.match-summary::-webkit-details-marker { display: none; }
.chevron { color: var(--muted); font-size: 0.75rem; transition: transform 0.15s ease; flex-shrink: 0; }
details.match[open] .chevron { transform: rotate(90deg); }
.match-round { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); flex-shrink: 0; width: 100px; }
.match-names { font-weight: 700; font-size: 0.94rem; color: var(--text); flex: 1; min-width: 160px; }
.match-names .vs { color: var(--muted); font-weight: 400; margin: 0 4px; }
.match-score { font-variant-numeric: tabular-nums; font-size: 0.9rem; font-weight: 700; color: var(--green); white-space: nowrap; }
.match-score.is-muted { color: var(--muted); font-weight: 400; font-style: italic; }
.match-score.is-interim { color: #a3801e; font-weight: 600; }
.result-line.interim { color: #8a6d1e; }
.lock-notice {
  font-size: 0.85rem;
  color: var(--muted);
  background: #f0f3ee;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 14px;
  margin: 10px 0 0;
}
.correction-wrap { margin-bottom: 4px; }
.correction-toggle {
  color: var(--clay-dark, #a3801e);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  margin: 10px 0;
}
.correction-warning {
  font-size: 0.82rem;
  color: #8a3d10;
  background: #fff3e6;
  border: 1px solid #f0c896;
  border-radius: 6px;
  padding: 8px 12px;
  margin: 8px 0 14px;
}
.badge-pill {
  font-size: 0.66rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 10px;
  white-space: nowrap;
}
.badge-pill.wo { background: #fbf1d8; color: #7a5b00; }
.badge-pill.schedule { background: #eef6ec; color: var(--green); font-weight: 600; }

.match-body { padding: 4px 18px 18px; border-top: 1px solid var(--border); }
.result-line { font-size: 0.85rem; color: var(--muted); margin: 12px 0; }
.result-line b { color: var(--green); }

.termin-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.termin-line label { margin: 0; font-size: 0.78rem; color: var(--muted); font-weight: 600; }
.termin-line input { width: auto; padding: 6px 8px; font-size: 0.85rem; }
.termin-line input[type="text"] { width: 90px; }
.termin-line input[name="scheduled_date"] { width: 110px; }
.termin-line select { width: auto; padding: 6px 8px; font-size: 0.85rem; }
.termin-line button { margin: 0; font-size: 0.8rem; padding: 6px 12px; }
.court-booked-option { display: flex; align-items: center; gap: 5px; font-weight: 500 !important; color: var(--text) !important; cursor: pointer; }
.court-booked-option input { width: auto; margin: 0; }

.mini-datepicker {
  z-index: 1000;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  padding: 10px;
  width: 220px;
  font-size: 0.82rem;
}
.mdp-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-weight: 600; color: var(--green); }
.mdp-header span { font-size: 0.85rem; }
.mdp-header button { width: auto; padding: 2px 9px; background: transparent; border: 1px solid var(--border); border-radius: 4px; color: var(--green); cursor: pointer; font-size: 0.9rem; line-height: 1.4; }
.mdp-header button:hover { background: var(--bg); }
.mdp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.mdp-weekday { text-align: center; font-size: 0.68rem; color: var(--muted); font-weight: 600; padding: 2px 0; }
.mdp-day { width: auto; padding: 5px 0; background: transparent; border: none; border-radius: 4px; cursor: pointer; font-size: 0.78rem; }
.mdp-day:hover { background: var(--bg); }
.mdp-day.is-selected { background: var(--green); color: #fff; font-weight: 700; }
.mdp-day.is-today:not(.is-selected) { border: 1px solid var(--gold); }

.set-row { display: flex; align-items: center; gap: 10px; margin: 10px 0; }
.set-row label { width: 100px; font-size: 0.82rem; font-weight: 600; color: var(--muted); flex-shrink: 0; margin: 0; }
.set-row select { width: auto; min-width: 110px; padding: 7px 10px; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.set-row .set-inputs { margin: 0; }
.set-row .set-inputs input { width: 46px; }

.wo-toggle {
  background: none;
  border: none;
  color: var(--green);
  text-decoration: underline;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 8px 0 0;
  font-family: inherit;
}
.wo-panel { display: none; background: #fdf9ec; border: 1px solid #f0e2b8; border-radius: 6px; padding: 10px 12px; margin: 8px 0; }
.wo-panel.open { display: block; }
.wo-option {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  margin: 4px 0;
  color: var(--text);
  cursor: pointer;
}
.wo-option input { width: auto; margin: 0; }
.wo-hint { font-size: 0.78rem; color: var(--muted); margin: 8px 0 0; }

.match-actions { display: flex; justify-content: flex-end; margin-top: 14px; }
.match-actions button { margin: 0; }

@media (max-width: 640px) {
  .match-round { width: auto; }
  .set-row { flex-wrap: wrap; }
}
.badge-tiebreak { background: var(--clay); color: #fff; font-size: 0.65rem; padding: 2px 6px; border-radius: 4px; margin-left: 4px; }
.footer-note { text-align: center; color: var(--muted); font-size: 0.78rem; margin-top: 30px; }
.timeline { display: flex; flex-direction: column; gap: 0; border-left: 3px solid var(--border); margin-left: 8px; }
.timeline-item {
  position: relative;
  padding: 14px 0 14px 26px;
  border-bottom: 1px solid var(--border);
}
.timeline-item:last-child { border-bottom: none; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -9px;
  top: 20px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--green-light);
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--green-light);
}
.timeline-item.holiday::before { background: var(--clay); box-shadow: 0 0 0 2px var(--clay); }
.timeline-item .date-range { font-weight: 700; font-size: 0.92rem; }
.timeline-item .desc { font-size: 0.85rem; color: var(--muted); margin-top: 2px; }
.timeline-item.holiday { background: #fff8ef; margin: 2px 0; border-radius: 6px; }
.timeline-item .badge-holiday {
  background: var(--clay);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 8px;
}
.timeline-item .badge-round {
  background: #eef3ec;
  color: var(--green);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 8px;
}
.hero {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--green);
  border-radius: 12px;
  padding: 22px 28px;
  margin-bottom: 24px;
  color: #fff;
  border-bottom: 4px solid var(--clay);
}
.hero img { height: 96px; width: 96px; border-radius: 50%; background: #fff; flex-shrink: 0; }
.hero h1 { margin: 0 0 4px; font-family: Georgia, serif; }
.hero p { margin: 0; color: #cfe9d9; font-size: 0.9rem; }
.nav-links { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.nav-links a {
  text-decoration: none;
  background: var(--green);
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  box-shadow: 0 2px 0 var(--clay-dark);
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.15s ease;
}
.nav-links a:hover {
  background: var(--green-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 0 var(--clay-dark);
}
.nav-links a:active {
  transform: translateY(0);
  box-shadow: 0 1px 0 var(--clay-dark);
}
.nav-links a.outline {
  background: #fff;
  color: var(--green);
  border: 2px solid var(--green);
  box-shadow: none;
  padding: 10px 18px;
}
.nav-links a.outline:hover { background: #eef6ec; }
.category-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 20px; }
.category-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.category-panel .panel-head {
  background: var(--green);
  color: #fff;
  padding: 16px 20px;
  border-bottom: 4px solid var(--clay);
}
.category-panel .panel-head h2 { margin: 0; font-family: Georgia, serif; font-size: 1.2rem; }
.category-panel .panel-head p { margin: 4px 0 0; font-size: 0.8rem; color: #cfe9d9; }
.category-panel .panel-body { padding: 18px 20px; }
.category-panel .panel-body .nav-links { margin-bottom: 0; }
.category-panel .panel-body .nav-links a { flex: 1; text-align: center; }
.modal-overlay {
  background: rgba(15, 30, 20, 0.55);
  padding: 40px 20px;
  display: flex;
  justify-content: center;
}
.modal-box {
  background: #fff;
  border-radius: 12px;
  max-width: 440px;
  width: 100%;
  padding: 24px 26px;
  border-top: 5px solid var(--clay);
}
.modal-box h2 { margin-top: 0; }
.modal-box .warn { font-size: 0.85rem; color: var(--muted); }
.modal-box .actions { display: flex; gap: 10px; margin-top: 18px; justify-content: flex-end; }
.sponsor-bar {
  margin-top: 34px;
  border-top: 1px solid var(--border);
  padding-top: 26px;
  text-align: center;
}
.sponsor-bar h3 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 18px;
}
.sponsor-tier-block { margin-bottom: 30px; }
.sponsor-tier-block:last-child { margin-bottom: 0; }
.sponsor-tier-heading {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}
.sponsor-tier-heading.main { color: var(--clay-dark); font-size: 0.9rem; }
.sponsor-tier-heading.sponsor { color: var(--green); }
.sponsor-tier-heading.partner { color: var(--muted); }

.sponsor-logos { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; align-items: center; }
.sponsor-logos a { display: block; }
.sponsor-logo-box {
  width: 160px;
  height: 84px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
  text-align: center;
  padding: 8px;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.sponsor-logos a:hover .sponsor-logo-box { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.08); }
.sponsor-logo-box img { max-width: 100%; max-height: 100%; object-fit: contain; }

.sponsor-logo-box.main {
  width: 260px;
  height: 130px;
  border: 2px solid var(--clay);
  color: var(--clay-dark);
  font-size: 1rem;
  box-shadow: 0 4px 14px rgba(239, 125, 45, 0.18);
}
.sponsor-logo-box.sponsor { width: 150px; height: 78px; }
.sponsor-logo-box.partner { width: 120px; height: 60px; font-size: 0.72rem; }

.sponsor-tier-label { font-size: 0.68rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin: 22px 0 10px; }
.sponsor-upload-row { display: flex; align-items: center; gap: 14px; }
.sponsor-upload-row .sponsor-logo-box { flex-shrink: 0; }
.modal-box button.danger {
  background: var(--clay);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
}
