:root {
  --bg: #F4F5F7; --surface: #FFFFFF; --ink: #16181D; --muted: #5A6070; --line: #DDE1E7; --soft: #EEF0F3;
  --head: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif;
  --body: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0F1115; --surface: #1A1D24; --ink: #EEF0F4; --muted: #A2A9B6; --line: #2C313B; --soft: #232731; color-scheme: dark; }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.45 var(--body); -webkit-text-size-adjust: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.row { display: flex; align-items: center; }
.between { justify-content: space-between; gap: 12px; }
.gap { gap: 10px; }

.wrap { max-width: 880px; margin: 0 auto; padding: 16px 16px calc(96px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; }

/* Kopfzeile */
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar h1 { margin: 0; flex: 1; font: 700 22px/1.1 var(--head); letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand { font: 800 24px/1 var(--head); letter-spacing: .02em; }
.brand b { color: #C2410C; }
.iconbtn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.topright { display: flex; gap: 8px; }

.h2 { margin: 10px 0 0; font: 700 22px/1.1 var(--head); letter-spacing: .04em; text-transform: uppercase; }
.eyebrow { font: 600 12px/1.2 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }

/* Familienziel */
.famgoal { background: #16181D; color: #fff; border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.famgoal .eyebrow { color: #B9C0CC; }
.famgoal .muted { color: #B9C0CC; }
.big { font: 800 40px/1 var(--head); }
.big .muted { font-size: 22px; font-weight: 600; }
.teamstreak { display: flex; flex-direction: column; align-items: center; gap: 2px; color: #FFB27A; }
.teamstreak b { font: 800 30px/1 var(--head); color: #fff; }
.teamstreak span { font-size: 12px; color: #B9C0CC; }
.bar { height: 12px; background: rgba(255,255,255,.14); border-radius: 99px; overflow: hidden; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, #FF8A3D, #FFB27A); border-radius: inherit; }
.bar.thin { height: 6px; background: var(--soft); }
.bar.thin span { background: var(--c); }

/* Profilkarten */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.pcard { background: var(--surface); border: 1px solid var(--line); border-top: 5px solid var(--c); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 12px; transition: transform .12s; }
.pcard:active { transform: scale(.98); }
.pcard-top { display: flex; gap: 12px; align-items: center; }
.pname { font: 700 26px/1 var(--head); letter-spacing: .02em; }
.pcard-today { font-size: 15px; }
.pcard-today .ok { color: var(--c); font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.pcard-stats { display: flex; justify-content: space-between; align-items: center; }
.avatar { flex: none; border-radius: 50%; background: var(--c); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-family: var(--head); font-weight: 800; }
.dots { display: inline-flex; gap: 6px; align-items: center; }
.dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--c); }
.dot.on { background: var(--c); }
.streak, .flame { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: #D9480F; }
.pill { padding: 2px 8px; border-radius: 99px; background: var(--soft); font-size: 12px; font-weight: 600; }

/* Person */
.hero { display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: 18px; background: var(--c); color: #fff; }
.hero .eyebrow { color: rgba(255,255,255,.85); }
.hero p { margin: 0; color: rgba(255,255,255,.92); }
.hero-title { font: 800 34px/1.05 var(--head); letter-spacing: .01em; display: flex; align-items: center; gap: 8px; }
.hero.rest { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-left: 6px solid var(--c); }
.hero.rest .eyebrow, .hero.rest p { color: var(--muted); }
.hero .btn.light { align-self: flex-start; margin-top: 8px; background: #fff; color: #16181D; }
.statrow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 560px) { .statrow { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.statval { font: 800 30px/1 var(--head); display: flex; align-items: center; gap: 6px; }
.statval.small { font-size: 22px; }
.chips { display: flex; flex-direction: column; gap: 8px; }
.chip { display: block; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--c); }
.chip b { font: 800 20px/1 var(--head); color: var(--c); margin-right: 6px; }
.tip { padding: 14px 16px; border-radius: 14px; background: color-mix(in srgb, var(--c) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 30%, var(--line)); font-size: 15px; }
.notice { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 14px 16px; border-radius: 14px; background: #FFF4E5; color: #5A3600; border: 1px solid #F5C98A; }
@media (prefers-color-scheme: dark) { .notice { background: #3A2A12; color: #FFE2B8; border-color: #6B4B1C; } }
details.mini { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; }
details.mini summary { cursor: pointer; font-weight: 600; min-height: 28px; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.badge { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px dashed var(--line); color: var(--muted); }
.badge svg { width: 24px; height: 24px; }
.badge span { font-weight: 700; font-size: 14px; }
.badge small { font-size: 12px; }
.badge.ok { border: 1px solid var(--c); color: var(--ink); background: color-mix(in srgb, var(--c) 8%, var(--surface)); }
.badge.ok svg { color: #E8A317; }
.list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.list li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 15px; }
.list li:first-child { border-top: none; }
.rec { color: #B7791F; font-weight: 600; }
.linkbtn { background: none; border: none; padding: 6px 4px; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: 13px; min-height: 32px; }
.measure { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); align-items: end; }

/* Formulare */
label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
input, select { min-height: 46px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); font-size: 17px; font-weight: 500; width: 100%; }
input:focus, select:focus { outline: 3px solid color-mix(in srgb, #1D5FD1 40%, transparent); border-color: #1D5FD1; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
fieldset { border: none; padding: 0; margin: 0; }
legend { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.sw input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sw span { width: 44px; height: 44px; border-radius: 50%; background: var(--c); display: block; border: 3px solid transparent; box-shadow: 0 0 0 1px var(--line); }
.sw input:checked + span { border-color: var(--surface); box-shadow: 0 0 0 3px var(--ink); }
.sw input:focus-visible + span { outline: 3px solid #1D5FD1; outline-offset: 2px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 14px; border: none; background: var(--c, #16181D); color: #fff; font-weight: 700; font-size: 16px; cursor: pointer; text-align: center; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.big { min-height: 56px; font-size: 18px; width: 100%; }
.notice .btn { background: #C2410C; }

/* Training */
.warm { padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--c); }
.legend { margin: 0; }
.ex { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ex-head { display: flex; gap: 12px; align-items: flex-start; }
.ex-icon { flex: none; width: 80px; height: 72px; border-radius: 12px; background: var(--soft); display: flex; align-items: center; justify-content: center; color: var(--ink); }
.ex-text { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ex-title { display: flex; align-items: center; gap: 8px; font: 700 22px/1.1 var(--head); letter-spacing: .01em; }
.tag { flex: none; min-width: 30px; height: 26px; padding: 0 6px; border-radius: 8px; background: var(--c); color: #fff; font: 800 16px/26px var(--head); text-align: center; }
.ex-meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; }
.sets { font-weight: 700; }
.ex-desc { margin: 0; font-size: 14px; color: var(--muted); }
.sug { font-size: 14px; padding: 8px 12px; border-radius: 10px; background: var(--soft); }
.sug.up { background: #E7F6EC; color: #145A2A; font-weight: 600; }
@media (prefers-color-scheme: dark) { .sug.up { background: #173A24; color: #B8EBC8; } }
.setrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.setno { width: 56px; font-size: 13px; font-weight: 600; color: var(--muted); }
.field { flex-direction: row; align-items: center; gap: 6px; font-weight: 500; color: var(--muted); }
.field input { width: 84px; text-align: center; }
.field.wide input { width: 140px; }
.timerbtn { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); font-size: 14px; font-weight: 600; cursor: pointer; }
.setrow { flex-wrap: nowrap; }
@media (max-width: 380px) { .field input { width: 68px; } .setno { width: 46px; } }
.donebtn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; border-radius: 14px; border: 2px solid var(--c); background: transparent; color: var(--c); font-weight: 700; font-size: 17px; cursor: pointer; }
.donebtn.on { background: var(--c); color: #fff; }
.donebtn.kid { min-height: 60px; font-size: 20px; font-family: var(--head); letter-spacing: .03em; }
.testgrid { display: flex; flex-direction: column; gap: 8px; }

/* Fertig */
.celebrate { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 28px 16px; border-radius: 20px; background: var(--c); color: #fff; text-align: center; }
.celebrate svg { width: 56px; height: 56px; }
.celebrate .xp { font: 800 28px/1 var(--head); padding: 6px 14px; background: rgba(255,255,255,.2); border-radius: 99px; }
ul.plain { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
ul.plain li { display: flex; gap: 8px; align-items: center; font-weight: 600; }
ul.plain svg { color: #E8A317; }

/* Familienwoche */
.tablewrap { overflow-x: auto; }
table.week { width: 100%; border-collapse: collapse; }
@media (max-width: 560px) { table.week .who span:not(.avatar) { display: none; } .cell { width: 32px; height: 32px; font-size: 16px; } }
.testname { flex: 1; font-size: 14px; font-weight: 600; }
table.week th, table.week td { padding: 8px 4px; text-align: center; border-top: 1px solid var(--line); font-weight: 600; }
table.week thead th { border-top: none; font-size: 14px; }
table.week .who { text-align: left; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
table.week .today { background: var(--soft); }
.cell { display: inline-flex; width: 36px; height: 36px; border-radius: 10px; align-items: center; justify-content: center; font: 800 18px/1 var(--head); }
.cell.plan { border: 2px solid var(--c); color: var(--c); }
.cell.done { background: var(--c); color: #fff; }
.cell.rest { color: var(--muted); }

/* Timer & Toast */
.timer { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 20; display: flex; align-items: center; gap: 16px; padding: 12px 20px; border-radius: 99px; background: #16181D; color: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.timer b { font: 800 28px/1 var(--head); min-width: 64px; text-align: center; }
.timer span { display: inline-flex; align-items: center; gap: 6px; }
.timer .linkbtn { color: #C9D0DB; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); top: calc(72px + env(safe-area-inset-top)); z-index: 30; padding: 12px 18px; border-radius: 12px; background: #16181D; color: #fff; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.25); max-width: calc(100% - 32px); }
[hidden] { display: none !important; }
code { background: var(--soft); padding: 2px 6px; border-radius: 6px; }

.wrapbtns { flex-wrap: wrap; }
label.btn { flex-direction: row; font-size: 16px; }

.hero .hint { margin-top: 4px; padding: 8px 12px; border-radius: 10px; background: rgba(255,255,255,.16); font-size: 14px; }
.chip { position: relative; }
.donemark { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; font-size: 13px; font-weight: 600; color: var(--c); }
.donemark svg { width: 14px; height: 14px; }
.cell.done { font-size: 18px; }

@media (max-width: 560px) { table.week th, table.week td { padding: 6px 1px; font-size: 13px; } table.week .cell { width: 28px; height: 28px; font-size: 15px; } }

.station { align-self: flex-start; padding: 4px 10px; border-radius: 99px; background: color-mix(in srgb, var(--c) 14%, var(--surface)); color: var(--c); font-size: 13px; font-weight: 700; letter-spacing: .02em; }

.kgnote { font-size: 13px; color: var(--muted); margin-bottom: -2px; }
.kgnote b { color: var(--ink); }

.agebox { display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; padding: 4px 0; }
.agebox b { font: 800 26px/1 var(--head); }
.bday { padding: 8px 12px; border-radius: 10px; background: #FFF4D6; color: #6B4A00; font-weight: 700; font-size: 14px; }
@media (prefers-color-scheme: dark) { .bday { background: #3A3012; color: #FFE3A0; } }
.feel { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.feelbtn input, .seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.feelbtn span { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 2px; min-height: 64px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); font-size: 12px; font-weight: 600; text-align: center; line-height: 1.15; cursor: pointer; }
.feelbtn b { font: 800 22px/1 var(--head); }
.feelbtn input:checked + span { background: var(--c); border-color: var(--c); color: #fff; }
.feelbtn input:focus-visible + span, .seg input:focus-visible + span { outline: 3px solid #1D5FD1; outline-offset: 2px; }
.segs { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 6px; flex: 1; }
.seg span { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); font-size: 14px; font-weight: 600; cursor: pointer; }
.seg input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.seg input[value="easy"]:checked + span { background: #1D5FD1; border-color: #1D5FD1; color: #fff; }
.seg input[value="hard"]:checked + span { background: #C2410C; border-color: #C2410C; color: #fff; }
.fbrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.fbname { display: flex; align-items: center; gap: 8px; flex: 1 1 180px; font-weight: 600; min-width: 0; }
.fbname svg { flex: none; color: var(--ink); }
.fbrow .segs { flex: 1 1 240px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
ul.adj li { font-weight: 500; align-items: flex-start; }
ul.adj li::before { content: ''; flex: none; width: 8px; height: 8px; margin-top: 8px; border-radius: 50%; background: #C2410C; }

/* Fortschritt */
.progress-link { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--c); }
.progress-link > svg:first-child { color: var(--c); flex: none; }
.progress-link > span { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.progress-link b { font-size: 17px; }
.chart { position: relative; width: 100%; }
.chart svg { display: block; overflow: visible; touch-action: pan-y; }
.chart .cg { stroke: var(--line); stroke-width: 1; }
.chart .cgoal { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 4; }
.chart .ct { fill: var(--muted); font: 500 12px var(--body); font-variant-numeric: tabular-nums; }
.chart .ct.strong { fill: var(--ink); font-weight: 600; }
.chart .ct.val { fill: var(--ink); font-weight: 700; font-size: 13px; }
.chart .cx { stroke: var(--muted); stroke-width: 1; }
.ctip { position: absolute; z-index: 3; pointer-events: none; display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 6px 18px rgba(0,0,0,.14); font-size: 13px; max-width: 240px; }
.ctip b { font-size: 15px; }
.ctip span { color: var(--muted); }
.chart-title { font-weight: 700; font-size: 15px; margin-top: 6px; }
.exsel { max-width: 420px; }
.prog-head { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.prog-head > div { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 12px; background: var(--soft); }
.prog-head b { font: 800 24px/1.05 var(--head); }
.delta { align-self: flex-start; font-size: 13px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--surface); color: var(--muted); }
.delta.up { background: #E7F6EC; color: #145A2A; }
@media (prefers-color-scheme: dark) { .delta.up { background: #173A24; color: #B8EBC8; } }
.rchip { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.rchip.easy { background: #E3ECFB; color: #123E8C; }
.rchip.hard { background: #FBE7DC; color: #7A2A08; }
@media (prefers-color-scheme: dark) { .rchip.easy { background: #1B2A45; color: #BBD0F5; } .rchip.hard { background: #40210F; color: #F7C9AE; } }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { text-align: left; padding: 8px 6px; border-top: 1px solid var(--line); vertical-align: top; }
table.data th { border-top: none; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.tablebox { padding: 10px 14px; }
.sesslist { display: flex; flex-direction: column; gap: 8px; }
details.sess { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; }
details.sess summary { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 14px 28px 14px 0; cursor: pointer; list-style: none; }
details.sess summary::-webkit-details-marker { display: none; }
details.sess summary::after { content: '+'; position: absolute; right: 2px; top: 12px; font-size: 20px; font-weight: 700; color: var(--muted); }
details.sess[open] summary::after { content: '–'; }
details.sess[open] summary { border-bottom: 1px solid var(--line); }
.list.inner { border: none; border-radius: 0; margin: 0 -14px; }
.list.inner li { font-size: 14px; flex-wrap: wrap; }

/* Übungs-Vorführung */
.ex-icon.playable { position: relative; border: 1px solid var(--line); cursor: pointer; padding: 0; }
.ex-icon.playable:hover { border-color: var(--c, var(--ink)); }
.ex-icon.playable:focus-visible { outline: 3px solid #1D5FD1; outline-offset: 2px; }
.playbadge { position: absolute; right: -6px; bottom: -6px; width: 26px; height: 26px; border-radius: 50%; background: var(--c); color: #fff; display: flex; align-items: center; justify-content: center; border: 2px solid var(--surface); }
.playbadge svg { margin-left: 2px; }
dialog#demo { width: min(560px, calc(100% - 24px)); max-height: calc(100% - 24px); padding: 16px; border: none; border-radius: 20px; background: var(--surface); color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.35); overflow: auto; }
dialog#demo::backdrop { background: rgba(10,12,16,.55); }
.demo-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.demo-head h2 { margin: 0; font: 700 26px/1.1 var(--head); letter-spacing: .01em; }
.stage { position: relative; border-radius: 16px; background: var(--soft); padding: 8px 8px 0; }
.rigbox svg.rig { display: block; width: 100%; height: auto; max-height: 46vh; color: var(--ink); }
.phase { min-height: 44px; display: flex; align-items: center; justify-content: center; text-align: center; font: 700 20px/1.2 var(--head); letter-spacing: .02em; padding: 6px 8px 10px; color: var(--ink); }
.demo-ctrl { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0; }
.demo-ctrl .btn { min-width: 130px; }
.demo-ctrl .speed { flex: 1 1 200px; grid-template-columns: 1fr 1fr; }
.comic { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; }
.panel { position: relative; margin: 0; border: 2px solid var(--ink); border-radius: 10px; background: var(--surface); padding: 6px 4px 4px; display: flex; flex-direction: column; align-items: center; color: var(--ink); }
.panel svg { width: 100%; height: auto; max-width: 140px; }
.panel figcaption { font-size: 13px; font-weight: 700; text-align: center; padding: 2px 0 2px; }
.pnum { position: absolute; left: 6px; top: 6px; width: 22px; height: 22px; border-radius: 50%; background: var(--c); color: #fff; font: 800 13px/22px var(--head); text-align: center; }
.demo-desc { margin: 12px 0 0; font-size: 15px; }

.panel.side { border-style: dashed; }

/* Geführtes Training */
.voicebtn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 14px; cursor: pointer; color: var(--ink); }
.voicebtn[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.coachstart { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 16px; background: color-mix(in srgb, var(--c) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 35%, var(--line)); }
.coachstart > div:first-child { display: flex; flex-direction: column; gap: 2px; flex: 1 1 240px; }
.coachstart > div:first-child b { font: 700 20px/1.1 var(--head); letter-spacing: .02em; }
.coachstart .btn:not(.ghost) { background: var(--c); }
body.coaching .wrap { padding-bottom: 420px; }
body.coaching .coachstart { display: none; }
.ex.active { outline: 3px solid var(--c); outline-offset: 2px; }
.setrow.active .setno { color: var(--ink); }
.setrow.active .setno::before { content: '▶ '; color: var(--c); }
.coach { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 25; width: min(560px, calc(100% - 20px)); background: #16181D; color: #fff; border-radius: 20px; padding: 12px 14px 14px; box-shadow: 0 16px 40px rgba(0,0,0,.35); display: flex; flex-direction: column; gap: 8px; }
.coach .cb-top { display: flex; align-items: center; gap: 10px; }
.coach .cb-head { flex: 1; font: 700 19px/1.15 var(--head); letter-spacing: .02em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coach .cb-prog { font-size: 12px; color: #B9C0CC; font-variant-numeric: tabular-nums; }
.coach .voicebtn { min-height: 36px; padding: 0 10px; background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.18); }
.coach .voicebtn[aria-pressed="true"] { background: var(--c); border-color: var(--c); }
.coach .cb-main { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 4px 0; }
.coach .cb-big { font: 800 52px/1 var(--head); font-variant-numeric: tabular-nums; }
.coach .cb-big.small { font-size: 22px; line-height: 1.2; font-weight: 700; }
.coach .cb-sub { color: #C9D0DB; font-size: 15px; }
.coach .cb-sub b { color: #fff; }
.coach .cb-reps { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; padding: 8px; border-radius: 12px; background: rgba(255,255,255,.07); font-size: 14px; color: #C9D0DB; }
.stepper { display: inline-flex; align-items: center; gap: 4px; }
.stepper button { width: 44px; height: 44px; border-radius: 12px; border: none; background: rgba(255,255,255,.14); color: #fff; font-size: 22px; font-weight: 700; cursor: pointer; }
.stepper b { min-width: 36px; text-align: center; font: 800 24px/1 var(--head); color: #fff; }
.coach .cb-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.coach .cb-btns .cb-primary { flex: 1 1 100%; order: -1; }
.coach .cb-btns .cb-sec { flex: 1 1 0; }
.coach .cb-primary { flex: 1; min-height: 60px; border-radius: 14px; border: none; background: var(--c); color: #fff; font: 700 21px/1 var(--head); letter-spacing: .03em; cursor: pointer; }
.coach .cb-sec { min-height: 44px; padding: 0 8px; border-radius: 14px; border: 1px solid rgba(255,255,255,.2); background: transparent; color: #fff; font-weight: 700; font-size: 15px; cursor: pointer; }
.coach button:focus-visible { outline: 3px solid #8FB4FF; outline-offset: 2px; }
@media (max-width: 420px) { .coach .cb-big { font-size: 44px; } }

.ex { scroll-margin-top: 84px; }

.voicecfg { flex: 1 1 100%; border-top: 1px solid color-mix(in srgb, var(--c) 30%, var(--line)); padding-top: 8px; }
.voicecfg summary { cursor: pointer; font-weight: 600; font-size: 14px; min-height: 32px; display: flex; align-items: center; }
.vc-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 6px 0; }
.vc-row label { flex: 1 1 180px; }
.vc-row label:nth-child(2) { flex: 0 1 140px; }
.voicecfg p { margin: 4px 0 0; }

.backbtn { flex: none; display: inline-flex; align-items: center; gap: 2px; height: 44px; padding: 0 12px 0 6px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-weight: 700; font-size: 15px; max-width: 42vw; }
.backbtn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar h1 { color: var(--muted); font-size: 19px; }
.homebtn { flex: none; }
@media (max-width: 420px) { .topbar h1 { font-size: 17px; } .backbtn { max-width: 36vw; } }
@media (max-width: 420px) { .topright .voicebtn span { display: none; } .topright .voicebtn { padding: 0 11px; } }

/* Andere Sportarten */
.sportlink { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px dashed color-mix(in srgb, var(--c) 55%, var(--line)); }
.sportlink > svg { color: var(--c); flex: none; }
.sportlink > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.sportlink .plus { width: 36px; height: 36px; border-radius: 50%; background: var(--c); color: #fff; display: flex; align-items: center; justify-content: center; font: 800 24px/1 var(--head); }
.sportform fieldset { display: flex; flex-direction: column; gap: 8px; }
.sportgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.sportopt input, .daysel input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sportopt span { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); cursor: pointer; font-size: 14px; }
.sportopt span svg { flex: none; color: var(--muted); }
.sportopt input:checked + span { border-color: var(--c); background: color-mix(in srgb, var(--c) 12%, var(--surface)); box-shadow: inset 0 0 0 1px var(--c); }
.sportopt input:checked + span svg { color: var(--c); }
.sportopt input:focus-visible + span { outline: 3px solid #1D5FD1; outline-offset: 2px; }
.sonstlabel { display: none; }
.sportform:has(input[value="sonst"]:checked) .sonstlabel { display: flex; }
.daysel { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
.stepper.light button { background: var(--soft); color: var(--ink); }
.stepper.light input { width: 72px; text-align: center; font: 800 22px/1 var(--head); }
.quickmins { display: flex; gap: 6px; flex-wrap: wrap; }
.chipbtn { min-height: 40px; min-width: 48px; padding: 0 10px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; cursor: pointer; }
.cell.bonus { border: 2px dashed var(--c); color: var(--c); }
.cell svg { display: block; }

/* Anmeldung */
.login { min-height: 100vh; justify-content: center; max-width: 420px; }
.loginform { gap: 14px; padding: 24px; }
.brand.big { font-size: 44px; }
.loginerr { margin: 0; padding: 10px 12px; border-radius: 10px; background: #FBE7DC; color: #7A2A08; font-weight: 600; font-size: 14px; }
@media (prefers-color-scheme: dark) { .loginerr { background: #40210F; color: #F7C9AE; } }
