/* Name – Stylesheet «Tonal»
   Schwarz/Weiss, ruhige Flächen, kleine Radien, breite Grossbuchstaben für Labels, grosse Zahlen.
   Grün (Signal) erscheint nur auf schwarzen Flächen: Level-Karte, Live, Feiermomente.
   Layout: Handy = Kopfzeile + Tab-Leiste unten; ab 1024 px feste Leiste links. */

/* ================= Tokens (hell) ================= */
:root {
  --bg: #f1f2f4;
  --surface: #ffffff;
  --surface-2: #f6f7f8;
  --ink: #0b0b0c;
  --ink-2: #2b2d31;
  --muted: #676c75;
  --faint: #a2a7af;
  --line: #e4e6e9;
  --line-2: #cdd0d5;
  --idle: #e2e4e8;
  --chip: #eef0f2;
  --hover: #f5f6f7;
  --accent: #0b0b0c;
  --accent-fg: #ffffff;
  --signal: #3be58c;
  --signal-ink: #03140a;
  --danger: #cc2f37;
  --scrim: rgba(11, 11, 12, 0.5);
  --card-border: transparent;
  --inv-bg: #0b0b0c;
  --inv-border: transparent;
  --toast-bg: #0b0b0c;
  --toast-fg: #ffffff;
  --m0: #e8eaed; --m1: #cfd3d8; --m2: #9298a1; --m3: #3a3f46;
  --av0: #e3e6ea; --av0-fg: #22252a;
  --av1: #c9cdd3; --av1-fg: #111316;
  --av2: #9ba1aa; --av2-fg: #0b0b0c;
  --av3: #5e646d; --av3-fg: #ffffff;
  --av4: #24272c; --av4-fg: #ffffff;
  /* immer dunkel */
  --night: #050506;
  --night-2: #141517;
  --night-3: #232427;
  --night-fg: #f4f5f6;
  --night-muted: #9a9ea5;
  --night-line: rgba(255, 255, 255, 0.12);
  --night-idle: rgba(255, 255, 255, 0.16);
  --f-sans: 'Archivo', 'Helvetica Neue', Arial, system-ui, sans-serif;
  --gutter: clamp(16px, 4.5vw, 28px);
  --r: 8px;
  --r-s: 4px;
  --rail-w: 248px;
  --tab-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #000000; --surface: #111214; --surface-2: #17181b; --ink: #f4f5f6; --ink-2: #d4d6da; --muted: #8e939b; --faint: #5b6067;
    --line: #202226; --line-2: #33363b; --idle: #26292e; --chip: #1b1d21; --hover: #17191c; --accent: #f4f5f6; --accent-fg: #0b0b0c;
    --danger: #ff5a62; --scrim: rgba(0, 0, 0, 0.7); --card-border: #1d1f23; --inv-bg: #141518; --inv-border: #26282c;
    --toast-bg: #f4f5f6; --toast-fg: #0b0b0c;
    --m0: #1f2226; --m1: #3b3f46; --m2: #8a9099; --m3: #f4f5f6;
    --av0: #23262b; --av0-fg: #e6e8eb; --av1: #33373d; --av1-fg: #ffffff; --av2: #555b64; --av2-fg: #ffffff; --av3: #8f959e; --av3-fg: #0b0b0c; --av4: #d6d9de; --av4-fg: #0b0b0c;
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #000000; --surface: #111214; --surface-2: #17181b; --ink: #f4f5f6; --ink-2: #d4d6da; --muted: #8e939b; --faint: #5b6067;
  --line: #202226; --line-2: #33363b; --idle: #26292e; --chip: #1b1d21; --hover: #17191c; --accent: #f4f5f6; --accent-fg: #0b0b0c;
  --danger: #ff5a62; --scrim: rgba(0, 0, 0, 0.7); --card-border: #1d1f23; --inv-bg: #141518; --inv-border: #26282c;
  --toast-bg: #f4f5f6; --toast-fg: #0b0b0c;
  --m0: #1f2226; --m1: #3b3f46; --m2: #8a9099; --m3: #f4f5f6;
  --av0: #23262b; --av0-fg: #e6e8eb; --av1: #33373d; --av1-fg: #ffffff; --av2: #555b64; --av2-fg: #ffffff; --av3: #8f959e; --av3-fg: #0b0b0c; --av4: #d6d9de; --av4-fg: #0b0b0c;
  color-scheme: dark;
}

/* Schwarze Flächen: Tokens umdrehen, Signalgrün aktiv */
.inv, .live, .celebrate, .onb-welcome {
  --ink: var(--night-fg); --ink-2: #d9dbdf; --muted: var(--night-muted); --faint: #62666d;
  --line: var(--night-line); --line-2: rgba(255, 255, 255, 0.24); --idle: var(--night-idle); --chip: rgba(255, 255, 255, 0.08); --hover: rgba(255, 255, 255, 0.06);
  --accent: var(--signal); --accent-fg: var(--signal-ink);
  color: var(--ink);
}

/* ================= Basis ================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.is-locked { overflow: hidden; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink);
  font-family: var(--f-sans); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.ic .f { fill: currentColor; stroke: none; }
.ic-s { width: 16px; height: 16px; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; line-height: 1.45; }
.center { text-align: center; justify-content: center; }

/* Typografie */
.cap, .eyebrow { font-size: 11px; font-weight: 700; font-stretch: 125%; letter-spacing: 0.1em; text-transform: uppercase; line-height: 1.3; }
.eyebrow { color: var(--muted); margin: 0; }
.cap-l { font-size: 13px; font-weight: 700; font-stretch: 125%; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.25; margin: 0; }
.title { font-size: clamp(30px, 7.4vw, 50px); font-weight: 800; font-stretch: 125%; text-transform: uppercase; letter-spacing: -0.01em; line-height: 0.96; margin: 6px 0 12px; text-wrap: balance; overflow-wrap: anywhere; }
.title-m { font-size: clamp(22px, 5.4vw, 28px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.08; margin: 0; overflow-wrap: anywhere; }
.lead { color: var(--muted); font-size: 15.5px; max-width: 62ch; margin: 0 0 8px; }
.big-num { font-size: 48px; font-weight: 800; font-stretch: 112%; letter-spacing: -0.03em; line-height: 0.92; font-variant-numeric: tabular-nums; }
.mega { font-size: clamp(42px, 13vw, 120px); font-weight: 800; font-stretch: 125%; text-transform: uppercase; line-height: 0.9; letter-spacing: -0.015em; margin: 0; text-wrap: balance; }
.wordmark { --wm: 20px; display: inline-flex; align-items: baseline; gap: 0.16em; font-size: var(--wm); line-height: 1; color: var(--ink); }
.wm-t { font-weight: 900; font-stretch: 125%; font-style: italic; letter-spacing: -0.035em; text-transform: uppercase; }
.wm-go { display: block; width: 0.5em; height: 0.2em; background: var(--wm-go, var(--ink)); transform: skewX(-18deg); flex: none; }
.inv .wordmark, .onb-welcome .wordmark, .wordmark.is-signal { --wm-go: var(--signal); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }

/* ================= App-Hülle ================= */
.app { position: relative; min-height: 100vh; }
.main { max-width: 920px; margin: 0 auto; padding: 0 var(--gutter) calc(var(--tab-h) + 40px + env(safe-area-inset-bottom, 0px)); }
.view:focus { outline: none; }
.rail { display: none; }

.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  height: 60px; margin: 0 calc(-1 * var(--gutter)) 8px; padding: 0 var(--gutter); background: var(--bg); border-bottom: 1px solid var(--line);
}
.topbar-r { display: flex; align-items: center; gap: 6px; min-width: 0; }
.streak-pill, .lvl-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border-radius: var(--r-s); cursor: pointer;
  background: var(--surface); border: 1px solid var(--line-2); color: var(--ink); font-size: 13px;
}
.streak-pill b, .lvl-pill b { font-weight: 800; font-variant-numeric: tabular-nums; }
.streak-pill .ic { color: var(--faint); }
.streak-pill.is-hot .ic, .flame.is-hot .ic { color: currentColor; }
.streak-pill.is-hot .ic path, .flame.is-hot .ic path { fill: currentColor; }
.av-btn { padding: 0; border: 0; background: none; border-radius: 50%; cursor: pointer; display: inline-flex; }
.live-pill { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 0; border-radius: var(--r-s); background: var(--ink); color: var(--bg); font-size: 11px; font-weight: 800; font-stretch: 125%; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; }
.live-pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--signal); animation: blink 1.6s ease-in-out infinite; }
.live-pill .ic { display: none; }

/* Tab-Leiste (Handy) */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center;
  height: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px)); padding: 0 6px env(safe-area-inset-bottom, 0px);
  background: var(--surface); border-top: 1px solid var(--line);
}
.nav-i {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: 100%; min-width: 0; padding: 0; border: 0;
  background: none; color: var(--faint); font-size: 10px; font-weight: 700; font-stretch: 112%; letter-spacing: 0.04em; text-transform: uppercase; cursor: pointer;
}
.nav-i span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-i .ic { width: 22px; height: 22px; }
.nav-i:hover, .nav-i.is-on { color: var(--ink); }
.tab-add { justify-self: center; width: 52px; height: 44px; display: grid; place-items: center; border: 0; border-radius: var(--r-s); background: var(--ink); color: var(--bg); cursor: pointer; }
.tab-add .ic { width: 24px; height: 24px; stroke-width: 2.2; }

.app.is-bare .rail, .app.is-bare .tabbar, .app.is-bare .topbar { display: none; }
.app.is-bare .main { max-width: none; margin: 0; padding: 0; }

/* ================= Bedienelemente ================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 52px; padding: 0 22px; border: 1.5px solid transparent;
  border-radius: var(--r-s); font-size: 12.5px; font-weight: 700; font-stretch: 125%; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1;
  cursor: pointer; white-space: nowrap; transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.btn .ic { width: 17px; height: 17px; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--ink-2); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--hover); }
.btn-volt { background: var(--signal); color: var(--signal-ink); }
.btn-volt:hover { background: #5cf0a2; }
.btn-light { background: #ffffff; color: #0b0b0c; }
.btn-light:hover { background: #e9ebee; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-danger { background: var(--danger); color: #ffffff; }
.btn-sm { height: 38px; padding: 0 14px; font-size: 11px; gap: 6px; }
.btn-sm .ic { width: 14px; height: 14px; }
.btn-block { width: 100%; }
.btn-pair { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.icon-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: var(--r-s); cursor: pointer;
  background: transparent; border: 1px solid var(--line-2); color: var(--ink); font-size: 11px; font-weight: 700; font-stretch: 125%; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
}
.icon-pill:hover { border-color: var(--ink); }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: var(--r-s); background: transparent; color: inherit; cursor: pointer; flex: none; }
.icon-btn:hover { background: var(--hover); }
.icon-btn .ic { width: 22px; height: 22px; }
.pn-link {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; border: 0; background: none; color: var(--muted);
  font-size: 11px; font-weight: 700; font-stretch: 125%; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
.pn-link:hover { color: var(--ink); }
.link-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 0; border: 0; background: none; color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-btn.danger { color: var(--danger); }
.link-row {
  display: flex; justify-content: space-between; align-items: center; width: 100%; margin-top: 16px; padding: 14px 0 0; border: 0; border-top: 1px solid var(--line); background: none; color: var(--ink);
  font-size: 11.5px; font-weight: 700; font-stretch: 125%; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; text-align: left;
}
.link-row:hover .ic { transform: translateX(2px); }
.tabs { display: flex; gap: 0; margin: 8px 0 6px; border-bottom: 1px solid var(--line-2); overflow-x: auto; scrollbar-width: none; }
.tab {
  flex: 1 0 auto; height: 46px; padding: 0 10px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; color: var(--muted);
  font-size: 11px; font-weight: 700; font-stretch: 112%; letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; white-space: nowrap;
}
.tab:hover { color: var(--ink); }
.tab.is-on { color: var(--ink); border-bottom-color: var(--ink); }
.seg { display: inline-flex; padding: 3px; border-radius: var(--r-s); background: var(--surface); border: 1px solid var(--line-2); }
.seg-b { height: 34px; padding: 0 14px; border: 0; border-radius: 2px; background: none; color: var(--muted); font-size: 11px; font-weight: 700; font-stretch: 125%; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; white-space: nowrap; }
.seg-b.is-on { background: var(--ink); color: var(--bg); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips.center { justify-content: center; margin-top: 14px; }
.chip, .chip-btn, .tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: var(--r-s); background: var(--chip); color: var(--ink);
  border: 1px solid transparent; font-size: 13px; font-weight: 600; line-height: 1.2;
}
.chip-btn { cursor: pointer; background: var(--surface); border-color: var(--line-2); }
.chip-btn:hover { border-color: var(--ink); }
.chip-btn.is-on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tag { padding: 6px 9px; font-size: 10.5px; font-weight: 700; font-stretch: 125%; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.tag-live { background: var(--ink); color: var(--bg); }
.search {
  display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 16px; border-radius: var(--r-s); color: var(--muted);
  background: var(--surface); border: 1px solid var(--line-2);
}
.search:focus-within { border-color: var(--ink); color: var(--ink); }
/* Sportarten-Suche */
.sp-pick { display: grid; gap: 12px; }
.sp-sel { display: flex; flex-wrap: wrap; gap: 6px; }
.sp-sel .chip-btn .ic { margin-right: -2px; opacity: 0.7; }
.sp-head { margin: 6px 0 8px; }
.list.sp-list { max-height: min(360px, 50vh); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; border: 1px solid var(--line-2); }
.sp-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 12px 16px; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; }
.sp-row:hover { background: var(--hover); }
.sp-row > span { display: grid; gap: 1px; min-width: 0; }
.sp-row b { font-size: 15px; font-weight: 600; }
.sp-row > span > span { font-size: 12px; color: var(--muted); }
.sp-row > .ic { flex: none; color: var(--faint); }
.sp-row.is-on > .ic { color: var(--ink); }
.sp-row.is-on b { font-weight: 750; }
.sp-empty { margin: 4px 2px; }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--ink); font-size: 16px; outline: none; }
.field { display: flex; align-items: center; gap: 4px; height: 60px; padding: 0 18px; border-radius: var(--r-s); background: var(--surface); border: 1px solid var(--line-2); }
.field:focus-within { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.field.is-err { border-color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger); }
.field-pre { color: var(--muted); font-size: 20px; font-weight: 700; }
.field input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--ink); font-size: 20px; font-weight: 600; outline: none; }
.field-err { color: var(--danger); font-size: 13.5px; min-height: 1.3em; margin: 8px 0 0; }
.field-err:empty { min-height: 0; margin: 0; }
.inline-form { display: flex; gap: 8px; }
.inline-form .field { flex: 1; height: 52px; }
.inline-form .field input, .inline-form .field-pre { font-size: 16px; }
.select { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 14px; border-radius: var(--r-s); background: var(--surface); border: 1px solid var(--line-2); color: var(--muted); }
.select select { flex: 1; min-width: 0; appearance: none; border: 0; background: transparent; color: var(--ink); font-size: 16px; font-weight: 600; outline: none; cursor: pointer; }
.select option { background: var(--surface); color: var(--ink); }

/* Zahlenfelder (Zeit, Distanz, Ziel) */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); align-items: start; gap: 10px; }
.fld { display: grid; align-content: start; gap: 6px; min-width: 0; }
.fld > .cap { color: var(--muted); }
.fld-in {
  display: flex; align-items: baseline; gap: 8px; height: 64px; padding: 0 16px; border-radius: var(--r-s); background: var(--surface); border: 1px solid var(--line-2);
  cursor: text;
}
.fld-in:focus-within { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.fld-in input {
  flex: 1; width: 0; min-width: 0; height: 100%; padding: 0; border: 0; background: transparent; color: var(--ink); outline: none;
  font-size: 30px; font-weight: 800; font-stretch: 112%; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield;
}
.fld-in input::-webkit-outer-spin-button, .fld-in input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.fld-in input::placeholder { color: var(--faint); }
.fld-in em { flex: none; font-style: normal; font-size: 11px; font-weight: 700; font-stretch: 125%; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.fld-note { min-height: 1.3em; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.fld-lg { max-width: 360px; margin: 0 auto; }
.fld-lg .fld-in { height: 84px; justify-content: center; }
.fld-lg .fld-in input { flex: 0 1 auto; width: 4ch; text-align: right; font-size: 48px; }

/* ================= Karten & Listen ================= */
.panel { position: relative; min-width: 0; padding: 20px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--card-border); }
.pn-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 16px; }
.pn-t { margin: 0; font-size: 12px; font-weight: 800; font-stretch: 125%; letter-spacing: 0.1em; text-transform: uppercase; }
.pn-r { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pn-r b { color: var(--ink); font-weight: 700; }
.pn-sub { margin: 20px 0 4px; font-size: 11px; font-weight: 700; font-stretch: 125%; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.pn-note { margin: 12px 0 0; font-size: 13.5px; color: var(--muted); }
.page-head { padding: 18px 0 6px; }
.page-top { display: flex; justify-content: space-between; align-items: center; min-height: 52px; margin: 0 -10px; }
.sec { margin-top: 32px; }
.sec-t { margin: 0 0 12px; font-size: 12px; font-weight: 800; font-stretch: 125%; letter-spacing: 0.1em; text-transform: uppercase; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; margin-bottom: 12px; }
.sec-head .sec-t { margin: 0; }
.list { border-radius: var(--r); background: var(--surface); border: 1px solid var(--card-border); overflow: hidden; }
.list > * + * { border-top: 1px solid var(--line); }
.empty { display: grid; justify-items: center; gap: 14px; padding: 44px 16px; text-align: center; color: var(--muted); }
.empty .ic { width: 36px; height: 36px; color: var(--faint); }
.empty p { max-width: 42ch; margin: 0; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; margin: 0 0 8px; border-radius: var(--r-s); background: var(--chip); font-size: 14.5px; }
.danger-zone { display: grid; justify-items: start; gap: 10px; margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--line); }
.confirm { display: grid; gap: 10px; padding: 14px; border-radius: var(--r-s); background: var(--chip); }
.confirm p { margin: 0; }

.person { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 12px 16px; }
.person-link { grid-column: 1 / 3; position: relative; display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 12px; align-items: center; padding: 0; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; min-width: 0; }
.person-b { min-width: 0; }
.person-b b { display: block; font-size: 15px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-b > span { display: block; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-streak { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--muted); }
.person .btn-pair { grid-column: 3 / 5; }
@media (max-width: 559px) { .person .btn-pair { grid-column: 2 / -1; } }

/* Avatare & Rang-Abzeichen */
.av { position: relative; width: var(--size); height: var(--size); flex: none; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 800; font-stretch: 112%; font-size: calc(var(--size) * 0.4); line-height: 1; }
.av-s0 { background: var(--av0); color: var(--av0-fg); }
.av-s1 { background: var(--av1); color: var(--av1-fg); }
.av-s2 { background: var(--av2); color: var(--av2-fg); }
.av-s3 { background: var(--av3); color: var(--av3-fg); }
.av-s4 { background: var(--av4); color: var(--av4-fg); }
.av-me { background: var(--ink); color: var(--bg); }
.inv .av-me, .celebrate .av-me { background: var(--signal); color: var(--signal-ink); }
.av-rank { position: absolute; left: -6px; bottom: -5px; min-width: 24px; padding: 3px 7px; border-radius: var(--r-s); background: var(--ink); color: var(--bg); font-size: 11px; font-weight: 700; text-align: center; }
.emblem { display: block; overflow: visible; }
.em-txt { fill: #0b0b0c; font-family: var(--f-sans); font-size: 36px; font-weight: 800; font-stretch: 125%; letter-spacing: -0.02em; }
.em-xs { width: 18px; height: 18px; }
.em-sm { width: 40px; height: 40px; }
.em-md { width: 52px; height: 52px; }
.em-inline { display: inline-block; width: 20px; height: 20px; vertical-align: -4px; margin-right: 6px; }
.em-badge { position: absolute; width: 22px; height: 22px; pointer-events: none; }
.em-badge path:first-child { stroke: var(--surface); stroke-width: 8; paint-order: stroke; }
.feed-who .em-badge, .lb-av .em-badge, .pod-av .em-badge { right: -5px; bottom: -5px; }
.person-link > .em-badge { left: 30px; top: 28px; }
.em-badge-l { width: 28px; height: 28px; }

/* ================= Lünette, Ringe, Balken ================= */
.bezel { position: relative; aspect-ratio: 1; container-type: inline-size; max-width: 100%; }
.bezel > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.bezel .tk { stroke: var(--idle); stroke-width: 0.9; stroke-linecap: round; }
.bezel .tk.mj { stroke-width: 1.6; }
.bezel .tk.on { stroke: var(--accent); }
.bezel .bz-dot { fill: var(--ink); }
.bezel.is-anim .tk.on { stroke: var(--idle); }
.bezel.is-anim.is-go .tk.on { stroke: var(--accent); transition: stroke 0.2s ease calc(var(--i) * 12ms); }
.bezel-in { position: absolute; inset: 17%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 2px; }

.ring { position: relative; width: var(--size); height: var(--size); flex: none; }
.ring > svg { display: block; width: 100%; height: 100%; }
.rg-track { fill: none; stroke: var(--idle); }
.rg-bar { fill: none; stroke: var(--accent); transition: stroke-dashoffset 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
.ring-in { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; text-align: center; }
.ring-in b { font-variant-numeric: tabular-nums; }
.bar { height: 4px; border-radius: 2px; background: var(--idle); overflow: hidden; }
.bar > span { display: block; height: 100%; width: calc(var(--v) * 100%); background: var(--accent); border-radius: inherit; }
.bar.is-anim > span { width: calc(var(--from, 0) * 100%); }
.bar.is-anim.is-go > span { width: calc(var(--v) * 100%); transition: width 1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s; }

/* ================= Home ================= */
.home-grid { display: grid; gap: 12px; }

/* Level-Karte (schwarz, wie Tonal) */
.hero {
  display: grid; gap: 20px; padding: 22px 20px 20px; border-radius: var(--r);
  background: var(--inv-bg); border: 1px solid var(--inv-border);
}
.hero-top { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 20px; }
.hero-ring { --size: 116px !important; container-type: inline-size; }
.hero-ring .rg-track { stroke: var(--idle); }
.hero-ring .rg-bar { stroke: var(--signal); stroke-linecap: round; }
.hero-ring .ring-in { gap: 0; }
.hero-ring .cap { color: var(--muted); font-size: 9.5px; }
.hero-num { font-size: 40cqi; font-weight: 800; font-stretch: 112%; letter-spacing: -0.04em; line-height: 0.95; font-variant-numeric: tabular-nums; }
.hero-info { display: grid; gap: 6px; min-width: 0; }
.hero-rank { display: flex; align-items: center; gap: 8px; margin: 0; min-width: 0; font-size: 11.5px; font-weight: 800; font-stretch: 125%; letter-spacing: 0.1em; text-transform: uppercase; }
.hero-rank .emblem { width: 22px; height: 22px; flex: none; }
.hero-rank span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero-xp { display: flex; align-items: baseline; gap: 6px; margin: 2px 0 0; font-variant-numeric: tabular-nums; }
.hero-xp b { font-size: 34px; font-weight: 800; font-stretch: 112%; letter-spacing: -0.03em; line-height: 1; }
.hero-xp span { font-size: 11px; font-weight: 700; font-stretch: 125%; letter-spacing: 0.1em; color: var(--muted); }
.hero-left { margin: 0; font-size: 13.5px; color: var(--muted); }
.hero-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.hero-stats > div { display: grid; gap: 4px; padding: 12px 0; min-width: 0; }
.hero-stats > div + div { padding-left: 14px; border-left: 1px solid var(--line); }
.hero-stats dt { font-size: 10px; font-weight: 700; font-stretch: 112%; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.hero-stats dd { margin: 0; font-size: 17px; font-weight: 800; font-stretch: 112%; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-actions { display: flex; gap: 8px; }
.hero-actions .btn-volt { flex: 1; min-width: 0; padding: 0 14px; }
.btn-square { width: 52px; padding: 0; flex: none; }
.btn-square .ic { width: 20px; height: 20px; }

/* Missionen */
.mi-list { list-style: none; margin: 0; padding: 0; }
.mi { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 0; }
.mi + .mi { border-top: 1px solid var(--line); }
.mi-ic { width: 34px; height: 34px; border-radius: var(--r-s); display: grid; place-items: center; background: var(--chip); color: var(--ink); }
.mi-ic .ic { width: 18px; height: 18px; }
.mi.is-done .mi-ic { background: var(--ink); color: var(--bg); }
.mi.is-done .mi-ic .ic { stroke-width: 2.4; }
.mi-b { display: grid; gap: 5px; min-width: 0; }
.mi-t { font-size: 14.5px; font-weight: 600; line-height: 1.25; }
.mi.is-done .mi-t { color: var(--muted); }
.mi.is-done .mi-bar { display: none; }
.mi-bar { display: block; height: 3px; border-radius: 2px; background: var(--idle); overflow: hidden; }
.mi-bar i { display: block; height: 100%; width: calc(var(--v) * 100%); background: var(--accent); }
.mi-p { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mi-rw { font-size: 13px; font-weight: 800; font-stretch: 112%; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mi-rw::after { content: ' XP'; font-size: 10px; font-weight: 700; color: var(--muted); }
.mi.is-done .mi-rw { color: var(--muted); }

/* Duell */
.vs { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; text-align: center; }
.vs-side { display: grid; justify-items: center; gap: 6px; min-width: 0; }
.vs-side b { font-size: 30px; font-weight: 800; font-stretch: 112%; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.vs-side > span { font-size: 12.5px; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs-them { padding: 0; border: 0; background: none; border-radius: 50%; cursor: pointer; }
.vs-mid { display: grid; justify-items: center; gap: 8px; }
.vs-badge { width: 44px; height: 44px; display: grid; place-items: center; border: 1.5px solid var(--ink); border-radius: var(--r-s); font-size: 13px; font-weight: 800; font-stretch: 125%; letter-spacing: 0.04em; }
.vs-time { font-size: 10.5px; font-weight: 700; font-stretch: 125%; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.tug { position: relative; height: 6px; margin: 18px 0 10px; border-radius: 3px; background: var(--idle); overflow: hidden; }
.tug i { position: absolute; inset: 0 auto 0 0; width: calc(var(--v) * 100%); background: var(--accent); }
.tug::after { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--surface); }
.vs-note { margin: 0; text-align: center; font-size: 14px; color: var(--muted); }
.duel-inc { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 12px; align-items: center; padding: 14px; margin-bottom: 16px; border-radius: var(--r-s); background: var(--chip); }
.duel-inc p { margin: 0; font-size: 14px; }
.duel-inc .btn-pair { grid-column: 1 / -1; }
.duel-empty { display: grid; justify-items: start; gap: 12px; }
.duel-empty .ic { width: 28px; height: 28px; color: var(--faint); }
.duel-empty p { margin: 0; max-width: 40ch; color: var(--muted); font-size: 14px; }
.duel-grid { display: grid; gap: 12px; }

/* Streak */
.flame-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; }
.flame { width: 56px; height: 56px; border-radius: var(--r-s); display: grid; place-items: center; background: var(--chip); }
.flame.is-hot { background: var(--ink); color: var(--bg); }
.flame .ic { width: 28px; height: 28px; color: var(--faint); }
.flame-row .cap { display: block; margin-top: 6px; white-space: nowrap; }
.wk { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-top: 16px; }
.wk-d { display: grid; justify-items: center; gap: 6px; font-size: 10.5px; font-weight: 700; font-stretch: 112%; color: var(--muted); }
.wk-d i { width: 100%; max-width: 34px; aspect-ratio: 1; border-radius: var(--r-s); background: var(--idle); }
.wk-d.is-on i { background: var(--ink); }
.wk-d.is-frozen i { background: transparent; box-shadow: inset 0 0 0 2px var(--ink); }
.wk-d.is-future i { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); }
.wk-d.is-today { color: var(--ink); }
.wk-d.is-today i { outline: 1.5px solid var(--ink); outline-offset: 2px; }

/* Skill-Stufen */
.score { display: flex; align-items: baseline; gap: 10px; }
.score-subs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; margin-top: 18px; }
.score-subs > div { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 6px 8px; min-width: 0; }
.score-subs b { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.score-subs .cap { font-stretch: 100%; letter-spacing: 0.05em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.score-subs .bar { grid-column: 1 / -1; }

/* Rangliste klein */
.rank-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin: 0 0 8px; }
.rank-line b { font-size: 44px; font-weight: 800; font-stretch: 112%; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.rank-line span { color: var(--muted); font-size: 14px; }
.mini-pod { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 6px; margin-top: 14px; }
.mp { display: grid; justify-items: center; gap: 6px; min-width: 0; }
.mp-n { max-width: 100%; font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-step { display: grid; place-items: center; width: 100%; border-radius: var(--r-s) var(--r-s) 0 0; background: var(--chip); }
.mp-step b { font-size: 18px; font-weight: 800; font-stretch: 112%; }
.mp-1 .mp-step { height: 60px; background: var(--ink); color: var(--bg); }
.mp-2 .mp-step { height: 44px; }
.mp-3 .mp-step { height: 32px; }

/* Muskeln */
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.lg1 { background: var(--m1); }
.lg2 { background: var(--m2); }
.lg3 { background: var(--m3); }
.muscle-wrap { display: grid; gap: 12px; }
.bodymap { display: flex; justify-content: center; gap: 4px; }
.bodymap svg { width: 46%; max-width: 150px; height: auto; }
.bm-m { stroke: var(--surface); stroke-width: 2; }
.bm-base { fill: var(--m0); }
.bm-l0 { fill: var(--m0); }
.bm-l1 { fill: var(--m1); }
.bm-l2 { fill: var(--m2); }
.bm-l3 { fill: var(--m3); }

/* Freunde aktiv */
.feed-row { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px 0; }
.p-feed .feed-row + .feed-row { border-top: 1px solid var(--line); }
.list .feed-row { padding: 12px 16px; }
.feed-who { position: relative; padding: 0; border: 0; background: none; border-radius: 50%; cursor: pointer; display: inline-flex; }
.feed-body { min-width: 0; }
.feed-body b { display: block; font-size: 15px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-what { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.feed-when { display: block; font-size: 12.5px; color: var(--muted); }

/* ================= Skilltree ================= */
.tree-sum { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 32px; margin: 10px 0 20px; }
.tree-sum > div { display: grid; gap: 4px; }
.tree-sum b { font-size: 34px; font-weight: 800; font-stretch: 112%; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.tree-sum .btn { margin-left: auto; }
@media (max-width: 559px) {
  .tree-sum { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
  .tree-sum .btn { grid-column: 1 / -1; justify-self: start; margin-left: 0; }
}
/* Radial: Zentrum Leistungsfähigkeit, innen leicht, aussen schwer */
.radial-wrap { padding: 0; overflow: hidden; border-radius: var(--r); background: var(--surface); border: 1px solid var(--card-border); }
.radial { display: block; width: 100%; max-width: 1080px; height: auto; margin: 0 auto; overflow: hidden; font-family: var(--f-sans); }
.radial:not(.is-wide) { overflow: hidden; }
.rt-edge { stroke: var(--line-2); stroke-width: 1.5; }
.rt-edge.is-lit { stroke: var(--ink); stroke-width: 2.5; }
.rt-edge.is-ph { stroke-dasharray: 3 5; }
.rt-core circle { fill: var(--ink); }
.rt-core-t { fill: var(--bg); font-size: 11px; font-weight: 800; font-stretch: 125%; letter-spacing: 0.08em; }
.rt-core-n { fill: var(--bg); font-size: 22px; font-weight: 800; font-stretch: 112%; font-variant-numeric: tabular-nums; }
/* Bereich: der grosse erste Kreis nach der Mitte */
.rt-cat-node > circle { fill: var(--surface); stroke: var(--ink); stroke-width: 3; }
.rt-cat-node .ic { color: var(--ink); }
.rt-cat { fill: var(--ink); font-size: 16px; font-weight: 800; font-stretch: 125%; letter-spacing: 0.1em; paint-order: stroke; stroke: var(--surface); stroke-width: 5px; stroke-linejoin: round; }
/* Zoom auf einen Bereich */
.radial-wrap { position: relative; }
.rt-bar { display: flex; min-height: 38px; margin-bottom: 10px; }
.rt-back { opacity: 0; visibility: hidden; transform: translateY(4px); transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s; }
.rt-back.is-on { opacity: 1; visibility: visible; transform: none; transition: opacity 0.25s ease, transform 0.25s ease; }
.rt-q { transition: opacity 0.3s ease; }
.rt-q.is-dim { opacity: 0; pointer-events: none; }
.rt-cat-node { cursor: pointer; outline: none; }
.rt-cat-node > .rt-cat-hit { fill: transparent; stroke: none; }
.rt-cat-node > circle:not(.rt-cat-hit) { transition: stroke-width 0.2s ease, fill 0.2s ease; }
.rt-cat-node:hover > circle:not(.rt-cat-hit), .rt-cat-node:focus-visible > circle:not(.rt-cat-hit) { stroke-width: 5; }
.rt-cat-node:focus, .rt-core:focus { outline: none; }
.radial[data-focus]:not([data-focus='']) .rt-core { cursor: zoom-out; }
.radial:not(.is-wide) .rt-cat { font-size: 25px; font-stretch: 100%; letter-spacing: 0.06em; stroke-width: 8px; }
.radial-wrap, .rt-bar { max-width: 760px; margin-inline: auto; }
.rt-bar { margin-bottom: 10px; }
/* Gesperrte Knoten (vorerst alle) */
.rt-node > circle { fill: var(--surface); stroke: var(--line-2); stroke-width: 2; }
.rt-node .ic { color: var(--faint); }
/* Fähigkeiten */
.rt-dot { fill: var(--surface); stroke: var(--idle); stroke-width: 3; }
.rt-node:not(.is-open) .rt-dot { stroke: var(--line-2); stroke-width: 1.5; stroke-dasharray: 3 3; }
.rt-prog { fill: none; stroke: var(--ink); stroke-width: 3; }
.rt-node.t3 .rt-dot { fill: var(--ink); stroke: var(--ink); }
.rt-tier { fill: var(--ink); font-size: 13px; font-weight: 800; font-stretch: 125%; }
.rt-node.t3 .rt-tier { fill: var(--bg); }
.rt-node .ic { color: var(--faint); }
.rt-name { fill: var(--ink); font-size: 17px; font-weight: 650; paint-order: stroke; stroke: var(--surface); stroke-width: 5px; stroke-linejoin: round; }
.rt-meta { fill: var(--muted); font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; paint-order: stroke; stroke: var(--surface); stroke-width: 5px; stroke-linejoin: round; }
.rt-node:not(.is-open) .rt-name { fill: var(--muted); }
/* Platzhalter */
.rt-ph > circle { fill: var(--surface); stroke: var(--line-2); stroke-width: 1.5; stroke-dasharray: 3 3; }
.rt-ph .rt-name { fill: var(--faint); font-weight: 600; }
.rt-ph .rt-meta { fill: var(--faint); }
/* Handy: gewählten Bereich hervorheben */
.radial:not(.is-wide) .rt-c { transition: opacity 0.2s; }
.radial[data-lane='ausdauer']:not(.is-wide) .rt-c:not(.c-ausdauer),
.radial[data-lane='kraft']:not(.is-wide) .rt-c:not(.c-kraft),
.radial[data-lane='koordination']:not(.is-wide) .rt-c:not(.c-koordination),
.radial[data-lane='beweglichkeit']:not(.is-wide) .rt-c:not(.c-beweglichkeit) { opacity: 0.22; }
.lane-list { margin-top: 20px; }
.lane-sub { margin: 14px 0 2px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 10.5px; font-weight: 700; font-stretch: 125%; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.ph-dot { width: 52px; height: 52px; border-radius: 50%; border: 1.5px dashed var(--line-2); }
.node.is-ph .node-name, .node.is-ph .node-meta { color: var(--faint); }

.lane-tabs { display: flex; margin: 0 0 14px; border-bottom: 1px solid var(--line-2); overflow-x: auto; scrollbar-width: none; }
.lane-tab {
  flex: 1 0 auto; height: 44px; padding: 0 12px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; color: var(--muted);
  font-size: 11px; font-weight: 700; font-stretch: 125%; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; white-space: nowrap;
}
.lane-tab.is-on { color: var(--ink); border-bottom-color: var(--ink); }
.lanes { display: grid; gap: 12px; }
.lane { display: none; min-width: 0; padding: 18px 18px 8px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--card-border); }
.lane.is-active { display: block; }
.lane-h { display: flex; align-items: center; gap: 10px; }
.lane-h > .ic { width: 20px; height: 20px; }
.lane-name { flex: 1; min-width: 0; font-size: 12px; font-weight: 800; font-stretch: 125%; letter-spacing: 0.1em; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lane-n { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.lane-n small { font-size: 12px; font-weight: 600; color: var(--muted); }
.lane > .bar { margin: 12px 0 8px; }
.lane-nodes { list-style: none; margin: 0; padding: 0; }
.node { position: relative; }
.node + .node::before { content: ''; position: absolute; left: 25px; top: -10px; width: 2px; height: 20px; background: var(--line-2); }
.node.is-open + .node.is-open::before { background: var(--ink); }
.node-btn {
  display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 14px; align-items: center; width: 100%; padding: 10px 0; border: 0; background: none;
  color: inherit; text-align: left; cursor: default; border-radius: var(--r-s);
}
.node-txt { display: grid; gap: 2px; min-width: 0; }
.node-name { font-size: 15px; font-weight: 650; line-height: 1.25; overflow-wrap: anywhere; }
.node-meta { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.node-shared { justify-self: start; margin-top: 3px; padding: 2px 6px; border-radius: 2px; background: var(--chip); font-size: 10px; font-weight: 700; font-stretch: 125%; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.node-chev { color: var(--faint); transition: transform 0.15s; }
.node:not(.is-open) .node-name { color: var(--muted); }
.node-ring { background: var(--surface); border-radius: 50%; }
.node-ring .ring-in b { font-size: 14px; font-weight: 800; font-stretch: 125%; letter-spacing: 0.02em; }
.node-ring.is-locked .rg-track { stroke-dasharray: 2 3; }
.node-ring .ic { width: 18px; height: 18px; color: var(--faint); }
.node.t3 .node-ring { background: var(--ink); }
.node.t3 .node-ring .rg-bar, .node.t3 .node-ring .rg-track { stroke: var(--ink); }
.node.t3 .node-ring .ring-in b { color: var(--bg); }
.skill-top .node-ring .ring-in b { font-size: 30px; }
.skill-top .node-ring .ic { width: 28px; height: 28px; }

/* ================= Rangliste ================= */
.rank-tools { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-top: 16px; }
.rank-me { margin: 0; color: var(--muted); font-size: 14px; display: inline-flex; align-items: baseline; gap: 8px; }
.rank-me b { color: var(--ink); font-size: 22px; font-weight: 800; font-stretch: 112%; }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 8px; margin: 28px 0 0; }
.pod { display: grid; justify-items: center; gap: 6px; min-width: 0; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; text-align: center; }
.pod-av { position: relative; display: inline-flex; }
.pod-name { max-width: 100%; font-size: 14px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod-v { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pod-step { display: grid; place-items: center; width: 100%; margin-top: 4px; border-radius: var(--r-s) var(--r-s) 0 0; background: var(--surface); border: 1px solid var(--card-border); border-bottom: 0; }
.pod-step b { font-size: 30px; font-weight: 800; font-stretch: 125%; }
.pod-1 .pod-step { height: 116px; background: var(--ink); color: var(--bg); }
.pod-2 .pod-step { height: 84px; }
.pod-3 .pod-step { height: 62px; }
.lb { border-radius: 0 0 var(--r) var(--r); overflow: hidden; background: var(--surface); border: 1px solid var(--card-border); }
.lb-head, .lb-row { display: grid; grid-template-columns: 30px 46px minmax(0, 1fr) 44px 70px; gap: 10px; align-items: center; }
.lb-head { padding: 12px 16px 8px; border-bottom: 1px solid var(--line); }
.lb-head span:nth-child(n + 4) { text-align: right; }
.lb-row { width: 100%; padding: 11px 16px; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; }
.lb-row + .lb-row, .lb-gap + .lb-row { border-top: 1px solid var(--line); }
button.lb-row:hover { background: var(--hover); }
.lb-row.is-me { background: var(--chip); box-shadow: inset 3px 0 0 var(--ink); cursor: default; }
.lb-row.is-flash { animation: flash 1.4s ease; }
@keyframes flash { 0%, 50% { background: var(--line-2); } }
.lb-pos { font-size: 14px; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.lb-av { position: relative; display: inline-flex; }
.lb-name { min-width: 0; }
.lb-name b { display: block; font-size: 15px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-name span { display: block; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-v { text-align: right; font-size: 15px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.lb-v.is-key { color: var(--ink); font-weight: 800; }
@media (max-width: 559px) {
  .lb-head, .lb-row { grid-template-columns: 22px 36px minmax(0, 1fr) 30px 58px; gap: 8px; }
  .lb-head, .lb-row { padding-left: 12px; padding-right: 12px; }
  .lb-av .av { --size: 36px !important; }
  .lb-v.is-key { font-size: 14px; }
}
.lb-gap { padding: 6px; text-align: center; color: var(--faint); letter-spacing: 0.4em; border-top: 1px solid var(--line); }

/* ================= Spielerkarte & Freunde ================= */
.page-friends .search { margin: 14px 0 4px; }
#search-results .list { margin-top: 10px; }
.search-empty { margin: 10px 4px 0; }
.player { display: grid; justify-items: center; gap: 16px; margin: 0 0 22px; padding: 24px 20px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--card-border); text-align: center; }
.player-em { width: 116px; }
.player-em .emblem { width: 100%; height: auto; }
.player-b { display: grid; justify-items: center; gap: 8px; width: 100%; min-width: 0; }
.player-name { margin: 0; font-size: clamp(26px, 7vw, 40px); font-weight: 800; font-stretch: 112%; letter-spacing: -0.03em; line-height: 1; overflow-wrap: anywhere; }
.player-b > .small { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin: 0; }
.player-xp { display: grid; gap: 6px; width: min(100%, 440px); }
.player-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; width: 100%; max-width: 560px; margin: 8px 0; background: var(--line); border-block: 1px solid var(--line); }
.player-stats:has(> div:nth-child(4)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.player-stats > div { padding: 12px 8px; min-width: 0; background: var(--surface); }
@media (min-width: 560px) {
  .player-stats, .player-stats:has(> div:nth-child(4)) { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
}
.player-stats b { display: block; font-size: 22px; font-weight: 800; font-stretch: 112%; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.player-stats span { font-size: 10.5px; font-weight: 700; font-stretch: 112%; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); overflow-wrap: anywhere; }
.road { list-style: none; margin: 0; padding: 2px 0 10px; display: grid; grid-auto-flow: column; grid-auto-columns: 108px; gap: 8px; overflow-x: auto; scrollbar-width: thin; }
.road-i { display: grid; justify-items: center; gap: 3px; padding: 14px 6px 12px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--card-border); text-align: center; }
.road-i b { margin-top: 4px; font-size: 11.5px; font-weight: 800; font-stretch: 125%; letter-spacing: 0.06em; text-transform: uppercase; }
.road-i span { font-size: 11.5px; color: var(--muted); }
.road-i .road-xp { font-variant-numeric: tabular-nums; }
.em-road { width: 56px; height: 56px; }
.road-i.is-next .emblem { filter: grayscale(1); opacity: 0.3; }
.road-i.is-cur { box-shadow: inset 0 0 0 2px var(--ink); }
.cmp { padding: 4px 18px; }
.cmp-row { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px 0; }
.cmp-row + .cmp-row { border-top: 1px solid var(--line); }
.cmp-row .cap { color: var(--muted); }
.cmp-bars { display: grid; gap: 6px; }
.cmp-bar { display: grid; grid-template-columns: minmax(0, 1fr) 64px; gap: 10px; align-items: center; }
.cmp-bar span { display: block; height: 6px; width: max(2px, calc(var(--v) * 100%)); border-radius: 1px; background: var(--line-2); }
.cmp-bar.is-me span { background: var(--ink); }
.cmp-bar b { text-align: right; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.cmp-legend { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.cmp-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--line-2); margin-left: 6px; }
.cmp-legend i.is-me { background: var(--ink); }
@media (max-width: 420px) { .cmp-row { grid-template-columns: minmax(0, 1fr); gap: 8px; } }

.tab-body { padding-top: 4px; }
.two-col { display: grid; gap: 12px; margin-top: 24px; }
.chart { display: block; width: 100%; height: auto; }
.ch-grid { stroke: var(--line); stroke-width: 1; }
.ch-lab, .ch-x { fill: var(--muted); font-family: var(--f-sans); font-size: 10px; font-weight: 600; letter-spacing: 0.02em; }
.ch-line { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.ch-area { fill: var(--ink); opacity: 0.06; }
.ch-pt { fill: var(--surface); stroke: var(--ink); stroke-width: 2; }
.ch-last { fill: var(--ink); stroke: var(--surface); stroke-width: 2; }
.ch-halo { fill: var(--ink); opacity: 0.1; }
.radar { display: block; width: 100%; max-width: 360px; height: auto; margin: 0 auto; }
.rd-grid { fill: none; stroke: var(--line-2); stroke-width: 1; }
.rd-shape { fill: var(--ink); fill-opacity: 0.1; stroke: var(--ink); stroke-width: 1.5; stroke-linejoin: round; }
.rd-lab { fill: var(--muted); font-family: var(--f-sans); font-size: 8px; font-weight: 700; font-stretch: 125%; letter-spacing: 0.08em; }
.rd-val { fill: var(--ink); font-weight: 800; }
.dotgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.dg-h { font-size: 10px; font-weight: 700; color: var(--muted); text-align: center; }
.dg-d { aspect-ratio: 1; border-radius: 2px; background: var(--idle); }
.dg-d.is-active { background: var(--ink); }
.dg-d.is-frozen { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink); }
.dg-d.is-today { outline: 1.5px solid var(--ink); outline-offset: 1px; }
.week-sum { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 28px; margin: 20px 0 6px; }
.week-sum b { display: block; font-size: 24px; font-weight: 800; font-stretch: 112%; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.day-group { margin-top: 20px; }
.day-group > .cap { display: block; margin: 0 0 8px; }
.act-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; width: 100%; padding: 12px 16px; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; }
.act-row:hover { background: var(--hover); }
.act-ic { width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--r-s); background: var(--chip); }
.act-ic .ic { width: 22px; height: 22px; }
.act-b { min-width: 0; }
.act-b b { display: block; font-size: 15px; font-weight: 650; }
.act-b span { display: block; font-size: 13px; color: var(--muted); }
.act-xp { font-weight: 800; font-variant-numeric: tabular-nums; }
.ms-grid, .medal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 24px 12px; }
.ms-item, .medal-item { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 0; border: 0; background: none; color: inherit; }
.medal-item { cursor: pointer; }
.ms-label { font-size: 13px; font-weight: 600; line-height: 1.25; }
.ms .ring-in { gap: 2px; }
.ms-big { font-size: 18px; font-weight: 800; font-stretch: 112%; line-height: 1; }
.ms-ic { width: 15px; height: 15px; color: var(--muted); }
.ms-item:not(.is-on) .rg-bar { stroke: var(--faint); }
.ms-item:not(.is-on) .ms-big { color: var(--muted); }
.medal {
  position: relative; width: 82px; aspect-ratio: 0.72; border-radius: 999px; padding: 15% 6px 11%; display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  background: #111214; border: 2px solid #2a2c30; color: #f4f5f6;
}
.medal-ic .ic { width: 18px; height: 18px; opacity: 0.85; }
.medal-big { font-size: 14px; font-weight: 800; font-stretch: 125%; letter-spacing: 0.02em; line-height: 1; white-space: nowrap; }
.medal-mark { display: block; width: 12px; height: 4px; background: var(--signal); transform: skewX(-18deg); }
.medal.is-on { border-color: #f4f5f6; box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--line-2); }
.medal.is-off { opacity: 0.28; filter: grayscale(1); }

/* ================= Onboarding ================= */
.onb-welcome {
  /* Inhalt genau in der Bildschirmmitte, Logo oben links */
  position: relative; min-height: 100vh; min-height: 100dvh; display: grid; place-items: center;
  padding: calc(84px + env(safe-area-inset-top, 0px)) var(--gutter) calc(84px + env(safe-area-inset-bottom, 0px));
  background: var(--night);
}
.onb-welcome > .brand { position: absolute; top: calc(24px + env(safe-area-inset-top, 0px)); left: var(--gutter); }
.onb-welcome .wordmark { --wm: 24px; }
.wl-mid { display: grid; justify-items: center; gap: 22px; width: 100%; max-width: 1100px; text-align: center; }
.wl-mid .mega { max-width: 9ch; text-align: center; }
.wl-msg { margin: 0; max-width: 38ch; font-size: clamp(16px, 4.2vw, 19px); color: var(--muted); }
.wl-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; width: 100%; }
.wl-actions .btn { flex: 1 1 200px; max-width: 280px; height: 56px; }
.onb-step { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; max-width: 620px; margin: 0 auto; padding: 0 var(--gutter); }
.onb-head { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 8px; padding-top: calc(10px + env(safe-area-inset-top, 0px)); margin-left: -10px; }
.onb-title { text-align: center; font-size: 11px; font-weight: 700; font-stretch: 125%; letter-spacing: 0.1em; text-transform: uppercase; }
.onb-count { font-size: 12px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.onb-progress { height: 3px; margin: 12px 0 0; background: var(--idle); overflow: hidden; }
.onb-progress span { display: block; height: 100%; background: var(--ink); transition: width 0.35s ease; }
.onb-body { flex: 1; padding-bottom: 20px; }
.onb-q { font-size: clamp(26px, 6.6vw, 36px); font-weight: 800; font-stretch: 112%; letter-spacing: -0.03em; line-height: 1.08; text-align: center; margin: 36px 0 10px; text-wrap: balance; }
.onb-hint { color: var(--muted); text-align: center; margin: 0 auto 26px; max-width: 46ch; }
.onb-foot { position: sticky; bottom: 0; padding: 16px 0 calc(16px + env(safe-area-inset-bottom, 0px)); background: var(--bg); }
.opts { display: grid; gap: 8px; }
.opt { display: flex; align-items: center; gap: 16px; width: 100%; padding: 16px 18px; border-radius: var(--r-s); background: var(--surface); border: 1px solid var(--line-2); color: var(--ink); text-align: left; cursor: pointer; }
.opt:hover { border-color: var(--ink); }
.opt.is-on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.opt.is-on > .ic { color: var(--bg); background: var(--ink); }
.opt > .ic { width: 40px; height: 40px; padding: 9px; border-radius: var(--r-s); background: var(--chip); }
.opt b { display: block; font-size: 16px; font-weight: 700; }
.opt span span { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }
.opts-compact .opt { padding: 12px 14px; }
.grp-h { display: block; margin: 22px 0 10px; }

/* ================= Sheets ================= */
.layer { position: fixed; inset: 0; z-index: 60; }
.scrim { position: absolute; inset: 0; background: var(--scrim); opacity: 0; transition: opacity 0.22s; }
.layer.is-open .scrim { opacity: 1; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 92vh; max-height: 92dvh; overflow: auto; overscroll-behavior: contain;
  background: var(--surface); border-radius: 12px 12px 0 0; transform: translateY(100%); transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.layer.is-open .sheet { transform: none; }
.sheet:focus { outline: none; }
.sheet-grab { display: block; width: 40px; height: 4px; margin: 10px auto 2px; border-radius: 2px; background: var(--line-2); }
.sheet-body { padding: 0 var(--gutter) calc(28px + env(safe-area-inset-bottom, 0px)); }
.sheet-body:has(.log-foot) { padding-bottom: 0; }
.sh-head { position: sticky; top: 0; z-index: 3; display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 8px; padding: 6px 0 10px; margin: 0 -10px; background: var(--surface); }
.sh-title { margin: 0; text-align: center; font-size: 11.5px; font-weight: 800; font-stretch: 125%; letter-spacing: 0.1em; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-lead { margin: 4px 0 16px; font-size: 22px; font-weight: 800; font-stretch: 112%; letter-spacing: -0.02em; line-height: 1.15; }
.sh-sec { margin-top: 26px; }
.sh-sec > .cap { display: block; margin: 0 0 10px; }
.prose p { margin: 0 0 12px; font-size: 15.5px; line-height: 1.55; }
.prose .cap { display: block; margin: 22px 0 6px; }
.skill-top { display: flex; align-items: center; gap: 18px; margin: 4px 0 16px; }
.skill-top .cap-l { margin-top: 8px; }
.skill-prog { display: grid; gap: 8px; margin-bottom: 4px; }
.skill-prog .small { margin: 0; }
.def { margin: 0 0 10px; padding: 16px 18px; border-left: 3px solid var(--ink); background: var(--surface-2); }
.def p { margin: 0 0 8px; font-size: 15px; line-height: 1.55; }
.def a { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); text-decoration: none; font-size: 10.5px; font-weight: 700; font-stretch: 125%; letter-spacing: 0.08em; text-transform: uppercase; }
.def a:hover { text-decoration: underline; }
.note { margin: 8px 0 0; }
.tasks { list-style: none; margin: 0 0 10px; padding: 0; }
.task { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 8px 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.task:first-child { border-top: 0; }
.task > :last-child { grid-column: 2; justify-self: start; }
.task-n { width: 34px; height: 34px; display: grid; place-items: center; border-radius: var(--r-s); border: 1.5px solid var(--line-2); font-size: 12px; font-weight: 800; font-stretch: 125%; }
.task.is-done .task-n { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.task.is-avail .task-n { border-color: var(--ink); }
.task-b p { margin: 0 0 3px; font-size: 15px; line-height: 1.4; }
.task-done, .task-lock { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 700; font-stretch: 125%; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.task-done { color: var(--ink); }
.task:not(.is-done):not(.is-avail) .task-b p { color: var(--muted); }
.duel-hero { display: grid; justify-items: center; gap: 8px; margin: 4px 0 18px; text-align: center; }
.duel-hero > .ic { width: 34px; height: 34px; }
.duel-hero p { margin: 0; max-width: 40ch; }

/* Training erfassen */
.cat-list { margin-bottom: 8px; border: 1px solid var(--line-2); border-radius: var(--r-s); }
.cat-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; width: 100%; padding: 14px 16px; border: 0; background: none; color: var(--ink); text-align: left; cursor: pointer; }
.cat-row:hover { background: var(--hover); }
.cat-row > .ic:first-child { width: 44px; height: 44px; padding: 11px; border-radius: var(--r-s); background: var(--ink); color: var(--bg); }
.cat-row > .ic:last-child { color: var(--faint); }
.cat-b { display: grid; gap: 2px; min-width: 0; }
.cat-b b { font-size: 16px; font-weight: 700; }
.cat-b span { font-size: 13px; color: var(--muted); }
.log-cat { display: flex; align-items: center; gap: 10px; padding: 0 0 14px; border-bottom: 1px solid var(--line); }
.log-cat .ic { width: 34px; height: 34px; padding: 8px; border-radius: var(--r-s); background: var(--ink); color: var(--bg); }
.log-cat b { font-size: 12px; font-weight: 800; font-stretch: 125%; letter-spacing: 0.1em; text-transform: uppercase; }
.log-sec { margin-top: 24px; }
.log-sec > .cap { display: flex; justify-content: space-between; gap: 10px; margin: 0 0 10px; }
.log-sec > .cap .muted { letter-spacing: 0.04em; }
.rpe { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; }
.rpe-b {
  height: 46px; padding: 0; border: 0; border-radius: 2px; background: var(--chip); color: var(--muted); cursor: pointer;
  font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; transition: background-color 0.12s, color 0.12s;
}
.rpe-b:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.rpe-b.is-below { background: color-mix(in srgb, var(--ink) 22%, var(--chip)); color: var(--ink); }
.rpe-b.is-on { background: var(--ink); color: var(--bg); }
.rpe-scale { display: flex; justify-content: space-between; margin-top: 8px; font-size: 10px; font-weight: 700; font-stretch: 125%; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
#rpe-hint { margin: 10px 0 0; }
.when { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.time-field { display: inline-flex; align-items: center; height: 42px; padding: 0 12px; border-radius: var(--r-s); background: var(--surface); border: 1px solid var(--line-2); }
.time-field:focus-within { border-color: var(--ink); }
.time-field input { border: 0; background: transparent; color: var(--ink); font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; outline: none; }
.log-foot {
  position: sticky; bottom: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin: 26px calc(-1 * var(--gutter)) 0; padding: 14px var(--gutter) calc(14px + env(safe-area-inset-bottom, 0px)); background: var(--surface); border-top: 1px solid var(--line);
}
.log-foot .btn { flex: none; min-width: 150px; }
.log-foot .btn-block { flex: 1; }

/* Ergebnis */
.reward { display: grid; gap: 14px; padding-top: 18px; }
.reward .eyebrow { text-align: center; }
.reward-xp { display: flex; align-items: baseline; justify-content: center; gap: 8px; }
.reward-xp b { font-size: clamp(64px, 18vw, 92px); font-weight: 800; font-stretch: 112%; letter-spacing: -0.04em; line-height: 0.9; font-variant-numeric: tabular-nums; }
.reward-xp span { font-size: 13px; font-weight: 800; font-stretch: 125%; letter-spacing: 0.1em; color: var(--muted); }
.legal-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.legal-links .link-btn { font-size: 14px; font-weight: 500; }
.legal-links.is-welcome { position: absolute; left: 0; right: 0; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); justify-content: center; }
.legal-links.is-welcome .link-btn { color: var(--muted); font-size: 12.5px; }
.legal h4 { margin-top: 22px; }
.legal-ul { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 4px; line-height: 1.5; }
.reward-note { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 12px 14px; border-radius: var(--r-s); background: var(--chip); font-size: 14px; text-align: left; }
.reward-note.is-ok { background: var(--ink); color: var(--bg); }
.reward-note .ic { flex: none; margin-top: 2px; }
.pl-rule { margin: 12px 0 0; }
.reward-sub { margin: 0; text-align: center; color: var(--muted); font-size: 14px; }
.reward-level { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px 12px; padding: 14px 16px; border-radius: var(--r-s); background: var(--surface-2); border: 1px solid var(--line); }
.reward-level > div { display: grid; gap: 2px; min-width: 0; }
.reward-level .bar { grid-column: 1 / -1; }
.reward-skills .cap { display: block; margin-bottom: 8px; }
.formula { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin: 6px 0 10px; }
.formula span { padding: 9px 12px; border-radius: var(--r-s); border: 1px solid var(--line-2); font-size: 11px; font-weight: 700; font-stretch: 125%; letter-spacing: 0.06em; text-transform: uppercase; }
.formula i { font-style: normal; font-weight: 700; color: var(--muted); }
.rules { list-style: none; margin: 18px 0; padding: 0; }
.rules li { display: grid; gap: 2px; padding: 12px 0; border-top: 1px solid var(--line); }
.rules b { font-size: 15px; }
.rules span { color: var(--muted); font-size: 14px; }
.lv-table { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.lv-table div { padding: 10px 12px; border-radius: var(--r-s); background: var(--surface-2); border: 1px solid var(--line); }
.lv-table b { display: block; font-size: 18px; font-weight: 800; }
.lv-table span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.xp-list { list-style: none; margin: 4px 0; padding: 0; border-top: 1px solid var(--line); }
.xp-list li { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.xp-list b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.xp-total { font-weight: 800; }
.act-hero { display: flex; align-items: center; gap: 16px; margin: 4px 0 6px; }
.act-hero p { margin: 4px 0 0; }
.act-ic-l { width: 60px; height: 60px; }
.act-ic-l .ic { width: 30px; height: 30px; }
.badge-detail { display: grid; justify-items: center; gap: 10px; padding: 10px 0 6px; text-align: center; }
.badge-detail .medal { width: 116px; }
.badge-detail p { margin: 0; max-width: 40ch; }
.credits { margin-top: 28px; }

/* ================= Live ================= */
.live {
  position: relative; min-height: 100vh; min-height: 100dvh; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto;
  background: var(--night);
}
.live-top { grid-row: 1; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: calc(10px + env(safe-area-inset-top, 0px)) var(--gutter) 0; }
.live-sport { justify-self: center; display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; font-stretch: 125%; letter-spacing: 0.1em; text-transform: uppercase; }
.live-state { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: var(--r-s); border: 1px solid var(--line-2); font-size: 10.5px; font-weight: 700; font-stretch: 125%; letter-spacing: 0.08em; text-transform: uppercase; }
.live:not(.is-paused) .live-state::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--signal); animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.25; } }
.live-confirm { grid-row: 2; display: grid; gap: 10px; margin: 12px var(--gutter) 0; padding: 14px 16px; border-radius: var(--r-s); background: var(--night-2); }
.live-confirm p { margin: 0; }
.live-main { grid-row: 3; display: grid; align-content: center; justify-items: center; gap: 20px; padding: 16px var(--gutter); }
.live-bezel { width: min(84vw, 420px, 56vh); }
.live-bezel .tk.on { stroke: var(--ink); }
.live-bezel .cap { color: var(--muted); font-size: max(11px, 3.4cqi); }
.live-time { font-size: 25cqi; font-weight: 300; letter-spacing: -0.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.live-hint { margin: 0; max-width: 34ch; text-align: center; color: var(--muted); font-size: 13.5px; }
.live-bar { grid-row: 4; padding: 18px var(--gutter) calc(20px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); }
.live-ctrl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 540px; margin: 0 auto; }
.live-ctrl .btn { height: 60px; }

/* ================= Toasts ================= */
.toasts { position: fixed; z-index: 90; top: calc(10px + env(safe-area-inset-top, 0px)); left: 50%; width: min(460px, calc(100vw - 32px)); transform: translateX(-50%); display: grid; gap: 8px; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-s); background: var(--toast-bg); color: var(--toast-fg);
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.45); opacity: 0; transform: translateY(-6px); transition: opacity 0.22s, transform 0.22s; pointer-events: auto; font-size: 14px;
}
.toast.is-in { opacity: 1; transform: none; }
.toast-t { flex: 1; min-width: 0; }
.toast-btn { flex: none; padding: 6px 10px; border: 1px solid currentColor; border-radius: 2px; background: none; color: inherit; font-size: 10.5px; font-weight: 700; font-stretch: 125%; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; }
.fx { display: none; }

/* ================= Feiermomente ================= */
.celebrate {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; overflow: auto;
  padding: calc(24px + env(safe-area-inset-top, 0px)) var(--gutter) calc(24px + env(safe-area-inset-bottom, 0px));
  background: rgba(5, 5, 6, 0.96); opacity: 0; transition: opacity 0.22s;
}
.celebrate.is-in { opacity: 1; }
.cel-body { position: relative; display: grid; justify-items: center; gap: 12px; width: 100%; max-width: 400px; text-align: center; }
.cel-ring { position: relative; width: min(56vw, 220px); }
.cel-r { --size: 100% !important; width: 100%; height: auto; aspect-ratio: 1; container-type: inline-size; }
.cel-r .rg-bar { stroke: var(--signal); stroke-linecap: round; }
.cel-ring .cap { color: var(--muted); }
.cel-num { font-size: 36cqi; font-weight: 800; font-stretch: 112%; letter-spacing: -0.04em; line-height: 0.95; font-variant-numeric: tabular-nums; }
.cel-h { margin: 6px 0 0; font-size: clamp(28px, 8vw, 40px); font-weight: 800; font-stretch: 125%; text-transform: uppercase; letter-spacing: -0.01em; line-height: 0.98; text-wrap: balance; }
.cel-p { margin: 0; color: var(--muted); }
.cel-xp { margin: 0; font-size: 13px; font-weight: 800; font-stretch: 125%; letter-spacing: 0.1em; color: var(--signal); }
.cel-split { display: grid; grid-template-columns: 1fr 1fr; width: 100%; margin-top: 8px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cel-split > div { display: grid; gap: 4px; padding: 14px; }
.cel-split > div + div { border-left: 1px solid var(--line); }
.cel-split span { font-size: 10.5px; font-weight: 700; font-stretch: 125%; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.cel-split b { font-size: 30px; font-weight: 800; font-stretch: 112%; font-variant-numeric: tabular-nums; }
.cel-badge { padding: 18px 0 6px; }
.cel-badge .medal { width: 124px; }
.cel-badge .ring { --size: 124px !important; }
.cel-badge .ms-big { font-size: 32px; }
.cel-rank { width: min(48vw, 180px); margin: 8px 0; }
.cel-rank .emblem { width: 100%; height: auto; }
.cel-vs { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 10px 0; }
.cel-vs-score { display: flex; align-items: baseline; gap: 8px; font-variant-numeric: tabular-nums; }
.cel-vs-score b { font-size: 38px; font-weight: 800; font-stretch: 112%; letter-spacing: -0.03em; }
.cel-vs-score i { font-style: normal; font-size: 26px; color: var(--muted); }
.cel-actions { display: grid; justify-items: center; gap: 6px; width: 100%; margin-top: 14px; }
.cel-actions .link-btn { color: var(--muted); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ================= Breiter ================= */
@media (min-width: 560px) {
  .opts-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .duel-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
  .hero { padding: 26px 28px 24px; }
  .hero-ring { --size: 132px !important; }
  .hero-top { gap: 26px; }
  .hero-xp b { font-size: 40px; }
}
@media (min-width: 720px) {
  .home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero, .p-missions { grid-column: 1 / -1; }
  .panel { padding: 22px 24px; }
  .two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .player { grid-template-columns: 132px minmax(0, 1fr); justify-items: start; align-items: center; text-align: left; gap: 28px; padding: 28px; }
  .player-em { width: 132px; }
  .player-b { justify-items: start; }
  .player-b > .small { justify-content: flex-start; }
  .road { grid-auto-flow: row; grid-template-columns: repeat(5, minmax(0, 1fr)); overflow: visible; }
  .lane-list { display: none; }
  .radial-wrap { padding: 0; }
  .sheet { left: 50%; right: auto; top: 50%; bottom: auto; width: min(560px, calc(100vw - 48px)); max-height: 88vh; border-radius: var(--r); opacity: 0; transform: translate(-50%, -48%); transition: transform 0.22s, opacity 0.22s; }
  .layer.is-open .sheet { opacity: 1; transform: translate(-50%, -50%); }
  .sheet-wide { width: min(660px, calc(100vw - 48px)); }
  .sheet-grab { display: none; }
  .sh-head { padding-top: 14px; }
  .log-foot { padding-bottom: 18px; }
}

/* ================= Desktop ================= */
@media (min-width: 1024px) {
  .rail {
    position: fixed; inset: 0 auto 0 0; z-index: 30; width: var(--rail-w); display: flex; flex-direction: column; gap: 28px; padding: 26px 16px 20px; overflow: auto;
    background: var(--surface); border-right: 1px solid var(--line);
  }
  .rail > .brand { padding: 4px 12px 0; }
  .rail-nav { display: grid; gap: 2px; }
  .rail .nav-i { flex-direction: row; justify-content: flex-start; gap: 14px; width: 100%; height: 46px; padding: 0 14px; border-radius: var(--r-s); color: var(--muted); font-size: 11.5px; font-stretch: 125%; letter-spacing: 0.08em; }
  .rail .nav-i:hover { background: var(--hover); color: var(--ink); }
  .rail .nav-i.is-on { background: var(--chip); color: var(--ink); box-shadow: inset 3px 0 0 var(--ink); }
  .rail-cta { display: grid; gap: 8px; margin-top: auto; }
  .rail-cta .btn { padding: 0 12px; font-size: 11px; letter-spacing: 0.06em; }
  #rail-user { display: grid; gap: 10px; }
  #rail-user .live-pill { justify-self: start; }
  .rail-user { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; padding: 8px; border: 0; border-radius: var(--r-s); background: none; color: inherit; text-align: left; cursor: pointer; }
  .rail-user:hover { background: var(--hover); }
  .rail-user-b { min-width: 0; }
  .rail-user-b b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .rail-user-b span { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .rail-user .streak-pill { height: 30px; padding: 0 8px; }
  #rail-user .bar { margin: 0 8px; }
  .topbar, .tabbar { display: none; }
  .main { max-width: none; margin: 0 0 0 var(--rail-w); padding: 28px 44px 60px; }
  .page { max-width: 1160px; margin: 0 auto; }
  .toasts { top: auto; bottom: 28px; left: auto; right: 28px; transform: none; }
  .hero { grid-template-columns: minmax(0, 1fr) minmax(300px, 0.9fr); grid-template-areas: 'top stats' 'top actions'; align-items: center; column-gap: 40px; row-gap: 18px; padding: 30px 32px; }
  .hero-top { grid-area: top; }
  .hero-stats { grid-area: stats; }
  .hero-actions { grid-area: actions; }
  .hero-ring { --size: 148px !important; }
}
@media (min-width: 1280px) {
  .home-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }
  .home-grid > * { grid-column: span 4; }
  .home-grid > .hero { grid-column: 1 / -1; }
  .home-grid > .p-missions { grid-column: span 7; }
  .home-grid > .p-duel { grid-column: span 5; }
  .home-grid > .p-muscle, .home-grid > .p-feed { grid-column: span 6; }
  .hero-ring { --size: 164px !important; }
  .hero-xp b { font-size: 46px; }
}

/* ================= Animierte Figur (Stil der Muskel-Map) ================= */
.fig { display: block; width: 100%; height: auto; overflow: visible; }
.fig line { stroke-linecap: round; }
.fig .fig-out { stroke: var(--surface); }
.fig circle.fig-out { fill: var(--surface); stroke: none; }
.fig .fig-seg { stroke: color-mix(in srgb, var(--ink) 24%, var(--surface)); }
.fig .fig-seg.is-far { stroke: color-mix(in srgb, var(--ink) 13%, var(--surface)); }
.fig .fig-seg.is-hi { stroke: color-mix(in srgb, var(--ink) 82%, var(--surface)); }
.fig .fig-seg.is-far.is-hi { stroke: color-mix(in srgb, var(--ink) 55%, var(--surface)); }
.fig circle.fig-seg { stroke: none; fill: color-mix(in srgb, var(--ink) 24%, var(--surface)); }
.fig circle.fig-seg.is-hi { fill: color-mix(in srgb, var(--ink) 82%, var(--surface)); }
.fig .fig-ground { stroke: var(--line-2); stroke-width: 1.5; }
.fig .fig-shadow { fill: var(--ink); opacity: 0.06; }
.fig .fig-prop { fill: var(--chip); stroke: var(--line-2); stroke-width: 1.5; }
.fig .fig-wall { stroke: var(--line-2); stroke-width: 3; }
.fig .fig-mark { stroke: color-mix(in srgb, var(--ink) 45%, var(--surface)); stroke-width: 2.5; stroke-dasharray: 5 4; }
.fig .fig-ball { fill: var(--ink); }
/* Seitenwechsel: die Figur dreht sich weich um die Bildmitte */
.fig .fig-root { transform-box: fill-box; transform-origin: 50% 50%; transition: transform 0.55s cubic-bezier(0.65, 0, 0.35, 1); }
.fig.is-mirror .fig-root { transform: scaleX(-1); }
.fig-side { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); padding: 5px 10px; border-radius: var(--r-s); background: var(--ink); color: var(--bg); font-size: 10.5px; font-weight: 700; font-stretch: 125%; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
.pl-stage { position: relative; }

/* ================= Skilltree: Ansicht und klickbare Knoten ================= */
.sk-tools { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 4px 0 14px; }
.rt-node.is-link { cursor: pointer; outline: none; }
.rt-node > .rt-hit { fill: transparent; stroke: none; }
.rt-node > .rt-prog { fill: none; stroke: var(--ink); stroke-width: 3; }
.rt-node.is-open > circle:not(.rt-hit):not(.rt-prog) { stroke: var(--idle); stroke-width: 3; }
.rt-node.t3 > circle:not(.rt-hit):not(.rt-prog) { fill: var(--ink); stroke: var(--ink); }
.rt-node.is-link:hover > circle:not(.rt-hit):not(.rt-prog), .rt-node.is-link:focus-visible > circle:not(.rt-hit):not(.rt-prog) { stroke: var(--ink); }
.rt-dot-in { fill: var(--ink); }
.tl-cat { margin-top: 22px; }
.tl-cat:first-child { margin-top: 0; }
.tl-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.tl-head .sec-t { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.tl-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; width: 100%; padding: 12px 16px; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; }
.tl-row:hover { background: var(--hover); }
.tl-row > .ic { color: var(--faint); }
.tl-b { display: grid; gap: 2px; min-width: 0; }
.tl-b b { font-size: 15px; font-weight: 650; }
.tl-b span { font-size: 12.5px; color: var(--muted); }
.tl-row.is-locked .tl-b b { color: var(--muted); }

/* ================= Training: Detailseite ================= */
.page-training { max-width: 760px; margin: 0 auto; }
.tr-hero { position: relative; border-radius: var(--r); background: var(--surface); border: 1px solid var(--card-border); overflow: hidden; }
.tr-stage { display: grid; place-items: center; aspect-ratio: 16 / 10; padding: 52px 18px 12px; }
.tr-stage.is-graph { display: block; aspect-ratio: auto; padding: 60px 20px 20px; }
.tr-stage .fig-lg { max-width: 640px; max-height: 100%; }
.tr-chip { position: absolute; top: 14px; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: var(--r-s); background: var(--surface); border: 1px solid var(--line-2); font-size: 11px; font-weight: 700; font-stretch: 125%; letter-spacing: 0.08em; text-transform: uppercase; }
.tr-chip-l { left: 14px; }
.tr-chip-r { right: 14px; font-variant-numeric: tabular-nums; }
.tr-head { margin: 22px 0 0; }
.tr-head .title { margin-bottom: 0; }
.tr-sec { margin-top: 28px; }
.tr-sec > .sec-t { margin-bottom: 10px; }
.tr-rounds { margin: 0 0 8px; font-weight: 650; }
.tr-steps { list-style: none; margin: 0 0 10px; padding: 0; border-top: 1px solid var(--line); }
.tr-steps > li { border-bottom: 1px solid var(--line); }
.tr-steps > li > span { display: block; padding: 12px 0; font-weight: 600; }
.tr-step { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 12px; align-items: baseline; width: 100%; padding: 13px 8px; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; }
.tr-step:hover { background: var(--hover); }
.tr-step.is-on { box-shadow: inset 3px 0 0 var(--ink); background: var(--chip); }
.tr-step b { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tr-step span { font-weight: 600; min-width: 0; }
.tr-step small { display: block; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.tr-step em { font-style: normal; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.tr-cues { margin: 0; padding-left: 20px; display: grid; gap: 6px; line-height: 1.5; }
.tr-var { display: grid; gap: 10px; margin: 14px 0 0; }
.tr-var dt { font-size: 10.5px; font-weight: 700; font-stretch: 125%; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.tr-var dd { margin: 2px 0 0; }
.tr-why { margin: 0; font-size: 15.5px; line-height: 1.6; max-width: 64ch; }
.tr-alt { margin: 0; padding-left: 20px; display: grid; gap: 6px; line-height: 1.5; }
.tr-src { list-style: none; margin: 0 0 8px; padding: 0; }
.tr-src li { display: grid; gap: 2px; padding: 10px 0; border-top: 1px solid var(--line); }
.tr-src a { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; color: var(--ink); text-decoration: none; }
.tr-src a:hover { text-decoration: underline; }
.tr-src span { font-size: 12.5px; color: var(--muted); }
.tr-foot { position: sticky; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px)); z-index: 5; margin-top: 28px; padding: 12px 0; background: linear-gradient(to top, var(--bg) 70%, transparent); }
.tr-lock { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 14px; color: var(--muted); }
@media (min-width: 1024px) { .tr-foot { bottom: 0; } }

/* Ablauf-Grafik (Ausdauer) */
.ig-svg { display: block; width: 100%; height: 140px; }
.ig-bar { fill: color-mix(in srgb, var(--ink) 22%, var(--surface)); }
.ig-bar.is-wu { fill: color-mix(in srgb, var(--ink) 10%, var(--surface)); }
.ig-bar.is-l2 { fill: color-mix(in srgb, var(--ink) 45%, var(--surface)); }
.ig-bar.is-l3 { fill: color-mix(in srgb, var(--ink) 70%, var(--surface)); }
.ig-bar.is-l4 { fill: var(--ink); }
.ig-bar.is-done { opacity: 0.3; }
.ig-bar.is-now { stroke: var(--ink); stroke-width: 2; }
.ig-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.ig-key { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 2px; vertical-align: -1px; background: color-mix(in srgb, var(--ink) 22%, var(--surface)); }
.ig-key.is-wu { background: color-mix(in srgb, var(--ink) 10%, var(--surface)); }
.ig-key.is-l2 { background: color-mix(in srgb, var(--ink) 45%, var(--surface)); }
.ig-key.is-l3 { background: color-mix(in srgb, var(--ink) 70%, var(--surface)); }
.ig-key.is-l4 { background: var(--ink); }

/* ================= Training: Player ================= */
.gplayer { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; max-width: 760px; margin: 0 auto; background: var(--bg); }
.gplayer > .pl-main { flex: 1; }
.pl-top { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 8px; padding: calc(10px + env(safe-area-inset-top, 0px)) var(--gutter) 6px; }
.pl-phase { display: grid; gap: 1px; text-align: center; min-width: 0; }
.pl-phase b { font-size: 11.5px; font-weight: 800; font-stretch: 125%; letter-spacing: 0.08em; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-phase span { font-size: 12.5px; color: var(--muted); }
.pl-count { justify-self: end; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pl-progress { height: 3px; margin: 6px var(--gutter) 0; background: var(--idle); overflow: hidden; }
.pl-progress span { display: block; height: 100%; background: var(--ink); transition: width 0.3s ease; }
.pl-confirm { display: grid; gap: 10px; margin: 12px var(--gutter) 0; padding: 12px 14px; border-radius: var(--r-s); background: var(--chip); }
.pl-confirm p { margin: 0; }
.pl-main { display: grid; justify-items: center; align-content: start; gap: 10px; padding: 16px var(--gutter) 24px; text-align: center; }
.pl-stage { width: 100%; padding: 16px 12px 8px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--card-border); }
.pl-stage.is-next { opacity: 0.55; }
.pl-stage.is-rest { display: grid; place-items: center; height: 200px; color: var(--faint); }
.pl-stage.is-rest .ic { width: 40px; height: 40px; }
.pl-stage.is-graph { padding: 18px; text-align: left; }
.pl-name { margin: 10px 0 0; font-size: clamp(26px, 6vw, 34px); font-weight: 800; font-stretch: 112%; letter-spacing: -0.02em; line-height: 1.1; }
.pl-name small { font-size: 0.5em; font-weight: 700; font-stretch: 125%; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.pl-amount { font-size: clamp(56px, 16vw, 88px); font-weight: 800; font-stretch: 112%; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.gplayer.is-paused .pl-amount { opacity: 0.4; }
.pl-cues { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; max-width: 46ch; font-size: 14.5px; color: var(--muted); }
.pl-next, .pl-hint { margin: 0; color: var(--muted); }
.pl-next b { color: var(--ink); }
.pl-callout { min-width: 60%; padding: 12px 24px; border-radius: var(--r-s); background: var(--ink); color: var(--bg); font-size: clamp(36px, 11vw, 60px); font-weight: 800; font-stretch: 125%; text-transform: uppercase; letter-spacing: 0.02em; }
.pl-callout.is-flash { animation: pl-pop 0.25s ease; }
@keyframes pl-pop { from { transform: scale(0.92); opacity: 0.4; } to { transform: none; opacity: 1; } }
.pl-bar { position: sticky; bottom: 0; display: grid; gap: 10px; padding: 12px var(--gutter) calc(14px + env(safe-area-inset-bottom, 0px)); background: var(--bg); border-top: 1px solid var(--line); }
.pl-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: var(--muted); }
.pl-total b { color: var(--ink); font-size: 15px; font-variant-numeric: tabular-nums; }
.pl-ctrl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 8px; }
.pl-ctrl .btn { min-width: 0; padding: 0 14px; }
.pl-ctrl.is-one { grid-template-columns: 1fr; }
.pl-done { align-content: center; min-height: 60vh; }
.pl-mega { font-size: clamp(56px, 16vw, 110px); }
.pl-sum { margin: 0; color: var(--muted); }
.pl-rpe { width: 100%; max-width: 520px; margin-top: 18px; text-align: left; }
.pl-rpe .cap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; margin: 0 0 10px; }

/* ================= Einstellungen oben rechts ================= */
.set-btn { width: 36px; height: 36px; }
.set-btn .ic { width: 20px; height: 20px; }
.corner-set { display: none; }
@media (min-width: 1024px) {
  .corner-set {
    position: fixed; top: 20px; right: 24px; z-index: 25; zoom: 1.1;
    width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--r-s); cursor: pointer;
    background: var(--surface); color: var(--ink); border: 1px solid var(--line-2);
  }
  .corner-set:hover { border-color: var(--ink); }
  .corner-set .ic { width: 20px; height: 20px; }
  .app.is-bare .corner-set { display: none; }
  .app:not(.is-bare) .main { padding-top: 76px; }
  .page-top { padding-right: 56px; }
}

/* ================= Etwas grösser auf grossen Bildschirmen =================
   Gleichmässig skaliert, damit alle Proportionen bleiben. Vollbild-Ansichten (Start, Live) bleiben 1:1. */
@media (min-width: 720px) {
  .main, .tabbar { zoom: 1.05; }
  .sheet { width: min(600px, calc(100vw - 48px)); }
  .sheet-wide { width: min(700px, calc(100vw - 48px)); }
  .sheet-body { zoom: 1.05; }
  .toasts { zoom: 1.05; }
  .cel-body { zoom: 1.08; }
}
@media (min-width: 1024px) {
  .main, .rail { zoom: 1.1; }
  .sheet-body { zoom: 1.08; }
  .cel-body { zoom: 1.12; }
}
.app.is-bare .main { zoom: 1; }

/* ================= Weniger Bewegung ================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
.log-name { margin-top: 10px; }
.log-name .fld-in { height: 46px; }
.log-name .fld-in input { font-size: 16px; font-weight: 600; font-stretch: 100%; letter-spacing: 0; }

/* ---------- Konto: Anmeldung, Zustimmung, Gesundheitshinweis ---------- */
.wordmark.wm-s { --wm: 16px; }
.boot { display: grid; place-items: center; min-height: 100vh; min-height: 100dvh; }
.boot .wordmark { --wm: 30px; animation: boot-pulse 1.4s ease-in-out infinite; }
@keyframes boot-pulse { 50% { opacity: 0.45; } }
.auth .onb-q { margin-top: 28px; }
.auth .onb-foot { display: grid; gap: 6px; justify-items: center; }
.auth-alt { font-size: 14px; }
.auth-fld { display: grid; gap: 6px; margin-top: 14px; }
.auth-fld input { width: 100%; height: 52px; padding: 0 14px; border-radius: var(--r-s); background: var(--surface); border: 1px solid var(--line-2); color: var(--ink); font: inherit; font-size: 16px; font-weight: 600; outline: none; }
.auth-fld input:focus { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.auth-pw { position: relative; display: block; }
.auth-pw input { padding-right: 52px; }
.auth-pw .icon-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
.auth-forgot { font-size: 13.5px; margin-top: 6px; }
.auth-err { text-align: left; }
.auth-info { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0 0; padding: 12px 14px; border-radius: var(--r-s); background: var(--chip); font-size: 14px; }
.auth-google { gap: 10px; margin-top: 4px; }
.g-mark { width: 18px; height: 18px; }
.g-mark path { stroke: none; }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 18px 0 2px; color: var(--muted); font-size: 11px; font-weight: 700; font-stretch: 125%; letter-spacing: 0.1em; text-transform: uppercase; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--line-2); }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.consent { display: grid; gap: 12px; margin: 0 0 20px; }
.consent-docs { display: grid; gap: 8px; }
.consent-doc { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; width: 100%; padding: 14px; border-radius: var(--r-s); background: var(--surface); border: 1px solid var(--line-2); color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
.consent-doc:hover { border-color: var(--ink); }
.consent-doc > span { display: grid; gap: 2px; }
.consent-doc > span > span { color: var(--muted); font-size: 13px; }
.consent-doc.is-read { border-color: var(--ink); }
.consent-doc.is-read > .ic:first-child { color: var(--bg); background: var(--ink); border-radius: 50%; padding: 3px; width: 22px; height: 22px; stroke-width: 2.4; }
.consent-check { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; padding: 14px; border-radius: var(--r-s); background: var(--chip); font-size: 14.5px; line-height: 1.4; cursor: pointer; }
.consent-check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--ink); cursor: inherit; }
.consent-check.is-off { opacity: 0.55; cursor: not-allowed; }
.consent-hint { margin: 0; color: var(--muted); font-size: 13px; }
.legal-end { display: grid; gap: 10px; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.legal-end p { margin: 0; }
.health { margin-bottom: 14px; }
.acct-actions { display: grid; margin: 8px 0 12px; }
.g-btn { display: flex; justify-content: center; min-height: 44px; margin-top: 4px; }
/* Anmeldung und Profil einrichten: reines Weiss wie die Startseite */
html:has(.app.is-bare .onb-step), body:has(.app.is-bare .onb-step), html:has(.app.is-bare .boot), body:has(.app.is-bare .boot) { background: #ffffff; }
.app.is-bare .onb-step, .app.is-bare .boot { --bg: #ffffff; --surface: #f6f7f8; background: #ffffff; }

/* ---------- Skilltree: rote Punkte und Erklärung ---------- */
:root { --new: #e0262d; --tour-ease: cubic-bezier(0.65, 0, 0.35, 1); }
.nav-i { position: relative; }
.nav-dot { position: absolute; top: 7px; left: calc(50% + 8px); width: 8px; height: 8px; border-radius: 50%; background: var(--new); box-shadow: 0 0 0 2px var(--surface); }
.rail .nav-dot { top: 50%; left: auto; right: 14px; margin-top: -4px; }
.rt-cat-node > circle.rt-new { fill: var(--new); stroke: var(--surface); stroke-width: 4; transform-box: fill-box; transform-origin: center; animation: rt-new-in 0.5s cubic-bezier(0.2, 1.3, 0.4, 1) both; pointer-events: none; }
.rt-cat-node > circle.rt-new.is-gone { animation: rt-new-out 0.3s ease forwards; }
@keyframes rt-new-in { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes rt-new-out { from { transform: scale(1); opacity: 1; } to { transform: scale(0); opacity: 0; } }

.tour-btn { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; white-space: nowrap; border: 1px solid var(--line-2); border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-size: 11px; font-weight: 700; font-stretch: 112%; letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; transition: border-color 0.2s ease, color 0.2s ease; }
.tour-btn:hover { border-color: var(--ink); color: var(--ink); }
.tour-btn.is-new { color: var(--ink); border-color: var(--ink); }
.tour-btn-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--new); box-shadow: 0 0 0 0 rgba(224, 38, 45, 0.5); animation: tour-dot 2.4s ease-out infinite; }
@keyframes tour-dot { 0% { box-shadow: 0 0 0 0 rgba(224, 38, 45, 0.45); } 70%, 100% { box-shadow: 0 0 0 8px rgba(224, 38, 45, 0); } }

.tour { position: absolute; left: 0; top: 0; width: 100%; height: 0; z-index: 90; }
.tour-block { position: fixed; inset: 0; }
.tour-layer { position: absolute; left: 0; top: 0; width: 100%; height: 0; pointer-events: none; }
.tour-spot { position: absolute; left: 0; top: 0; box-shadow: 0 0 0 9999px rgba(9, 9, 11, 0.7); opacity: 0; transition: transform 0.9s var(--tour-ease), width 0.9s var(--tour-ease), height 0.9s var(--tour-ease), border-radius 0.9s var(--tour-ease), opacity 0.5s ease; }
.tour.is-on .tour-spot { opacity: 1; }
.tour-ring { position: absolute; left: 0; top: 0; border-radius: 50%; border: 2px solid #ffffff; box-shadow: 0 0 18px rgba(255, 255, 255, 0.35); opacity: 0; transition: transform 1.1s var(--tour-ease), width 1.1s var(--tour-ease), height 1.1s var(--tour-ease), opacity 0.4s ease; }
.tour-ring.is-on { opacity: 1; }
.tour-ring::after { content: ''; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid #ffffff; opacity: 0; }
.tour-ring.is-tap::after { animation: tour-ping 1s ease-out; }
@keyframes tour-ping { from { transform: scale(1); opacity: 0.9; } to { transform: scale(1.6); opacity: 0; } }
.tour-card { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: min(440px, calc(100vw - 32px)); padding: 18px 20px 16px; border-radius: 14px; background: #ffffff; color: #0b0b0c; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3); opacity: 0; transform: translate(-50%, 24px); transition: opacity 0.5s ease, transform 0.6s var(--tour-ease); }
.tour.is-on .tour-card { opacity: 1; transform: translate(-50%, 0); }
.tour-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.tour-count { font-size: 10.5px; font-weight: 800; font-stretch: 125%; letter-spacing: 0.1em; text-transform: uppercase; color: var(--new); }
.tour-x { display: grid; place-items: center; width: 30px; height: 30px; margin: -6px -8px 0 0; border: 0; border-radius: 50%; background: transparent; color: #6b6f76; cursor: pointer; }
.tour-x:hover { background: #f1f2f4; color: #0b0b0c; }
.tour-body { transition: opacity 0.22s ease, transform 0.22s ease; }
.tour-body.is-out { opacity: 0; transform: translateY(6px); }
.tour-body h2 { margin: 0 0 6px; font-size: 19px; font-weight: 800; font-stretch: 112%; letter-spacing: -0.01em; line-height: 1.2; }
.tour-body p { margin: 0; color: #4b4f56; font-size: 15px; line-height: 1.45; min-height: 4.35em; }
.tour-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 16px; }
.tour-back { padding: 0 8px !important; }
.tour-bars { display: flex; gap: 5px; }
.tour-bars i { width: 14px; height: 3px; border-radius: 2px; background: #dcdee2; transition: background 0.4s ease; }
.tour-bars i.is-on { background: #0b0b0c; }
.tour-btns { display: flex; gap: 6px; }
.tour-back, .tour-next { height: 38px; padding: 0 14px; white-space: nowrap; border-radius: var(--r-s); font: inherit; font-size: 11.5px; font-weight: 800; font-stretch: 125%; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; }
.tour-back { border: 0; background: transparent; color: #4b4f56; }
.tour-back:hover { color: #0b0b0c; }
.tour-next { border: 0; background: #0b0b0c; color: #ffffff; }
.tour-next:focus-visible, .tour-back:focus-visible, .tour-x:focus-visible { outline: 2px solid #0b0b0c; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .tour-spot, .tour-ring, .tour-card, .tour-body { transition: none; }
  .tour-ring.is-tap::after, .tour-btn-dot, .rt-new { animation: none; }
}
.rank-note { margin: -4px 0 16px; }
