/* Lunaria – öffentliche Seite. Mobile first. Tokens kommen aus /assets/base.css.
   Gestaltung: ruhiger, neutraler Grund, klare Rahmen, kleine Radien, keine Deko-Animationen. */

body {
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin-inline: auto;
  padding-inline: 16px;
}
.container.narrow { max-width: 720px; }
@media (min-width: 640px) { .container { padding-inline: 24px; } }

.break { overflow-wrap: anywhere; }

.skip-link {
  position: fixed;
  top: 8px; left: 8px;
  z-index: 100;
  padding: .55rem .9rem;
  border-radius: var(--radius-s);
  background: var(--focus);
  color: #1a1400;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
}
.skip-link:focus-visible { transform: none; color: #1a1400; }

/* Kleine Beschriftung über Überschriften – schlicht, ohne Versalien-Sperrung */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin: 0 0 .35rem;
  color: var(--text-dim);
  font-size: var(--fs-s);
  font-weight: 600;
}
.eyebrow svg { width: 1rem; height: 1rem; }

.lead { font-size: var(--fs-l); max-width: 62ch; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-0);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-height: 58px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
}
.brand:hover { color: var(--text); }
.brand img { width: 28px; height: 28px; }
.brand-name {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -.01em;
}

.nav-toggle {
  order: 3;
  display: inline-grid;
  place-items: center;
  width: 42px; height: 42px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-s);
  background: var(--surface);
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 18px; height: 2px;
  background: var(--text);
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-open .nav-toggle-bars { background: transparent; }
.nav-open .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

.site-nav {
  position: absolute;
  top: 100%; left: 0; right: 0;
  display: none;
  padding: .5rem 16px 1rem;
  background: var(--bg-0);
  border-bottom: 1px solid var(--border);
}
.nav-open .site-nav { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.site-nav a {
  display: block;
  padding: .75rem .8rem;
  border-radius: var(--radius-s);
  color: var(--text-muted);
  font-weight: 600;
  text-decoration: none;
}
.site-nav a:hover { color: var(--text); background: var(--surface-2); }
.site-nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); box-shadow: inset 3px 0 0 var(--accent); }

.online-pill {
  order: 2;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .35rem .7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  color: var(--text-muted);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.online-pill:hover { color: var(--text); border-color: var(--border-strong); }

@media (min-width: 960px) {
  .nav-toggle { display: none; }
  .site-nav {
    position: static;
    display: block;
    padding: 0;
    background: none;
    border: 0;
    order: 1;
    margin-right: .5rem;
  }
  .site-nav ul { display: flex; gap: .1rem; }
  .site-nav a { padding: .45rem .75rem; font-size: var(--fs-s); }
  .site-nav a[aria-current="page"] { background: none; box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
}

/* ---------- Wartung ---------- */

.maintenance {
  background: var(--c-yellow-soft);
  border-bottom: 1px solid rgba(238, 198, 67, .4);
  color: #f6e3a3;
}
.maintenance-inner { display: flex; gap: .75rem; align-items: flex-start; padding-block: .65rem; }
.maintenance svg { width: 1.2rem; height: 1.2rem; flex: none; color: var(--c-yellow); margin-top: .15rem; }
.maintenance p { margin: 0; font-size: var(--fs-s); }

/* ---------- Main ---------- */

.site-main { flex: 1; outline: none; }
.site-main h1:focus, .site-main h2:focus, .site-main [tabindex="-1"]:focus { outline: none; }
.noscript { padding-block: 4rem; }

.section { padding-block: clamp(2.25rem, 5vw, 3.5rem); }
.section-tight { padding-top: .5rem; }
.section-last { padding-bottom: clamp(3rem, 6vw, 4.5rem); }
.section-head { margin-bottom: 1.25rem; max-width: 720px; }
.section-head h2 { font-size: var(--fs-xl); margin-bottom: .25rem; }
.section-lead { margin: 0; }

.page-head { padding-block: clamp(2rem, 5vw, 3rem) 1.25rem; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; }
.page-head h1 { font-size: var(--fs-2xl); margin-bottom: .35rem; }
.page-head .lead { margin: 0; font-size: var(--fs-m); }
.page-head-inner { display: grid; gap: 1.25rem; align-items: end; }
@media (min-width: 900px) { .page-head-inner { grid-template-columns: 1.4fr 1fr; } }
.head-search { padding: .9rem; }

/* ---------- Startseite: Kopfbereich ---------- */

.hero {
  padding-block: clamp(2rem, 5vw, 3.5rem);
  border-bottom: 1px solid var(--border);
  background: var(--bg-0);
}
.hero-inner { display: grid; gap: 2rem; }
@media (min-width: 900px) { .hero-inner { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; gap: 3rem; } }

.hero-title {
  margin: 0 0 .4rem;
  font-size: var(--fs-3xl);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.05;
  color: var(--text);
}
.hero-lead { font-size: var(--fs-l); color: var(--text-muted); max-width: 40rem; margin-bottom: 1.5rem; }

.join-box {
  max-width: 36rem;
  padding: 1rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
}
.join-label { margin: 0 0 .45rem; color: var(--text-muted); font-size: var(--fs-s); font-weight: 600; }
.address-row { display: flex; gap: .5rem; align-items: stretch; flex-wrap: wrap; }
.address {
  flex: 1 1 12rem;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: .5rem .8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  background: var(--bg-0);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 1.05rem;
  overflow-wrap: anywhere;
  user-select: all;
}
.address.is-missing { color: var(--text-dim); font-family: var(--font-sans); font-size: var(--fs-s); user-select: auto; }
.copy-btn { min-width: 8.5rem; }
.copy-btn.is-copied { background: var(--c-green); border-color: var(--c-green); }

.live { display: flex; align-items: center; gap: .5rem; margin-top: .85rem; font-size: var(--fs-s); color: var(--text-muted); }
.live-count { color: var(--text); }
.live-groups { list-style: none; margin: .6rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.live-groups:empty { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .15rem .3rem .15rem .55rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.chip-count { padding: 0 .35rem; border-radius: 3px; background: var(--surface-2); color: var(--text); font-weight: 700; }

.hero-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.25rem; }

.hero-steps {
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.steps-title { font-size: var(--fs-l); margin-bottom: .9rem; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; counter-reset: step; }
.step { position: relative; padding-left: 2.4rem; counter-increment: step; }
.step::before {
  content: counter(step);
  position: absolute;
  left: 0; top: .05rem;
  display: grid; place-items: center;
  width: 1.65rem; height: 1.65rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-s);
  color: var(--text);
  font-size: var(--fs-s);
  font-weight: 700;
}
.step-title { margin: 0; font-weight: 600; }
.step-text { margin: 0; font-size: var(--fs-s); }

/* ---------- Spielmodi ---------- */

.accent-purple { --accent-c: var(--c-purple); --accent-c-soft: var(--c-purple-soft); }
.accent-blue { --accent-c: var(--c-blue); --accent-c-soft: var(--c-blue-soft); }
.accent-pink { --accent-c: var(--c-pink); --accent-c-soft: var(--c-pink-soft); }
.accent-yellow { --accent-c: var(--c-yellow); --accent-c-soft: var(--c-yellow-soft); }

.mode-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}
.mode-card {
  display: flex;
  flex-direction: column;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent-c, var(--border-strong));
  border-radius: var(--radius);
  background: var(--surface);
}
.mode-top { display: flex; align-items: center; gap: .75rem; margin-bottom: .6rem; }
.mode-icon {
  display: grid; place-items: center; flex: none;
  width: 40px; height: 40px;
  border-radius: var(--radius-s);
  background: var(--accent-c-soft, var(--surface-2));
  color: var(--accent-c, var(--text));
}
.mode-icon svg { width: 22px; height: 22px; }
.mode-heading { min-width: 0; }
.mode-name { margin: 0; font-size: 1.1rem; }
.mode-tagline { margin: 0; color: var(--text-muted); font-size: var(--fs-s); }
.mode-desc { color: var(--text-muted); font-size: var(--fs-s); flex: 1; margin-bottom: .6rem; }
.mode-tags { margin: 0 0 .75rem; color: var(--text-dim); font-size: var(--fs-xs); }
.mode-foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 1.6rem; padding-top: .6rem; border-top: 1px solid var(--border); }
.mode-live { display: inline-flex; align-items: center; gap: .45rem; margin: 0; font-size: var(--fs-xs); color: var(--text-muted); }
.mode-link {
  display: inline-flex; align-items: center; gap: .3rem;
  margin-left: auto;
  color: var(--text);
  font-size: var(--fs-s);
  font-weight: 600;
  text-decoration: none;
}
.mode-link svg { width: 1rem; height: 1rem; }
.mode-link:hover { color: var(--accent); text-decoration: underline; }

/* ---------- Neuigkeiten ---------- */

.news-list { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.news-card { display: flex; flex-direction: column; padding: 1.1rem 1.2rem; }
.news-meta { display: flex; align-items: center; gap: .4rem; margin: 0 0 .3rem; font-size: var(--fs-xs); }
.news-meta svg { width: .95rem; height: .95rem; }
.news-title { font-size: 1.15rem; margin-bottom: .5rem; }
.news-body { white-space: pre-line; color: var(--text-muted); font-size: var(--fs-s); flex: 1; overflow-wrap: anywhere; }
.news-body.is-clamped {
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: auto; padding-top: .6rem; border-top: 1px solid var(--border); }
.news-author { display: inline-flex; align-items: center; gap: .5rem; font-size: var(--fs-xs); color: var(--text-muted); font-weight: 600; }
.news-author img { width: 24px; height: 24px; border-radius: 3px; }
.news-more { margin-top: 1rem; display: flex; justify-content: center; }
.news-more:empty { display: none; }

/* ---------- Team-Bewerbung (Startseite) ---------- */

.join-team {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem;
  padding: 1.25rem 1.4rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
}
.join-team h2 { font-size: var(--fs-l); margin-bottom: .2rem; }
.join-team p { margin: 0; }
.join-team-actions { display: flex; flex-wrap: wrap; gap: .5rem; }

/* ---------- Zustände ---------- */

.state {
  display: grid;
  justify-items: center;
  gap: .4rem;
  padding: 2rem 1.25rem;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  text-align: center;
}
.state-icon {
  display: grid; place-items: center;
  width: 48px; height: 48px;
  margin-bottom: .3rem;
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text-muted);
}
.state-icon svg { width: 24px; height: 24px; }
.state-error { border-color: rgba(239, 123, 115, .45); }
.state-error .state-icon { background: var(--c-red-soft); color: var(--c-red); }
.state-title { margin: 0; font-weight: 700; font-size: var(--fs-l); }
.state-text { margin: 0 0 .6rem; color: var(--text-muted); max-width: 46ch; }

.head { border-radius: 3px; image-rendering: pixelated; background: var(--surface-2); }
.head-missing { background: var(--surface-2); }

/* ---------- Suche ---------- */

.search { position: relative; }
.search-box { position: relative; }
.search-icon { position: absolute; left: .85rem; top: 50%; width: 1.1rem; height: 1.1rem; transform: translateY(-50%); color: var(--text-dim); pointer-events: none; }
.search-navigate .search-input { padding-left: 2.5rem; }
.search-pop { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); }
.search-list {
  list-style: none; margin: 0; padding: .3rem;
  max-height: 340px; overflow-y: auto;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-s);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.search-option {
  display: flex; align-items: center; gap: .7rem;
  padding: .45rem .55rem;
  border-radius: var(--radius-s);
  cursor: pointer;
}
.search-option img { width: 28px; height: 28px; border-radius: 3px; }
.search-option:hover, .search-option.is-active { background: var(--surface-2); }
.search-option.is-active { box-shadow: inset 2px 0 0 var(--accent); }
.search-name { flex: 1; font-weight: 600; }
.search-name mark { background: none; color: var(--accent); }
.search-go { width: 1rem; height: 1rem; color: var(--text-dim); }
.search-hint {
  padding: .55rem .75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  background: var(--surface);
  color: var(--text-muted);
  font-size: var(--fs-s);
}

/* ---------- Statistiken ---------- */

.game-picker {
  display: flex;
  gap: .4rem;
  overflow-x: auto;
  padding: .2rem .1rem .7rem;
  margin-bottom: .5rem;
  scrollbar-width: thin;
}
.game-chip {
  display: inline-flex; align-items: center; gap: .5rem;
  flex: none;
  min-height: 42px;
  padding: .35rem .85rem .35rem .4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  background: var(--surface);
  color: var(--text-muted);
  font-weight: 600;
  font-size: var(--fs-s);
}
.game-chip-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 3px; background: var(--accent-c-soft, var(--surface-2)); color: var(--accent-c, var(--text)); }
.game-chip-icon svg { width: 18px; height: 18px; }
.game-chip:hover { color: var(--text); border-color: var(--border-strong); }
.game-chip[aria-pressed="true"] {
  color: var(--text);
  border-color: var(--accent-c, var(--border-strong));
  background: var(--surface-2);
  box-shadow: inset 0 -2px 0 var(--accent-c, var(--accent));
}
.game-chip-skeleton { width: 140px; height: 42px; flex: none; }

.mode-tabs {
  display: flex;
  gap: 0;
  overflow-x: auto;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  max-width: 100%;
}
.mode-tab {
  display: inline-flex; align-items: center; gap: .45rem;
  flex: none;
  min-height: 42px;
  padding: .4rem .9rem;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: var(--fs-s);
}
.mode-tab svg { width: 1.05rem; height: 1.05rem; }
.mode-tab:hover { color: var(--text); }
.mode-tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.tab-count { padding: 0 .4rem; border-radius: 3px; background: var(--surface-2); font-size: var(--fs-xs); }

.board-panel { outline: none; }
.board-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 1rem; margin-bottom: 1.25rem; }
.board-title { margin: 0; font-size: var(--fs-xl); }
.board-sub { margin: 0; font-size: var(--fs-s); }

/* Top 3 – einfache Treppe mit Medaillenfarben, ohne Leuchten */
.podium {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: .5rem;
}
@media (min-width: 640px) { .podium { gap: .75rem; max-width: 760px; margin-inline: auto; } }
.podium-place { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.podium-place.place-1 { order: 2; --medal: #e3b93a; }
.podium-place.place-2 { order: 1; --medal: #b9c0c9; }
.podium-place.place-3 { order: 3; --medal: #c98a5a; }
.podium-player {
  display: flex; flex-direction: column; align-items: center; gap: .45rem;
  max-width: 100%;
  color: var(--text);
  text-decoration: none;
}
.podium-player:hover .podium-name { color: var(--accent); text-decoration: underline; }
.podium-avatar { position: relative; display: block; }
.podium-avatar img {
  width: 52px; height: 52px;
  border-radius: 3px;
  border: 2px solid var(--medal);
}
.place-1 .podium-avatar img { width: 64px; height: 64px; }
@media (min-width: 640px) {
  .podium-avatar img { width: 60px; height: 60px; }
  .place-1 .podium-avatar img { width: 76px; height: 76px; }
}
.podium-crown {
  position: absolute;
  top: -24px; left: 50%;
  width: 26px; height: 26px;
  transform: translateX(-50%);
  color: var(--medal);
}
.podium-name { max-width: 100%; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-s); }
@media (min-width: 640px) { .podium-name { font-size: var(--fs-m); } }
.podium-value { margin: .15rem 0 0; font-size: var(--fs-xs); line-height: 1.3; }
.podium-value strong { display: block; font-size: 1.1rem; color: var(--text); }
@media (min-width: 640px) { .podium-value strong { font-size: 1.3rem; } }
.podium-secondary { margin: .1rem 0 0; font-size: var(--fs-xs); }
.podium-block {
  display: grid;
  place-items: start center;
  width: 100%;
  margin-top: .6rem;
  padding-top: .4rem;
  border: 1px solid var(--border);
  border-top: 3px solid var(--medal);
  border-bottom: 0;
  border-radius: var(--radius-s) var(--radius-s) 0 0;
  background: var(--surface);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--medal);
}
.place-1 .podium-block { height: 104px; }
.place-2 .podium-block { height: 76px; }
.place-3 .podium-block { height: 56px; }

.is-skeleton .podium-head-skel { width: 60px; height: 60px; margin-bottom: .5rem; }
.is-skeleton .podium-block-skel { width: 100%; margin-top: .6rem; border-radius: var(--radius-s) var(--radius-s) 0 0; }
.is-skeleton .podium-block-skel.place-1 { height: 104px; }
.is-skeleton .podium-block-skel.place-2 { height: 76px; }
.is-skeleton .podium-block-skel.place-3 { height: 56px; }
.rank-list { display: grid; gap: .4rem; max-width: 760px; margin-inline: auto; }
.rank-row-skel { height: 48px; }

.rank-table {
  width: 100%;
  max-width: 760px;
  margin-inline: auto;
  border-collapse: collapse;
  border: 1px solid var(--border);
}
.rank-table th {
  padding: .5rem .85rem;
  background: var(--bg-0);
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-align: left;
}
.rank-table td {
  padding: .5rem .85rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.rank-table tbody tr:hover td { background: var(--surface-2); }
.col-place { width: 3.5rem; color: var(--text-dim); font-weight: 700; }
.rank-table .col-num, .rank-table th.col-num { text-align: right; white-space: nowrap; }
.rank-table td.col-num:not(.col-secondary) { font-weight: 700; }
.rank-player { display: inline-flex; align-items: center; gap: .65rem; color: var(--text); font-weight: 600; text-decoration: none; min-width: 0; }
.rank-player:hover { color: var(--accent); text-decoration: underline; }
.rank-player img { width: 28px; height: 28px; border-radius: 3px; flex: none; }
.rank-player span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 9rem; }
@media (max-width: 479px) {
  .rank-table .col-secondary { display: none; }
  .rank-table td, .rank-table th { padding-inline: .55rem; }
  .col-place { width: 2.5rem; }
}
@media (min-width: 480px) { .rank-player span { max-width: none; } }

/* ---------- Spielerprofil ---------- */

.profile-hero { padding-block: clamp(1.75rem, 5vw, 3rem) 1rem; border-bottom: 1px solid var(--border); }
.profile-grid { display: grid; gap: 1.5rem; align-items: center; }
@media (min-width: 820px) { .profile-grid { grid-template-columns: 220px 1fr; gap: 2.5rem; } }

.profile-figure {
  position: relative;
  display: grid;
  place-items: center;
  margin: 0;
  min-height: 280px;
  border: 1px solid var(--border);
  border-bottom: 3px solid var(--rank, var(--border-strong));
  border-radius: var(--radius);
  background: var(--surface);
}
.profile-pedestal { display: none; }
.profile-body {
  position: relative;
  width: auto;
  max-height: 300px;
  padding-block: 1rem;
  image-rendering: pixelated;
}
.profile-body.is-missing { visibility: hidden; }
.profile-body-skel { width: 150px; height: 280px; }

.profile-name {
  margin: 0 0 .6rem;
  font-size: clamp(2rem, 1.3rem + 3.5vw, 3.2rem);
  color: var(--rank, var(--text));
  overflow-wrap: anywhere;
  line-height: 1.05;
}
.profile-badges { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: 1.25rem; }
.rank-badge { color: var(--rank); background: color-mix(in srgb, var(--rank) 12%, transparent); }
.badge-offline { color: var(--text-dim); background: transparent; }

.facts-grid { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); margin: 0; }
.fact { padding: .7rem .9rem; }
.fact dt { display: flex; align-items: center; gap: .4rem; color: var(--text-dim); font-size: var(--fs-xs); font-weight: 600; }
.fact dt svg { width: .95rem; height: .95rem; }
.fact dd { margin: .2rem 0 0; font-weight: 600; overflow-wrap: anywhere; }
.status-online, .status-offline { display: inline-flex; align-items: center; gap: .45rem; flex-wrap: wrap; }

.game-tabs { flex-wrap: wrap; }
@media (max-width: 639px) { .game-tabs { flex-wrap: nowrap; } }
.game-tab-icon { display: inline-grid; place-items: center; color: var(--accent-c, var(--text-muted)); }
.game-panel { outline: none; }
.panel-title { display: flex; align-items: center; gap: .5rem; margin: 1rem 0 .75rem; font-size: var(--fs-l); }
.panel-title svg { width: 1.15rem; height: 1.15rem; color: var(--text-muted); }

.stat-grid { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.stat-card { padding: 1rem 1.1rem; }
.stat-card-title { margin: 0 0 .5rem; font-size: var(--fs-s); font-weight: 700; color: var(--text); }
.stat-list { margin: 0; display: grid; }
.stat-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .35rem 0; border-top: 1px solid var(--border); }
.stat-row:first-child { border-top: 0; }
.stat-row dt { color: var(--text-muted); font-size: var(--fs-s); }
.stat-row dd { margin: 0; font-weight: 700; }
.stat-row.is-primary dd { font-size: 1.15rem; color: var(--text); }

.ach-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; margin-top: 2rem; }
.ach-progress { flex: 1 1 260px; max-width: 420px; }
.ach-count { margin: 0 0 .35rem; font-size: var(--fs-s); color: var(--text-muted); }
.ach-count strong { color: var(--text); }
.progress { height: 8px; border-radius: 2px; background: var(--surface-2); overflow: hidden; }
.progress-bar { display: block; height: 100%; background: var(--accent); }

.ach-grid { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.ach {
  display: flex; gap: .8rem; align-items: flex-start;
  padding: .8rem .9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.ach-icon {
  display: grid; place-items: center; flex: none;
  width: 36px; height: 36px;
  border-radius: var(--radius-s);
  line-height: 1;
}
.ach-icon svg { width: 18px; height: 18px; }
.ach-body { min-width: 0; }
.ach-name { margin: 0; font-weight: 700; line-height: 1.3; }
.ach-desc { margin: .15rem 0 0; color: var(--text-muted); font-size: var(--fs-s); line-height: 1.45; }
.ach-state { margin: .3rem 0 0; font-size: var(--fs-xs); color: var(--text-dim); }
.ach.is-unlocked { border-left: 3px solid var(--accent); }
.ach.is-unlocked .ach-icon { background: var(--accent-soft); color: var(--accent); }
.ach.is-unlocked .ach-state { color: var(--accent); }
.ach.is-locked { opacity: .7; }
.ach.is-locked .ach-icon { background: var(--surface-2); color: var(--text-dim); }
.ach.is-locked .ach-name { color: var(--text-muted); }

.not-found { display: grid; justify-items: center; gap: .5rem; padding: clamp(1.5rem, 5vw, 2.5rem); text-align: center; }
.not-found h1 { margin-bottom: .2rem; }
.not-found .search { width: 100%; max-width: 380px; margin: .6rem 0; text-align: left; }
.not-found-art { display: grid; place-items: center; width: 72px; height: 72px; margin-bottom: .4rem; border-radius: var(--radius); background: var(--surface-2); color: var(--text-muted); }
.not-found-art svg { width: 36px; height: 36px; }
.not-found-art img { border-radius: 3px; image-rendering: pixelated; }
.not-found-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: .5rem; }

/* ---------- Team ---------- */

.team-ranks { display: grid; gap: 2rem; }
.rank-block { --rank: var(--text-muted); }
.rank-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .85rem; padding-bottom: .5rem; border-bottom: 1px solid var(--border); }
.rank-title { display: flex; align-items: center; gap: .55rem; margin: 0; color: var(--rank); font-size: var(--fs-l); }
.rank-swatch { width: 10px; height: 10px; border-radius: 2px; background: var(--rank); }
.rank-count { font-size: var(--fs-s); }
.member-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); }
.member {
  display: flex; flex-direction: column; align-items: center; gap: .45rem;
  padding: 1rem .7rem;
  color: var(--text);
  text-align: center;
  text-decoration: none;
}
.member img { width: 52px; height: 52px; border-radius: 3px; }
.member:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-2); }
.member-name { font-weight: 700; overflow-wrap: anywhere; }
.member-rank { font-size: var(--fs-xs); color: var(--rank); font-weight: 600; }
.member-skel { height: 130px; border-radius: var(--radius); }
.team-cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
  margin-top: 2.5rem;
  padding: 1.25rem 1.4rem;
  border-left: 3px solid var(--accent);
}
.team-cta h2 { font-size: var(--fs-l); }
.team-cta h2, .team-cta p { margin: 0 0 .2rem; }

/* ---------- Regeln ---------- */

.rules-layout { display: grid; gap: 1.5rem; align-items: start; }
@media (min-width: 960px) {
  .rules-layout { grid-template-columns: 240px 1fr; }
  .rules-toc { position: sticky; top: 78px; }
}
.rules-toc { padding: .85rem; }
.toc-title { margin: 0 0 .4rem; color: var(--text-muted); font-size: var(--fs-s); font-weight: 700; }
.rules-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
@media (max-width: 959px) {
  .rules-toc ol { display: flex; flex-wrap: wrap; gap: .3rem; }
  .toc-link { border: 1px solid var(--border) !important; }
}
.toc-link {
  width: 100%;
  padding: .4rem .6rem;
  border: 0;
  border-radius: var(--radius-s);
  background: none;
  color: var(--text-muted);
  font-size: var(--fs-s);
  text-align: left;
}
.toc-link:hover { color: var(--text); background: var(--surface-2); }
.rules-body { display: grid; gap: .75rem; min-width: 0; }
.rule-section { padding: clamp(1rem, 3vw, 1.5rem); scroll-margin-top: 78px; outline: none; }
.rule-section:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.rule-title { display: flex; align-items: center; gap: .65rem; }
.rule-num {
  display: inline-grid; place-items: center; flex: none;
  min-width: 2.2rem; height: 2rem;
  padding: 0 .45rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-s);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-s);
  font-weight: 700;
}
.rule-num svg { width: 1.05rem; height: 1.05rem; }
.rule-text { white-space: pre-line; color: var(--text-muted); overflow-wrap: anywhere; }
.rule-text:last-child, .rule-list:last-child { margin-bottom: 0; }
.rule-list { margin: 0 0 1em; padding-left: 1.3rem; color: var(--text-muted); display: grid; gap: .3rem; }
.rule-list li::marker { color: var(--text-dim); }

.table-tools { display: grid; gap: .6rem; grid-template-columns: 1fr; margin-bottom: .5rem; }
@media (min-width: 560px) { .table-tools { grid-template-columns: 1fr 200px; } }
.table-count { font-size: var(--fs-xs); margin: .25rem 0 .75rem; }
.table-wrap { overflow-x: auto; }
.punish-table { width: 100%; border-collapse: collapse; font-size: var(--fs-s); }
.punish-table th, .punish-table td { padding: .6rem .75rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.punish-table thead th { color: var(--text-muted); font-size: var(--fs-xs); font-weight: 600; background: var(--bg-0); }
.punish-table tbody th { font-weight: 600; }
.punish-table tbody tr:hover { background: var(--surface-2); }
.punish-table .badge svg { width: .9rem; height: .9rem; }
.col-id { width: 4rem; }
.col-duration { white-space: nowrap; }
.table-empty { text-align: center !important; padding: 1.5rem !important; }
@media (max-width: 559px) {
  .punish-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .punish-table tr { display: grid; grid-template-columns: 1fr auto; gap: .2rem .75rem; padding: .75rem 0; border-bottom: 1px solid var(--border); }
  .punish-table tr[hidden] { display: none; }
  .punish-table th, .punish-table td { padding: 0; border: 0; }
  .punish-table tbody th { grid-column: 1; grid-row: 1; }
  .punish-table .col-id { grid-column: 2; grid-row: 1; text-align: right; width: auto; }
  .punish-table td:nth-child(3) { grid-column: 1; }
  .punish-table .col-duration { grid-column: 2; text-align: right; }
  .punish-table td.table-empty { grid-column: 1 / -1; }
}

/* ---------- Bewerben ---------- */

.apply-layout { display: grid; gap: 1.5rem; align-items: start; }
@media (min-width: 1000px) { .apply-layout { grid-template-columns: 1fr 290px; } .apply-aside { position: sticky; top: 78px; } }
.apply-main { min-width: 0; }
.apply-tabs { margin-bottom: 1rem; }
.apply-form { display: grid; gap: 1.4rem; padding: clamp(1.1rem, 4vw, 1.75rem); }
.form-intro h2 { margin-bottom: .3rem; }
.form-intro p { margin: 0; }
.form-grid { display: grid; gap: 1rem; margin: 0; padding: 0; border: 0; min-width: 0; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } .field-wide { grid-column: 1 / -1; } }
.legend { grid-column: 1 / -1; padding: 0 0 .35rem; margin-bottom: .2rem; font-size: var(--fs-l); font-weight: 700; border-bottom: 1px solid var(--border); width: 100%; }
.optional { font-weight: 400; font-size: var(--fs-xs); }
.char-count { justify-self: end; font-size: var(--fs-xs); margin-top: -.2rem; }
.field-check { grid-template-columns: auto 1fr; align-items: start; column-gap: .7rem; }
.field-check input { order: -1; width: 1.2rem; height: 1.2rem; margin: .2rem 0 0; accent-color: var(--accent); }
.field-check .field-label { font-weight: 500; }
.field-check .field-error, .field-check .field-hint { grid-column: 2; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; }
.btn-submit { min-width: 12rem; }
.form-note { margin: 0; font-size: var(--fs-xs); }
.form-summary { outline: none; }
.summary-title { margin: 0 0 .25rem; font-weight: 700; }
.summary-list { margin: 0; padding-left: 1.1rem; }
.summary-link { padding: 0; border: 0; background: none; color: inherit; text-decoration: underline; text-underline-offset: 3px; text-align: left; }
.form-summary p:last-child { margin-bottom: 0; }

.aside-card { padding: 1.1rem 1.2rem; }
.aside-card h2 { font-size: var(--fs-l); }
.aside-list { margin: 0; padding-left: 1.1rem; display: grid; gap: .5rem; color: var(--text-muted); font-size: var(--fs-s); }
.aside-list li::marker { color: var(--text-dim); }

.success-card { display: grid; justify-items: center; gap: .3rem; padding: clamp(1.75rem, 6vw, 3rem) 1.5rem; text-align: center; }
.success-card h2 { outline: none; }
.success-card p { max-width: 50ch; }
.success-icon {
  display: grid; place-items: center;
  width: 56px; height: 56px;
  margin-bottom: .6rem;
  border: 1px solid rgba(116, 195, 101, .5);
  border-radius: var(--radius);
  background: var(--c-green-soft);
  color: var(--c-green);
}
.success-icon svg { width: 28px; height: 28px; }
.success-id { padding: .3rem .8rem; border: 1px dashed var(--border-strong); border-radius: var(--radius-s); }
.success-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: .5rem; }

/* ---------- Footer ---------- */

.site-footer {
  margin-top: 2rem;
  border-top: 1px solid var(--border);
  background: var(--bg-0);
}
.footer-inner { display: grid; gap: 1.75rem; padding-block: 2.25rem 1.5rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.footer-brand { grid-column: 1 / -1; max-width: 22rem; }
.footer-brand p { margin: .5rem 0 0; font-size: var(--fs-s); }
.footer-brand .brand img { width: 24px; height: 24px; }
@media (min-width: 820px) {
  .footer-inner { grid-template-columns: 2fr repeat(4, minmax(0, 1fr)); }
  .footer-brand { grid-column: auto; }
}
.footer-heading { margin: 0 0 .6rem; font-family: var(--font-sans); font-size: var(--fs-s); font-weight: 700; color: var(--text); }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.footer-nav a { display: inline-block; padding: .2rem 0; color: var(--text-muted); font-size: var(--fs-s); text-decoration: none; }
.footer-nav a:hover { color: var(--text); text-decoration: underline; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem 1.5rem; padding-block: 1rem 1.75rem; border-top: 1px solid var(--border); font-size: var(--fs-xs); color: var(--text-muted); }
.footer-bottom p { margin: 0; }

@media (forced-colors: active) {
  .mode-tab[aria-selected="true"], .game-chip[aria-pressed="true"] { outline: 2px solid Highlight; }
}

/* ---------- Unterstützen ---------- */

.support-layout { display: grid; gap: 1.5rem; align-items: start; }
@media (min-width: 960px) {
  .support-layout { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
  .support-goal { position: sticky; top: 78px; }
}
.support-points { display: grid; gap: 1rem; margin-bottom: 1.5rem; }
.support-point { display: flex; gap: .9rem; align-items: flex-start; }
.support-point h2 { font-size: var(--fs-m); margin: 0 0 .2rem; }
.support-point p { margin: 0; }
.support-point-icon {
  display: grid; place-items: center; flex: none;
  width: 2.25rem; height: 2.25rem;
  border-radius: var(--radius);
  color: var(--c-pink); background: var(--c-pink-soft);
}
.support-point-icon svg { width: 1.15rem; height: 1.15rem; }
.support-buttons { display: flex; flex-wrap: wrap; gap: .6rem; }
.support-note { margin: .75rem 0 0; font-size: var(--fs-s); }
.support-goal { padding: 1.25rem 1.4rem; border-top: 3px solid var(--c-pink); }
.support-goal-title { display: flex; align-items: center; gap: .5rem; font-size: var(--fs-l); margin: 0 0 .75rem; }
.support-goal-title svg { width: 1.2rem; height: 1.2rem; color: var(--c-pink); }
.support-goal-sum { margin: 0 0 .5rem; font-size: var(--fs-l); }
.support-goal-sum strong { font-size: var(--fs-xl); }
.support-goal-pct { margin: .6rem 0 0; font-size: var(--fs-s); }
.support-bar { height: 12px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.support-bar-fill { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--c-pink), var(--c-purple)); transition: width .6s var(--ease); }
.support-bar-skel { display: block; height: 12px; margin-top: .75rem; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { .support-bar-fill { transition: none; } }
.badge-supporter { text-decoration: none; }
.badge-supporter svg { width: .9rem; height: .9rem; }
.badge-supporter:hover { text-decoration: none; filter: brightness(1.15); }

/* ---------- Shop ---------- */

.shop-layout { display: grid; gap: 1.5rem; align-items: start; }
@media (min-width: 960px) {
  .shop-layout { grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); }
  .shop-form { position: sticky; top: 78px; }
}
.shop-grid { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.shop-card {
  display: flex; flex-direction: column; align-items: stretch; gap: .5rem;
  padding: 1rem 1.1rem;
  text-align: left; font: inherit; color: var(--text);
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.shop-card:hover { border-color: var(--border-strong); background: var(--surface-2); }
.shop-card:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.shop-card[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--surface-2); }
.shop-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; }
.shop-card-name { font-weight: 700; font-size: var(--fs-m); }
.shop-card-desc { font-size: var(--fs-s); white-space: pre-line; }
.shop-card-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: .45rem; margin-top: auto; }
.shop-card-price strong { font-size: var(--fs-xl); }
.shop-sub { flex-basis: 100%; font-size: var(--fs-xs); }
.shop-sale { font-size: var(--fs-xs); }
.shop-card-skel { display: block; height: 150px; border-radius: var(--radius); }
.shop-form { display: grid; gap: 1rem; padding: 1.25rem 1.4rem; }
.shop-form-title { margin: 0; font-size: var(--fs-l); }
.shop-summary p { margin: 0; }
.shop-summary-name { font-weight: 700; }
.shop-summary-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: .45rem; }
.shop-summary-price strong { font-size: var(--fs-xl); }
.shop-code { text-transform: uppercase; letter-spacing: .04em; }
.shop-player { display: flex; align-items: center; gap: .6rem; min-height: 1.5rem; font-size: var(--fs-s); }
.shop-player:empty { display: none; }
.shop-player img { width: 32px; height: 32px; flex: none; }
.shop-player-text { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.shop-ok { display: inline-flex; align-items: center; gap: .3rem; color: var(--c-green); font-weight: 600; }
.shop-ok svg { width: 1rem; height: 1rem; }
.shop-bad { color: var(--c-red); font-weight: 600; }
.shop-buy { width: 100%; justify-content: center; }
.shop-buy-hint:empty { display: none; }
.shop-buy-hint { margin-top: -.5rem; }
.shop-legal { margin: 0; font-size: var(--fs-xs); }
.shop-notice { display: flex; gap: .7rem; align-items: flex-start; padding: .8rem 1rem; margin-bottom: 1.25rem; border-left: 3px solid var(--c-yellow); }
.shop-notice svg { width: 1.2rem; height: 1.2rem; flex: none; color: var(--c-yellow); margin-top: .1rem; }
.shop-notice p { margin: 0; }
.shop-done { display: grid; justify-items: center; gap: .6rem; text-align: center; padding: 1.5rem 1rem; }
.shop-done h1, .shop-done h2 { margin: 0; }
.shop-done p { margin: 0; max-width: 56ch; }
.shop-done-icon { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; color: var(--c-green); background: var(--c-green-soft); }
.shop-done-icon svg { width: 1.5rem; height: 1.5rem; }
.shop-done-muted { color: var(--text-muted); background: var(--surface-2); }
.shop-result { max-width: 640px; margin-inline: auto; padding: 2rem 1.5rem; }
.shop-result-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-top: .4rem; }
.shop-consent { display: grid; gap: .6rem; margin: 0; padding: 0; border: 0; min-width: 0; }
.shop-legal svg { width: .9rem; height: .9rem; vertical-align: -2px; margin-right: .3rem; }

/* ---------- Rechtstexte ---------- */

.legal-text { max-width: 820px; padding: clamp(1.25rem, 3vw, 2rem); line-height: 1.65; overflow-wrap: anywhere; }
.legal-text > :first-child { margin-top: 0; }
.legal-text > :last-child { margin-bottom: 0; }
.legal-text h2 { font-size: var(--fs-xl); margin: 1.6em 0 .5em; }
.legal-text h3 { font-size: var(--fs-l); margin: 1.4em 0 .4em; }
.legal-text h4, .legal-text h5, .legal-text h6 { font-size: var(--fs-m); margin: 1.2em 0 .35em; }
.legal-text p, .legal-text ul, .legal-text ol { margin: 0 0 .9em; }
.legal-text ul, .legal-text ol { padding-left: 1.4em; }
.legal-text li { margin-bottom: .25em; }
.legal-text hr { border: 0; border-top: 1px solid var(--border); margin: 1.5em 0; }

/* ---------- Kündigen ---------- */

.cancel-box { max-width: 680px; padding: clamp(1.25rem, 3vw, 2rem); }
.cancel-kind { margin: 0; padding: 0; border: 0; min-width: 0; gap: .5rem; }
.cancel-submit { min-width: 12rem; }
.cancel-done { display: grid; gap: .8rem; }
.cancel-done h2 { margin: 0; }
.cancel-done h2:focus { outline: none; }
.cancel-done p { margin: 0; }
.cancel-facts { display: grid; gap: .4rem; margin: .2rem 0; padding: .9rem 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-0); }
.cancel-facts div { display: grid; grid-template-columns: minmax(8rem, 11rem) 1fr; gap: .75rem; }
.cancel-facts dt { color: var(--text-muted); font-size: var(--fs-s); }
.cancel-facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

@media print {
  .site-header, .site-footer, .maintenance, .skip-link, .page-head, .shop-result-actions { display: none !important; }
  body, .card, .cancel-facts { background: #fff !important; color: #000 !important; border-color: #999 !important; }
  .cancel-facts dt, .muted, .dim { color: #333 !important; }
}
