/* FindYourMates – Gaming-Look passend zum Discord-Bot: dunkles Navy, Valorant-Rot, kantige Ecken, Chakra Petch + Barlow Condensed.
   Standard ist dunkel, hell lässt sich oben im Header umschalten (data-theme).
   Layout: Filter-Spalte links, Kartenstapel in der Mitte; am Handy Tab-Leiste unten und Filter als Sheet. */
:root {
  color-scheme: dark;
  --bg: #0b0d13;
  --surface: #151924;
  --surface-2: #1c2130;
  --fill: rgba(255, 255, 255, .06);
  --fill-2: rgba(255, 255, 255, .11);
  --line: rgba(255, 255, 255, .08);
  --fg: #f2f2f5;
  --muted: #9aa0ad;
  --accent: #ff4655;
  --accent-hover: #ff5f6c;
  --like: #3ddc84;
  --nope: #ff4655;
  --super: #4fb3ff;
  --warn: #f5c542;
  --discord: #5865f2;
  --glass: rgba(11, 13, 19, .8);
  --shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 18px 50px rgba(0, 0, 0, .55);
  --shadow-sm: 0 0 0 1px rgba(255, 255, 255, .06);
  --glow-a: .38;
  --deco: rgba(255, 70, 85, .14);
  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  /* Schriften liegen lokal in assets/fonts (wie bei den Crown-Scripts): Chakra Petch für Überschriften,
     Barlow Condensed für Buttons, Tabs und Labels, Inter für längere Texte */
  --f-display: "Chakra Petch", "Inter", system-ui, sans-serif;
  --f-ui: "Barlow Condensed", "Inter", system-ui, sans-serif;
  --cut: 14px;
  --nav-h: 0px;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #eef0f4;
  --surface: #ffffff;
  --surface-2: #f6f7fa;
  --fill: rgba(15, 20, 35, .06);
  --fill-2: rgba(15, 20, 35, .11);
  --line: rgba(0, 0, 0, .08);
  --fg: #12141b;
  --muted: #5f6573;
  --accent: #e8364a;
  --accent-hover: #d42c40;
  --like: #17a35a;
  --nope: #e8364a;
  --super: #1e8fe0;
  --warn: #d39b12;
  --glass: rgba(255, 255, 255, .82);
  --shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 14px 40px rgba(20, 24, 40, .12);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .06), 0 6px 16px rgba(20, 24, 40, .07);
  --glow-a: .3;
  --deco: rgba(232, 54, 74, .08);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.47;
  letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
  padding-bottom: var(--nav-h);
  transition: background-color .3s, color .3s;
}
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
code { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: .88em; background: var(--fill); padding: 1px 6px; border-radius: 6px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }

.top, .wrap, .foot, .landing {
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

/* ---------- Kopfzeile (Milchglas) ---------- */
.top {
  position: sticky; top: 0; z-index: 50;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding-top: calc(10px + env(safe-area-inset-top, 0px)); padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
/* Milchglas auf eigener Ebene: backdrop-filter direkt auf .top würde die fixierte Tab-Leiste am Handy in der Kopfzeile festhalten */
.top::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--glass); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
}
.logo { display: flex; align-items: center; gap: 10px; min-width: 0; }
.logo b { font-family: var(--f-display); font-weight: 700; font-size: 21px; letter-spacing: -.03em; }
.logo span { font-size: 13px; color: var(--muted); white-space: nowrap; }
.mode-pill {
  font-style: normal; font-size: 11px; font-weight: 600; white-space: nowrap;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); border-radius: 6px; padding: 2px 9px;
}

/* Tabs als Segmented Control */
.tabs { display: flex; gap: 2px; padding: 3px; background: var(--fill); border-radius: 6px; }
.tab {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 0; border-radius: 6px; padding: 6px 16px; cursor: pointer;
  color: var(--fg); font-size: 13px; font-weight: 500; transition: background .2s, box-shadow .2s;
}
.tab svg { width: 16px; height: 16px; flex: none; color: var(--muted); }
.tab[aria-selected="true"] { background: var(--surface); box-shadow: var(--shadow-sm); font-weight: 600; }
.tab[aria-selected="true"] svg { color: var(--accent); }
.tab .count { font-size: 11px; font-weight: 600; background: var(--nope); color: #fff; border-radius: 6px; padding: 0 6px; line-height: 17px; font-variant-numeric: tabular-nums; }
.filter-toggle { display: none; }

/* ---------- Konto / Discord ---------- */
.top-end { grid-column: 3; display: flex; align-items: center; justify-content: flex-end; gap: 12px; min-width: 0; }
.account { display: flex; align-items: center; justify-content: flex-end; gap: 14px; min-width: 0; }
.icon-btn {
  width: 34px; height: 34px; flex: none; border-radius: 50%; border: 0; background: var(--fill); color: var(--fg);
  display: grid; place-items: center; cursor: pointer; transition: background .2s, transform .2s;
}
.icon-btn:hover { background: var(--fill-2); }
.icon-btn:active { transform: scale(.92); }
.icon-btn svg { width: 18px; height: 18px; }
.btn-discord {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--discord); color: #fff;
  border: 0; border-radius: 6px; padding: 7px 15px; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: filter .2s, transform .2s;
}
.btn-discord:hover { filter: brightness(1.08); }
.btn-discord:active { transform: scale(.97); }
.btn-discord svg { width: 17px; height: 17px; flex: none; }
.btn-discord.big { padding: 14px 28px; font-size: 17px; }
.btn-discord.big svg { width: 21px; height: 21px; }
.btn-discord.sm { padding: 7px 12px; font-size: 13px; }
.btn-discord.sm svg { width: 15px; height: 15px; }
.user { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 14px; min-width: 0; }
.user .uname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user .av {
  width: 28px; height: 28px; border-radius: 50%; flex: none; display: grid; place-items: center; object-fit: cover;
  font-weight: 600; font-size: 13px; color: #fff; background: var(--discord);
}

/* ---------- Startseite ---------- */
.landing { flex: 1; padding-block: clamp(48px, 9vw, 104px) 64px; }
.land-in { max-width: 1060px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: clamp(48px, 7vw, 80px); }
.land-text { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; max-width: 820px; }
.land-in.solo .land-text { gap: 16px; }
.eyebrow { font-size: 17px; font-weight: 600; color: var(--warn); letter-spacing: -.01em; }
.landing h1 {
  font-family: var(--f-display); font-weight: 700; font-size: clamp(44px, 7.4vw, 88px); line-height: 1.04;
  letter-spacing: -.035em; margin: 0; text-wrap: balance;
}
.landing p { margin: 0; font-size: clamp(17px, 2vw, 21px); line-height: 1.4; color: var(--muted); max-width: 40ch; text-wrap: pretty; }
.land-cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.landing .fine { font-size: 13px; color: var(--muted); max-width: 60ch; text-align: center; }
.landing .local-note { color: var(--accent); }

.land-demo { position: relative; display: flex; flex-direction: column; align-items: center; gap: 18px; width: 100%; }
.demo-deck { position: relative; width: min(340px, 100%); height: 520px; }
.demo-deck .card { pointer-events: none; cursor: default; }
.demo-deck .more { display: none; }
.demo-caption { font-size: 13px; color: var(--muted); }

.land-points { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.land-points li {
  background: var(--surface); border-radius: 6px; padding: 28px; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 8px;
}
.land-points .ricon { width: 30px; height: 30px; margin-bottom: 8px; }
.land-points b { font-family: var(--f-display); font-size: 21px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.land-points span { color: var(--muted); font-size: 15px; }

/* ---------- Hauptbereich ---------- */
.wrap {
  flex: 1; display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 32px;
  padding-block: 32px; max-width: 1180px; width: 100%; margin: 0 auto;
}
.wrap.solo { grid-template-columns: minmax(0, 1fr); }

/* ---------- Filter ---------- */
.filters {
  display: flex; flex-direction: column; gap: 20px; align-self: start; position: sticky; top: 84px;
  background: var(--surface); border-radius: 6px; padding: 22px; box-shadow: var(--shadow-sm);
}
.filters h2 { font-family: var(--f-display); font-size: 24px; font-weight: 700; margin: 0; letter-spacing: -.025em; }
.fgroup { display: flex; flex-direction: column; gap: 8px; }
.flabel { font-size: 13px; font-weight: 600; color: var(--muted); }
.flabel small { font-weight: 400; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 6px;
  background: var(--fill); cursor: pointer; font-size: 13px; font-weight: 500; user-select: none; transition: background .15s, color .15s;
}
.chip span:hover { background: var(--fill-2); }
.ricon { flex: none; color: var(--rc, currentColor); }
.chip input:checked + span { background: var(--accent); color: #fff; }
.chip input:checked + span .ricon { color: #fff; }
.chip input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
.chip small { opacity: .65; font-weight: 400; }
.row2 { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; }
.row2.rk { grid-template-columns: minmax(0, 1fr) 80px; }
.row2 em { color: var(--muted); font-style: normal; font-size: 13px; }
select, input[type="number"], input[type="text"], textarea {
  width: 100%; background: var(--fill); border: 1px solid transparent; border-radius: 4px; padding: 9px 12px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
select:focus, input[type="number"]:focus, input[type="text"]:focus, textarea:focus {
  outline: none; background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}
textarea { resize: vertical; min-height: 96px; }
input[aria-invalid="true"] { border-color: var(--nope); }
.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.switch input { accent-color: var(--accent); width: 18px; height: 18px; }
input[type="range"] { accent-color: var(--accent); width: 100%; }
.fnote { font-size: 13px; color: var(--muted); }
.fnote b { color: var(--fg); font-variant-numeric: tabular-nums; }
.linkbtn { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; font-weight: 500; text-align: left; }
.linkbtn:hover { text-decoration: underline; }
.linkbtn.danger { color: var(--nope); margin-left: auto; }
.sheet-close { display: none; }

/* ---------- Karte ---------- */
.stage { display: flex; flex-direction: column; align-items: center; gap: 24px; min-width: 0; }
.deck { position: relative; width: min(380px, 100%); height: 580px; }
.card {
  position: absolute; inset: 0; border-radius: 6px; overflow: hidden;
  background: var(--surface); box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  transition: transform .35s cubic-bezier(.2,.8,.3,1), opacity .35s;
  touch-action: none; user-select: none; cursor: grab;
}
.card.dragging { cursor: grabbing; }

/* Sanfter Schein hinter dem Stapel in der Farbe der obersten Karte (--glow setzt app.js) */
.deck, .demo-deck { isolation: isolate; }
.deck::before, .demo-deck::before {
  content: ""; position: absolute; inset: 10% -1% 1%; z-index: -1; border-radius: 6px; pointer-events: none;
  background-color: var(--glow, var(--accent)); filter: blur(30px); opacity: var(--glow-a);
  transition: background-color .7s ease; animation: glow-breathe 7s ease-in-out infinite;
}
@keyframes glow-breathe { 50% { opacity: calc(var(--glow-a) * .65); transform: scale(.96); } }
.deck .card[data-depth="0"], .demo-deck .card[data-depth="0"] {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--glow, transparent) 28%, transparent), var(--shadow);
}
.card[data-depth="1"] { transform: translateY(12px) scale(.96); pointer-events: none; }
.card[data-depth="2"] { transform: translateY(24px) scale(.92); pointer-events: none; opacity: .6; }
.tint { position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0; transition: opacity .15s; }
.card.dragging .tint { transition: none; }
.stamp {
  position: absolute; top: 32px; z-index: 5; font-family: var(--f-display); font-weight: 800; font-size: 30px; letter-spacing: .02em;
  padding: 2px 14px; border: 3px solid; border-radius: 4px; opacity: 0;
  background: color-mix(in srgb, var(--surface) 85%, transparent); backdrop-filter: blur(6px);
}
.stamp.like { left: 22px; color: var(--like); transform: rotate(-12deg); }
.stamp.nope { right: 22px; color: var(--nope); transform: rotate(12deg); }
.stamp.super { left: 50%; top: 150px; color: var(--super); transform: translateX(-50%) rotate(-6deg); }

.hero { position: relative; height: 240px; flex: none; display: grid; place-items: center; overflow: hidden; transition: height .3s ease; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.18), transparent 45%); }
.initials { font-family: var(--f-display); font-weight: 700; font-size: 112px; line-height: 1; letter-spacing: -.04em; color: rgba(255,255,255,.95); position: relative; z-index: 1; transition: font-size .3s; }
.hero .avatar { width: 128px; height: 128px; border-radius: 50%; object-fit: cover; position: relative; z-index: 1; border: 4px solid rgba(255,255,255,.9); pointer-events: none; transition: width .3s, height .3s; }
.main-agent, .example-tag, .hero-rank small {
  font-size: 11px; font-weight: 600; color: #fff; background: rgba(0,0,0,.26);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-radius: 6px; white-space: nowrap;
}
.main-agent, .example-tag { position: absolute; z-index: 2; padding: 4px 10px; }
.main-agent { top: 14px; left: 14px; }
.example-tag { bottom: 12px; left: 14px; }
.hero-rank { position: absolute; top: 12px; right: 12px; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.hero-rank small { padding: 1px 8px; }

/* Kein eigenes Foto: Main-Agent als Bild (freigestellt, Kartenfarbe dahinter) */
.agent-art {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none;
  object-fit: cover; object-position: 50% 14%; transform: scale(1.18); transform-origin: 50% 20%;
  filter: drop-shadow(0 10px 24px rgba(0,0,0,.25)); transition: transform .3s ease;
}
.has-agent .initials, .has-agent .avatar { display: none; }
.card.bio-open .agent-art { object-position: 50% 10%; }

/* Eigene Fotos: liegen übereinander, sichtbar ist .on; Balken oben zeigen die Position */
.pics { position: absolute; inset: 0; }
.pic { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; pointer-events: none; }
.pic.on { opacity: 1; }
.pbar { position: absolute; top: 8px; left: 12px; right: 12px; z-index: 3; display: flex; gap: 4px; pointer-events: none; }
.pbar i { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.4); box-shadow: 0 0 4px rgba(0,0,0,.2); }
.pbar i.on { background: #fff; }
.hero.has-photos .main-agent { top: 20px; }
.hero.has-photos .hero-rank { top: 18px; }
.preview .hero.has-photos { cursor: pointer; }

/* Rang-Abzeichen: Sechseck in Rangfarbe, Stufe in der Mitte */
.rank-emblem {
  --s: 44px; position: relative; width: var(--s); height: calc(var(--s) * 1.12); flex: none;
  display: grid; place-items: center; background: var(--rc);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.rank-emblem::before {
  content: ""; position: absolute; inset: 3px; background: rgba(18,18,26,.78);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.rank-emblem b { position: relative; z-index: 1; font-weight: 700; font-size: calc(var(--s) * .42); color: var(--rc); line-height: 1; }
/* Original-Icon geladen: Sechseck ausblenden, Icon frei stehen lassen */
.rank-emblem img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; pointer-events: none; }
.rank-emblem.has-img { height: var(--s); background: none; clip-path: none; }
.rank-emblem.has-img::before, .rank-emblem.has-img b { display: none; }
.rank-emblem.has-img img { opacity: 1; filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); }

/* Rollen-Farbband zwischen Bild und Text */
.band { display: flex; height: 4px; flex: none; }
.band i { flex: 1; }

.body { padding: 16px 22px 20px; display: flex; flex-direction: column; gap: 10px; min-height: 0; flex: 1; }
.namerow { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.name { font-family: var(--f-display); font-weight: 700; font-size: 30px; line-height: 1.05; letter-spacing: -.03em; }
.age { font-size: 22px; color: var(--muted); letter-spacing: -.02em; }
.riot { font-size: 13px; color: var(--muted); }
.score {
  margin-left: auto; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 6px; white-space: nowrap;
  font-variant-numeric: tabular-nums; color: var(--sc); background: color-mix(in srgb, var(--sc) 14%, transparent);
}
.score.hi { --sc: var(--like); }
.score.mid { --sc: var(--warn); }
.score.lo { --sc: var(--muted); }
.why { font-size: 13px; color: var(--muted); margin-top: -4px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; padding: 4px 10px; border-radius: 6px; background: var(--fill); }
.tag.role { background: color-mix(in srgb, var(--rc) 16%, transparent); color: color-mix(in srgb, var(--rc) 72%, var(--fg)); font-weight: 600; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 3px 14px; font-size: 13px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.facts .mono { font-variant-numeric: tabular-nums; font-weight: 500; }
.bio-wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.bio {
  font-size: 15px; margin: 0; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.more { background: none; border: 0; padding: 0; color: var(--accent); font-size: 14px; font-weight: 500; cursor: pointer; }
.card.bio-open .hero { height: 110px; }
.card.bio-open .initials { font-size: 64px; }
.card.bio-open .hero .avatar { width: 72px; height: 72px; }
.card.bio-open .bio { -webkit-line-clamp: unset; }
.card.bio-open .body { overflow-y: auto; touch-action: pan-y; }

/* ---------- Swipe-Buttons ---------- */
.actions { display: flex; align-items: center; gap: 18px; }
.act {
  width: 64px; height: 64px; border-radius: 50%; border: 0; background: var(--surface); box-shadow: var(--shadow-sm);
  display: grid; place-items: center; cursor: pointer; transition: transform .2s cubic-bezier(.2,.8,.3,1), box-shadow .2s;
}
.act:hover { transform: scale(1.07); box-shadow: var(--shadow); }
.act:active { transform: scale(.93); }
.act svg { width: 26px; height: 26px; }
.act.small { width: 50px; height: 50px; }
.act.small svg { width: 20px; height: 20px; }
.act.nope { color: var(--nope); }
.act.like { color: var(--like); }
.act.super { color: var(--super); }
.act.undo { color: var(--warn); }
.act:disabled { opacity: .35; cursor: default; transform: none; box-shadow: none; }
.hint { font-size: 12px; color: var(--muted); text-align: center; margin: 0; }
.hint kbd { font-family: inherit; font-size: 11px; background: var(--fill); border-radius: 5px; padding: 1px 6px; }
.empty {
  position: absolute; inset: 0; background: var(--surface); border-radius: 6px; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 28px;
}
.empty h3 { font-family: var(--f-display); font-size: 28px; font-weight: 700; letter-spacing: -.025em; margin: 0; }
.empty p { color: var(--muted); margin: 0; max-width: 28ch; }
.btn {
  background: var(--accent); color: #fff; border: 0; border-radius: 6px; padding: 10px 20px; font-weight: 600; cursor: pointer;
  transition: background .2s, transform .2s;
}
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: scale(.97); }
.btn.ghost { background: var(--fill); color: var(--fg); }
.btn.ghost:hover { background: var(--fill-2); }
.btn.sm { padding: 7px 13px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }
.banner {
  width: min(380px, 100%); display: flex; gap: 12px; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-radius: 6px; font-size: 13px; background: var(--surface); box-shadow: var(--shadow-sm);
}

/* ---------- Matches ---------- */
.matches { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.matches h2, .pform h2 { font-family: var(--f-display); font-size: 40px; font-weight: 700; letter-spacing: -.035em; line-height: 1.1; margin: 0; }
.mlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 18px; }
.mcard { display: flex; flex-direction: column; border-radius: 6px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow-sm); min-width: 0; }
.mcard.is-new { box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.mhead { position: relative; height: 120px; display: grid; place-items: center; overflow: hidden; }
.mhead .initials { font-size: 64px; }
.mhead .avatar { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; position: relative; z-index: 1; border: 3px solid rgba(255,255,255,.9); }
.mhead .hero-rank { top: 10px; right: 10px; }
.mhead .pic { z-index: 0; }
.new-badge {
  position: absolute; top: 12px; left: 12px; z-index: 2; background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 600; padding: 2px 10px; border-radius: 6px;
}
.mbody { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; }
.mbody .name { font-size: 26px; }
.mbtns { display: flex; gap: 8px; flex-wrap: wrap; }
.mbtns > * { flex: 1 1 130px; }
.mav { width: 56px; height: 56px; border-radius: 50%; flex: none; display: grid; place-items: center; object-fit: cover; font-weight: 700; font-size: 26px; color: #fff; }

/* ---------- Profil ---------- */
.profile { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; align-items: start; min-width: 0; }
.pform {
  display: flex; flex-direction: column; gap: 22px; min-width: 0;
  background: var(--surface); border-radius: 6px; padding: clamp(20px, 3vw, 32px); box-shadow: var(--shadow-sm);
}
.lead { color: var(--muted); margin: 0; max-width: 60ch; font-size: 17px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.err { color: var(--nope); font-size: 12px; }
.counter { font-size: 12px; color: var(--muted); align-self: flex-end; font-variant-numeric: tabular-nums; }
.photo-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pslot { position: relative; aspect-ratio: 3 / 4; border-radius: 4px; overflow: hidden; background: var(--fill); }
.pslot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pslot.add {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 8px; text-align: center;
  cursor: pointer; color: var(--accent); font-size: 12px; font-weight: 500;
  border: 1.5px dashed color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 6%, transparent);
  transition: background .15s;
}
.pslot.add:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.pslot.add:focus-within { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
.pslot.add svg { width: 26px; height: 26px; }
.pslot.add input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.pslot.loading { display: grid; place-items: center; font-size: 12px; color: var(--muted); animation: pulse 1.2s ease-in-out infinite; }
.pmain, .pbtn { position: absolute; color: #fff; background: rgba(0,0,0,.5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.pmain { left: 6px; bottom: 6px; font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 6px; }
.pbtn { width: 28px; height: 28px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; transition: background .15s; }
.pbtn:hover { background: rgba(0,0,0,.72); }
.pbtn svg { width: 14px; height: 14px; }
.pdel { top: 6px; right: 6px; }
.pfront { left: 6px; bottom: 6px; }
@keyframes pulse { 50% { opacity: .5; } }
.psave { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 20px; }
.pstatus { font-size: 13px; color: var(--muted); }
.pstatus.ok { color: var(--like); }
.preview-col { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.preview { position: relative; width: 100%; height: 580px; }
.preview .card { cursor: default; touch-action: auto; }

/* ---------- Match-Fenster ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px; overflow-y: auto;
  background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(30px) saturate(160%); -webkit-backdrop-filter: blur(30px) saturate(160%);
}
.overlay-in { display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; animation: pop .5s cubic-bezier(.2,1.3,.4,1); }
.overlay h2 {
  font-family: var(--f-display); font-weight: 800; font-size: clamp(48px, 12vw, 80px); margin: 0; line-height: 1; letter-spacing: -.04em;
  background: linear-gradient(100deg, #ff4655, #f5c542 55%, #4fb3ff); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.overlay p { margin: 0; color: var(--muted); max-width: 34ch; font-size: 17px; }
.pair-wrap { position: relative; padding: 10px 0; }
.pair { display: flex; position: relative; z-index: 1; }
.pair .mav { width: 108px; height: 108px; font-size: 44px; border: 4px solid var(--bg); box-shadow: var(--shadow); }
.pair .mav:first-child { animation: in-left .55s cubic-bezier(.2,1.3,.4,1) both; }
.pair .mav + .mav { margin-left: -20px; animation: in-right .55s cubic-bezier(.2,1.3,.4,1) both; }
.sparks { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.sparks i {
  position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 50%; opacity: 0;
  animation: spark .95s cubic-bezier(.1,.7,.3,1) forwards;
}
.overlay .btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.overlay .btn-discord { padding: 11px 20px; font-size: 15px; }
@keyframes pop { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes in-left { from { transform: translateX(-60px) rotate(-10deg); opacity: 0; } }
@keyframes in-right { from { transform: translateX(60px) rotate(10deg); opacity: 0; } }
@keyframes spark {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--x), var(--y)) scale(.3); opacity: 0; }
}

/* ---------- Dialog (Testmodus-Login) ---------- */
.dialog {
  background: var(--surface); border-radius: 6px; padding: 28px; box-shadow: var(--shadow);
  width: min(420px, 100%); display: flex; flex-direction: column; gap: 14px; text-align: left;
  animation: pop .35s cubic-bezier(.2,1.3,.4,1);
}
.dialog h3 { font-family: var(--f-display); font-weight: 700; font-size: 28px; letter-spacing: -.03em; line-height: 1.1; margin: 0; }
.overlay .dialog p { max-width: none; font-size: 15px; }
.dialog .btns { justify-content: flex-start; }
/* ---------- FYM Lite ---------- */
.dc-user { color: var(--muted); font-weight: 500; }
.owner-badge {
  display: inline-flex; align-items: center; align-self: center; gap: 4px; font-family: var(--f-ui); font-size: 12px; font-weight: 700;
  letter-spacing: .1em; line-height: 1.3; color: #1a1205; padding: 2px 8px 2px 6px; border-radius: 3px; font-style: normal;
  background: linear-gradient(100deg, #f5c542, #ffe08a 45%, #f5c542); box-shadow: 0 0 12px -2px rgba(245, 197, 66, .7);
}
.owner-badge svg { width: 12px; height: 12px; }
.lite-badge {
  display: inline-flex; align-items: center; align-self: center; font-size: 10px; font-weight: 800; letter-spacing: .08em;
  color: #fff; padding: 2px 7px; border-radius: 6px; line-height: 1.3; font-style: normal;
  background: linear-gradient(100deg, #ff4655, #f5c542, #4fb3ff, #ff4655); background-size: 300% 100%;
  animation: fx-flow 6s linear infinite;
}
.lite-badge.big { font-size: 12px; padding: 3px 10px; align-self: flex-start; }
.lite-promo {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px 20px; border-radius: 6px;
  background: linear-gradient(120deg, color-mix(in srgb, #ff4655 10%, var(--surface)), color-mix(in srgb, #4fb3ff 14%, var(--surface)));
  border: 1px solid var(--line);
}
.lite-promo-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 260px; }
.lite-promo-text b { font-size: 17px; letter-spacing: -.02em; }
.lite-promo-text > span:last-child { font-size: 13px; color: var(--muted); }
.lite-fx { display: flex; flex-direction: column; gap: 8px; }
.lite-switch { align-items: flex-start; padding: 12px 14px; border-radius: 4px; background: var(--fill); }
.lite-switch input { flex: none; margin-top: 2px; }
.lite-switch span { display: flex; flex-direction: column; gap: 2px; }
.lite-switch small { color: var(--muted); font-size: 12px; }
/* Eigenes animiertes Banner: füllt das Kartenbild, Agent bzw. Anfangsbuchstabe liegt davor */
.hero-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.lite-custom { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 10px; padding: 12px 14px; border-radius: 4px; background: var(--fill); }
.custom-preview {
  position: relative; width: 160px; aspect-ratio: 16 / 10; flex: none; border-radius: 4px; overflow: hidden;
  display: grid; place-items: center; background: var(--fill-2); font-size: 12px; color: var(--muted);
}
.custom-preview img, .custom-preview video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lite-custom-text { display: flex; flex-direction: column; gap: 4px; flex: 1 1 220px; min-width: 0; }
.lite-custom-text small { color: var(--muted); font-size: 12px; }
.lite-custom-btns { display: flex; align-items: center; gap: 14px; margin-top: 4px; }
.lite-custom-btns .linkbtn.danger { margin-left: 0; }
.upload-btn { position: relative; cursor: pointer; }
.upload-btn input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload-btn:focus-within { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
.dialog.checkout { gap: 12px; }
.co-price { margin: 0; color: var(--muted); }
.co-price b { font-size: 30px; font-weight: 700; letter-spacing: -.03em; color: var(--fg); }
.co-perks { list-style: none; margin: 4px 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.co-perks li { position: relative; display: flex; flex-direction: column; padding-left: 26px; font-size: 14px; }
.co-perks li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--like); font-weight: 800; }
.co-perks span { color: var(--muted); font-size: 13px; }
.overlay .co-note { color: var(--accent); font-size: 13px; }

/* Effekt: animierter Rahmen (Farbverlauf dreht sich um die Karte) */
@property --fx-angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.card.fx-frame {
  border: 2px solid transparent;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    conic-gradient(from var(--fx-angle), hsl(var(--h) 90% 60%), #ff4655, #f5c542, #4fb3ff, hsl(var(--h) 90% 60%)) border-box;
  animation: fx-spin 4s linear infinite;
}
@keyframes fx-spin { to { --fx-angle: 360deg; } }

/* Effekt: animiertes Banner (langsamer Schwenk + Glanz) */
.hero.fx-banner { animation: fx-pan 16s ease-in-out infinite alternate; }
@keyframes fx-pan { from { background-position: 50% 8%, 0 0; } to { background-position: 50% 72%, 0 0; } }
.fx-shine { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
.fx-shine::before {
  content: ""; position: absolute; top: -20%; bottom: -20%; left: -60%; width: 40%; transform: skewX(-18deg);
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .32), transparent);
  animation: fx-shine 5s ease-in-out infinite;
}
@keyframes fx-shine { 0%, 55% { left: -60%; } 100% { left: 130%; } }

/* Effekt: animierte Farben (Name fließt, Schein hinter dem Stapel wechselt den Farbton) */
.card.fx-color .name {
  background: linear-gradient(90deg, hsl(var(--h) 90% 58%), #ff4655, #f5c542, #4fb3ff, hsl(var(--h) 90% 58%));
  background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: fx-flow 6s linear infinite;
}
.deck:has(> .card[data-depth="0"].fx-color)::before,
.demo-deck:has(> .card[data-depth="0"].fx-color)::before { animation: glow-breathe 7s ease-in-out infinite, fx-hue 8s linear infinite; }
@keyframes fx-flow { to { background-position: 300% 0; } }
@keyframes fx-hue { from { filter: blur(30px) hue-rotate(0deg); } to { filter: blur(30px) hue-rotate(360deg); } }

/* Banner-Auswahl */
.banner-field { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.banner-preview {
  width: 226px; max-width: 100%; aspect-ratio: 452 / 128; border-radius: 4px; flex: none;
  background: var(--fill) center / cover no-repeat; display: grid; place-items: center; font-size: 12px; color: var(--muted);
}
.dialog.wide { width: min(780px, 100%); }
.banner-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px;
  max-height: min(56vh, 520px); overflow-y: auto; padding: 4px; margin: 0 -4px;
}
.banner-grid .fnote { grid-column: 1 / -1; margin: 12px 0; text-align: center; }
.bp-head { grid-column: 1 / -1; margin: 6px 0 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.bp-head:first-child { margin-top: 0; }
.bp-item {
  display: flex; flex-direction: column; gap: 4px; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; color: var(--fg);
}
.bp-item img {
  width: 100%; aspect-ratio: 452 / 128; object-fit: cover; border-radius: 4px; background: var(--fill);
  outline: 2px solid transparent; outline-offset: 2px; transition: outline-color .15s, transform .15s;
}
.bp-item:hover img { transform: scale(1.02); }
.bp-item.on img, .bp-item:focus-visible img { outline-color: var(--accent); }
.bp-item:focus-visible { outline: none; }
.bp-item span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.btn.danger { background: var(--nope); }
.btn.danger:hover { background: color-mix(in srgb, var(--nope) 88%, #000); }

/* Melde-Gründe als auswählbare Zeilen */
.reasons { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.reasons legend { margin-bottom: 8px; padding: 0; }
.reason input { position: absolute; opacity: 0; pointer-events: none; }
.reason span {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 4px; background: var(--fill);
  cursor: pointer; font-size: 14px; font-weight: 500; transition: background .15s;
}
.reason span::before { content: ""; width: 16px; height: 16px; flex: none; border-radius: 50%; border: 2px solid var(--muted); }
.reason span:hover { background: var(--fill-2); }
.reason input:checked + span { background: color-mix(in srgb, var(--nope) 12%, transparent); color: var(--nope); }
.reason input:checked + span::before { border: 5px solid var(--nope); }
.reason input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }

/* Sterne: in umgekehrter Reihenfolge im HTML, damit ~ die Sterne links davon trifft */
.stars { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.star { cursor: pointer; padding: 2px; border-radius: 8px; }
.star input { position: absolute; opacity: 0; pointer-events: none; }
.star svg { width: 38px; height: 38px; color: var(--fill-2); transition: color .12s, transform .12s; display: block; }
.star:has(input:checked) svg, .star:has(input:checked) ~ .star svg { color: var(--warn); }
.stars:hover .star svg { color: var(--fill-2); }
.stars .star:hover svg, .stars .star:hover ~ .star svg { color: var(--warn); }
.star:hover svg { transform: scale(1.12); }
.star:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); }

/* Bewertung auf Karten */
.rating-star { color: var(--warn); }

/* Melde-Knopf unten rechts im Kartenbild */
.card-flag {
  position: absolute; right: 12px; bottom: 12px; z-index: 3; width: 30px; height: 30px; border-radius: 50%; border: 0;
  display: grid; place-items: center; cursor: pointer; color: #fff;
  background: rgba(0,0,0,.28); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transition: background .15s;
}
.card-flag:hover { background: rgba(0,0,0,.5); }
.card-flag svg { width: 15px; height: 15px; }
.mfoot { display: flex; align-items: center; gap: 12px; }
.mfoot .btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.mfoot .btn svg { width: 14px; height: 14px; color: var(--warn); }
.mfoot .linkbtn { font-size: 13px; margin-left: 0; }

.demo-pill {
  align-self: flex-start; font-size: 11px; font-weight: 600;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); border-radius: 6px; padding: 2px 9px;
}

.toast {
  position: fixed; left: 50%; bottom: calc(24px + var(--nav-h)); transform: translateX(-50%);
  background: color-mix(in srgb, var(--fg) 88%, transparent); color: var(--bg); backdrop-filter: blur(20px);
  padding: 10px 18px; border-radius: 6px; font-weight: 500; font-size: 14px;
  z-index: 70; max-width: calc(100% - 32px); text-align: center; box-shadow: var(--shadow);
}
/* ---------- Discord-Karte (Ecke unten rechts) ---------- */
.dc-widget { position: fixed; right: 20px; bottom: calc(20px + var(--nav-h)); z-index: 25; display: flex; justify-content: flex-end; }
.dc-card {
  position: relative; width: 320px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center;
  padding: 18px; border-radius: 6px; color: #fff; background: linear-gradient(140deg, #5865f2 0%, #4752c4 100%);
  box-shadow: 0 22px 50px -14px rgba(88, 101, 242, .6), 0 2px 6px rgba(0, 0, 0, .12);
  animation: dc-in .55s cubic-bezier(.2, 1.2, .4, 1) .6s both;
}
.dc-logo { width: 48px; height: 48px; border-radius: 4px; background: rgba(255, 255, 255, .16); display: grid; place-items: center; }
.dc-logo svg { width: 28px; height: 28px; }
.dc-text { padding-right: 18px; }
.dc-text b { display: block; font-family: var(--f-display); font-size: 18px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.dc-text span { display: block; font-size: 13px; line-height: 1.35; opacity: .86; margin-top: 2px; }
.dc-join {
  grid-column: 1 / -1; display: block; text-align: center; text-decoration: none;
  background: #fff; color: #5865f2; font-weight: 700; font-size: 14px; padding: 10px 16px; border-radius: 6px;
  transition: transform .2s, box-shadow .2s;
}
.dc-join:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.dc-join:focus-visible, .dc-close:focus-visible, .dc-bubble:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.dc-close {
  position: absolute; top: 10px; right: 10px; width: 26px; height: 26px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; color: #fff; background: rgba(255, 255, 255, .16); transition: background .15s;
}
.dc-close:hover { background: rgba(255, 255, 255, .28); }
.dc-close svg { width: 12px; height: 12px; }
.dc-bubble {
  width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
  color: #fff; background: #5865f2; box-shadow: 0 14px 30px -8px rgba(88, 101, 242, .65);
  transition: transform .2s; animation: dc-in .35s cubic-bezier(.2, 1.2, .4, 1) both;
}
.dc-bubble:hover { transform: scale(1.08); }
.dc-bubble svg { width: 28px; height: 28px; display: block; }
@keyframes dc-in { from { opacity: 0; transform: translateY(16px) scale(.96); } }

.foot {
  font-size: 12px; color: var(--muted); padding-block: 18px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center;
}

/* ---------- Gaming-Look (wie der Discord-Bot) ---------- */
body {
  background:
    radial-gradient(1100px 520px at 88% -8%, var(--deco), transparent 62%),
    radial-gradient(800px 480px at -12% 30%, rgba(79, 179, 255, .06), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}

/* Kantige Ecken wie im Valorant-UI: oben links und unten rechts abgeschrägt (Größe über --c) */
.card, .empty, .mcard, .pform, .filters, .land-points li, .dialog, .banner, .lite-promo, .dc-card, .land-banner img,
.bot-panel, .btn, .btn-discord, .dc-join, .toast, .logo-mark, .bot-btns span {
  clip-path: polygon(var(--c, var(--cut)) 0, 100% 0, 100% calc(100% - var(--c, var(--cut))), calc(100% - var(--c, var(--cut))) 100%, 0 100%, 0 var(--c, var(--cut)));
}
.btn, .btn-discord, .dc-join, .toast { --c: 8px; }
.logo-mark, .bot-btns span { --c: 6px; }
.btn:focus-visible, .btn-discord:focus-visible, .dc-join:focus-visible { outline: 2px solid #fff; outline-offset: -5px; }

/* Überschriften: Chakra Petch, kursiv und fett wie der Schriftzug im Banner */
.landing h1, .matches h2, .pform h2, .filters h2, .empty h3, .dialog h3, .overlay h2, .bot-copy h2 {
  font-style: italic; font-weight: 700; letter-spacing: -.01em;
}
.landing h1 em, .bot-copy h2 em { font-style: inherit; color: var(--accent); }
.name, .land-points b, .dc-text b { letter-spacing: 0; }
.eyebrow {
  font-family: var(--f-ui); font-size: 16px; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; color: var(--accent);
}

/* Logo: Roboter aus dem Banner + Schriftzug */
.logo-mark { width: 36px; height: 36px; flex: none; display: block; object-fit: cover; border: 2px solid var(--accent); background: #000; }
.logo-word { font-family: var(--f-display); font-style: italic; font-weight: 700; font-size: 22px; letter-spacing: -.01em; white-space: nowrap; }
.logo-word i { color: var(--accent); }
.mode-pill { border-radius: 3px; text-transform: uppercase; letter-spacing: .06em; }

/* Tabs */
.tabs { border-radius: 6px; }
.tab { border-radius: 4px; font-family: var(--f-ui); font-weight: 600; font-size: 16px; letter-spacing: .05em; text-transform: uppercase; }
.tab[aria-selected="true"] { background: var(--surface-2); box-shadow: inset 0 -2px 0 var(--accent); }

/* Buttons */
.btn, .btn-discord, .dc-join { font-family: var(--f-ui); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
/* Barlow Condensed ist schmal: Buttons etwas größer setzen */
.btn, .btn-discord, .dc-join { font-size: 17px; }
.btn-discord.big { font-size: 21px; }
.btn.sm, .btn-discord.sm { font-size: 15px; }
/* Kleine Beschriftungen in Barlow Condensed (schmal, wie bei Crown) */
.flabel, .chip span, .tag, .score, .facts dt, .main-agent, .example-tag, .hero-rank small, .mode-pill, .new-badge, .demo-pill, .bot-tag, .stamp {
  font-family: var(--f-ui); letter-spacing: .03em;
}
.flabel { font-size: 14px; text-transform: uppercase; letter-spacing: .08em; }
.flabel small { text-transform: none; letter-spacing: .02em; }
.chip span { font-size: 15px; font-weight: 600; }
.tag, .score { font-size: 14px; font-weight: 600; }
.facts dt { font-size: 14px; text-transform: uppercase; letter-spacing: .06em; }
.btn { box-shadow: 0 10px 26px -14px var(--accent); }
a.btn { display: inline-block; text-decoration: none; }
.btn.ghost { box-shadow: inset 0 0 0 1px var(--line); }
.btn.danger { box-shadow: none; }
.act { box-shadow: inset 0 0 0 2px color-mix(in srgb, currentColor 40%, transparent), 0 10px 26px -14px currentColor; }
.act:hover { box-shadow: inset 0 0 0 2px currentColor, 0 12px 30px -10px currentColor; }

/* Karten: farbige Kante, Ecke unten links in Kartenfarbe (wie bei den Bot-Icons) */
.card { border: 1px solid color-mix(in srgb, var(--glow, var(--accent)) 40%, var(--line)); }
.card::after, .mcard::after {
  content: ""; position: absolute; left: 0; bottom: 0; z-index: 6; width: 22px; height: 22px; pointer-events: none;
  background: var(--glow, var(--accent)); clip-path: polygon(0 0, 0 100%, 100% 100%);
}
.mcard { position: relative; border: 1px solid var(--line); }
.mcard.is-new { border-color: var(--accent); box-shadow: none; }
.name { font-weight: 700; }
.chip span, .tag, .score, .main-agent, .example-tag, .hero-rank small, .new-badge, .lite-badge, .demo-pill { border-radius: 3px; }
.ricon { object-fit: contain; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .35)); }
.land-points li { border: 1px solid var(--line); }
.land-points .ricon { width: 44px; height: 44px; filter: none; }

/* Startseite: Banner als Hero */
.landing { padding-block: clamp(20px, 3.5vw, 44px) 64px; }
.land-banner { position: relative; width: 100%; isolation: isolate; }
.land-banner::before {
  content: ""; position: absolute; inset: 12% 6% -6%; z-index: -1; background: var(--accent); filter: blur(70px); opacity: .28; pointer-events: none;
}
.land-banner img { --c: 26px; display: block; width: 100%; height: auto; aspect-ratio: 1600 / 640; object-fit: cover; }

/* Startseite: Discord-Bot */
.bot-promo {
  width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 470px); gap: clamp(28px, 5vw, 64px); align-items: center;
}
.bot-copy { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.bot-copy h2 { font-family: var(--f-display); font-size: clamp(34px, 4.6vw, 52px); line-height: 1.05; margin: 0; text-wrap: balance; }
.bot-copy > p { margin: 0; color: var(--muted); font-size: 17px; max-width: 46ch; }
.bot-list { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.bot-list li { display: flex; align-items: center; gap: 12px; font-size: 15px; }
.bot-list img { width: 30px; height: 30px; flex: none; }
.land-cta.left { justify-content: flex-start; margin-top: 4px; }
.landing .bot-copy .fine { text-align: left; }

/* Nachgebaute Discord-Nachricht mit dem Bot-Panel */
.bot-msg { display: flex; gap: 14px; min-width: 0; padding: 18px; background: #1e1f22; border-radius: 8px; color: #dbdee1; box-shadow: var(--shadow); font-size: 14px; }
.bot-av { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.bot-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.bot-head { display: flex; align-items: center; gap: 6px; }
.bot-head b { color: #fff; font-weight: 600; }
.bot-head .bot-tag { font-size: 10px; font-weight: 700; background: var(--discord); color: #fff; border-radius: 3px; padding: 0 4px; line-height: 15px; }
.bot-head small { color: #949ba4; font-size: 12px; }
.bot-panel { --c: 10px; background: #2b2d31; display: flex; flex-direction: column; overflow: hidden; }
.bot-panel > img { display: block; width: 100%; aspect-ratio: 900 / 360; object-fit: cover; }
.bot-panel-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.bot-panel h4 { margin: 0; display: flex; align-items: center; gap: 8px; color: #fff; font-size: 18px; font-weight: 700; }
.bot-panel p, .landing .bot-panel p { margin: 0; font-size: 14px; line-height: 1.45; color: #dbdee1; max-width: none; }
.bot-panel b { color: #fff; }
.bot-panel img.e { width: 20px; height: 20px; vertical-align: -5px; }
.bot-panel hr { border: 0; border-top: 1px solid rgba(255, 255, 255, .08); margin: 2px 0; width: 100%; }
.bot-step { font-size: 13px; color: #b5bac1; border-left: 3px solid #4e5058; padding-left: 10px; display: flex; flex-direction: column; gap: 2px; }
.bot-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.bot-btns span {
  display: inline-flex; align-items: center; gap: 6px; background: #4e5058; color: #fff; font-size: 14px; font-weight: 500; padding: 6px 14px;
}
.bot-btns span img { width: 18px; height: 18px; }
.bot-small { font-size: 12px; color: #949ba4; }

/* Match-Fenster und Lite in Rot/Gold/Blau */
.overlay h2 { background-image: linear-gradient(100deg, #ff4655, #f5c542); }

/* ---------- Filter kompakt: passt ohne Scrollen neben den Kartenstapel ---------- */
.filters {
  gap: 11px; padding: 16px 20px; max-height: calc(100vh - 104px); overflow-y: auto; overscroll-behavior: contain;
}
.fhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.suggest-btn { white-space: nowrap; }
.suggest-btn::before { content: "\2726"; margin-right: 6px; color: var(--accent); }
.filters .fgroup { gap: 6px; }
.filters .chips { gap: 5px; }
.filters .chip span { padding: 4px 10px; font-size: 14px; }
/* Schmale Dropdowns (Rang von/bis): schmale Schrift, Pfeil darf nie rausgeschoben werden */
.filters select { font-family: var(--f-ui); font-size: 16px; font-weight: 600; padding-left: 10px; min-width: 0; }
select::picker-icon { flex: none; }
.ffoot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.ffoot .fnote { margin: 0; }
.ffoot .linkbtn { font-size: 13px; }

/* Rollen als Kacheln wie in der Agentenauswahl: Icon groß, Name und Aufgabe darunter */
.role-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.role-tiles .chip { display: flex; min-width: 0; }
.filters .role-tiles .chip span {
  --c: 7px; width: 100%; flex-direction: column; gap: 1px; padding: 7px 2px 5px; text-align: center;
  background: var(--fill); box-shadow: inset 0 0 0 1px var(--line);
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
  transition: background .15s, box-shadow .15s, transform .15s;
}
.role-tiles .chip .ricon { width: 30px; height: 30px; margin-bottom: 3px; transition: transform .2s; }
.role-tiles .chip b { font-size: 14px; font-weight: 700; letter-spacing: .02em; }
.role-tiles .chip small { font-size: 11px; opacity: .6; text-transform: uppercase; letter-spacing: .06em; }
.role-tiles .chip span:hover { background: var(--fill-2); }
.role-tiles .chip span:hover .ricon { transform: scale(1.08); }
.filters .role-tiles .chip input:checked + span {
  background: color-mix(in srgb, var(--accent) 20%, var(--surface)); color: var(--fg);
  box-shadow: inset 0 0 0 1px var(--accent), inset 0 -3px 0 var(--accent);
}
.role-tiles .chip input:checked + span small { opacity: .85; }

/* ---------- Profil-Sidebar: Live-Vorschau, echte Stats, Speichern ---------- */
.profile .preview { height: 500px; }
.pc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.live-dot {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--f-ui); font-size: 13px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--accent);
}
.live-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: live-pulse 1.6s ease-in-out infinite; }
@keyframes live-pulse { 50% { opacity: .3; transform: scale(.7); } }
.no-dc .dc-widget { display: none; }

/* ---------- Reiter Discord-Bot ---------- */
.botview { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.bv-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: clamp(24px, 4vw, 56px); align-items: center; }
.bv-copy { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.bv-copy h2 { font-family: var(--f-display); font-style: italic; font-size: clamp(34px, 4.4vw, 50px); line-height: 1.05; margin: 0; text-wrap: balance; }
.bv-copy h2 em { color: var(--accent); }
.bv-copy > p { margin: 0; color: var(--muted); font-size: 17px; max-width: 52ch; }
.bv-ctas { display: flex; flex-wrap: wrap; gap: 10px; }
.bv-ctas .btn, .bv-ctas .btn-discord { padding: 12px 22px; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.bv-ctas .btn-discord svg { width: 20px; height: 20px; }
.bv-sync {
  --c: 10px; display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
}
.bv-sync img { width: 34px; height: 34px; flex: none; }
.bv-sync div { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.bv-sync b { font-family: var(--f-ui); font-size: 17px; letter-spacing: .03em; }
.bv-sync span { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.bv-title { font-family: var(--f-display); font-style: italic; font-size: 24px; margin: 6px 0 0; }
.bv-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; counter-reset: step; }
.bv-steps li, .bv-box {
  --c: 12px; position: relative; display: flex; flex-direction: column; gap: 6px; padding: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
}
.bv-steps li { counter-increment: step; }
.bv-steps li::after {
  content: counter(step, decimal-leading-zero); position: absolute; top: 12px; right: 16px;
  font-family: var(--f-display); font-style: italic; font-weight: 700; font-size: 30px; color: color-mix(in srgb, var(--accent) 35%, transparent);
}
.bv-steps img { width: 40px; height: 40px; margin-bottom: 4px; }
.bv-steps b { font-family: var(--f-ui); font-size: 19px; letter-spacing: .03em; text-transform: uppercase; }
.bv-steps span { color: var(--muted); font-size: 14px; }
.bv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.bv-box .bv-title { margin: 0 0 4px; font-size: 21px; }
.bv-cmds, .bv-rules { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.bv-cmds li { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; align-items: baseline; }
.bv-cmds code { font-size: 14px; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.bv-cmds span { color: var(--muted); font-size: 14px; }
.bv-rules li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.bv-rules img { width: 26px; height: 26px; flex: none; }
@media (max-width: 980px) {
  .bv-hero { grid-template-columns: minmax(0, 1fr); }
  .bv-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bv-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .bv-steps { grid-template-columns: minmax(0, 1fr); }
  .botview .bot-msg { display: none; } /* am Handy zu lang, die Startseite zeigt sie schon */
  .bv-cmds li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

/* Echte Stats in der Sidebar; niedrige Bildschirme (Laptop): Vorschau kleiner, damit Stats und Speichern ohne Scrollen sichtbar bleiben */
.pstats {
  --c: 12px; display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
}
.pstats-body { display: flex; flex-direction: column; gap: 10px; }
.pstats-body > .fnote { margin: 0; }
.pstats-load { animation: pulse 1.2s ease-in-out infinite; }
.pstats-top { display: flex; align-items: center; gap: 14px; }
.pstats-unranked { width: 52px; height: 52px; }
.pstats-rank { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.pstats-rank > b { font-family: var(--f-display); font-style: italic; font-size: 24px; line-height: 1.1; }
.pstats-rank .rr { font-family: var(--f-ui); font-size: 16px; color: var(--muted); letter-spacing: .03em; }
.pstats-rank .rr b { font-size: 20px; color: var(--fg); }
.rr-change { font-weight: 700; margin-left: 4px; }
.rr-change.up { color: var(--like); }
.rr-change.down { color: var(--nope); }
.xp { height: 8px; background: var(--fill-2); overflow: hidden; clip-path: polygon(4px 0, 100% 0, calc(100% - 4px) 100%, 0 100%); }
.xp i {
  display: block; height: 100%; width: 0; background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 60%, #000), var(--accent));
  box-shadow: 0 0 12px var(--accent); transition: width .5s cubic-bezier(.2, .8, .3, 1);
}
.pstats-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; align-self: flex-start; text-align: right; }
.pstats-side span { font-size: 11px; color: var(--muted); max-width: 90px; line-height: 1.25; }
.pstats-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.pstats-tiles div { display: flex; flex-direction: column; padding: 6px 8px; background: var(--fill); min-width: 0; }
.pstats-tiles span { font-family: var(--f-ui); font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.pstats-tiles b { font-family: var(--f-ui); font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pstats-tiles small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pstats-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.pstats-foot .fnote { margin: 0; }
.pstats-foot .fnote.ok { color: var(--like); font-size: 13px; }
@media (min-width: 821px) and (max-height: 860px) {
  .profile .preview { height: 372px; }
  .profile .preview .hero { height: 150px; }
  .profile .preview .initials { font-size: 80px; }
  .pstats { gap: 8px; padding: 12px 14px; }
}
.icon-btn.sm { width: 28px; height: 28px; }
.icon-btn.sm svg { width: 14px; height: 14px; }

/* Profil-Formular in Abschnitten: Bilder, Über dich, Spiel, Look */
.pform { gap: 0; padding: 0; }
.pf-head { padding: clamp(20px, 3vw, 30px) clamp(20px, 3vw, 32px) 18px; display: flex; flex-direction: column; gap: 8px;
  background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%); border-bottom: 1px solid var(--line); }
.pf-sec { display: flex; flex-direction: column; gap: 16px; padding: 22px clamp(20px, 3vw, 32px); border-bottom: 1px solid var(--line); }
.pf-title {
  display: flex; align-items: center; gap: 10px; margin: 0; font-family: var(--f-ui); font-size: 19px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
}
.pf-title img { width: 28px; height: 28px; }
.pf-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 50%, transparent), transparent); }
.pform .psave { padding: 18px clamp(20px, 3vw, 32px) 22px; border-top: 0; }
.photo-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pslot.empty { background: var(--fill); box-shadow: inset 0 0 0 1px var(--line); }
.banner-field { align-items: stretch; gap: 14px; }
.banner-preview { width: 300px; }
.banner-actions { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 6px; min-width: 0; flex: 1 1 180px; }
.banner-actions .fnote { margin: 0; }
.pf-sec .switch.field { flex-direction: row; }
@media (max-width: 520px) {
  .banner-preview { width: 100%; }
}

/* ---------- Volles Profil eines Matches ---------- */
.mhead[data-profile] { cursor: pointer; }
.mhead[data-profile]:hover .agent-art, .mhead[data-profile]:hover .pic { transform: scale(1.04); }
.mhead .pic, .mhead .agent-art { transition: transform .3s ease; }
.mprofile { align-self: stretch; }
.dialog.pview { width: min(920px, 100%); padding: 0; gap: 0; position: relative; max-height: calc(100vh - 48px); }
.pview-grid { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); max-height: calc(100vh - 48px); }
.pview-card { position: relative; min-height: 540px; }
.pview-card .card { position: absolute; inset: 0; border: 0; clip-path: none; cursor: default; touch-action: auto; }
.pview-card .card .hero { flex: 1; height: auto; }
.pview-card .card .body { display: none; }
.pview-card .hero.has-photos { cursor: pointer; }
.pview-info { display: flex; flex-direction: column; gap: 14px; padding: 28px 30px; overflow-y: auto; min-width: 0; }
.pview-info .name { font-size: 36px; }
.pview-close { position: absolute; top: 12px; right: 12px; z-index: 8; background: rgba(0, 0, 0, .6); color: #fff; }
@media (max-width: 760px) { .pview-close { left: 12px; right: auto; } }
.pv-rank { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: var(--fill); flex-wrap: wrap; }
.pv-rank > div { display: flex; flex-direction: column; min-width: 0; }
.pv-rank > div + div { margin-left: auto; text-align: right; }
.pv-rank b { font-family: var(--f-display); font-style: italic; font-size: 20px; }
.pv-rank b.mono { font-family: var(--f-ui); font-style: normal; font-size: 18px; letter-spacing: .02em; }
.overlay .pview-info .pv-bio { margin: 0; font-size: 16px; max-width: none; color: var(--fg); white-space: pre-line; overflow-wrap: anywhere; }
.pv-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 0; font-size: 14px; }
.pv-facts dt { font-family: var(--f-ui); font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.pv-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .pview-grid { grid-template-columns: minmax(0, 1fr); overflow-y: auto; }
  .pview-card { min-height: 380px; }
  .pview-info { overflow: visible; padding: 20px; }
}

/* ---------- Formulare: Dropdowns, Schalter, Slider, Scrollbalken (kein Standard-Browser-Look) ---------- */
::selection { background: color-mix(in srgb, var(--accent) 45%, transparent); color: #fff; }

select, input[type="number"], input[type="text"], textarea { border-color: var(--line); border-radius: 4px; }
select:hover, input[type="number"]:hover, input[type="text"]:hover, textarea:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }

/* Dropdown: eigener Pfeil in Rot; die geöffnete Liste ist in Chrome/Edge ab Version 135 komplett im FYM-Stil */
select {
  appearance: none; -webkit-appearance: none; cursor: pointer; font-weight: 500; padding-right: 36px;
}
select, select:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ff4655' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 14px;
}
select option { background: var(--surface); color: var(--fg); }
@supports (appearance: base-select) {
  select, ::picker(select) { appearance: base-select; }
  select, select:focus { background-image: none; }
  select { display: flex; align-items: center; gap: 8px; padding-right: 12px; }
  select::picker-icon {
    content: ""; width: 14px; height: 14px; margin-left: auto; transition: rotate .2s ease;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ff4655' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  }
  select:open::picker-icon { rotate: 180deg; }
  select:open { border-color: var(--accent); }
  ::picker(select) {
    margin-top: 4px; padding: 4px; max-height: min(340px, 60vh); overflow-y: auto;
    background: var(--surface); color: var(--fg); border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: 4px;
    box-shadow: 0 18px 44px rgba(0, 0, 0, .45), 0 0 0 1px rgba(0, 0, 0, .2);
  }
  select option { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 3px; font-size: 14px; cursor: pointer; background: none; }
  select option:hover, select option:focus-visible { background: var(--fill-2); outline: none; }
  select option:checked { background: color-mix(in srgb, var(--accent) 18%, transparent); font-weight: 600; }
  select option::checkmark { color: var(--accent); }
}

/* Zahlenfelder ohne Pfeil-Knöpfe */
input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* Checkboxen als kantiger Schalter */
.switch input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 40px; height: 22px; margin: 0; cursor: pointer;
  background: var(--fill-2); transition: background .2s;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}
.switch input[type="checkbox"]::before {
  content: ""; position: absolute; top: 4px; left: 4px; width: 14px; height: 14px; background: var(--muted);
  transition: transform .2s cubic-bezier(.2, .8, .3, 1), background .2s;
  clip-path: polygon(3px 0, 100% 0, 100% calc(100% - 3px), calc(100% - 3px) 100%, 0 100%, 0 3px);
}
.switch input[type="checkbox"]:checked { background: var(--accent); }
.switch input[type="checkbox"]:checked::before { transform: translateX(18px); background: #fff; }
.switch input[type="checkbox"]:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--fg); }
.lite-switch input[type="checkbox"] { margin-top: 1px; }

/* Schieberegler: Raute als Griff; bei der Kartenfarbe ein Farbverlauf als Spur */
input[type="range"] { appearance: none; -webkit-appearance: none; height: 24px; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: var(--fill-2); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 3px; background: var(--fill-2); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px; margin-top: -5px; border-radius: 2px; transform: rotate(45deg);
  background: var(--accent); border: 2px solid #fff; box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 70%, transparent);
}
input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 2px; transform: rotate(45deg);
  background: var(--accent); border: 2px solid #fff; box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 70%, transparent);
}
input[type="range"]:focus-visible { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent); }
#p-hue::-webkit-slider-runnable-track {
  background: linear-gradient(90deg, hsl(0 85% 60%), hsl(60 85% 60%), hsl(120 85% 55%), hsl(180 85% 55%), hsl(240 85% 65%), hsl(300 85% 62%), hsl(359 85% 60%));
}
#p-hue::-moz-range-track {
  background: linear-gradient(90deg, hsl(0 85% 60%), hsl(60 85% 60%), hsl(120 85% 55%), hsl(180 85% 55%), hsl(240 85% 65%), hsl(300 85% 62%), hsl(359 85% 60%));
}

/* Scrollbalken: schmal, rot, ohne Pfeile. Chrome/Edge über ::-webkit-scrollbar, Firefox über scrollbar-color */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #000)) padding-box;
  border: 3px solid transparent; border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover { background: var(--accent) padding-box; border-width: 2px; }
::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-button { display: none; }
@supports not selector(::-webkit-scrollbar) {
  * { scrollbar-width: thin; scrollbar-color: var(--accent) transparent; }
}

/* ---------- Tablet & Handy ---------- */
@media (max-width: 900px) {
  .land-points { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
  :root.in-app { --nav-h: calc(60px + env(safe-area-inset-bottom, 0px)); }
  .top { display: flex; justify-content: space-between; }
  .wrap { grid-template-columns: minmax(0, 1fr); padding-block: 20px; }

  /* Tab-Leiste unten wie in einer App */
  .tabs {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; gap: 0; padding: 0; border-radius: 0;
    background: var(--glass); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px);
  }
  .tab {
    flex: 1; flex-direction: column; gap: 3px; justify-content: center; height: 60px;
    border-radius: 0; padding: 6px 4px; font-size: 10px; font-weight: 500; color: var(--muted);
  }
  .tab svg { width: 24px; height: 24px; color: inherit; }
  .tab[aria-selected="true"], .filter-toggle[aria-expanded="true"] { background: none; box-shadow: none; color: var(--accent); font-weight: 600; }
  .tab[aria-selected="true"] svg { color: inherit; }
  .tab .count { position: absolute; top: 6px; left: calc(50% + 6px); }
  .filter-toggle { display: inline-flex; }

  .filters {
    position: fixed; inset: auto 0 var(--nav-h) 0; top: auto; z-index: 40; max-height: 78%; overflow-y: auto;
    border-radius: 6px 6px 0 0; box-shadow: none;
    padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px));
    transform: translateY(calc(100% + var(--nav-h) + 20px)); transition: transform .35s cubic-bezier(.2,.8,.3,1);
  }
  .filters.open { transform: none; box-shadow: 0 -20px 60px rgba(0,0,0,.25); }
  .sheet-close { display: inline-block; align-self: stretch; }

  .stage { gap: 20px; }
  .deck { height: 540px; }
  .hero { height: 210px; }
  .act { width: 72px; height: 72px; }
  .act svg { width: 30px; height: 30px; }
  .act.small { width: 56px; height: 56px; }
  .act.small svg { width: 22px; height: 22px; }
  .hint { display: none; }

  .matches h2, .pform h2 { font-size: 32px; }

  /* Am Handy nicht schwebend (würde Swipe-Buttons verdecken), sondern als Karte über dem Footer */
  .dc-widget { position: static; margin: 4px max(20px, env(safe-area-inset-right, 0px)) 20px max(20px, env(safe-area-inset-left, 0px)); }
  .dc-card { width: 100%; }
  .profile { grid-template-columns: minmax(0, 1fr); }
  .preview-col { position: static; }
  .preview { height: 540px; max-width: 380px; }
}
@media (max-width: 520px) {
  .fields { grid-template-columns: minmax(0, 1fr); }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .land-points li { padding: 22px; }
}
@media (max-width: 480px) {
  .logo-word { display: none; } /* am Handy reicht der Roboter, der Schriftzug steht im Banner */
}
@media (max-width: 420px) {
  .mode-pill { display: none; }
  .user .uname { display: none; }
  .deck { height: 510px; }
  .demo-deck { height: 480px; }
  .actions { gap: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .card, .act, .filters, .hero, .initials, .tint, .btn, .tab, .pic { transition: none; }
  .pslot.loading, .dc-card, .dc-bubble, .deck::before, .demo-deck::before { animation: none; }
  .lite-badge, .card.fx-frame, .hero.fx-banner, .fx-shine::before, .card.fx-color .name { animation: none !important; }
  .deck:has(> .card[data-depth="0"].fx-color)::before, .demo-deck:has(> .card[data-depth="0"].fx-color)::before { animation: none; }
  .overlay-in, .dialog, .pair .mav { animation: none; }
  .sparks { display: none; }
}
