@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/inter-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/inter-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("fonts/inter-latin-800-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/inter-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/inter-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("fonts/inter-latin-ext-800-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2");
}

:root {
  --bg: #07050d;
  --bg-elev: #120c1f;
  --line: #241a3a;
  --pink: #ff1e8e;
  --violet: #6a2bff;
  --text: #ede9f5;
  --muted: #9a90b5;
  --grad: linear-gradient(135deg, var(--pink), var(--violet));
  --radius: 16px;
  /* Pointer-driven tilt, written by app.js. */
  --rx: 0deg;
  --ry: 0deg;
  --mx: 50%;
  --my: 50%;
}

* { box-sizing: border-box; }

/* Needed because .card sets display:flex, which would otherwise beat the UA
   [hidden] rule and keep filtered-out cards visible. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Ambient gem glow behind the hero. */
.glow {
  position: fixed;
  inset: -25vh -15vw auto;
  height: 125vh;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(58vw 55vh at 30% 26%,
      rgba(255, 30, 142, 0.20),
      rgba(255, 30, 142, 0.09) 34%,
      rgba(255, 30, 142, 0.025) 58%,
      rgba(255, 30, 142, 0) 80%),
    radial-gradient(58vw 55vh at 70% 20%,
      rgba(106, 43, 255, 0.22),
      rgba(106, 43, 255, 0.10) 34%,
      rgba(106, 43, 255, 0.03) 58%,
      rgba(106, 43, 255, 0) 80%);
}

.hero,
.page,
.footer { position: relative; z-index: 1; }

.page { flex: 1; }

/* ---------- hero ---------- */

.hero {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 44px 24px 40px;
  text-align: center;
}

/* ---------- topbar ---------- */

.topbar {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.brand__logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  box-shadow: 0 0 0 1px var(--line), 0 6px 18px rgba(255, 30, 142, 0.25);
}

.topbar__links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.topbar__links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s, background-color 0.2s;
}

.topbar__links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }

.topbar__discord { color: var(--text) !important; border: 1px solid var(--line); }

/* ---------- Klassenbild ----------
   Eine breite Bühne über dem Titel: classphoto.js hängt sein WebGL-Canvas in
   .photo__stage, der Rahmen drumherum gibt dem Ganzen den Fotolook. Der Kasten
   bricht aus der Hero-Breite aus, damit die ganze Reihe Platz hat. */

.photo {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: min(1400px, calc(100vw - 28px));
  margin: 0 0 22px;
}

.photo__frame {
  position: relative;
  height: clamp(300px, 44vh, 500px);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 8%, rgba(106, 43, 255, 0.22), rgba(106, 43, 255, 0) 62%),
    radial-gradient(90% 80% at 50% 100%, rgba(255, 30, 142, 0.16), rgba(255, 30, 142, 0) 60%),
    linear-gradient(180deg, #0d0818, #07050d);
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Vignette: zieht den Blick in die Mitte und kaschiert die Bildränder. */
.photo__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(118% 100% at 50% 44%, rgba(7, 5, 13, 0) 40%, rgba(7, 5, 13, 0.5) 76%, rgba(7, 5, 13, 0.93) 100%);
}

.photo__stage {
  position: absolute;
  inset: 0;
}

.photo__gl {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.photo--ready .photo__gl { opacity: 1; }

.photo__status {
  position: absolute;
  inset: auto 0 50% 0;
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  animation: photo-pulse 1.6s ease-in-out infinite;
}

.photo--ready .photo__status,
.photo--failed .photo__status { animation: none; }
.photo--ready .photo__status { opacity: 0; visibility: hidden; transition: opacity 0.5s ease, visibility 0s 0.5s; }

/* Ohne WebGL bleibt nur der Rahmen übrig – dann lieber ganz weg. */
.photo--failed { display: none; }

@keyframes photo-pulse {
  0%, 100% { opacity: 0.45; }
  50%      { opacity: 0.9; }
}

.photo__caption {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 0.86rem;
  color: var(--muted);
}

.photo__label {
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(18, 12, 31, 0.7);
  color: var(--text);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.hero__title {
  margin: 8px 0 -0.12em;
  font-size: clamp(2.4rem, 11vw, 5.5rem);
  font-weight: 800;
  letter-spacing: 0.12em;
  /* Balances the trailing letter-space so the word stays optically centred and
     the last glyph never clips at the viewport edge. */
  text-indent: 0.12em;
  line-height: 1.5;
  padding: 0.08em 0.1em 0.3em;
  overflow-wrap: anywhere;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__tagline {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
  letter-spacing: 0.02em;
}

.hero__stats {
  margin-top: 22px;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.stat {
  padding: 7px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(18, 12, 31, 0.7);
  color: var(--muted);
  font-size: 0.84rem;
}

.stat strong { color: var(--text); }

.invite {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(18, 12, 31, 0.7);
  color: var(--text);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.88rem;
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}
.invite:hover { border-color: var(--pink); transform: translateY(-1px); }
.invite__label {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- toolbar ---------- */

.page {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.toolbar {
  display: flex;
  justify-content: center;
  margin-bottom: 34px;
}

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(420px, 100%);
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(18, 12, 31, 0.8);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search:focus-within {
  border-color: rgba(255, 30, 142, 0.55);
  box-shadow: 0 0 0 4px rgba(255, 30, 142, 0.1);
}

.search svg {
  width: 17px;
  height: 17px;
  flex: none;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  stroke-linecap: round;
}

.search input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.94rem;
}

.search input::placeholder { color: var(--muted); }

/* ---------- buttons ---------- */

.hero__cta {
  margin-top: 24px;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(18, 12, 31, 0.8);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 30, 142, 0.5);
}

.btn--primary {
  border-color: transparent;
  background: var(--grad);
  color: #fff;
  box-shadow: 0 10px 30px rgba(255, 30, 142, 0.25);
}

.btn--primary:hover { box-shadow: 0 14px 36px rgba(255, 30, 142, 0.35); }

/* ---------- verify panel ---------- */

.verify {
  display: flex;
  gap: 18px;
  margin: 0 0 30px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(255, 30, 142, 0.10), rgba(106, 43, 255, 0.08));
}

.verify__mark {
  flex: none;
  width: 34px;
  height: 34px;
}

.verify__mark svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--pink);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.verify__body { min-width: 0; }

.verify__title {
  margin: 0 0 8px;
  font-size: 1.12rem;
  font-weight: 700;
}

.verify p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.verify p:last-child { margin-bottom: 0; }

/* Two classes, so this wins over `.verify p` without !important. */
.verify .verify__punch {
  color: var(--text);
  font-weight: 600;
}

/* ---------- trust pillars ---------- */

.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 48px;
}

.pillar {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(18, 12, 31, 0.95), rgba(10, 7, 19, 0.95));
}

.pillar__title {
  margin: 0 0 9px;
  font-size: 1rem;
  font-weight: 700;
}

.pillar__title::before {
  content: "";
  display: block;
  width: 34px;
  height: 3px;
  margin-bottom: 13px;
  border-radius: 2px;
  background: var(--grad);
}

.pillar p {
  margin: 0;
  color: var(--muted);
  font-size: 0.89rem;
  line-height: 1.6;
}

/* ---------- aufnahme ---------- */

.join { margin-bottom: 56px; }

.join__title,
.section__title {
  margin: 0 0 10px;
  font-size: clamp(1.4rem, 4vw, 1.9rem);
  font-weight: 800;
}

.join__lead {
  margin: 0 0 22px;
  max-width: 62ch;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.6;
}

.tiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.tier {
  position: relative;
  padding: 20px;
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(18, 12, 31, 0.95), rgba(10, 7, 19, 0.95));
}

/* Gradient border marks the higher tier, same masking trick as .card. */
.tier--main::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
}

.tier__rank {
  display: inline-block;
  margin-bottom: 16px;
  padding: 6px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tier--main .tier__rank {
  border-color: transparent;
  background: var(--grad);
  color: #fff;
}

.tier__specs { margin: 0; }

.tier__specs > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.tier__specs > div:first-child {
  padding-top: 0;
  border-top: 0;
}

.tier__specs dt {
  color: var(--muted);
  font-size: 0.85rem;
}

.tier__specs dd {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 650;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.join__note {
  margin: 18px 0 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: 0.87rem;
  line-height: 1.6;
}

.join__cta { margin-top: 22px; }

/* ---------- members section ---------- */

.section__head { margin-bottom: 22px; }

.section__sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------- roster ---------- */

.rank { margin-bottom: 46px; }

.rank__head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.rank__pill {
  padding: 7px 17px;
  border-radius: 999px;
  background: var(--grad);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.rank__count {
  color: var(--muted);
  font-size: 0.84rem;
  font-variant-numeric: tabular-nums;
}

.rank__rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}

/* Label column: every member carrying a configured label, grouped per label and
   framed so it reads apart from the plain rank groups underneath. */
.roster__labels {
  margin-bottom: 46px;
  padding: 26px 22px 6px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
}

.roster__labels .rank:last-child { margin-bottom: 20px; }

.rank__pill--tinted {
  background: color-mix(in srgb, var(--label-color) 22%, transparent);
  border: 1px solid color-mix(in srgb, var(--label-color) 55%, transparent);
  color: var(--label-color);
}

.card__rank {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(152px, 1fr));
  gap: 14px;
}

/* Portrait tile: full-body skin render, plain. The whole card tilts toward
   the pointer (app.js writes --rx/--ry/--mx/--my). */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 18px 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(18, 12, 31, 0.95), rgba(10, 7, 19, 0.95));
  transform: perspective(800px) rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform 0.3s ease, border-color 0.2s ease, box-shadow 0.3s ease;
}

/* Glare that follows the pointer across the tilted surface. */
.card::after,
.tier::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(240px circle at var(--mx) var(--my), rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0) 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover::after,
.tier:hover::after { opacity: 1; }

/* Gradient border reveal on hover, drawn as a masked overlay. */
.card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.card:hover {
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.55), 0 0 40px rgba(255, 30, 142, 0.12);
}

.tier:hover { box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5); }

.card:hover::before { opacity: 1; }

.card__stage {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  height: 196px;
  padding-bottom: 14px;
  box-sizing: border-box;
  transform-style: preserve-3d;
}

/* Floor disc under the feet: a flat ellipse with a lit rim. It sits fully
   inside the stage, so it can never overlap the name below. */
.card__plinth {
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 72%;
  height: 24px;
  margin-left: -36%;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(255, 30, 142, 0.5), rgba(106, 43, 255, 0.32) 45%, rgba(24, 16, 40, 0.95) 72%);
  box-shadow:
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.18),
    inset 0 0 16px rgba(255, 30, 142, 0.4),
    0 2px 14px rgba(255, 30, 142, 0.18);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card__plinth::before {
  content: "";
  position: absolute;
  inset: 22% 16%;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.card:hover .card__plinth {
  transform: scale(1.06);
  box-shadow:
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.26),
    inset 0 0 20px rgba(255, 30, 142, 0.55),
    0 3px 20px rgba(255, 30, 142, 0.28);
}

.card__skin {
  position: relative;
  z-index: 1;
  width: auto;
  max-width: 100%;
  height: 100%;
  margin-bottom: 6px;             /* feet land on the centre line of the disc */
  object-fit: contain;
  object-position: bottom;
  image-rendering: pixelated;
  filter: drop-shadow(0 10px 10px rgba(0, 0, 0, 0.55));
  transform: translateZ(24px);
  transition: transform 0.3s ease;
}

.card:hover .card__skin { transform: translateZ(40px) translateY(-6px); }

.card__body {
  width: 100%;
  min-width: 0;
  text-align: center;
}

.card__name {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  color: var(--text);
  font-weight: 650;
  font-size: 0.98rem;
}

.card__name span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Tick for a Minecraft name confirmed in config; guessed names get none. */
.card__verified {
  flex: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  padding: 3px;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* Secondary line: Discord handle, deliberately dimmer than the Minecraft name. */
.card__discord {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 4px;
  min-width: 0;
  color: var(--muted);
}

.card__dc-icon {
  width: 13px;
  height: 13px;
  flex: none;
  fill: currentColor;
  opacity: 0.75;
}

.card__handle {
  font-size: 0.79rem;
  font-family: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Config-driven badges: neutral by default, tinted when the label sets a colour. */
.card__labels {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 8px;
}

.label {
  --label-color: var(--muted);
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.label--tinted {
  border-color: color-mix(in srgb, var(--label-color) 45%, transparent);
  background: color-mix(in srgb, var(--label-color) 14%, transparent);
  color: var(--label-color);
}

/* ---------- states ---------- */

/* Vom Klassenbild angesprungen: kurz aufleuchten, damit man die Karte findet. */
.card--spot {
  animation: card-spot 2.2s ease-out 1;
}

@keyframes card-spot {
  0%   { border-color: var(--pink); box-shadow: 0 0 0 0 rgba(255, 30, 142, 0.55); }
  35%  { border-color: var(--pink); box-shadow: 0 0 0 10px rgba(255, 30, 142, 0); }
  100% { border-color: var(--line); box-shadow: 0 0 0 0 rgba(255, 30, 142, 0); }
}

.card--skeleton { pointer-events: none; }

.card--skeleton .card__ghost,
.card--skeleton .bar {
  background: linear-gradient(90deg, #171029, #241a3a, #171029);
  background-size: 200% 100%;
  animation: shimmer 1.3s linear infinite;
}

.card--skeleton .card__ghost {
  width: 72px;
  height: 100%;
  border-radius: 10px;
}

.card--skeleton .bar {
  height: 11px;
  width: 74%;
  margin: 0 auto;
  border-radius: 6px;
}

.card--skeleton .bar + .bar { margin-top: 8px; width: 48%; }

@keyframes shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

.banner {
  margin-bottom: 26px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--pink);
  border-radius: 12px;
  background: rgba(255, 30, 142, 0.07);
  color: var(--text);
  font-size: 0.9rem;
}

.empty {
  padding: 44px 0;
  color: var(--muted);
  text-align: center;
}

.footer {
  margin-top: 40px;
  padding: 34px 24px 52px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

.footer p { margin: 0; }

.footer__by {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 !important;
  padding: 8px 16px 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(18, 12, 31, 0.7);
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1;
}

.footer__label, .footer__amp { color: var(--muted); }
.footer__maker { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }

.footer__legal {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 18px;
}

.footer__link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}
.footer__link:hover { color: var(--text); }

/* Legal texts live in a dialog: invisible until a footer link opens it. */
.legal-dialog {
  width: min(680px, calc(100vw - 32px));
  max-height: min(80vh, 760px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
  color: var(--text);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
}
.legal-dialog::backdrop { background: rgba(4, 2, 10, 0.75); backdrop-filter: blur(4px); }
.legal-dialog__inner { position: relative; padding: 28px 28px 24px; }
.legal-dialog__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(18, 12, 31, 0.8);
  color: var(--text);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}
.legal-dialog__close:hover { border-color: var(--pink); }

.legal {
  max-width: 62ch;
  margin: 0;
  text-align: left;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.65;
}
.legal + .legal { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.legal h2 { margin: 0 0 10px; color: var(--text); font-size: 1.02rem; }
.legal p { margin: 0 0 8px; }
.legal strong { color: var(--text); font-weight: 600; }
.legal em { font-style: normal; color: var(--pink); }

.footer__head {
  /* display:block kills the inline baseline gap that pushed the head off-centre. */
  display: block;
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 7px;
  image-rendering: pixelated;
  box-shadow: 0 0 0 1px var(--line);
}

@media (max-width: 900px) {
  .hero { padding: 36px 20px 32px; }
  .photo__frame { height: clamp(240px, 38vh, 380px); border-radius: 18px; }
  .page { padding: 0 20px 64px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .verify { padding: 18px; }
}

@media (max-width: 560px) {
  .hero { padding: 24px 16px 26px; }
  .photo { width: calc(100vw - 20px); }
  .photo__frame { height: clamp(200px, 32vh, 300px); }
  .photo__caption { font-size: 0.78rem; }
  .topbar { padding: 14px 16px 0; }
  .topbar__links a:not(.topbar__discord) { display: none; }
  .hero__tagline { font-size: 0.92rem; }
  .page { padding: 0 14px 52px; }
  .toolbar { margin-bottom: 26px; }
  .search { width: 100%; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card { padding: 14px 10px 12px; gap: 10px; }
  .card__stage { height: 138px; }
  .rank { margin-bottom: 34px; }
  .roster__labels { margin-bottom: 34px; padding: 20px 14px 4px; border-radius: 14px; }
  .rank__head { gap: 10px; }
  .rank__pill { font-size: 0.76rem; padding: 6px 13px; }
  .rank__count { font-size: 0.78rem; }
  .footer { margin-top: 28px; padding: 26px 16px 40px; font-size: 0.78rem; }
  .hero__cta { gap: 8px; }
  .btn { padding: 10px 18px; font-size: 0.85rem; }
  .verify { flex-direction: column; gap: 12px; padding: 16px; margin-bottom: 24px; }
  .verify__title { font-size: 1.04rem; }
  .pillars { gap: 10px; margin-bottom: 36px; }
  .pillar { padding: 16px; }
  .tiers { gap: 10px; }
  .tier { padding: 16px; }
  .join { margin-bottom: 40px; }
}

/* Very narrow phones: let the rank pill wrap instead of squeezing the rule. */
@media (max-width: 380px) {
  .rank__head { flex-wrap: wrap; }
  .rank__rule { display: none; }
  .card__stage { height: 124px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .card, .tier { transform: none !important; }
}

/* Focus ring for keyboard users. */
a:focus-visible, input:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
}
