/* =========================================================================
   Schmückstück – Brand-System (verifiziert lt. Brand Kit)
   Hintergrund Reinweiß · Schrift immer Tinte · ein Akzent (Zartrosa).
   ========================================================================= */
:root {
  --brand-bg:        #ffffff;   /* Reinweiß – Bühne */
  --brand-surface:   #ffffff;   /* Karten */
  --brand-ink:       #2a2622;   /* Tinte – einzige Schriftfarbe */
  --brand-muted:     #8a827b;   /* sekundärer Text (Tinte, aufgehellt) */
  --brand-accent:    #e47d73;   /* Zartrosa – CTA/Buttons/Grafik, NIE Text */
  --brand-accent-d:  #d96a5f;   /* dunklere Variante (Hover) */
  --brand-accent-bg: #fbeeec;   /* sehr helle Akzentfläche (Badges) */
  --brand-border:    #ece8e4;   /* warme, ruhige Trennlinie */
  --radius:          14px;
  --shadow:          0 6px 28px rgba(42, 38, 34, .06);
  --font:            "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--brand-ink);
  background: var(--brand-bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body.centered {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

/* --- Brand / Logo --- */
.brand { display: flex; align-items: center; gap: 12px; }
.brand--stacked { flex-direction: column; gap: 16px; text-align: center; }
.brand__logo { height: 26px; width: auto; }              /* Wortmarke = Logo */
.brand--stacked .brand__logo { height: auto; width: 100%; max-width: 230px; }
.brand__caption {
  font-size: .8rem; font-weight: 500; letter-spacing: .14em;
  text-transform: uppercase; color: var(--brand-muted);
}

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--brand-border);
}
.topbar__link {
  color: var(--brand-muted); text-decoration: none; font-size: .88rem;
  letter-spacing: .02em;
}
.topbar__link:hover { color: var(--brand-accent); }

/* --- Layout --- */
.layout {
  max-width: 680px;
  margin: 40px auto;
  padding: 0 20px;
  display: grid;
  gap: 24px;
}

/* --- Cards --- */
.card {
  background: var(--brand-surface);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
}
.card--narrow { width: 100%; max-width: 380px; }

.h1 { font-size: 1.55rem; font-weight: 700; margin: 0 0 6px; letter-spacing: -.01em; }
.h2 { font-size: 1.1rem; font-weight: 700; margin: 0 0 18px; letter-spacing: .01em; }
.muted { color: var(--brand-muted); margin: 0 0 24px; }

/* --- Form --- */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; grid-column: 1 / -1; }
.field--small { grid-column: span 1; }
.field__label {
  font-size: .76rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--brand-muted);
}
.field__input {
  font: inherit;
  color: var(--brand-ink);
  padding: 12px 13px;
  border: 1px solid var(--brand-border);
  border-radius: 10px;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.field__input:focus {
  outline: none;
  border-color: var(--brand-accent);
  box-shadow: 0 0 0 3px rgba(228, 125, 115, .18);
}

.btn {
  grid-column: 1 / -1;
  font: inherit; font-weight: 700; letter-spacing: .02em;
  color: #fff;
  background: var(--brand-accent);
  border: none;
  border-radius: 10px;
  padding: 13px 16px;
  cursor: pointer;
  transition: background .15s, transform .02s;
}
.btn:hover { background: var(--brand-accent-d); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: progress; }

/* --- Status / Alerts --- */
.status { margin-top: 18px; font-size: .92rem; }
.status--info  { color: var(--brand-muted); }
.status--error { color: #b4232a; }

.alert { margin: 4px 0 0; font-size: .88rem; }
.alert--error { color: #b4232a; }

/* --- Ergebnisliste --- */
.results { list-style: none; counter-reset: rank; margin: 0; padding: 0; }
.results__item {
  counter-increment: rank;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 4px;
  border-bottom: 1px solid var(--brand-border);
}
.results__item:last-child { border-bottom: none; }
.results__item::before {
  content: counter(rank);
  flex: 0 0 28px;
  height: 28px; width: 28px;
  display: grid; place-items: center;
  font-size: .78rem; font-weight: 700;
  color: var(--brand-accent-d);
  background: var(--brand-accent-bg);
  border-radius: 50%;
}
.results__name { flex: 1; font-weight: 600; }
.results__dist { color: var(--brand-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

@media (max-width: 480px) {
  .card { padding: 22px; }
  .form { grid-template-columns: 1fr; }
  .field--small { grid-column: 1 / -1; }
}
