:root {
  --bg: #0c0a0b;
  --bg-2: #141112;
  --panel: #1a1617;
  --panel-2: #221d1e;
  --line: #322a2c;
  --text: #f0ebeb;
  --muted: #9a8f91;
  --red: #e3262b;
  --red-hot: #ff3b40;
  --red-dark: #8c1014;
  --stone: #3b3536;
  --stone-light: #575051;
  --online: #4ade6b;
  --pixel: 'Pixelify Sans', 'Courier New', monospace;
  --display: 'Chakra Petch', Inter, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  font: 15px/1.55 Inter, system-ui, sans-serif;
  background:
    radial-gradient(1200px 600px at 50% -200px, rgba(227, 38, 43, .16), transparent 70%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .012) 0 2px, transparent 2px 9px),
    var(--bg);
}
main { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 28px 16px 48px; }
a { color: var(--red-hot); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: ui-monospace, monospace; background: var(--bg); border: 1px solid var(--line); padding: 1px 6px; color: var(--red-hot); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
[hidden] { display: none !important; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 20px;
  padding: 10px 20px;
  background: rgba(12, 10, 11, .85);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--red-dark);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { width: 38px; height: 38px; }
.brand span { font: 700 24px/1 var(--pixel); letter-spacing: .08em; }
#nav { display: flex; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
#nav::-webkit-scrollbar { display: none; }
.session { flex: none; }
body.logged-in .dc-text { display: none; }
#nav a { white-space: nowrap; font: 600 15px/1 var(--display); letter-spacing: .01em; color: var(--muted); padding: 9px 9px; border-bottom: 3px solid transparent; }
#nav a:hover { color: var(--text); text-decoration: none; }
#nav a.active { color: var(--text); border-bottom-color: var(--red); }
.session { display: flex; align-items: center; gap: 10px; }
#me-box { display: flex; align-items: center; gap: 8px; font-weight: 600; }
#me-name { color: var(--text); }
#me-name:hover { color: var(--red-hot); text-decoration: none; }

body:not(.logged-in) .auth-only { display: none !important; }
body:not(.is-member) .member-only, body:not(.is-team) .team-only, body.is-member .nonmember-only { display: none !important; }
body.logged-in .guest-only { display: none !important; }

/* ---------- Buttons im Block-Stil ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 20px;
  font: 700 16px/1 var(--display); letter-spacing: .04em; text-transform: uppercase;
  color: #fff; border: 2px solid #000; border-radius: 0; cursor: pointer;
  box-shadow: inset -3px -4px 0 rgba(0, 0, 0, .35), inset 3px 3px 0 rgba(255, 255, 255, .18);
  transition: transform .06s, filter .15s;
}
.btn:hover { filter: brightness(1.12); text-decoration: none; }
.btn:active { transform: translateY(2px); box-shadow: inset 3px 4px 0 rgba(0, 0, 0, .35); }
.btn-red { background: var(--red); }
.btn-stone { background: var(--stone); color: var(--text); }
.btn-sm { padding: 7px 12px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-icon { padding: 6px 9px; font-size: 14px; background: transparent; color: var(--muted); border: 2px solid var(--line); box-shadow: none; }
.btn-icon:hover { color: var(--red-hot); border-color: var(--red-dark); }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: 300px 1fr; gap: 48px; align-items: center; padding: 24px 0 40px; }
.hero-logo { position: relative; }
.hero-logo::before {
  content: ''; position: absolute; inset: 10%;
  background: var(--red); filter: blur(70px); opacity: .35; border-radius: 50%;
}
.hero-logo img { position: relative; width: 100%; display: block; }
.shield { clip-path: polygon(50% 7%, 87% 18%, 84% 61%, 50% 94%, 16% 61%, 13% 18%); }
.eyebrow { margin: 0 0 8px; font: 700 15px/1 var(--display); color: var(--red-hot); letter-spacing: .25em; text-transform: uppercase; }
.hero h1 {
  margin: 0; font: 700 clamp(54px, 10vw, 104px)/.95 var(--pixel); letter-spacing: .06em;
  text-shadow: 5px 5px 0 var(--red-dark), 0 0 40px rgba(227, 38, 43, .35);
}
.lead { max-width: 520px; color: #cfc6c7; font-size: 17px; margin: 18px 0 26px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Kacheln ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 44px; }
.tile, .panel, .member {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 2px solid var(--line);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .04), 0 10px 30px rgba(0, 0, 0, .35);
}
.tile { padding: 20px; display: flex; flex-direction: column; gap: 4px; position: relative; }
.tile::before { content: ''; position: absolute; left: -2px; top: -2px; bottom: -2px; width: 4px; background: var(--red); }
.tile-num { font: 700 38px/1 var(--display); font-variant-numeric: tabular-nums; }
.tile-label { color: var(--muted); font-size: 14px; }

.section-title { margin: 0 0 16px; font: 700 28px/1.1 var(--display); letter-spacing: .02em; text-transform: uppercase; }
.section-title::after { content: ''; display: block; width: 48px; height: 4px; margin-top: 8px; background: var(--red); }

/* ---------- Kopf (Avatar) ---------- */
.head { position: relative; flex: none; width: 44px; height: 44px; background: var(--stone); border: 2px solid #000; box-shadow: inset -3px -3px 0 rgba(0,0,0,.35), inset 3px 3px 0 rgba(255,255,255,.12); }
.head img { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.head .letter { position: absolute; inset: 0; display: grid; place-items: center; font: 700 20px/1 var(--display); color: var(--muted); }
.head .status { position: absolute; right: -5px; bottom: -5px; width: 12px; height: 12px; background: var(--stone-light); border: 2px solid var(--bg); }
.head .status.on { background: var(--online); box-shadow: 0 0 8px var(--online); }

/* ---------- Ränge ---------- */
.rank { display: inline-block; padding: 4px 8px; font: 700 12px/1 var(--display); letter-spacing: .06em; text-transform: uppercase; border: 2px solid var(--line); color: var(--muted); white-space: nowrap; }
.rank.anfuehrer { background: var(--red); border-color: #000; color: #fff; }
.rank.offizier { border-color: var(--red); color: var(--red-hot); }
.rank.mitglied { border-color: var(--stone-light); color: var(--text); }
.rank.admin { background: #f2c94c; border-color: #000; color: #1a1300; }
.rank-stack { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.you { margin-left: 12px; padding: 3px 8px; vertical-align: middle; font: 700 13px/1 var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--red-hot); border: 2px solid var(--red-dark); }
.empty-profile { max-width: 560px; }
.empty-profile p { margin: 0 0 18px; }
.member-admin { flex-wrap: wrap; }

/* ---------- Mitglieder (eingeloggt) ---------- */
.view-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.pill { font: 500 14px/1 var(--display); color: var(--online); border: 2px solid var(--line); padding: 7px 10px; }
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin-bottom: 14px; }
.member { cursor: pointer; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.member.online { border-color: #2d4a33; }
.member-top { display: flex; align-items: center; gap: 12px; }
.member-name { flex: 1; min-width: 0; }
.member-name b { display: block; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-name span { font-size: 13px; color: var(--muted); }
.member-name .on-text { color: var(--online); }
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.stat { background: var(--bg-2); border: 1px solid var(--line); padding: 8px 6px; text-align: center; }
.stat b { display: block; font: 700 14px/1.2 Inter, system-ui, sans-serif; white-space: nowrap; }
.stat span { font-size: 11px; color: var(--muted); }
.member-admin { display: flex; gap: 8px; align-items: center; padding-top: 12px; border-top: 1px solid var(--line); }
.member-admin span { flex: 1; font-size: 13px; color: var(--muted); }
select { background: var(--bg); color: var(--text); border: 2px solid var(--line); padding: 5px 8px; font: 500 14px var(--display); }

/* ---------- Formulare ---------- */
.panel { padding: 22px; }
.auth-panel { max-width: 400px; margin: 20px auto; text-align: left; }
.auth-logo { display: block; width: 84px; margin: -6px auto 6px; }
.auth-panel h2 { text-align: center; font: 700 28px/1 var(--display); margin: 0 0 18px; }
label { display: block; margin-bottom: 14px; font-size: 13px; color: var(--muted); font-weight: 500; }
input {
  display: block; width: 100%; margin-top: 6px; padding: 11px 12px;
  background: var(--bg); color: var(--text); font: inherit;
  border: 2px solid var(--line); border-radius: 0;
}
input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(227, 38, 43, .2); }
.error { color: var(--red-hot); min-height: 1.3em; margin: 0 0 12px; font-size: 14px; }

/* ---------- Schritte ---------- */
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0 0 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.steps li { counter-increment: s; position: relative; padding: 16px 16px 16px 60px; background: var(--panel); border: 2px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.steps li::before { content: counter(s); position: absolute; left: 14px; top: 14px; width: 32px; height: 32px; display: grid; place-items: center; background: var(--red); color: #fff; font: 700 18px/1 var(--display); border: 2px solid #000; }
.steps span { color: var(--muted); font-size: 14px; }
.steps.compact li { background: var(--bg-2); }

/* ---------- Chat ---------- */
#chat-log { height: 420px; overflow-y: auto; background: var(--bg); border: 2px solid var(--line); padding: 12px; margin-bottom: 12px; font-size: 14px; }
.msg { padding: 3px 0; overflow-wrap: anywhere; }
.msg time { color: var(--muted); font-size: 12px; margin-right: 6px; font-variant-numeric: tabular-nums; }
.msg .src { font: 500 11px/1 var(--display); padding: 2px 5px; margin-right: 6px; border: 1px solid var(--line); color: var(--muted); }
.msg .src.game { border-color: var(--red-dark); color: var(--red-hot); }
.msg b { color: var(--text); }
#chat-form { display: flex; gap: 10px; }
#chat-form input { margin: 0; }

.code { font: 700 38px/1 var(--display); letter-spacing: .2em; color: var(--red-hot); margin: 18px 0 0; text-shadow: 3px 3px 0 var(--red-dark); }

footer { padding: 20px; text-align: center; color: var(--muted); font: 500 14px var(--display); border-top: 1px solid var(--line); }

/* ---------- Podest ---------- */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 14px; margin-bottom: 44px; }
.podium-place { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--text); }
.podium-place:hover { text-decoration: none; }
.podium-place:hover .podium-block { filter: brightness(1.15); }
.podium-place .head { width: 64px; height: 64px; }
.podium-place.p1 .head { width: 84px; height: 84px; }
.podium-name { font-weight: 700; font-size: 16px; }
.podium-value { color: var(--muted); font-size: 14px; }
.podium-block {
  width: 100%; display: grid; place-items: center;
  font: 700 44px/1 var(--pixel); color: #fff;
  border: 2px solid #000;
  box-shadow: inset -4px -6px 0 rgba(0,0,0,.35), inset 4px 4px 0 rgba(255,255,255,.15);
}
.p1 .podium-block { height: 150px; background: var(--red); }
.p2 .podium-block { height: 110px; background: var(--stone-light); }
.p3 .podium-block { height: 80px; background: var(--stone); }
.p1 .crown { font-size: 26px; line-height: 1; filter: drop-shadow(0 0 8px var(--red)); }
.podium-empty { grid-column: 1 / -1; }

/* ---------- Feed ---------- */
.feed { list-style: none; margin: 0 0 44px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.feed li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--panel); border: 2px solid var(--line); font-size: 14px; }
.feed li .head { width: 30px; height: 30px; }
.feed li .head .status { display: none; }
.feed .what { flex: 1; min-width: 0; }
.feed .what b { color: var(--text); }
.feed .amount { color: var(--red-hot); font: 700 14px var(--display); }
.feed time { color: var(--muted); font-size: 12px; white-space: nowrap; }

/* ---------- Rangliste ---------- */
.pill-muted { color: var(--muted); }
.cat-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.cat-tabs button { font: 500 15px/1 var(--display); padding: 9px 13px; background: var(--panel); color: var(--muted); border: 2px solid var(--line); cursor: pointer; }
.cat-tabs button:hover { color: var(--text); }
.cat-tabs button.active { background: var(--red); color: #fff; border-color: #000; box-shadow: inset -3px -3px 0 rgba(0,0,0,.3); }
.lb-panel { padding: 8px; }
.lb-list { list-style: none; margin: 0; padding: 0; }
.lb-list a { display: grid; grid-template-columns: 44px 40px 1fr auto; align-items: center; gap: 12px; padding: 10px 12px; color: var(--text); border-bottom: 1px solid var(--line); }
.lb-list li:last-child a { border-bottom: 0; }
.lb-list a:hover { background: var(--panel-2); text-decoration: none; }
.lb-list .place { font: 700 20px/1 var(--display); color: var(--muted); text-align: center; }
.lb-list li:nth-child(1) .place { color: var(--red-hot); }
.lb-list li:nth-child(2) .place, .lb-list li:nth-child(3) .place { color: var(--text); }
.lb-list .head { width: 40px; height: 40px; }
.lb-list .who b { display: block; }
.lb-list .value { font: 700 18px/1 var(--display); text-align: right; }
.lb-bar { height: 4px; margin-top: 6px; background: var(--bg); }
.lb-bar i { display: block; height: 100%; background: var(--red); }
.empty { padding: 28px; text-align: center; color: var(--muted); }

/* ---------- Profil ---------- */
.back { display: inline-block; margin-bottom: 16px; font: 500 15px var(--display); color: var(--muted); }
.profile-head { display: flex; align-items: center; gap: 20px; margin-bottom: 24px; }
.profile-head .head { width: 96px; height: 96px; }
.profile-head h1 { margin: 0 0 6px; font: 700 40px/1 var(--display); }
.profile-tiles { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.profile-tiles .tile-num { font-size: 28px; white-space: nowrap; }
.on-text { color: var(--online); }
.profile-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; margin-bottom: 14px; }
.stat-list h3 { margin: 0 0 12px; font: 700 18px/1 var(--display); display: flex; justify-content: space-between; }
.stat-list h3 span { color: var(--muted); font-size: 14px; }
.stat-list ul { list-style: none; margin: 0; padding: 0; max-height: 380px; overflow-y: auto; }
.stat-list li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 6px 2px; font-size: 14px; }
.stat-list li b { font-variant-numeric: tabular-nums; }
.stat-list li .lb-bar { grid-column: 1 / -1; margin-top: 0; }

/* ---------- Zeitraum-Tabs ---------- */
.period-tabs { display: inline-flex; margin-bottom: 10px; border: 2px solid var(--line); }
.period-tabs button { font: 600 14px/1 var(--display); padding: 8px 14px; background: transparent; color: var(--muted); border: 0; cursor: pointer; }
.period-tabs button + button { border-left: 2px solid var(--line); }
.period-tabs button.active { background: var(--stone); color: var(--text); }
.view-head .period-tabs { margin: 0; }

/* ---------- Feed: besondere Ereignisse ---------- */
.feed .hl { color: var(--text); font-weight: 700; }
.feed-icon { font-size: 18px; line-height: 1; }
.feed li.kind-rare { border-color: #1e4b55; }
.feed li.kind-rare .hl { color: #5ee0f0; }
.feed li.kind-boss, .feed li.kind-advancement { border-color: var(--red-dark); }
.feed li.kind-advancement .hl { color: #f2c94c; }
.feed li.kind-death .what { color: var(--muted); }

/* ---------- Live-Status ---------- */
.live { display: flex; flex-wrap: wrap; gap: 6px; }
.profile-head .live { margin-top: 10px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; background: var(--bg-2); border: 1px solid var(--line); font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip i { font-style: normal; }

/* ---------- Profil: Diagramm, Kalender, Fortschritte, Sessions ---------- */
.panel-title { margin: 0 0 14px; font: 700 18px/1 var(--display); display: flex; justify-content: space-between; gap: 10px; }
.panel-title span { color: var(--muted); font-size: 14px; font-weight: 500; }
.chart { width: 100%; height: auto; display: block; }
.chart-bar { fill: var(--red); }
.chart-bar:hover { fill: var(--red-hot); }
.chart-axis { stroke: var(--line); stroke-width: 2; }
.chart-label, .grid-label { fill: var(--muted); font: 500 11px Inter, sans-serif; }
.cal-wrap { overflow-x: auto; }
.calendar { width: 100%; min-width: 300px; height: auto; display: block; }
.cal { fill: var(--bg-2); stroke: var(--line); stroke-width: 1; }
.cal.l1, .cal-legend .l1 { fill: #4a1416; background: #4a1416; }
.cal.l2, .cal-legend .l2 { fill: #7d1519; background: #7d1519; }
.cal.l3, .cal-legend .l3 { fill: #c01e23; background: #c01e23; }
.cal.l4, .cal-legend .l4 { fill: #ff3b40; background: #ff3b40; }
.cal-legend { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.cal-legend i { width: 12px; height: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.adv-panel { margin-bottom: 14px; }
.adv-bar { height: 8px; margin: 0 0 16px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; max-height: 260px; overflow-y: auto; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; background: var(--bg-2); border: 2px solid var(--line); font-size: 13px; font-weight: 600; cursor: help; }
.badge i { font-style: normal; }
.badge.goal { border-color: #3b5b8c; }
.badge.challenge { border-color: #8a6d1d; background: linear-gradient(180deg, rgba(242, 201, 76, .12), transparent); }
.sessions { margin-top: 14px; }
.sessions ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; }
.sessions li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; background: var(--bg-2); border: 1px solid var(--line); font-size: 14px; }

/* ---------- Karte ---------- */
.map-panel { padding: 0; overflow: hidden; }
#map { display: block; width: 100%; height: auto; background:
  radial-gradient(circle at 50% 50%, rgba(227, 38, 43, .08), transparent 60%), var(--bg); }
#map .grid { stroke: rgba(255, 255, 255, .06); stroke-width: 1; }
#map .grid.zero { stroke: rgba(227, 38, 43, .35); stroke-width: 2; }
.map-frame { fill: none; stroke: #000; stroke-width: 3; }
.map-head { image-rendering: pixelated; }
.map-bg { fill: var(--stone); }
.map-letter { fill: var(--muted); font: 700 18px var(--display); }
.map-player .map-pulse { fill: rgba(227, 38, 43, .25); }
.fx .map-player .map-pulse { animation: mapPulse 2s ease-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes mapPulse { from { transform: scale(.6); opacity: .9; } to { transform: scale(1.6); opacity: 0; } }
.map-name { fill: var(--text); font: 700 14px var(--display); paint-order: stroke; stroke: #000; stroke-width: 4px; }
.map-empty { fill: var(--muted); font: 600 18px var(--display); }
.map-list { list-style: none; margin: 0; padding: 12px; display: flex; flex-wrap: wrap; gap: 8px; border-top: 2px solid var(--line); }
.map-list:empty { display: none; }
.map-list li { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--bg-2); border: 1px solid var(--line); font-size: 14px; }
.map-list li .head .status { display: none; }
.map-list li span { color: var(--muted); font-variant-numeric: tabular-nums; }

.fx .chart-bar { transform-box: fill-box; transform-origin: bottom; animation: rise .6s cubic-bezier(.2, .9, .3, 1.1) both; animation-delay: calc(var(--i) * 40ms); }

/* ---------- Team-Banner ---------- */
.team-banner {
  position: relative; overflow: hidden; margin: 0 0 28px; height: 250px;
  border: 2px solid #000; border-bottom: 4px solid var(--red-dark);
  background:
    linear-gradient(rgba(0, 0, 0, .18) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, rgba(0, 0, 0, .18) 1px, transparent 1px) 0 0 / 22px 22px,
    radial-gradient(ellipse at 50% 100%, #ff4a4f 0%, var(--red) 35%, var(--red-dark) 100%);
  box-shadow: inset 0 -30px 40px rgba(0, 0, 0, .35), 0 12px 40px rgba(0, 0, 0, .45);
}
.team-line { position: absolute; inset: 0; display: flex; justify-content: center; align-items: flex-end; padding-top: 40px; }
.team-figure { position: relative; flex: none; height: var(--h); margin: 0 var(--gap, -14px); display: flex; justify-content: center; transition: transform .25s, filter .25s; }
.team-figure img { height: 100%; width: auto; image-rendering: pixelated; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .55)); }
.team-figure:hover { text-decoration: none; transform: translateY(-8px); z-index: 150 !important; }
.team-letter { align-self: flex-end; width: 64px; height: 64px; display: grid; place-items: center; background: var(--stone); border: 2px solid #000; font: 700 28px/1 var(--display); color: var(--muted); }
/* Namensschild wie in Minecraft – erscheint beim Drüberfahren */
.nametag {
  position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translate(-50%, 6px);
  display: flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 4px 8px; background: rgba(0, 0, 0, .7); color: #fff; font: 700 14px/1.2 var(--display);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.nametag small { color: #f2c94c; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.team-figure:hover .nametag, .team-figure:focus-visible .nametag { opacity: 1; transform: translate(-50%, 0); }
.rank-anfuehrer .nametag { bottom: calc(100% + 34px); } /* über der Krone */
.team-dot { flex: none; width: 8px; height: 8px; background: var(--stone-light); }
.team-dot.on { background: var(--online); box-shadow: 0 0 6px var(--online); }
.team-crown { position: absolute; top: -26px; font-size: 24px; filter: drop-shadow(0 0 8px #000); }
.team-empty { align-self: center; color: rgba(255, 255, 255, .8); font: 600 16px var(--display); }
/* Rang-Leisten unter den Gruppen */
.rank-bars { position: absolute; left: 0; right: 0; bottom: 0; height: 30px; z-index: 120; pointer-events: none;
  background: linear-gradient(transparent, rgba(0, 0, 0, .55)); }
.rank-bar { position: absolute; bottom: 8px; height: 2px; background: rgba(255, 255, 255, .5); }
.rank-bar span {
  position: absolute; left: 50%; bottom: -7px; transform: translateX(-50%);
  padding: 3px 7px; white-space: nowrap; background: #120c0d; color: #e6e0e0; border: 1px solid rgba(255, 255, 255, .25);
  font: 700 10px/1 var(--display); letter-spacing: .12em; text-transform: uppercase;
}
.side-left span { left: 0; transform: none; }
.side-right span { left: auto; right: 0; transform: none; }
.bar-anfuehrer { background: #fff; z-index: 1; }
.bar-anfuehrer span { background: var(--red); color: #fff; border-color: #000; font-size: 11px; }
.bar-offizier { background: var(--red-hot); }
.bar-offizier span { color: #ffc2c4; border-color: var(--red-hot); }
/* Emote-Sprechblase über dem Kopf */
.emote {
  position: absolute; bottom: calc(100% + 6px); left: 50%; z-index: 3;
  padding: 4px 8px; white-space: nowrap; pointer-events: none;
  background: #fff; color: #111; border: 2px solid #000; box-shadow: 3px 3px 0 rgba(0, 0, 0, .45);
  font: 700 15px/1 var(--display);
  animation: emotePop 2.4s ease-out forwards;
}
.emote::after { content: ''; position: absolute; top: 100%; left: 50%; margin-left: -5px; border: 5px solid transparent; border-top-color: #000; }
.emote.big { font-size: 22px; padding: 5px 10px; animation-duration: 3.6s; border-color: #f2c94c; box-shadow: 0 0 18px rgba(242, 201, 76, .7), 3px 3px 0 rgba(0, 0, 0, .45); }
.rank-anfuehrer .emote { bottom: calc(100% + 32px); }
@keyframes emotePop {
  0% { opacity: 0; transform: translate(-50%, 8px) scale(.4); }
  10% { opacity: 1; transform: translate(-50%, 0) scale(1.15); }
  16% { transform: translate(-50%, 0) scale(1); }
  85% { opacity: 1; transform: translate(-50%, -4px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -14px) scale(.9); }
}
/* Leichtes Wippen im eigenen Takt */
.fx .team-figure img { animation: idle 4s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes idle { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
.fx .team-figure.rank-anfuehrer img { animation: bob 3.2s ease-in-out infinite; } /* Inhaber schwebt etwas stärker */
.team-figure:not(.online) img { filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .55)) saturate(.85); }

/* Gerade befördert: kurzer goldener Schein */
.team-figure.promoted img { animation: promoted 2.6s ease-out; }
@keyframes promoted { 0%, 40% { filter: drop-shadow(0 0 14px #f2c94c) drop-shadow(0 0 4px #fff); } 100% { filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .55)); } }


/* ---------- Discord ---------- */
.btn-discord { background: #5865f2; color: #fff; }
.dc-icon { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.btn-sm .dc-icon { width: 16px; height: 16px; }
footer a { color: var(--muted); }
footer a:hover { color: var(--text); }
footer .dc-icon { width: 14px; height: 14px; }
.nav-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: 4px; padding: 0 5px; background: var(--red); color: #fff; font: 700 11px/1 Inter, sans-serif; }

/* ---------- Regeln ---------- */
.rules-panel { max-width: 820px; }
.rules h3 { margin: 22px 0 10px; font: 700 20px/1.2 var(--display); text-transform: uppercase; letter-spacing: .03em; color: var(--red-hot); }
.rules h3:first-child { margin-top: 0; }
.rules p { margin: 0 0 12px; }
.rules ol, .rules ul { margin: 0 0 14px; padding-left: 0; list-style: none; display: grid; gap: 8px; }
.rules ol { counter-reset: r; }
.rules ol li { counter-increment: r; position: relative; padding: 10px 12px 10px 50px; background: var(--bg-2); border: 1px solid var(--line); }
.rules ol li::before { content: counter(r); position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; display: grid; place-items: center; background: var(--red); color: #fff; font: 700 15px/1 var(--display); border: 2px solid #000; }
.rules ul li { position: relative; padding-left: 20px; }
.rules ul li::before { content: ''; position: absolute; left: 4px; top: .6em; width: 7px; height: 7px; background: var(--red); }
#rules-input, .apply-form textarea, .note-edit textarea {
  display: block; width: 100%; padding: 10px 12px; background: var(--bg); color: var(--text);
  border: 2px solid var(--line); font: 14px/1.5 ui-monospace, monospace; resize: vertical;
}
.apply-form textarea, .note-edit textarea { font-family: Inter, system-ui, sans-serif; }
#rules-input:focus, .apply-form textarea:focus, .note-edit textarea:focus { outline: none; border-color: var(--red); }

/* ---------- Bewerbung ---------- */
.apply-panel { max-width: 720px; }
.apply-form { display: grid; gap: 4px; margin-top: 8px; }
.apply-form label { color: var(--text); font-size: 14px; }
.apply-form textarea { margin-top: 6px; }
label.check { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 14px; }
label.check input { width: auto; margin: 0; accent-color: var(--red); }
.notice { padding: 10px 12px; border-left: 4px solid #f2c94c; background: rgba(242, 201, 76, .08); }

/* ---------- Verwaltung ---------- */
.admin-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 12px; }
.admin-toolbar input#admin-search { width: 260px; margin: 0; }
.table-panel { padding: 0; overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th { text-align: left; padding: 12px 10px; font: 700 12px/1 var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-bottom: 2px solid var(--line); white-space: nowrap; }
.admin-table th[data-sort] { cursor: pointer; user-select: none; }
.admin-table th[data-sort]:hover { color: var(--text); }
.admin-table th[data-dir]:not([data-dir=""])::after { content: ' ' attr(data-dir); color: var(--red-hot); }
.admin-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.admin-table .player { display: flex; align-items: center; gap: 8px; color: var(--text); white-space: nowrap; }
.admin-table .player .head .status { display: none; }
.admin-table tr.is-inactive td { background: rgba(227, 38, 43, .05); }
.inactive { color: var(--red-hot); font-weight: 600; }
.app-chip { margin-left: 6px; border-color: #f2c94c; color: #f2c94c; }
.note-cell { min-width: 220px; }
.note { all: unset; cursor: pointer; display: block; max-width: 340px; white-space: pre-wrap; font-size: 13px; color: var(--text); }
.note.empty { color: var(--muted); }
.note:hover { color: var(--red-hot); }
.note-edit { display: flex; gap: 6px; align-items: flex-start; }
.app-card { margin-bottom: 14px; }
.app-card.status-offen { border-color: #8a6d1d; }
.app-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 14px; }
.app-head .player { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 17px; }
.app-head .player .head .status { display: none; }
.status-chip.offen { border-color: #f2c94c; color: #f2c94c; }
.status-chip.angenommen { border-color: var(--online); color: var(--online); }
.status-chip.abgelehnt { border-color: var(--red); color: var(--red-hot); }
.app-answers { display: grid; grid-template-columns: minmax(160px, 260px) 1fr; gap: 8px 16px; margin: 0 0 16px; }
.app-answers dt { color: var(--muted); font-size: 13px; }
.app-answers dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- Animationen ---------- */
.embers { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .55; }
main, footer { position: relative; z-index: 1; }

.fx .hero-logo img { animation: float 6s ease-in-out infinite; }
.fx .hero-logo::before { animation: glow 3.2s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-12px) rotate(-1deg); } }
@keyframes glow { 0%, 100% { opacity: .25; transform: scale(.95); } 50% { opacity: .5; transform: scale(1.05); } }

.hero h1 .drop { display: inline-block; }
.fx .hero h1 .drop { animation: drop .55s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: calc(var(--i) * 70ms + 150ms); }
@keyframes drop { from { opacity: 0; transform: translateY(-70px); } 70% { opacity: 1; } to { transform: none; } }
.fx .eyebrow, .fx .lead, .fx .hero-actions { animation: fadeUp .6s ease-out both; }
.fx .eyebrow { animation-delay: .05s; }
.fx .lead { animation-delay: .65s; }
.fx .hero-actions { animation-delay: .8s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.fx .reveal { opacity: 0; transform: translateY(22px); transition: opacity .55s ease-out, transform .55s cubic-bezier(.2, .8, .3, 1); transition-delay: var(--d, 0ms); }
.fx .reveal.in { opacity: 1; transform: none; }

.fx .podium-place.in .podium-block { animation: rise .7s cubic-bezier(.2, .9, .3, 1.15) both; transform-origin: bottom; }
.fx .podium-place.in.p2 .podium-block { animation-delay: .15s; }
.fx .podium-place.in.p3 .podium-block { animation-delay: .3s; }
@keyframes rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.fx .p1 .crown { display: inline-block; animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

.fx .lb-bar i { transform-origin: left; animation: grow 1s cubic-bezier(.2, .8, .3, 1) both; animation-delay: .2s; }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.fx .head .status.on { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 4px var(--online); } 50% { box-shadow: 0 0 12px var(--online); } }

.tile, .member, .feed li, .steps li { transition: border-color .2s, transform .2s, opacity .55s ease-out; }
.member:hover, .tile:hover { transform: translateY(-3px); }
.fx .reveal.in.member:hover, .fx .reveal.in.tile:hover { transform: translateY(-3px); }
.btn::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.25) 50%, transparent 70%); transform: translateX(-120%); transition: transform .5s; }
.btn { position: relative; overflow: hidden; }
.btn:hover::after { transform: translateX(120%); }
.view:not([hidden]) { animation: viewIn .35s ease-out; }
@keyframes viewIn { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .embers { display: none; }
}

/* ---------- Handy ---------- */
@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; gap: 8px 12px; padding: 10px 16px; }
  #nav { order: 3; flex-basis: 100%; overflow-x: auto; }
  .session { margin-left: auto; }
  #me-name { display: none; }
  .hero { grid-template-columns: 1fr; gap: 20px; text-align: center; padding-top: 8px; }
  .hero-logo { width: 200px; margin: 0 auto; }
  .lead { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .tiles { gap: 8px; }
  .team-banner { height: 200px; }
  .rank-bar span { font-size: 8px; padding: 2px 5px; letter-spacing: .06em; }
  .emote { font-size: 13px; }
  .team-figure { height: calc(var(--h) * .72); margin: 0 calc(var(--gap, -14px) * .6); }
  .tile { padding: 14px 12px; }
  .tile-num { font-size: 28px; }
  .tile-label { font-size: 12px; }
  .member-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .podium { gap: 8px; }
  .podium-place .head { width: 48px; height: 48px; }
  .podium-place.p1 .head { width: 60px; height: 60px; }
  .podium-name { font-size: 13px; text-align: center; overflow-wrap: anywhere; }
  .podium-value { font-size: 12px; }
  .p1 .podium-block { height: 110px; }
  .p2 .podium-block { height: 80px; }
  .p3 .podium-block { height: 60px; }
  .lb-list a { grid-template-columns: 30px 34px 1fr auto; gap: 8px; padding: 10px 6px; }
  .lb-list .head { width: 34px; height: 34px; }
  .lb-list .value { font-size: 15px; }
  .profile-head .head { width: 64px; height: 64px; }
  .profile-head h1 { font-size: 28px; }
  .profile-cols { grid-template-columns: 1fr; }
  .app-answers { grid-template-columns: 1fr; gap: 2px; }
  .app-answers dd { margin-bottom: 8px; }
  .admin-toolbar input#admin-search { width: 100%; }
  .dc-text { display: none; }
  .view-head { flex-direction: column; }
  .period-tabs button { padding: 8px 10px; }
}

/* ---------- Login mit Minecraft ---------- */
.auth-panel .muted.center { margin: -8px 0 18px; }
.login-steps { grid-template-columns: 1fr; }
.pw-login { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.pw-login summary { cursor: pointer; color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.pw-login summary:hover { color: var(--text); }

.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

/* Live-Aktualisierung: Balken, Diagramme und Zahlen nicht jedes Mal neu animieren */
.quiet .lb-bar i, .quiet .chart-bar { animation: none !important; }

/* ---------- Clan-Funktionen ---------- */
body:not(.can-manage) .manage-only { display: none !important; }
.btn-x { flex: none; margin-left: auto; width: 28px; height: 28px; display: grid; place-items: center; background: transparent; color: var(--muted); border: 2px solid var(--line); font: 700 18px/1 var(--display); cursor: pointer; }
.btn-x:hover { color: var(--red-hot); border-color: var(--red-dark); }
.progress { height: 10px; background: var(--bg); border: 2px solid #000; box-shadow: inset 0 2px 0 rgba(0,0,0,.4); }
.progress i { display: block; height: 100%; background: linear-gradient(var(--red-hot), var(--red) 60%, var(--red-dark)); transition: width .8s cubic-bezier(.2,.9,.3,1); }
.progress.gold i { background: linear-gradient(#ffe27a, #f2c94c 60%, #b8901c); }
.inline-form { margin-bottom: 18px; }
.inline-form textarea, .inline-form select { display: block; width: 100%; margin-top: 6px; padding: 10px 12px; background: var(--bg); color: var(--text); border: 2px solid var(--line); font: 14px/1.5 Inter, system-ui, sans-serif; resize: vertical; }
.inline-form textarea:focus, .inline-form select:focus { outline: none; border-color: var(--red); }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0 12px; }
.eyebrow.small, .next-text .eyebrow, .pow .eyebrow { font-size: 12px; margin: 0 0 4px; }

/* Ankündigungen */
.news { display: grid; gap: 10px; margin-bottom: 30px; }
.news-item { padding: 16px 20px; border-left: 4px solid var(--stone-light); }
.news-item.latest { border-left-color: var(--red); }
.news-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.news-head h3 { margin: 0; font: 700 19px/1.2 var(--display); }
.news-text p { margin: 8px 0 0; }
.news-text ul, .news-text ol { margin: 8px 0 0; padding-left: 20px; }
.news-text h3 { margin: 10px 0 0; font: 700 16px var(--display); }

/* Nächster Termin */
.next-event { display: flex; align-items: center; gap: 18px; margin-bottom: 30px; color: var(--text); border-color: var(--red-dark); }
.next-event:hover { text-decoration: none; border-color: var(--red); }
.next-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.next-text b { font: 700 20px/1.2 var(--display); }
.next-arrow { font: 700 26px var(--display); color: var(--red-hot); }
.date-block { flex: none; width: 66px; display: flex; flex-direction: column; align-items: center; background: var(--bg-2); border: 2px solid #000; box-shadow: inset 0 4px 0 var(--red); padding: 8px 0 6px; }
.date-block b { font: 700 28px/1 var(--display); }
.db-month { font: 700 12px/1 var(--display); text-transform: uppercase; color: var(--red-hot); margin-top: 2px; }
.db-time { font-size: 12px; color: var(--muted); }

/* Ziele */
.goals { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin-bottom: 30px; }
.goal { display: flex; flex-direction: column; gap: 10px; }
.goal.done { border-color: #6d5a1c; }
.goal-head { display: flex; align-items: flex-start; gap: 10px; }
.goal-head h3 { margin: 0; font: 700 18px/1.2 var(--display); }
.goal-nums { display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; }
.goal-nums b { font: 700 24px/1 var(--display); }
.goal-pct { margin-left: auto; font: 700 16px var(--display); color: var(--red-hot); }
.goal.done .goal-pct { color: #f2c94c; }
.goal-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.goal-top { display: flex; gap: 4px; }
.goal-top .head .status, .event-people .head .status, .project-top .head .status, .weekly-cat .head .status, .absence-list .head .status, .admin-table .head .status { display: none; }

/* Wochen-Rückblick */
.weekly { display: grid; gap: 12px; margin-bottom: 30px; }
.pow { display: flex; align-items: center; gap: 20px; color: var(--text); overflow: hidden; position: relative; background: linear-gradient(90deg, rgba(227, 38, 43, .22), transparent 70%), var(--panel); }
.pow:hover { text-decoration: none; }
.pow-skin { height: 120px; image-rendering: pixelated; margin: -8px 0 -22px; filter: drop-shadow(0 6px 8px rgba(0,0,0,.6)); }
.pow-crown { position: absolute; left: 30px; top: 6px; font-size: 22px; }
.pow div { display: flex; flex-direction: column; }
.pow-name { font: 700 30px/1.1 var(--display); }
.weekly-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.weekly-tiles .tile-num { font-size: 28px; }
.weekly-cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.weekly-cat ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.weekly-cat li { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; }
.weekly-cat li a { display: flex; align-items: center; gap: 8px; color: var(--text); min-width: 0; }
.weekly-cat li:first-child b { color: var(--red-hot); }

/* Abzeichen */
.tag-badge { font-size: 13px; line-height: 1; }
.clan-badges { margin-bottom: 14px; }
.cb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.cb { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 12px 8px; background: var(--bg-2); border: 2px solid var(--line); }
.cb.max { border-color: #6d5a1c; background: linear-gradient(rgba(242, 201, 76, .08), transparent), var(--bg-2); }
.cb-icon { font-size: 30px; line-height: 1.1; }
.cb b { font: 700 15px/1.2 var(--display); }
.cb-stars { color: #f2c94c; letter-spacing: 2px; font-size: 13px; }
.profile-actions { margin-top: 10px; }

/* Termine */
.events { display: grid; gap: 12px; }
.event { display: flex; gap: 18px; align-items: flex-start; }
.event.running { border-color: #2d4a33; }
.event-body { flex: 1; min-width: 0; }
.event-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.event-head h3 { margin: 0; font: 700 20px/1.2 var(--display); }
.event-body p { margin: 6px 0 0; }
.event-desc { white-space: pre-line; }
.event-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.event-counts { font-size: 13px; color: var(--muted); }
.event-people { display: flex; gap: 4px; flex-wrap: wrap; }
.event-people .head.maybe { opacity: .5; }
.rsvp { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.rsvp-btn { font: 600 14px/1 var(--display); padding: 8px 12px; background: var(--bg-2); color: var(--muted); border: 2px solid var(--line); cursor: pointer; }
.rsvp-btn:hover { color: var(--text); }
.rsvp-btn.ja.active { background: #1f5a2c; border-color: #000; color: #fff; }
.rsvp-btn.vielleicht.active { background: #6d5a1c; border-color: #000; color: #fff; }
.rsvp-btn.nein.active { background: var(--red-dark); border-color: #000; color: #fff; }

/* Projekte */
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 14px; }
.project { display: flex; flex-direction: column; gap: 12px; }
.project.status-fertig { border-color: #6d5a1c; }
.project p { margin: 0; }
.project-head { display: flex; align-items: center; gap: 10px; }
.project-head h3 { margin: 0; font: 700 21px/1.2 var(--display); flex: 1; }
.project-head select { flex: none; }
.chip.status-aktiv { border-color: var(--red-dark); color: var(--red-hot); }
.chip.status-fertig { border-color: #6d5a1c; color: #f2c94c; }
.project-total { display: flex; align-items: center; gap: 12px; }
.project-total b { font: 700 22px/1 var(--display); min-width: 58px; }
.project-total .progress { flex: 1; height: 14px; }
.project-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.project-items li { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; }
.project-items li .progress { grid-column: 1; height: 8px; }
.project-items li.done .pi-name { color: #f2c94c; }
.pi-count { font-variant-numeric: tabular-nums; font-size: 14px; color: var(--muted); }
.pi-add { grid-column: 2; grid-row: 2; display: flex; gap: 4px; }
.pi-add input { width: 78px; margin: 0; padding: 4px 6px; font-size: 13px; }
.pi-add .btn { padding: 4px 10px; }
.pi-more { display: flex; gap: 6px; }
.pi-more input { margin: 0; padding: 7px 10px; font-size: 14px; }
.project-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* Wegpunkte */
.wp-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 8px; }
.wp { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--panel); border: 2px solid var(--line); }
.wp-icon { font-size: 20px; color: #4ade6b; }
.wp.dim-the_nether .wp-icon { color: var(--red-hot); }
.wp.dim-the_end .wp-icon { color: #c08cff; }
.wp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wp-main .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wp-coords { font: 600 13px/1 ui-monospace, monospace; background: var(--bg); color: var(--text); border: 1px solid var(--line); padding: 6px 8px; cursor: pointer; white-space: nowrap; }
.wp-coords:hover { border-color: var(--red); }
.wp .btn-x { margin-left: 0; }
.map-wp-icon { fill: #f2c94c; stroke: #000; stroke-width: 2; }
.map-wp-name { fill: #f2c94c; font: 700 13px var(--display); paint-order: stroke; stroke: #000; stroke-width: 3px; }

/* Konto */
.privacy-panel, .absence-panel { margin-top: 14px; }
.privacy-panel p, .absence-panel > p { margin: 0 0 10px; }
.absence-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.absence-list li { display: flex; align-items: center; gap: 12px; padding: 8px 10px; background: var(--bg-2); border: 1px solid var(--line); }
.away-chip { margin-left: 6px; border-color: #1e4b55; color: #5ee0f0; }

/* Verwaltung: Inhalte & Protokoll */
.content-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; align-items: start; }
.content-grid .inline-form { margin: 0; }
.audit { list-style: none; margin: 0; padding: 8px 16px; }
.audit li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.audit li:last-child { border-bottom: 0; }
.audit li > span:nth-child(2) { flex: 1; }
.audit-icon { width: 24px; text-align: center; }
.audit time { color: var(--muted); font-size: 12px; white-space: nowrap; }

/* Vergleich */
.compare-pick { display: flex; align-items: center; gap: 14px; padding: 14px; margin-bottom: 14px; }
.compare-pick select { flex: 1; padding: 10px; font-size: 16px; }
.vs { font: 700 20px/1 var(--pixel); color: var(--red-hot); }
.vs.big { font-size: 40px; text-shadow: 3px 3px 0 var(--red-dark); }
.compare { display: grid; gap: 8px; }
.cmp-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-bottom: 12px; }
.cmp-player { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--text); }
.cmp-player:hover { text-decoration: none; }
.cmp-player img { height: 180px; image-rendering: pixelated; filter: drop-shadow(0 6px 8px rgba(0,0,0,.6)); }
.cmp-player b { font: 700 22px var(--display); }
.cmp-player.leader b::before { content: '👑 '; }
.cmp-score { font: 600 14px var(--display); color: var(--muted); }
.cmp-player.leader .cmp-score { color: var(--red-hot); }
.cmp-row { display: grid; grid-template-columns: 1fr 160px 1fr; align-items: center; gap: 12px; padding: 6px 0; border-top: 1px solid var(--line); }
.cmp-label { text-align: center; font: 600 14px var(--display); color: var(--muted); }
.cmp-side { display: flex; flex-direction: column; gap: 4px; }
.cmp-side.left { align-items: flex-end; }
.cmp-side b { font: 700 17px var(--display); color: var(--muted); }
.cmp-side.win b { color: var(--text); }
.cmp-side.win b::after, .cmp-side.left.win b::before { color: var(--red-hot); }
.cmp-bar { width: 100%; height: 8px; background: var(--bg); display: flex; }
.cmp-bar.left { justify-content: flex-end; }
.cmp-bar i { display: block; height: 100%; background: var(--stone-light); }
.cmp-side.win .cmp-bar i { background: var(--red); }

@media (max-width: 760px) {
  .projects, .goals, .wp-list { grid-template-columns: 1fr; }
  .weekly-tiles { gap: 8px; }
  .weekly-tiles .tile-num { font-size: 20px; }
  .pow-skin { height: 90px; }
  .pow-name { font-size: 22px; }
  .event { gap: 12px; }
  .date-block { width: 54px; }
  .cmp-row { grid-template-columns: 1fr 90px 1fr; gap: 6px; }
  .cmp-label { font-size: 12px; }
  .cmp-player img { height: 110px; }
  .cmp-player b { font-size: 16px; }
  .vs.big { font-size: 26px; }
  .next-event { gap: 12px; }
}
@media (max-width: 1360px) and (min-width: 761px) {
  #nav a { padding: 9px 6px; font-size: 14px; }
  .brand span { font-size: 20px; }
}
