/* Rose – hell, klar, mit Schwarz und kräftigem Rot (Gestaltung nach Referenz: helle Flächen, Pillen,
   schwarze Panels, Akzentfarbe Rot statt Neongrün). Alle Farben als Variablen. */
@font-face { font-family: 'Manrope'; src: url('/fonts/manrope-latin.woff2') format('woff2'); font-weight: 200 800; font-display: swap; 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: 'Manrope'; src: url('/fonts/manrope-latin-ext.woff2') format('woff2'); font-weight: 200 800; font-display: swap; 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: 'Inter'; src: url('/fonts/inter.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #e9e9ec;          /* Grundfläche (hellgrau) */
  --bg-2: #f3f3f6;        /* Felder, leise Flächen */
  --surface: #ffffff;     /* Karten */
  --surface-2: #f3f3f6;   /* Hover, Chips */
  --surface-3: #e8e8eb;
  --line: #ededf0;
  --line-2: #e1e1e4;
  --text: #0a0a10;
  --muted: #55555b;
  --faint: #66666c;
  --ph: #a3a3a9;          /* Platzhalter in Feldern */
  --ink: #0a0a10;         /* schwarze Panels und Knöpfe */
  --ink-2: #1b1b21;
  --ink-text: #f4f4f7;
  --ink-muted: #9b9ba1;
  --rose: #ec0b7a;        /* Akzent: Knöpfe, Zahlen auf Schwarz, Markierungen */
  --rose-hover: #ec0b7a;
  --rose-2: #8d114e;      /* Akzent als Schrift auf Weiß (lesbar) */
  --rose-deep: #68133d;
  --rose-soft: rgba(236, 11, 122, 0.12);
  --rose-glow: rgba(236, 11, 122, 0.32);
  --on-rose: #0a0a10;     /* Schrift auf Rot: schwarz (wie im Vorbild auf Neongrün) */
  --leaf: #7c1246;
  --ok: #5a1436;
  --warn: #3d3d43;
  --err: #7a1245;
  --radius: 30px;
  --radius-s: 18px;
  --shadow: 0 18px 50px rgba(10, 10, 16, 0.14);
  --shadow-s: 0 1px 2px rgba(10, 10, 16, 0.04), 0 4px 14px rgba(10, 10, 16, 0.04);
  --sans: 'Manrope', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: var(--sans); /* früher Zierschrift – jetzt überall die klare Schrift */
  --side: 260px;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 500 15px/1.55 var(--sans);
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--rose-2); text-decoration: none; font-weight: 600; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--sans); font-weight: 800; letter-spacing: -0.025em; margin: 0 0 0.4em; line-height: 1.15; }
h1 { font-size: 34px; line-height: 1.08; }
h2 { font-size: 24px; }
h3 { font-size: 18px; letter-spacing: -0.015em; }
p { margin: 0 0 0.8em; }
b, strong { font-weight: 700; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-weight: 500; }
.ico { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
::selection { background: var(--rose-glow); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 10px; }
::placeholder { color: var(--ph); opacity: 1; }

/* ---------- Aufbau ---------- */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
/* Menü links: schwarzes Panel (wie die dunklen Flächen im Vorbild) */
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px;
  padding: 22px 14px 18px; background: var(--ink); color: var(--ink-text); border-right: 0;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 10px 26px; }
.brand img { width: 42px; height: 42px; border-radius: 13px; }
.brand b { font-family: var(--sans); font-size: 26px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; color: #fff; }
.brand small { display: block; color: var(--ink-muted); font-size: 12px; letter-spacing: 0; margin-top: 4px; font-weight: 600; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 0 16px; min-height: 48px; border-radius: 999px; color: var(--ink-muted); font-weight: 600; position: relative;
}
.nav a:hover { background: var(--ink-2); color: #fff; text-decoration: none; }
.nav a.on { background: var(--rose); color: var(--on-rose); font-weight: 800; }
.nav a.on .ico { color: var(--on-rose); }
.nav .badge { margin-left: auto; }
.side-foot { margin-top: auto; padding: 10px; display: flex; align-items: center; gap: 10px; color: #fff; border-radius: 22px; background: var(--ink-2); }
.side-foot:hover { text-decoration: none; background: #24242a; }
.side-foot:hover .who b { color: #fff; }
/* Profilbild bzw. Initialen */
.av { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; overflow: hidden; color: #fff; font-weight: 700; font-size: 13px; flex: none; background: var(--ink); line-height: 1; user-select: none; }
.av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av.side-av { width: 38px; height: 38px; }
.av.big { width: 120px; height: 120px; font-size: 40px; box-shadow: 0 0 0 6px var(--bg-2); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; font-weight: 700; font-size: 14px; flex: none; }
.side-foot .who { min-width: 0; flex: 1; }
.side-foot .who b { display: block; font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.side-foot .who span { color: var(--ink-muted); font-size: 12px; font-weight: 600; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 18px 28px;
  background: rgba(233, 233, 233, 0.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 0;
}
.top h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.035em; margin: 0; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* runde Knöpfe in der Kopfzeile: weiß wie der Zurück-Knopf im Vorbild */
.top > .btn.ghost.icon, .top > .bell { width: 46px; height: 46px; border-radius: 50%; background: var(--surface); color: var(--text); box-shadow: var(--shadow-s); }
.top > .btn.ghost.icon:hover, .top > .bell:hover { background: var(--surface); color: var(--text); box-shadow: 0 0 0 2px var(--ink) inset; }
.page { padding: 8px 28px 60px; max-width: none; width: 100%; }
.page.full { max-width: none; padding: 0; display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
/* Seiten mit eigenem Verlauf (Chat, Nachrichten): genau so hoch wie der SICHTBARE Bildschirm –
   die Eingabe sitzt immer unten über der Menüleiste, egal wie hoch Kopfzeile oder Adressleiste sind */
.main:has(> .page.full) { height: 100vh; height: 100dvh; overflow: hidden; }

/* ---------- Bausteine ---------- */
.card { background: var(--surface); border: 0; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-s); }
.card + .card { margin-top: 16px; }
.card h2, .card h3 { display: flex; align-items: center; gap: 10px; }
.card h3 .ico, .card h2 .ico { color: var(--text); }
.grid { display: grid; gap: 16px; }
/* Karten in Rastern und Reihen: der Abstand kommt vom gap – nie zusätzlich von oben, sonst steht die erste
   Karte höher als die anderen. Alles auf einer Höhe. */
:is(.grid, .row, .stack, .ag-list, .ev-grid, .rw-grid, .inv-groups, .nw-feed, .rw-pending) > .card + .card { margin-top: 0; }
.card + .grid { margin-top: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.spacer { flex: 1; }

/* Kennzahl: große, fette Zahl (wie „13min“ im Vorbild) */
.stat { padding: 20px 22px; }
.stat .label { color: var(--muted); font-size: 13px; letter-spacing: 0; text-transform: none; font-weight: 600; }
.stat .value { font-family: var(--sans); font-size: 40px; font-weight: 800; letter-spacing: -0.045em; line-height: 1.05; margin-top: 6px; }
.stat .delta { font-size: 13px; margin-top: 2px; }
.up { color: var(--ok); }
.down { color: var(--err); }

/* Knöpfe: Pillen. primary = Rot mit schwarzer Schrift (wie „Continue“), Standard = hellgrau (wie „Office“) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 999px;
  border: 0; background: var(--surface-2); color: var(--text); font: 700 14.5px var(--sans); cursor: pointer; white-space: nowrap; letter-spacing: -0.005em;
  transition: background 0.15s, box-shadow 0.15s, transform 0.05s, color 0.15s;
}
.btn:hover { background: var(--surface-3); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn.primary { background: var(--rose); color: var(--on-rose); box-shadow: none; font-weight: 800; }
.btn.primary:hover { background: var(--rose-hover); }
.btn.dark { background: var(--ink); color: #fff; }
.btn.dark:hover { background: var(--ink-2); }
.btn.ghost { background: transparent; color: var(--text); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.danger { color: var(--err); }
.btn.small { height: 38px; padding: 0 15px; font-size: 13.5px; border-radius: 999px; }
.btn.icon { width: 46px; padding: 0; border-radius: 50%; }
.btn.small.icon { width: 38px; }
.btn.primary.icon { background: var(--rose); color: var(--on-rose); }

label.field, div.field { display: flex; flex-direction: column; gap: 7px; font-size: 13.5px; color: var(--muted); font-weight: 600; }
/* Felder: Pillen in Hellgrau, ohne Rahmen (wie „Current location“) */
input, select, textarea {
  width: 100%; background: var(--bg-2); color: var(--text); border: 0; border-radius: 999px; padding: 12px 20px; min-height: 50px; font: 600 15px var(--sans);
  transition: box-shadow 0.15s, background 0.15s;
}
select { appearance: none; -webkit-appearance: none; padding-right: 46px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23181818' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 20px center; cursor: pointer; }
input:focus, select:focus, textarea:focus { outline: none; background-color: #fff; box-shadow: 0 0 0 2px var(--ink); }
textarea { resize: vertical; min-height: 100px; line-height: 1.5; border-radius: 24px; padding: 14px 20px; }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; min-height: 0; padding: 0; accent-color: var(--ink); flex: none; }
input[type=range] { padding: 0; background: transparent; accent-color: var(--rose); min-height: 0; }
input[type=file] { border-radius: 18px; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; }
.hint { font-size: 12.5px; color: var(--faint); font-weight: 500; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--text); border: 0; white-space: nowrap; }
h1 .badge, h2 .badge, h3 .badge { font-family: var(--sans); letter-spacing: 0; vertical-align: middle; }
.badge.rose { background: var(--rose-soft); color: var(--rose-deep); }
.badge.ok { background: #fbc8e1; color: var(--ok); }
.badge.warn { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.badge.err { background: #fbcde4; color: var(--err); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rose); display: inline-block; }

table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; font-size: 12.5px; letter-spacing: 0; text-transform: none; color: var(--faint); font-weight: 700; padding: 8px 12px; border-bottom: 1px solid var(--line); }
table.list td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list tbody tr:last-child td { border-bottom: 0; }
table.list tr.click { cursor: pointer; }
table.list tr.click:hover td { background: var(--bg-2); }
.table-wrap { overflow-x: auto; }
select { max-width: 100%; }
.row > select, .row > input { min-width: 0; }

/* Reiter: Pillen (wie „Office · Home · Airport“), gewählt = schwarz */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; border-bottom: 0; margin-bottom: 18px; }
.tabs button { background: var(--surface); border: 0; color: var(--text); font: 700 14px var(--sans); padding: 0 18px; min-height: 42px; border-radius: 999px; cursor: pointer; white-space: nowrap; box-shadow: var(--shadow-s); }
.tabs button:hover { background: var(--surface-3); }
.tabs button.on { background: var(--ink); color: #fff; }

.empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty img { width: 64px; height: 64px; margin-bottom: 10px; border-radius: 18px; }
.divider-rose { height: 1px; background: var(--line); margin: 20px 0; border: 0; }

/* Aufkleber (wie „JUST RIDE.“) */
.sticker { display: inline-block; background: var(--rose); color: var(--on-rose); font: italic 800 15px/1 var(--sans); letter-spacing: -0.01em; text-transform: uppercase; padding: 8px 16px; border-radius: 999px; transform: rotate(-12deg); box-shadow: 0 6px 18px rgba(236, 11, 122, 0.3); }

/* ---------- Mitteilungen, Fenster ---------- */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 100; display: flex; flex-direction: column; gap: 10px; max-width: min(420px, calc(100vw - 36px)); }
.toast { background: var(--ink); color: var(--ink-text); border: 0; border-radius: 22px; padding: 14px 18px 14px 40px; box-shadow: var(--shadow); animation: rise 0.2s ease-out; position: relative; font-weight: 600; }
.toast::before { content: ''; position: absolute; left: 18px; top: 20px; width: 9px; height: 9px; border-radius: 50%; background: var(--rose); }
.toast.ok::before { background: #c70d69; }
.toast.error::before { background: #ec0b7a; }
.toast b { display: block; margin-bottom: 2px; color: #fff; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(10, 10, 16, 0.38); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: grid; place-items: center; padding: 18px; animation: fade 0.15s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(640px, 100%); max-height: calc(100vh - 36px); overflow: auto; background: var(--surface); border: 0; border-radius: 34px; padding: 28px; box-shadow: var(--shadow); position: relative; }
.modal.wide { width: min(980px, 100%); }
.modal h2 { margin-bottom: 16px; font-size: 28px; letter-spacing: -0.035em; }
.modal .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; flex-wrap: wrap; }

.approval { position: fixed; left: 50%; transform: translateX(-50%); bottom: 22px; z-index: 90; width: min(640px, calc(100vw - 24px)); background: var(--ink); color: var(--ink-text); border: 0; border-radius: 28px; padding: 14px 14px 14px 18px; box-shadow: var(--shadow); display: flex; gap: 12px; align-items: center; }
.approval .txt { flex: 1; min-width: 0; }
.approval .muted { color: var(--ink-muted); }
.approval .ico { color: var(--rose); }
.approval .btn.ghost { color: #fff; }
.approval .btn.ghost:hover { background: var(--ink-2); }

.bell { position: relative; }
.bell .n { position: absolute; top: -2px; right: -2px; min-width: 20px; height: 20px; border-radius: 10px; background: var(--rose); color: var(--on-rose); font-size: 12px; font-weight: 800; display: grid; place-items: center; padding: 0 5px; border: 2px solid var(--surface); }
.drop { position: absolute; right: 24px; top: 76px; width: min(400px, calc(100vw - 24px)); max-height: 70vh; overflow: auto; background: var(--surface); border: 0; border-radius: 28px; box-shadow: var(--shadow); z-index: 50; padding: 10px; }
.drop .item { padding: 12px 14px; border-radius: 18px; }
.drop .item:hover { background: var(--bg-2); }
.drop .item b { display: block; }

/* ---------- Chat with Rose ---------- */
.chat { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.msgs { flex: 1; overflow-y: auto; padding: 18px 28px 10px; display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: min(760px, 88%); padding: 14px 18px; border-radius: 26px; line-height: 1.6; overflow-wrap: anywhere; font-weight: 500; }
.msg.me { align-self: flex-end; background: var(--ink); color: var(--ink-text); border: 0; border-bottom-right-radius: 10px; }
.msg.me .meta { color: var(--ink-muted); }
.msg.rose { align-self: flex-start; background: var(--surface); border: 0; border-bottom-left-radius: 10px; box-shadow: var(--shadow-s); }
.msg .meta { font-size: 12px; color: var(--faint); margin-top: 6px; font-weight: 600; }
.msg p:last-child { margin-bottom: 0; }
.msg table { border-collapse: collapse; margin: 8px 0; font-size: 14px; }
.msg th, .msg td { border: 0; border-bottom: 1px solid var(--line); padding: 7px 12px; }
.msg th { font-size: 12.5px; color: var(--faint); }
.msg table { display: block; max-width: 100%; overflow-x: auto; }
.msg th, .msg td { overflow-wrap: normal; word-break: normal; }
.msg .al-right, .msg .al-center { white-space: nowrap; }
.msg pre { background: var(--bg-2); padding: 12px; border-radius: 16px; overflow-x: auto; }
.msg .code-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--faint); }
.msg .code-head button { background: none; border: 0; color: var(--muted); cursor: pointer; }
.steps { align-self: flex-start; display: flex; flex-direction: column; gap: 4px; max-width: min(760px, 88%); }
.step { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; font-weight: 600; }
.step .ico { width: 15px; height: 15px; }
.step.run .ico { color: var(--rose-2); animation: spin 1.2s linear infinite; }
.step.ok .ico { color: var(--ok); }
.step.bad .ico { color: var(--err); }
@keyframes spin { to { transform: rotate(360deg); } }
.typing { align-self: flex-start; display: flex; gap: 5px; padding: 14px 16px; }
.typing i { width: 8px; height: 8px; border-radius: 50%; background: var(--rose); animation: pulse 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: 0.2s; }
.typing i:nth-child(3) { animation-delay: 0.4s; }
@keyframes pulse { 0%, 100% { opacity: 0.25; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1); } }
/* Eingabe: weiße Leiste, Feld als Pille, Senden als roter Kreis */
.composer { padding: 12px 28px 22px; border-top: 0; background: transparent; }
.composer .box { display: flex; gap: 8px; align-items: flex-end; background: var(--surface); border: 0; border-radius: 32px; padding: 8px 8px 8px 22px; box-shadow: var(--shadow-s); }
.composer .box:focus-within { box-shadow: 0 0 0 2px var(--ink); }
.composer textarea { border: 0; background: transparent; box-shadow: none; min-height: 30px; max-height: 200px; padding: 10px 0; resize: none; border-radius: 0; }
.composer textarea:focus { box-shadow: none; background: transparent; }
/* Start des Chats: Begrüßung wie im Dashboard, darunter Vorschläge als Liste */
.hello { margin: auto; width: 100%; max-width: 700px; padding: 12px 0; display: flex; flex-direction: column; gap: 14px; }
.hello-hero { border-radius: 34px; padding: 26px 28px 28px; color: #fff; background: radial-gradient(700px 320px at 85% -10%, rgba(255, 255, 255, 0.16), transparent 60%), linear-gradient(160deg, #7a7a80 0%, #45454b 55%, #1f1f25 100%); box-shadow: var(--shadow-s); }
.hello-hero .sticker { margin: 4px 0 0 2px; }
.hello-hero h2 { display: block; font-size: 46px; line-height: 1; letter-spacing: -0.05em; margin: 24px 0 12px; color: #fff; }
.hello-hero h2 > span { display: block; }
.hello-hero h2 .red { color: var(--rose); }
.hello-hero p { margin: 0; color: rgba(255, 255, 255, 0.86); font-weight: 600; max-width: 520px; }
.hello-list { display: flex; flex-direction: column; gap: 2px; background: var(--surface); border-radius: var(--radius); padding: 14px 10px 10px; box-shadow: var(--shadow-s); }
.hello-label { font-size: 12.5px; color: var(--faint); font-weight: 800; padding: 0 12px 6px; }
.hello-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 8px 16px 8px 8px; border: 0; border-radius: 999px; background: transparent; color: var(--text); font: 700 15px var(--sans); text-align: left; cursor: pointer; }
.hello-item:hover { background: var(--bg-2); }
.hello-item .hello-q { flex: 1; min-width: 0; }
.hello-item > .ico { width: 18px; height: 18px; color: var(--faint); }
.hello-ico { width: 42px; height: 42px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; flex: none; }
.hello-ico .ico { width: 18px; height: 18px; color: #fff; }
.hello-item:hover .hello-ico { background: var(--rose); }
.hello-item:hover .hello-ico .ico { color: var(--on-rose); }
@media (max-width: 760px) {
  .hello { padding: 4px 0; }
  .hello-hero { padding: 20px 18px 22px; border-radius: 30px; }
  .hello-hero h2 { font-size: 34px; margin-top: 20px; }
}
.chat-setup { flex: 1; display: grid; place-items: center; padding: 24px 16px; overflow: auto; }
.chat-setup .card { max-width: 540px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 32px; }
.chat-setup img { width: 80px; height: 80px; border-radius: 24px; box-shadow: 0 16px 40px rgba(10, 10, 16, 0.16); }
.chat-setup h2 { font-size: 30px; margin: 6px 0 0; letter-spacing: -0.035em; }
/* KI-Zugang */
.ki-status { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: 22px; border: 0; background: var(--bg-2); }
.ki-status > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ki-status .ico { width: 20px; height: 20px; flex: none; margin-top: 2px; }
.ki-status.ok { background: #fbd0e5; }
.ki-status.ok .ico { color: var(--ok); }
.ki-status.warn { background: var(--bg-2); box-shadow: inset 0 0 0 1.5px var(--ink); }
.ki-status.warn .ico { color: var(--warn); }
.ki-keyrow { margin-top: 4px; flex-wrap: wrap; gap: 6px 12px; }
.ki-modelrow { flex-wrap: nowrap; gap: 8px; }
.ki-modelrow > input, .ki-modelrow > select { flex: 1 1 auto; min-width: 0; }
.ki-modelrow > .btn { flex: none; height: 50px; }
.ki-actions { margin-top: 18px; flex-wrap: wrap; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; }
.chip { background: var(--surface); border: 0; color: var(--text); border-radius: 999px; padding: 0 18px; min-height: 44px; cursor: pointer; font: 700 14px var(--sans); box-shadow: var(--shadow-s); }
.chip:hover { background: var(--ink); color: #fff; }

/* ---------- Anmeldung (wie der Startbildschirm im Vorbild) ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(360px, 480px); gap: 0; background: var(--bg); }
.auth-hero {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 14px; padding: 48px 56px;
  background: radial-gradient(900px 600px at 70% 20%, rgba(255, 255, 255, 0.5), transparent 60%), linear-gradient(180deg, #c4c4ca 0%, #9b9ba1 55%, #7d7d83 100%); color: #fff;
}
.auth-hero::before { content: ''; position: absolute; width: 900px; height: 900px; right: -320px; top: -260px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, 0.35), transparent 62%); pointer-events: none; }
.auth-hero .sticker { align-self: flex-start; margin-bottom: 6px; }
.auth-hero h1 { font-size: clamp(44px, 6vw, 84px); line-height: 0.98; letter-spacing: -0.05em; color: #fff; margin: 0; position: relative; }
.auth-hero p { max-width: 460px; color: rgba(255, 255, 255, 0.9); font-weight: 600; margin: 0; position: relative; }
.auth .panel { align-self: center; width: min(440px, calc(100% - 32px)); justify-self: center; background: var(--surface); border: 0; border-radius: 34px; padding: 34px 30px; box-shadow: var(--shadow); position: relative; margin: 24px 0; }
.auth .logo { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 22px; text-align: left; }
.auth .logo img { width: 58px; height: 58px; border-radius: 18px; margin-bottom: 8px; }
.auth .logo b { font-family: var(--sans); font-size: 36px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.auth .logo span { color: var(--muted); font-size: 14px; letter-spacing: 0; text-transform: none; font-weight: 600; }
.auth form { display: flex; flex-direction: column; gap: 14px; }
.auth form .btn.primary { height: 56px; font-size: 16px; }
.auth .err { color: var(--err); font-size: 14px; min-height: 20px; font-weight: 600; }
.qr { display: block; margin: 8px auto; border-radius: 22px; background: #fff; padding: 8px; width: 210px; height: 210px; box-shadow: var(--shadow-s); }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; font-family: ui-monospace, Consolas, monospace; font-size: 15px; background: var(--bg-2); border: 0; border-radius: 22px; padding: 14px; text-align: center; }
@media (max-width: 860px) {
  .auth { grid-template-columns: minmax(0, 1fr); align-content: start; }
  .auth-hero { min-height: 46vh; padding: max(32px, env(safe-area-inset-top)) 24px 70px; }
  .auth-hero::before { width: 520px; height: 520px; right: -200px; top: -160px; }
  .auth .panel { margin: -46px auto 24px; border-radius: 34px; }
}

/* ---------- Handy ---------- */
.tabbar { display: none; }
@media (max-width: 900px) {
  .grid.three, .grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .top { padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top)); flex-wrap: wrap; row-gap: 8px; }
  .top > .row { order: 5; flex-basis: 100%; }
  .top > .row:empty { display: none; }
  .top h1 { font-size: 27px; }
  .top > .btn.ghost.icon, .top > .bell { width: 42px; height: 42px; }
  .page { padding: 6px 14px 110px; }
  .card { padding: 20px; border-radius: 28px; }
  .main:has(> .page.full) { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  /* beim Tippen die Menüleiste ausblenden – Eingabe und Tastatur haben dann den ganzen Platz */
  body:has(.page.full textarea:focus) .tabbar { display: none; }
  body:has(.page.full textarea:focus) .main:has(> .page.full) { padding-bottom: 0; }
  .grid.two, .grid.three { grid-template-columns: 1fr; }
  .grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .msgs { padding: 12px 12px 8px; }
  .msg { max-width: 92%; }
  .composer { padding: 8px 10px 10px; }
  /* Menüleiste unten: schwebende schwarze Pille, gewählt = roter Kreis */
  .tabbar {
    display: flex; position: fixed; left: 10px; right: 10px; bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 40; background: var(--ink);
    border: 0; border-radius: 30px; box-sizing: border-box; height: 64px; padding: 6px; box-shadow: 0 12px 30px rgba(10, 10, 16, 0.25);
  }
  .tabbar a { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; font-size: 11.5px; font-weight: 700; line-height: 1.25; color: var(--ink-muted); padding: 2px; border-radius: 24px; }
  .tabbar a.on { color: var(--on-rose); background: var(--rose); }
  .tabbar a:hover { text-decoration: none; }
  .tabbar .ico { width: 21px; height: 21px; }
  .toasts { bottom: 88px; }
  .approval { bottom: 88px; }
  input, select, textarea { font-size: 16px; }
  /* Fenster als Blatt von unten (mit Griff, wie im Vorbild) */
  .backdrop { place-items: end center; padding: 0; }
  .modal, .modal.wide { width: 100%; max-height: calc(100dvh - 24px); border-radius: 34px 34px 0 0; padding: 30px 18px calc(22px + env(safe-area-inset-bottom)); animation: sheet 0.22s ease-out; }
  .modal::before { content: ''; position: absolute; top: 10px; left: 50%; width: 44px; height: 5px; margin-left: -22px; border-radius: 3px; background: #d6d6d9; }
  .modal .actions .btn { flex: 1 1 auto; }
}
@keyframes sheet { from { transform: translateY(30px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .modal, .toast, .backdrop { animation: none !important; } }

/* ---------- Telefon (Anruf mit Rose, Einstellungen → Telefon) ---------- */
.call-top.on { color: var(--rose-2); background: var(--rose-soft); animation: call-glow 1.6s ease-in-out infinite; }
@keyframes call-glow { 50% { box-shadow: 0 0 18px var(--rose-glow); } }
body.in-call { overflow: hidden; }
.call-screen { --text: #f4f4f7; --muted: #a8a8ae; --faint: #8c8c92; --surface-2: #1c1c22; --surface-3: #28282e; --line: #24242a; --line-2: #2e2e34; --bg: #0a0a10; color: var(--text);
  position: fixed; inset: 0; z-index: 95; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 10px;
  padding: max(22px, env(safe-area-inset-top)) 20px max(26px, env(safe-area-inset-bottom)); text-align: center; overflow-y: auto; animation: fade 0.2s;
  background: radial-gradient(900px 600px at 50% 38%, rgba(236, 11, 122, 0.22), transparent 70%), var(--ink);
}
.call-head { display: flex; align-items: center; gap: 12px; }
.call-head img { width: 44px; height: 44px; border-radius: 14px; }
.call-head b { display: block; font-family: var(--sans); font-size: 28px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; text-align: left; }
.call-time { display: block; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; text-align: left; margin-top: 3px; min-height: 18px; }
.call-orb { flex: 1 1 auto; width: min(440px, 92vw); min-height: 180px; display: grid; place-items: center; }
.call-canvas { width: 100%; max-width: 440px; aspect-ratio: 1; max-height: 52vh; }
.call-state { color: var(--muted); font-size: 15px; min-height: 22px; margin: 0; }
.call-sub { width: min(620px, 100%); min-height: 86px; }
.call-who { display: block; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--rose); font-weight: 800; min-height: 16px; }
.call-said { font-family: var(--sans); font-weight: 700; letter-spacing: -0.02em; font-size: 22px; line-height: 1.35; margin: 4px 0 0; color: var(--text); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.call-said[data-who=du] { color: var(--muted); font-style: italic; }
.call-approval, .call-error { width: min(560px, 100%); display: flex; gap: 12px; align-items: center; text-align: left; padding: 12px 14px; border-radius: 14px; background: #1c1c22; border: 0; border-radius: 22px; }
.call-approval .txt { flex: 1; min-width: 0; }
.call-approval .txt span { display: block; }
.call-error { border-color: rgba(236, 11, 122, 0.4); flex-wrap: wrap; }
.call-error > span { flex: 1; min-width: 180px; font-size: 14px; }
.call-error > .ico { color: var(--warn); }
.call-btns { display: flex; gap: 28px; justify-content: center; align-items: flex-start; padding-bottom: 4px; }
.call-btn { display: flex; flex-direction: column; align-items: center; gap: 7px; background: none; border: 0; padding: 0; color: var(--muted); font: 500 12.5px var(--sans); cursor: pointer; }
.call-ico { width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 0; color: var(--text); transition: background 0.15s, transform 0.05s; }
.call-ico .ico { width: 24px; height: 24px; }
.call-btn:hover .call-ico { background: var(--surface-3); }
.call-btn:active .call-ico { transform: scale(0.96); }
.call-btn.on .call-ico { background: var(--text); color: var(--bg); }
.call-btn.end .call-ico { background: var(--rose); color: var(--on-rose); box-shadow: none; }
.call-btn.accept .call-ico { background: #a21058; color: #0a0a10; box-shadow: none; animation: call-ring 1.3s ease-in-out infinite; }
@keyframes call-ring { 50% { transform: translateY(-2px) rotate(-8deg); } }
.voice-model { display: flex; gap: 14px; align-items: center; justify-content: space-between; padding: 14px 18px; border: 0; border-radius: 22px; background: var(--bg-2); flex-wrap: wrap; }
.voice-model .txt { flex: 1; min-width: 220px; }
.voice-model .txt > .row { margin-top: 6px; }
.voice-bar { flex: 1; min-width: 120px; height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.voice-bar i { display: block; height: 100%; width: 0; background: var(--rose); box-shadow: none; transition: width 0.4s; }
input.voice-rate { padding: 0; height: 28px; min-height: 0; accent-color: var(--rose); background: transparent; border: 0; box-shadow: none; }
@media (prefers-reduced-motion: reduce) { .call-btn.accept .call-ico, .call-top.on { animation: none; } }
@media (max-width: 760px) {
  .call-said { font-size: 19px; }
  .call-btns { gap: 20px; }
  .call-ico { width: 60px; height: 60px; }
}

/* ---------- Team ---------- */
table.list .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.team-back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 12px; min-height: 40px; }
.inv-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 26px 16px; border: 2px dashed #cfcfd2; border-radius: 26px; background: var(--bg-2); cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.inv-drop .ico { width: 26px; height: 26px; color: var(--text); }
.inv-drop:hover, .inv-drop.over { border-color: var(--ink); background: #fff; }
.inv-drop.busy { opacity: 0.6; pointer-events: none; }

/* ---------- Rechnungen ---------- */
.inv-drop { flex-direction: row; text-align: left; justify-content: flex-start; gap: 14px; padding: 18px; }
.inv-drop > div { flex: 1; min-width: 0; }
.inv-badges { gap: 6px; display: inline-flex; vertical-align: middle; }
.card h2 .inv-badges { margin-left: 4px; }
.inv-busy .ico { animation: spin 1.2s linear infinite; width: 13px; height: 13px; }
.inv-actions { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.inv-status > .inv-actions { align-self: stretch; }
.inv-assign { width: auto; height: 46px; min-height: 46px; padding: 0 44px 0 18px; font-size: 14px; }
.inv-findings { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.inv-findings li { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 22px; background: var(--bg-2); border: 0; }
.inv-findings li.lvl-fehler { background: #fde0ee; }
.inv-findings li .badge { flex: none; margin-top: 1px; }
.inv-findings .badge .ico, .inv-badges .badge .ico { width: 13px; height: 13px; }
.inv-grid { margin-top: 16px; }
.inv-grid + .card { margin-top: 16px; }
.inv-field { margin-bottom: 10px; overflow-wrap: anywhere; }
.inv-field .badge { margin-top: 4px; }
.inv-sums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.inv-text { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 420px; overflow: auto; background: var(--bg-2); border: 0; border-radius: 22px; padding: 16px; font-size: 12.5px; }
@media (max-width: 760px) {
  .inv-sums { grid-template-columns: 1fr; }
  .inv-drop { flex-direction: column; text-align: center; }
}

/* ---------- Kalender und Buchung ---------- */
.ico.spin { animation: spin 1.2s linear infinite; }
.ico.rot90 { transform: rotate(90deg); }
.seg { display: inline-flex; background: var(--bg-2); border: 0; border-radius: 999px; padding: 4px; gap: 2px; }
.seg button { background: none; border: 0; color: var(--muted); font: 700 13.5px var(--sans); padding: 6px 16px; min-height: 38px; border-radius: 999px; cursor: pointer; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--ink); color: #fff; box-shadow: none; }

.cal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.cal-layout > .card + .card { margin-top: 0; }
.cal-layout > * { min-width: 0; }
.cal-main { padding: 18px; }
.cal-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.cal-title { flex: 1; margin: 0; font-size: 26px; letter-spacing: -0.035em; min-width: 180px; }
.cal-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); font-weight: 600; padding-top: 12px; border-top: 1px solid var(--line); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend i { width: 10px; height: 10px; border-radius: 50%; background: var(--rose); }
.cal-legend i.buchung, .mo-dots i.buchung { background: var(--ink); }
/* Team-Übersicht: Farbe je Person (--pc kommt aus der Seite) */
.cal-legend i.pc { background: var(--pc); }
.ev.person, .ev-chip.person { border-left-color: var(--pc); background: color-mix(in srgb, var(--pc) 16%, #f6f6f9); }
.mo-dots i.person { background: var(--pc); }
.cal-item.person { border-left-color: var(--pc); }
.cal-whorow { display: flex; align-items: center; gap: 8px; flex-basis: 100%; }
.cal-whorow .ico { width: 18px; height: 18px; color: var(--text); flex: none; }
.cal-who { width: 100%; max-width: 420px; min-width: 0; }

/* Woche */
.wk { border: 1px solid var(--line); border-radius: 22px; overflow: hidden; background: #fff; }
.wk-row { display: grid; grid-template-columns: 58px repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--line); background: var(--surface); }
.wk-gutter { font-size: 12px; color: var(--faint); display: flex; align-items: center; justify-content: flex-end; padding: 0 6px 0 2px; text-align: right; line-height: 1.2; hyphens: manual; overflow-wrap: break-word; min-width: 0; }
.wk-day { padding: 7px 4px; text-align: center; border-left: 1px solid var(--line); }
.wk-day .wd { display: block; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--faint); font-weight: 700; }
.wk-day .dn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-family: var(--sans); font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }
.wk-day.today .wd { color: var(--rose-2); }
.wk-day.today .dn { background: var(--rose); color: var(--on-rose); box-shadow: none; }
.wk-allcell { border-left: 1px solid var(--line); padding: 4px; display: flex; flex-direction: column; gap: 3px; min-height: 30px; min-width: 0; }
.ev-chip { display: block; width: 100%; text-align: left; border: 0; border-left: 3px solid var(--rose); background: #fbd0e5; color: var(--text); border-radius: 10px; padding: 3px 6px; font: 600 12px/1.3 var(--sans); overflow-wrap: anywhere; cursor: pointer; }
.wk-scroll { max-height: min(640px, calc(100vh - 250px)); overflow-y: auto; }
.wk-grid { display: grid; grid-template-columns: 58px repeat(7, minmax(0, 1fr)); }
.wk-hour { height: 44px; position: relative; }
.wk-hour span { position: absolute; top: -8px; right: 6px; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.wk-col {
  position: relative; height: calc(24 * 44px); border-left: 1px solid var(--line); cursor: cell; min-width: 0;
  background-image: linear-gradient(to bottom, var(--line) 1px, transparent 1px), linear-gradient(to bottom, #f7f7fa 1px, transparent 1px);
  background-size: 100% 44px, 100% 44px; background-position: 0 0, 0 22px;
}
.wk-col.today { background-color: rgba(236, 11, 122, 0.035); }
.wk-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--rose); box-shadow: none; z-index: 3; pointer-events: none; }
.wk-now::before { content: ''; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--rose); }
.ev {
  position: absolute; z-index: 2; border: 0; border-left: 3px solid var(--rose); background: #fbd0e5;
  color: var(--text); border-radius: 10px; padding: 3px 7px; text-align: left; font: 600 12px/1.3 var(--sans); overflow: hidden; cursor: pointer;
  display: flex; flex-direction: column; gap: 1px; box-shadow: 0 0 0 1px #fff;
}
.ev:hover { filter: brightness(0.96); }
.ev b { font-weight: 800; overflow-wrap: break-word; hyphens: auto; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; flex: none; }
.ev .ev-time { color: #4a4a50; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: none; }
.ev.tiny .ev-time { display: none; }
.ev { container-type: inline-size; }
.ev .t-short { display: none; }
@container (max-width: 80px) { .ev .t-full { display: none; } .ev .t-short { display: inline; } }
@container (max-width: 46px) { .ev .ev-time { display: none; } }
.ev.buchung, .ev-chip.buchung { border-left-color: var(--ink); background: #e6e6e9; }

/* Monat */
.mo-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; background: var(--line); gap: 1px; }
.mo-wd { background: var(--surface); text-align: center; padding: 9px 0; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--faint); font-weight: 700; }
.mo-cell { background: #fff; border: 0; min-height: 106px; padding: 6px; text-align: left; color: var(--text); cursor: pointer; display: flex; flex-direction: column; gap: 3px; font: 600 13px var(--sans); min-width: 0; }
.mo-cell:hover { background: var(--bg-2); }
.mo-cell.out { color: var(--faint); background: #f7f7fa; }
.mo-cell.sel { box-shadow: inset 0 0 0 2px var(--ink); }
.mo-num { font-weight: 800; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; flex: none; }
.mo-cell.today .mo-num { background: var(--rose); color: var(--on-rose); }
.mo-dots { display: none; gap: 3px; justify-content: center; }
.mo-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--rose); }
.mo-day { margin-top: 16px; }

/* Listen */
.cal-agenda { display: flex; flex-direction: column; gap: 10px; }
.ag-day { border: 0; border-radius: 24px; padding: 12px 14px; background: var(--bg-2); }
.ag-day.today { box-shadow: inset 0 0 0 2px var(--rose); }
.ag-head { display: flex; justify-content: space-between; align-items: center; }
.ag-day.today .ag-head b { color: var(--rose-2); }
.ag-day > p { margin: 0; }
.cal-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: #fff; border: 0; border-left: 4px solid var(--rose); border-radius: 18px; padding: 10px 14px; color: var(--text); font: 14px var(--sans); cursor: pointer; margin-top: 6px; }
.cal-item:hover { background: #ffffff; }
.cal-item .when { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; min-width: 92px; }
.cal-item .what { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cal-item .what b { overflow-wrap: break-word; hyphens: auto; font-weight: 800; }
.cal-item.buchung { border-left-color: var(--ink); }
.cal-form .cal-times { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 10px 12px; }
.cal-person { display: grid; grid-template-columns: 1fr 1.3fr auto; gap: 8px; align-items: center; }
.cal-dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; }
.cal-dl dt { color: var(--faint); font-size: 13px; }
.cal-dl dd { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }


/* Einstellungen: Kalender & Buchung */
.bs-narrow { max-width: 320px; }
.bs-switch { margin: 6px 0 12px; }
.bs-link { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--bg-2); border: 0; border-radius: 26px; padding: 8px 8px 8px 18px; margin-bottom: 14px; }
.bs-link .mono { flex: 1 1 240px; min-width: 0; overflow-wrap: anywhere; color: var(--rose-2); }
.bs-type { border: 0; border-radius: 26px; padding: 16px 18px; background: var(--bg-2); display: flex; flex-direction: column; gap: 10px; }
.bs-type input, .bs-type select, .bs-type textarea { background-color: #fff; }
.bs-type-grid { display: grid; grid-template-columns: minmax(0, 2fr) 120px minmax(170px, 1fr); gap: 10px; }
.bs-type + .bs-type { margin-top: 2px; }
.bs-add { margin-top: 12px; }
.bs-week { display: flex; flex-direction: column; }
.bs-day { display: grid; grid-template-columns: 170px 1fr; gap: 12px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.bs-day:last-child { border-bottom: 0; }
.bs-day .check { padding-top: 8px; }
.bs-day-body { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 40px; }
.bs-wins { display: flex; flex-wrap: wrap; gap: 8px; }
.bs-win { display: flex; align-items: center; gap: 4px; background: var(--bg-2); border: 0; border-radius: 999px; padding: 4px 4px 4px 12px; }
.bs-win input { width: auto; height: 38px; min-height: 38px; padding: 4px 6px; border: 0; background: transparent; border-radius: 999px; }
.bs-save { margin-top: 16px; position: sticky; bottom: 0; padding: 14px 0 6px; background: linear-gradient(transparent, var(--bg) 45%); z-index: 5; }

@media (max-width: 1100px) {
  .cal-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .cal-main { padding: 12px; }
  .cal-title { order: -1; flex-basis: 100%; font-size: 22px; }
  .cal-head .seg { margin-left: auto; }
  .mo-cell { min-height: 52px; padding: 4px 2px; align-items: center; }
  .cal-person { grid-template-columns: 1fr auto; }
  .cal-person input:nth-child(2) { grid-column: 1; }
  .cal-form .cal-times { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
  .top .cs-label { display: none; }
  .cal-item .when { min-width: 78px; }
  .bs-type-grid { grid-template-columns: 1fr 1fr; }
  .bs-type-grid .field:first-child { grid-column: 1 / -1; }
  .bs-day { grid-template-columns: 1fr; gap: 4px; }
  .bs-save { bottom: calc(80px + env(safe-area-inset-bottom)); }
}
/* Team/Rechnungen: Kacheln im Raster ohne Versatz, Abzeichen in Überschriften in der Grundschrift */
.card h2 .inv-badges .badge { font-family: var(--sans); font-size: 12px; letter-spacing: 0; }

/* ---------- Nachrichten (Team-Chat und Direktnachrichten) ---------- */
.nav .nav-count { margin-left: auto; min-width: 22px; justify-content: center; }
.tab-ico { position: relative; display: inline-flex; }
.tab-count { position: absolute; top: -6px; right: -10px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--rose); color: var(--on-rose); font-size: 12px; font-weight: 800; box-shadow: 0 0 0 2px var(--ink); display: grid; place-items: center; }
.msgr { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 16px; padding: 0 28px 22px; }
.msgr-list { border-right: 0; display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-s); overflow: hidden; }
.msgr-head { padding: 18px 18px 10px; }
.msgr-head h2 { font-size: 22px; margin: 0; letter-spacing: -0.03em; }
.msgr-items { flex: 1; overflow-y: auto; padding: 4px 10px 16px; display: flex; flex-direction: column; gap: 2px; }
.msgr-item { min-width: 0; display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 26px; background: transparent; color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.msgr-item:hover { background: var(--bg-2); }
.msgr-item.on { background: var(--ink); color: #fff; }
.msgr-item.on .msgr-prev, .msgr-item.on .msgr-time { color: var(--ink-muted); }
.msgr-item.on.unread .msgr-prev, .msgr-item.on.unread b { color: #fff; }
.msgr-item-txt { flex: 1; min-width: 0; }
.msgr-item-top, .msgr-item-bottom { display: flex; align-items: baseline; gap: 8px; }
.msgr-item-top b { flex: 1; min-width: 0; font-weight: 700; overflow-wrap: anywhere; line-height: 1.3; }
.msgr-time { color: var(--faint); font-size: 12px; flex: none; }
.msgr-prev { flex: 1; min-width: 0; color: var(--muted); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msgr-item.unread .msgr-prev { color: var(--text); }
.msgr-item.unread b { font-weight: 800; }
.msgr-count { flex: none; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--rose); color: var(--on-rose); font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.msgr-av { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #fff; overflow: hidden; }
.msgr-av.team { background: var(--rose); color: var(--on-rose); }
.msgr-av .ico { width: 20px; height: 20px; }
.msgr-av-space { width: 32px; flex: none; }
.msgr-empty-people { padding: 10px; }
.msgr-sec { padding: 0 10px 10px; }
.msgr-group { display: flex; flex-direction: column; }
.msgr-sec-title { display: flex; align-items: center; gap: 7px; padding: 4px 22px 6px; font-size: 12.5px; font-weight: 700; color: var(--faint); }
.msgr-sec-title .ico { width: 15px; height: 15px; }
.msgr-sec-team .msgr-sec-title { padding-left: 12px; padding-right: 12px; }
.msgr-sec-priv { border-top: 1px solid var(--line); margin: 0 20px; padding: 14px 2px 6px; }
.msgr-sec-priv + .msgr-items { padding-top: 0; }
.msgr-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-s); overflow: hidden; }
.msgr-thread-head { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.msgr-thread-head .msgr-av { width: 36px; height: 36px; }
.msgr-thread-title { display: flex; flex-direction: column; min-width: 0; }
.msgr-thread-title b { overflow-wrap: anywhere; line-height: 1.3; }
.msgr-back { display: none; }
.msgr-msgs { flex: 1; overflow-y: auto; padding: 18px 20px 10px; display: flex; flex-direction: column; gap: 4px; }
.msgr-day { text-align: center; margin: 12px 0 8px; }
.msgr-day span { display: inline-block; font-size: 12px; font-weight: 700; color: var(--muted); background: var(--bg-2); border: 0; border-radius: 999px; padding: 4px 14px; }
.msgr-row { display: flex; align-items: flex-end; gap: 8px; max-width: min(680px, 86%); }
.msgr-row:not(.cont) { margin-top: 8px; }
.msgr-row .msgr-av { width: 32px; height: 32px; font-size: 12px; }
.msgr-row.mine { align-self: flex-end; flex-direction: row-reverse; }
.msgr-bubble { position: relative; padding: 10px 14px 7px; border-radius: 22px; background: var(--bg-2); border: 0; border-bottom-left-radius: 8px; min-width: 0; }
.msgr-row.mine .msgr-bubble { background: var(--ink); color: var(--ink-text); border-bottom-left-radius: 22px; border-bottom-right-radius: 8px; }
.msgr-row.mine .msgr-meta, .msgr-row.mine .msgr-del { color: var(--ink-muted); }
.msgr-row.mine .msgr-del:hover { background: var(--ink-2); color: #ec0b7a; }
.msgr-bubble.deleted .msgr-text { color: var(--faint); font-style: italic; }
.msgr-author { font-size: 12.5px; font-weight: 800; color: var(--rose-2); margin-bottom: 2px; }
.msgr-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; font-weight: 500; }
/* Fotos, Videos, Sprachnachrichten */
.msgr-bubble.has-media { padding: 4px 4px 6px; }
.msgr-bubble.has-media .msgr-text, .msgr-bubble.has-media .msgr-author, .msgr-bubble.has-media .msgr-meta { padding: 0 8px; }
.msgr-bubble.has-media .msgr-author { padding-top: 4px; }
.msgr-media { display: block; border-radius: 18px; overflow: hidden; max-width: min(360px, 100%); margin-bottom: 4px; }
.msgr-media.img { padding: 0; border: 0; background: var(--bg-2); cursor: zoom-in; }
.msgr-media.img img { display: block; width: 100%; height: auto; max-height: 420px; object-fit: cover; }
.msgr-media.video { width: min(360px, 100%); max-height: 420px; background: #0a0a10; }
.msgr-media.audio { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 999px; background: rgba(10, 10, 16, 0.05); overflow: visible; max-width: 100%; }
.msgr-row.mine .msgr-media.audio { background: rgba(255, 255, 255, 0.08); }
.msgr-media.audio .ico { width: 18px; height: 18px; color: var(--rose); flex: none; }
.msgr-media.audio audio { height: 36px; width: min(260px, 60vw); min-width: 0; }
.msgr-full { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.msgr-full img { max-width: 100%; max-height: 70vh; border-radius: 22px; }
.msgr-row.pending .msgr-bubble { opacity: 0.85; min-width: 200px; }
.msgr-progress { height: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden; margin: 6px 0 2px; }
.msgr-progress-bar { display: block; height: 100%; width: 0; background: var(--rose); transition: width 0.2s; }
.msgr-tool { flex: none; color: var(--muted); }
.msgr-tool:hover { color: var(--rose-2); }
.msgr-rec { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--bg-2); border: 0; border-radius: 32px; padding: 8px 8px 8px 20px; box-shadow: 0 0 0 2px var(--rose); }
.msgr-rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--rose); animation: rec-pulse 1.2s ease-in-out infinite; flex: none; }
.msgr-rec-label { color: var(--muted); }
.msgr-rec-time { font-variant-numeric: tabular-nums; font-weight: 800; margin-right: auto; }
@keyframes rec-pulse { 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .msgr-rec-dot { animation: none; } }
.msgr-meta { font-size: 12px; color: var(--faint); margin-top: 2px; display: flex; align-items: center; justify-content: flex-end; gap: 6px; min-height: 18px; }
.msgr-del { width: 26px; height: 26px; margin: -5px 0; border-radius: 50%; border: 0; background: transparent; color: var(--faint); display: none; place-items: center; cursor: pointer; flex: none; }
.msgr-del:hover { color: var(--err); background: var(--surface-3); }
.msgr-del .ico { width: 15px; height: 15px; }
.msgr-bubble:hover .msgr-del, .msgr-del:focus-visible { display: grid; }
.msgr-none { margin: auto; text-align: center; color: var(--muted); padding: 30px 16px; }
.msgr-none .ico { width: 34px; height: 34px; color: var(--text); }
.msgr-none.big img { width: 84px; height: 84px; border-radius: 26px; box-shadow: 0 16px 40px rgba(10, 10, 16, 0.16); margin-bottom: 12px; }
.msgr-compose { padding: 10px 14px 14px; border-top: 0; }
.msgr-compose .box { display: flex; gap: 6px; align-items: flex-end; background: var(--bg-2); border: 0; border-radius: 32px; padding: 6px; }
.msgr-compose .box:focus-within { box-shadow: 0 0 0 2px var(--ink); background: #fff; }
.msgr-compose textarea { border: 0; background: transparent; box-shadow: none; min-height: 30px; max-height: 180px; padding: 10px 0; resize: none; border-radius: 0; }
.msgr-compose textarea:focus { box-shadow: none; background: transparent; }
@media (hover: none) { .msgr-del { display: grid; opacity: 0.85; } }
@media (max-width: 760px) {
  .msgr { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0 8px 8px; }
  .msgr-list { border-right: 0; }
  .msgr-main { display: none; }
  .msgr.open .msgr-list { display: none; }
  .msgr.open .msgr-main { display: flex; }
  .msgr-back { display: inline-flex; }
  .msgr-thread-head { padding: 10px 12px; }
  .msgr-msgs { padding: 12px 12px 8px; }
  .msgr-row { max-width: 92%; }
  .msgr-compose { padding: 8px 10px 10px; }
  .msgr-item { padding: 12px 8px; }
}

/* ---------- Feinschliff: Tabellen-Karten, Tipp-Flächen, Ausrichtung ---------- */
.md .al-right, .msg .al-right { text-align: right; }
.md .al-center, .msg .al-center { text-align: center; }
.tabs button { min-height: 40px; }
@media (max-width: 760px) {
  /* Tipp-Flächen mindestens 40 px */
  .btn.small { height: auto; min-height: 40px; padding: 6px 12px; }
  .btn.small.icon { width: 40px; min-width: 40px; padding: 0; }
  .btn.icon { width: 40px; min-width: 40px; }
  .chip { min-height: 40px; }
  .tabs { gap: 6px; }
  .msgr-del { width: 40px; height: 40px; margin: -12px -4px -12px -10px; }
  .check { min-height: 40px; }
  summary { min-height: 40px; display: flex; align-items: center; }
  .top h1 { font-size: 26px; }
  .modal .grid.two, .modal .grid.three { grid-template-columns: 1fr; }
}

/* Tabellen werden zu Karten, sobald ihr Platz zu schmal ist (Handy, Tablet, Dialoge) – nichts scrollt seitlich */
.page, .modal { container-type: inline-size; container-name: page; }
@container page (max-width: 820px) {
  .table-wrap { overflow: visible; }
  table.list, table.list tbody, table.list tr, table.list td { display: block; width: 100%; }
  table.list thead { display: none; }
  table.list tr { border: 0; border-radius: 24px; padding: 10px 16px; margin-bottom: 10px; background: var(--bg-2); }
  table.list tr.click:hover td { background: transparent; }
  table.list tr.click:active { box-shadow: inset 0 0 0 2px var(--ink); }
  table.list td { border: 0; border-bottom: 0; padding: 6px 0; display: flex; align-items: baseline; justify-content: space-between; gap: 14px; text-align: right; min-height: 0; overflow-wrap: anywhere; }
  table.list td::before { content: attr(data-label); flex: none; max-width: 46%; text-align: left; color: var(--muted); font-size: 12.5px; font-weight: 700; letter-spacing: 0; text-transform: none; }
  table.list td:not([data-label=""]) { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 14px; align-items: baseline; justify-items: end; }
  table.list td:not([data-label=""])::before { grid-column: 1; grid-row: 1; align-self: start; justify-self: start; white-space: nowrap; overflow-wrap: normal; max-width: none; }
  table.list td:not([data-label=""]) > * { grid-column: 2; max-width: 100%; }
  table.list td[data-label=""]::before { content: none; }
  table.list td[data-label=""] { justify-content: flex-start; text-align: left; }
  table.list td:first-child { padding-top: 4px; }
  table.list td > .row, table.list td > div { justify-content: flex-end; }
  table.list td[data-label=""] > .row, table.list td[data-label=""] > div { justify-content: flex-start; }
  table.list td select { width: auto; flex: 1 1 auto; }
  table.list td .konten-sec, table.list td .konten-who { align-items: flex-end; text-align: right; }
}

/* Mittlere Bildschirme: Menü links nur mit Symbolen (Name erscheint beim Darüberfahren) */
@media (min-width: 761px) and (max-width: 1200px) {
  :root { --side: 76px; }
  .side { padding: 18px 10px; }
  .brand { padding: 4px 0 18px; justify-content: center; }
  .brand > div { display: none; }
  .nav a { justify-content: center; padding: 0; width: 52px; min-height: 52px; margin: 0 auto; border-radius: 50%; }
  .nav a > span:not(.nav-count) { display: none; }
  .nav a .nav-count { position: absolute; top: 3px; right: 4px; min-width: 18px; padding: 0 5px; font-size: 12px; }
  .side-foot { justify-content: center; padding: 7px; background: transparent; }
  .side-foot .who { display: none; }
}

/* Einstellungen in Tabellen: Auswahl breit genug für lange Namen */
table.list td select { width: auto; min-width: 200px; min-height: 44px; height: 44px; }
.konten-who { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.konten-who .badge { margin-top: 2px; }
.konten-sec { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.konten-sec .small { white-space: nowrap; }
.konten-actions { flex-wrap: nowrap; gap: 4px; }

/* ---------- Rechnungen: Status, Gruppen nach Agent:in ---------- */
.inv-tiles { margin-bottom: 16px; }
.inv-tile { text-align: left; cursor: pointer; color: var(--text); font: inherit; width: 100%; }
.inv-tile:hover { box-shadow: 0 0 0 2px var(--line-2); }
.inv-tile.on { background: var(--ink); color: #fff; box-shadow: none; }
.inv-tile.on .label, .inv-tile.on .faint, .inv-tile.on .muted { color: var(--ink-muted); }
.inv-tile.on .value { color: var(--rose); }
.inv-filter .tabs { margin-bottom: 14px; }
.inv-groups { gap: 16px; }
.inv-group .card + .card { margin-top: 0; }
.inv-group-head { margin-bottom: 8px; }
.inv-group-head h3 { margin: 0; overflow-wrap: anywhere; }
.inv-group-head .avatar { width: 34px; height: 34px; font-size: 13px; }
.inv-status { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.inv-status.row { flex-direction: row; align-items: center; }
.inv-seg { flex-wrap: wrap; }
.inv-seg button { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; }
.inv-seg button .ico { width: 16px; height: 16px; }
.inv-seg button.on { color: #fff; background: var(--ink); }
.inv-actions { margin-top: 4px; }
.inv-assign-wrap { gap: 8px; }
.inv-assign-wrap select { width: auto; min-width: 200px; min-height: 46px; height: 46px; }
@media (max-width: 760px) {
  .inv-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inv-seg { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .inv-seg button { justify-content: center; min-height: 44px; }
  .inv-assign-wrap { width: 100%; }
  .inv-assign-wrap select { flex: 1; min-width: 0; }
}

/* Handy: Kalender-Umschalter, Termin-Zeilen und Zuordnung groß genug zum Antippen */
@media (max-width: 760px) {
  .seg button { min-height: 40px; }
  .cal-item { min-height: 44px; }
  .top select { min-height: 40px; }
  .inv-assign-wrap { flex-direction: column; align-items: stretch; }
  .inv-assign-wrap select { width: 100%; min-width: 0; }
}
@media (max-width: 760px) {
  input:not([type=checkbox]):not([type=radio]):not([type=range]), select { min-height: 48px; }
  input[type=range] { min-height: 40px; }
  table.list td a { display: inline-flex; align-items: center; min-height: 40px; }
  table.list td select { min-width: 0; width: 100%; }
  table.list td:not([data-label=""]):has(> select) { display: flex; flex-direction: column; align-items: stretch; text-align: left; gap: 6px; }
  .bs-type-grid { grid-template-columns: 1fr; }
}

/* Zierschrift: Ziffern immer in voller Höhe, damit „1“ und „11“ nicht wie „I“ und „II“ aussehen */
:where([class], h1, h2, h3, h4, b, small, span) { font-variant-numeric: lining-nums; }

/* ---------- Profil ---------- */
.prof-grid { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 16px; align-items: start; }
.prof-grid > .card + .stack, .prof-grid .stack > .card + .card { margin-top: 0; }
.prof-pic { display: grid; place-items: center; }
.prof-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding-top: 32px; }
.prof-who { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.prof-who h2 { margin: 0; overflow-wrap: anywhere; font-size: 28px; letter-spacing: -0.04em; }
.prof-actions { justify-content: center; flex-wrap: wrap; }
.prof-save { margin-top: 14px; }
.prof-dl { margin: 0 0 14px; display: flex; flex-direction: column; }
.prof-dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.prof-dl dt { color: var(--muted); }
.prof-dl dd { margin: 0; overflow-wrap: anywhere; text-align: right; font-weight: 800; }
@media (max-width: 760px) { .prof-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Einstellungen (Liste statt Reiter) ---------- */
.set { display: grid; grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); gap: 20px; align-items: start; }
.set-nav { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 4px; padding: 10px; border: 0; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-s); }
.set-item { display: flex; align-items: center; gap: 12px; padding: 8px 14px 8px 8px; border-radius: 999px; color: var(--text); min-height: 60px; }
.set-item:hover { background: var(--bg-2); text-decoration: none; }
.set-item.on { background: var(--ink); color: #fff; }
.set-item.on .set-txt span, .set-item.on .set-go { color: var(--ink-muted); }
.set-item.on .set-ico { background: var(--rose); color: var(--on-rose); }
.set-ico { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-2); color: var(--text); flex: none; }
.set-ico .ico { width: 18px; height: 18px; }
.set-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.set-txt b { font-weight: 800; letter-spacing: -0.01em; }
.set-txt span { color: var(--muted); font-size: 12.5px; line-height: 1.35; font-weight: 600; }
.set-go { width: 16px; height: 16px; color: var(--faint); flex: none; }
.set-item:not(.on) .set-go { visibility: hidden; }
.set-body { min-width: 0; }
.set-head { margin-bottom: 14px; }
.set-back { display: none; margin-bottom: 10px; }
.set-title { display: flex; align-items: center; gap: 12px; }
.set-title .set-ico { width: 52px; height: 52px; border-radius: 50%; background: var(--rose); color: var(--on-rose); }
.set-title .set-ico .ico { width: 22px; height: 22px; }
.set-title h2 { margin: 0; font-size: 30px; letter-spacing: -0.04em; }
.set-title p { margin: 2px 0 0; }
.set-content > .card:first-child { margin-top: 0; }
.set-content { container-type: inline-size; container-name: page; }
@media (max-width: 1440px) { .set { grid-template-columns: minmax(220px, 260px) minmax(0, 1fr); gap: 16px; } }
/* bis 1000 px: erst die Liste, dann der Bereich (wie am Handy) – sonst wird der Inhalt zu schmal */
@media (max-width: 1000px) {
  .set { grid-template-columns: minmax(0, 1fr); }
  .set-nav { position: static; padding: 6px; }
  .set-item { min-height: 60px; }
  .set-item .set-go { visibility: visible; }
  .set-body { display: none; }
  .set.open .set-nav { display: none; }
  .set.open .set-body { display: block; }
  .set-back { display: inline-flex; }
}
@media (max-width: 760px) { .set-title h2 { font-size: 23px; } }
/* Kopfzeile: Titel nie abschneiden – lieber die Knöpfe daneben umbrechen */
@media (min-width: 761px) {
  .top h1 { flex: 0 0 auto; max-width: 60%; }
  .top > .row { flex: 1 1 auto; min-width: 0; flex-wrap: wrap; justify-content: flex-end; row-gap: 8px; }
}

/* ---------- Dashboard ---------- */
.dash { display: flex; flex-direction: column; gap: 16px; }
.dash > .card + .card, .dash > .grid, .dash .grid > .card { margin-top: 0; }
.dash-hello { display: flex; flex-direction: column; align-items: stretch; gap: 0; color: #fff; padding: 28px 30px 30px; min-height: 0; position: relative; overflow: hidden; background: radial-gradient(700px 320px at 85% -10%, rgba(255, 255, 255, 0.16), transparent 60%), linear-gradient(160deg, #7a7a80 0%, #45454b 55%, #1f1f25 100%); }
.dash-hello > * { position: relative; z-index: 1; }
.dash-hello-txt { flex: 1 1 260px; min-width: 0; }
.dash-hello h2 { display: block; margin: 18px 0 22px; font-size: 50px; line-height: 1; letter-spacing: -0.05em; color: #fff; }
.dash-hello h2 > span { display: block; }
.dash-hello h2 .red { display: block; color: var(--rose); }
.dash-hello p { margin: 8px 0 0; color: rgba(255, 255, 255, 0.78); font-weight: 600; }
.dash-ask { display: flex; align-items: center; gap: 8px; min-width: 0; background: #fff; color: var(--text); border: 0; border-radius: 999px; padding: 6px 6px 6px 20px; }
.dash-ask:focus-within { box-shadow: 0 0 0 3px var(--rose); }
.dash-ask .ico { width: 18px; height: 18px; color: var(--text); flex: none; }
.dash-ask input { border: 0; background: transparent; box-shadow: none; min-width: 0; flex: 1; padding: 8px 0; min-height: 44px; }
.dash-ask input:focus { box-shadow: none; background: transparent; }
.dash-ask .btn { height: 48px; }
.dash-ask .btn { flex: none; }
.dash-setup { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 20px; border-radius: 999px; background: #fff; color: var(--text); border: 0; }
.dash-setup > .ico { width: 20px; height: 20px; color: var(--warn); flex: none; }
.dash-setup > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dash-tiles { gap: 0; background: var(--ink); border-radius: var(--radius); padding: 10px; box-shadow: 0 16px 40px rgba(10, 10, 16, 0.12); }
.dash-tile { display: block; color: #fff; background: transparent; box-shadow: none; border-radius: 22px; padding: 18px 20px; position: relative; }
.dash-tile + .dash-tile::before { content: ''; position: absolute; left: 0; top: 22%; bottom: 22%; width: 1px; background: #2e2e34; }
.dash-tile .label { color: var(--ink-muted); }
.dash-tile .value { color: var(--rose); font-size: 46px; }
.dash-tile .faint { color: var(--ink-muted); }
.dash-tile .up { color: #c70d69; }
.dash-tile .down { color: #ec0b7a; }
a.dash-tile:hover { background: var(--ink-2); text-decoration: none; }
.dash-sub { margin-top: 6px; min-height: 20px; }
.dash-two { gap: 16px; align-items: start; }
.dash-card-head { margin-bottom: 8px; gap: 10px; }
.dash-card-head h3 { margin: 0; display: flex; align-items: center; gap: 8px; min-width: 0; }
.dash-card-head h3 .ico { color: var(--text); width: 18px; height: 18px; flex: none; }
.dash-card-head > a { display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; flex: none; }
.dash-card-head > a .ico { width: 14px; height: 14px; }
.dash-list { display: flex; flex-direction: column; }
.dash-row { display: flex; align-items: center; gap: 12px; padding: 10px 10px; border-bottom: 1px solid var(--line); color: var(--text); min-height: 56px; border-radius: 20px; font-weight: 500; }
.dash-row:last-child { border-bottom: 0; }
.dash-row:hover { background: var(--bg-2); text-decoration: none; }
.dash-when { display: flex; flex-direction: column; min-width: 92px; flex: none; }
.dash-when b { font-size: 14px; }
.dash-what { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.dash-what b { font-weight: 800; overflow-wrap: anywhere; }
.dash-prev { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.dash-av { width: 36px; height: 36px; flex: none; }
.dash-ev { padding: 8px; border-bottom: 0; }
@media (max-width: 760px) {
  .dash-hello { padding: 22px 20px 20px; }
  .dash-hello h2 { font-size: 34px; margin: 14px 0 18px; }
  .dash-tile { padding: 14px 14px; }
  .dash-tile .value { font-size: 36px; }
  .dash-tile:nth-child(3)::before { display: none; }
  .dash-tile:nth-child(n+3) { border-top: 1px solid #2e2e34; border-radius: 0; }
  .dash-ask { flex-basis: 100%; }
  .dash-card-head > a { min-height: 40px; }
  .dash-row { min-height: 56px; }
  .dash-when { min-width: 78px; }
}
@media (max-width: 760px) {
  .ki-keyrow a { display: inline-flex; align-items: center; min-height: 40px; }
}
.dash-what span { overflow-wrap: anywhere; }

/* ---------- Referenz-Design: Ergänzungen ---------- */
/* Kopfzeilen-Auswahl (z. B. Zeitraum) als weiße Pille */
.top select { background-color: var(--surface); box-shadow: var(--shadow-s); min-height: 46px; }
/* Team: Kennzahlen-Kacheln wie das schwarze Panel */
/* Rechnungs-Kacheln: weiße Karten, große Zahlen */
.inv-tile .value { font-size: 40px; }
/* Hinweise auf Karten */
.hint .ico { color: var(--text); }
/* Abschnitts-Links in Karten */
.card a.small { font-weight: 700; }
/* Kopfzeile auf dem Handy: weiße Pillen-Knöpfe */
@media (max-width: 760px) {
  .tabs button { min-height: 42px; }
  .seg button { min-height: 40px; }
}

/* ======================================================================
   Layout 0.1.4 – aufgeräumt und gleich aufgebaut auf jeder Seite:
   Kopf (Titel + eine Zeile, worum es geht) → schwarze Übersicht → Karten
   ====================================================================== */
.top-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top-title h1 { flex: none; }
.top-sub { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 761px) {
  .top-title { flex: 0 1 auto; max-width: 60%; }
  .top .top-title h1 { max-width: none; }
}
@media (max-width: 760px) {
  .top-title { flex: 1 1 0; }
  .top-sub { display: none; }
}

/* Dashboard: Begrüßung */
.dash-hello-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dash-hello-top .sticker { margin: 4px 0 0 2px; }
.dash-hello h2 .red { color: var(--rose); }
.dash-ask, .dash-setup { width: 100%; box-shadow: 0 10px 30px rgba(10, 10, 16, 0.18); }

/* Dashboard: zwei Spalten, die unabhängig wachsen */
.dash-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.dash-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.dash-col > .card + .card { margin-top: 0; }
@media (max-width: 1000px) {
  .dash-cols { display: flex; flex-direction: column; }
  .dash-col { display: contents; }
  .dash-c-ev { order: 1; } .dash-c-msg { order: 2; } .dash-c-inv { order: 3; }
}
.dash-card { padding: 22px 22px 18px; }
.dash-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.dash-card-head h3 { flex: 1; margin: 0; font-size: 19px; display: flex; align-items: center; gap: 8px; min-width: 0; }
.dash-ico { width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; flex: none; }
.dash-ico .ico { width: 18px; height: 18px; color: #fff; }
.dash-count { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px; background: var(--rose); color: var(--on-rose); font-size: 13px; font-weight: 800; letter-spacing: 0; }
.dash-more { display: inline-flex; align-items: center; gap: 2px; min-height: 38px; padding: 0 8px 0 14px; border-radius: 999px; background: var(--bg-2); color: var(--text); font-size: 13px; font-weight: 800; white-space: nowrap; flex: none; }
.dash-more:hover { background: var(--surface-3); text-decoration: none; }
.dash-more .ico { width: 15px; height: 15px; }
.dash-list { gap: 2px; }
.dash-row { border-bottom: 0; }
.dash-row + .dash-row { box-shadow: 0 -1px 0 var(--line); }
.dash-row:hover, .dash-row:hover + .dash-row { box-shadow: none; }
.dash-date { width: 50px; height: 54px; border-radius: 18px; background: var(--ink); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; }
.dash-date b { font-size: 20px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.dash-date small { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--rose); font-weight: 800; margin-top: 2px; }
.dash-ev.today .dash-date { background: var(--rose); color: var(--on-rose); }
.dash-ev.today .dash-date small { color: var(--on-rose); }
@media (max-width: 760px) {
  .dash-card { padding: 18px 16px 14px; }
  .dash-card-head h3 { font-size: 17px; }
  .dash-more span { display: none; }
  .dash-more { width: 40px; height: 40px; padding: 0; justify-content: center; }
}

/* Rechnungen: die schwarze Übersicht ist zugleich der Filter */
.inv-tiles { gap: 0; background: var(--ink); border-radius: var(--radius); padding: 10px; margin-bottom: 12px; box-shadow: 0 16px 40px rgba(10, 10, 16, 0.12); }
.inv-tile { background: transparent; color: #fff; box-shadow: none; border-radius: 22px; padding: 16px 20px; position: relative; }
.inv-tile + .inv-tile::before { content: ''; position: absolute; left: 0; top: 22%; bottom: 22%; width: 1px; background: #2e2e34; }
.inv-tile .label, .inv-tile .delta, .inv-tile .muted { color: var(--ink-muted); }
.inv-tile .value { color: var(--rose); }
.inv-tile:hover { background: var(--ink-2); box-shadow: none; }
.inv-tile.on { background: var(--rose); color: var(--on-rose); }
.inv-tile.on .label, .inv-tile.on .value, .inv-tile.on .delta, .inv-tile.on .muted { color: var(--on-rose); }
.inv-tile.on::before, .inv-tile.on + .inv-tile::before { display: none; }
.inv-filter { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 0 6px 12px; min-height: 40px; }
@media (min-width: 1100px) {
  .inv-table { table-layout: fixed; }
  .inv-table th:nth-child(1) { width: 120px; }
  .inv-table th:nth-child(3) { width: 140px; }
  .inv-table th:nth-child(4) { width: 190px; }
  .inv-table th:nth-child(5) { width: 150px; }
}
@media (max-width: 900px) {
  .inv-tile:nth-child(3)::before { display: none; }
  .inv-tile:nth-child(n+3) { border-radius: 22px; }
}
@media (max-width: 760px) {
  .inv-tile { padding: 14px; }
}

/* Einstellungen: Liste etwas breiter, damit die Beschreibungen nicht so oft umbrechen */
@media (min-width: 1001px) { .set { grid-template-columns: 320px minmax(0, 1fr); } }

/* Kopfzeile mit vielen Knöpfen (z. B. Teamverwaltung): die Knöpfe bekommen eine eigene Werkzeugleiste unter dem Titel */
@media (min-width: 761px) {
  .top:has(> .row > :nth-child(3)) { flex-wrap: wrap; row-gap: 12px; }
  .top > .row:has(> :nth-child(3)) { order: 5; flex: 1 1 100%; justify-content: flex-start; }
  .top:has(> .row > :nth-child(3)) .top-title { flex: 1 1 0; max-width: none; }
}
.dash-hello h2 { margin-top: 26px; }
@media (max-width: 760px) { .dash-hello h2 { margin-top: 22px; } }
/* Buchungslink im Kalender: klare Schrift statt Schreibmaschine, Knopf schwarz */

/* Handy: kurzer Titel, einzelner Knopf bleibt in der Kopfzeile (keine leere Extrazeile) */
.top h1 .t-short { display: none; }
@media (max-width: 760px) {
  .top h1 .t-full.has-short { display: none; }
  .top h1 .t-short { display: inline; }
  .top > .row:not(:has(> :nth-child(2))):has(> .btn) { order: 0; flex: none; }
  .top > .row:not(:has(> :nth-child(2))):has(> .btn) .btn.small { width: 42px; height: 42px; min-width: 42px; padding: 0; border-radius: 50%; justify-content: center; }
  .top > .row:not(:has(> :nth-child(2))):has(> .btn) .btn.ghost { background: var(--surface); box-shadow: var(--shadow-s); }
}

/* ---------- Sprachnachrichten: Abspielknopf, Wellenform mit Punkt, Profilbild mit Mikrofon ---------- */
.msgr-bubble.has-voice { padding: 8px 10px 6px 6px; }
.msgr-media.voice { display: flex; align-items: center; gap: 10px; width: min(330px, 68vw); max-width: 100%; margin: 0; padding: 0; border-radius: 0; background: transparent; overflow: visible; }
.vm-play { width: 46px; height: 46px; border-radius: 50%; border: 0; background: transparent; color: var(--text); display: grid; place-items: center; flex: none; cursor: pointer; padding: 0; }
.vm-play:hover { background: rgba(10, 10, 16, 0.06); }
.vm-play .ico { width: 24px; height: 24px; fill: currentColor; }
.vm-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding-top: 12px; }
.vm-wave { position: relative; height: 32px; cursor: pointer; touch-action: none; display: flex; align-items: center; margin: 0 7px; }
.vm-wave:focus-visible { outline: 2px solid var(--rose); outline-offset: 4px; border-radius: 8px; }
.vm-bars { display: flex; align-items: center; justify-content: space-between; gap: 2px; width: 100%; height: 100%; }
.vm-bars i { flex: 1 1 0; max-width: 4px; min-height: 3px; border-radius: 2px; background: #b9b9bf; transition: height 0.25s ease; }
.vm-bars i.on { background: var(--ink); }
.vm-dot { position: absolute; top: 50%; left: 0; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--rose); box-shadow: 0 0 0 2px var(--bg-2); pointer-events: none; }
.vm-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 18px; font-size: 12px; color: var(--faint); font-weight: 600; padding-left: 2px; }
.vm-time { font-variant-numeric: tabular-nums; }
.vm-foot .msgr-meta { margin: 0; padding: 0 !important; }
.vm-who { position: relative; display: grid; flex: none; align-self: center; }
.vm-av { width: 54px; height: 54px; font-size: 18px; }
.vm-mic { position: absolute; left: -5px; bottom: -3px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--rose); color: var(--on-rose); box-shadow: 0 0 0 2px var(--bg-2); }
.vm-mic .ico { width: 12px; height: 12px; stroke-width: 2.4; }
.voice.played .vm-mic { background: var(--ink); color: #fff; }
/* eigene Nachricht: schwarze Blase */
.msgr-row.mine .vm-play { color: #fff; }
.msgr-row.mine .vm-play:hover { background: rgba(255, 255, 255, 0.1); }
.msgr-row.mine .vm-bars i { background: #5a5a60; }
.msgr-row.mine .vm-bars i.on { background: #fff; }
.msgr-row.mine .vm-dot, .msgr-row.mine .vm-mic { box-shadow: 0 0 0 2px var(--ink); }
.msgr-row.mine .vm-foot { color: var(--ink-muted); }
.msgr-row.mine .voice.played .vm-mic { background: #fff; color: var(--ink); }
/* Aufnahme: laufender Pegel */
.msgr-rec-time { margin-right: 0; }
.vm-live { flex: 1 1 120px; min-width: 80px; height: 30px; display: flex; align-items: center; gap: 2px; }
.vm-live i { flex: 1 1 0; max-width: 4px; min-height: 3px; border-radius: 2px; background: var(--rose); transition: height 0.09s linear; }
@media (max-width: 760px) {
  .msgr-media.voice { width: min(300px, 70vw); gap: 6px; }
  .vm-av { width: 46px; height: 46px; }
  .msgr-rec-label { display: none; }
}
@media (prefers-reduced-motion: reduce) { .vm-bars i, .vm-live i { transition: none; } }
/* Menüleiste unten: lange Namen (z. B. „Nachrichten“, „Reward Tree“) passen ganz in die rote Pille */
@media (max-width: 760px) {
  .tabbar a { padding: 2px 1px; letter-spacing: -0.02em; }
  .tabbar a span:not(.tab-ico):not(.tab-count) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabbar a[data-id="messages"], .tabbar a[data-id="rewards"] { flex: 1.35; }
  .vm-who { margin-left: 6px; }
}
@media (max-width: 360px) { .tabbar a { font-size: 10.5px; } }

/* ---------- Feinschliff: nichts gequetscht, alles lesbar ---------- */
@media (max-width: 760px) {
  .tabbar a { font-size: 12px; }
  .dash-tile .value, .inv-tile .value { font-size: 34px; }
}
@media (max-width: 360px) { .tabbar a { font-size: 11px; } }
.dash-date small { font-size: 12px; letter-spacing: 0.02em; }
/* Termin-Arten in den Einstellungen: Name über die ganze Breite, darunter Dauer und Zielgruppe nebeneinander */
@media (min-width: 761px) and (max-width: 1280px) {
  .bs-type-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .bs-type-grid .field:first-child { grid-column: 1 / -1; }
}

/* ---------- Nachrichten: Fotos/Videos wie gewohnt ---------- */
/* Text: Uhrzeit sitzt rechts in der letzten Zeile */
.msgr-bubble { padding: 8px 12px 7px 14px; }
.msgr-text > .msgr-meta { float: right; margin: 6px -2px -4px 14px; padding: 0 !important; min-height: 0; line-height: 1.2; position: relative; top: 1px; }
.msgr-text > .msgr-meta .msgr-del { margin: -6px 0; }
/* Foto/Video in der Blase: schmaler Rand, Bild füllt die Blase, Text darunter auf Bildbreite */
.msgr-bubble.has-media:not(.has-voice) { padding: 4px; max-width: 368px; }
.msgr-bubble.has-media:not(.has-voice):has(.msgr-text) { min-width: 240px; }
.msgr-bubble.has-media .msgr-author { padding: 6px 10px 6px; }
.msgr-mwrap { position: relative; }
.msgr-mwrap .msgr-media { margin: 0; max-width: 100%; border-radius: 18px; }
.msgr-mwrap .msgr-media.img { display: block; width: 100%; }
.msgr-mwrap .msgr-media.img img { width: 100%; }
.msgr-mwrap .msgr-media.video { display: block; width: min(360px, 100%); }
.msgr-bubble.has-media:not(.has-voice) .msgr-text { padding: 8px 10px 4px !important; }
/* nur Foto/Video: Uhrzeit als dunkle Pille unten rechts auf dem Bild (beim Video oben – unten liegt die Steuerung) */
.msgr-mwrap > .msgr-meta { position: absolute; right: 10px; bottom: 10px; margin: 0; padding: 3px 10px !important; min-height: 0; border-radius: 999px; background: rgba(10, 10, 16, 0.66); color: #fff; font-weight: 700; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.msgr-mwrap.video > .msgr-meta { top: 10px; bottom: auto; }
.msgr-row.mine .msgr-mwrap > .msgr-meta, .msgr-mwrap > .msgr-meta .msgr-del { color: #fff; }
.msgr-mwrap > .msgr-meta .msgr-del { width: 24px; height: 24px; margin: -2px -4px -2px -6px; }
.msgr-mwrap > .msgr-meta .msgr-del:hover { background: rgba(255, 255, 255, 0.18); color: #fff; }
@media (max-width: 760px) {
  .msgr-bubble.has-media:not(.has-voice) { max-width: min(330px, 100%); }
  .msgr-mwrap > .msgr-meta .msgr-del { width: 30px; height: 30px; }
}

/* ---------- Feinschliff 2: lesbare Zähler, Auswahlfelder mit Platz für lange Namen ---------- */
.nav .nav-count { background: var(--rose); color: var(--on-rose); }
.nav a.on .nav-count { background: var(--ink); color: #fff; }
/* dunkle Grundfarbe unter den Verläufen (falls ein Verlauf nicht geladen wird, bleibt die Schrift lesbar) */
.dash-hello, .hello-hero, .auth-hero { background-color: #333339; }
.inv-assign { min-width: min(420px, 100%); }
/* Formulare mit Auswahlfeldern: in Dialogen und schmaleren Einstellungen untereinander statt gequetscht nebeneinander */
.modal .grid.two:has(select) { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 1280px) { .set-content .grid.two:has(select) { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Nachrichten wie im Messenger: kein weißer Kasten hinter dem Verlauf, nur Blasen auf dem Grund ---------- */
.msgr-main { background: transparent; box-shadow: none; border-radius: 0; overflow: visible; }
.msgr-thread-head { background: var(--surface); border-bottom: 0; border-radius: 26px; box-shadow: var(--shadow-s); padding: 10px 16px; }
.msgr-msgs { padding: 14px 6px 10px; }
.msgr-bubble { background: var(--surface); box-shadow: 0 1px 2px rgba(10, 10, 16, 0.06); }
.msgr-row.mine .msgr-bubble { box-shadow: none; }
.msgr-day span { background: var(--surface); box-shadow: 0 1px 2px rgba(10, 10, 16, 0.05); }
.msgr-compose { padding: 6px 0 0; }
.msgr-compose .box { background: var(--surface); box-shadow: var(--shadow-s); }
.msgr-rec { background: var(--surface); }
.vm-dot, .vm-mic { box-shadow: 0 0 0 2px var(--surface); }
.msgr-row.mine .vm-dot, .msgr-row.mine .vm-mic { box-shadow: 0 0 0 2px var(--ink); }
.vm-play:hover { background: var(--bg-2); }
.msgr-mwrap .msgr-media.img { background: var(--bg-2); }
.msgr-del:hover { background: var(--bg-2); }
@media (max-width: 760px) {
  .msgr-thread-head { padding: 8px 12px; border-radius: 24px; }
  .msgr-msgs { padding: 10px 2px 8px; }
  .msgr-compose { padding: 6px 0 0; }
}

/* ======================================================================
   0.1.5 – ganze Breite nutzen, einheitliche Karten, schönere Flächen
   ====================================================================== */
/* Seiten nutzen die volle Breite; auf großen Bildschirmen etwas mehr Rand */
@media (min-width: 1600px) {
  .page { padding-left: 36px; padding-right: 36px; }
  .top { padding-left: 36px; padding-right: 36px; }
  .msgr { padding-left: 36px; padding-right: 36px; }
}

/* Dashboard: oben Begrüßung + Kennzahlen (breit: nebeneinander), darunter Karten wie Mauerwerk */
.dash-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.dash-top > .card + .card, .dash-top > .grid { margin-top: 0; }
@media (min-width: 1500px) {
  .dash-top { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: stretch; }
  .dash-top .dash-hello { justify-content: center; }
  .dash-top .dash-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: center; }
  .dash-top .dash-tile:nth-child(3)::before { display: none; }
  .dash-top .dash-tile:nth-child(n+3) { border-top: 1px solid #2e2e34; }
}
.dash-cols { display: block; columns: 3 420px; column-gap: 16px; }
.dash-cols > .card { break-inside: avoid; -webkit-column-break-inside: avoid; margin: 0 0 16px; width: 100%; display: block; }
.dash-cols > .card + .card { margin-top: 0; }

/* Profil: auf breiten Bildschirmen Name und Anmeldung nebeneinander */
@media (min-width: 1400px) {
  .prof-grid > .stack { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
}

/* Einstellungen: breite Bildschirme zeigen die Karten in zwei Spalten */
@media (min-width: 1700px) {
  .set-content { columns: 2 620px; column-gap: 16px; }
  .set-content > * { break-inside: avoid; -webkit-column-break-inside: avoid; margin: 0 0 16px !important; }
}

/* Karten: weicher Schatten, einheitliche Köpfe mit rundem schwarzem Symbol */
.card { box-shadow: 0 1px 2px rgba(10, 10, 16, 0.04), 0 10px 28px rgba(10, 10, 16, 0.05); }
.card > h3:first-child, .card > .row:first-child > h3, .card > .row.between:first-child > h3 { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 16px; gap: 12px; }
.card > .row.between:first-child, .card > .row:first-child { margin-bottom: 16px; }
.card > .row:first-child > h3 { margin-bottom: 0; }
.card h3 > .ico:first-child, .card h2 > .ico:first-child { box-sizing: content-box; width: 17px; height: 17px; padding: 10px; border-radius: 50%; background: var(--ink); color: #fff; flex: none; }

/* hellgraue Innenflächen: feiner Verlauf + zarte Kante statt flachem Grau */
.ki-status, .ag-day, .inv-findings li, .inv-text, .bk-cancelbox, .hello-list .hello-item:hover {
  background: linear-gradient(180deg, #f8f8fb 0%, #f1f1f4 100%);
  box-shadow: inset 0 0 0 1px rgba(10, 10, 16, 0.04);
}
.ki-status.ok { background: linear-gradient(180deg, #fde1ef 0%, #fbcae2 100%); }
.ki-status.warn { box-shadow: inset 0 0 0 1.5px var(--ink); }
input, select, textarea { box-shadow: inset 0 0 0 1px rgba(10, 10, 16, 0.035); }
input:focus, select:focus, textarea:focus { box-shadow: 0 0 0 2px var(--ink); }

/* Leer-Zustände: Rose im roten Schein, klarer Titel, Erklärung, Knöpfe */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 52px 24px 48px; color: var(--muted); }
.empty-art { display: grid; place-items: center; width: 120px; height: 120px; margin-bottom: 12px; border-radius: 50%; background: radial-gradient(circle, rgba(236, 11, 122, 0.2) 0%, rgba(236, 11, 122, 0.06) 45%, rgba(236, 11, 122, 0) 70%); }
.empty .empty-art img { width: 76px; height: 76px; margin: 0; border-radius: 22px; box-shadow: 0 14px 30px rgba(10, 10, 16, 0.28); }
.empty-title { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -0.02em; color: var(--text); }
.empty-sub { margin: 0; max-width: 500px; font-size: 14px; line-height: 1.55; color: var(--muted); }
.empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
.card:has(> .empty), .card:has(> div > .empty:only-child) { background: radial-gradient(900px 300px at 50% 0%, #ffffff 0%, #ffffff 60%); }
/* Speichern-Leiste (Kalender & Buchung): eigene, milchige Leiste statt eines Knopfs über den Feldern */
.bs-save { background: rgba(233, 233, 233, 0.82); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-radius: 26px; padding: 10px; margin-top: 18px; box-shadow: 0 8px 24px rgba(10, 10, 16, 0.08); }
@media (min-width: 1700px) { .set-content:has(> .bs-save) { columns: auto; } }

/* ---------- Handy: Abstände und Werkzeugleisten ---------- */
@media (max-width: 760px) {
  .page { padding: 10px 14px 112px; }
  .card + .card, .grid + .card, .card + .grid { margin-top: 14px; }
  .grid { gap: 14px; }
  /* Werkzeugleiste in der Kopfzeile: Auswahl über die ganze Breite, Knöpfe gleichmäßig in einer Zeile */
  .top > .row:has(> :nth-child(3)) { display: flex; flex-wrap: wrap; gap: 8px; }
  .top > .row:has(> :nth-child(3)) > :not(.btn) { flex: 1 1 100%; max-width: none; }
  .top > .row:has(> :nth-child(3)) > :not(.btn) select { width: 100%; max-width: none; }
  .top > .row:has(> :nth-child(3)) > .btn { flex: 1 1 auto; justify-content: center; padding: 0 12px; font-size: 13px; min-width: 0; white-space: nowrap; }
  .top > .row:has(> :nth-child(3)) > .btn:not(.primary) .ico { display: none; }
  /* Kennzahlen: kürzere Zeilen, nichts gequetscht */
  .dash-tile .label, .inv-tile .label { font-size: 12px; line-height: 1.35; }
  .dash-sub, .inv-tile .delta { font-size: 12px; line-height: 1.4; }
  .dash-tile, .inv-tile { padding: 14px 12px; }
  /* Karten-Köpfe mit Knopf: Knopf darf in die nächste Zeile */
  .card > .row.between:first-child { flex-wrap: wrap; row-gap: 10px; }
  .empty { padding: 36px 16px 32px; }
  .empty-actions .btn { flex: 1 1 100%; justify-content: center; }
}

/* Knöpfe in der Werkzeugleiste: weiß auf dem grauen Grund (gut sichtbar) */
.top > .row > .btn:not(.primary):not(.ghost):not(.dark) { background: var(--surface); box-shadow: var(--shadow-s); }
.top > .row > .btn:not(.primary):not(.ghost):not(.dark):hover { box-shadow: inset 0 0 0 2px var(--ink); }
/* Dashboard-Karten: bis 1900 px zwei Spalten wie Mauerwerk, darüber alle vier nebeneinander (keine leere Spalte) */
.dash-cols { columns: 2 420px; }
@media (min-width: 1900px) {
  .dash-cols { columns: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
  .dash-cols > .card { margin: 0; }
}
@media (max-width: 760px) {
  .dash-setup { flex-wrap: wrap; border-radius: 26px; padding: 14px 16px; gap: 10px; }
  .dash-setup > div { flex: 1 1 200px; }
  .dash-setup > .btn { flex: 1 1 100%; justify-content: center; }
}

/* ---------- Nachrichten: Profilbild + Name bei jeder Nachricht, Antworten, Menü ---------- */
.msgr-row { margin-top: 10px; }
.msgr-row .msgr-av { width: 34px; height: 34px; font-size: 12px; align-self: flex-end; box-shadow: 0 0 0 2px var(--bg); }
.msgr-author { display: flex; align-items: center; gap: 6px; padding-right: 26px; }
.msgr-row.mine .msgr-author { color: #ec0b7a; }
.msgr-bubble.has-media .msgr-author { padding-right: 34px; }
/* Pfeil für das Menü: am Computer beim Darüberfahren, am Handy immer leicht sichtbar */
.msgr-more { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: rgba(10, 10, 16, 0.06); color: var(--muted); opacity: 0; transition: opacity 0.15s, background 0.15s; z-index: 2; }
.msgr-more .ico { width: 15px; height: 15px; }
.msgr-bubble:hover .msgr-more, .msgr-more:focus-visible { opacity: 1; }
.msgr-more:hover { background: rgba(10, 10, 16, 0.12); color: var(--text); }
.msgr-row.mine .msgr-more { background: rgba(255, 255, 255, 0.12); color: #d6d6d9; }
.msgr-row.mine .msgr-more:hover { background: rgba(255, 255, 255, 0.22); color: #fff; }
.msgr-bubble.media-only .msgr-more { background: rgba(10, 10, 16, 0.55); color: #fff; top: 10px; right: 10px; }
@media (hover: none) { .msgr-more { opacity: 0.75; } }
/* Zitat in der Blase (Antwort) */
.msgr-quote { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; margin: 4px 0 6px; padding: 7px 12px; border: 0; border-left: 3px solid var(--rose); border-radius: 12px; background: rgba(10, 10, 16, 0.05); color: inherit; text-align: left; font: 500 13px/1.4 var(--sans); cursor: pointer; min-width: 0; }
.msgr-quote b { font-size: 12.5px; font-weight: 800; color: var(--rose-2); }
.msgr-quote span { color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.msgr-row.mine .msgr-quote { background: rgba(255, 255, 255, 0.1); }
.msgr-row.mine .msgr-quote b { color: #ec0b7a; }
.msgr-row.mine .msgr-quote span { color: #c9c9cc; }
.msgr-bubble.has-media:not(.has-voice) .msgr-quote { width: auto; margin: 2px 6px 6px; }
.msgr-row.flash .msgr-bubble { animation: msgr-flash 1.4s ease; }
@keyframes msgr-flash { 0%, 40% { box-shadow: 0 0 0 3px var(--rose); } 100% { box-shadow: 0 0 0 0 rgba(236, 11, 122, 0); } }
@media (prefers-reduced-motion: reduce) { .msgr-row.flash .msgr-bubble { animation: none; box-shadow: 0 0 0 3px var(--rose); } }
/* Menü */
.msgr-menu { position: fixed; z-index: 80; min-width: 210px; padding: 6px; border-radius: 20px; background: var(--surface); box-shadow: 0 18px 50px rgba(10, 10, 16, 0.22), 0 0 0 1px rgba(10, 10, 16, 0.05); display: flex; flex-direction: column; gap: 2px; }
.msgr-menu-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 14px; border: 0; border-radius: 14px; background: transparent; color: var(--text); font: 700 14px var(--sans); text-align: left; cursor: pointer; }
.msgr-menu-item .ico { width: 17px; height: 17px; flex: none; }
.msgr-menu-item:hover, .msgr-menu-item:focus-visible { background: var(--bg-2); outline: none; }
.msgr-menu-item.danger { color: var(--err); }
/* Antwort-Leiste über dem Eingabefeld */
.msgr-replybar { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; padding: 8px 8px 8px 14px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-s), inset 3px 0 0 var(--rose); }
.msgr-replybar-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13px; }
.msgr-replybar-txt b { color: var(--rose-2); font-weight: 800; }
.msgr-replybar-txt span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 760px) {
  .msgr-row .msgr-av { width: 30px; height: 30px; }
  .msgr-menu { left: 10px !important; right: 10px; top: auto !important; bottom: calc(84px + env(safe-area-inset-bottom)); min-width: 0; border-radius: 24px; padding: 8px; }
  .msgr-menu-item { min-height: 50px; font-size: 15px; }
}

/* ---------- Chat with Rose: Profilbild + Name bei jeder Nachricht ---------- */
.cmsg { display: flex; align-items: flex-end; gap: 10px; max-width: min(860px, 92%); align-self: flex-start; }
.cmsg.me { align-self: flex-end; flex-direction: row-reverse; }
.cmsg-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cmsg.me .cmsg-body { align-items: flex-end; }
.cmsg-name { display: flex; align-items: baseline; gap: 8px; padding: 0 10px; font-size: 12.5px; color: var(--muted); }
.cmsg-name b { font-weight: 800; color: var(--text); }
.cmsg.rose .cmsg-name b { color: var(--rose-2); }
.cmsg .msg { max-width: 100%; position: relative; padding-right: 40px; }
.cmsg .msg.me { padding-right: 40px; }
.cmsg-av { width: 36px; height: 36px; flex: none; margin-bottom: 2px; box-shadow: 0 0 0 2px var(--bg); }
.rose-av { border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: #0a0a10; }
.rose-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cmsg .msg .meta { display: none; }
.cmsg-quote { margin: 0 0 8px; cursor: default; }
.cmsg.me .cmsg-quote { background: rgba(255, 255, 255, 0.1); }
.cmsg.me .cmsg-quote b { color: #ec0b7a; }
.cmsg.me .cmsg-quote span { color: #c9c9cc; }
.cmsg .msg:hover .msgr-more, .cmsg .msgr-more:focus-visible { opacity: 1; }
.cmsg.me .msgr-more { background: rgba(255, 255, 255, 0.12); color: #d6d6d9; }
.chat .steps, .chat .typing { margin-left: 46px; }
.chat-replybar { margin: 0 0 8px; }
@media (max-width: 760px) {
  .cmsg { max-width: 100%; gap: 8px; }
  .cmsg-av { width: 30px; height: 30px; }
  .chat .steps, .chat .typing { margin-left: 38px; }
}

/* ---------- Schwarz-Rot mit Rose und Rosenblättern (statt der grauen Flächen) ---------- */
.dash-hello, .hello-hero, .auth-hero {
  position: relative; overflow: hidden; color: #fff;
  background-color: #0a0a10;
  background-image:
    radial-gradient(640px 360px at 86% 45%, rgba(236, 11, 122, 0.42), rgba(236, 11, 122, 0) 65%),
    radial-gradient(520px 320px at 0% 110%, rgba(75, 75, 75, 0.5), rgba(75, 75, 75, 0) 70%),
    linear-gradient(135deg, #0a0a10 0%, #0a0a10 45%, #201c23 100%);
  background-repeat: no-repeat;
}
.hello-hero > *, .auth-hero > * { position: relative; z-index: 1; }
/* die Rose aus dem App-Icon, rechts im Bild, leicht angeschnitten */
.dash-hello::after, .hello-hero::after, .auth-hero::after {
  content: ''; position: absolute; z-index: 0; pointer-events: none;
  right: -50px; top: 50%; width: 380px; height: 380px; transform: translateY(-50%) rotate(-8deg);
  background: none;
  filter: drop-shadow(0 20px 40px rgba(10, 10, 16, 0.5));
}
.auth-hero::before { display: none; }
.auth-hero::after { width: 560px; height: 560px; right: -120px; top: 38%; }
.hello-hero::after { width: 300px; height: 300px; right: -40px; }
/* Fragefeld und KI-Hinweis: dunkles Glas statt weiß */
.dash-ask, .dash-setup { background: rgba(255, 255, 255, 0.09); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), 0 10px 30px rgba(10, 10, 16, 0.35); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.dash-ask .ico { color: #fff; }
.dash-ask input { color: #fff; }
.dash-ask input::placeholder { color: rgba(255, 255, 255, 0.62); }
.dash-ask:focus-within { box-shadow: inset 0 0 0 2px var(--rose), 0 10px 30px rgba(10, 10, 16, 0.35); }
.dash-setup b { color: #fff; }
.dash-setup .muted, .dash-setup .small { color: rgba(255, 255, 255, 0.72); }
.dash-setup > .ico { color: var(--rose); }
/* schwarze Kennzahlen-Leisten: ein Hauch Rot */
.dash-tiles, .inv-tiles { background: radial-gradient(520px 220px at 100% 0%, rgba(236, 11, 122, 0.2), rgba(236, 11, 122, 0) 70%), radial-gradient(420px 200px at 0% 100%, rgba(75, 75, 75, 0.25), rgba(75, 75, 75, 0) 70%), var(--ink); }
@media (max-width: 760px) {
  .dash-hello::after, .hello-hero::after { width: 210px; height: 210px; right: -60px; top: 30%; opacity: 0.55; }
  .auth-hero::after { width: 300px; height: 300px; right: -80px; top: 34%; opacity: 0.7; }
}
/* Rose mit Rosenblättern (ein Bild, Rose deckend, Blätter daneben) */
.dash-hello::after { width: 500px; height: 390px; right: -20px; transform: translateY(-50%); }
.hello-hero::after { width: 420px; height: 330px; right: -20px; transform: translateY(-50%); }
.auth-hero::after { width: 720px; height: 560px; right: -90px; top: 36%; transform: translateY(-50%); }
@media (max-width: 760px) {
  .dash-hello::after, .hello-hero::after { width: 300px; height: 232px; right: -70px; top: 28%; opacity: 0.5; }
  .auth-hero::after { width: 400px; height: 310px; right: -110px; top: 30%; opacity: 0.75; }
}

/* ---------- Begrüßungsflächen: das Rosenbild (Rose rechts, links Platz für Text) ---------- */
.dash-hello, .hello-hero, .auth-hero {
  background-color: #0a0a10;
  background-image: url(/img/hero-bg.webp);
  background-repeat: no-repeat;
  background-size: auto 135%;
  background-position: right 42%;
}
.dash-hello::after, .hello-hero::after, .auth-hero::after { content: none; display: none; }
.auth-hero {
  background-image: linear-gradient(0deg, rgba(10, 10, 16, 0.92) 0%, rgba(10, 10, 16, 0.35) 38%, rgba(10, 10, 16, 0) 60%), url(/img/hero-bg.webp);
  background-size: auto, cover; background-position: 0 0, 78% center;
}
@media (max-width: 760px) {
  /* am Handy liegt der Text über der Rose: abgedunkelt, damit alles gut lesbar bleibt */
  .dash-hello, .hello-hero {
    background-image: linear-gradient(90deg, rgba(10, 10, 16, 0.88) 0%, rgba(10, 10, 16, 0.6) 55%, rgba(10, 10, 16, 0.25) 100%), url(/img/hero-bg.webp);
    background-size: auto, auto 100%; background-position: 0 0, 88% center;
  }
  .auth-hero { background-position: 0 0, 82% 30%; }
}

/* ---------- Rechnungen: eine Karte je Agent:in ---------- */
.inv-group-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.inv-group-av { width: 46px; height: 46px; flex: none; font-size: 15px; }
.inv-group-title { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.inv-group-title h3 { margin: 0; font-size: 19px; overflow-wrap: anywhere; }
.inv-group-badges { gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 760px) {
  .inv-group-badges { justify-content: flex-start; flex: 1 1 100%; }
}

/* Rechnungen: Agent:in wählen – nur die Auswahlliste, über die ganze Breite */
.inv-people { display: block; width: 100%; margin: 0 0 14px; }
.inv-pick, .inv-pick:not(.x) { display: block; width: 100%; min-width: 0; min-height: 52px; font-weight: 700; }
@media (max-width: 760px) {
  .inv-people { margin: 0 0 12px; }
}

/* Hinweis nach einem Update des Servers: „Jetzt neu laden“ */
.update-bar { position: fixed; z-index: 90; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 18px; border-radius: 999px; background: var(--ink); color: #fff; box-shadow: 0 18px 50px rgba(10, 10, 16, 0.3); font-weight: 700; font-size: 14px; max-width: calc(100vw - 24px); }
.update-bar .ico { width: 18px; height: 18px; color: var(--rose); flex: none; }
@media (max-width: 760px) { .update-bar { bottom: calc(84px + env(safe-area-inset-bottom)); left: 12px; right: 12px; transform: none; } }

/* Kalender „7 Tage“: am Computer die Tage nebeneinander */
@media (min-width: 761px) { .cal-agenda { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); align-items: start; gap: 12px; } }

/* ---------- Updates: Schritte, Fortschritt, Neustart ---------- */
.upd-state { font-size: 16px; margin-top: 10px; }
.upd-actions { margin-top: 14px; }
.upd-run { margin-top: 16px; padding: 16px 18px; border-radius: 22px; background: linear-gradient(180deg, #f8f8fb 0%, #f1f1f4 100%); box-shadow: inset 0 0 0 1px rgba(10, 10, 16, 0.04); display: flex; flex-direction: column; gap: 12px; }
.upd-run p { margin: 0; }
.upd-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.upd-steps li { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; color: var(--faint); }
.upd-steps li.done { color: var(--text); }
.upd-steps li.now { color: var(--text); }
.upd-dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font-size: 12.5px; font-weight: 800; flex: none; }
.upd-dot .ico { width: 14px; height: 14px; }
.upd-steps li.done .upd-dot { background: var(--ink); color: #fff; }
.upd-steps li.now .upd-dot { background: var(--rose); color: var(--on-rose); animation: upd-pulse 1.4s ease-in-out infinite; }
.upd-pct { font-variant-numeric: tabular-nums; color: var(--muted); }
.upd-bar { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.upd-bar > span { display: block; height: 100%; border-radius: 4px; background: var(--rose); transition: width 0.3s ease; }
.upd-error { display: flex; gap: 8px; align-items: flex-start; }
.upd-error .ico { width: 16px; height: 16px; flex: none; margin-top: 2px; }
@keyframes upd-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(236, 11, 122, 0.45); } 50% { box-shadow: 0 0 0 6px rgba(236, 11, 122, 0); } }
@media (prefers-reduced-motion: reduce) { .upd-steps li.now .upd-dot { animation: none; } }
.inv-dates { margin: 0 0 14px; padding: 0 0 12px; border-top: 0; border-bottom: 1px solid var(--line); }
.dash-tile .dash-sub { color: var(--ink-muted); font-weight: 600; }

/* Rose (gefüllte Fläche): auf dunklem Grund heller, damit sie so leicht wirkt wie die Linien-Symbole */
.nav a:not(.on) .ico-rose, .tabbar a:not(.on) .ico-rose { color: #e4e4e7; }

/* Termin-Dialog: „Rose ruft an“ */
.cal-call > span:first-child { display: inline-flex; align-items: center; gap: 6px; }
.cal-call > span:first-child .ico { width: 16px; height: 16px; color: var(--rose); }
.cal-call .small { font-weight: 500; }

/* Kalender ohne Seitenleiste: volle Breite; Monat nur mit Punkten, Termine des Tags darunter */
.cal-layout { grid-template-columns: minmax(0, 1fr); }
.cal-whorow { flex-wrap: wrap; row-gap: 10px; }
.cal-whorow .cal-legend { border-top: 0; padding-top: 0; margin-left: auto; }
.mo-cell { min-height: 78px; padding: 10px 4px 8px; align-items: center; gap: 8px; }
.mo-num { width: 32px; height: 32px; font-size: 14px; }
.mo-cell.sel:not(.today) .mo-num { background: var(--ink); color: #fff; }
.mo-cell.sel { box-shadow: none; background: var(--bg-2); }
.mo-dots { display: flex; gap: 4px; justify-content: center; min-height: 8px; }
.mo-dots i { width: 8px; height: 8px; }
.mo-day { margin-top: 18px; padding: 16px 18px; border-radius: 22px; background: var(--bg-2); }
.mo-day h3 { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.mo-day .stack { margin-top: 12px; }
.mo-day .cal-item { background: #fff; }
@media (max-width: 760px) {
  .mo-cell { min-height: 56px; padding: 6px 2px; gap: 5px; }
  .mo-num { width: 28px; height: 28px; font-size: 13px; }
  .mo-dots i { width: 6px; height: 6px; }
  .mo-day { padding: 14px 12px; }
  .cal-whorow .cal-legend { margin-left: 26px; }
}
.cal-whorow .cal-who { flex: 1 1 220px; }
@media (max-width: 760px) { .cal-whorow .cal-legend { flex-basis: 100%; } }

/* Nachrichten: Verlauf-Menü, ältere laden */
.msgr-thread-menu { margin-left: auto; }
.msgr-act { justify-content: flex-start; text-align: left; height: auto; min-height: 60px; padding: 12px 16px; gap: 12px; }
.msgr-act > span { display: flex; flex-direction: column; gap: 2px; }
.msgr-act.danger b { color: var(--err); }
.msgr-act.danger > .ico { color: var(--err); }
.msgr-older { display: flex; justify-content: center; padding: 6px 0 12px; }
.ico.flip { transform: rotate(180deg); }

/* Mitteilungen unter der Glocke: löschen, antippen öffnet die Seite */
.drop-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 6px 10px 14px; }
.drop-head b { font-size: 16px; }
.drop .item { display: flex; align-items: flex-start; gap: 6px; padding: 10px 6px 10px 14px; }
.drop .item-txt { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.drop .item.go .item-txt { cursor: pointer; }
.drop .item.unread b::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--rose); margin-right: 7px; vertical-align: 1px; }
.drop-x { flex: none; width: 36px; height: 36px; min-height: 36px; color: var(--muted); }
.drop-x:hover { color: var(--text); }
.drop-empty { padding: 4px 14px 14px; }

/* ---------- Support (Tickets) – baut auf den Nachrichten-Bausteinen auf ---------- */
.tk-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tk-tools { display: flex; flex-direction: column; gap: 10px; padding: 0 14px 10px; }
.tk-tools input[type="search"] { min-height: 44px; height: 44px; }
.tk-item { align-items: stretch; }
.tk-item-meta { display: flex; align-items: center; gap: 8px; margin: 3px 0 2px; min-width: 0; }
.tk-item-who { font-size: 12.5px; color: var(--muted); font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msgr-item.on .tk-item-who { color: var(--ink-muted); }
.tk-st { flex: none; display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 800; background: var(--bg-2); color: var(--text); }
.tk-st.neu { background: var(--rose); color: var(--on-rose); }
.tk-st.in_bearbeitung { background: var(--ink); color: #fff; }
.msgr-item.on .tk-st.in_bearbeitung { background: #fff; color: var(--ink); }
.tk-st.wartet { background: #fbcde4; color: var(--rose-2); }
.tk-st.erledigt { background: #fbc6e0; color: var(--ok); }
.tk-mini { width: 22px; height: 22px; font-size: 9px; flex: none; }
.tk-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--rose); flex: none; align-self: center; }
.tk-none { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 36px 16px; text-align: center; }
.tk-none .ico { width: 30px; height: 30px; color: var(--faint); }
.tk-thread-head .msgr-thread-title { flex: 1; }
.tk-head-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.tk-bar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 12px 20px 0; }
.tk-bar .field { margin: 0; font-size: 12.5px; }
.tk-bar select { min-height: 42px; height: 42px; }
.tk-creator { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 12px 20px 0; padding: 12px 16px; border-radius: 20px; background: var(--bg-2); }
.tk-creator > div { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.tk-msgs { padding-top: 12px; }
.tk-who { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 800; color: var(--rose-2); margin-bottom: 2px; }
.msgr-row.mine .tk-who { color: var(--rose); }
.tk-who .ico { width: 13px; height: 13px; }
.tk-av-creator { background: var(--rose); color: var(--on-rose); }
.tk-note .msgr-bubble { background: #fabbda !important; color: var(--text) !important; box-shadow: inset 0 0 0 1px #ec0b7a; }
.tk-note .tk-who { color: #49152f !important; }
.tk-note .msgr-meta { color: var(--muted) !important; }
.tk-img { display: block; margin: 4px 0; }
.tk-img img { display: block; max-width: min(320px, 100%); max-height: 320px; border-radius: 16px; }
.tk-compose .box.internal { background: #fabbda; box-shadow: inset 0 0 0 1px #ec0b7a; }
.tk-compose-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 4px 0; }
.tk-internal-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; color: var(--muted); }
.tk-internal-toggle .ico { width: 15px; height: 15px; }
@media (max-width: 760px) {
  .tk-bar { grid-template-columns: 1fr 1fr; padding: 10px 12px 0; }
  .tk-bar .field:last-child { grid-column: 1 / -1; }
  .tk-creator { margin: 10px 12px 0; gap: 6px 18px; }
  .tk-compose-row .row { flex: 1; justify-content: flex-end; }
  .tk-head-actions .btn.primary .ico + * { display: inline; }
}

/* Support: einklappbare Details, Antwort-Leiste am Handy in einer Zeile */
.tk-details { margin: 10px 20px 0; border-radius: 22px; background: var(--bg-2); }
.tk-details > summary { list-style: none; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 14px; cursor: pointer; font-weight: 700; font-size: 13.5px; }
.tk-details > summary::-webkit-details-marker { display: none; }
.tk-details > summary > .ico { width: 18px; height: 18px; margin-left: auto; transition: transform 0.15s; flex: none; }
.tk-details[open] > summary > .ico { transform: rotate(180deg); }
.tk-sum-txt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.tk-details .tk-bar { padding: 0 14px 10px; }
.tk-details .tk-creator { margin: 0 14px 14px; background: #fff; }
.tk-details .tk-bar select { background-color: #fff; }
@media (max-width: 760px) {
  .tk-details { margin: 8px 12px 0; }
  .tk-details .tk-bar { padding: 0 10px 8px; }
  .tk-details .tk-creator { margin: 0 10px 10px; }
  .tk-compose-row { flex-wrap: nowrap; }
  .tk-compose-row .row { flex-wrap: nowrap; gap: 6px; }
  .tk-compose .cs-label { display: none; }
  .tk-compose-row .btn { padding-left: 14px; padding-right: 14px; }
}

/* Support: Auswahl statt Filter-Knöpfe, Priorität in 4 Stufen */
.tk-tools { flex-direction: row; align-items: center; gap: 8px; }
.tk-viewsel { flex: 0 0 auto; width: auto; min-width: 150px; min-height: 44px; height: 44px; font-weight: 700; }
.tk-tools input[type="search"] { flex: 1 1 auto; min-width: 0; }
.tk-prio { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 800; }
.tk-prio .ico { width: 13px; height: 13px; }
.tk-prio.hoch { background: #fabfdc; color: #551434; }
.tk-prio.dringend { background: var(--err); color: #fff; }
.tk-bar { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tk-prio-sel.dringend { box-shadow: inset 0 0 0 2px var(--err); }
.tk-prio-sel.hoch { box-shadow: inset 0 0 0 2px #ec0b7a; }
@media (max-width: 760px) {
  .tk-bar { grid-template-columns: 1fr 1fr; }
  .tk-bar .field:last-child { grid-column: auto; }
  .tk-viewsel { min-width: 132px; }
}

/* Support: ohne Thema – Status, Priorität, Zuständig */
.tk-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) {
  .tk-bar { grid-template-columns: 1fr 1fr; }
  .tk-bar .field:last-child { grid-column: 1 / -1; }
}

/* Handy: nur hoch und runter – nie seitlich verschieben (auch wenn etwas zu breit wäre), kein Doppeltipp-Zoom */
html, body { max-width: 100%; overflow-x: clip; }
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (max-width: 760px) {
  /* iPhone zoomt bei Eingabefeldern unter 16 px hinein – danach ließe sich die Seite seitlich schieben */
  input:not([type=checkbox]):not([type=radio]), select, textarea { font-size: max(16px, 1em); }
}

/* Dialoge: nie seitlich verschiebbar – lange Texte brechen um, nichts ragt über den Rand */
.modal { overflow-x: hidden; overscroll-behavior: contain; max-width: 100%; }
.modal .field, .modal label, .modal .grid > * { min-width: 0; }
.modal .btn { max-width: 100%; }
.msgr-act { white-space: normal; width: 100%; }
.msgr-act > span { min-width: 0; flex: 1; }
.msgr-act > span > * { overflow-wrap: anywhere; }
/* iPhone: Datum/Uhrzeit-Felder lassen sich sonst nicht schmaler machen als ihr Inhalt und ragen über den Rand */
input[type="date"], input[type="time"], input[type="datetime-local"] { -webkit-appearance: none; appearance: none; min-width: 0; max-width: 100%; display: block; }
input[type="date"]::-webkit-date-and-time-value, input[type="time"]::-webkit-date-and-time-value { text-align: left; min-width: 0; }

/* Anruf über den ganzen Bildschirm – auch hinter Statusleiste, Notch und Home-Balken kein heller Rand */
html.in-call, html.in-call body { background: #0a0a10; }
.call-screen { min-height: 100vh; min-height: 100dvh; padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }

/* Sicherheitsprotokoll: fester, scrollbarer Bereich statt endlos langer Seite */
.audit-head { gap: 10px; flex-wrap: wrap; align-items: center; }
.card > .row.between.audit-head:first-child > h3 { margin: 0; }
.card > .row.audit-head { margin-bottom: 12px; }
.audit-list { max-height: min(480px, 62vh); overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; background: var(--bg-2); border-radius: 22px; padding: 4px 6px; margin-top: 6px; }
.audit-list:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.audit-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 4px 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.audit-row:last-of-type { border-bottom: 0; }
.audit-row .what { min-width: 0; overflow-wrap: anywhere; }
.audit-row .when { white-space: nowrap; color: var(--muted); }
.audit-row .meta { grid-column: 1 / -1; overflow-wrap: anywhere; }
.audit-row .badge:not(.err) { background: var(--surface); }
.audit-row .badge { margin-right: 4px; }
.audit-row .mono { font-size: 12px; }
.audit-more { display: block; margin: 8px auto 10px; }
.audit-empty { padding: 14px 12px; margin: 0; }
.audit-foot { margin-top: 8px; min-height: 18px; }
@media (max-width: 520px) {
  .audit-row { grid-template-columns: minmax(0, 1fr); }
  .audit-row .when { white-space: normal; }
}

/* ---------- Wissensdatenbank ---------- */
.kb-head { flex-wrap: wrap; }
.kb-head .msgr-thread-title { flex: 1; min-width: 0; }
.kb-head .msgr-thread-title b { font-size: 20px; line-height: 1.25; overflow-wrap: anywhere; }
.kb-tools { margin-left: auto; gap: 8px; flex-wrap: wrap; }
.kb-main { gap: 12px; }
/* der Beitrag steht in einer eigenen weißen Fläche (nicht direkt auf dem grauen Hintergrund) */
.kb-card { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-s); overflow: hidden; isolation: isolate; }
.kb-body { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 26px 30px 32px; scrollbar-width: thin; }
.kb-body > * { max-width: 900px; }
.kb-body .md { font-size: 15.5px; line-height: 1.65; overflow-wrap: anywhere; }
.kb-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-top: 22px; }
.kb-img { padding: 0; border: 0; background: var(--bg-2); border-radius: 18px; overflow: hidden; cursor: zoom-in; aspect-ratio: 4 / 3; }
.kb-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kb-draft { display: flex; align-items: center; gap: 8px; background: #fbcde4; color: var(--rose-2); border-radius: 18px; padding: 10px 14px; font-weight: 700; font-size: 14px; margin: 0 0 16px; }
.kb-draft .ico { flex: none; }
.kb-publish { margin-top: 20px; }
.kb-pin { color: var(--rose); flex: none; display: inline-flex; align-self: center; }
.kb-pin .ico { width: 15px; height: 15px; }
.kb-cat { display: inline-block; height: 22px; line-height: 22px; padding: 0 9px; border-radius: 999px; background: var(--rose-soft); color: var(--rose-deep); font-size: 11.5px; font-weight: 800; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: none; }
.msgr-item.on .kb-cat { background: rgba(255, 255, 255, 0.16); color: #fff; }
.kb-item .tk-item-who { display: inline-flex; align-items: center; gap: 4px; }
.kb-item .tk-item-who .ico { width: 13px; height: 13px; }
.kb-text { min-height: 280px; resize: vertical; }
.kb-preview { min-height: 280px; max-height: 50vh; overflow: auto; background: var(--bg-2); border-radius: 22px; padding: 16px 18px; overflow-wrap: anywhere; }
.kb-thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.kb-thumb { position: relative; width: 92px; height: 92px; border-radius: 16px; overflow: hidden; background: var(--bg-2); flex: none; }
.kb-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kb-thumb-x { position: absolute; top: 4px; right: 4px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(10, 10, 16, 0.68); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }
.kb-thumb-x .ico { width: 16px; height: 16px; }
.kb-thumb.add { border: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; font: 700 12.5px var(--sans); color: var(--muted); }
.kb-thumb.add:hover { background: var(--surface-2); color: var(--text); }
@media (max-width: 760px) {
  .kb-body { padding: 16px 16px 24px; }
  .kb-head .msgr-thread-title b { font-size: 17px; }
  .kb-tools { width: 100%; justify-content: flex-end; }
}

/* ---------- Turniere & Matches ---------- */
.ev-top { margin: 4px 0 16px; gap: 12px; flex-wrap: wrap; }
.ev-top h2 { margin: 0; font-size: 24px; }
.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.ev-card { display: flex; flex-direction: column; gap: 6px; color: var(--text); text-decoration: none; transition: transform 0.12s ease, box-shadow 0.12s ease; min-width: 0; }
.ev-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.ev-card h3 { margin: 6px 0 0; font-size: 19px; overflow-wrap: anywhere; }
.ev-card p { margin: 0; }
.ev-card-top { display: flex; align-items: center; gap: 8px; }
.ev-card-ico { width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; flex: none; margin-right: auto; }
.ev-card.beendet .ev-card-ico { background: var(--rose); color: var(--on-rose); }
.ev-card-ico .ico { width: 20px; height: 20px; }
.ev-size { font-weight: 800; font-size: 12.5px; padding: 3px 10px; border-radius: 999px; background: var(--bg-2); }
.ev-st { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 800; background: var(--bg-2); color: var(--text); flex: none; }
.ev-st.laeuft { background: var(--rose); color: var(--on-rose); }
.ev-st.beendet { background: #fbc6e0; color: var(--ok); }
.ev-champ-line { display: flex; align-items: center; gap: 6px; font-weight: 800; color: var(--rose-deep); margin-top: 4px !important; min-width: 0; }
.ev-champ-line span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-champ-line .ico { width: 16px; height: 16px; flex: none; }
.ev-empty { text-align: center; padding: 40px 24px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ev-empty p { max-width: 520px; }
.ev-empty-ico { width: 64px; height: 64px; border-radius: 50%; background: var(--rose); color: var(--on-rose); display: grid; place-items: center; }
.ev-empty-ico .ico { width: 30px; height: 30px; }

.ev-head { margin-bottom: 16px; }
.ev-back { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: 14px; color: var(--muted); text-decoration: none; margin-bottom: 8px; min-height: 36px; }
.ev-back:hover { color: var(--text); }
.ev-back .ico { width: 18px; height: 18px; }
.ev-head-row { gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.ev-head-txt { min-width: 0; flex: 1; }
.ev-title { gap: 10px; flex-wrap: wrap; align-items: center; }
.ev-title h2 { margin: 0; font-size: 26px; overflow-wrap: anywhere; min-width: 0; }
.ev-head-txt p { margin: 6px 0 0; }
.ev-tools { gap: 8px; flex: none; }
.ev-desc { white-space: pre-wrap; overflow-wrap: anywhere; margin: 14px 0 0; background: var(--bg-2); border-radius: 20px; padding: 12px 16px; }
.ev-winner { display: flex; align-items: center; gap: 14px; background: var(--ink); color: #fff; border-radius: var(--radius); padding: 16px 22px; margin-bottom: 16px; }
.ev-winner-ico { width: 48px; height: 48px; border-radius: 50%; background: var(--rose); color: var(--on-rose); display: grid; place-items: center; flex: none; }
.ev-winner-ico .ico { width: 24px; height: 24px; }
.ev-winner div { display: flex; flex-direction: column; min-width: 0; }
.ev-winner .small { color: var(--ink-muted); font-weight: 700; }
.ev-winner b { font-size: 22px; overflow-wrap: anywhere; }
.ev-tree-card { margin-bottom: 16px; }
.tb-head { margin-bottom: 14px; gap: 10px; flex-wrap: wrap; }
.tb-head h3 { margin: 0; }
.tb-box { width: 100%; min-width: 0; }

/* der ganze Baum: Spalten je Runde, Linien zwischen den Spielen */
.tb { display: grid; column-gap: 28px; }
.tb-col { display: flex; flex-direction: column; min-width: 0; }
.tb-col-head { text-align: center; font-weight: 800; font-size: 12.5px; color: var(--muted); margin-bottom: 8px; min-height: 18px; }
.tb-col-body { flex: 1; display: flex; flex-direction: column; }
.tb-pair { flex: 1; display: flex; flex-direction: column; position: relative; }
.tb-pair:not(.single)::after { content: ''; position: absolute; right: -14px; top: 25%; bottom: 25%; width: 12px; border: 2px solid var(--line-2); border-left: 0; border-radius: 0 12px 12px 0; }
.tb-slot { flex: 1; display: flex; align-items: center; padding: 5px 0; position: relative; min-width: 0; }
.tb-col + .tb-col .tb-slot::before { content: ''; position: absolute; left: -14px; width: 14px; top: 50%; border-top: 2px solid var(--line-2); }
.tb-m { width: 100%; min-width: 0; display: flex; flex-direction: column; padding: 4px; border: 0; border-radius: 18px; background: var(--bg-2); font: inherit; color: var(--text); text-align: left; }
button.tb-m { cursor: pointer; }
button.tb-m:hover { box-shadow: inset 0 0 0 2px var(--ink); }
button.tb-m.offen { background: #fff; box-shadow: inset 0 0 0 2px var(--rose); }
button.tb-m.offen:hover { box-shadow: inset 0 0 0 2px var(--ink); }
.tb-m.leer { opacity: 0.45; }
.tb-p { display: flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; border-radius: 14px; font-size: 14px; font-weight: 600; min-width: 0; }
.tb-p + .tb-p { margin-top: 2px; }
.tb-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-s { flex: none; font-weight: 800; font-variant-numeric: tabular-nums; font-size: 13px; display: inline-flex; }
.tb-s .ico { width: 15px; height: 15px; }
.tb-p.win { background: var(--ink); color: #fff; font-weight: 800; }
.tb-p.lose { color: var(--faint); text-decoration: line-through; text-decoration-thickness: 1px; }
.tb-p.bye, .tb-p.tbd { color: var(--faint); font-style: italic; font-weight: 600; }
.tb-champ { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 16px 10px; border-radius: 22px; background: var(--bg-2); color: var(--faint); font-weight: 800; overflow-wrap: anywhere; }
.tb-champ .ico { width: 28px; height: 28px; }
.tb-champ.on { background: var(--rose); color: var(--on-rose); box-shadow: 0 10px 28px rgba(168, 15, 91, 0.28); }

/* Runde für Runde (Handy, schmale Fenster) */
.tb-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tb-tabs button { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--bg-2); color: var(--muted); font: 700 13.5px var(--sans); cursor: pointer; }
.tb-tabs button.on { background: var(--ink); color: #fff; }
.tb-tab-n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--rose); color: var(--on-rose); font-size: 11.5px; font-weight: 800; display: grid; place-items: center; }
.tb-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.tb-list-item { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tb-list-no { font-size: 12px; font-weight: 800; color: var(--muted); padding-left: 6px; }
.tb-list .tb-p { min-height: 40px; font-size: 15px; }

/* Sieg eintragen */
.ev-picks { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: start; }
.ev-pick-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ev-pick { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 12px; border: 0; border-radius: 22px; background: var(--bg-2); color: var(--text); font: 800 16px var(--sans); cursor: pointer; min-height: 96px; overflow-wrap: anywhere; text-align: center; }
.ev-pick .ico { width: 24px; height: 24px; color: var(--faint); }
.ev-pick:hover { box-shadow: inset 0 0 0 2px var(--ink); }
.ev-pick.on { background: var(--ink); color: #fff; }
.ev-pick.on .ico { color: var(--rose); }
.ev-pick span { min-width: 0; max-width: 100%; }
.ev-vs { align-self: center; color: var(--faint); font-weight: 700; font-size: 13px; }
.ev-picks .ev-vs { margin-top: 38px; align-self: start; }

/* Plätze bearbeiten */
.ev-players summary { list-style: none; cursor: pointer; }
.ev-players summary::-webkit-details-marker { display: none; }
.ev-players summary h3 { margin: 0; }
.ev-players[open] summary { margin-bottom: 8px; }
.ev-pairs { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 10px; margin: 12px 0 16px; }
.ev-pair { display: grid; grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: center; background: var(--bg-2); border-radius: 22px; padding: 8px 10px; min-width: 0; }
.ev-pair input { min-width: 0; background: var(--surface); }
.ev-pair-no { font-size: 12px; font-weight: 800; color: var(--muted); padding: 0 4px; white-space: nowrap; }
.ev-player-actions { gap: 8px; flex-wrap: wrap; }
.ev-sizes { flex-wrap: wrap; }
@media (max-width: 760px) {
  .ev-title h2 { font-size: 22px; }
  .ev-tools { width: 100%; justify-content: flex-end; }
  .ev-pairs { grid-template-columns: minmax(0, 1fr); }
  .ev-pair { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .ev-pair .ev-vs { text-align: center; }
  .ev-winner b { font-size: 19px; }
  .ev-picks { grid-template-columns: minmax(0, 1fr); }
  .ev-picks .ev-vs { margin: 0; text-align: center; align-self: center; }
  .tb-list { grid-template-columns: minmax(0, 1fr); }
}
/* Termin je Spiel */
.tb-at { display: flex; align-items: center; gap: 5px; padding: 3px 10px 4px; font-size: 11.5px; font-weight: 800; color: var(--rose-deep); min-width: 0; }
.tb-at span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-at .ico { width: 13px; height: 13px; flex: none; }
.tb-m.wartet .tb-at { color: var(--muted); }
button.tb-m.wartet:hover { box-shadow: inset 0 0 0 2px var(--ink); }
.ev-at { gap: 8px; flex-wrap: wrap; }
.ev-at input { flex: 1; min-width: 0; }
.ev-next { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--rose-deep); margin: 2px 0 0 !important; min-width: 0; }
.ev-next .ico { width: 15px; height: 15px; flex: none; }
.ev-next span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Wissensdatenbank: Videos und Schutz vor „Speichern unter“ (Rechtsklick, langes Drücken) */
.kb-videos { display: flex; flex-direction: column; gap: 14px; margin-top: 22px; }
.kb-video { background: #0a0a10; border-radius: 20px; overflow: hidden; max-width: 900px; }
.kb-video.tall { max-width: 420px; }
.kb-video video { display: block; width: 100%; max-height: 70vh; background: #0a0a10; }
.kb-body img, .kb-body video, .kb-full img { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.kb-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; background: #0a0a10; pointer-events: none; }
.kb-thumb-play { position: absolute; left: 8px; bottom: 8px; width: 26px; height: 26px; border-radius: 50%; background: rgba(10, 10, 16, 0.68); color: #fff; display: grid; place-items: center; pointer-events: none; }
.kb-thumb-play .ico { width: 14px; height: 14px; }
@media (max-width: 760px) { .kb-body { padding: 18px 16px 24px; } .kb-video.tall { max-width: 100%; } }

/* ---------- Events & Termine ---------- */
.ag-sec { margin: 8px 0 12px; font-size: 17px; }
.ag-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; margin-bottom: 22px; }
.ag-card { display: flex; gap: 16px; align-items: flex-start; color: var(--text); text-decoration: none; min-width: 0; transition: transform 0.12s ease, box-shadow 0.12s ease; }
.ag-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.ag-card.past { opacity: 0.7; }
.ag-date { flex: none; width: 64px; border-radius: 20px; background: var(--ink); color: #fff; display: flex; flex-direction: column; align-items: center; padding: 8px 0 9px; line-height: 1.1; }
.ag-card.past .ag-date { background: var(--bg-2); color: var(--text); }
.ag-date b { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; }
.ag-wd, .ag-mon { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
.ag-wd { color: var(--rose); }
.ag-card.past .ag-wd { color: var(--muted); }
.ag-card-txt { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.ag-card-top { display: flex; align-items: flex-start; gap: 8px; }
.ag-card-top h3 { margin: 0; font-size: 18px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ag-rel { flex: none; display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 800; background: var(--bg-2); white-space: nowrap; }
.ag-rel.now { background: var(--rose); color: var(--on-rose); }
.ag-line { display: flex; align-items: flex-start; gap: 6px; margin: 0; font-size: 13.5px; color: var(--muted); font-weight: 600; min-width: 0; }
.ag-line span { min-width: 0; overflow-wrap: anywhere; }
.ag-line .ico { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.ag-line.big { font-size: 15px; color: var(--text); margin-top: 6px; }
.ag-line.big .ico { width: 17px; height: 17px; margin-top: 2px; color: var(--muted); }
.ag-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; min-width: 0; }
.ag-tour { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 11.5px; font-weight: 800; max-width: 100%; min-width: 0; }
.ag-tour span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-tour .ico { width: 12px; height: 12px; flex: none; color: var(--rose); }
.ag-none { margin-bottom: 22px; }
.ag-none p { margin: 0; }
.ag-past summary { list-style: none; cursor: pointer; display: flex; align-items: center; min-height: 40px; }
.ag-past summary::-webkit-details-marker { display: none; }
.ag-past summary::after { content: '▾'; margin-left: 8px; color: var(--muted); }
.ag-past[open] summary::after { content: '▴'; }
.ag-detail-top { display: flex; gap: 18px; align-items: flex-start; min-width: 0; flex: 1; }
.ag-detail .ag-date { width: 76px; }
.ag-detail .ag-date b { font-size: 32px; }
.ag-tour-btn { margin-top: 16px; max-width: 100%; }
.ag-by { margin: 14px 0 0; }
@media (max-width: 760px) {
  .ag-list { grid-template-columns: minmax(0, 1fr); }
  .ag-card { gap: 12px; }
  .ag-date { width: 56px; }
  .ag-date b { font-size: 22px; }
  .ag-detail-top { gap: 12px; }
  .ag-detail .ag-date { width: 60px; }
  .ag-detail .ag-date b { font-size: 24px; }
}
/* Touch-Geräte: keine sichtbare Scrollleiste im Beitrag (sie zeichnete eckige Ränder in die runde Fläche) */
@media (hover: none) { .kb-body { scrollbar-width: none; } .kb-body::-webkit-scrollbar { display: none; } }

/* ---------- News & Infos ---------- */
.nw-tools { gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.nw-feed { display: flex; flex-direction: column; gap: 16px; }
.nw-post { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.nw-post.important { box-shadow: inset 0 0 0 2px var(--rose), var(--shadow-s); }
.nw-post.new .nw-title::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--rose); margin-right: 8px; vertical-align: 3px; }
.nw-meta { display: flex; align-items: center; gap: 12px; min-width: 0; flex-wrap: wrap; }
.nw-av { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #fff; overflow: hidden; }
.nw-av.small { width: 30px; height: 30px; font-size: 12px; }
.nw-who { display: flex; flex-direction: column; min-width: 0; flex: 1 1 180px; }
.nw-who b { overflow-wrap: anywhere; }
.nw-badges { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-left: auto; min-width: 0; max-width: 100%; }
.nw-badges .kb-cat { max-width: 240px; }
.nw-imp { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 999px; background: #fbcde4; color: var(--rose-deep); font-size: 12px; font-weight: 800; }
.nw-imp .ico { width: 13px; height: 13px; }
.nw-title { margin: 4px 0 0; font-size: 21px; line-height: 1.25; overflow-wrap: anywhere; }
.nw-text .md { font-size: 15.5px; line-height: 1.65; overflow-wrap: anywhere; }
.nw-text.clamped { max-height: 15em; overflow: hidden; -webkit-mask-image: linear-gradient(#0a0a10 70%, transparent); mask-image: linear-gradient(#0a0a10 70%, transparent); }
.nw-more { align-self: flex-start; margin-top: -4px; }
.nw-media { display: flex; flex-direction: column; gap: 12px; }
.nw-media .kb-gallery { margin-top: 0; }
.nw-media .kb-gallery.one { grid-template-columns: minmax(0, 560px); }
.nw-media .kb-gallery.one .kb-img { aspect-ratio: auto; max-height: 520px; }
.nw-media .kb-gallery.one .kb-img img { height: auto; max-height: 520px; object-fit: contain; background: var(--bg-2); }
.nw-media img, .nw-media video { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.nw-admin { gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; }
.nw-admin .btn:first-child { margin-right: auto; }
.nw-reader { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.nw-reader span:nth-child(2) { flex: 1; font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .nw-title { font-size: 19px; }
  .nw-admin .btn:first-child { margin-right: 0; width: 100%; justify-content: flex-start; }
  .nw-tools { width: 100%; justify-content: stretch; }
  .nw-tools > * { flex: 1; }
}

/* Konten: Person mit Bild */
.konten-who { flex-direction: row; align-items: center; gap: 12px; }
.konten-av { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #fff; overflow: hidden; }
.konten-name { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.konten-name b { overflow-wrap: anywhere; }
table.list td .konten-who { align-items: center; text-align: left; justify-content: flex-start; }
.msgr-sec-priv.first { border-top: 0; padding-top: 4px; }
/* „Auch für Creator:innen sichtbar“ */
.cr-chip { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 9px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 11.5px; font-weight: 800; flex: none; white-space: nowrap; }
.cr-chip .ico { width: 12px; height: 12px; color: var(--rose); }
.msgr-item.on .cr-chip { background: #fff; color: var(--ink); }

/* ---------- Rewards ---------- */
.rw-tabs { margin-bottom: 16px; flex-wrap: wrap; }
.rw-tabs button { display: inline-flex; align-items: center; gap: 6px; }
.rw-body { max-width: none; }
.rw-bar { height: 12px; border-radius: 999px; background: rgba(127, 127, 127, 0.25); overflow: hidden; }
.rw-bar i { display: block; height: 100%; border-radius: 999px; background: var(--rose); transition: width 0.3s ease; }
.rw-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.rw-who > div { display: flex; flex-direction: column; min-width: 0; }
.rw-who b { overflow-wrap: anywhere; }
.rw-mark { flex: none; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--surface); box-shadow: inset 0 0 0 2px var(--line-2); margin-top: 1px; }
.rw-mark .ico { width: 16px; height: 16px; }
.rw-mark.bestaetigt { background: var(--ink); color: #fff; box-shadow: none; }
.rw-mark.eingereicht { background: #fabbda; color: #551434; box-shadow: none; }
.rw-mark.abgelehnt { background: #fbcde4; color: var(--rose-deep); box-shadow: none; }
.rw-comment { color: var(--rose-deep); font-weight: 600; }
.rw-task-btns { gap: 8px; flex-wrap: wrap; margin-left: auto; }
.rw-reward { display: flex; align-items: center; gap: 12px; background: var(--rose-soft); border-radius: 18px; padding: 10px 14px; flex-wrap: wrap; }
.rw-reward.given { background: #fbc6e0; }
.rw-gift { font-size: 22px; line-height: 1; }
.rw-reward-txt { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; overflow-wrap: anywhere; }
.rw-pending { display: flex; flex-direction: column; gap: 12px; }
.rw-pend { display: flex; flex-direction: column; gap: 8px; }
.rw-pend-task { margin: 4px 0 0; font-weight: 700; font-size: 16px; overflow-wrap: anywhere; }
.rw-pend p { margin: 0; }
.rw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-bottom: 18px; }
.rw-person { display: flex; flex-direction: column; gap: 12px; color: var(--text); text-decoration: none; transition: transform 0.12s ease, box-shadow 0.12s ease; }
.rw-person:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.rw-person-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rw-person-meta .small { margin-right: auto; }
@media (max-width: 760px) {
  .rw-task-btns { width: 100%; margin-left: 0; }
  .rw-task-btns .btn { flex: 1; }
  .rw-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Creator:innen: Start und Support ---------- */
/* Support im Konto (gleiche Sprechblasen wie die öffentliche Support-Seite) */
.sp-list { display: flex; flex-direction: column; gap: 10px; }
.sp-item { display: flex; flex-direction: column; gap: 6px; color: var(--text); text-decoration: none; }
.sp-item .row { gap: 10px; align-items: flex-start; }
.sp-item b { overflow-wrap: anywhere; min-width: 0; }
.sp-item.new { box-shadow: inset 0 0 0 2px var(--rose), var(--shadow-s); }
.sp-detail { display: flex; flex-direction: column; gap: 14px; }
.sp-detail h2 { margin: 0; overflow-wrap: anywhere; }
.sp-detail .sp-thread { display: flex; flex-direction: column; gap: 12px; }
.sp-detail .sp-msg { display: flex; }
.sp-detail .sp-msg.mine { justify-content: flex-end; }
.sp-detail .sp-bubble { max-width: min(820px, 78%); background: var(--surface-2); border-radius: 24px 24px 24px 8px; padding: 12px 16px 10px; }
.sp-detail .sp-msg.mine .sp-bubble { background: var(--ink); color: #fff; border-radius: 24px 24px 8px 24px; }
.sp-detail .sp-who { font-size: 12.5px; font-weight: 800; color: var(--rose-deep); margin-bottom: 3px; }
.sp-detail .sp-msg.mine .sp-who { color: var(--rose); }
.sp-detail .sp-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.sp-detail .sp-at { font-size: 11.5px; font-weight: 600; opacity: 0.6; margin-top: 6px; text-align: right; }
.sp-detail .sp-img img { display: block; max-width: 100%; max-height: 360px; border-radius: 16px; margin-top: 8px; }
.sp-detail .sp-note { background: var(--bg-2); border-radius: 18px; padding: 10px 16px; font-weight: 600; margin: 0; }
.sp-detail .sp-reply { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); padding-top: 14px; }
.sp-detail .sp-reply .row { gap: 8px; }
@media (max-width: 760px) { .sp-detail .sp-bubble { max-width: 92%; } }

/* „Ansehen als“: Balken oben */
.view-banner { position: sticky; top: 0; z-index: 80; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 18px; background: var(--rose); color: var(--on-rose); font-weight: 700; font-size: 14px; }
.view-banner .ico { width: 18px; height: 18px; flex: none; }
.view-banner span { flex: 1 1 240px; min-width: 0; }
.view-banner .btn { background: var(--ink); color: #fff; }
html.viewing .shell { box-shadow: inset 0 0 0 4px var(--rose); }
/* Rewards: Bilder und Videos */
.rw-media { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.rw-thumb { position: relative; width: 110px; height: 110px; border-radius: 14px; overflow: hidden; background: var(--surface); flex: none; }
.rw-thumb.video { width: 200px; background: #0a0a10; }
.rw-thumb video, .rw-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; -webkit-touch-callout: none; user-select: none; }
.rw-thumb.video video { object-fit: contain; }
.rw-img { padding: 0; border: 0; width: 100%; height: 100%; cursor: zoom-in; background: none; }
.rw-media.big .rw-thumb { width: 220px; height: 160px; }
.rw-media.big .rw-thumb.video { width: 300px; }
@media (max-width: 760px) {
  .rw-thumb { width: 92px; height: 92px; }
  .rw-thumb.video, .rw-media.big .rw-thumb.video { width: 100%; height: 200px; }
  .rw-media.big .rw-thumb { width: calc(50% - 4px); height: 130px; }
}
.rw-thumb.video { width: 270px; height: 152px; }

/* ---------- Menü: Kategorien mit Unterseiten ---------- */
.side { overflow: hidden; }
.nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; padding-bottom: 8px; }
.nav::-webkit-scrollbar { display: none; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-group-head { display: flex; align-items: center; gap: 10px; padding: 0 12px 0 16px; min-height: 46px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-muted); font: 600 15px var(--sans); cursor: pointer; text-align: left; width: 100%; }
.nav-group-head:hover { background: var(--ink-2); color: #fff; }
.nav-group.has-on > .nav-group-head { color: #fff; }
.nav-group-head .nav-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-chev { display: inline-flex; transition: transform 0.15s ease; color: var(--ink-muted); }
.nav-chev .ico { width: 16px; height: 16px; }
.nav-group.open .nav-chev { transform: rotate(180deg); }
.nav-group-head .nav-sum { margin-left: 0; flex: none; }
.nav-group-head .nav-sum:not([hidden]) + .nav-chev { margin-left: -4px; }
.nav-group-body { display: flex; flex-direction: column; gap: 2px; margin: 0 0 6px 22px; padding-left: 10px; border-left: 2px solid var(--ink-2); }
.nav-group:not(.open) > .nav-group-body { display: none; }
.nav a.sub { min-height: 42px; padding: 0 14px; font-size: 14.5px; }
.nav a.sub .ico { width: 18px; height: 18px; }
.nav-sep { height: 1px; background: var(--ink-2); margin: 8px 12px; flex: none; }
@media (prefers-reduced-motion: reduce) { .nav-chev { transition: none; } }
/* mittlere Bildschirme (nur Symbole): Kategorien als Trennlinien, alle Seiten sichtbar */
@media (min-width: 761px) and (max-width: 1200px) {
  .nav-group-head { display: none; }
  .nav-group > .nav-group-body, .nav-group:not(.open) > .nav-group-body { display: flex; margin: 6px 0 0; padding: 6px 0 0; border-left: 0; border-top: 1px solid var(--ink-2); }
  .nav a.sub { justify-content: center; padding: 0; width: 52px; min-height: 52px; margin: 0 auto; border-radius: 50%; }
  .nav a.sub .ico { width: 20px; height: 20px; }
  .nav-sep { margin: 6px 8px; }
}
/* Handy: „Mehr“ nach Kategorien */
.more-list { display: flex; flex-direction: column; gap: 16px; }
.more-sec { display: flex; flex-direction: column; gap: 8px; }
.more-title { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; font-weight: 800; color: var(--muted); }
.more-title .ico { width: 16px; height: 16px; }
.more-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.more-item { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 14px; border: 0; border-radius: 18px; background: var(--bg-2); color: var(--text); font: 700 14.5px var(--sans); text-align: left; cursor: pointer; min-width: 0; }
.more-item span:first-of-type { flex: 1; min-width: 0; overflow-wrap: break-word; hyphens: manual; line-height: 1.2; }
.more-item.on { background: var(--ink); color: #fff; }
.more-item .ico { flex: none; }
/* Einstellungen in Kategorien */
.set-group-title { font-size: 12.5px; font-weight: 800; color: var(--faint); padding: 14px 14px 4px; }
.set-group-title:first-child { padding-top: 4px; }
/* einheitliche Werkzeugleiste über Listen: kurze Übersicht links, Hauptknopf rechts */
.ev-top-info { margin: 0; font-weight: 700; color: var(--muted); font-size: 14.5px; }
.ev-top-info:empty { display: none; }
.ev-top { min-height: 48px; }
.ev-top > .btn.primary:only-child, .ev-top > .ev-top-info:empty + .btn.primary { margin-left: auto; }
.dash-ico.small { width: 36px; height: 36px; flex: none; }
.dash-ico.small .ico { width: 17px; height: 17px; }

/* =====================================================================================================
   Einheitliche Bausteine – EINE Ordnung für alle Seiten (steht bewusst am Ende und gilt überall):
   1. Anzeige-Pille (Status, Art, Kategorie, Zeit, Freigabe): 24 px hoch, 12 px fett, Symbol 13 px.
   2. Zähler (Zahl neben Text/Überschrift): 22 px rund, 12 px fett, Ziffern gleich breit.
   3. Farben nach Bedeutung: Grau = Info · Schwarz = Zuordnung/in Arbeit · Rot = jetzt/neu ·
      Rosa = Hinweis/Kategorie · Grün = fertig/ok · Rotton hell = abgelehnt/Fehler · Umriss = Entwurf/wartet.
   4. Überschriften: Seite 30 · Bereich/Detail 26 · Spalten-Kopf 22 · Karte/Eintrag 18 (Handy 26/22/20/17).
   ===================================================================================================== */
:is(.badge, .ag-rel, .ag-tour, .cr-chip, .tk-st, .tk-prio, .ev-size, .ev-st, .nw-imp) {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 24px; min-height: 24px;
  padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 800; line-height: 1; letter-spacing: 0;
  white-space: nowrap; flex: none; vertical-align: middle;
}
:is(.badge, .ag-rel, .ag-tour, .cr-chip, .tk-st, .tk-prio, .ev-size, .ev-st, .nw-imp) .ico { width: 13px; height: 13px; flex: none; }
.kb-cat { height: 24px; line-height: 24px; padding: 0 10px; font-size: 12px; font-weight: 800; vertical-align: middle; }
.ag-tour { flex: 0 1 auto; justify-content: flex-start; }
.msgr-day span { height: 24px; line-height: 24px; padding: 0 12px; font-size: 12px; font-weight: 800; }
/* Zähler */
:is(.nav-count, .dash-count, .msgr-count, .tb-tab-n, .more-item .badge) {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; min-height: 22px; padding: 0 7px;
  border-radius: 999px; font-size: 12px; font-weight: 800; line-height: 1; letter-spacing: 0; font-variant-numeric: tabular-nums;
}
.bell .n, .tab-count { font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums; }
/* Farben nach Bedeutung (gleiche Bedeutung = gleiche Farbe) */
.badge.ok, .tk-st.erledigt, .ev-st.beendet { background: #fbc8e1; color: var(--ok); }
.badge.err { background: #fbcde4; color: var(--err); }
.badge.rose:not(.nav-count), .nw-imp, .kb-cat { background: var(--rose-soft); color: var(--rose-deep); }
.badge.warn, .tk-st.wartet { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.msgr-item.on .tk-st.wartet { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px #fff; }
.msgr-item.on .kb-cat { background: rgba(255, 255, 255, 0.16); color: #fff; }
/* Überschriften */
.set-title h2, .prof-who h2, .ev-title h2, .cal-title, .modal h2 { font-size: 26px; letter-spacing: -0.035em; }
.msgr-head h2, .ev-top h2 { font-size: 22px; letter-spacing: -0.03em; }
.dash-card-head h3, .inv-group-title h3, .ev-card h3, .ag-card-top h3, .ag-sec { font-size: 18px; letter-spacing: -0.02em; }
.nw-title { font-size: 20px; }
@media (max-width: 760px) {
  .set-title h2, .prof-who h2, .ev-title h2, .cal-title, .modal h2 { font-size: 22px; }
  .msgr-head h2, .ev-top h2 { font-size: 20px; }
  .dash-card-head h3, .inv-group-title h3, .ev-card h3, .ag-card-top h3, .ag-sec, .card > h3:first-child { font-size: 17px; }
  .nw-title { font-size: 18px; }
}
/* Menü nur mit Symbolen: Zähler als kleiner Punkt mit Zahl oben am Symbol (wie an der Glocke) */
@media (min-width: 761px) and (max-width: 1200px) {
  .nav a .nav-count { height: 18px; min-height: 18px; min-width: 18px; padding: 0 5px; font-size: 11px; }
}

/* ---------- Dashboard der Creator:innen (gleiche Bausteine wie das Team-Dashboard) ---------- */
.st-rw { gap: 10px; }
.st-rw-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 2px 10px 0; }
.st-rw-head b { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.st-rw .rw-bar { margin: 0 10px; }
.st-rw > p { margin: 0; padding: 0 10px; }
.st-rw .rw-mark { width: 22px; height: 22px; border-radius: 7px; flex: none; }
.st-reward { display: flex; align-items: center; gap: 10px; margin: 4px 0 0; padding: 12px 14px; border-radius: 18px; background: var(--rose-soft); color: var(--rose-deep); font-weight: 600; overflow-wrap: anywhere; }
.st-reward .ico { width: 18px; height: 18px; flex: none; }
/* ---------- Agentur-Chat (für alle, auch Creator:innen) ---------- */
.msgr-av.team.agency { background: var(--ink); color: var(--rose); }
.msgr-item.on .msgr-av.team.agency { background: #fff; }
.msgr-author { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.msgr-role { display: inline-flex; align-items: center; height: 18px; padding: 0 7px; border-radius: 999px; font-size: 10.5px; font-weight: 800; background: var(--bg-2); color: var(--muted); letter-spacing: 0; }
.msgr-role.admin { background: var(--ink); color: #fff; }
.msgr-role.creator { background: var(--rose-soft); color: var(--rose-deep); }
.msgr-row.mine .msgr-role { background: rgba(255, 255, 255, 0.16); color: #fff; }

/* =====================================================================================================
   Rangliste – dunkle „Arena“ mit Treppchen. Ausnahme von der Farbregel: Gold, Silber und Bronze für die
   Plätze 1–3 (gedämpfte Metalltöne).
   ===================================================================================================== */
:root { --gold-1: #f796c6; --gold-2: #ec0b7a; --gold-3: #6c133f; --silver-1: #ffffff; --silver-2: #d0d0d3; --silver-3: #85858b; --bronze-1: #f68fc2; --bronze-2: #b20f5f; --bronze-3: #601439; }
.rk-hero {
  position: relative; overflow: hidden; border-radius: var(--radius); padding: 28px 28px 0; color: #fff; margin-bottom: 18px;
  background: radial-gradient(120% 90% at 50% 100%, rgba(236, 11, 122, 0.38), transparent 60%), radial-gradient(60% 60% at 90% 0%, rgba(236, 11, 122, 0.22), transparent 70%), linear-gradient(160deg, #0a0a10 0%, #0a0a10 55%, #0a0a10 100%);
  box-shadow: 0 30px 60px rgba(10, 10, 16, 0.22);
}
.rk-hero::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.025) 0 2px, transparent 2px 22px); }
.rk-hero > * { position: relative; }
.rk-hero-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.rk-hero-title { display: flex; align-items: center; gap: 14px; min-width: 0; }
.rk-hero-title h2 { margin: 0; font-size: 30px; color: #fff; letter-spacing: -0.04em; }
.rk-crown { width: 52px; height: 52px; border-radius: 18px; display: grid; place-items: center; flex: none; background: linear-gradient(145deg, var(--gold-1), var(--gold-2) 55%, var(--gold-3)); box-shadow: 0 10px 30px rgba(236, 11, 122, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.6); }
.rk-crown .ico { width: 26px; height: 26px; color: #201c23; }
.rk-period { display: inline-block; margin-top: 4px; font-size: 13px; font-weight: 800; color: #f9b0d4; letter-spacing: 0.01em; }
.rk-admin { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rk-admin .btn.rk-ghost { color: #fff; background: rgba(255, 255, 255, 0.08); }
.rk-admin .btn.rk-ghost:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }
.rk-switch { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; color: #e9e9ec; cursor: pointer; padding: 6px 12px 6px 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); }
.rk-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rk-switch-ui { width: 40px; height: 24px; border-radius: 999px; background: rgba(255, 255, 255, 0.22); position: relative; transition: background 0.2s; flex: none; }
.rk-switch-ui::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform 0.2s; box-shadow: 0 1px 4px rgba(10, 10, 16, 0.3); }
.rk-switch input:checked + .rk-switch-ui { background: var(--rose); }
.rk-switch input:checked + .rk-switch-ui::after { transform: translateX(16px); }
.rk-switch input:focus-visible + .rk-switch-ui { box-shadow: 0 0 0 2px #fff; }
.rk-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 18px auto 0; max-width: 620px; padding: 5px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.rk-tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border: 0; border-radius: 999px; background: transparent; color: #d4d4d7; font: 800 14px var(--sans); cursor: pointer; transition: background 0.15s, color 0.15s; min-width: 0; }
.rk-tabs button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-tabs button .ico { width: 17px; height: 17px; flex: none; }
.rk-tabs button:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.rk-tabs button.on { background: var(--rose); color: var(--on-rose); box-shadow: 0 8px 22px rgba(236, 11, 122, 0.4); }
/* Treppchen */
.rk-podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 14px; max-width: 760px; margin: 26px auto 0; }
.rk-podium.n1 { grid-template-columns: minmax(0, 1fr); max-width: 260px; }
.rk-podium.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 520px; }
.rk-pod { display: flex; flex-direction: column; align-items: center; min-width: 0; --m1: var(--bronze-1); --m2: var(--bronze-2); --m3: var(--bronze-3); }
.rk-pod.p1 { --m1: var(--gold-1); --m2: var(--gold-2); --m3: var(--gold-3); }
.rk-pod.p2 { --m1: var(--silver-1); --m2: var(--silver-2); --m3: var(--silver-3); }
.rk-pod-who { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0 4px 14px; min-width: 0; max-width: 100%; position: relative; text-align: center; }
.rk-pod.p1 .rk-pod-who::before { content: ''; position: absolute; left: 50%; top: -40px; width: 260px; height: 260px; transform: translateX(-50%); background: radial-gradient(circle, rgba(236, 11, 122, 0.22), transparent 62%); pointer-events: none; z-index: -1; }
.rk-pod-crown { display: grid; place-items: center; margin-bottom: -6px; animation: rk-float 3.2s ease-in-out infinite; filter: drop-shadow(0 6px 14px rgba(236, 11, 122, 0.55)); }
.rk-pod-crown .ico { width: 38px; height: 38px; color: var(--gold-2); fill: rgba(236, 11, 122, 0.35); }
@keyframes rk-float { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-5px) rotate(4deg); } }
.rk-pod-ring { position: relative; display: grid; place-items: center; padding: 4px; border-radius: 50%; background: conic-gradient(from 210deg, var(--m1), var(--m2), var(--m3), var(--m2), var(--m1)); box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.04), 0 14px 36px color-mix(in srgb, var(--m2) 45%, transparent); }
.rk-pod-av { width: 86px; height: 86px; font-size: 30px; box-shadow: 0 0 0 3px #0a0a10; }
.rk-pod.p1 .rk-pod-av { width: 112px; height: 112px; font-size: 38px; }
.rk-pod-badge { position: absolute; right: -2px; bottom: -2px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 15px; color: #0a0a10; background: linear-gradient(145deg, var(--m1), var(--m2) 60%, var(--m3)); box-shadow: 0 0 0 3px #0a0a10, 0 6px 14px rgba(10, 10, 16, 0.35); }
.rk-pod .rk-handle { font-size: 15px; color: #fff; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 4px; }
.rk-pod-val { display: inline-flex; align-items: center; gap: 6px; font-size: 20px; font-weight: 800; letter-spacing: -0.03em; color: var(--m1); font-variant-numeric: tabular-nums; }
.rk-pod.p1 .rk-pod-val { font-size: 24px; }
.rk-pod-val .ico { width: 17px; height: 17px; }
.rk-pod-block { width: 100%; border-radius: 22px 22px 0 0; display: flex; justify-content: center; padding-top: 12px; position: relative; overflow: hidden;
  background: linear-gradient(180deg, color-mix(in srgb, var(--m2) 55%, #0a0a10) 0%, color-mix(in srgb, var(--m3) 40%, #0a0a10) 100%); box-shadow: inset 0 2px 0 color-mix(in srgb, var(--m1) 70%, transparent), inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
.rk-pod-block span { font-size: 44px; font-weight: 800; letter-spacing: -0.04em; color: rgba(255, 255, 255, 0.85); text-shadow: 0 2px 0 rgba(10, 10, 16, 0.25); line-height: 1; }
.rk-pod.p1 .rk-pod-block { height: 150px; }
.rk-pod.p2 .rk-pod-block { height: 108px; }
.rk-pod.p3 .rk-pod-block { height: 78px; }
.rk-pod.p1 .rk-pod-block span { font-size: 58px; }
.rk-pod.me .rk-pod-ring { box-shadow: 0 0 0 4px var(--rose), 0 14px 36px rgba(236, 11, 122, 0.5); }
.rk-hero.anim .rk-pod-who { animation: rk-rise 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.2) both; animation-delay: calc(0.15s + var(--i, 0) * 0.12s); }
.rk-hero.anim .rk-pod-block { animation: rk-grow 0.6s cubic-bezier(0.2, 0.9, 0.3, 1) both; transform-origin: bottom; animation-delay: calc(var(--i, 0) * 0.12s); }
@keyframes rk-rise { from { opacity: 0; transform: translateY(26px) scale(0.92); } to { opacity: 1; transform: none; } }
@keyframes rk-grow { from { transform: scaleY(0.1); opacity: 0.4; } to { transform: none; opacity: 1; } }
/* Veränderung */
.rk-delta { display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 7px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: 0; font-variant-numeric: tabular-nums; flex: none; }
.rk-delta i { font-style: normal; font-size: 9px; }
.rk-delta.up { background: #fbc8e1; color: var(--ok); }
.rk-delta.down { background: #fbcde4; color: var(--err); }
.rk-delta.new { background: var(--ink); color: #fff; }
.rk-delta.same { background: var(--bg-2); color: var(--muted); }
.rk-pod .rk-delta.up { background: rgba(186, 14, 99, 0.18); color: #ec0b7a; }
.rk-pod .rk-delta.down { background: rgba(236, 11, 122, 0.18); color: #ec0b7a; }
.rk-pod .rk-delta.same { background: rgba(255, 255, 255, 0.08); color: #bbbbc1; }
.rk-pod .rk-delta.new { background: #fff; color: var(--ink); }
/* Dein Platz */
.rk-me { display: flex; align-items: center; gap: 20px; margin-bottom: 18px; padding: 18px 22px; background: linear-gradient(100deg, #fff 0%, #fff 60%, #fde2ef 100%); box-shadow: var(--shadow-s), inset 0 0 0 2px var(--rose-soft); }
.rk-me-rank { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 92px; padding: 10px 14px; border-radius: 22px; background: linear-gradient(150deg, var(--rose) 0%, #7a1245 100%); color: #fff; box-shadow: 0 12px 28px rgba(236, 11, 122, 0.35); flex: none; }
.rk-me-rank span { font-size: 11.5px; font-weight: 800; opacity: 0.85; }
.rk-me-rank b { font-size: 40px; line-height: 1; font-weight: 800; letter-spacing: -0.04em; }
.rk-me-txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.rk-me-txt b { font-size: 18px; overflow-wrap: anywhere; }
.rk-gap { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: var(--rose-2); font-size: 14px; }
.rk-gap .ico { width: 16px; height: 16px; }
.rk-me.none { background: #fff; box-shadow: var(--shadow-s); }
.rk-me-ico { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-2); flex: none; }
/* Liste */
.rk-table { padding: 22px; }
.rk-table-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.rk-table-head h3 { margin: 0; }
.rk-search { max-width: 260px; min-height: 44px; height: 44px; }
.rk-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.rk-row { display: grid; grid-template-columns: 40px 44px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 14px 10px 8px; border-radius: 20px; transition: background 0.15s; }
.rk-row:hover { background: var(--bg-2); }
.rk-row.me { background: var(--rose-soft); box-shadow: inset 0 0 0 2px rgba(236, 11, 122, 0.35); }
.rk-rank { text-align: center; font-size: 17px; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.rk-row.top .rk-rank { color: #fff; width: 32px; height: 32px; line-height: 32px; border-radius: 50%; margin: 0 auto; font-size: 14px; background: linear-gradient(145deg, var(--bronze-1), var(--bronze-2) 60%, var(--bronze-3)); }
.rk-row.top.p1 .rk-rank { background: linear-gradient(145deg, var(--gold-1), var(--gold-2) 60%, var(--gold-3)); color: #201c23; }
.rk-row.top.p2 .rk-rank { background: linear-gradient(145deg, var(--silver-1), var(--silver-2) 60%, var(--silver-3)); color: #222228; }
.rk-av { width: 44px; height: 44px; font-size: 16px; }
.av.rk-letter { background: linear-gradient(145deg, #2a2a30, #0a0a10); color: #fff; font-weight: 800; }
.rk-row-mid { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.rk-row-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rk-row .rk-handle { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.rk-you { flex: none; height: 20px; line-height: 20px; padding: 0 8px; border-radius: 999px; background: var(--rose); color: var(--on-rose); font-size: 11px; font-weight: 800; }
.rk-bar { height: 7px; border-radius: 999px; background: var(--bg-2); overflow: hidden; }
.rk-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ec0b7a, #ec0b7a); }
.rk-row.me .rk-bar { background: rgba(255, 255, 255, 0.7); }
.rk-val { display: inline-flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; justify-self: end; }
.rk-val .ico, .rk-pod-val .ico { color: var(--rose); }
.rk-pod-val .ico { color: var(--m1); }
.rk-none { padding: 18px; text-align: center; color: var(--muted); }
.rk-foot { margin: 14px 0 0; }
.rk-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.rk-empty { margin-top: 0; }
.rk-hero:not(:has(.rk-podium)) { padding-bottom: 28px; }
@media (prefers-reduced-motion: reduce) { .rk-pod-crown { animation: none; } .rk-hero.anim .rk-pod-who, .rk-hero.anim .rk-pod-block { animation: none; } }
@media (max-width: 760px) {
  .rk-hero { padding: 20px 16px 0; border-radius: 26px; }
  .rk-hero-title h2 { font-size: 24px; }
  .rk-crown { width: 44px; height: 44px; border-radius: 15px; }
  .rk-admin { width: 100%; }
  .rk-admin .btn.primary { margin-left: auto; }
  .rk-tabs { max-width: none; }
  .rk-tabs button { font-size: 12.5px; gap: 5px; min-height: 42px; }
  .rk-tabs button .ico { width: 15px; height: 15px; }
  .rk-podium { gap: 8px; margin-top: 18px; }
  .rk-pod-av { width: 58px; height: 58px; font-size: 20px; }
  .rk-pod.p1 .rk-pod-av { width: 76px; height: 76px; font-size: 26px; }
  .rk-pod-badge { width: 24px; height: 24px; font-size: 12px; }
  .rk-pod-crown .ico { width: 28px; height: 28px; }
  .rk-pod .rk-handle { font-size: 12.5px; }
  .rk-pod-val { font-size: 15px; }
  .rk-pod.p1 .rk-pod-val { font-size: 17px; }
  .rk-pod-val .ico { width: 13px; height: 13px; }
  .rk-pod.p1 .rk-pod-block { height: 104px; }
  .rk-pod.p2 .rk-pod-block { height: 76px; }
  .rk-pod.p3 .rk-pod-block { height: 56px; }
  .rk-pod-block span { font-size: 30px; }
  .rk-pod.p1 .rk-pod-block span { font-size: 40px; }
  .rk-pod-who { padding-bottom: 10px; gap: 4px; }
  .rk-pod.p1 .rk-pod-who::before { width: 180px; height: 180px; }
  .rk-me { gap: 14px; padding: 14px; }
  .rk-me-rank { min-width: 74px; padding: 8px 10px; }
  .rk-me-rank b { font-size: 32px; }
  .rk-me-txt b { font-size: 16px; }
  .rk-table { padding: 14px 10px; }
  .rk-table-head { padding: 0 6px; }
  .rk-search { max-width: none; flex: 1 1 100%; }
  .rk-row { grid-template-columns: 30px 38px minmax(0, 1fr) auto; gap: 9px; padding: 9px 8px 9px 4px; }
  .rk-av { width: 38px; height: 38px; font-size: 14px; }
  .rk-rank { font-size: 15px; }
  .rk-val { font-size: 14px; gap: 4px; }
  .rk-val .ico { width: 13px; height: 13px; }
}

.rk-row-bot { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rk-row-bot .rk-bar { flex: 1; min-width: 0; }
@media (max-width: 400px) {
  .rk-tabs button .ico { display: none; }
  .rk-tabs button { font-size: 12px; padding: 0 4px; }
  .rk-row-bot .rk-delta { height: 18px; padding: 0 6px; font-size: 10.5px; }
}

/* ---------- Rewards: Markierungen, Konfetti ---------- */
.rw-mark { border-radius: 9px; width: 28px; height: 28px; }
.rw-mark.bestaetigt { background: linear-gradient(145deg, var(--rose), #7a1245); }
.rw-confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 150; }
.rw-person .rw-who { align-items: center; }
@media (max-width: 460px) {
  .seg.rw-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; border-radius: 22px; gap: 4px; }
  .seg.rw-tabs button { justify-content: center; text-align: center; white-space: normal; line-height: 1.15; padding: 6px 6px; min-height: 46px; border-radius: 18px; font-size: 12.5px; gap: 4px; flex-wrap: wrap; }
}

/* =====================================================================================================
   Premium-Schicht – EIN Look für die ganze App (steht am Ende und gilt überall):
   leichter Rosé-Schimmer im Hintergrund, Karten mit feinem Lichtrand und weichem Schatten, leuchtende
   Hauptknöpfe, edles Menü, gläserne Handy-Leiste, dunkle „Arena“-Köpfe (.arena), sanftes Einblenden.
   ===================================================================================================== */
:root {
  --shadow-card: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 1px 2px rgba(10, 10, 16, 0.04), 0 12px 32px rgba(10, 10, 16, 0.06);
  --shadow-lift: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 2px 4px rgba(10, 10, 16, 0.05), 0 22px 48px rgba(10, 10, 16, 0.11);
  --glow-rose: 0 10px 26px rgba(236, 11, 122, 0.32);
  --grad-rose: linear-gradient(135deg, #ec0b7a 0%, #ec0b7a 48%, #9e1056 100%);
  --grad-ink: radial-gradient(circle at 30% 25%, #3b3b41 0%, #0a0a10 62%, #0a0a10 100%);
}
body { background: radial-gradient(1100px 620px at 92% -8%, rgba(236, 11, 122, 0.09), transparent 62%), radial-gradient(900px 520px at -6% 108%, rgba(236, 11, 122, 0.06), transparent 60%), var(--bg); }
@media (hover: hover) and (min-width: 761px) { body { background-attachment: fixed; } }
.top { background: rgba(233, 233, 233, 0.72); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3); }
.top > .btn.ghost.icon, .top > .bell { box-shadow: inset 0 1px 0 #fff, 0 2px 4px rgba(10, 10, 16, 0.05), 0 8px 20px rgba(10, 10, 16, 0.07); }
/* Karten */
.card { box-shadow: var(--shadow-card); }
a.card, button.card { transition: transform 0.18s ease, box-shadow 0.18s ease; }
a.card:hover, button.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); text-decoration: none; }
.card h3 > .ico:first-child, .card h2 > .ico:first-child, .dash-ico { background: var(--grad-ink); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 6px 14px rgba(10, 10, 16, 0.16); }
/* Abschnitts-Überschriften mit rotem Akzent */
.ag-sec { display: flex; align-items: center; gap: 10px; }
.ag-sec::before { content: ''; width: 5px; height: 18px; border-radius: 4px; background: var(--grad-rose); box-shadow: 0 0 12px rgba(236, 11, 122, 0.45); flex: none; }
/* Knöpfe */
.btn.primary, .btn.primary.icon { background: var(--grad-rose); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 8px 20px rgba(236, 11, 122, 0.28); }
.btn.primary:hover { background: linear-gradient(135deg, #ec0b7a 0%, #ec0b7a 50%, #af0f5e 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 12px 26px rgba(236, 11, 122, 0.36); transform: translateY(-1px); }
.btn.primary:active { transform: translateY(1px); }
.btn.primary:disabled { box-shadow: none; transform: none; }
.btn:not(.primary):not(.ghost):not(.danger):not(.dark) { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7); }
/* Menü links */
.side { background: radial-gradient(420px 300px at -10% -5%, rgba(236, 11, 122, 0.18), transparent 70%), radial-gradient(320px 260px at 110% 105%, rgba(236, 11, 122, 0.10), transparent 70%), #0a0a10; box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.05); }
.brand img { box-shadow: 0 8px 22px rgba(236, 11, 122, 0.35); }
.nav a.on { background: var(--grad-rose); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 10px 26px rgba(236, 11, 122, 0.34); }
.nav a:not(.on):hover, .nav-group-head:hover { background: rgba(255, 255, 255, 0.06); }
.side-foot { background: linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
.nav-sep { background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent); }
/* Fenster und Meldungen */
.backdrop { background: radial-gradient(800px 500px at 50% 30%, rgba(236, 11, 122, 0.12), transparent 70%), rgba(10, 10, 16, 0.46); }
.modal { box-shadow: 0 40px 100px rgba(10, 10, 16, 0.32), inset 0 1px 0 #fff; }
.toast { box-shadow: 0 18px 44px rgba(10, 10, 16, 0.22); }
/* Handy: gläserne Leiste mit leuchtendem Punkt */
@media (max-width: 760px) {
  .tabbar { background: rgba(10, 10, 16, 0.88); backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5); box-shadow: 0 18px 44px rgba(10, 10, 16, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.07); }
  .tabbar a.on { background: var(--grad-rose); box-shadow: 0 8px 20px rgba(236, 11, 122, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
}
/* Seitenwechsel: sanft einblenden */
.page { animation: pg-in 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes pg-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .page { animation: none; } a.card:hover, button.card:hover, .btn.primary:hover { transform: none; } }

/* ---------- Arena-Kopf für Seiten (app.hero) ---------- */
.arena { position: relative; overflow: hidden; color: #fff; border-radius: var(--radius);
  background: radial-gradient(70% 120% at 8% 20%, rgba(236, 11, 122, 0.30), transparent 60%), radial-gradient(55% 90% at 100% 0%, rgba(236, 11, 122, 0.16), transparent 70%), linear-gradient(160deg, #0a0a10 0%, #0a0a10 58%, #0a0a10 100%);
  box-shadow: 0 26px 56px rgba(10, 10, 16, 0.2); }
.arena::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.025) 0 2px, transparent 2px 22px); }
.arena > * { position: relative; }
.px-hero { padding: 24px 26px; margin-bottom: 18px; display: flex; flex-direction: column; gap: 18px; }
.px-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.px-ico { width: 58px; height: 58px; border-radius: 20px; display: grid; place-items: center; flex: none; background: var(--grad-rose); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 12px 28px rgba(236, 11, 122, 0.4); }
.px-ico .ico { width: 28px; height: 28px; color: #fff; }
.px-txt { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.px-kicker { font-size: 12.5px; font-weight: 800; color: #f79cc9; letter-spacing: 0.02em; }
.px-txt h2 { margin: 0; font-size: 28px; line-height: 1.1; letter-spacing: -0.04em; color: #fff; overflow-wrap: anywhere; }
.px-txt p { margin: 2px 0 0; color: #cfcfd2; font-size: 14.5px; overflow-wrap: anywhere; }
.px-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-left: auto; }
.px-actions select { background-color: rgba(255, 255, 255, 0.1); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); min-height: 46px; height: 46px; width: auto; }
.px-actions select:focus, .px-actions select.sel-open { background-color: rgba(255, 255, 255, 0.16); box-shadow: 0 0 0 2px #fff; }
.px-actions .btn:not(.primary) { background: rgba(255, 255, 255, 0.1); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
.px-actions .btn:not(.primary):hover { background: rgba(255, 255, 255, 0.16); }
.px-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.px-stat { display: flex; flex-direction: column; gap: 1px; padding: 12px 16px; border-radius: 18px; background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07); min-width: 0; }
.px-stat b { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; color: var(--rose); font-variant-numeric: tabular-nums; }
.px-stat span { font-size: 12.5px; color: var(--ink-muted); font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .px-hero { padding: 18px 16px; border-radius: 26px; gap: 14px; }
  .px-row { gap: 14px; }
  .px-ico { width: 48px; height: 48px; border-radius: 16px; }
  .px-ico .ico { width: 24px; height: 24px; }
  .px-txt { flex-basis: calc(100% - 64px); }
  .px-txt h2 { font-size: 22px; }
  .px-actions { width: 100%; margin-left: 0; }
  .px-actions > * { flex: 1 1 auto; }
  .px-actions select { width: 100%; flex: 1 1 100%; }
  .px-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .px-stat { padding: 10px 12px; border-radius: 15px; }
  .px-stat b { font-size: 18px; }
  .px-stat span { font-size: 11.5px; }
}
.rk-hero-title .rk-period { margin: 0 0 2px; }
.rk-hero-title h2 { overflow-wrap: anywhere; }
/* Profil: Karte als Arena mit leuchtendem Bildrahmen */
.prof-card.arena { padding: 34px 24px 26px; box-shadow: 0 26px 56px rgba(10, 10, 16, 0.2); }
.prof-card.arena .prof-who h2 { color: #fff; }
.prof-card.arena .prof-note { color: var(--ink-muted); }
.prof-tt { font-weight: 800; color: #f79cc9; font-size: 14px; }
.prof-card.arena .badge.rose { background: var(--grad-rose); color: var(--on-rose); box-shadow: 0 6px 16px rgba(236, 11, 122, 0.35); }
.prof-card.arena .btn:not(.primary) { background: rgba(255, 255, 255, 0.1); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
.prof-card.arena .btn.danger { color: #ec0b7a; }
.prof-card.arena .av, .prof-card.arena img { box-shadow: 0 0 0 4px #0a0a10, 0 0 0 7px rgba(236, 11, 122, 0.85), 0 18px 44px rgba(236, 11, 122, 0.35); }
/* dunkle Kacheln: kein heller Lichtrand, beim Darüberfahren nur heller */
:is(.inv-tiles, .dash-tiles, .arena) .card, .card.stat.dash-tile, .card.stat.inv-tile { box-shadow: none; }
:is(.inv-tiles, .dash-tiles) :is(a.card, button.card):hover { transform: none; box-shadow: none; background-color: rgba(255, 255, 255, 0.05); }
@media (max-width: 760px) {
  .px-stats { grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 6px; }
  .px-stat { padding: 9px 10px; border-radius: 14px; }
  .px-stat b { font-size: 17px; }
  .px-stat span { font-size: 11px; line-height: 1.25; }
  .px-txt p { font-size: 13.5px; }
  .px-actions .btn { height: 44px; }
}
/* Einstellungen → Kommunikation: Schritte je Gerät */
.ko-dev { display: block; margin: 10px 0 6px; }
.ko-steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.ko-steps li { overflow-wrap: anywhere; }
.ko-more { margin-top: 12px; }
.ko-more summary { cursor: pointer; font-weight: 800; color: var(--rose-2); }

/* =====================================================================================================
   Rewards als Skill-Baum: weißes Brett, Kacheln im Raster, Linien zur Kachel davor.
   Geschafft = Goldrahmen mit Leuchten · frei = Rose-Rahmen, sanft pulsierend · gesperrt = hellgrau, blass.
   Größen kommen aus dem Skript: --t (Kachel) und --g (Abstand), passend zur Breite.
   ===================================================================================================== */
.sk-page { display: flex; flex-direction: column; gap: 14px; }
.sk-page > .ev-top { margin: 0; }
.sk-intro { margin: -4px 0 0; max-width: 820px; }
.sk-board { --t: 96px; --g: 32px; position: relative; overflow: hidden; padding: 0; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-card, var(--shadow-s)); }
.sk-board { background: #fff; }
/* der Baum scrollt in seinem eigenen Fenster (feste Höhe) – oben/unten blendet er weich aus, wenn es weitergeht */
.sk-canvas { width: max-content; min-width: 100%; box-sizing: border-box; }
.sk-scroll { position: relative; z-index: 1; padding: 0; overflow: auto; max-height: max(420px, calc(100vh - 300px)); max-height: max(420px, calc(100dvh - 300px));
  overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: rgba(10, 10, 16, 0.22) transparent; outline: none; }
/* die Kachel */
.sk-tile { position: absolute; inset: 0; z-index: 1; padding: 0; margin: 0; cursor: pointer; font: inherit; color: #fff; border-radius: calc(var(--t) * 0.26);
  border: 2px solid transparent; background: linear-gradient(160deg, #201c23, #0a0a10) padding-box, linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.06)) border-box;
  box-shadow: 0 10px 22px rgba(10, 10, 16, 0.22); transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.18s; -webkit-tap-highlight-color: transparent; }
.sk-face { position: absolute; inset: 0; border-radius: calc(var(--t) * 0.26 - 2px); overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: calc(var(--t) * 0.05); padding: 8% 7%; }
.sk-face > .ico { width: calc(var(--t) * 0.36); height: calc(var(--t) * 0.36); flex: none; stroke-width: 1.9; filter: drop-shadow(0 2px 6px rgba(10, 10, 16, 0.5)); }
.sk-face > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; -webkit-touch-callout: none; user-select: none; }
.sk-name { position: relative; max-width: 100%; font-size: 11.5px; font-weight: 800; line-height: 1.15; letter-spacing: -0.01em; text-align: center; overflow-wrap: anywhere; hyphens: auto;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-shadow: 0 1px 3px rgba(10, 10, 16, 0.6); }
.sk-board.mid .sk-name { font-size: 10px; }
.sk-board.tiny .sk-name { display: none; }
/* Zustände */
.sk-tile.done { background: linear-gradient(160deg, #221e25, #0a0a10) padding-box, linear-gradient(145deg, #f796c6, #ec0b7a 40%, #741242 75%, #ec0b7a) border-box;
  box-shadow: 0 0 0 3px rgba(236, 11, 122, 0.18), 0 0 26px rgba(236, 11, 122, 0.5), 0 10px 22px rgba(10, 10, 16, 0.22); }
.sk-tile.open { background: linear-gradient(160deg, #241e28, #0a0a10) padding-box, linear-gradient(145deg, #ec0b7a, #ec0b7a 45%, #68133d) border-box;
  box-shadow: 0 0 0 3px rgba(236, 11, 122, 0.2), 0 0 26px rgba(236, 11, 122, 0.55), 0 10px 22px rgba(10, 10, 16, 0.22); animation: sk-pulse 2.6s ease-in-out infinite; }
.sk-tile.open.eingereicht { animation: none; box-shadow: 0 0 0 3px rgba(236, 11, 122, 0.2), 0 0 20px rgba(236, 11, 122, 0.35), 0 10px 22px rgba(10, 10, 16, 0.22);
  background: linear-gradient(160deg, #241e28, #0a0a10) padding-box, linear-gradient(145deg, #f796c6, #ec0b7a 50%, #ec0b7a) border-box; }
@keyframes sk-pulse { 0%, 100% { box-shadow: 0 0 0 3px rgba(236, 11, 122, 0.2), 0 0 18px rgba(236, 11, 122, 0.45), 0 10px 22px rgba(10, 10, 16, 0.22); } 50% { box-shadow: 0 0 0 5px rgba(236, 11, 122, 0.14), 0 0 34px rgba(236, 11, 122, 0.75), 0 10px 22px rgba(10, 10, 16, 0.22); } }
/* Abzeichen (Zahl, oben links) und Zustand (Haken/Schloss/Uhr, oben rechts): gleich groß, sitzen auf der Ecke der
   Kachel, weißer Rand in der Farbe des Bretts, Farbe nach Zustand (Gold · Rose · Hellgrau) */
.sk-badge, .sk-mark { --s: clamp(19px, calc(var(--t) * 0.21), 25px); position: absolute; top: calc(var(--s) * -0.2); z-index: 2; height: var(--s); border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 0 0 3px #fff, 0 3px 8px rgba(10, 10, 16, 0.18); pointer-events: none; }
.sk-badge { left: calc(var(--s) * -0.2); min-width: var(--s); padding: 0 calc(var(--s) * 0.3); font-size: clamp(10px, calc(var(--s) * 0.5), 12.5px); font-weight: 800; line-height: 1;
  letter-spacing: -0.01em; font-variant-numeric: tabular-nums; color: #fff; background: linear-gradient(145deg, #ec0b7a, #ec0b7a 55%, #8d114e); }
.sk-big.done .sk-badge { color: #1d1b1f; background: linear-gradient(145deg, #f796c6, #ec0b7a 55%, #7d1247); }
.sk-big.locked .sk-badge { color: #9d9da3; background: #efeff2; box-shadow: 0 0 0 3px #fff, inset 0 0 0 1.5px #dedee1, 0 2px 6px rgba(10, 10, 16, 0.08); }
/* Editor: Platz für eine neue Kachel */
.sk-add { position: absolute; inset: 6%; z-index: 1; border-radius: calc(var(--t) * 0.24); border: 2px dashed rgba(236, 11, 122, 0.5); background: rgba(236, 11, 122, 0.05); color: var(--rose-2);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; font: 800 11px var(--sans); transition: background 0.15s, transform 0.15s; }
.sk-add .ico { width: calc(var(--t) * 0.28); height: calc(var(--t) * 0.28); }
.sk-add:hover { background: rgba(236, 11, 122, 0.12); transform: scale(1.04); }
.sk-board.tiny .sk-add span { display: none; }
/* Legende */
.sk-key { display: inline-flex; align-items: center; gap: 7px; }
.sk-key i { width: 14px; height: 14px; border-radius: 5px; background: #f1f1f4; box-shadow: inset 0 0 0 2px #d6d6d9; }
.sk-key.done i { background: #221e25; box-shadow: inset 0 0 0 2px #ec0b7a, 0 0 8px rgba(236, 11, 122, 0.6); }
.sk-key.open i { background: #241e28; box-shadow: inset 0 0 0 2px var(--rose), 0 0 8px rgba(236, 11, 122, 0.6); }
.sk-key.wait i { background: #241e28; box-shadow: inset 0 0 0 2px #ec0b7a; }
@media (prefers-reduced-motion: reduce) { .sk-tile.open { animation: none; } .sk-tile:hover, .sk-add:hover { transform: none; } }
@media (max-width: 760px) {
  .sk-board { border-radius: 26px; }
}

/* Einzelheiten einer Kachel */
.sk-detail { display: flex; flex-direction: column; gap: 14px; }
.sk-pic { display: block; width: 100%; padding: 0; border: 0; border-radius: 22px; overflow: hidden; background: #0a0a10; cursor: zoom-in; aspect-ratio: 16 / 9; }
.sk-pic img { width: 100%; height: 100%; object-fit: cover; display: block; -webkit-touch-callout: none; user-select: none; }
.sk-pic.locked img { filter: grayscale(0.9) brightness(1.05); opacity: 0.6; }
.sk-pic.art { cursor: default; display: grid; place-items: center; aspect-ratio: auto; padding: 30px 16px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line-2); }
.sk-big { --t: 112px; position: relative; width: var(--t); height: var(--t); border-radius: 30px; display: grid; place-items: center; color: #f9b0d4;
  border: 2px solid transparent; background: linear-gradient(160deg, #241e28, #0a0a10) padding-box, linear-gradient(145deg, #ec0b7a, #ec0b7a 45%, #68133d) border-box; box-shadow: 0 0 34px rgba(236, 11, 122, 0.55); }
.sk-big > .ico { width: 50px; height: 50px; }
.sk-big.done { color: #ec0b7a; background: linear-gradient(160deg, #221e25, #0a0a10) padding-box, linear-gradient(145deg, #f796c6, #ec0b7a 40%, #741242 75%, #ec0b7a) border-box; box-shadow: 0 0 34px rgba(236, 11, 122, 0.55); }
.sk-big.locked { color: #b4b4ba; background: linear-gradient(160deg, #ffffff, #ededf0) padding-box, linear-gradient(145deg, #e4e4e7, #d6d6d9) border-box; box-shadow: 0 6px 16px rgba(10, 10, 16, 0.06); }
.sk-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.ev-st.wait { background: #fabbda; color: #551434; }
.ev-st.no { background: #fbcde4; color: var(--rose-deep); }
.sk-desc { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); }
.sk-sec { border-radius: 20px; padding: 14px 16px; background: var(--bg-2); display: flex; flex-direction: column; gap: 6px; }
.sk-sec h4 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 800; letter-spacing: 0.02em; color: var(--rose-2); }
.sk-sec h4 .ico { width: 16px; height: 16px; }
.sk-sec p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.sk-sec.prize { background: linear-gradient(100deg, #ffffff, #fcd7e9); box-shadow: inset 0 0 0 1.5px rgba(236, 11, 122, 0.18); }
.sk-sec.prize.given { background: linear-gradient(100deg, #fde4f0, #fbc8e1); box-shadow: inset 0 0 0 1.5px rgba(69, 69, 69, 0.25); }
.sk-sec.prize.given h4 { color: var(--ok); }
.sk-prize-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sk-prize-txt { flex: 1 1 180px; min-width: 0; display: flex; flex-direction: column; overflow-wrap: anywhere; }
.sk-prize-txt b { font-size: 16.5px; }
.sk-sec.sub .rw-media { margin-top: 2px; }
.sk-foot { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding-top: 2px; }
.sk-submit { width: 100%; height: 52px; font-size: 16px; }
.sk-hint { margin: 0; display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--muted); }
.sk-hint .ico { width: 18px; height: 18px; flex: none; }
.sk-hint.ok { color: var(--ok); }
.sk-decide { gap: 10px; justify-content: flex-end; flex-wrap: wrap; align-self: stretch; }
.sk-sub-title { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 16px; }
.sk-sub-title .ico { width: 22px; height: 22px; color: var(--rose-2); flex: none; }
.sk-cond { white-space: pre-wrap; overflow-wrap: anywhere; }
/* Zu bestätigen: kleine Kachel */
.sk-pend-node { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sk-pend-node > div { display: flex; flex-direction: column; min-width: 0; }
.sk-pend-node .rw-pend-task { margin: 0; }
.sk-pend-node .sk-cond { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sk-mini { width: 48px; height: 48px; flex: none; border-radius: 14px; overflow: hidden; display: grid; place-items: center; color: #f9b0d4; border: 2px solid transparent;
  background: linear-gradient(160deg, #241e28, #0a0a10) padding-box, linear-gradient(145deg, #ec0b7a, #ec0b7a 45%, #68133d) border-box; }
.sk-mini img { width: 100%; height: 100%; object-fit: cover; }
.sk-mini .ico { width: 22px; height: 22px; }
/* Editor-Fenster */
.sk-edit-top { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 12px; align-items: end; }
.sk-badge-in { text-align: center; }
.sk-icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
.sk-ico-btn { height: 44px; border: 0; border-radius: 12px; background: var(--bg-2); color: var(--text); display: grid; place-items: center; cursor: pointer; transition: background 0.15s, transform 0.15s; }
.sk-ico-btn .ico { width: 21px; height: 21px; }
.sk-ico-btn:hover { background: var(--surface-3); }
.sk-ico-btn.on { background: linear-gradient(160deg, #241e28, #0a0a10); color: #f9b0d4; box-shadow: 0 0 0 2px var(--rose), 0 6px 16px rgba(236, 11, 122, 0.35); }
.sk-more { gap: 8px; flex-wrap: wrap; justify-content: space-between; }
@media (max-width: 560px) {
  .sk-edit-top { grid-template-columns: minmax(0, 1fr) 86px; }
  .sk-pic.art { padding: 22px 12px; }
}

/* =====================================================================================================
   Turnierbaum: dunkler Arena-Kopf mit Status und Fortschritt, weißes Brett mit dunklen Match-Karten, Profilbildern,
   leuchtendem Weg der Sieger:innen (Rose-Rot), Finale und Pokal in Gold.
   ===================================================================================================== */
.tb-hero { gap: 16px; }
.tb-back { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; margin-bottom: -6px; font-size: 13.5px; font-weight: 700; color: #f79cc9; text-decoration: none; }
.tb-back:hover { color: #fff; text-decoration: none; }
.tb-back .ico { width: 17px; height: 17px; }
.tb-hero-ico.gold { background: linear-gradient(145deg, var(--gold-1), var(--gold-2) 55%, var(--gold-3)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 12px 28px rgba(236, 11, 122, 0.45); }
.tb-hero-ico.gold .ico { color: #28212c; }
.tb-kicker { display: inline-flex; align-items: center; gap: 7px; }
.tb-kicker.laeuft { color: #ec0b7a; }
.tb-kicker.beendet { color: var(--gold-1); }
.tb-live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rose); box-shadow: 0 0 0 0 rgba(236, 11, 122, 0.7); animation: tb-pulse 1.8s ease-out infinite; }
@keyframes tb-pulse { 0% { box-shadow: 0 0 0 0 rgba(236, 11, 122, 0.7); } 100% { box-shadow: 0 0 0 9px rgba(236, 11, 122, 0); } }
.tb-prize { margin: 0; display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border-radius: 18px; background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); color: #ececef; font-size: 14.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.tb-prize .ico { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--rose); }
.tb-hero-champ { display: inline-flex; align-items: center; gap: 12px; align-self: flex-start; max-width: 100%; padding: 8px 18px 8px 8px; border-radius: 999px; background: linear-gradient(100deg, rgba(236, 11, 122, 0.22), rgba(236, 11, 122, 0.06)); box-shadow: inset 0 0 0 1.5px rgba(236, 11, 122, 0.55), 0 0 30px rgba(236, 11, 122, 0.18); }
.tb-hero-champ > div { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.tb-hero-champ span { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #ec0b7a; }
.tb-hero-champ b { font-size: 17px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-hero-champ > .ico { width: 22px; height: 22px; flex: none; color: var(--gold-2); fill: rgba(236, 11, 122, 0.3); }
.av.tb-hero-av { width: 42px; height: 42px; font-size: 15px; box-shadow: 0 0 0 2px var(--gold-2); }
.tb-hero-champ:not(:has(.av)) { padding-left: 18px; }
.tb-progress { display: flex; flex-direction: column; gap: 8px; }
.tb-progress-txt { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 700; color: var(--ink-muted); }
.tb-progress-txt b { color: #ec0b7a; font-variant-numeric: tabular-nums; }
.tb-progress-bar { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.tb-progress-bar i { display: block; height: 100%; border-radius: inherit; background: var(--grad-rose); box-shadow: 0 0 14px rgba(236, 11, 122, 0.6); }

/* das Brett: weiß, darauf dunkle Match-Karten (wie der Reward Tree) */
.tb-arena { position: relative; padding: 24px 24px 28px; margin-bottom: 16px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-card, var(--shadow-s)); }
.tb-arena .tb-head { margin-bottom: 18px; }
.tb-arena .tb-head h3 { display: flex; align-items: center; gap: 10px; }
.tb-arena .tb-head h3 .ico { width: 20px; height: 20px; color: var(--rose); }
.tb-hint { color: var(--muted); }
.tb-arena .tb-col-head { align-self: center; width: max-content; max-width: 100%; margin: 0 auto 12px; padding: 5px 13px; border-radius: 999px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); background: var(--bg-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-arena .tb-col-head.on { color: #fff; background: var(--grad-rose); box-shadow: 0 6px 18px rgba(236, 11, 122, 0.35); }
.tb-arena .tb-col.final .tb-col-head, .tb-arena .tb-col.champ .tb-col-head { color: #5c1437; background: #fbc6e0; box-shadow: inset 0 0 0 1px rgba(236, 11, 122, 0.55); }
.tb-arena .tb-col.final .tb-col-head.on { color: #201c23; background: linear-gradient(145deg, var(--gold-1), var(--gold-2)); box-shadow: 0 6px 18px rgba(236, 11, 122, 0.4); }
/* Match-Karte */
.tb-arena .tb-m { gap: 3px; padding: 6px; border-radius: 16px; color: #fff; transition: transform 0.15s, box-shadow 0.15s;
  background: linear-gradient(160deg, #201c23, #0a0a10); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 10px 22px rgba(10, 10, 16, 0.18); }
.tb-arena button.tb-m:hover { transform: translateY(-1px); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.35), 0 14px 28px rgba(10, 10, 16, 0.24); }
.tb-arena button.tb-m.offen { background: linear-gradient(160deg, #241e28, #0a0a10); box-shadow: inset 0 0 0 1.5px var(--rose), 0 0 0 4px rgba(236, 11, 122, 0.12), 0 10px 26px rgba(236, 11, 122, 0.3); }
.tb-arena button.tb-m.offen:hover { box-shadow: inset 0 0 0 2px #ec0b7a, 0 0 0 4px rgba(236, 11, 122, 0.16), 0 12px 30px rgba(236, 11, 122, 0.4); }
/* noch nicht dran: hell und blass */
.tb-arena .tb-m.wartet, .tb-arena .tb-m.leer { color: #9a9aa0; background: #f5f5f8; box-shadow: inset 0 0 0 1px #e6e6e9; }
.tb-arena button.tb-m.wartet:hover { box-shadow: inset 0 0 0 1.5px #cfcfd2, 0 8px 18px rgba(10, 10, 16, 0.08); }
.tb-arena .tb-m.wartet .tb-p, .tb-arena .tb-m.leer .tb-p { color: #8d8d93; }
.tb-arena .tb-m.wartet .tb-m-no, .tb-arena .tb-m.leer .tb-m-no { color: #ababb1; }
.tb-arena .tb-m.wartet .tb-av, .tb-arena .tb-m.leer .tb-av { box-shadow: 0 0 0 1.5px #e0e0e3; }
.tb-arena .tb-m.final { padding: 8px; border-radius: 20px; background: linear-gradient(160deg, #221e25, #0a0a10); box-shadow: inset 0 0 0 1.5px rgba(236, 11, 122, 0.75), 0 0 0 4px rgba(236, 11, 122, 0.14), 0 12px 28px rgba(236, 11, 122, 0.25); }
.tb-arena .tb-m.final.wartet { color: #5c1437; background: #fcdeed; box-shadow: inset 0 0 0 1.5px rgba(236, 11, 122, 0.6); }
.tb-arena .tb-m.final.wartet .tb-p, .tb-arena .tb-m.final.wartet .tb-m-no { color: #7e1247; }
.tb-m-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 18px; padding: 1px 6px 2px; min-width: 0; }
.tb-m-no { flex: none; font-size: 10.5px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: rgba(255, 255, 255, 0.45); }
.tb-m.final .tb-m-no { color: #ec0b7a; }
.tb-arena .tb-at { padding: 0; font-size: 11px; color: #ec0b7a; }
.tb-arena .tb-m.wartet .tb-at { color: var(--muted); }
.tb-ready { flex: none; font-size: 10px; font-weight: 800; letter-spacing: 0.04em; padding: 2px 8px; border-radius: 999px; color: #fff; background: var(--rose); }
/* Spieler:in */
.tb-arena .tb-p { position: relative; gap: 8px; min-height: 34px; padding: 0 10px; border-radius: 12px; font-size: 13.5px; font-weight: 700; color: #e6e6e9; }
.tb-arena .tb-p + .tb-p { margin-top: 3px; }
.tb-arena .tb-p:has(.tb-av) { padding-left: 5px; }
.av.tb-av, .tb-av { width: 24px; height: 24px; font-size: 9.5px; flex: none; border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.18); }
.tb-arena .tb-p.win { color: #fff; font-weight: 800; background: linear-gradient(90deg, rgba(236, 11, 122, 0.45), rgba(236, 11, 122, 0.12)); box-shadow: inset 0 0 0 1px rgba(236, 11, 122, 0.6); }
.tb-arena .tb-p.win .tb-av { box-shadow: 0 0 0 2px var(--rose); }
.tb-arena .tb-m.final .tb-p.win { background: linear-gradient(90deg, rgba(236, 11, 122, 0.45), rgba(236, 11, 122, 0.12)); box-shadow: inset 0 0 0 1px rgba(236, 11, 122, 0.7); }
.tb-arena .tb-m.final .tb-p.win .tb-av { box-shadow: 0 0 0 2px var(--gold-2); }
.tb-arena .tb-p.lose { opacity: 0.45; text-decoration: none; }
.tb-arena .tb-p.bye, .tb-arena .tb-p.tbd { color: rgba(255, 255, 255, 0.45); }
.tb-arena .tb-s { color: #f9b0d4; }
.tb-arena .tb-p.win .tb-s { color: #fff; }
/* Linien: grau – der Weg der Sieger:innen leuchtet Rose-Rot, ins Finale und zum Pokal Gold */
.tb-arena .tb-pair:not(.single)::after { display: none; }
.tb-arena .tb-col + .tb-col .tb-slot::before { border-top: 2px solid #e1e1e4; }
.tb-arena .tb-col + .tb-col .tb-slot.in-on::before { border-top-color: var(--rose); filter: drop-shadow(0 0 3px rgba(236, 11, 122, 0.6)); }
.tb-arena .tb-pair:not(.single) .tb-slot::after { content: ''; position: absolute; right: -14px; width: 12px; border: 2px solid #e1e1e4; border-left: 0; pointer-events: none; }
.tb-arena .tb-pair:not(.single) .tb-slot:first-child::after { top: 50%; bottom: 0; border-bottom: 0; border-radius: 0 12px 0 0; }
.tb-arena .tb-pair:not(.single) .tb-slot:last-child::after { top: 0; bottom: 50%; border-top: 0; border-radius: 0 0 12px 0; }
.tb-arena .tb-col.final .tb-slot::after { content: ''; position: absolute; right: -14px; width: 14px; top: 50%; border-top: 2px solid #e1e1e4; pointer-events: none; }
.tb-arena .tb-slot.out-on::after { border-color: var(--rose) !important; filter: drop-shadow(0 0 3px rgba(236, 11, 122, 0.6)); }
.tb-arena .tb-col.final .tb-slot.out-on::after, .tb-arena .tb-col.champ .tb-slot.in-on::before { border-color: var(--gold-2) !important; filter: drop-shadow(0 0 4px rgba(236, 11, 122, 0.7)); }
/* Pokal */
.tb-arena .tb-champ { gap: 6px; padding: 18px 12px 16px; border-radius: 22px; color: var(--muted); background: #ffffff; box-shadow: inset 0 0 0 1px #ececef; }
.tb-cup { width: 64px; height: 64px; border-radius: 22px; display: grid; place-items: center; background: #f0f0f3; color: #bdbdc3; }
.tb-arena .tb-cup .ico { width: 34px; height: 34px; }
.tb-arena .tb-champ.on { color: #fff; background: radial-gradient(circle at 50% 22%, rgba(236, 11, 122, 0.35), transparent 70%), linear-gradient(160deg, #221e25, #0a0a10);
  box-shadow: inset 0 0 0 1.5px rgba(236, 11, 122, 0.75), 0 0 0 4px rgba(236, 11, 122, 0.14), 0 16px 36px rgba(236, 11, 122, 0.3); }
.tb-champ.on .tb-cup { color: #28212c; background: linear-gradient(145deg, var(--gold-1), var(--gold-2) 55%, var(--gold-3)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 10px 28px rgba(236, 11, 122, 0.45); }
.av.tb-champ-av { width: 46px; height: 46px; font-size: 16px; margin-top: -16px; box-shadow: 0 0 0 3px #0a0a10, 0 0 0 5px var(--gold-2); }
.tb-champ-k { font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #7e1247; }
.tb-champ.on .tb-champ-k { color: #ec0b7a; }
.tb-arena .tb-champ b { font-size: 15px; overflow-wrap: anywhere; color: var(--text); }
.tb-arena .tb-champ.on b { color: #fff; }
/* Runde für Runde (Handy, schmale Fenster) */
.tb-arena .tb-tabs button { background: var(--bg-2); color: var(--muted); }
.tb-arena .tb-tabs button.on { background: var(--grad-rose); color: #fff; box-shadow: 0 6px 18px rgba(236, 11, 122, 0.35); }
.tb-arena .tb-tabs button.on .tb-tab-n { background: #fff; color: var(--rose-deep); }
.tb-arena .tb-list .tb-p { min-height: 42px; font-size: 15px; }
.tb-arena .tb-list .tb-av { width: 28px; height: 28px; font-size: 11px; }
.tb-compact-champ { margin: 14px auto 0; max-width: 380px; }
@media (prefers-reduced-motion: reduce) { .tb-live-dot { animation: none; } .tb-arena button.tb-m:hover { transform: none; } }
@media (max-width: 760px) {
  .tb-arena { padding: 18px 14px 20px; border-radius: 26px; }
  .tb-hero .px-actions .btn.icon { flex: 0 0 44px; width: 44px; padding: 0; justify-content: center; }
  .tb-hero-champ b { font-size: 15px; }
}
/* Turnierbaum am Handy: der ganze Baum in einem eigenen Fenster – wischen/ziehen verschiebt, zwei Finger oder +/− zoomen */
.tb-mode { flex: none; }
.tb-mode button { display: inline-flex; align-items: center; gap: 6px; }
.tb-mode button .ico { width: 15px; height: 15px; }
.tb-frame { position: relative; margin: 0 -6px; }
.tb-pan { overflow: auto; max-height: max(380px, calc(100vh - 230px)); max-height: max(380px, calc(100dvh - 230px)); padding: 8px 4px 12px; border-radius: 20px;
  background: #ffffff; box-shadow: inset 0 0 0 1px #efeff2; cursor: grab; touch-action: pan-x pan-y; overscroll-behavior-x: contain; scrollbar-width: thin; }
.tb-pan.dragging { cursor: grabbing; user-select: none; }
.tb-pan .tb { margin: 0; }
.tb-frame-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 6px 8px; }
.tb-zoomctl { display: flex; gap: 5px; flex: none; }
.tb-zoomctl button { width: 34px; height: 34px; border: 0; border-radius: 12px; display: grid; place-items: center; cursor: pointer; color: var(--text); background: #fff; box-shadow: inset 0 0 0 1px var(--line-2), 0 6px 16px rgba(10, 10, 16, 0.1); }
.tb-zoomctl button:hover:not(:disabled) { background: var(--rose-soft); color: var(--rose-2); }
.tb-zoomctl button:disabled { opacity: 0.4; cursor: default; }
.tb-zoomctl .ico { width: 17px; height: 17px; }
.tb-pan-tip { min-width: 0; font-size: 12px; font-weight: 600; line-height: 1.3; color: var(--faint); }
@media (max-width: 760px) { .tb-arena .tb-head { flex-wrap: wrap; } .tb-mode { order: 3; } }
/* Turnierbaum, Runde für Runde: Runde als Auswahlliste */
.tb-round-field { max-width: 380px; margin: 0 0 14px; }
.tb-round-field > span { font-size: 12.5px; font-weight: 700; color: var(--muted); }
/* Hinweis „Mitteilungen wieder einschalten“ (nach einem Update) – etwas höher als der Update-Hinweis */
.push-bar { bottom: 84px; flex-wrap: wrap; border-radius: 26px; }
.push-bar > span { flex: 1 1 220px; min-width: 0; }
.push-bar .btn.ghost, .push-bar .btn.ghost:not(.x) { color: #fff; background: transparent; box-shadow: none; }
.push-bar .btn.primary, .push-bar .btn.primary:not(.x) { background: #fff; color: var(--ink); box-shadow: none; }
.push-bar .ico, .push-bar > svg { color: #fff; }
@media (max-width: 760px) { .push-bar { bottom: calc(150px + env(safe-area-inset-bottom)); } }
