/* Schriften liegen auf unserem Server (SIL Open Font License, siehe public/fonts): so geht beim Laden keine IP-Adresse an Dritte */
@font-face { font-family: 'Onest'; font-style: normal; font-display: swap; font-weight: 100 900; src: url('/fonts/onest-latin-wght-normal.woff2') format('woff2-variations'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Onest'; font-style: normal; font-display: swap; font-weight: 100 900; src: url('/fonts/onest-latin-ext-wght-normal.woff2') format('woff2-variations'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-display: swap; font-weight: 200 800; src: url('/fonts/bricolage-grotesque-latin-opsz-normal.woff2') format('woff2-variations'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-display: swap; font-weight: 200 800; src: url('/fonts/bricolage-grotesque-latin-ext-opsz-normal.woff2') format('woff2-variations'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

:root {
  --bg: #0b0c10;
  --bg-2: #0f1117;
  --surface: #13151c;
  --surface-2: #191c25;
  --surface-3: #20242f;
  --border: #242836;
  --border-strong: #323849;
  --text: #eef0f5;
  --text-2: #b9bdca;
  --muted: #7d8396;
  --accent: #ff6b3d;
  --accent-2: #ffb36b;
  --accent-soft: rgba(255, 107, 61, .12);
  --accent-ring: rgba(255, 107, 61, .35);
  --blue: #6c8cff;
  --green: #3fd38a;
  --red: #ff5470;
  --yellow: #ffc24b;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 12px 32px -12px rgba(0,0,0,.6);
  --font: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Bricolage Grotesque', var(--font);
  --sidebar: 272px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.02em; line-height: 1.1; margin: 0; }
p { margin: 0; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.boot { display: grid; place-items: center; height: 100vh; }
.spinner {
  width: 28px; height: 28px; border-radius: 50%;
  border: 3px solid var(--surface-3); border-top-color: var(--accent);
  animation: spin .7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--border-strong); background: var(--surface-2);
  font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .1s, box-shadow .15s;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn svg { width: 18px; height: 18px; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #ff8a4c);
  border-color: transparent; color: #1a1205; /* Weiß auf Orange erreicht nur 2,8:1, das hier 6,5:1 */
  box-shadow: 0 8px 24px -8px var(--accent-ring);
}
.btn-primary:hover { background: linear-gradient(135deg, #ff7a50, #ff9a5e); box-shadow: 0 10px 28px -8px rgba(255,107,61,.55); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { color: var(--red); }
.btn-danger:hover { background: rgba(255,84,112,.1); border-color: rgba(255,84,112,.35); }
.btn-lg { height: 50px; padding: 0 24px; font-size: 16px; border-radius: 12px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-icon { width: 36px; padding: 0; height: 36px; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 68px; padding: 0 clamp(16px, 4vw, 40px);
  background: rgba(11,12,16,.72); backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid rgba(36,40,54,.6);
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.brand-mark { width: 34px; height: 34px; }
.topbar nav { display: flex; align-items: center; gap: 6px; }
.lang-select { height: 34px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); font: 600 13px var(--font); cursor: pointer; }
.user-chip {
  display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px 4px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  cursor: pointer; position: relative;
}
.user-chip img, .avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-3); object-fit: cover; }
.user-chip span { font-weight: 600; font-size: 14px; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 200px;
  background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 12px;
  padding: 6px; box-shadow: var(--shadow); animation: rise .15s ease-out; z-index: 40;
}
.menu a, .menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 8px;
  background: none; border: 0; cursor: pointer; text-align: left; font-size: 14px; color: var(--text-2);
}
.menu a:hover, .menu button:hover { background: var(--surface-3); color: var(--text); }
.menu svg { width: 16px; height: 16px; }

/* ---------- Landing ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(64px, 12vw, 140px) clamp(16px, 4vw, 40px) 80px;
  text-align: center;
}
.hero::before {
  content: ''; position: absolute; inset: -40% -10% auto; height: 120%;
  background:
    radial-gradient(40% 40% at 50% 30%, rgba(255,107,61,.28), transparent 70%),
    radial-gradient(30% 30% at 75% 50%, rgba(108,140,255,.16), transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(60% 60% at 50% 30%, #000 30%, transparent 75%);
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px;
  border: 1px solid var(--border-strong); border-radius: 999px; background: rgba(19,21,28,.7);
  font-size: 13px; color: var(--text-2); margin-bottom: 28px;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(63,211,138,.15); }
.hero h1 { font-size: clamp(44px, 8vw, 92px); font-weight: 800; max-width: 14ch; margin: 0 auto; }
.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--accent) 10%, var(--accent-2) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead { max-width: 560px; margin: 24px auto 36px; color: var(--text-2); font-size: clamp(16px, 2vw, 19px); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.hero-stats {
  display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(24px, 6vw, 72px); margin-top: 64px;
}
.hero-stats div { text-align: center; }
.hero-stats strong { display: block; font-family: var(--display); font-size: 36px; font-weight: 800; letter-spacing: -.03em; }
.hero-stats span { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }

.section { max-width: 1180px; margin: 0 auto; padding: 40px clamp(16px, 4vw, 40px) 100px; }
.section-head { text-align: center; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(30px, 4vw, 46px); }
.section-head p { color: var(--muted); margin-top: 12px; }
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.feature {
  padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
  transition: border-color .2s, transform .2s;
}
.feature:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.feature .ico {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 16px;
}
.feature .ico svg { width: 22px; height: 22px; }
.feature h3 { font-size: 19px; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: 14px; }
.footer { border-top: 1px solid var(--border); padding: 28px; text-align: center; color: var(--muted); font-size: 13px; }

/* ---------- Server-Auswahl ---------- */
.page { max-width: 1180px; margin: 0 auto; padding: 48px clamp(16px, 4vw, 40px) 80px; animation: rise .25s ease-out; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 32px; }
.page-head h1 { font-size: clamp(30px, 4vw, 42px); }
.page-head p { color: var(--muted); margin-top: 8px; }
.guild-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.guild-card {
  position: relative; overflow: hidden; border-radius: 18px; background: var(--surface); border: 1px solid var(--border);
  display: flex; flex-direction: column; transition: border-color .2s, transform .2s;
}
.guild-card:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.guild-card .banner { height: 96px; position: relative; overflow: hidden; background: var(--surface-2); }
.guild-card .banner img { position: absolute; inset: -20px; width: calc(100% + 40px); height: calc(100% + 40px); object-fit: cover; filter: blur(22px) saturate(1.4); opacity: .55; }
.guild-card .icon {
  width: 64px; height: 64px; border-radius: 18px; margin: -36px 0 0 18px; position: relative;
  border: 4px solid var(--surface); background: var(--surface-3); object-fit: cover;
  display: grid; place-items: center; font-weight: 700; font-size: 20px; color: var(--text-2);
}
.guild-card .body { padding: 12px 18px 18px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.guild-card h2 { font-family: var(--font); font-size: 16px; font-weight: 700; letter-spacing: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guild-card .btn { margin-top: auto; }
.guild-card.inactive .icon { filter: grayscale(.8); opacity: .7; }

/* ---------- Dashboard-Layout ---------- */
.dash { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: calc(100vh - 68px); }
.sidebar {
  position: sticky; top: 68px; height: calc(100vh - 68px); overflow-y: auto;
  border-right: 1px solid var(--border); background: var(--bg-2); padding: 18px 14px 28px;
  scrollbar-width: thin;
}
.guild-switch {
  display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border); margin-bottom: 18px;
}
.guild-switch .gicon { width: 40px; height: 40px; border-radius: 12px; background: var(--surface-3); flex: none; display: grid; place-items: center; font-weight: 700; overflow: hidden; }
.guild-switch strong { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guild-switch small { color: var(--muted); font-size: 12px; }
.guild-switch > div { min-width: 0; flex: 1; }
.nav-label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; padding: 14px 12px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px;
  color: var(--text-2); font-weight: 500; font-size: 14px; transition: background .12s, color .12s;
}
.nav-item svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.nav-item:hover { background: var(--surface); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); }
.nav-item.active svg { opacity: 1; }
.nav-item .badge.premium { margin-left: auto; }
.nav-item .badge.premium + .state { margin-left: 8px; }
.nav-item .state { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--surface-3); }
.nav-item .state.on { background: var(--green); box-shadow: 0 0 0 3px rgba(63,211,138,.12); }
.nav-item .state.on.warn { background: #fee75c; box-shadow: 0 0 0 3px rgba(254,231,92,.15); }
.main { padding: 32px clamp(16px, 3.5vw, 48px) 140px; min-width: 0; animation: rise .2s ease-out; }
.main-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.main-head h1 { font-size: 30px; display: flex; align-items: center; gap: 12px; }
.main-head p { color: var(--muted); margin-top: 6px; max-width: 640px; }
.menu-toggle { display: none; }

/* ---------- Cards & Formulare ---------- */
.stack { display: flex; flex-direction: column; gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.invite-hint { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px;
  border-color: var(--accent-ring); background: linear-gradient(var(--accent-soft), var(--accent-soft)), var(--surface); }
.invite-hint h2 { font-family: var(--font); font-size: 16px; font-weight: 700; letter-spacing: 0; }
.invite-hint p { color: var(--muted); font-size: 13px; margin-top: 3px; }
.invite-hint-actions { display: flex; gap: 8px; align-items: center; }
.tv-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 10px; }
.tv-action { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px solid var(--border); cursor: pointer; }
.tv-action > svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.tv-action .switch { flex: none; }
.tv-action b { display: block; font-size: 13px; font-weight: 600; }
.tv-action small { color: var(--muted); font-size: 12px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.card-head h2 { font-family: var(--font); font-size: 16px; font-weight: 700; letter-spacing: 0; }
.card-head p { color: var(--muted); font-size: 13px; margin-top: 3px; }
.card.disabled-module .card-body { opacity: .45; pointer-events: none; filter: saturate(.4); }
.fields { display: grid; gap: 18px; }
.fields.cols { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > label, .field-label { font-size: 14px; font-weight: 600; color: var(--text); }
.hint { font-size: 12px; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; height: 42px; padding: 0 13px; border-radius: var(--radius-sm);
  background: var(--bg-2); border: 1px solid var(--border-strong);
  transition: border-color .15s, box-shadow .15s; outline: none;
}
.textarea { height: auto; min-height: 92px; padding: 11px 13px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.select {
  appearance: none; cursor: pointer; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%237d8396' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.select option, .select optgroup { background: var(--surface-2); }
.input-color { display: flex; gap: 10px; align-items: center; }
.input-color input[type=color] { width: 42px; height: 42px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--bg-2); padding: 4px; cursor: pointer; }
.vars { display: flex; flex-wrap: wrap; gap: 6px; }
.img-pick { display: inline-flex; gap: 6px; }
.img-pick .var { display: inline-flex; align-items: center; gap: 5px; }
.img-pick .var[hidden] { display: none; }
.img-pick svg { width: 13px; height: 13px; }
/* Ticket-Modul: nummerierte Schritte, Panel mit Vorschau rechts */
.step-title { display: inline-flex; align-items: center; gap: 10px; }
.step-num { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--accent-soft); color: var(--accent); flex: none; }
.tk .card-head { margin-bottom: 14px; }
.tk > .segmented, .tk .card-body > .segmented { align-self: flex-start; justify-self: start; width: fit-content; }
.tk .card-body.fields, .tk .fields { gap: 14px; }
.tk-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 14px 18px; align-items: start; }
.tk-content { grid-area: 1 / 1; }
.tk-send { grid-area: 2 / 1; }
.tk-preview { grid-area: 1 / 2 / span 2; position: sticky; top: 76px; display: grid; gap: 14px; }
.tk-design { width: 100%; }
.tk-preview .preview { width: 100%; box-sizing: border-box; }
.tk-color > .fields { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
@media (max-width: 960px) {
  .tk-split { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; }
  .tk-content { grid-area: 1 / 1; } .tk-preview { grid-area: 2 / 1; position: static; } .tk-send { grid-area: 3 / 1; }
}
.with-preview { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 16px; align-items: stretch; }
.with-preview > .textarea { grid-area: 1 / 1; min-height: 120px; }
.with-preview > .preview { grid-area: 1 / 2; margin: 0; }
.with-preview > .vars { grid-area: 2 / 1; }
@media (max-width: 960px) {
  .with-preview { grid-template-columns: minmax(0, 1fr); }
  .with-preview > .preview { grid-area: 3 / 1; }
}
.var {
  font: 500 12px/1 ui-monospace, 'Cascadia Code', monospace; padding: 5px 8px; border-radius: 6px;
  background: var(--surface-3); border: 1px solid var(--border-strong); color: var(--accent-2); cursor: pointer;
}
.var:hover { border-color: var(--accent); }

/* Toggle */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 4px 0; }
.switch-row .t { font-weight: 600; font-size: 14px; }
.switch-row .hint { margin-top: 2px; }

/* AutoMod: Trennlinie zwischen Filtern, Einstellungen leicht eingerückt unter ihrem Schalter */
.filter-group + .filter-group { border-top: 1px solid var(--border); padding-top: 14px; }
.filter-sub { display: grid; gap: 12px; margin: 10px 0 2px; padding-left: 18px; }
.filter-sub .switch-row { justify-content: flex-start; } /* Zusatzoption: Schalter direkt hinter dem Text, Hauptschalter bleiben rechts */
.filter-sub[hidden] { display: none; }
.switch { position: relative; width: 44px; height: 26px; flex: none; cursor: pointer; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch span {
  position: absolute; inset: 0; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--border-strong);
  transition: background .18s, border-color .18s; pointer-events: none;
}
.switch span::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; transition: transform .2s cubic-bezier(.3,1.4,.5,1); box-shadow: 0 2px 6px rgba(0,0,0,.35);
}
.switch input:checked + span { background: var(--accent); border-color: var(--accent); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Segmented control */
.segmented { display: inline-flex; padding: 4px; gap: 4px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border-strong); flex-wrap: wrap; }
.segmented button { border: 0; background: none; padding: 7px 14px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.segmented button.on { background: var(--surface-3); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.4); }

/* Rollen-/Kanal-Picker */
.picker { position: relative; }
.picker-box {
  min-height: 42px; padding: 5px 6px; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px solid var(--border-strong);
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center; cursor: text;
}
.picker-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.picker-box input { flex: 1; min-width: 100px; border: 0; background: none; outline: none; height: 30px; padding: 0 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 9px; border-radius: 7px;
  background: var(--surface-3); font-size: 13px; font-weight: 500; max-width: 100%;
}
.chip i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.chip button { border: 0; background: none; cursor: pointer; color: var(--muted); padding: 0 2px; display: grid; }
.chip button:hover { color: var(--red); }
.chip button svg { width: 14px; height: 14px; }
.dropdown {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); max-height: 260px; overflow-y: auto; z-index: 20;
  background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 12px; padding: 6px; box-shadow: var(--shadow);
}
.dropdown button {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border: 0; background: none;
  border-radius: 8px; cursor: pointer; text-align: left; font-size: 14px;
}
.dropdown button:hover, .dropdown button.hl { background: var(--surface-3); }
.dropdown button i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dropdown .create { color: var(--accent); font-weight: 600; }
.dropdown .create svg { width: 14px; height: 14px; }
/* hidden schlägt sonst gegen display-Regeln (Suche in Auswahllisten, ausgeblendete Felder und Bilder) */
.dropdown [hidden], .field[hidden], .dc-embed img[hidden] { display: none !important; }
.dropdown button:disabled { opacity: .45; cursor: not-allowed; }
.fselect { position: relative; min-width: 0; }
.input-row .fselect { flex: 1; }
.fselect-btn { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; }
.fselect-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fselect-btn:disabled { opacity: .6; cursor: default; }
.fselect-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.fselect-search { height: 36px; margin-bottom: 6px; }
.fselect-label { padding: 8px 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.dropdown .empty { padding: 10px; color: var(--muted); font-size: 13px; }
.dropdown .warn { margin-left: auto; font-size: 11px; color: var(--yellow); }

/* Listen-Editor */
.rows { display: flex; flex-direction: column; gap: 10px; }
.row-item {
  display: grid; gap: 10px; align-items: end; padding: 14px; border-radius: 12px;
  background: var(--bg-2); border: 1px solid var(--border); animation: rise .18s ease-out;
}
.row-item.reward { grid-template-columns: 120px 1fr auto; }
.row-item.creator { grid-template-columns: 2fr 1fr auto; }
.creator-card { display: grid; gap: 12px; padding: 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border); }
.creator-card .row-item.creator { padding: 0; background: none; border: 0; }
.creator-card .tv-action { background: var(--surface); }
.input-row { display: flex; gap: 8px; }
.card-preview { width: 100%; max-width: 520px; aspect-ratio: 1024 / 450; border-radius: 12px; background: var(--bg-2); object-fit: cover; }
/* Warnfenster (askConfirm) */
.confirm-back { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(0,0,0,.55); animation: rise .12s ease-out; }
.confirm-box { width: min(100%, 420px); display: grid; gap: 14px; justify-items: center; text-align: center; padding: 24px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.confirm-box p { margin: 0; color: var(--text-2); line-height: 1.5; }
.confirm-icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,84,112,.12); color: var(--red); }
.confirm-icon svg { width: 22px; height: 22px; }
.bp-box { width: min(100%, 680px); text-align: left; justify-items: stretch; }
.bp-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 12px; }
.bp-side { max-height: 55vh; overflow: auto; padding: 10px 8px; border-radius: 10px; background: #2b2d31; color: #949ba4; font-size: 14px; }
.bp-name { padding: 0 8px 10px; margin-bottom: 6px; border-bottom: 1px solid #1f2023; color: #f2f3f5; font-weight: 600; }
.bp-cat { margin-top: 14px; }
.bp-cat-name { display: flex; align-items: center; gap: 2px; padding: 0 4px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; }
.bp-cat-name svg { width: 12px; height: 12px; }
.bp-chan { display: flex; align-items: center; gap: 6px; padding: 5px 8px; margin-left: 4px; border-radius: 4px; overflow: hidden; }
.bp-chan span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bp-chan svg { width: 18px; height: 18px; flex: none; }
.bp-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
@media (max-width: 600px) { .bp-grid { grid-template-columns: 1fr; } }
.confirm-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.input-row .input, .input-row .select, .input-row .picker { flex: 1; min-width: 0; }
.creator-card.inactive > :not(.hint) { opacity: .5; }
@media (max-width: 800px) { .row-item.creator { grid-template-columns: 1fr; } }
.badge.premium { background: linear-gradient(90deg, #f5b544, #ff6b3d); color: #1a1205; font-size: 10px; padding: 1px 6px; vertical-align: 1px; }
.row-item.escalation { grid-template-columns: 140px 1fr 150px auto; }
@media (max-width: 600px) { .row-item.escalation { grid-template-columns: 1fr 1fr; } }
.row-item.responder { grid-template-columns: 1fr 1fr 150px auto; }
.empty-state { text-align: center; padding: 28px 16px; color: var(--muted); border: 1px dashed var(--border-strong); border-radius: 12px; font-size: 14px; }

/* Panels */
.panel-card { border: 1px solid var(--border); border-radius: 14px; background: var(--bg-2); padding: 18px; }
.panel-card + .panel-card { margin-top: 14px; }

/* Reaction-Role-Panels */
.rr-panel { border: 1px solid var(--border); border-radius: 14px; background: var(--bg-2); }
.rr-panel.open { border-color: var(--border-strong); }
.rr-panel.paused .rr-panel-head .grow { opacity: .5; }
.social-section { margin-top: 6px; padding-bottom: 6px; border-bottom: 1px solid var(--border); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.social-section:first-child { margin-top: 0; }
.rr-panel-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; flex-wrap: wrap; }
.rr-panel-head .grow { flex: 1; min-width: 160px; }
.rr-panel-head small { display: block; color: var(--muted); font-size: 13px; }
.rr-editor { padding: 16px 18px 18px; border-top: 1px solid var(--border); }
.rr-option { display: grid; gap: 10px; padding: 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.rr-option-head { display: flex; gap: 8px; align-items: center; }
.rr-option-head .input { flex: 1; min-width: 0; }
.rr-option-head .select { width: 130px; flex: none; }
.range { width: 100%; accent-color: var(--accent); }
.choice-list { display: grid; gap: 8px; }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; }
.choice.on { border-color: var(--accent); background: var(--accent-soft); }
.choice input { accent-color: var(--accent); margin-top: 3px; }
.choice strong { display: block; font-size: 14px; }
.choice span { color: var(--muted); font-size: 13px; }

/* Emoji-Auswahl */
.emoji-wrap { position: relative; }
.emoji-btn { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--bg-2); color: var(--muted); font-size: 22px; cursor: pointer; padding: 0; }
.emoji-btn:hover { border-color: var(--accent); color: var(--text); }
.emoji-btn svg { width: 20px; height: 20px; }
.emoji-img { width: 24px; height: 24px; object-fit: contain; }
.emoji-pop { position: absolute; top: 48px; left: 0; z-index: 60; width: min(360px, 90vw); background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: var(--shadow); animation: rise .15s ease-out; }
.emoji-head { display: flex; gap: 8px; padding: 10px; border-bottom: 1px solid var(--border); }
.emoji-list { max-height: 320px; overflow-y: auto; padding: 6px 10px 10px; }
.emoji-sec { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 8px 2px 4px; }
.emoji-list [hidden] { display: none !important; }
.emoji-empty { font-size: 13px; color: var(--muted); padding: 2px 2px 6px; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.emoji-grid button { aspect-ratio: 1; display: grid; place-items: center; font-size: 22px; background: none; border: 0; border-radius: 8px; cursor: pointer; padding: 0; }
.emoji-grid button:hover { background: var(--surface-3); }

/* Embed-Editor (sieht aus wie das Embed in Discord) */
.embed-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.embed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.embed-card {
  border-radius: 18px; background: var(--surface); border: 1px solid var(--border); padding: 0; overflow: hidden;
  display: flex; flex-direction: column; text-align: left; color: inherit; font: inherit; cursor: pointer; transition: border-color .2s, transform .2s;
}
.embed-card:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.embed-card-prev { margin: 14px 14px 0; height: 96px; display: flex; gap: 10px; padding: 10px 12px; border-radius: 6px; background: #2b2d31; border-left: 4px solid var(--accent); overflow: hidden; }
.embed-card-prev .grow { flex: 1; min-width: 0; }
.embed-card-prev strong { display: block; font-size: 14px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.embed-card-prev p { margin-top: 4px; font-size: 13px; color: #b5bac1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.embed-card-prev img { width: 52px; height: 52px; border-radius: 4px; object-fit: cover; flex: none; }
.embed-card .body { padding: 12px 18px 16px; display: grid; gap: 4px; }
.embed-card h2 { font-family: var(--font); font-size: 16px; font-weight: 700; letter-spacing: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.embed-card small { color: var(--muted); font-size: 13px; }
.embed-card.new { min-height: 180px; align-items: center; justify-content: center; gap: 8px; flex-direction: row; border-style: dashed; color: var(--muted); font-weight: 600; }
.embed-card.new:hover { color: var(--accent); border-color: var(--accent); }
.embed-card.new svg { width: 20px; height: 20px; }
.embed-bar .select { flex: 1 1 220px; width: auto; }
.ed-embed { max-width: 620px; background: #2b2d31; border-left: 4px solid var(--accent); border-radius: 6px; padding: 14px; display: grid; gap: 12px; }
.ed-embed .input, .ed-embed .textarea { background: #1e1f22; }
.ed-embed .input.et { font-weight: 700; }
.ed-colors { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.swatch { width: 20px; height: 20px; border-radius: 50%; border: 2px solid rgba(255,255,255,.15); cursor: pointer; padding: 0; }
.ed-colors input[type=color] { width: 28px; height: 28px; border: 0; background: none; padding: 0; cursor: pointer; }
.ed-top { display: grid; grid-template-columns: 1fr 80px; gap: 12px; align-items: start; }
.ed-row { display: flex; gap: 8px; align-items: center; }
.ed-row > .input { flex: 1; min-width: 0; }
.img-slot { display: grid; place-items: center; border: 1px dashed var(--border-strong); background: #1e1f22; color: var(--muted); cursor: pointer; overflow: hidden; padding: 0; }
.img-slot:hover { border-color: var(--accent); color: var(--text); }
.img-slot img { width: 100%; height: 100%; object-fit: cover; }
.img-slot svg { width: 20px; height: 20px; }
.img-slot.round { width: 36px; height: 36px; border-radius: 50%; flex: none; }
.img-slot.thumb { width: 80px; height: 80px; border-radius: 8px; }
.img-slot.wide { height: 120px; border-radius: 8px; }
.img-slot.wide img { object-fit: contain; }
.img-wrap { position: relative; display: grid; }
.img-wrap.round { flex: none; }
.img-slot:disabled { opacity: .5; cursor: progress; }
.img-clear { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: 0; padding: 0; display: grid; place-items: center; background: var(--red); color: #fff; cursor: pointer; }
.img-clear svg { width: 12px; height: 12px; }
.ed-fields { display: flex; flex-wrap: wrap; gap: 10px; }
.ed-fields:empty { display: none; }
.ed-field { flex: 1 1 100%; display: grid; gap: 6px; padding: 10px; border-radius: 8px; background: rgba(0,0,0,.15); }
.ed-field.inline { flex: 1 1 170px; }
.ed-field-actions { display: flex; justify-content: space-between; align-items: center; }
.check { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--text-2); cursor: pointer; white-space: nowrap; }
.embed-split { display: grid; grid-template-columns: minmax(0, 620px) minmax(320px, 1fr); gap: 24px; align-items: start; }
.embed-split.rr-split { grid-template-columns: minmax(0, 1fr) minmax(320px, 460px); }
@media (max-width: 1200px) { .embed-split, .embed-split.rr-split { grid-template-columns: 1fr; } .preview-col { position: static; } }
.preview-col { position: sticky; top: 84px; display: grid; gap: 8px; }
.dc-embed { grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; max-width: 520px; }
.dc-main { display: grid; gap: 8px; min-width: 0; }
/* Rollen-Auswahl unter der Nachricht (Reaction-Roles-Vorschau) */
.dc-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; max-width: 520px; }
.dc-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 16px; border-radius: 8px; font-size: 14px; font-weight: 500; color: #fff; background: #4e5058; }
.dc-btn.primary { background: #5865f2; } .dc-btn.success { background: #248046; } .dc-btn.danger { background: #da373c; }
.dc-btn svg { width: 16px; height: 16px; }
.dc-btn .emoji-img, .dc-select-menu .emoji-img, .dc-reaction .emoji-img { width: 18px; height: 18px; }
.dc-select-wrap { margin-top: 8px; max-width: 400px; }
.dc-select { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; border-radius: 8px; background: #1e1f22; color: #949ba4; font-size: 14px; }
.dc-select svg { width: 16px; height: 16px; }
.dc-select-menu { margin-top: 4px; border-radius: 8px; background: #2b2d31; border: 1px solid #1e1f22; padding: 4px; }
.dc-select-menu div { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 4px; color: #dbdee1; font-size: 14px; }
.dc-reactions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.dc-reaction { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 8px; background: rgba(88,101,242,.15); border: 1px solid #5865f2; color: #dee0fc; font-size: 14px; }
.dc-embed .ea { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: #fff; }
.dc-embed .ea img { width: 24px; height: 24px; border-radius: 50%; }
.dc-embed .et.link { color: #00a8fc; }
.dc-embed .eth { width: 80px; height: 80px; object-fit: cover; border-radius: 4px; }
.dc-embed .eim, .dc-embed .ef { grid-column: 1 / -1; }
.dc-embed .eim { max-width: 100%; }
.dc-embed .ef { display: flex; align-items: center; gap: 8px; }
.dc-embed .ef img { width: 20px; height: 20px; border-radius: 50%; }
.efs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ef-field { grid-column: 1 / -1; min-width: 0; }
.ef-field.inline { grid-column: auto; }
.efn { font-size: 14px; font-weight: 700; color: #fff; }
.panel-buttons { display: grid; gap: 8px; }
.panel-buttons .pbtn { display: grid; grid-template-columns: 1fr 42px 1fr 130px auto; gap: 8px; align-items: center; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { padding: 18px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); position: relative; overflow: hidden; }
.stat .label { color: var(--muted); font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.stat .label svg { width: 16px; height: 16px; color: var(--accent); }
.stat .value { font-family: var(--display); font-size: 32px; font-weight: 800; letter-spacing: -.03em; margin-top: 6px; }
.stat .sub { font-size: 12px; color: var(--muted); }
.chart { width: 100%; height: 200px; display: block; }
.chart .bar { fill: var(--accent); transition: opacity .15s; }
.chart .bar.b { fill: var(--blue); }
.chart .bar:hover { opacity: .75; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .grid { stroke: var(--border); stroke-dasharray: 3 4; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); }
.legend span::before { content: ''; display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; background: var(--accent); }
.legend span.b::before { background: var(--blue); }
.list { display: flex; flex-direction: column; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.list-row:last-child { border-bottom: 0; }
.list-row svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
.list-row .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row small { color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-3); color: var(--text-2); }
.badge.on { background: rgba(63,211,138,.12); color: var(--green); }
.badge.accent { background: var(--accent-soft); color: var(--accent); }
/* Moderationsfälle: Konsequenz als farbiges Badge, gelöschte Nachricht darunter */
.case-row { align-items: flex-start; }
.case-row.expired > :not(button) { opacity: .5; }
/* Mitglieder mit Verwarnungen: Zeile zum Aufklappen, darunter ihre Verwarnungen */
.warned-user { width: 100%; background: none; border: 0; border-bottom: 1px solid var(--border); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.warned-user:hover { background: var(--bg-2); }
.warned-user .avatar { width: 32px; height: 32px; flex: none; }
.warned-user .grow small { display: block; color: var(--muted); font-size: 12px; }
.warned-user > svg { width: 16px; height: 16px; flex: none; transition: transform .15s; }
.warned-user[aria-expanded="true"] > svg { transform: rotate(180deg); }
.warned-details { padding-left: 44px; }
.case-row .badge { flex: none; margin-top: 1px; }
.case-row .grow { white-space: normal; }
.case-head { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.case-msg { display: flex; gap: 8px; margin-top: 4px; color: var(--muted); font-size: 13px; min-width: 0; }
.case-msg span { flex: none; color: var(--text-2); }
.case-msg q { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-style: italic; }
.badge.case-warn { background: rgba(254,231,92,.12); color: #fee75c; }
.badge.case-timeout { background: var(--accent-soft); color: var(--accent); }
.badge.case-kick, .badge.case-ban { background: rgba(255,84,112,.12); color: var(--red); }
.badge.case-unban, .badge.case-untimeout { background: rgba(63,211,138,.12); color: var(--green); }

/* Commands */
.cmd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.cmd { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border); }
.cmd code { font: 600 14px ui-monospace, 'Cascadia Code', monospace; color: var(--text); }
.cmd p { font-size: 12px; color: var(--muted); margin-top: 2px; }
.cmd > div { flex: 1; min-width: 0; }

/* Discord-Vorschau */
.preview { background: #313338; border-radius: 12px; padding: 16px; display: flex; gap: 14px; font-family: 'gg sans', var(--font); }
.preview .pav { width: 40px; height: 40px; border-radius: 50%; flex: none; background: var(--surface-3); }
.preview .meta { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 6px; }
.preview .tag { background: #5865f2; color: #fff; font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 4px; }
.preview .content { white-space: pre-wrap; word-break: break-word; color: #dbdee1; margin-top: 2px; }
.dc-embed { margin-top: 6px; max-width: 480px; background: #2b2d31; border-left: 4px solid var(--accent); border-radius: 4px; padding: 10px 14px 14px; display: grid; gap: 8px; }
.dc-embed .et { font-weight: 700; color: #fff; }
.dc-embed .ed { font-size: 14px; color: #dbdee1; white-space: pre-wrap; word-break: break-word; }
.preview strong { color: #fff; }
.preview .pv-icon { width: 18px; height: 18px; vertical-align: -3px; margin-left: 6px; }
.dc-embed img { border-radius: 4px; max-height: 300px; }
.dc-embed .ef { font-size: 12px; color: #b5bac1; }

/* Leaderboard */
.lb-head { display: flex; align-items: center; gap: 18px; margin-bottom: 32px; }
.lb-head .gicon { width: 72px; height: 72px; border-radius: 20px; background: var(--surface-3); display: grid; place-items: center; font-size: 24px; font-weight: 700; overflow: hidden; flex: none; }
.lb { display: flex; flex-direction: column; gap: 8px; }
.lb-row {
  display: grid; grid-template-columns: 48px 44px 1fr minmax(120px, 220px) 90px; gap: 16px; align-items: center;
  padding: 12px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border);
}
.lb-row .pos { font-family: var(--display); font-weight: 800; font-size: 20px; color: var(--muted); text-align: center; }
.lb-row.p1 .pos { color: #ffd166; } .lb-row.p2 .pos { color: #cfd6e4; } .lb-row.p3 .pos { color: #e3a27a; }
.lb-row.p1 { border-color: rgba(255,209,102,.35); background: linear-gradient(90deg, rgba(255,209,102,.07), var(--surface) 50%); }
.lb-row .avatar { width: 44px; height: 44px; }
.lb-row .who { min-width: 0; }
.lb-row .who strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-row .who small { color: var(--muted); }
.progress { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress div { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.lb-row .lvl { text-align: right; }
.lb-row .lvl strong { font-family: var(--display); font-size: 22px; font-weight: 800; display: block; line-height: 1; }
.lb-row .lvl small { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }

/* Save-Bar */
.savebar {
  position: fixed; left: 50%; bottom: 24px; z-index: 50; transform: translate(-50%, 140%);
  display: flex; align-items: center; gap: 16px; padding: 10px 10px 10px 20px; width: min(680px, calc(100% - 32px));
  background: rgba(25,28,37,.92); backdrop-filter: blur(12px); border: 1px solid var(--border-strong); border-radius: 14px;
  box-shadow: 0 20px 50px -10px rgba(0,0,0,.7); transition: transform .3s cubic-bezier(.3,1.3,.5,1);
}
.savebar.show { transform: translate(-50%, 0); }
.savebar p { flex: 1; font-weight: 600; font-size: 14px; }
.savebar.shake { animation: shake .4s; }
@keyframes shake { 25% { transform: translate(-51%, 0); } 75% { transform: translate(-49%, 0); } }

/* Toasts */
#toasts { position: fixed; top: 84px; right: 20px; z-index: 100; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px; min-width: 240px; max-width: 360px;
  background: var(--surface-2); border: 1px solid var(--border-strong); box-shadow: var(--shadow); font-size: 14px; font-weight: 500;
  animation: rise .2s ease-out; pointer-events: auto;
}
.toast svg { width: 18px; height: 18px; flex: none; }
.toast.ok svg { color: var(--green); }
.toast.err svg { color: var(--red); }
.toast.out { opacity: 0; transform: translateX(10px); transition: .25s; }

.skeleton { background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--radius); }
@keyframes shimmer { to { background-position: -200% 0; } }

.center-msg { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 24px; }
.center-msg h1 { font-size: 34px; margin-bottom: 10px; }
.center-msg p { color: var(--muted); margin-bottom: 24px; }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .dash { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; top: 68px; left: 0; bottom: 0; width: min(300px, 86vw); height: auto; z-index: 25;
    transform: translateX(-100%); transition: transform .25s ease; box-shadow: 20px 0 50px rgba(0,0,0,.5);
  }
  .sidebar.open { transform: none; }
  .menu-toggle { display: inline-flex; }
  .row-item.reward, .row-item.responder { grid-template-columns: 1fr 1fr; }
  .embed-split { grid-template-columns: 1fr; }
  .preview-col { position: static; }
  .ed-top { grid-template-columns: 1fr; }
  .ed-row { flex-wrap: wrap; }
  .row-item > .btn { justify-self: end; }
  .panel-buttons .pbtn { grid-template-columns: 1fr 1fr; }
  .lb-row { grid-template-columns: 36px 40px 1fr 64px; }
  .lb-row .progress { display: none; }
  .user-chip span { display: none; }
}

/* Premium: Limits und gesperrte Funktionen im Dashboard */
.limit-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.backup-row { flex-wrap: wrap; }
.member-search { position: relative; flex: 1; min-width: 220px; }
.member-results { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); max-height: 320px; overflow-y: auto; padding: 4px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .55); }
.member-results button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.member-results button:hover, .member-results button:focus-visible { background: var(--surface-2); outline: none; }
.member-results small { color: var(--muted); }
.member-results .hint { padding: 8px 10px; }
.backup-row .grow { min-width: 160px; }
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; max-height: 620px; overflow-y: auto; padding-right: 4px; }
.game-row { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; }
.game-row[hidden] { display: none; }
.game-row.on { border-color: var(--accent); }
.game-row:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.game-row img, .game-letter { flex: none; width: 62px; height: 29px; border-radius: 5px; object-fit: cover; background: var(--bg-2); }
.game-letter { display: grid; place-items: center; font-weight: 700; color: var(--muted); }
.game-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.hint-link { text-decoration: underline; text-underline-offset: 2px; }
.hint-link:hover { color: var(--text); }
.card > .hint-link { display: inline-block; margin-top: 12px; }
.footer-link { margin-right: 16px; white-space: nowrap; display: inline-block; }
.footer-copy { display: inline-block; }
::placeholder { color: #8f95a8; opacity: 1; } /* --muted erreicht auf den helleren Flächen nur 4,1:1 */
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 12px; z-index: 70; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--surface-3); }
main:focus { outline: none; }
.footer-button { padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
button.nav-item { width: 100%; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; }
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60; max-width: 640px; max-height: calc(100vh - 32px); margin: 0 auto; padding: 16px; overflow: hidden auto; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface-2); box-shadow: var(--shadow); }
.consent p { margin: 0 0 12px; color: var(--text-2); font-size: 14px; }
.consent-settings { display: grid; gap: 10px; margin-bottom: 12px; justify-items: stretch; }
.consent-settings[hidden] { display: none; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.consent-actions .btn { flex: 1 1 140px; }
.locked { opacity: .5; }
.row-item.paused > :not(.hint) { opacity: .5; }
.row-paused { grid-column: 1 / -1; }
.bot-profile { display: flex; align-items: flex-start; gap: 18px; flex-wrap: wrap; }
.bot-profile > .field, .bot-profile > :last-child { flex: 1 1 260px; min-width: 0; }
.img-slot.bot-avatar, .img-wrap.bot-avatar { flex: none; width: 72px; height: 72px; border-radius: 50%; }
.img-clear[hidden] { display: none; }
.img-slot.bot-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Premium-Seite: eine Vergleichstabelle; je höher die Stufe, desto größer und heißer die Flamme (Rot → Gold) */
.premium { max-width: 1180px; margin: 0 auto; padding: clamp(40px, 7vw, 76px) clamp(16px, 4vw, 40px) 72px; }
.premium h1 { font-size: clamp(38px, 6.4vw, 72px); font-weight: 800; line-height: 1.02; letter-spacing: -.03em; max-width: 15ch; }
.premium-lead { max-width: 58ch; margin-top: 22px; color: var(--text-2); font-size: clamp(16px, 2vw, 18px); }
.premium-status { display: flex; align-items: baseline; gap: 10px; margin-top: 12px; color: var(--text-2); font-size: 14px; }
.premium-status .dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 4px rgba(255,194,75,.15); transform: translateY(-1px); }
.premium-note { margin-top: 22px; color: var(--text-2); font-size: 13px; line-height: 1.6; }

.plan-0 { --n: 0; --heat: #d9472f; --flame: 26px; --core: .25; }
.plan-1 { --n: 1; --heat: #ff6b3d; --flame: 36px; --core: .45; }
.plan-2 { --n: 2; --heat: #ff9a3d; --flame: 48px; --core: .65; }
.plan-3 { --n: 3; --heat: #ffc24b; --flame: 62px; --core: .9; }

.plans { display: grid; grid-template-columns: minmax(200px, 1.25fr) repeat(4, minmax(0, 1fr)); margin-top: 40px; }
.plan, .plan-labels { display: grid; grid-row: 1 / -1; grid-template-rows: subgrid; min-width: 0; }
.plan-head { display: flex; flex-direction: column; align-items: flex-start; padding: 0 16px 22px 0; }
.plan-labels .plan-head { justify-content: flex-end; }
.plan-flame { display: flex; align-items: flex-end; height: 92px; margin-bottom: 14px; }
.plan-flame svg {
  display: block; width: var(--flame); overflow: visible; fill: var(--heat);
  filter: drop-shadow(0 0 calc(var(--flame) / 3) color-mix(in srgb, var(--heat) 55%, transparent));
  transform-origin: 50% 100%; animation: flame-rise .55s cubic-bezier(.2, .9, .3, 1.15) backwards; animation-delay: calc(var(--n) * 90ms);
}
.plan-flame .core { fill: #fff1d6; opacity: var(--core); }
@keyframes flame-rise { from { transform: scale(.3); opacity: 0; } }
.plan-head h2 { font-size: 20px; font-weight: 700; }
.plan-price { margin-top: 10px; }
.plan-price strong { display: block; font-family: var(--display); font-size: clamp(30px, 3.2vw, 40px); font-weight: 800; line-height: 1.05; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.plan-price span { color: var(--muted); font-size: 13px; }
.plan-head small { min-height: 18px; color: var(--text-2); font-size: 13px; }
.plan-head p { flex: 1; margin: 12px 0 16px; color: var(--muted); font-size: 13.5px; line-height: 1.4; }
.plan-head .btn { width: 100%; max-width: 190px; padding: 0 10px; }
.plan-row { position: relative; display: flex; align-items: center; min-height: 50px; padding: 12px 16px 12px 0; border-top: 1px solid var(--border); font-size: 14px; }
.plan-labels .plan-row { color: var(--text-2); }
.row-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.row-value { font-weight: 600; font-variant-numeric: tabular-nums; }
.row-value svg { display: block; width: 18px; height: 18px; color: var(--text-2); }
.row-value.no { color: var(--muted); font-weight: 400; }
.row-value.new, .row-value.new svg { color: var(--heat); }

@media (max-width: 860px) {
  .plans { display: block; }
  .plan-labels { display: block; }
  .plan-labels .plan-row { display: none; }
  .plan-labels .plan-head { padding: 0 0 8px; }
  .plan { display: block; margin-top: 36px; }
  .plan-head { padding-right: 0; }
  .plan-flame { height: auto; }
  .plan-head .btn { max-width: none; }
  .plan-row { justify-content: space-between; gap: 16px; padding-right: 0; }
  .row-name { position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; color: var(--text-2); font-weight: 400; }
  .row-value { flex: none; max-width: 45%; text-align: right; }
}
@media (max-width: 560px) { .topbar-premium { display: none; } }

/* Rechtstexte */
.legal { max-width: 860px; }
.legal h1 { font-size: clamp(30px, 5vw, 44px); font-weight: 800; }
.legal > .hint { margin-top: 8px; }
.legal h2 { margin: 36px 0 10px; font-size: 20px; font-weight: 700; }
.legal p, .legal li { max-width: 72ch; color: var(--text-2); line-height: 1.65; }
.legal p { margin: 10px 0; }
.legal ul { margin: 10px 0; padding-left: 20px; }
.legal li { margin: 8px 0; }
.legal-table { margin: 14px 0; overflow-x: auto; }
.legal-table table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 14px; line-height: 1.5; }
.legal-table th, .legal-table td { padding: 10px 12px 10px 0; border-top: 1px solid var(--border); text-align: left; vertical-align: top; color: var(--text-2); }
.legal-table thead th { border-top: 0; color: var(--muted); font-weight: 600; }
.legal-table tbody th { color: var(--text); font-weight: 600; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.mini-switch { display: flex; align-items: center; gap: 8px; }
.share-code { padding: 4px 8px; border-radius: 6px; background: var(--surface-2); font-size: 14px; letter-spacing: .04em; }
.creator-step { display: flex; gap: 10px; align-items: flex-start; }
.creator-step .step-num { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; }
.choice-list.cols { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.choice.locked { opacity: .6; cursor: default; }

/* Kontaktformular */
.contact-form { display: grid; gap: 14px; max-width: 640px; margin-top: 20px; }
.contact-form .field { margin: 0; }
.contact-form textarea.input { min-height: 180px; height: auto; resize: vertical; }
.contact-consent { display: flex; gap: 10px; align-items: flex-start; line-height: 1.5; }
.contact-consent input { margin-top: 4px; flex: none; }
.contact-form .btn { justify-self: start; }
