/* ============================================================
   Gutterlords – „Port Noir bei Nacht“
   Dunkler Asphalt, Neon-Grün (Pfandflasche) und Bernstein (Straßenlaterne)
   ============================================================ */
:root {
  --nacht: #0b0e10;          /* Seitenhintergrund */
  --asphalt: #12171a;        /* Flächen */
  --asphalt-2: #192024;      /* erhöhte Flächen */
  --asphalt-3: #222b30;      /* Hover, Eingabefelder */
  --linie: #2b353b;
  --linie-hell: #3d4a52;
  --text: #ece6d8;
  --text-2: #9aa3a0;
  --gift: #9be23a;           /* Neon-Grün */
  --gift-dunkel: #6fae1c;
  --auf-gift: #0b1204;
  --bernstein: #ffb238;
  --rot: #ff5a43;
  --schild: #070a0c;         /* Bezirksschild: dunkle Platte mit Neonrand */
  --display: "Bahnschrift SemiBold Condensed", "Bahnschrift", "Oswald", "Roboto Condensed", "Arial Narrow", Impact, sans-serif;
  --body: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --radius: 10px;
  --glow-gift: 0 0 18px rgba(155, 226, 58, .28);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(155, 226, 58, .07), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(255, 178, 56, .06), transparent 55%),
    var(--nacht);
  color: var(--text);
  font: 15px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--bernstein); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.1; margin: 0; letter-spacing: .02em; }
h2 { font-size: 1.9rem; text-transform: uppercase; }
h3 { font-size: 1.15rem; text-transform: uppercase; letter-spacing: .05em; }
p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.small { font-size: .85rem; }
a { color: inherit; }
[hidden] { display: none !important; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Grundgerüst ---------- */
.shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 330px;
  grid-template-rows: auto 1fr;
  height: 100vh;
  height: 100dvh;
}
.top {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 20px;
  padding: 10px 18px;
  background: rgba(11, 14, 16, .92);
  border-bottom: 1px solid var(--linie);
  box-shadow: 0 1px 0 rgba(155, 226, 58, .12);
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 1.45rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.brand svg { width: 20px; height: 32px; flex: none; filter: drop-shadow(0 0 6px rgba(155, 226, 58, .55)); }
.brand .b1 { fill: var(--gift); }
.brand .b2 { fill: var(--bernstein); }
.stats { display: flex; gap: 8px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.stat { display: flex; align-items: center; gap: 9px; padding: 6px 12px 6px 10px; background: var(--asphalt); border: 1px solid var(--linie); border-radius: 8px; white-space: nowrap; }
.stat .icon { color: var(--gift); }
.stat.st-money .icon { color: var(--bernstein); }
.stat > div { display: flex; flex-direction: column; line-height: 1.1; }
.stat b { font-family: var(--display); font-size: 1.15rem; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.stat span { font-size: .72rem; color: var(--text-2); text-transform: uppercase; letter-spacing: .06em; }
.top-right { display: flex; align-items: center; gap: 14px; white-space: nowrap; }
.online { font-size: .82rem; color: var(--text-2); }
.online i, .status-online i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--gift); box-shadow: 0 0 8px var(--gift); margin-right: 6px; }

.nav { background: var(--asphalt); border-right: 1px solid var(--linie); padding: 8px 0 14px; overflow-y: auto; }
.nav-group { padding: 14px 18px 4px; font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--text-2); }
.nav button {
  display: flex; align-items: center; gap: 11px; width: 100%;
  border: 0; background: none; text-align: left; cursor: pointer; color: var(--text-2);
  padding: 8px 18px; border-left: 3px solid transparent; font-weight: 600;
}
.nav button .lbl { flex: 1; }
.nav button:hover { background: var(--asphalt-2); color: var(--text); }
.nav button[aria-current="page"] { border-left-color: var(--gift); background: linear-gradient(90deg, rgba(155, 226, 58, .12), transparent); color: var(--text); }
.nav button[aria-current="page"] .icon { color: var(--gift); }
.nav .nav-chat { display: none; }
.badge { min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--rot); color: #fff; font-size: .72rem; font-weight: 700; text-align: center; line-height: 20px; }

.main { overflow-y: auto; padding: 24px 28px 70px; }
.view { max-width: 900px; display: grid; gap: 18px; }
.view-head { display: grid; gap: 6px; }
.view-head p { color: var(--text-2); max-width: 70ch; }

/* ---------- Bausteine ---------- */
.panel { background: var(--asphalt); border: 1px solid var(--linie); border-radius: var(--radius); padding: 18px 20px; display: grid; gap: 12px; }
.panel.flat { background: transparent; border-style: dashed; }
.panel.accent { border-color: rgba(155, 226, 58, .45); box-shadow: var(--glow-gift); }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row.spread { justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--gift); background: var(--gift); color: var(--auf-gift);
  padding: 8px 16px; border-radius: 8px; font-weight: 700; cursor: pointer; white-space: nowrap;
  text-transform: uppercase; letter-spacing: .05em; font-size: .85rem;
}
.btn:hover { background: #b4f257; border-color: #b4f257; box-shadow: var(--glow-gift); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--linie-hell); }
.btn.ghost:hover { border-color: var(--text); background: transparent; box-shadow: none; }
.btn.warn { background: var(--rot); border-color: var(--rot); color: #fff; }
.btn.warn:hover { background: #ff7560; border-color: #ff7560; box-shadow: 0 0 18px rgba(255, 90, 67, .35); }
.btn.small { padding: 5px 10px; font-size: .75rem; }
.btn:disabled { opacity: .35; cursor: not-allowed; box-shadow: none; }
.linkish { border: 0; background: none; padding: 0; cursor: pointer; font-weight: 600; color: var(--text); text-decoration: underline; text-decoration-color: var(--linie-hell); text-underline-offset: 3px; }
.linkish:hover { color: var(--gift); text-decoration-color: var(--gift); }

input[type="text"], input[type="password"], input[type="number"], textarea, select {
  border: 1px solid var(--linie-hell); background: var(--asphalt-3); color: var(--text);
  border-radius: 8px; padding: 8px 10px; min-width: 0;
}
input:focus, textarea:focus, select:focus { border-color: var(--gift); outline: none; box-shadow: 0 0 0 3px rgba(155, 226, 58, .2); }
::placeholder { color: #6d7774; }
label { display: grid; gap: 4px; font-size: .85rem; font-weight: 600; color: var(--text-2); }
textarea { resize: vertical; min-height: 6em; width: 100%; }

.progress { height: 10px; border-radius: 5px; background: var(--asphalt-3); overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gift-dunkel), var(--gift)); box-shadow: 0 0 10px rgba(155, 226, 58, .6); transition: width 1s linear; }
.progress.amber > i { background: linear-gradient(90deg, #c7801a, var(--bernstein)); box-shadow: 0 0 10px rgba(255, 178, 56, .5); }

.list { display: grid; }
.item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--linie); }
.item:first-child { border-top: 0; }
.item .meta { color: var(--text-2); font-size: .86rem; }
.name { font-weight: 700; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--linie); }
th { font-size: .72rem; color: var(--text-2); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
td.r, th.r { text-align: right; }
tr.me td { background: rgba(155, 226, 58, .08); }
tbody tr:hover td { background: var(--asphalt-2); }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 0; }
.kv dt { color: var(--text-2); }
.kv dd { margin: 0; font-weight: 600; }

/* ---------- Bezirksschild von Port Noir: dunkle Platte, Neonrand, leuchtende Nummer ---------- */
.sign {
  display: inline-grid; grid-template-columns: auto 1fr; align-items: center; gap: 0 14px;
  background: var(--schild); color: var(--text);
  border: 2px solid var(--gift); border-radius: 6px;
  box-shadow: 0 0 14px rgba(155, 226, 58, .35), inset 0 0 12px rgba(155, 226, 58, .12), 0 8px 24px rgba(0, 0, 0, .45);
  padding: 12px 24px 12px 18px; justify-self: start;
}
.sign .nr { font-family: var(--display); font-size: 3rem; font-weight: 700; line-height: 1; grid-row: span 2; color: var(--gift); text-shadow: 0 0 12px rgba(155, 226, 58, .6); }
.sign .bez { font-family: var(--display); font-size: 1.8rem; font-weight: 700; line-height: 1.05; text-transform: uppercase; letter-spacing: .03em; }
.sign .stadt { font-size: .82rem; color: var(--text-2); }
.sign.small { padding: 6px 14px 6px 10px; gap: 0 10px; border-width: 1px; box-shadow: 0 0 8px rgba(155, 226, 58, .25); }
.sign.small .nr { font-size: 1.6rem; }
.sign.small .bez { font-size: 1.05rem; }

/* ---------- Übersicht ---------- */
.hero {
  position: relative; display: grid; gap: 16px; padding: 26px 24px; border-radius: 14px; overflow: hidden;
  background:
    linear-gradient(180deg, rgba(11, 14, 16, .15), rgba(11, 14, 16, .85)),
    radial-gradient(600px 220px at 80% 0%, rgba(255, 178, 56, .22), transparent 70%),
    radial-gradient(500px 260px at 0% 100%, rgba(155, 226, 58, .14), transparent 70%),
    var(--asphalt-2);
  border: 1px solid var(--linie);
}
.hero.has-bg { background-size: cover; background-position: center; }
.hero-line { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--text-2); font-size: .9rem; }
.hero-line b { color: var(--text); }
.next-district { display: grid; gap: 6px; max-width: 460px; }

.guide { display: grid; gap: 2px; }
.guide-item { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 11px 0; border-top: 1px solid var(--linie); }
.guide-item:first-child { border-top: 0; }
.guide-item .gi { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgba(155, 226, 58, .12); color: var(--gift); }
.guide-item.amber .gi { background: rgba(255, 178, 56, .12); color: var(--bernstein); }
.guide-item b { display: block; }
.guide-item span { color: var(--text-2); font-size: .86rem; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.tile { background: var(--asphalt); border: 1px solid var(--linie); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 8px; align-content: start; }
.tile-head { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); }
.tile-head .icon { color: var(--gift); }
.tile-value { font-family: var(--display); font-size: 1.6rem; line-height: 1.1; }
.tile.ready { border-color: rgba(155, 226, 58, .45); }

/* ---------- Pfandkurs ---------- */
.price { display: flex; align-items: baseline; gap: 8px; }
.price b { font-family: var(--display); font-size: 3.2rem; line-height: 1; color: var(--gift); text-shadow: 0 0 18px rgba(155, 226, 58, .45); font-variant-numeric: tabular-nums; }
.trend { font-size: .8rem; font-weight: 700; padding: 2px 8px; border-radius: 10px; text-transform: uppercase; letter-spacing: .05em; }
.trend.up { background: rgba(155, 226, 58, .15); color: var(--gift); }
.trend.down { background: rgba(255, 90, 67, .15); color: var(--rot); }
.trend.mid { background: var(--asphalt-3); color: var(--text-2); }
.spark { width: 100%; height: 56px; display: block; }
.spark polyline { fill: none; stroke: var(--gift); stroke-width: 2; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 4px rgba(155, 226, 58, .6)); }

/* ---------- Promille ---------- */
.pm-bar { position: relative; height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--gift-dunkel) 0 50%, var(--bernstein) 50% 75%, var(--rot) 75% 100%); }
.pm-bar i { position: absolute; top: -5px; width: 4px; height: 22px; background: #fff; border-radius: 2px; transform: translateX(-2px); box-shadow: 0 0 8px rgba(255, 255, 255, .7); }

/* ---------- Karten (Laden, Fähigkeiten, Sammelrunden) ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.card { background: var(--asphalt-2); border: 1px solid var(--linie); border-radius: var(--radius); padding: 14px; display: grid; gap: 8px; align-content: start; position: relative; }
.card:hover { border-color: var(--linie-hell); }
.card.owned { border-color: rgba(155, 226, 58, .55); }
.card.locked { opacity: .55; }
.card-img { width: 100%; aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .6)); }
.card .name { font-size: 1rem; }
.card .stat-line { font-family: var(--display); font-size: 1.2rem; color: var(--gift); letter-spacing: .02em; }
.card .price-tag { color: var(--bernstein); font-weight: 700; }
.card .btn { justify-self: start; }
.tag { display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 2px 8px; border-radius: 10px; background: rgba(155, 226, 58, .15); color: var(--gift); }
.tag.amber { background: rgba(255, 178, 56, .15); color: var(--bernstein); }
.tag.red { background: rgba(255, 90, 67, .15); color: var(--rot); }
.lvl { display: flex; gap: 3px; }
.lvl i { flex: 1; height: 5px; border-radius: 2px; background: var(--asphalt-3); }
.lvl i.on { background: var(--gift); }

/* ---------- Chat ---------- */
.chat { display: flex; flex-direction: column; background: var(--asphalt); border-left: 1px solid var(--linie); min-height: 0; }
.chat-tabs { display: flex; border-bottom: 1px solid var(--linie); }
.chat-tabs button { flex: 1; border: 0; background: none; padding: 11px; cursor: pointer; font-weight: 700; color: var(--text-2); border-bottom: 2px solid transparent; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; }
.chat-tabs button[aria-pressed="true"] { border-bottom-color: var(--gift); color: var(--text); }
.chat-tabs button:disabled { opacity: .4; cursor: not-allowed; }
.chat-list { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 9px; min-height: 0; }



.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--linie); }
.chat-form input { flex: 1; }
.chat-empty { color: var(--text-2); font-size: .9rem; margin: auto; text-align: center; padding: 20px; }

/* ---------- Anmeldung ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 28px 18px; }
.auth-box { width: min(980px, 100%); display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 36px; align-items: center; }
.auth-hero { display: grid; gap: 18px; }
.auth-title { font-family: var(--display); font-size: clamp(2.8rem, 7vw, 4.6rem); line-height: .95; text-transform: uppercase; letter-spacing: .02em; }
.auth-title em { font-style: normal; color: var(--gift); text-shadow: 0 0 24px rgba(155, 226, 58, .5); }
.auth-hero > p { font-size: 1.1rem; color: var(--text-2); max-width: 42ch; }
.features { display: grid; gap: 10px; padding: 0; margin: 0; list-style: none; }
.features li { display: flex; gap: 10px; align-items: flex-start; }
.features .icon { color: var(--gift); margin-top: 2px; }
.auth-card { background: var(--asphalt); border: 1px solid var(--linie); border-radius: 14px; padding: 22px; display: grid; gap: 18px; box-shadow: 0 20px 50px rgba(0, 0, 0, .5); }
.tabs { display: flex; gap: 6px; }
.tabs button { flex: 1; padding: 9px; border: 1px solid var(--linie); background: var(--asphalt-2); color: var(--text-2); border-radius: 8px; cursor: pointer; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .8rem; }
.tabs button[aria-pressed="true"] { background: var(--asphalt-3); border-color: var(--gift); color: var(--text); }
.form { display: grid; gap: 14px; }
.form .btn { width: 100%; padding: 11px; }

/* ---------- Meldungen ---------- */
#toasts { position: fixed; right: 18px; bottom: 18px; display: grid; gap: 8px; z-index: 50; max-width: min(380px, calc(100vw - 36px)); }
.toast { background: var(--asphalt-3); color: var(--text); padding: 11px 14px; border-radius: 8px; border-left: 4px solid var(--gift); box-shadow: 0 10px 28px rgba(0, 0, 0, .5); animation: toast-in .2s ease-out; }
.toast.err { border-left-color: var(--rot); }
.toast.warn { border-left-color: var(--bernstein); }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

.result-win { border-left: 4px solid var(--gift); box-shadow: var(--glow-gift); }
.result-lose { border-left: 4px solid var(--rot); }

/* ---------- Rechtliches ---------- */
.legal { max-width: 760px; margin: 0 auto; padding: 32px 18px 60px; }
.legal h1 { font-size: 2.2rem; margin-bottom: 18px; text-transform: uppercase; }
.legal h2 { font-size: 1.2rem; margin: 26px 0 8px; }
.legal p, .legal ul { margin: 0 0 10px; }
.legal .back { display: inline-block; margin-bottom: 20px; }
.legal .todo { background: var(--bernstein); color: #1a1205; padding: 0 4px; border-radius: 3px; }
.legal-links { display: flex; gap: 14px; justify-content: center; font-size: .82rem; color: var(--text-2); }
.nav-legal { display: flex; gap: 10px; padding: 18px 18px 0; font-size: .75rem; color: var(--text-2); }

/* ---------- Gamemaster ---------- */


.msg-del { border: 0; background: none; padding: 0 4px; margin-left: 4px; cursor: pointer; color: var(--text-2); font-size: .85rem; }
.msg-del:hover { color: var(--rot); }
.mod select, .mod input[type="text"] { min-width: 0; }

/* ---------- Profil ---------- */
.profile-head h2 { margin: 0; }
.profile-sub { margin: 0; color: var(--text-2); }
.status-online { color: var(--gift); font-weight: 600; }
.bio { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.bio-edit { display: grid; gap: 8px; }
.danger { border-top: 1px solid var(--linie); padding-top: 14px; display: grid; gap: 8px; }
.danger h3 { color: var(--rot); }

/* ---------- Profilbilder ---------- */
.av { display: block; flex: none; object-fit: cover; background: var(--asphalt-3); }
.av-s { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--linie-hell); }
.av-l { width: 132px; height: 132px; border-radius: 12px; border: 2px solid var(--gift); box-shadow: var(--glow-gift); }
.who-av { display: inline-flex; align-items: center; gap: 7px; vertical-align: middle; }

.profile-top { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.profile-id { display: grid; gap: 4px; min-width: 0; }
.av-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 10px; }
.av-pick button { padding: 4px; border: 2px solid transparent; border-radius: 12px; background: none; cursor: pointer; }
.av-pick button .av-l { width: 100%; height: auto; aspect-ratio: 1; border-width: 1px; border-color: var(--linie); box-shadow: none; }
.av-pick button:hover .av-l { border-color: var(--text-2); }
.av-pick button[aria-pressed="true"] { border-color: var(--gift); box-shadow: var(--glow-gift); }
.me-btn { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 0; cursor: pointer; font-weight: 700; color: var(--text); }
.me-btn:hover { color: var(--gift); }

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

/* ---------- Tablet & Handy ---------- */
@media (max-width: 1150px) {
  .shell { grid-template-columns: 200px minmax(0, 1fr); }
  .chat { display: none; }
  .nav .nav-chat { display: flex; }
  .shell.show-chat .chat { display: flex; grid-column: 2; grid-row: 2; border-left: 0; }
  .shell.show-chat .main { display: none; }
}
@media (max-width: 860px) {
  .auth-box { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 720px) {
  .shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto 1fr; }
  .top { flex-wrap: wrap; gap: 10px 14px; padding: 10px 14px; }
  .stats { order: 3; flex-basis: 100%; }
  .top-right { margin-left: auto; gap: 10px; }
  .online { display: none; }
  .me-btn { font-size: 0; gap: 0; }
  .nav { display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--linie); padding: 0; scrollbar-width: none; }
  .nav-group, .nav-legal { display: none; }
  .nav button { width: auto; white-space: nowrap; padding: 10px 14px; border-left: 0; border-bottom: 2px solid transparent; gap: 7px; }
  .nav button[aria-current="page"] { border-bottom-color: var(--gift); background: none; }
  .shell.show-chat .chat { grid-column: 1; grid-row: 3; }
  .main { padding: 16px 14px 60px; }
  h2 { font-size: 1.6rem; }
  .sign .nr { font-size: 2.3rem; }
  .sign .bez { font-size: 1.4rem; }
  .price b { font-size: 2.6rem; }
  .hero { padding: 20px 16px; }
  .av-l { width: 100px; height: 100px; }
  .guide-item { grid-template-columns: 32px minmax(0, 1fr); }
  .guide-item .btn { grid-column: 2; justify-self: start; }
}

/* ---------- Hilfe ---------- */
.titled { display: flex; align-items: center; gap: 8px; }
.help {
  display: inline-grid; place-items: center; flex: none; width: 20px; height: 20px; padding: 0;
  border-radius: 50%; border: 1px solid var(--linie-hell); background: var(--asphalt-2); color: var(--text-2);
  font: 700 .72rem/1 var(--body); cursor: pointer; text-transform: none; letter-spacing: 0; vertical-align: middle;
}
.help:hover, .help[aria-expanded="true"] { border-color: var(--gift); color: var(--gift); box-shadow: 0 0 10px rgba(155, 226, 58, .35); }
h2 .help { width: 22px; height: 22px; font-size: .8rem; }
.stat .help { width: 16px; height: 16px; font-size: .62rem; align-self: flex-start; }
.help-pop {
  position: fixed; z-index: 60; width: min(340px, calc(100vw - 16px)); display: grid; gap: 8px;
  background: var(--asphalt-3); border: 1px solid var(--gift); border-radius: 10px; padding: 14px 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .6), var(--glow-gift); font-size: .92rem; line-height: 1.5;
  animation: toast-in .15s ease-out;
}
.help-pop b { font-family: var(--display); font-size: 1.05rem; text-transform: uppercase; letter-spacing: .05em; color: var(--gift); }
.help-close { border: 0; background: none; color: var(--text-2); font-size: 1.3rem; line-height: 1; cursor: pointer; padding: 0 2px; }
.help-close:hover { color: var(--text); }
.meta .icon { width: 14px; height: 14px; vertical-align: -2px; }
.chat-help { display: grid; place-items: center; padding: 0 10px; }
.tile, .card { min-width: 0; }
.tile-head span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .btn, .card .btn { white-space: normal; max-width: 100%; text-align: center; }
.tile .btn { justify-self: start; }

/* ---------- Plunder ---------- */
.tag.rar-gewoehnlich { background: rgba(154, 163, 160, .15); color: #c3cac7; }
.tag.rar-selten { background: rgba(74, 163, 255, .15); color: #6fb6ff; }
.tag.rar-episch { background: rgba(180, 107, 255, .16); color: #c48bff; }
.tag.rar-legendaer { background: rgba(255, 178, 56, .18); color: var(--bernstein); }
.card.rar-card-selten { border-color: rgba(74, 163, 255, .45); }
.card.rar-card-episch { border-color: rgba(180, 107, 255, .55); box-shadow: 0 0 16px rgba(180, 107, 255, .18); }
.card.rar-card-legendaer { border-color: rgba(255, 178, 56, .7); box-shadow: 0 0 20px rgba(255, 178, 56, .25); }
.thumb { width: 56px; height: 56px; }
.thumb .card-img { width: 56px; height: 56px; }
.album { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.album-item { display: grid; gap: 2px; padding: 9px 11px; border-radius: 8px; background: var(--asphalt-2); border: 1px solid var(--linie); border-left-width: 3px; font-size: .85rem; }
.album-item span { color: var(--text-2); font-size: .74rem; }
.album-item.unknown b { color: var(--text-2); letter-spacing: .2em; }
.album-item.unknown { opacity: .6; }
.album-item.rar-card-gewoehnlich { border-left-color: #8a938f; }
.album-item.rar-card-selten { border-left-color: #4aa3ff; }
.album-item.rar-card-episch { border-left-color: #b46bff; }
.album-item.rar-card-legendaer { border-left-color: var(--bernstein); }
.small .icon, p.small .icon { width: 15px; height: 15px; vertical-align: -3px; }

/* ---------- Team ---------- */
.role-badge { display: inline-block; margin: 0 4px; padding: 0 6px; border-radius: 4px; font-size: .64rem; font-weight: 800; line-height: 1.6; letter-spacing: .08em; vertical-align: 1px; color: #0b0e10; }
.role-badge.role-gm { background: var(--bernstein); box-shadow: 0 0 10px rgba(255, 178, 56, .45); }
.role-badge.role-admin { background: var(--rot); color: #fff; }
.role-badge.role-moderator { background: #4aa3ff; }
.role-badge.role-supporter { background: var(--gift); }

.team-panel { border-color: rgba(255, 178, 56, .4); }
.team-tools { display: grid; gap: 10px; border-top: 1px solid var(--linie); padding-top: 12px; }
.team-tools input[type="text"] { flex: 1; min-width: 160px; }
.gm-box { display: grid; gap: 12px; border-top: 1px dashed rgba(255, 178, 56, .5); padding-top: 12px; }
.gm-box h3 { color: var(--bernstein); }
.gm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.gm-grid input, .gm-grid select { width: 100%; }

/* ---------- Verbrechen und Knast ---------- */
.jail-banner {
  display: grid; gap: 10px; padding: 16px 20px; border-radius: var(--radius);
  border: 1px solid rgba(255, 90, 67, .6); box-shadow: 0 0 22px rgba(255, 90, 67, .2);
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .05) 0 6px, transparent 6px 46px), var(--asphalt);
}
.jail-banner h3, .jail-banner .icon { color: var(--rot); }
.crime-cards { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.tag .icon { width: 12px; height: 12px; vertical-align: -1px; }
.stat b small { font-size: .7em; color: var(--text-2); font-weight: 600; }
.stat b.full, .stat b.full small { color: var(--rot); }

/* ---------- Laden: Übersicht und Reiter ---------- */
.shop-tabs { flex-wrap: wrap; }
.shop-tabs button { flex: 0 1 auto; padding: 8px 14px; }
.gear { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.gear-item { display: grid; gap: 4px; text-align: left; padding: 14px; border-radius: var(--radius); border: 1px solid var(--linie); background: var(--asphalt-2); color: var(--text); cursor: pointer; }
.gear-item:hover { border-color: var(--gift); box-shadow: var(--glow-gift); }
.gear-cat { font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); }
.gear-item .tag { margin-left: 6px; }
.card.weaker { opacity: .62; }
.card.weaker:hover { opacity: .9; }
.card.next { border-color: rgba(255, 178, 56, .7); box-shadow: 0 0 16px rgba(255, 178, 56, .18); }
.tag.muted-tag { background: var(--asphalt-3); color: var(--text-2); }

/* Kacheln und Karten: Inhalt nie breiter als das Kästchen (lange Überschriften, Fortschrittsbalken) */
.tiles { grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); }
.tile, .card { grid-template-columns: minmax(0, 1fr); overflow: hidden; }
.tile-head { min-width: 0; font-size: .95rem; letter-spacing: .04em; }
.tile .progress, .card .progress { width: 100%; }

/* ---------- Chat: Kürzel vor dem Namen, ausblendbar ---------- */
.who-av .sep { color: var(--text-2); font-weight: 400; }
.chat-help { display: flex; align-items: center; gap: 6px; }
.chat-hide { border: 0; background: none; color: var(--text-2); font-size: 1.3rem; line-height: 1; cursor: pointer; padding: 0 2px; }
.chat-hide:hover { color: var(--text); }
.chat-show .icon { width: 16px; height: 16px; }
@media (min-width: 1151px) {
  .shell.chat-hidden { grid-template-columns: 220px minmax(0, 1fr); }
  .shell.chat-hidden .chat { display: none; }
}
@media (max-width: 1150px) { .chat-hide, .chat-show { display: none; } }

/* ---------- Chat-Nachrichten ---------- */
.chat-list { gap: 2px; padding: 10px 8px; }
.msg {
  display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 9px; align-items: start;
  padding: 6px 8px; border-radius: 8px; border-left: 3px solid transparent;
  font-size: .9rem; line-height: 1.45; overflow-wrap: anywhere; position: relative;
}
.msg:hover { background: var(--asphalt-2); }
.msg .av-s { width: 26px; height: 26px; margin-top: 1px; }
.av-letter { display: grid; place-items: center; border-radius: 50%; background: var(--asphalt-3); color: var(--text-2); font-weight: 700; font-size: .75rem; border: 1px solid var(--linie-hell); }
.msg-body { min-width: 0; }
.msg-body time { float: right; margin-left: 8px; color: var(--text-2); font-size: .7rem; font-variant-numeric: tabular-nums; opacity: .8; }
.msg-name { font-weight: 700; color: var(--text); text-decoration: none; }
.msg-name:hover { color: var(--gift); text-decoration: underline; }
.msg .sep, .msg .colon { color: var(--text-2); }
.msg-text { color: #d9d3c5; }
.msg .role-badge { margin: 0 2px 0 5px; font-size: .58rem; padding: 0 5px; }
.msg-del { position: absolute; right: 4px; bottom: 4px; opacity: 0; transition: opacity .15s; }
.msg:hover .msg-del, .msg-del:focus-visible { opacity: 1; }
.msg.own { background: rgba(155, 226, 58, .05); }

/* Team: Farbe je Rang */
.msg.staff { background: linear-gradient(90deg, var(--rank-tint), transparent 85%); border-left-color: var(--rank); }
.msg.staff .msg-name { color: var(--rank); }
.msg.staff .msg-text { color: var(--text); }
.msg.staff .av-s { border-color: var(--rank); box-shadow: 0 0 8px var(--rank-tint); }
.msg.role-gm { --rank: var(--bernstein); --rank-tint: rgba(255, 178, 56, .14); }
.msg.role-gm .msg-name { text-shadow: 0 0 10px rgba(255, 178, 56, .55); }
.msg.role-admin { --rank: #ff6b57; --rank-tint: rgba(255, 90, 67, .12); }
.msg.role-moderator { --rank: #5aaeff; --rank-tint: rgba(74, 163, 255, .12); }
.msg.role-supporter { --rank: var(--gift); --rank-tint: rgba(155, 226, 58, .10); }

/* ---------- Tagwerk ---------- */
.daily { border-color: rgba(255, 178, 56, .45); }
.daily-list { display: grid; gap: 8px; }
.daily-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 8px; background: var(--asphalt-2); border: 1px solid var(--linie); }
.daily-item.ready { border-color: rgba(155, 226, 58, .6); box-shadow: var(--glow-gift); }
.daily-item.claimed { opacity: .55; }
.daily-text { display: grid; gap: 4px; min-width: 0; }
.daily-text .progress { height: 6px; }

/* Bandenkürzel: eigene Farbe (Magenta) und Form (umrandet) – klar getrennt von den gefüllten Teamrollen-Abzeichen */
:root { --bande: #ff5fb4; }
.tag-link, .linkish.tag-link {
  display: inline-block; padding: 0 6px; border: 1px solid var(--bande); border-radius: 4px;
  background: rgba(255, 95, 180, .1); color: var(--bande); font-weight: 700; font-size: .78rem; line-height: 1.5;
  letter-spacing: .03em; text-decoration: none; vertical-align: 1px;
}
.linkish.tag-link:hover { background: rgba(255, 95, 180, .22); color: #ff8ccb; text-decoration: none; }
.msg .tag-link { font-size: .72rem; }

/* ---------- Bettelseite (Schnorr-Link) ---------- */
.spende { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 18px; padding: 28px 16px; }
.spende-box { width: min(560px, 100%); display: grid; gap: 16px; background: var(--asphalt); border: 1px solid var(--linie); border-radius: 14px; padding: 26px; box-shadow: 0 20px 50px rgba(0, 0, 0, .5); }
.spende-box h1 { font-size: clamp(1.6rem, 5vw, 2.2rem); text-transform: uppercase; color: var(--gift); text-shadow: 0 0 18px rgba(155, 226, 58, .4); }
.spende-cta { display: grid; gap: 10px; border-top: 1px solid var(--linie); padding-top: 16px; }
.spende-cta h2 { font-size: 1.3rem; }
.spende-cta .btn { justify-self: start; text-decoration: none; }
.reflink { display: flex; gap: 8px; }
.reflink input { flex: 1; font-variant-numeric: tabular-nums; }

/* Bezirksmerkmale (gelten für jeden Spieler im Bezirk) */
.fx { color: var(--gift); font-weight: 600; }
.fx-note { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.trait-box { display: grid; gap: 2px; margin-top: 4px; padding: 10px 12px; border-radius: 8px; background: rgba(0, 0, 0, .25); border: 1px solid var(--linie); max-width: 520px; }

/* Zwei-Faktor-Anmeldung */
.twofa { display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid var(--linie); }
.twofa.required { border-top-color: var(--rot); }
.twofa .steps { margin: 0; padding-left: 1.4em; display: grid; gap: 4px; }
.twofa-setup { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.qr { width: 200px; height: 200px; image-rendering: pixelated; border-radius: 6px; background: #fff; }
.secret { display: inline-block; padding: 6px 10px; border-radius: 6px; background: var(--nacht); border: 1px solid var(--linie); font-family: ui-monospace, Consolas, monospace; letter-spacing: .08em; word-break: break-all; }
.backup-codes ol { columns: 2; margin: 0; padding-left: 1.6em; font-family: ui-monospace, Consolas, monospace; font-size: 1.05rem; }
.backup-codes li { padding: 2px 0; }

/* ---------- Geschlossene Beta ---------- */
.auth-hero > p.beta-note { font-size: .95rem; color: var(--bernstein); border-left: 3px solid var(--bernstein); padding: 4px 0 4px 12px; }
.invite-code { font-family: ui-monospace, Consolas, monospace; letter-spacing: .06em; color: var(--text); }
.invite-new { display: grid; gap: 6px; margin: 10px 0; padding: 10px 12px; border: 1px solid var(--gift); border-radius: 10px; background: rgba(155, 226, 58, .06); }
.invite-new .row { flex-wrap: wrap; }
.invite-link { flex: 1 1 260px; min-width: 0; font-family: ui-monospace, Consolas, monospace; font-size: .85rem; }
.invite-switch { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--linie); display: grid; gap: 8px; justify-items: start; }

/* ---------- Post ---------- */
.mail-convs { display: grid; gap: 6px; }
.mail-conv {
  display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%;
  padding: 10px 12px; border: 1px solid var(--linie); border-radius: 10px; background: var(--asphalt-2);
  text-align: left; cursor: pointer; color: var(--text);
}
.mail-conv:hover { border-color: var(--linie-hell); background: var(--asphalt-3); }
.mail-conv.unread { border-color: rgba(155, 226, 58, .55); box-shadow: var(--glow-gift); }
.mail-conv-text { display: grid; gap: 2px; min-width: 0; }
.mail-conv-name { font-weight: 700; }
.mail-conv-name .role-badge { margin-left: 6px; }
.mail-conv-last { color: var(--text-2); font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-conv.unread .mail-conv-last { color: var(--text); }
.mail-conv-side { display: grid; justify-items: end; gap: 4px; }
.mail-conv-side time { color: var(--text-2); font-size: .75rem; white-space: nowrap; }
.mail-new { display: grid; gap: 10px; }
.mail-new input { max-width: 280px; }
.mail-head { border-bottom: 1px solid var(--linie); padding-bottom: 10px; }
.mail-thread { display: flex; flex-direction: column; gap: 10px; max-height: min(60vh, 560px); min-height: 180px; overflow-y: auto; padding: 4px 2px; }
.mail-empty { margin: auto; }
.mail-msg { max-width: min(78%, 560px); padding: 9px 13px; border-radius: 14px; background: var(--asphalt-2); border: 1px solid var(--linie); }
.mail-msg p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.mail-msg.mine { align-self: flex-end; background: rgba(155, 226, 58, .1); border-color: rgba(155, 226, 58, .35); border-bottom-right-radius: 4px; }
.mail-msg.theirs { align-self: flex-start; border-bottom-left-radius: 4px; }
.mail-meta { margin-top: 4px; color: var(--text-2); font-size: .72rem; display: flex; gap: 10px; align-items: center; }
.mail-msg.mine .mail-meta { justify-content: flex-end; }
.mail-flag { display: inline-flex; align-items: center; gap: 3px; font-size: .72rem; color: var(--text-2); text-decoration: none; opacity: .7; }
.mail-flag:hover { color: var(--rot); opacity: 1; }
.mail-flag .icon, .msg-flag .icon { width: 12px; height: 12px; }
.mail-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.mail-form textarea { min-height: 3.2em; }
@media (max-width: 720px) {
  .mail-msg { max-width: 92%; }
  .mail-form { grid-template-columns: minmax(0, 1fr); }
}

/* Melden im Chat: dezentes Fähnchen, beim Darüberfahren sichtbar (am Handy immer leicht sichtbar) */
.msg-flag { position: absolute; right: 4px; bottom: 4px; border: 0; background: none; padding: 0 4px; cursor: pointer; color: var(--text-2); opacity: 0; transition: opacity .15s; }
.msg-flag.with-del { right: 22px; }
.msg:hover .msg-flag, .msg-flag:focus-visible { opacity: .8; }
.msg-flag:hover { color: var(--rot); opacity: 1; }
@media (hover: none) { .msg-flag { opacity: .45; } }

/* ---------- Fenster (Melden) ---------- */
.modal-back { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(4, 6, 7, .72); backdrop-filter: blur(2px); }
.modal { width: min(460px, 100%); box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.modal .form { display: grid; gap: 10px; }

/* ---------- Meldungen (Verwaltung) ---------- */
.item.report { align-items: start; }
.report-body { display: grid; gap: 6px; min-width: 0; }
.report-content { margin: 0; padding: 8px 12px; border-left: 3px solid var(--rot); background: var(--nacht); border-radius: 0 8px 8px 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .9rem; }
.report-actions { display: grid; gap: 6px; justify-items: stretch; }
.report-done summary { cursor: pointer; color: var(--text-2); font-weight: 600; }
@media (max-width: 720px) {
  .item.report { grid-template-columns: minmax(0, 1fr); }
  .report-actions { display: flex; flex-wrap: wrap; }
}

/* ---------- Erfolge ---------- */
:root { --t-bronze: #d08a4e; --t-silber: #c9d2d6; --t-gold: #ffc93c; --t-platin: #7fe3ff; --t-legende: #ff5fb4; }
.badge.gold { background: var(--bernstein); color: #1a1205; }
.title-tag { display: inline-block; color: var(--bernstein); font-style: italic; font-weight: 600; letter-spacing: .01em; }
.title-tag.small { margin-left: 8px; font-size: .78rem; }
.msg-title { margin: 0 2px 0 5px; color: var(--bernstein); font-size: .72rem; font-style: italic; opacity: .9; }
.ach-summary .ach-count { font-family: var(--display); font-size: 2.2rem; line-height: 1; color: var(--bernstein); }
.ach-summary { min-width: 0; }
.ach-summary select { flex: 1 1 180px; width: 100%; max-width: 380px; min-width: 0; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 12px; }
.ach-card {
  display: grid; gap: 8px; align-content: start; padding: 14px 16px; border-radius: var(--radius);
  background: var(--asphalt); border: 1px solid var(--linie); border-top: 3px solid var(--linie-hell);
}
.ach-card.t-bronze { border-top-color: var(--t-bronze); }
.ach-card.t-silber { border-top-color: var(--t-silber); }
.ach-card.t-gold { border-top-color: var(--t-gold); }
.ach-card.t-platin { border-top-color: var(--t-platin); }
.ach-card.t-legende { border-top-color: var(--t-legende); box-shadow: 0 0 18px rgba(255, 95, 180, .25); }
.ach-card.ready { border-color: rgba(255, 178, 56, .7); box-shadow: 0 0 18px rgba(255, 178, 56, .25); }
.ach-card .meta { color: var(--text-2); font-size: .84rem; }
.ach-card .btn { justify-self: start; }
.ach-top { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.ach-now { font-size: .9rem; }
.ach-now b { color: var(--bernstein); font-style: italic; }
.ach-goal { display: grid; gap: 2px; font-size: .84rem; }
.ach-goal.done { color: var(--gift); font-weight: 600; }
.ach-bar { height: 7px; border-radius: 4px; background: var(--asphalt-3); overflow: hidden; }
.ach-bar > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #c7801a, var(--bernstein)); }
.ach-bar.full > i { width: 100%; box-shadow: 0 0 10px rgba(255, 178, 56, .6); }
.ach-pips { display: inline-flex; gap: 3px; flex: none; }
.ach-pips i { width: 10px; height: 10px; border-radius: 50%; background: var(--asphalt-3); border: 1px solid var(--linie-hell); }
.ach-pips i.on.bronze { background: var(--t-bronze); border-color: var(--t-bronze); }
.ach-pips i.on.silber { background: var(--t-silber); border-color: var(--t-silber); }
.ach-pips i.on.gold { background: var(--t-gold); border-color: var(--t-gold); box-shadow: 0 0 6px rgba(255, 201, 60, .6); }
.ach-pips i.on.platin { background: var(--t-platin); border-color: var(--t-platin); box-shadow: 0 0 6px rgba(127, 227, 255, .6); }
.ach-pips i.on.legende { background: var(--t-legende); border-color: var(--t-legende); box-shadow: 0 0 8px rgba(255, 95, 180, .7); }
.ach-mini { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(190px, 100%), 1fr)); gap: 8px 16px; }
.ach-mini-item { display: flex; align-items: center; gap: 10px; font-size: .86rem; }
.ach-mini-item.none { color: var(--text-2); }
