/* Edgework – dunkles Sport-Design (v0.3) */
:root {
  color-scheme: dark;
  --bg: #0F1419;
  --bg-top: #2A3846;
  --surface: #1A2129;
  --surface-2: #212A34;
  --surface-3: #2B3541;
  --ink: #F3F6F9;
  --ink-2: #2B3541;
  --on-light: #0F1419;
  --muted: #8E9BA9;
  --line: rgba(255,255,255,0.08);
  --line-soft: rgba(255,255,255,0.05);
  --accent: #3E8FF0;
  --accent-ink: #8EC1FF;
  --accent-soft: rgba(62,143,240,0.16);
  --accent-mid: #2D6DBE;
  --accent-light: #7DB6FF;
  --good: #4ADE9B;
  --good-soft: rgba(74,222,155,0.14);
  --warm: #F2A33A;
  --warm-ink: #FFB95E;
  /* Lernstufen eines Elements: im Training → meist sauber → gemeistert (überall gleich) */
  --m1: #3E8FF0;
  --m2: #4ADE9B;
  --m3: #F5C451;
  --warm-soft: rgba(242,163,58,0.15);
  --warm-bg: rgba(242,163,58,0.07);
  --violet: #8C8DFF;
  --zero-bg: rgba(255,255,255,0.08);
  --grad: linear-gradient(90deg, #3E8FF0 0%, #4ADE9B 55%, #F2A33A 100%);
  --grad-cool: linear-gradient(90deg, #3E8FF0, #4ADE9B);
  --card-grad: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0) 60%);
  --radius: 22px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: Inter, system-ui, -apple-system, sans-serif;
  --display: Barlow, Inter, system-ui, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; }
body { overscroll-behavior-y: none; background: linear-gradient(180deg, var(--bg-top) 0px, #1B242E 260px, #12181E 560px, var(--bg) 900px) no-repeat, var(--bg); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; transition: transform 0.16s var(--ease), background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease; }
button:not(:disabled):active { transform: scale(0.97); }
a { color: var(--accent-ink); text-decoration: none; }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -0.005em; }
h1 { font-size: 34px; font-weight: 700; line-height: 1.05; }
h2 { font-size: 20px; font-weight: 600; }
::selection { background: var(--accent); color: #fff; }

#app { min-height: 100%; max-width: 560px; margin: 0 auto; position: relative; }

.boot { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.boot-logo { font-family: var(--display); color: #fff; font-size: 30px; font-weight: 700; letter-spacing: 0.02em; animation: pulse 1.4s ease-in-out infinite; }

/* ---------- Layout ---------- */
.screen { min-height: 100vh; display: flex; flex-direction: column; animation: fade 0.3s ease backwards; }
.content { flex: 1 1 auto; padding: calc(24px + var(--safe-top)) 20px calc(112px + var(--safe-bottom)); display: flex; flex-direction: column; gap: 18px; }
.content.no-nav { padding-bottom: calc(32px + var(--safe-bottom)); }
.content > * { animation: rise 0.5s var(--ease) backwards; }
.content > *:nth-child(2) { animation-delay: 0.04s; }
.content > *:nth-child(3) { animation-delay: 0.08s; }
.content > *:nth-child(4) { animation-delay: 0.12s; }
.content > *:nth-child(5) { animation-delay: 0.16s; }
.content > *:nth-child(6) { animation-delay: 0.2s; }
.content > *:nth-child(n+7) { animation-delay: 0.24s; }
.section > .card, .section > .list-card, .section > .goal-card, .section > button { animation: rise 0.45s var(--ease) backwards; }
.section > :nth-child(3) { animation-delay: 0.05s; }
.section > :nth-child(4) { animation-delay: 0.1s; }
.section > :nth-child(n+5) { animation-delay: 0.14s; }
.head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.head-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.eyebrow { font-size: 11.5px; color: var(--muted); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.overline { font-size: 11.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.section { display: flex; flex-direction: column; gap: 10px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.row { display: flex; align-items: center; gap: 12px; }
.grow { flex: 1 1 auto; min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.center { text-align: center; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Cards ---------- */
.card { background: var(--card-grad), var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.card.dark { background: radial-gradient(120% 90% at 50% 0%, rgba(62,143,240,0.16), rgba(62,143,240,0) 60%), linear-gradient(180deg, #26323F, #171E26); color: #fff; border-color: rgba(255,255,255,0.1); box-shadow: 0 14px 40px rgba(0,0,0,0.35); }
.card.dark .muted, .card.dark .eyebrow { color: #A6B3C1; }
.card.dark .overline { color: #A6B3C1; }
.card.warm { background: linear-gradient(180deg, rgba(242,163,58,0.12), rgba(242,163,58,0.04)), var(--surface); border-color: rgba(242,163,58,0.3); }
.card.dashed { border-style: dashed; border-color: rgba(255,255,255,0.16); background: rgba(255,255,255,0.02); }
.list-card { background: var(--card-grad), var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; color: var(--ink); transition: transform 0.16s var(--ease), border-color 0.2s ease; }
button.list-card { font: inherit; }
.list-card:active { transform: scale(0.985); border-color: rgba(255,255,255,0.16); }
.date-tile { width: 48px; height: 48px; flex: 0 0 auto; border-radius: 14px; background: var(--accent-soft); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.date-tile .wd { font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-ink); }
.date-tile .d { font-family: var(--display); font-size: 19px; font-weight: 700; color: var(--ink); line-height: 1.05; }
.date-tile.planned { background: transparent; border: 1.5px dashed rgba(125,182,255,0.5); }
.stat-num { font-family: var(--display); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }

/* Hinweis-Box (wie ein Coach-Kommentar) */
.insight { border: 1.5px solid rgba(140,141,255,0.55); background: rgba(140,141,255,0.06); border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; line-height: 1.45; }
.insight .more { font-size: 11.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--violet); background: none; border: none; padding: 0; align-self: flex-start; display: inline-flex; gap: 6px; align-items: center; }

/* ---------- Buttons ---------- */
.btn { height: 50px; padding: 0 20px; border-radius: 16px; border: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 15px; white-space: nowrap; letter-spacing: 0.01em; }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn-primary { background: linear-gradient(180deg, #4A98F4, #2F7FE3); color: #fff; box-shadow: 0 6px 20px rgba(62,143,240,0.35), inset 0 1px 0 rgba(255,255,255,0.18); }
.btn-light { background: #fff; color: var(--on-light); box-shadow: 0 6px 20px rgba(0,0,0,0.25); }
.btn-ghost { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
.btn-dark { background: rgba(255,255,255,0.1); color: #fff; border: 1px solid rgba(255,255,255,0.12); }
.btn-danger { background: var(--warm-soft); color: var(--warm-ink); }
.btn-block { width: 100%; }
.btn-sm { height: 40px; font-size: 14px; padding: 0 14px; border-radius: 13px; }
.icon-btn { width: 44px; height: 44px; flex: 0 0 auto; border-radius: 22px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.icon-btn.primary { background: linear-gradient(180deg, #4A98F4, #2F7FE3); color: #fff; border-color: transparent; box-shadow: 0 6px 18px rgba(62,143,240,0.4); }
.back-btn { align-self: flex-start; height: 40px; padding: 0 14px 0 8px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.link-btn { background: none; border: none; color: var(--accent-ink); font-weight: 600; font-size: 14px; padding: 8px 0; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 11.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.input { height: 50px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); padding: 0 14px; font-size: 16px; width: 100%; color: var(--ink); transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.input::placeholder { color: #66737F; }
textarea.input { height: auto; min-height: 88px; padding: 12px 14px; resize: vertical; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(62,143,240,0.25); }
.seg { display: flex; gap: 4px; background: rgba(255,255,255,0.05); border: 1px solid var(--line); padding: 4px; border-radius: 15px; }
/* Breite nach Text: lange Wörter (z. B. „Достижения“) bekommen mehr Platz, nichts läuft über */
.seg button { flex: 1 1 auto; min-width: 0; padding: 0 6px; height: 40px; border-radius: 11px; border: none; background: transparent; color: var(--muted); font-weight: 700; font-size: 13px; letter-spacing: 0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seg button.on { background: var(--surface-3); color: var(--ink); box-shadow: 0 2px 10px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.06); }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.error { background: var(--warm-soft); color: var(--warm-ink); padding: 12px 14px; border-radius: 14px; font-size: 14px; border: 1px solid rgba(242,163,58,0.25); }
.notice { background: rgba(140,141,255,0.06); border: 1.5px solid rgba(140,141,255,0.5); color: var(--ink); padding: 12px 14px; border-radius: 16px; font-size: 14px; line-height: 1.45; }

/* ---------- Chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 36px; padding: 0 13px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.chip.on { background: #fff; color: var(--on-light); border-color: #fff; }
.chip.minus.on { background: var(--warm); border-color: var(--warm); color: var(--on-light); }
.chip.plus.on { background: var(--good); border-color: var(--good); color: var(--on-light); }
.tag { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); white-space: nowrap; }
.tag.dark { background: rgba(255,255,255,0.1); color: #fff; }
.tag.warm { background: var(--warm-soft); color: var(--warm-ink); }
.code-chip { font-size: 12.5px; font-weight: 600; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.08); color: #fff; padding: 6px 10px; border-radius: 10px; }
.code-chip.light { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }

.goe { min-width: 42px; text-align: center; padding: 5px 8px; border-radius: 10px; font-family: var(--display); font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
.goe.neg { background: var(--warm-soft); color: var(--warm-ink); }
.goe.zero { background: var(--zero-bg); color: var(--ink); }
.goe.pos { background: var(--good-soft); color: var(--good); }

/* ---------- Bottom nav ---------- */
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: rgba(13,17,22,0.82); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border-top: 1px solid var(--line); padding-bottom: var(--safe-bottom); }
.nav-inner { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding-top: 8px; height: 64px; }
.nav a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; color: #6F7C89; font-size: 10.5px; font-weight: 600; letter-spacing: 0.04em; min-height: 44px; transition: color 0.2s ease; }
.nav a svg { transition: transform 0.25s var(--ease); }
.nav a.on { color: #fff; }
.nav a.on svg { color: var(--accent-light); transform: translateY(-1px); filter: drop-shadow(0 0 8px rgba(62,143,240,0.6)); }
.nav a.on::before { content: ''; position: absolute; top: -9px; width: 26px; height: 3px; border-radius: 0 0 3px 3px; background: var(--grad-cool); animation: grow-x 0.35s var(--ease) backwards; }

/* ---------- Live mode ---------- */
.live { min-height: 100vh; background: linear-gradient(180deg, var(--bg-top), #161D25 300px); color: #fff; display: flex; flex-direction: column; animation: fade 0.3s ease backwards; }
.live-top { padding: calc(16px + var(--safe-top)) 20px 12px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.live-timer { font-family: var(--display); font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.live-chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 20px 14px; scrollbar-width: none; }
.live-chips::-webkit-scrollbar { display: none; }
.el-chip { flex: 0 0 auto; min-width: 64px; height: 58px; border-radius: 16px; border: 1px solid rgba(255,255,255,0.08); padding: 0 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; background: rgba(255,255,255,0.07); color: #fff; }
.el-chip.on { background: #fff; color: var(--on-light); border-color: #fff; box-shadow: 0 6px 20px rgba(0,0,0,0.3); }
.el-chip .c { font-family: var(--display); font-weight: 700; font-size: 16px; }
.el-chip .n { font-size: 11px; opacity: 0.75; }
.el-chip.add { border: 1.5px dashed rgba(255,255,255,0.25); background: transparent; }
.live-sheet { flex: 1 1 auto; background: #141A21; color: var(--ink); border-radius: 28px 28px 0 0; border-top: 1px solid var(--line); padding: 20px 20px calc(24px + var(--safe-bottom)); display: flex; flex-direction: column; gap: 16px; animation: slide-up 0.45s var(--ease) backwards; }
.goe-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.goe-btn { height: 56px; border-radius: 15px; border: 1px solid transparent; font-family: var(--display); font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.goe-btn:active { transform: scale(0.92); }
.goe-btn.neg { background: var(--warm-soft); color: var(--warm-ink); border-color: rgba(242,163,58,0.15); }
.goe-btn.zero { background: var(--zero-bg); color: var(--ink); border-color: rgba(255,255,255,0.06); }
.goe-btn.pos { background: var(--good-soft); color: var(--good); border-color: rgba(74,222,155,0.15); }
.goe-btn.other { background: transparent; border: 1px dashed rgba(255,255,255,0.2); color: var(--muted); font-family: var(--font); font-size: 12px; font-weight: 600; }
.attempt-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 15px; background: var(--surface); border: 1px solid var(--line); animation: rise 0.35s var(--ease) backwards; }
.flash { animation: flash 0.7s ease; }
@keyframes flash { 0% { box-shadow: 0 0 0 0 rgba(74,222,155,0.55); border-color: var(--good); } 100% { box-shadow: 0 0 0 12px rgba(74,222,155,0); } }

/* ---------- Sheet / modal ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(4,7,10,0.6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); display: flex; align-items: flex-end; justify-content: center; animation: fade 0.25s ease backwards; }
.sheet { width: 100%; max-width: 560px; max-height: 88vh; background: linear-gradient(180deg, #212A34, #151B22 240px); border: 1px solid var(--line); border-bottom: none; border-radius: 26px 26px 0 0; padding: 18px 20px calc(20px + var(--safe-bottom)); display: flex; flex-direction: column; gap: 14px; overflow: hidden; animation: slide-up 0.4s var(--ease) backwards; box-shadow: 0 -20px 50px rgba(0,0,0,0.4); }
.sheet-scroll { overflow-y: auto; display: flex; flex-direction: column; gap: 14px; margin: 0 -20px; padding: 0 20px 4px; flex: 1 1 auto; min-height: 0; }
.sheet > .btn, .sheet > .two-col { flex: 0 0 auto; }
.grabber { width: 40px; height: 5px; border-radius: 3px; background: rgba(255,255,255,0.2); align-self: center; }

/* ---------- Element picker ---------- */
.el-group { display: flex; flex-direction: column; gap: 8px; }
.el-pick { min-height: 42px; padding: 6px 12px; border-radius: 13px; border: 1px solid var(--line); background: var(--surface-2); text-align: left; display: inline-flex; flex-direction: column; gap: 1px; color: var(--ink); }
.el-pick .c { font-family: var(--display); font-weight: 700; font-size: 15px; }
.el-pick .nm { font-size: 11px; color: var(--muted); }
.el-pick.on { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(62,143,240,0.35); }
.el-pick.on .nm { color: #DCEAFF; }

/* ---------- Calendar ---------- */
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-wd { font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); text-align: center; padding: 4px 0; }
.cal-day { aspect-ratio: 1; border-radius: 12px; border: none; background: rgba(255,255,255,0.04); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 14px; font-weight: 600; color: var(--ink); padding: 0; font-variant-numeric: tabular-nums; }
.cal-day.out { background: transparent; color: #4C5865; }
.cal-day.today { box-shadow: inset 0 0 0 2px var(--accent); }
.cal-day.sel { background: #fff; color: var(--on-light); }
.dots { display: flex; gap: 3px; height: 6px; }
.dot { width: 6px; height: 6px; border-radius: 3px; background: var(--accent); }
.dot.planned { background: transparent; border: 1.5px solid var(--accent-light); }
.cal-day.sel .dot { background: var(--accent); }
.cal-day.sel .dot.planned { background: transparent; border-color: var(--accent); }

/* ---------- Stats ---------- */
.ring-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ring-card { background: var(--card-grad), var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px 6px 12px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ring-card > .tiny.muted { font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; text-align: center; }
.bar { height: 8px; border-radius: 4px; background: rgba(255,255,255,0.07); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 4px; background: var(--grad-cool); transform-origin: left center; animation: grow-x 0.9s var(--ease) 0.15s backwards; }
.bar.warm { background: var(--warm-soft); }
.bar.warm > span { background: var(--warm); }

.empty { padding: 24px 16px; text-align: center; color: var(--muted); font-size: 14px; line-height: 1.5; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(96px + var(--safe-bottom)); z-index: 60; background: rgba(43,53,65,0.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,0.1); color: #fff; padding: 11px 18px; border-radius: 14px; font-size: 14px; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,0.45); max-width: calc(100% - 40px); animation: toast-in 0.35s var(--ease) backwards; }
.spinner { width: 30px; height: 30px; border-radius: 50%; border: 3px solid rgba(255,255,255,0.08); border-top-color: var(--accent); border-right-color: var(--good); animation: spin 0.8s linear infinite; margin: 40px auto; }
.offline-pill { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; background: var(--warm-soft); color: var(--warm-ink); }

.auth { min-height: 100vh; color: #fff; display: flex; flex-direction: column; justify-content: flex-end; background: radial-gradient(90% 60% at 50% 20%, rgba(62,143,240,0.25), rgba(62,143,240,0) 70%); }
.auth-hero { padding: calc(48px + var(--safe-top)) 24px 32px; display: flex; flex-direction: column; gap: 10px; flex: 1 1 auto; justify-content: center; animation: rise 0.6s var(--ease) backwards; }
.auth-hero h1 { font-size: 48px; }
.auth-panel { background: linear-gradient(180deg, #212A34, #151B22); border: 1px solid var(--line); border-bottom: none; color: var(--ink); border-radius: 28px 28px 0 0; padding: 24px 20px calc(28px + var(--safe-bottom)); display: flex; flex-direction: column; gap: 14px; animation: slide-up 0.5s var(--ease) 0.1s backwards; }

/* ---------- On/Off-Ice, Ziele, Statistik ---------- */
.kind-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.kind-card { border: 1px solid var(--line); background: var(--card-grad), var(--surface); border-radius: 22px; padding: 18px 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; text-align: left; color: var(--ink); min-height: 156px; animation: rise 0.45s var(--ease) backwards; }
.kind-card + .kind-card { animation-delay: 0.06s; }
.kind-card .kind-ico { width: 50px; height: 50px; border-radius: 15px; background: var(--accent-soft); color: var(--accent-light); display: flex; align-items: center; justify-content: center; }
.kind-card.off .kind-ico { background: var(--warm-soft); color: var(--warm-ink); }
.kind-card .kind-title { font-family: var(--display); font-size: 22px; font-weight: 700; }
.kind-card .kind-sub { font-size: 13px; color: var(--muted); line-height: 1.4; }
.date-tile.off { background: var(--warm-soft); }
.date-tile.off .wd { color: var(--warm-ink); }

.kpi-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile-btn { font: inherit; color: var(--ink); cursor: pointer; }
.plain-row { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: 6px; width: 100%; padding: 4px 0; }
.plain-row.row { flex-direction: row; align-items: center; }
.plain-row:disabled { cursor: default; }
.week-info { background: rgba(255,255,255,0.04); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }

.goal-card { all: unset; box-sizing: border-box; cursor: pointer; width: 100%; background: var(--card-grad), var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; color: var(--ink); transition: transform 0.16s var(--ease); }
.goal-card:active { transform: scale(0.985); }
.goal-card.done { border-color: rgba(74,222,155,0.35); box-shadow: inset 0 0 0 1px rgba(74,222,155,0.15), 0 0 24px rgba(74,222,155,0.08); }
.goal-card.missed { opacity: 0.7; }
.goal-ico { width: 40px; height: 40px; flex: 0 0 auto; border-radius: 13px; background: var(--accent-soft); color: var(--accent-light); display: inline-flex; align-items: center; justify-content: center; }
.goal-ico.done { background: var(--good-soft); color: var(--good); }
.goal-val { font-family: var(--display); font-weight: 700; font-size: 15px; color: var(--accent-ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.goal-card.done .goal-val { color: var(--good); }
.goal-card.done .bar > span { background: var(--good); }
.hist { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.hdot { width: 12px; height: 12px; border-radius: 4px; background: rgba(255,255,255,0.05); border: 1px solid var(--line); animation: pop 0.3s var(--ease) backwards; }
.hist.big .hdot { width: 18px; height: 18px; border-radius: 5px; }
.hdot.hit { background: var(--good); border-color: var(--good); }
.hdot.miss { background: var(--warm-soft); border-color: rgba(242,163,58,0.3); }
.hdot.open { background: transparent; border: 1.5px dashed var(--accent-light); }
.hdot.none { opacity: 0.35; }
.metric-list { display: flex; flex-direction: column; gap: 6px; }
.metric-opt { text-align: left; border: 1px solid var(--line); background: var(--surface-2); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; color: var(--ink); }
.metric-opt.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
.stepper { display: flex; align-items: center; gap: 8px; }
.stepper .input { width: 110px; text-align: center; }
.toggle-row { display: flex; gap: 12px; align-items: flex-start; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; font-size: 14px; line-height: 1.4; }
.toggle-row input { width: 22px; height: 22px; margin-top: 1px; accent-color: var(--accent); flex: 0 0 auto; }

.big-stepper { display: flex; align-items: center; justify-content: center; gap: 16px; }
.icon-btn.lg { width: 58px; height: 58px; border-radius: 29px; font-size: 24px; }
.icon-btn:disabled { opacity: 0.4; }
.big-num { width: 160px; text-align: center; font-family: var(--display); font-size: 52px; font-weight: 700; border: none; background: transparent; color: var(--ink); font-variant-numeric: tabular-nums; }
.big-num.running { color: var(--good); text-shadow: 0 0 24px rgba(74,222,155,0.4); }
input.big-num:focus { outline: 2px solid var(--accent); border-radius: 12px; }

.mastery { font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; white-space: nowrap; }
.mastery.m0 { background: rgba(255,255,255,0.06); color: var(--muted); }
.mastery.m1 { background: color-mix(in srgb, var(--m1) 18%, transparent); color: #8CC0FF; }
.mastery.m2 { background: color-mix(in srgb, var(--m2) 16%, transparent); color: var(--m2); }
.mastery.m3 { background: var(--m3); color: #2A1E05; }
.mx-cell { flex: 1 1 0; height: 42px; border-radius: 11px; font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: center; padding: 0; border: 1px solid transparent; animation: pop 0.35s var(--ease) backwards; }
.mx-cell.m0 { background: rgba(255,255,255,0.03); color: #5C6874; border: 1px dashed rgba(255,255,255,0.12); }
.mx-cell.m1 { background: color-mix(in srgb, var(--m1) 22%, transparent); color: #8CC0FF; border-color: color-mix(in srgb, var(--m1) 55%, transparent); }
.mx-cell.m2 { background: color-mix(in srgb, var(--m2) 20%, transparent); color: var(--m2); border-color: color-mix(in srgb, var(--m2) 60%, transparent); }
.mx-cell.m3 { background: var(--m3); color: #2A1E05; box-shadow: 0 0 14px rgba(245,196,81,0.35); }
.lg-ms { width: 16px; height: 16px; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; border: 1px solid transparent; }
.lg-ms.m0 { background: rgba(255,255,255,0.03); color: #5C6874; border: 1px dashed rgba(255,255,255,0.18); }
.lg-ms.m1 { background: color-mix(in srgb, var(--m1) 22%, transparent); color: #8CC0FF; border-color: color-mix(in srgb, var(--m1) 55%, transparent); }
.lg-ms.m2 { background: color-mix(in srgb, var(--m2) 20%, transparent); color: var(--m2); border-color: color-mix(in srgb, var(--m2) 60%, transparent); }
.lg-ms.m3 { background: var(--m3); color: #2A1E05; }
.ms-bar > .m1 { background: var(--m1); }
.ms-bar > .m2 { background: var(--m2); }
.ms-bar > .m3 { background: var(--m3); }
.bar.ms-rate { position: relative; overflow: visible; }
.bar.ms-rate > span { background: var(--m1); }
.bar.ms-rate.m2 > span { background: var(--m2); }
.bar.ms-rate.m3 > span { background: var(--m3); }
.bar.ms-rate > i { position: absolute; top: -2px; bottom: -2px; width: 2px; margin-left: -1px; border-radius: 1px; background: rgba(255,255,255,0.28); }
.stack-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: rgba(255,255,255,0.08); }
.stack-bar > span { transform-origin: left center; animation: grow-x 0.9s var(--ease) 0.15s backwards; }
.lg-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.histo { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 4px; align-items: end; height: 140px; }
.hcol { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; }
.hbar { width: 100%; border-radius: 5px 5px 2px 2px; transform-origin: bottom center; animation: grow-y 0.8s var(--ease) backwards; }
.hbar.neg { background: var(--warm); } .hbar.zero { background: #66737F; } .hbar.pos { background: linear-gradient(180deg, var(--good), var(--accent)); }
.minibars { display: flex; align-items: flex-end; gap: 4px; height: 96px; }
.mcol { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; min-width: 0; }
.mcol .tiny { white-space: nowrap; height: 14px; }
.mbar { width: 100%; max-width: 28px; border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, var(--accent-light), var(--accent)); transform-origin: bottom center; animation: grow-y 0.8s var(--ease) backwards; }
.mbar.warm { background: var(--warm); }

.heat { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 5px; }
.hcell { display: block; aspect-ratio: 1; border-radius: 4px; background: rgba(255,255,255,0.05); animation: pop 0.4s var(--ease) backwards; }
.hcell.sm { width: 12px; height: 12px; aspect-ratio: auto; display: inline-block; animation: none; }
.hcell.l1 { background: rgba(62,143,240,0.35); } .hcell.l2 { background: var(--accent); } .hcell.l3 { background: var(--good); }
.hcell.fut { opacity: 0.35; }

.dot.off { background: var(--warm); }
.dot.comp { background: #FFD25E; }
.cal-day.comp { box-shadow: inset 0 0 0 2px #FFD25E; }
.cal-day.sel .dot.off { background: var(--warm); }
.cal-day.sel .dot.comp { background: #D9A300; }
.card.row { flex-direction: row; align-items: center; }

/* ---------- Live: Bewertung ---------- */
.last-box { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; transition: border-color 0.3s ease, background-color 0.3s ease; }
.last-box.idle { background: transparent; border-style: dashed; }
.chip:disabled { opacity: 0.4; }

/* ---------- Trainings-Auswertung ---------- */
.summary-hero { gap: 14px; padding: 22px 18px 20px; align-items: center; text-align: center; }
.hero-ico { width: 72px; height: 72px; border-radius: 24px; background: var(--good-soft); color: var(--good); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; animation: pop 0.5s var(--ease) backwards; }
.verdict { font-family: var(--display); font-size: 26px; font-weight: 700; line-height: 1.15; }
.ring-card.cmp { gap: 3px; padding: 12px 8px; }
.delta { font-size: 12px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.delta.up { color: var(--good); }
.delta.down { color: var(--warm); }
.delta.zero { color: var(--muted); }
.focus-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; gap: 2px; background: rgba(255,255,255,0.06); }
.focus-bar span { display: block; height: 100%; transform-origin: left center; animation: grow-x 0.9s var(--ease) 0.2s backwards; }
.focus-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.bar.dual { display: flex; }
.bar.dual > span { border-radius: 0; }
.bar.dual > .was { background: var(--accent); }
.bar.dual > .now { background: var(--good); animation-delay: 0.7s; }

/* Kennzahlen-Liste mit Vergleichspfeilen */
.metric-card { padding: 6px 16px 14px; gap: 0; }
.mrow { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.mrow:last-of-type { border-bottom: none; }
.mrow .mico { color: var(--muted); display: inline-flex; }
.mrow .mlabel { flex: 1 1 auto; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.mrow .mval { font-family: var(--display); font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.mrow .mdelta { min-width: 58px; text-align: right; }
.vs-pill { margin-top: 4px; background: rgba(0,0,0,0.3); border-radius: 12px; padding: 9px 12px; font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.vs-pill b { color: var(--ink); font-weight: 600; }
.vs-pill .arr-up { color: var(--good); } .vs-pill .arr-down { color: var(--warm); }

/* Tacho / Ringe */
.gauge { position: relative; display: flex; justify-content: center; }
.gauge-center { position: absolute; left: 0; right: 0; top: 40%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.gauge-num { font-family: var(--display); font-size: 64px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
.gauge-label { font-size: 13px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; }
.gauge-scale { position: absolute; bottom: 0; left: 0; right: 0; display: flex; justify-content: space-between; padding: 0 14%; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.arc-anim { animation: arc-in 1.1s var(--ease) 0.15s backwards; }
.gauge-dot { animation: pop 0.4s var(--ease) 1.1s backwards; transform-box: fill-box; transform-origin: center; }
.tone-good { color: var(--good); } .tone-mid { color: var(--accent-light); } .tone-low { color: var(--warm); }

/* ---------- Animationen ---------- */
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
@keyframes slide-up { from { transform: translateY(100%); } }
@keyframes grow-x { from { transform: scaleX(0); } }
@keyframes grow-y { from { transform: scaleY(0); } }
@keyframes pop { from { opacity: 0; transform: scale(0.6); } }
@keyframes arc-in { from { stroke-dasharray: 0 100; } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 16px) scale(0.96); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: 0.45; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; transition-duration: 0.01ms !important; }
}

/* Meisterungs-Balken in der Statistik: Farben passend zur Sprung-Matrix */

/* Impressum & Datenschutz */
.legal .card { gap: 8px; }
.legal p, .legal li { font-size: 14px; line-height: 1.55; margin: 0; }
.legal ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.legal a { color: var(--accent-ink); }
.auth-legal { display: flex; justify-content: center; gap: 16px; }
.auth-legal a { color: var(--muted, #8a96a3); font-size: 13px; text-decoration: none; }

/* Offline-Hinweis */
.offline-bar { position: fixed; z-index: 60; top: calc(var(--safe-top, 0px) + 6px); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; background: rgba(21, 27, 34, 0.92); border: 1px solid var(--line); color: var(--ink); font-size: 12.5px; font-weight: 600; white-space: nowrap; pointer-events: none; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: rise 0.3s var(--ease) backwards; }
.offline-bar .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--warm, #f0a04b); }
.video-row.uploading.waiting .up-spin { opacity: 0.75; }
html.is-offline .content { padding-top: calc(50px + var(--safe-top)); }

/* Sprachwahl */
.lang-switch { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.lang-switch .chip { min-width: 0; }
@media (max-width: 380px) { .seg button, .tabbar > .seg button { font-size: 12px; padding: 0 3px; letter-spacing: 0; } }

.move-note { position: fixed; z-index: 70; left: 12px; right: 12px; bottom: calc(84px + var(--safe-bottom)); padding: 14px 16px; border-radius: 18px; background: linear-gradient(180deg, #2a3550, #1d2536); border: 1px solid rgba(124,140,255,.45); color: var(--ink); box-shadow: 0 14px 40px rgba(0,0,0,.5); font-size: 14px; line-height: 1.4; }
