/* Gurkenzentrale – eXp_LP-Look: Pink-Neon-Graffiti auf schwarzer Wand, die Gurke als zweite Farbe.
   Mutig ist nur die Marker-Schrift; alles andere bleibt ruhig und gut lesbar. */

@font-face { font-family: "Marker"; src: url("fonts/permanent-marker-latin-400-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Barlow"; src: url("fonts/barlow-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("fonts/barlow-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("fonts/barlow-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("fonts/barlow-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --wand: #000;            /* die Wand */
  --putz: #17121a;         /* Flächen, leicht pflaumig */
  --fuge: #2b2230;         /* Linien */
  --spray: #ff2ea6;        /* eXp-Pink */
  --spray-tief: #b3146f;
  --gurke: #8fd43a;        /* Gurkengrün */
  --senf: #ffd23f;         /* Boni */
  --kreide: #f6eff7;       /* Text */
  --grau: #a596ad;         /* Nebentext */
  --rot: #ff6b5e;

  --marker: "Marker", "Comic Sans MS", cursive;
  --text: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --breite: 46rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--wand);
  color: var(--kreide);
  font: 400 1.0625rem/1.55 var(--text);
  font-variant-numeric: tabular-nums;
}
a { color: var(--spray); text-underline-offset: 0.2em; }
a:hover { color: var(--kreide); }
:focus-visible { outline: 3px solid var(--gurke); outline-offset: 3px; border-radius: 4px; }
img { display: block; }

/* ---------- Gerüst ---------- */
.kopf, .seite, .fuss { width: min(100% - 2rem, var(--breite)); margin-inline: auto; }
.kopf {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem 0; border-bottom: 1px solid var(--fuge);
}
.logo { font: 1.45rem/1 var(--marker); color: var(--kreide); text-decoration: none; transform: rotate(-2deg); }
.logo span { color: var(--gurke); }
.nav { display: flex; gap: 0.25rem 1.1rem; flex-wrap: wrap; justify-content: flex-end; }
.nav a { color: var(--grau); text-decoration: none; font-weight: 600; }
.nav a[aria-current="page"], .nav a:hover { color: var(--kreide); }
.nav a.login { color: var(--spray); }

.seite { padding: 2rem 0 4rem; min-height: 60vh; }
.fuss { border-top: 1px solid var(--fuge); padding: 1.5rem 0 3rem; color: var(--grau); font-size: 0.9rem; display: flex; gap: 1.25rem; flex-wrap: wrap; }
.fuss a { color: var(--grau); }

/* ---------- Typo ---------- */
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.15; }
.tag { /* gesprühte Überschrift */
  font: 400 clamp(2.6rem, 9vw, 4.2rem)/1 var(--marker);
  color: var(--spray);
  transform: rotate(-2.5deg);
  transform-origin: left bottom;
  display: inline-block;
  margin: 0.4rem 0 0.2rem;
}
.tropfen { display: block; width: min(16rem, 70%); height: 1.6rem; margin: -0.2rem 0 1.25rem 0.5rem; }
h2 { font-size: 1.3rem; margin: 2.75rem 0 0.9rem; }
.leise { color: var(--grau); }
.klein { font-size: 0.92rem; }
p { margin: 0 0 1rem; max-width: 38rem; }

/* ---------- Bausteine ---------- */
.knopf {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font: 600 1rem/1 var(--text); color: var(--wand); background: var(--spray);
  border: 0; border-radius: 0.5rem; padding: 0.8rem 1.15rem; text-decoration: none; cursor: pointer;
}
.knopf:hover { background: var(--kreide); color: var(--wand); }
.knopf.zweit { background: transparent; color: var(--kreide); box-shadow: inset 0 0 0 1px var(--fuge); }
.knopf.zweit:hover { box-shadow: inset 0 0 0 1px var(--kreide); }
.knopf.warn { background: transparent; color: var(--rot); box-shadow: inset 0 0 0 1px var(--rot); }

.live {
  display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 600; color: var(--kreide);
  text-decoration: none; padding: 0.35rem 0.75rem; border-radius: 999px; background: var(--putz);
}
.live::before { content: ""; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--rot); }

.avatar {
  width: 2.5rem; height: 2.5rem; border-radius: 50%; object-fit: cover; flex: none;
  background: var(--putz); color: var(--grau); display: grid; place-items: center; font-weight: 700;
}

/* ---------- Liga ---------- */
.podest { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; align-items: end; margin: 1.5rem 0 0.5rem; }
.platz { text-align: center; text-decoration: none; color: var(--kreide); display: grid; justify-items: center; gap: 0.35rem; }
.platz .nr { font: 2.6rem/1 var(--marker); color: var(--spray); }
.platz:nth-child(1) .nr { font-size: 3.6rem; color: var(--gurke); }
.platz .avatar { width: 3.6rem; height: 3.6rem; }
.platz:nth-child(1) .avatar { width: 4.6rem; height: 4.6rem; box-shadow: 0 0 0 3px var(--gurke); }
.platz .name { font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.platz .zahl { color: var(--grau); }
/* Reihenfolge: 2 – 1 – 3 */
.platz:nth-child(1) { order: 2; }
.platz:nth-child(2) { order: 1; }
.platz:nth-child(3) { order: 3; }

.tabelle { list-style: none; margin: 1.25rem 0 0; padding: 0; }
.zeile {
  display: grid; grid-template-columns: 2.6rem 2.5rem 1fr auto; align-items: center; gap: 0.75rem;
  padding: 0.6rem 0; border-bottom: 1px solid var(--fuge);
}
.zeile .nr { font: 1.35rem/1 var(--marker); color: var(--grau); text-align: right; }
.zeile .wer { min-width: 0; }
.zeile .wer a, .zeile .wer span.name { font-weight: 600; color: var(--kreide); text-decoration: none; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zeile .wer a:hover { color: var(--spray); }
.zeile .zahl { font-weight: 600; text-align: right; }
.zeile.ich { background: linear-gradient(90deg, rgb(255 46 166 / 0.14), transparent 70%); }
.bewegung { font-size: 0.85rem; font-weight: 600; }
.bewegung.hoch { color: var(--gurke); }
.bewegung.runter { color: var(--rot); }
.bewegung.neu { color: var(--senf); }

/* ---------- Zentrale ---------- */
.ich-kopf { display: flex; align-items: center; gap: 0.9rem; }
.ich-kopf .avatar { width: 3.5rem; height: 3.5rem; }
.stand { margin: 1.75rem 0 0.5rem; }
.stand .betrag { font: clamp(3.6rem, 16vw, 6rem)/0.9 var(--marker); color: var(--gurke); transform: rotate(-2deg); display: inline-block; }
.stand .einheit { font-weight: 600; margin-left: 0.5rem; }
.werte { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 1rem 1.5rem; margin: 1.5rem 0 0; padding: 1rem 0; border-block: 1px solid var(--fuge); }
.werte dt { color: var(--grau); font-size: 0.9rem; }
.werte dd { margin: 0.1rem 0 0; font-size: 1.35rem; font-weight: 700; }

.kurs { position: relative; margin-top: 0.5rem; }
.kurs svg { width: 100%; height: auto; display: block; overflow: visible; }
.kurs .achse { fill: var(--grau); font: 500 12px var(--text); }
.kurs .gitter { stroke: var(--fuge); stroke-width: 1; }
.kurs .linie { fill: none; stroke: var(--spray); stroke-width: 2.5; stroke-linejoin: round; }
.kurs .flaeche { fill: url(#kursFarbe); }
.kurs .punkt { fill: var(--spray); stroke: var(--wand); stroke-width: 3; }
.kurs .marke { stroke: var(--grau); stroke-dasharray: 3 3; }
.kurs-info { position: absolute; top: 0; left: 0; pointer-events: none; background: var(--putz); border: 1px solid var(--fuge); border-radius: 0.4rem; padding: 0.35rem 0.6rem; font-size: 0.9rem; white-space: nowrap; transform: translate(-50%, -110%); }

.quellen-balken { display: flex; height: 0.9rem; border-radius: 0.45rem; overflow: hidden; gap: 2px; margin: 0.25rem 0 0.9rem; }
.quellen-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.quellen-liste li { display: grid; grid-template-columns: 0.8rem 1fr auto; align-items: center; gap: 0.6rem; }
.quellen-liste .farbe { width: 0.8rem; height: 0.8rem; border-radius: 0.2rem; }

.auszug { list-style: none; margin: 0; padding: 0; }
.auszug > li { padding: 0.8rem 0; border-bottom: 1px solid var(--fuge); }
.auszug .oben { display: flex; justify-content: space-between; gap: 1rem; font-weight: 600; }
.auszug .titel { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auszug .plus { color: var(--gurke); white-space: nowrap; }
.auszug .minus { color: var(--rot); white-space: nowrap; }
.auszug .unten { color: var(--grau); font-size: 0.92rem; }

.einstellung { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.9rem 0; border-bottom: 1px solid var(--fuge); }
.schalter { appearance: none; width: 3rem; height: 1.7rem; border-radius: 999px; background: var(--fuge); position: relative; cursor: pointer; flex: none; margin: 0; }
.schalter::after { content: ""; position: absolute; top: 0.2rem; left: 0.2rem; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: var(--kreide); transition: transform 0.15s; }
.schalter:checked { background: var(--spray); }
.schalter:checked::after { transform: translateX(1.3rem); }
details.gefahr { margin-top: 1.5rem; }
details.gefahr summary { cursor: pointer; color: var(--grau); }
details.gefahr input { font: inherit; padding: 0.6rem 0.8rem; border-radius: 0.4rem; border: 1px solid var(--fuge); background: var(--putz); color: var(--kreide); margin: 0.5rem 0.5rem 0.5rem 0; }

/* ---------- Hall of Fame ---------- */
.saison { padding: 1.25rem 0; border-bottom: 1px solid var(--fuge); }
.saison h3 { font: 1.6rem/1 var(--marker); color: var(--spray); font-weight: 400; }
.saison ol { list-style: none; margin: 0.9rem 0 0; padding: 0; display: grid; gap: 0.5rem; }
.saison li { display: flex; align-items: center; gap: 0.75rem; }
.saison .medaille { font: 1.3rem/1 var(--marker); width: 1.5rem; color: var(--grau); }
.saison li:first-child .medaille { color: var(--gurke); }

/* ---------- Leere Zustände, Fehler, Laden ---------- */
.hinweis { background: var(--putz); border-radius: 0.6rem; padding: 1.25rem; margin: 1.5rem 0; }
.hinweis p:last-child { margin-bottom: 0; }
.fehler { color: var(--rot); }
.laden { color: var(--grau); }

.text h2 { font-size: 1.15rem; margin-top: 1.75rem; }

@media (max-width: 30rem) {
  .zeile { grid-template-columns: 2rem 2.2rem 1fr auto; gap: 0.55rem; }
  .avatar { width: 2.2rem; height: 2.2rem; }
  .podest { gap: 0.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- Spielerkarte ---------- */
.zeile-oben { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1rem; }
.zeile-oben h1 { font-size: 1.6rem; }
.oben-raster { display: grid; grid-template-columns: minmax(0, 15.5rem) minmax(0, 1fr); gap: 1.75rem; align-items: start; margin-top: 1.5rem; }
.oben-rechts { min-width: 0; }
.oben-rechts .stand { margin-top: 0.25rem; }
.oben-rechts .werte { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.karte {
  --rand: #c98a52; --schein: rgb(201 138 82 / 0.16);
  margin: 0; padding: 1rem 1rem 0.9rem; border-radius: 1rem;
  background: linear-gradient(160deg, var(--schein), transparent 55%), var(--putz);
  border: 2px solid var(--rand);
  display: grid; justify-items: center; gap: 0.6rem; text-align: center;
}
.karte.stufe-silber { --rand: #cfc8d8; --schein: rgb(207 200 216 / 0.16); }
.karte.stufe-gold { --rand: var(--senf); --schein: rgb(255 210 63 / 0.18); }
.karte.stufe-neon { --rand: var(--spray); --schein: rgb(255 46 166 / 0.22); box-shadow: 0 0 0 1px var(--spray), 0 0 28px rgb(255 46 166 / 0.45); }
.k-kopf { width: 100%; display: flex; justify-content: space-between; align-items: center; }
.k-gesamt { font: 2.4rem/1 var(--marker); color: var(--rand); }
.k-stufe { font-weight: 700; color: var(--rand); }
.karte .avatar { width: 7rem; height: 7rem; font-size: 2.6rem; box-shadow: 0 0 0 3px var(--rand); }
.k-name { font: 1.35rem/1.1 var(--marker); color: var(--kreide); max-width: 100%; overflow-wrap: anywhere; }
.k-werte { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.4rem 0.75rem; padding-top: 0.6rem; border-top: 1px solid var(--fuge); }
.k-wert { display: flex; align-items: baseline; gap: 0.45rem; font-size: 0.85rem; color: var(--grau); text-align: left; }
.k-zahl { font-weight: 700; font-size: 1.15rem; color: var(--kreide); min-width: 1.6rem; }
.k-fuss { margin: 0; font-size: 0.8rem; color: var(--grau); }

.kurs .linie.gruen { stroke: var(--gurke); }
.kurs .punkt.gruen { fill: var(--gurke); }
.kurs .tagpunkt { fill: var(--gurke); }

/* ---------- Achievements ---------- */
.erfolge { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 0.75rem 1.5rem; }
.erfolge li { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); gap: 0.75rem; align-items: start; padding: 0.6rem 0; border-bottom: 1px solid var(--fuge); }
.erfolge p { margin: 0.1rem 0 0; }
.abzeichen { width: 2.6rem; height: 2.6rem; border-radius: 50%; display: grid; place-items: center; font: 1.3rem/1 var(--marker); }
.erfolge .frei .abzeichen { background: var(--gurke); color: var(--wand); transform: rotate(-6deg); }
.erfolge .zu .abzeichen { background: var(--putz); color: var(--grau); border: 1px dashed var(--fuge); }
.erfolge .zu strong, .erfolge .zu p { color: var(--grau); }

@media (max-width: 40rem) {
  .oben-raster { grid-template-columns: minmax(0, 1fr); }
  .karte { max-width: 20rem; width: 100%; justify-self: center; }
}

/* ---------- Meldungen ---------- */
.toast { position: fixed; left: 50%; bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--putz); color: var(--kreide); border: 1px solid var(--fuge); border-radius: 0.6rem; padding: 0.75rem 1.1rem; max-width: calc(100% - 2rem); z-index: 20; font-weight: 600; }
.toast.gut { border-color: var(--gurke); }
.toast.schlecht { border-color: var(--rot); }

/* ---------- Ausrüstung und Shop ---------- */
.r-gewoehnlich { --r: #a596ad; }
.r-selten { --r: #4fb3ff; }
.r-episch { --r: #c86bff; }
.r-legendaer { --r: var(--senf); }

.slots { list-style: none; margin: 1rem 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 0.75rem; }
.slot { display: grid; gap: 0.2rem; align-content: start; padding: 0.85rem; border-radius: 0.7rem; background: var(--putz); border: 1px solid var(--r, var(--fuge)); }
.slot.leer { border-style: dashed; border-color: var(--fuge); }
.slot-name { color: var(--grau); font-size: 0.85rem; }
.slot strong { color: var(--r, var(--kreide)); }
.haltbarkeit { height: 0.4rem; border-radius: 0.2rem; background: var(--fuge); overflow: hidden; margin-top: 0.3rem; }
.haltbarkeit span { display: block; height: 100%; background: var(--gurke); }
.klein-knopf { padding: 0.5rem 0.8rem; font-size: 0.9rem; justify-self: start; margin-top: 0.35rem; }
.vorrat { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; }

.regale { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: 1.25rem 2rem; }
.regal h3 { font-size: 1.05rem; margin: 0 0 0.4rem; }
.regal ul { list-style: none; margin: 0; padding: 0; }
.ware { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--fuge); }
.ware > div { display: grid; min-width: 0; }
.ware strong { color: var(--r, var(--kreide)); }
.ware .klein-knopf { margin: 0; flex: none; }
.getragen { color: var(--gurke); font-weight: 600; flex: none; }

.tabelle-rahmen { overflow-x: auto; margin: 1rem 0; }
.abenteuer-tabelle { border-collapse: collapse; width: 100%; min-width: 26rem; }
.abenteuer-tabelle th, .abenteuer-tabelle td { text-align: left; padding: 0.55rem 0.75rem 0.55rem 0; border-bottom: 1px solid var(--fuge); }
.abenteuer-tabelle th { color: var(--grau); font-weight: 500; font-size: 0.9rem; }
.abenteuer-tabelle td:not(:first-child), .abenteuer-tabelle th:not(:first-child) { text-align: right; }

.trophaeen { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.trophae { background: var(--senf); color: var(--wand); font-weight: 700; border-radius: 999px; padding: 0.15rem 0.7rem; font-size: 0.9rem; }

/* ---------- Admin ---------- */
.reiter { display: flex; gap: 0.35rem; flex-wrap: wrap; margin: 0 0 1.25rem; border-bottom: 1px solid var(--fuge); }
.reiter button { background: none; border: 0; color: var(--grau); font: 600 1rem var(--text); padding: 0.55rem 0.8rem; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.reiter button:hover { color: var(--kreide); }
.reiter button[aria-selected="true"] { color: var(--kreide); border-bottom-color: var(--spray); }
.knopfreihe { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin: 0.5rem 0; }
.formzeile { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0.5rem 0; }
.formzeile input { flex: 1 1 12rem; min-width: 0; }
#admin-panel input[type="text"], #admin-panel input[type="search"], #admin-panel input[type="number"], #admin-panel select {
  background: var(--putz); color: var(--kreide); border: 1px solid var(--fuge); border-radius: 0.45rem;
  padding: 0.55rem 0.7rem; font: inherit; max-width: 100%;
}
#admin-panel input[type="search"] { width: 100%; }
#admin-panel input:focus, #admin-panel select:focus { border-color: var(--spray); outline: none; }
#admin-panel .zahlfeld { width: 7rem; text-align: right; }
#admin-panel input[type="checkbox"]:not(.schalter) { accent-color: var(--spray); vertical-align: middle; }
.knopf:disabled { opacity: 0.5; cursor: wait; }
.knopf.mini { padding: 0.2rem 0.6rem; font-size: 0.85rem; }
.zeile.admin-zeile { grid-template-columns: 2.25rem minmax(0, 1fr) auto; }
.admin-zeile .wer span.klein { display: block; }
.admin-unten { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.auszug li.storniert .plus, .auszug li.storniert .minus { text-decoration: line-through; color: var(--grau); }
.hinweis.klein { padding: 0.75rem 1rem; }
