/* ==========================================================================
   Jubiläums-ELO-Open 2027 · Schachverein Meschede e.V.
   Grün-goldenes Erscheinungsbild, mobil zuerst aufgebaut.
   ========================================================================== */

:root {
  --green-950: #0a1d15;
  --green-900: #0f291e;
  --green-800: #143628;
  --green-700: #1f513c;
  --green-600: #2b6a4f;
  --green-100: #e3ece6;
  --green-50: #f0f5f1;
  --gold-500: #c5a059;
  --gold-400: #d6b77a;
  --gold-600: #b08d46;
  --gold-700: #85662a;
  --gold-100: #f7efdc;
  --gold-50: #fcf8ef;
  --ink: #1e2320;
  --muted: #5a6560;
  --line: #dce3de;
  --line-strong: #c9d3cc;
  --bg: #f4f6f3;
  --card: #ffffff;
  --danger: #a4161a;
  --danger-bg: #fbeaea;
  --success: #1d6b3a;
  --success-bg: #e3f3e8;
  --warning: #8a5a00;
  --warning-bg: #fdf3dc;

  /* Bestehende Variablennamen bleiben für ältere Seiten erhalten. */
  --primary-green: var(--green-800);
  --primary-green-light: var(--green-700);
  --accent-gold: var(--gold-500);
  --accent-gold-hover: var(--gold-600);
  --bg-light: var(--bg);
  --card-bg: var(--card);
  --text-dark: var(--ink);
  --text-muted: var(--muted);
  --border-color: var(--line);

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", Georgia, serif;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(15, 41, 30, .06), 0 1px 3px rgba(15, 41, 30, .05);
  --shadow: 0 2px 4px rgba(15, 41, 30, .04), 0 10px 30px rgba(15, 41, 30, .07);
  --shadow-lg: 0 18px 50px rgba(10, 29, 21, .28);
  --header-brand-h: 58px;
  --header-offset: 64px;
  --gutter: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--bg);
  background-image: radial-gradient(1200px 500px at 50% -200px, rgba(197, 160, 89, .10), transparent 70%);
  background-repeat: no-repeat;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }

a { color: var(--green-700); }
a:hover { color: var(--gold-700); }

:focus-visible { outline: 3px solid var(--gold-500); outline-offset: 3px; border-radius: 4px; }

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

.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 2000;
  background: var(--gold-500);
  color: var(--green-900);
  font-weight: 700;
  padding: .6rem 1rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: top .15s ease;
}
.skip-link:focus { top: 12px; }

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ==========================================================================
   Kopfbereich
   ========================================================================== */

.site-header {
  position: sticky;
  top: calc(-1 * var(--header-brand-h));
  z-index: 1000;
  background: linear-gradient(180deg, var(--green-800) 0%, var(--green-900) 100%);
  border-bottom: 3px solid var(--gold-500);
  box-shadow: 0 6px 24px rgba(10, 29, 21, .22);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  height: var(--header-brand-h);
  padding: 0 var(--gutter);
  text-decoration: none;
  min-width: 0;
  flex: 1 1 100%;
}

.header-logo-img {
  width: auto;
  height: 40px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .35));
}

.header-title-group {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}

.header-main-heading {
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: .01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-sub-heading {
  color: var(--gold-400);
  font-weight: 600;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.main-nav {
  flex: 1 1 100%;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  padding: 6px 10px 8px;
  background: rgba(0, 0, 0, .18);
  border-top: 1px solid rgba(255, 255, 255, .07);
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: .4rem .5rem;
  border-radius: 10px;
  color: rgba(255, 255, 255, .86);
  font-size: .86rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  line-height: 1.15;
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, .1);
}

.nav-link[aria-current="page"] {
  color: var(--gold-400);
  background: rgba(255, 255, 255, .12);
  box-shadow: inset 0 -2px 0 var(--gold-500);
}

.nav-link.nav-cta {
  background: var(--gold-500);
  color: var(--green-900);
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
}

.nav-link.nav-cta:hover,
.nav-link.nav-cta:focus-visible {
  background: var(--gold-400);
  color: var(--green-950);
}

.nav-link.nav-cta[aria-current="page"] {
  box-shadow: 0 0 0 2px var(--green-900), 0 0 0 4px var(--gold-400);
}

.nav-cta-prefix { display: none; }

@media (min-width: 420px) {
  .nav-cta-prefix { display: inline; }
}

@media (min-width: 860px) {
  :root { --header-brand-h: 76px; --header-offset: 96px; --gutter: 28px; }

  .site-header { top: 0; }

  .header-inner { flex-wrap: nowrap; padding: 0 var(--gutter); gap: 1.5rem; }

  .header-brand { flex: 0 1 auto; padding: 0; gap: .9rem; }
  .header-logo-img { height: 50px; }
  .header-main-heading { font-size: 1.35rem; }
  .header-sub-heading { font-size: .74rem; }

  .main-nav {
    flex: 0 0 auto;
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: .35rem;
    padding: 0;
    background: none;
    border: 0;
  }

  .nav-link { min-height: 44px; padding: .5rem 1rem; font-size: .95rem; }
  .nav-link.nav-cta { padding: .55rem 1.25rem; margin-left: .5rem; }
}

/* ==========================================================================
   Grundlayout
   ========================================================================== */

.container,
.page {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px var(--gutter) 8px;
  flex: 1 0 auto;
}

@media (min-width: 860px) {
  .container, .page { padding-top: 36px; }
}

section {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.35rem;
  margin-bottom: 1.5rem;
  scroll-margin-top: calc(var(--header-offset) + 12px);
}

@media (min-width: 640px) {
  section { padding: 2rem; margin-bottom: 2rem; }
}

h1, h2, h3 { line-height: 1.25; color: var(--green-800); }

h2 {
  display: flex;
  align-items: center;
  gap: .7rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem);
  font-weight: 700;
  margin-bottom: 1.25rem;
  padding-bottom: .85rem;
  border-bottom: 1px solid var(--line);
  position: relative;
}

h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 64px;
  height: 3px;
  border-radius: 3px;
  background: var(--gold-500);
}

.section-icon {
  display: inline-grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  flex: none;
  border-radius: 10px;
  background: var(--green-800);
  color: var(--gold-400);
  box-shadow: 0 3px 10px rgba(20, 54, 40, .2);
}

.section-icon .icon { width: 1.15rem; height: 1.15rem; }

h3 { font-size: 1.05rem; font-weight: 700; }

p + p { margin-top: .75rem; }

.section-intro { color: var(--muted); margin: -.25rem 0 1.25rem; max-width: 70ch; }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn,
.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 48px;
  padding: .75rem 1.5rem;
  border-radius: 12px;
  border: 2px solid transparent;
  font: inherit;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
}

.btn-gold,
.btn-cta {
  background: linear-gradient(180deg, var(--gold-400) 0%, var(--gold-500) 100%);
  color: var(--green-950);
  box-shadow: 0 6px 18px rgba(133, 102, 42, .35);
}

.btn-gold:hover, .btn-gold:focus-visible,
.btn-cta:hover, .btn-cta:focus-visible {
  color: var(--green-950);
  background: linear-gradient(180deg, #e2c68e 0%, var(--gold-400) 100%);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(133, 102, 42, .4);
}

.btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, .45);
  background: rgba(255, 255, 255, .06);
}

.btn-ghost:hover, .btn-ghost:focus-visible {
  color: var(--green-950);
  background: #fff;
  border-color: #fff;
}

.btn-outline {
  color: var(--green-800);
  border-color: var(--green-800);
  background: #fff;
}

.btn-outline:hover, .btn-outline:focus-visible {
  color: #fff;
  background: var(--green-800);
}

.btn .icon { width: 1.1rem; height: 1.1rem; }

button:disabled,
.btn-cta:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ==========================================================================
   Startseite: Hero
   ========================================================================== */

.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: grid;
  gap: 1.5rem;
  padding: 2rem 1.25rem 1.75rem;
  margin-bottom: 1.25rem;
  border: 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(155deg, var(--green-700) 0%, var(--green-800) 45%, var(--green-950) 100%);
  color: #fff;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

/* Dezentes Schachbrettmuster mit weichem Verlauf. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: repeating-conic-gradient(rgba(255, 255, 255, .045) 0 25%, transparent 0 50%);
  background-size: 56px 56px;
  -webkit-mask-image: linear-gradient(200deg, #000 0%, transparent 65%);
  mask-image: linear-gradient(200deg, #000 0%, transparent 65%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: -1;
  border: 1px solid rgba(214, 183, 122, .38);
  border-radius: calc(var(--radius-lg) - 8px);
  pointer-events: none;
}

.hero-emblem {
  position: relative;
  justify-self: center;
  width: 128px;
}

.hero-emblem::before {
  content: "";
  position: absolute;
  inset: -18%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(214, 183, 122, .35) 0%, transparent 68%);
  z-index: -1;
}

.hero-logo {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, .45));
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--gold-400);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.hero-kicker::before,
.hero-kicker::after {
  content: "";
  flex: none;
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: .7;
}

@media (max-width: 479px) {
  section { padding: 1.1rem 1rem; }
  .registration-notice, .info-notice-box { padding: 1rem .95rem; }
  .lang-block { padding-left: 0; }
  .lang-tag { position: static; display: inline-grid; margin-bottom: .35rem; }
  .terms-list { margin-left: .9rem; }
  .checkbox-group { padding: .9rem; }
  .fee-box { padding: 1rem; }
  .hero-kicker { font-size: .7rem; letter-spacing: .1em; }
  .hero-kicker::before, .hero-kicker::after { display: none; }
  .hero { padding-top: 1.6rem; }
  .hero-facts li { padding: .6rem .75rem; }
  .sponsor-list li { min-height: 68px; padding: .75rem .9rem; }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.35rem + 3.6vw, 3.6rem);
  font-weight: 700;
  line-height: 1.08;
  color: #fff;
  margin: .55rem 0 .75rem;
  text-wrap: balance;
}

.hero-title span {
  display: block;
  color: var(--gold-400);
}

.hero-lead {
  color: #dce7e0;
  font-size: clamp(1rem, .95rem + .35vw, 1.15rem);
  max-width: 42ch;
  margin: 0 auto;
}

.hero-facts {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: .6rem;
  margin: 1.5rem 0;
  text-align: left;
}

.hero-facts li {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .7rem .9rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .12);
  backdrop-filter: blur(2px);
}

.hero-facts .icon {
  width: 2.1rem;
  height: 2.1rem;
  padding: .45rem;
  border-radius: 9px;
  background: rgba(197, 160, 89, .18);
  color: var(--gold-400);
}

.hero-facts strong {
  display: block;
  color: #fff;
  font-size: .98rem;
  line-height: 1.3;
}

.hero-facts small {
  display: block;
  color: #b9cbbf;
  font-size: .82rem;
  line-height: 1.35;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: .7rem;
}

@media (min-width: 560px) {
  .hero-facts { grid-template-columns: 1fr 1fr; }
  .hero-actions { flex-direction: row; justify-content: center; flex-wrap: wrap; }
}

@media (min-width: 860px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) 260px;
    align-items: center;
    gap: 2.5rem;
    padding: 3.25rem 3.25rem 3rem;
    text-align: left;
  }
  .hero::after { inset: 14px; }
  .hero-emblem { width: 240px; grid-column: 2; grid-row: 1; }
  .hero-content { grid-column: 1; grid-row: 1; }
  .hero-lead { margin: 0; }
  .hero-actions { justify-content: flex-start; }
}

@media (min-width: 1100px) {
  .hero { grid-template-columns: minmax(0, 1fr) 300px; padding: 3.75rem 4rem 3.5rem; }
  .hero-emblem { width: 280px; }
}

/* ==========================================================================
   Sponsoren und Abschnittsnavigation
   ========================================================================== */

.sponsors {
  padding: 1.1rem 1.25rem;
  text-align: center;
}

.sponsors-title {
  display: block;
  font-family: var(--font-sans);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 .9rem;
  padding: 0;
  border: 0;
}

.sponsors-title::after { display: none; }

.sponsor-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: .75rem;
  align-items: stretch;
}

.sponsor-list li {
  display: grid;
  place-items: center;
  min-height: 76px;
  padding: .9rem 1.1rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  transition: border-color .2s ease, box-shadow .2s ease;
}

.sponsor-list li:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }

.sponsor-logo {
  width: auto;
  height: 42px;
  max-width: 100%;
  object-fit: contain;
}

.sponsor-logo--volksbank { height: 40px; }
.sponsor-logo--pce { height: 46px; }

@media (min-width: 860px) {
  .sponsors {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    text-align: left;
    padding: 1rem 1.5rem;
  }
  .sponsors-title { margin: 0; flex: 0 0 auto; max-width: 150px; line-height: 1.5; }
  .sponsor-list { flex: 1; grid-template-columns: repeat(3, 1fr); }
  .sponsor-list { gap: 1rem; }
  .sponsor-list li { min-height: 84px; }
}

.section-nav {
  display: flex;
  gap: .5rem;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 calc(-1 * var(--gutter)) 1.5rem;
  padding: .25rem var(--gutter);
  -webkit-overflow-scrolling: touch;
}

.section-nav::-webkit-scrollbar { display: none; }

.section-nav a {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 42px;
  padding: .45rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--green-800);
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.section-nav a:hover,
.section-nav a:focus-visible {
  background: var(--green-800);
  border-color: var(--green-800);
  color: var(--gold-400);
}

.section-nav .icon { width: 1rem; height: 1rem; color: var(--gold-600); }
.section-nav a:hover .icon, .section-nav a:focus-visible .icon { color: var(--gold-400); }

@media (min-width: 860px) {
  .section-nav { flex-wrap: wrap; justify-content: center; overflow: visible; margin: 0 0 2rem; padding: 0; }
}

/* ==========================================================================
   Faktenlisten (Turniermodus, Anmeldung)
   ========================================================================== */

.facts-list { display: grid; }

.fact-row {
  display: grid;
  gap: .2rem;
  padding: .9rem 0;
  border-top: 1px solid var(--line);
}

.fact-row:first-child { border-top: 0; padding-top: 0; }
.fact-row:last-child { padding-bottom: 0; }

.fact-row dt {
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold-700);
}

.fact-row dd { color: var(--ink); }
.fact-row dd strong { color: var(--green-800); }

.fact-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  list-style: none;
  margin-top: .15rem;
}

.fact-pills li {
  display: inline-block;
  padding: .3rem .7rem;
  border-radius: 8px;
  background: var(--green-50);
  border: 1px solid var(--green-100);
  font-size: .95rem;
}

.fact-pills li strong { font-variant-numeric: tabular-nums; }

@media (min-width: 640px) {
  .fact-row { grid-template-columns: 190px minmax(0, 1fr); gap: 1.5rem; padding: 1rem 0; }
  .fact-row dt { padding-top: .2rem; }
}

/* ==========================================================================
   Zeitplan
   ========================================================================== */

.schedule-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.day-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.day-head {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  padding: .75rem 1rem;
  background: var(--green-800);
  color: #fff;
}

.day-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
}

.day-date {
  color: var(--gold-400);
  font-weight: 700;
  font-size: .9rem;
  font-variant-numeric: tabular-nums;
}

.day-note {
  color: #b9cbbf;
  font-weight: 500;
}

.day-events {
  list-style: none;
  padding: .35rem 1rem .6rem;
}

.day-events li {
  display: grid;
  grid-template-columns: 4.6rem minmax(0, 1fr);
  gap: .75rem;
  align-items: baseline;
  padding: .55rem 0;
  border-top: 1px dashed var(--line);
}

.day-events li:first-child { border-top: 0; }

.day-events time,
.day-events .time {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--green-700);
  white-space: nowrap;
}

.day-events .is-round {
  font-weight: 800;
  color: var(--green-800);
}

.day-events .is-round::before {
  content: "";
  display: inline-block;
  width: .5rem;
  height: .5rem;
  margin-right: .45rem;
  border-radius: 2px;
  background: var(--gold-500);
  transform: rotate(45deg) translateY(-2px);
}

@media (min-width: 560px) {
  .schedule-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1100px) {
  .schedule-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ==========================================================================
   Preisfonds
   ========================================================================== */

.prize-grid {
  display: grid;
  gap: 1.5rem;
}

.prize-title {
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold-700);
  margin-bottom: .85rem;
}

.prize-ranks {
  list-style: none;
  display: grid;
  gap: .5rem;
}

.prize-ranks li {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .6rem .9rem .6rem .6rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
}

.rank-badge {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  flex: none;
  border-radius: 50%;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--green-800);
  background: var(--green-50);
  border: 1px solid var(--green-100);
}

.rank-label { font-weight: 600; color: var(--muted); }

.rank-amount {
  margin-left: auto;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--green-800);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.prize-ranks .rank-1 {
  background: linear-gradient(90deg, var(--gold-100), #fff 70%);
  border-color: #e8d4a6;
}
.rank-1 .rank-badge { background: linear-gradient(145deg, #e9cf92, var(--gold-500)); border-color: var(--gold-600); color: var(--green-950); }
.rank-1 .rank-amount { font-size: 1.45rem; }
.rank-2 .rank-badge { background: linear-gradient(145deg, #f1f3f4, #c9ced2); border-color: #b6bcc1; }
.rank-3 .rank-badge { background: linear-gradient(145deg, #ecc9a4, #c8905c); border-color: #b27a48; color: #3b2410; }

.special-prizes {
  list-style: none;
  display: grid;
  gap: .5rem;
}

.special-prizes li {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-height: 3.65rem;
  padding: .6rem .9rem .6rem .75rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  font-weight: 600;
}

.special-prizes .icon {
  width: 2.4rem;
  height: 2.4rem;
  padding: .55rem;
  border-radius: 50%;
  color: var(--gold-700);
  background: var(--gold-100);
  border: 1px solid #ead8ad;
}

.special-label { min-width: 0; color: var(--ink); line-height: 1.3; }

.special-prizes .rank-amount small {
  font-family: var(--font-sans);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--muted);
  margin-right: .15rem;
}

.prize-amount-note {
  display: inline-block;
  margin-left: .35rem;
  padding: .1rem .5rem;
  border-radius: 999px;
  background: var(--gold-100);
  color: var(--gold-700);
  font-size: .78rem;
  letter-spacing: 0;
  text-transform: none;
  vertical-align: middle;
}

.note-list {
  list-style: none;
  display: grid;
  gap: .55rem;
  margin-top: 1.5rem;
  padding: 1.1rem 1.2rem;
  border-radius: 12px;
  background: var(--gold-50);
  border: 1px solid #eadbb6;
  font-size: .93rem;
}

.note-list li {
  position: relative;
  padding-left: 1.25rem;
}

.note-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62em;
  width: .45rem;
  height: .45rem;
  border-radius: 2px;
  background: var(--gold-500);
  transform: rotate(45deg);
}

@media (min-width: 860px) {
  .prize-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

/* ==========================================================================
   Hinweiskarten und Call-to-Action
   ========================================================================== */

.info-cards {
  display: grid;
  gap: 1rem;
}

.info-card {
  padding: 1.15rem 1.2rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #fff 0%, var(--green-50) 100%);
}

.info-card h3 {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .5rem;
}

.info-card h3 .icon {
  width: 2rem;
  height: 2rem;
  padding: .4rem;
  border-radius: 9px;
  background: var(--gold-100);
  color: var(--gold-700);
}

.info-card p { color: #3b4540; font-size: .95rem; }

@media (min-width: 860px) {
  .info-cards { grid-template-columns: repeat(3, 1fr); }
}

.cta-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
  margin-top: 1.5rem;
  padding: 1.25rem;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--green-800), var(--green-950));
  color: #dce7e0;
}

.cta-panel strong {
  display: block;
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.25rem;
}

@media (min-width: 640px) {
  .cta-panel { flex-direction: row; align-items: center; justify-content: space-between; padding: 1.4rem 1.6rem; }
  .cta-panel .btn { flex: none; }
}

/* ==========================================================================
   Unterseiten-Kopf
   ========================================================================== */

.page-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  margin-bottom: 1.5rem;
  padding: 1.6rem 1.35rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(155deg, var(--green-700) 0%, var(--green-800) 50%, var(--green-950) 100%);
  color: #dce7e0;
  box-shadow: var(--shadow-lg);
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: repeating-conic-gradient(rgba(255, 255, 255, .045) 0 25%, transparent 0 50%);
  background-size: 48px 48px;
  -webkit-mask-image: linear-gradient(250deg, #000 0%, transparent 60%);
  mask-image: linear-gradient(250deg, #000 0%, transparent 60%);
}

.page-hero .hero-kicker { font-size: .72rem; }

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 1.3rem + 2.2vw, 2.6rem);
  color: #fff;
  margin: .35rem 0 .4rem;
}

.page-hero h1 span { color: var(--gold-400); font-weight: 400; }

.page-hero p { max-width: 62ch; }

@media (min-width: 860px) {
  .page-hero { padding: 2.25rem 2.5rem; }
}

/* ==========================================================================
   Teilnehmerliste
   ========================================================================== */

.capacity {
  display: grid;
  gap: .5rem;
  margin: 0 0 1.25rem;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  background: var(--green-50);
  border: 1px solid var(--green-100);
}

.capacity-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}

#listStatus {
  margin: 0;
  font-weight: 700;
  color: var(--green-800);
}

.capacity-bar {
  height: 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--green-100);
  overflow: hidden;
}

.capacity-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green-600), var(--gold-500));
  transition: width .6s ease;
}

.table-note { color: var(--muted); font-size: .93rem; margin-bottom: 1rem; }

.table-responsive-wrapper {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.participants-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: .95rem;
}

.participants-table th,
.participants-table td {
  padding: .8rem 1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.participants-table thead th {
  background: var(--green-50);
  color: var(--green-800);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.participants-table tbody tr:last-child td { border-bottom: 0; }
.participants-table tbody tr:nth-child(even) { background: #fafcfa; }
.participants-table tbody tr:hover { background: var(--green-50); }

.participants-table .num,
.participants-table td:first-child { font-variant-numeric: tabular-nums; }

.player-name { font-weight: 700; color: var(--ink); }

.player-title {
  display: inline-block;
  margin-right: .35rem;
  padding: .05rem .4rem;
  border-radius: 5px;
  background: var(--green-800);
  color: var(--gold-400);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-decoration: none;
  vertical-align: 1px;
  cursor: help;
}

.status-badge {
  display: inline-block;
  padding: .2rem .65rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  white-space: nowrap;
  background: #eef1ef;
  color: var(--muted);
}

.status-paid { background: var(--success-bg); color: var(--success); }
.status-open { background: var(--warning-bg); color: var(--warning); }
.status-free { background: var(--gold-100); color: var(--gold-700); }
.status-waiting { background: #e9eef3; color: #3d5466; }

.empty-row td {
  text-align: center;
  color: var(--muted);
  padding: 1.75rem 1rem;
}

/* Mobile Kartenansicht für die öffentlichen Listen. */
@media (max-width: 639px) {
  .list-cards .table-responsive-wrapper { border: 0; background: transparent; overflow: visible; }
  .list-cards .participants-table,
  .list-cards .participants-table tbody { display: block; background: transparent; }
  .list-cards .participants-table thead {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap;
  }
  .list-cards .participants-table tbody tr {
    display: grid;
    grid-template-columns: 2.3rem auto minmax(0, 1fr) auto;
    gap: .2rem .75rem;
    align-items: center;
    margin-bottom: .6rem;
    padding: .8rem .9rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--shadow-sm);
  }
  .list-cards .participants-table tbody tr:nth-child(even),
  .list-cards .participants-table tbody tr:hover { background: #fff; }
  .list-cards .participants-table td { display: block; padding: 0; border: 0; min-width: 0; }
  .list-cards .participants-table td.c-num {
    grid-column: 1;
    grid-row: 1 / span 3;
    align-self: start;
    display: grid;
    place-items: center;
    width: 2.3rem;
    height: 2.3rem;
    border-radius: 50%;
    background: var(--green-800);
    color: var(--gold-400);
    font-weight: 800;
    font-size: .9rem;
  }
  .list-cards .participants-table td.c-name { grid-column: 2 / 4; grid-row: 1; overflow-wrap: anywhere; }
  .list-cards .participants-table td.c-club { grid-column: 2 / 4; grid-row: 2; color: var(--muted); font-size: .88rem; overflow-wrap: anywhere; }
  .list-cards .participants-table td.c-dwz { grid-column: 2; grid-row: 3; }
  .list-cards .participants-table td.c-elo { grid-column: 3; grid-row: 3; }
  .list-cards .participants-table td.c-dwz,
  .list-cards .participants-table td.c-elo { font-size: .82rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
  .list-cards .participants-table td.c-dwz::before,
  .list-cards .participants-table td.c-elo::before {
    content: attr(data-label) " ";
    font-weight: 800;
    color: var(--green-700);
  }
  .list-cards .participants-table td.c-status { grid-column: 4; grid-row: 1 / span 3; align-self: center; }
  .list-cards .participants-table tr.empty-row { display: block; text-align: center; }
  .list-cards .participants-table tr.empty-row td { padding: .75rem; }
}

/* ==========================================================================
   Formular
   ========================================================================== */

.registration-notice {
  display: grid;
  gap: 1rem;
  margin: 0 0 1.75rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid #e6d6ae;
  border-left: 5px solid var(--gold-500);
  border-radius: 12px;
  background: var(--gold-50);
  font-size: .93rem;
}

.registration-notice p { margin: 0; }

.lang-block { position: relative; padding-left: 2.6rem; }

.lang-tag {
  position: absolute;
  left: 0;
  top: .1rem;
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 1.4rem;
  border-radius: 6px;
  background: var(--green-800);
  color: var(--gold-400);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .06em;
}

.lang-block[lang="en"] { color: #46524c; }

@media (min-width: 860px) {
  .registration-notice { grid-template-columns: 1fr 1fr; gap: 2rem; padding: 1.3rem 1.5rem; }
}

fieldset.form-section {
  border: 0;
  margin: 0 0 1.5rem;
  padding: 0;
  min-width: 0;
}

.form-section legend {
  display: flex;
  align-items: center;
  gap: .6rem;
  width: 100%;
  margin-bottom: 1rem;
  padding-bottom: .55rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--green-800);
}

.form-section legend .step {
  display: inline-grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--gold-500);
  color: var(--green-950);
  font-family: var(--font-sans);
  font-size: .85rem;
  font-weight: 800;
}

.form-section legend small {
  font-family: var(--font-sans);
  font-size: .85rem;
  font-weight: 500;
  color: var(--muted);
}

.form-grid,
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 1.25rem;
}

@media (min-width: 640px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid .span-2 { grid-column: 1 / -1; }
  .grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
}

.form-group { margin-bottom: 1.1rem; min-width: 0; }

.form-group label,
.form-label {
  display: block;
  font-weight: 700;
  margin-bottom: .4rem;
  font-size: .9rem;
  color: var(--ink);
}

.req { color: var(--danger); }

input[type="text"],
input[type="email"],
input[type="date"],
input[type="tel"],
input[type="password"],
input[type="number"],
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: .7rem .85rem;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background-color: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
  -webkit-appearance: none;
  appearance: none;
}

select {
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23143628' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .8rem center;
  background-size: 1.1rem;
}

input[type="date"] { -webkit-appearance: auto; appearance: auto; }

input::placeholder, textarea::placeholder { color: #8b958f; }

input:hover, select:hover, textarea:hover { border-color: #aebbb3; }

input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none;
  border-color: var(--gold-500);
  box-shadow: 0 0 0 4px rgba(197, 160, 89, .25);
}

textarea { resize: vertical; min-height: 110px; }

#exportFormatHint {
  margin: -.2rem 0 1.25rem;
  padding: .75rem .9rem;
  border-radius: 10px;
  background: var(--green-50);
  color: var(--muted);
  font-size: .85rem;
}

.fee-box {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .5rem 1rem;
  margin: .5rem 0 1.5rem;
  padding: 1.1rem 1.25rem;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--green-800), var(--green-950));
  color: #fff;
  box-shadow: var(--shadow);
}

.fee-label { font-weight: 700; color: #dce7e0; }

.fee-value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gold-400);
  font-variant-numeric: tabular-nums;
}

.info-notice-box {
  display: grid;
  gap: .9rem;
  margin: 0 0 1.25rem;
  padding: 1.2rem 1.25rem;
  border: 1px solid var(--line);
  border-left: 5px solid var(--green-700);
  border-radius: 12px;
  background: #fafcfa;
  font-size: .92rem;
}

.info-notice-item { color: var(--ink); line-height: 1.5; }

.terms-list {
  display: grid;
  gap: .8rem;
  margin: .75rem 0 0 1.1rem;
}

.terms-list em { display: block; color: var(--muted); margin-top: .15rem; }

.foreign-notice-box {
  padding: 1rem 1.15rem;
  border: 1px solid #e2cb98;
  border-left: 5px solid var(--gold-500);
  border-radius: 12px;
  background: var(--gold-50);
}

.foreign-notice-box strong { color: var(--green-800); }

.foreign-notice-box .lang-en {
  display: block;
  margin-top: .35rem;
  font-size: .88rem;
  color: var(--muted);
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: .8rem;
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #fff;
  transition: border-color .2s ease, background-color .2s ease;
}

.checkbox-group:has(input:checked) {
  border-color: var(--green-600);
  background: var(--green-50);
}

.checkbox-group label { font-size: .93rem; cursor: pointer; }
.checkbox-group label .lang-en { display: block; margin-top: .3rem; font-size: .85rem; color: var(--muted); }

.checkbox-group input[type="checkbox"] {
  width: 22px;
  height: 22px;
  flex: none;
  margin-top: 1px;
  cursor: pointer;
  accent-color: var(--green-700);
}

.btn-container {
  margin-top: 1.75rem;
  text-align: center;
}

.btn-container .btn-cta { width: 100%; font-size: 1.05rem; min-height: 54px; }

@media (min-width: 640px) {
  .btn-container .btn-cta { width: auto; min-width: 320px; }
}

#registrationFeedback { margin: 1rem 0 0; text-align: center; color: var(--muted); }
#registrationFeedback:empty { display: none; }

.feedback-error,
.feedback-success {
  padding: .9rem 1.1rem;
  margin: 1rem 0;
  border-radius: 10px;
  text-align: left;
}

.feedback-error { color: #7d1418; background: var(--danger-bg); border: 1px solid #f0c4c5; }
.feedback-success { color: #155724; background: var(--success-bg); border: 1px solid #bfe2cb; }
#registrationFeedback.feedback-error, #listStatus.feedback-error { color: #7d1418; }

.success-message {
  display: none;
  margin-top: 1.5rem;
  padding: 1.5rem;
  border-radius: 14px;
  border: 1px solid #bfe2cb;
  border-top: 5px solid var(--success);
  background: var(--success-bg);
  color: #155724;
  text-align: center;
  box-shadow: var(--shadow);
}

.success-message h3 { font-size: 1.3rem; margin-bottom: .5rem; color: #155724; }
.success-message p { font-size: .97rem; margin-bottom: .9rem; }

.success-message a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .55rem 1.2rem;
  border-radius: 10px;
  background: var(--green-800);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.success-message a:hover { background: var(--green-700); color: var(--gold-400); }

.form-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ==========================================================================
   Fußbereich
   ========================================================================== */

.site-footer {
  margin-top: 2.5rem;
  background: var(--green-950);
  border-top: 3px solid var(--gold-500);
  color: #b9cbbf;
  font-size: .9rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.75rem var(--gutter) 2rem;
  display: grid;
  gap: 1.25rem;
  justify-items: center;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: .8rem;
  text-align: left;
}

.footer-brand img { width: auto; height: 46px; }
.footer-brand strong { display: block; color: #fff; font-family: var(--font-display); font-size: 1.05rem; }
.footer-brand span { display: block; color: var(--gold-400); font-size: .8rem; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .25rem 1.25rem;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: #dce7e0;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.footer-links a:hover, .footer-links a:focus-visible { color: var(--gold-400); }

@media (min-width: 860px) {
  .footer-inner { grid-template-columns: 1fr auto; justify-items: stretch; text-align: left; align-items: center; }
  .footer-links { justify-content: flex-end; }
}

/* Alte Fußzeile innerhalb von main (Verwaltung, ältere Seiten). */
main > footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted);
  font-size: .9rem;
  border-top: 1px solid var(--line);
  margin-top: 3rem;
}

/* ==========================================================================
   Turnierverwaltung (admin.php)
   ========================================================================== */

.admin-page {
  padding: 0;
  background-color: var(--bg);
  border-top: 5px solid var(--green-800);
  box-shadow: inset 0 3px 0 var(--gold-500);
}

.admin-page .container { max-width: 1200px; margin: 0 auto; padding-top: 2rem; padding-bottom: 2rem; }

.admin-page h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 1.3rem + 1.4vw, 2.2rem);
  color: var(--green-800);
  margin-bottom: .75rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--line);
}

.admin-page h2 { margin-top: 2rem; }
.admin-page p { margin: .9rem 0; }
.admin-page a { color: var(--green-700); font-weight: 600; }

.admin-page button:not(.btn-cta) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: .5rem .95rem;
  border-radius: 9px;
  border: 1px solid var(--green-700);
  background: #fff;
  color: var(--green-800);
  font: inherit;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}

.admin-page button:not(.btn-cta):hover,
.admin-page button:not(.btn-cta):focus-visible { background: var(--green-800); color: #fff; }

.admin-page button[value="cancel"] { border-color: #c98b8d; color: var(--danger); }
.admin-page button[value="cancel"]:hover,
.admin-page button[value="cancel"]:focus-visible { background: var(--danger); border-color: var(--danger); color: #fff; }

.admin-page .form-group:has(> #password) { max-width: 420px; }
.admin-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.admin-page .admin-actions { align-items: center; }
.admin-page td { vertical-align: top; overflow-wrap: anywhere; }
.admin-page details { margin-top: .5rem; }
.admin-page summary { cursor: pointer; font-weight: 700; color: var(--green-800); }
.admin-page details.registration-notice { display: block; border-left-color: var(--green-700); background: #fafcfa; border-color: var(--line); }
.admin-page .participants-table { white-space: normal; }
.admin-page .participants-table td { min-width: 150px; }
.admin-page .participants-table td:first-child { min-width: 230px; }
.admin-page .grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 0 1.25rem; }
.admin-page #mail-status { margin-top: 2rem; }
.admin-page #edit-player { padding: 1rem; box-shadow: none; }
.admin-page .feedback-error li { margin-left: 1rem; }
.admin-page small { color: var(--muted); }
.admin-page label input[type="checkbox"] { width: 18px; height: 18px; margin-right: .35rem; vertical-align: -3px; accent-color: var(--green-700); }

/* ==========================================================================
   Druckansicht
   ========================================================================== */

@media print {
  body { background: #fff; }
  .site-header { position: static; box-shadow: none; }
  .main-nav, .section-nav, .hero-actions, .skip-link { display: none !important; }
  .hero, .page-hero { box-shadow: none; }
  section { box-shadow: none; break-inside: avoid; }
}
