/* Kraftwerk Coaching — tiefschwarz, weiße Schrift, ein orange-roter Akzent (wie das Kraftwerk-Flyer-Design).
   Layout: sidebar on desktop, bottom tab bar on phones; content column max 960px. */
:root {
  --bg: #ecebe7;
  --bg-2: #e3e1dc;
  --surface: #f8f7f4;
  --surface-2: #f1efeb;
  --line: #d4d1ca;
  --ink: #1c1c21;
  --ink-2: #55545a;
  --ink-3: #85838a;
  --accent: #c2400f;
  --accent-ink: #ffffff;
  --accent-soft: #f8dccf;
  --ok: #3d7a4a;
  --ok-soft: #dcead9;
  --warn: #b5660f;
  --warn-soft: #f5e1c8;
  --bad: #b2372b;
  --bad-soft: #f3d8d3;
  --fig-op: .10;
  --fig-op-card: .13;
  --fig1: none; --fig2: none; --fig3: none; --fig4: none; --fig5: none; --fig6: none; --fig7: none; --fig8: none; --fig9: none; --fig10: none; --fig11: none;
  --logo: none;
  --logo-op: .06;
  --shadow: 0 1px 2px rgba(28, 28, 33, .06), 0 6px 20px rgba(28, 28, 33, .05);
  --display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --body: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --r: 14px;
  --r-sm: 9px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0b0c; --bg-2: #111113; --surface: #18181a; --surface-2: #222225; --line: #2f2f33;
    --ink: #f2f2f0; --ink-2: #b9b9b6; --ink-3: #8a8a88;
    --accent: #d9481a; --accent-ink: #ffffff; --accent-soft: #3a1b10;
    --ok: #7cc28a; --ok-soft: #1f3324; --warn: #f0a950; --warn-soft: #3b2b17; --bad: #ec7d70; --bad-soft: #3d201c;
    --fig-op: .09; --fig-op-card: .10; --logo-op: .08; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0b0c; --bg-2: #111113; --surface: #18181a; --surface-2: #222225; --line: #2f2f33;
  --ink: #f2f2f0; --ink-2: #b9b9b6; --ink-3: #8a8a88;
  --accent: #d9481a; --accent-ink: #ffffff; --accent-soft: #3a1b10;
  --ok: #7cc28a; --ok-soft: #1f3324; --warn: #f0a950; --warn-soft: #3b2b17; --bad: #ec7d70; --bad-soft: #3d201c;
  --fig-op: .09; --fig-op-card: .10; --logo-op: .08; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 var(--body); -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.05; margin: 0; text-wrap: balance; letter-spacing: .01em; }
h1 { font-size: 2.3rem; text-transform: uppercase; }
h2 { font-size: 1.45rem; text-transform: uppercase; }
h3 { font-size: 1.15rem; }
p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.small { font-size: .875rem; }
.label { font-family: var(--display); font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); font-weight: 600; }

/* Hintergrund: freigestellte Wettkampf-Fotos, blass und entsättigt */
.bgfig { position: fixed; right: -2vw; bottom: 0; height: min(72vh, 740px); z-index: 0; pointer-events: none; opacity: var(--fig-op); -webkit-mask-image: linear-gradient(to top, transparent 0, #000 4%); mask-image: linear-gradient(to top, transparent 0, #000 4%); transition: opacity .4s; }
.bgfig img { height: 100%; width: auto; display: block; }
.bgfig.left { right: auto; left: -3vw; height: min(52vh, 540px); opacity: calc(var(--fig-op) * .7); transform: scaleX(-1); }
@media (max-width: 899px) { .bgfig.left { display: none; } .bgfig { right: -18vw; } }
@media (min-width: 900px) { .bgfig.left { left: 200px; } }
.deco { position: relative; overflow: hidden; isolation: isolate; }
.deco::after { content: ""; position: absolute; right: -6px; top: -8px; bottom: -8px; width: 46%; max-width: 260px; background: var(--fig) no-repeat right top / contain; opacity: var(--fig-op-card); pointer-events: none; z-index: -1; -webkit-mask-image: linear-gradient(to left, #000 35%, transparent); mask-image: linear-gradient(to left, #000 35%, transparent); }
.deco.f1 { --fig: var(--fig1); } .deco.f2 { --fig: var(--fig2); } .deco.f3 { --fig: var(--fig3); } .deco.f4 { --fig: var(--fig4); }
.deco.f5 { --fig: var(--fig5); } .deco.f6 { --fig: var(--fig6); } .deco.f7 { --fig: var(--fig7); }
.deco.f8 { --fig: var(--fig8); } .deco.f9 { --fig: var(--fig9); } .deco.f10 { --fig: var(--fig10); } .deco.f11 { --fig: var(--fig11); }
.deco.flip::after { transform: scaleX(-1); -webkit-mask-image: linear-gradient(to right, #000 35%, transparent); mask-image: linear-gradient(to right, #000 35%, transparent); }

/* Logo als Wasserzeichen */
.lm { position: relative; overflow: hidden; isolation: isolate; }
.lm::before { content: ""; position: absolute; right: -34px; bottom: -44px; width: 168px; aspect-ratio: 1; background: var(--ink); -webkit-mask: var(--logo) center / contain no-repeat; mask: var(--logo) center / contain no-repeat; opacity: var(--logo-op); transform: rotate(-12deg); pointer-events: none; z-index: -1; }
.lm.bl::before { right: auto; left: -30px; bottom: -36px; width: 124px; transform: rotate(10deg); }
.lm.sm::before { width: 92px; right: -18px; bottom: -22px; }
details.sec.lm::before { width: 130px; bottom: auto; top: -30px; right: -26px; }
.bglogo { position: fixed; left: -10vmin; top: 14vh; width: 52vmin; aspect-ratio: 1; background: var(--ink); -webkit-mask: var(--logo) center / contain no-repeat; mask: var(--logo) center / contain no-repeat; opacity: .035; transform: rotate(-10deg); pointer-events: none; z-index: 0; }
@media (min-width: 900px) { .bglogo { left: 250px; top: auto; bottom: -8vmin; width: 40vmin; } }
.brandfoot { display: flex; flex-direction: column; align-items: center; gap: 6px; padding-block: 28px 8px; color: var(--ink-3); }
.brandfoot .logo { width: 64px; height: 64px; color: var(--accent); opacity: .75; }
.brandfoot span { font-family: var(--display); letter-spacing: .2em; font-size: .78rem; text-transform: uppercase; }
.loading { display: flex; flex-direction: column; align-items: center; gap: 10px; padding-block: 60px; color: var(--ink-3); }
.loading .logo { width: 84px; height: 84px; color: var(--accent); animation: kwpulse 1.2s ease-in-out infinite; }
@keyframes kwpulse { 0%, 100% { opacity: .25; transform: scale(.96); } 50% { opacity: .8; transform: scale(1); } }
.empty { display: flex; align-items: center; gap: 10px; }
.empty::before { content: ""; flex: none; width: 26px; height: 26px; background: var(--ink-3); -webkit-mask: var(--logo) center / contain no-repeat; mask: var(--logo) center / contain no-repeat; opacity: .6; }
.msg .logo { width: 46px; height: 46px; color: var(--bg); flex: none; }

/* Shell */
.shell { position: relative; z-index: 1; min-height: 100%; display: flex; }
.side { display: none; }
.main { flex: 1; min-width: 0; padding: 0 16px calc(96px + env(safe-area-inset-bottom, 0px)); }
.content { max-width: 960px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; padding-block: 8px 24px; }
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; display: flex; align-items: center; gap: 12px; padding-block: 10px; margin: 0 -16px; padding-inline: 16px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.brand .logo { width: 38px; height: 38px; color: var(--accent); flex: none; }
@media (max-width: 440px) { .topbar .brand b { display: none; } }
.brand b { font-family: var(--display); font-size: 1.15rem; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.role { font-family: var(--display); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; padding: 2px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--ink); font-weight: 600; }
.topbar .spacer { flex: 1; }
.iconbtn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; position: relative; }
.iconbtn svg { width: 19px; height: 19px; }
.iconbtn .dot { position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-size: .68rem; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }

.tabs { position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 10; display: flex; justify-content: space-around; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: 6px; max-width: 560px; margin: 0 auto; }
.tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 16px; text-decoration: none; font-size: .72rem; color: var(--ink-2); font-weight: 500; }
.tabs a svg { width: 21px; height: 21px; }
.tabs a.on { background: var(--accent-soft); color: var(--ink); font-weight: 600; }

@media (min-width: 900px) {
  .tabs { display: none; }
  .side { display: flex; flex-direction: column; gap: 4px; width: 232px; flex: none; position: sticky; top: 0; height: 100vh; padding: 20px 14px; border-right: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 70%, transparent); }
  .side .brand { padding: 4px 8px 18px; }
  .side .brand .logo { width: 48px; height: 48px; }
  .side .brand b { font-size: 1.05rem; letter-spacing: .05em; overflow: visible; }
  .side a.nav { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--ink-2); font-weight: 500; }
  .side a.nav svg { width: 20px; height: 20px; }
  .side a.nav:hover { background: var(--surface-2); color: var(--ink); }
  .side a.nav.on { background: var(--accent-soft); color: var(--ink); font-weight: 600; }
  .side .foot { margin-top: auto; }
  .main { padding: 0 32px 40px; }
  .topbar { margin: 0 -32px; padding-inline: 32px; }
  .topbar .brand { display: none; }
}

/* Surfaces */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card.flat { background: transparent; border-style: dashed; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.stat b { font-family: var(--display); font-size: 2.2rem; line-height: 1; font-variant-numeric: tabular-nums; }
.stat span { color: var(--ink-2); font-size: .88rem; }
.stat.hot { border-color: var(--accent); background: var(--accent-soft); }

.hello { display: flex; flex-direction: column; gap: 4px; padding-top: 8px; }
.hello h1 span { color: var(--accent); }

/* Lists */
.list { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); min-width: 0; }
.row:first-child { border-top: 0; }
.row .grow { flex: 1; min-width: 0; }
.row .grow > * { overflow-wrap: anywhere; }
a.row { text-decoration: none; }
a.row:hover .name { text-decoration: underline; text-underline-offset: 3px; }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-family: var(--display); font-weight: 700; letter-spacing: .05em; flex: none; }
.name { font-weight: 600; }

.pill { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.acc { background: var(--accent-soft); color: var(--ink); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }

/* Buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); padding: 9px 16px; border-radius: 99px; cursor: pointer; font-weight: 600; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.05); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 5px 11px; font-size: .85rem; }
.btn.block { width: 100%; padding: 13px; }
.btn svg { width: 17px; height: 17px; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-size: .85rem; font-weight: 600; color: var(--ink-2); }
input[type=text], input[type=password], input[type=number], input[type=date], input[type=time], input:not([type]), select, textarea {
  width: 100%; border: 1px solid var(--line); background: var(--surface-2); border-radius: var(--r-sm); padding: 10px 12px; min-width: 0;
}
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; }
.form { display: flex; flex-direction: column; gap: 12px; }
.fields { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.scale { display: flex; gap: 6px; flex-wrap: wrap; }
.scale label { flex: 1; min-width: 38px; }
.scale input { position: absolute; opacity: 0; pointer-events: none; }
.scale span { display: grid; place-items: center; height: 40px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); cursor: pointer; font-weight: 600; font-variant-numeric: tabular-nums; }
.scale input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.scale input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Sections (athlete detail) */
details.sec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
details.sec > summary { list-style: none; cursor: pointer; padding: 15px 18px; display: flex; align-items: center; gap: 12px; }
details.sec > summary::-webkit-details-marker { display: none; }
details.sec > summary h3 { flex: 1; font-size: 1.2rem; text-transform: uppercase; letter-spacing: .04em; }
details.sec > summary .chev { transition: transform .2s; color: var(--ink-3); }
details.sec[open] > summary .chev { transform: rotate(180deg); }
details.sec > .body { padding: 0 18px 18px; display: flex; flex-direction: column; gap: 14px; }

.block { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px; display: flex; flex-direction: column; gap: 10px; background: var(--surface-2); }
.block-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.block-head input.title { flex: 1; min-width: 140px; font-weight: 600; }
.ex { display: grid; gap: 8px; grid-template-columns: 1fr; padding: 10px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); }
.ex.ss { border-left: 4px solid var(--accent); }
.ex-top { display: flex; gap: 8px; align-items: center; }
.ex-top .nm { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.ex .fields { grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); }
.ex .fields input { padding: 7px 9px; }
.ex .fields .field > span { font-size: .75rem; }

.saved { font-size: .8rem; color: var(--ink-3); }
.saved.on { color: var(--ok); }

/* Athlete training log */
.setrow { display: grid; grid-template-columns: 34px 1fr 1fr 44px; gap: 8px; align-items: center; }
.setrow .n { font-family: var(--display); font-weight: 700; color: var(--ink-3); text-align: center; }
.setrow .done { width: 44px; height: 40px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; display: grid; place-items: center; }
.setrow .done.on { background: var(--ok); border-color: var(--ok); color: var(--bg); }
.tip { font-size: .88rem; color: var(--ink-2); background: var(--surface-2); border-radius: var(--r-sm); padding: 8px 10px; }

.macro { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.bar { height: 7px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }

.habit { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); cursor: pointer; }
.habit .box { width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--ink-3); display: grid; place-items: center; flex: none; }
.habit.on { background: var(--ok-soft); border-color: transparent; }
.habit.on .box { background: var(--ok); border-color: var(--ok); color: var(--bg); }

.msg { background: var(--ink); color: var(--bg); border-radius: var(--r); padding: 16px 18px; display: flex; gap: 12px; }
.msg .label { color: var(--accent); }
.msg p { white-space: pre-wrap; }

.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--ink-3); font-size: 11px; font-family: var(--body); }
.empty { color: var(--ink-2); padding: 6px 0; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; font-variant-numeric: tabular-nums; }
th { font-family: var(--display); text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; color: var(--ink-2); }

/* Login */
.login { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; position: relative; z-index: 1; }
.login .card { width: 100%; max-width: 420px; padding: 28px; gap: 18px; box-shadow: var(--shadow); }
.login .logo-big { width: 168px; height: 168px; margin: 0 auto; color: var(--accent); }
.login h1 { font-size: 2rem; }
.demo-hint { font-size: .88rem; background: var(--accent-soft); border-radius: var(--r-sm); padding: 10px 12px; }
.err { color: var(--bad); font-size: .9rem; font-weight: 500; }

/* Modal & toast */
.modal-bg { position: fixed; inset: 0; z-index: 50; background: rgba(15, 15, 18, .45); display: flex; align-items: flex-end; justify-content: center; padding: 16px; }
.modal { background: var(--surface); border-radius: 18px; width: 100%; max-width: 520px; max-height: 88vh; overflow: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow); }
@media (min-width: 640px) { .modal-bg { align-items: center; } }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(100px + env(safe-area-inset-bottom, 0px)); z-index: 60; background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 99px; font-weight: 600; font-size: .92rem; box-shadow: var(--shadow); max-width: calc(100% - 32px); }
.picker-list { display: flex; flex-direction: column; max-height: 50vh; overflow: auto; }
.picker-list button { text-align: left; background: none; border: 0; border-top: 1px solid var(--line); padding: 10px 4px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; }
.picker-list button:hover { background: var(--surface-2); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

.swap-row { background: none; border-left: 0; border-right: 0; border-bottom: 0; width: 100%; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.swap-row:hover .grow > span:first-child { text-decoration: underline; text-underline-offset: 3px; }
.swap-ic { color: var(--accent); font-weight: 700; width: 18px; text-align: center; }
.picker-list button .pill { flex: none; align-self: center; }

/* Hinweis: App auf den Homescreen */
.install-sheet { position: fixed; left: 12px; right: 12px; bottom: calc(92px + env(safe-area-inset-bottom, 0px)); z-index: 40; max-width: 560px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 14px; background: var(--ink); color: var(--bg); border-radius: 18px; box-shadow: var(--shadow); animation: kwup .35s ease-out; }
.install-sheet .logo { width: 44px; height: 44px; color: var(--bg); flex: none; }
.install-sheet .grow { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 2px; }
.install-sheet .muted { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.install-sheet .btn.ghost { color: var(--bg); }
@keyframes kwup { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.install-steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; line-height: 1.45; }
.install-steps li::marker { font-family: var(--display); font-weight: 700; color: var(--accent); }
@media (min-width: 900px) { .install-sheet { bottom: 20px; } }

/* Check-in-Fotos */
.photo-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 420px; }
.photo-slot { position: relative; aspect-ratio: 3 / 4; border: 1.5px dashed var(--ink-3); border-radius: var(--r-sm); background: var(--surface-2); cursor: pointer; overflow: hidden; display: flex; align-items: flex-end; justify-content: center; max-width: 100%; }
.photo-slot .ph-img { position: absolute; inset: 0; background: center / cover no-repeat; }
.photo-slot:not(.has) .ph-img::after { content: "+"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.8rem; color: var(--ink-3); font-weight: 300; }
.photo-slot .ph-label { position: relative; font-size: .75rem; font-weight: 600; padding: 3px 8px; margin-bottom: 6px; border-radius: 99px; background: color-mix(in srgb, var(--surface) 85%, transparent); }
.photo-slot.has { border-style: solid; border-color: var(--accent); }
.photo-slot.busy { opacity: .5; }
.photo-slot .ph-del { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--ink); color: var(--bg); font-size: 1rem; line-height: 1; cursor: pointer; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.photo-thumb { aspect-ratio: 3 / 4; border: 0; border-radius: var(--r-sm); background: var(--surface-2) center / cover no-repeat; cursor: pointer; display: flex; align-items: flex-end; justify-content: center; padding: 6px; }
.photo-thumb span { font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: color-mix(in srgb, var(--surface) 85%, transparent); color: var(--ink); }
.modal.wide { max-width: 760px; }
.photo-full img { width: 100%; max-height: 70vh; object-fit: contain; border-radius: var(--r-sm); background: var(--surface-2); display: block; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.compare figure { margin: 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.compare img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--r-sm); background: var(--surface-2); }
.compare .empty-ph { aspect-ratio: 3 / 4; border-radius: var(--r-sm); background: var(--surface-2); display: grid; place-items: center; color: var(--ink-3); font-size: .85rem; }
.compare figcaption { font-size: .82rem; color: var(--ink-2); text-align: center; }

.lang-switch { display: flex; gap: 4px; }
.lang-switch .btn { min-width: 40px; }
.login-lang { align-self: flex-end; margin-bottom: -12px; }

.meal-opts button { align-items: center; }
#own-list button.on { background: var(--accent-soft); font-weight: 600; }
.own-result { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 12px; background: var(--surface-2); }

.range-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; }

/* ---------- Athleten-Reiter (Trainer) ---------- */
.atabs { position: sticky; top: calc(58px + env(safe-area-inset-top, 0px)); z-index: 4; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 5px; margin: 0 -4px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 16px; }
.atabs::-webkit-scrollbar { display: none; }
.atabs button { flex: 1 0 auto; border: 0; background: transparent; padding: 8px 10px; font-size: .92rem; border-radius: 12px; font-weight: 600; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.atabs button.on { background: var(--ink); color: var(--bg); }
@media (min-width: 900px) { .atabs { top: 62px; } }
.stat b small { font-size: .5em; color: var(--ink-3); margin-left: 2px; }
.sbars { display: grid; gap: 8px 18px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.sb { display: grid; grid-template-columns: minmax(0, 1fr) 90px 20px; gap: 10px; align-items: center; }
.sb-track { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.sb-track i { display: block; height: 100%; border-radius: 4px; background: var(--ink-3); }
.sb-track i.ok { background: var(--ok); } .sb-track i.warn { background: var(--warn); } .sb-track i.bad { background: var(--bad); }
.chart-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 4px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { display: inline-block; width: 16px; height: 8px; border-radius: 2px; }
.lg.band { background: color-mix(in srgb, var(--ink) 14%, transparent); }
.lg.avg { height: 0; border-top: 2px dotted var(--ink); }
.lg.goal { height: 0; border-top: 2px dashed var(--ok); }

/* ---------- Kompakter Übungs-Editor ---------- */
.ex-list { display: flex; flex-direction: column; gap: 6px; }
.ex { padding: 0; gap: 0; }
.ex-row { display: flex; align-items: center; gap: 6px; padding: 6px 8px 6px 4px; }
.drag-handle { cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; color: var(--ink-3); font-size: 1.2rem; padding: 6px 8px; line-height: 1; }
.ex.dragging { opacity: .85; box-shadow: var(--shadow); border-color: var(--accent); }
.ex.dragging .drag-handle { cursor: grabbing; }
.ex-sum { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; background: none; border: 0; text-align: left; cursor: pointer; padding: 4px 0; }
.ex-sum .nm { font-weight: 600; overflow-wrap: anywhere; }
.ex-sum .meta { font-size: .85rem; color: var(--ink-2); }
.ex-chev { width: 18px; color: var(--ink-3); transition: transform .2s; flex: none; pointer-events: none; }
.ex.open .ex-chev { transform: rotate(180deg); }
.ex-edit { display: flex; flex-direction: column; gap: 8px; padding: 0 10px 10px; }

/* ---------- Ring, Mini-Verlauf, Konfetti, Animationen ---------- */
.ring .ring-t { font-family: var(--display); font-weight: 700; font-size: 17px; fill: var(--ink); }
.week-card { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; }
.week-facts { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.week-facts .row { padding: 6px 0; }
.spark { display: block; flex: none; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--ink-3); }
.status-dot.ok { background: var(--ok); } .status-dot.warn { background: var(--warn); } .status-dot.bad { background: var(--bad); }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 70; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 8px; height: 12px; border-radius: 2px; animation: kwfall 1.8s cubic-bezier(.2,.6,.4,1) forwards; }
@keyframes kwfall { to { transform: translateY(105vh) rotate(540deg); opacity: .2; } }
@keyframes kwpop { 0% { transform: scale(.6); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
.pop { animation: kwpop .28s ease-out; }
@media (prefers-reduced-motion: reduce) { .pop { animation: none; } }

/* ---------- Pausen-Timer ---------- */
.rest-timer { position: fixed; left: 12px; right: 12px; bottom: calc(92px + env(safe-area-inset-bottom, 0px)); z-index: 45; max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; background: var(--ink); color: var(--bg); border-radius: 16px; box-shadow: var(--shadow); }
.rest-timer .t { font-family: var(--display); font-size: 1.8rem; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 72px; }
.rest-timer .grow { flex: 1; font-size: .88rem; opacity: .85; }
.rest-timer .btn { background: transparent; color: var(--bg); border-color: color-mix(in srgb, var(--bg) 35%, transparent); }
.rest-timer.done { background: var(--ok); }
.rest-timer .bar { position: absolute; left: 16px; right: 16px; bottom: 5px; height: 3px; border-radius: 2px; background: color-mix(in srgb, var(--bg) 20%, transparent); overflow: hidden; }
.rest-timer .bar i { display: block; height: 100%; background: var(--accent); }
@media (min-width: 900px) { .rest-timer { bottom: 20px; } }
.hint-up { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--ok-soft); color: var(--ink); border-radius: var(--r-sm); padding: 8px 10px; font-size: .9rem; }
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.summary-grid .stat b { font-size: 1.7rem; }

/* ---------- Check-in in Schritten ---------- */
.steps-bar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.steps-bar span { height: 6px; border-radius: 3px; background: var(--surface-2); }
.steps-bar span.on { background: var(--accent); }
.step-title { font-family: var(--display); text-transform: uppercase; letter-spacing: .04em; font-size: 1.15rem; font-weight: 700; }

/* ---------- Ernährung: Makros pro Mahlzeit, erledigte eingeklappt ---------- */
.mbar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--surface-2); }
.mbar i { display: block; height: 100%; }
.mbar .p { background: var(--ink); } .mbar .c { background: var(--accent); } .mbar .f { background: var(--ink-3); }
.mlegend { display: flex; gap: 12px; flex-wrap: wrap; font-size: .8rem; color: var(--ink-2); }
.mlegend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; vertical-align: 0; }
.meal.eaten { opacity: .78; }
.meal.eaten .meal-body { display: none; }
.meal.eaten.show .meal-body { display: flex; }
.meal-body { display: flex; flex-direction: column; gap: 12px; }
.rest-timer .grow { min-width: 0; }
.rest-timer .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body:has(.rest-timer) main { padding-bottom: 180px; }

/* ---------- Chat ---------- */
.chat { display: flex; flex-direction: column; gap: 10px; min-height: calc(100dvh - 250px); }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 4px 0 8px; border-bottom: 1px solid var(--line); }
.chat-head .name { font-family: var(--display); font-size: 1.35rem; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; line-height: 1.1; }
.avatar.logo-av { background: var(--ink); padding: 4px; }
.avatar.logo-av .logo { width: 100%; height: 100%; color: var(--bg); }
.chat-log { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 6px 0 4px; }
.chat-day { text-align: center; margin: 10px 0 4px; }
.chat-day span { font-size: .75rem; color: var(--ink-2); background: var(--surface-2); padding: 3px 10px; border-radius: 10px; }
.bubble { max-width: min(80%, 520px); padding: 8px 12px 6px; border-radius: 18px; display: flex; flex-direction: column; gap: 2px; box-shadow: 0 1px 1px rgb(0 0 0 / .04); animation: kwin .18s ease-out; }
.bubble .txt { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.4; }
.bubble .at { font-size: .68rem; opacity: .6; align-self: flex-end; }
.bubble.me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 6px; }
.bubble.them { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
@keyframes kwin { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .bubble { animation: none; } }
.chat-bar { position: sticky; bottom: calc(88px + env(safe-area-inset-bottom, 0px)); z-index: 6; display: flex; gap: 8px; align-items: flex-end; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 6px 6px 6px 14px; box-shadow: var(--shadow); }
.chat-bar textarea { flex: 1; border: 0; background: transparent; resize: none; min-height: 24px; max-height: 160px; padding: 8px 0; font: inherit; line-height: 1.35; outline: none; box-shadow: none; }
.chat-bar .btn { width: 44px; height: 44px; padding: 0; border-radius: 50%; flex: none; display: grid; place-items: center; }
.chat-bar .btn svg { width: 20px; height: 20px; margin: 0; }
@media (min-width: 900px) { .chat-bar { bottom: 16px; } }
.chat-row .ellip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-row.unread .name { font-weight: 700; }
.chat-row.unread .ellip { color: var(--ink); font-weight: 500; }
.chat-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.chat-unread { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.side a.nav .nav-dot { position: static; margin-left: auto; min-width: 18px; height: 18px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: .7rem; font-weight: 700; display: grid; place-items: center; padding: 0 5px; }
.side a.nav .nav-dot[hidden] { display: none; }
.msg .msg-reply { margin-top: 8px; background: transparent; color: var(--bg); border-color: color-mix(in srgb, var(--bg) 35%, transparent); }
.iconbtn.on { background: var(--accent-soft); border-color: var(--accent); }
.extra-set { border: 1px dashed var(--line); border-radius: var(--r-sm); padding: 8px 10px; display: flex; flex-direction: column; gap: 8px; background: var(--surface-2); }
.extra-head { display: flex; align-items: center; gap: 8px; }
.extra-head .label { flex: none; }
.extra-head input { flex: 1; min-width: 0; }
.iconbtn.sm { width: 34px; height: 34px; flex: none; }
.iconbtn.sm svg { width: 16px; height: 16px; }
.set-label { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.ex-edit { min-width: 0; } .ex-edit .fields > * , .ex-edit input { min-width: 0; }

/* ---------- HIIT ---------- */
.hiit-fields { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.hiit-list { display: flex; flex-direction: column; gap: 6px; }
.hiit-ex { display: flex; align-items: center; gap: 8px; }
.hiit-ex input.grow { flex: 1; min-width: 0; }
.hiit-ex input.amt { width: 92px; flex: none; text-align: center; }
.hiit-btns { display: flex; flex: none; }
.hiit-btns .btn { padding-inline: 6px; }
@media (max-width: 520px) { .hiit-ex { flex-wrap: wrap; } .hiit-ex input.grow { flex-basis: calc(100% - 40px); } .hiit-ex input.amt { margin-left: 32px; } }
.hiit-no { width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-size: .75rem; font-weight: 700; flex: none; }
.hiit-player { text-align: center; align-items: center; gap: 6px; transition: background .3s, border-color .3s; }
.hp-top { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.hp-phase { font-family: var(--display); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; font-size: 1.05rem; color: var(--ink-2); margin-top: 6px; }
.hp-name { font-family: var(--display); font-size: clamp(1.6rem, 6vw, 2.4rem); font-weight: 700; text-transform: uppercase; line-height: 1.05; }
.hp-time { font-family: var(--display); font-size: clamp(4.5rem, 22vw, 7.5rem); font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.hp-bar { width: 100%; height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.hp-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .25s linear; }
.hp-btns { justify-content: center; }
.hiit-player[data-kind="work"] { background: var(--accent-soft); border-color: var(--accent); }
.hiit-player[data-kind="work"] .hp-phase { color: var(--ink); }
.hiit-player[data-kind="rest"], .hiit-player[data-kind="roundrest"] { background: var(--ok-soft); }
.hiit-player[data-kind="rest"] .hp-bar i, .hiit-player[data-kind="roundrest"] .hp-bar i { background: var(--ok); }
[data-hx].on { background: var(--accent-soft); border-radius: var(--r-sm); }
.hiit-player { scroll-margin-top: 76px; }
.hl-edit > .block { background: var(--surface); }
.hiit-wc { grid-template-columns: 1fr 72px 1fr 72px; }
@media (max-width: 520px) { .hiit-wc { grid-template-columns: 1fr 72px; } }
.hiit-player[data-kind="warm"], .hiit-player[data-kind="cool"] { background: var(--surface-2); }

/* Umschalter Trainingstag / Trainingsfrei */
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); align-self: flex-start; }
.seg button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; padding: 8px 14px; border-radius: 10px; font: inherit; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.seg button svg { width: 17px; height: 17px; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgb(0 0 0 / .12); }
.nut-var { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }

/* ---------- Saison-Design ---------- */
#season-layer { position: fixed; inset: 0; pointer-events: none; z-index: -1; overflow: hidden; }
@media (prefers-reduced-motion: reduce) { #season-layer .s-bat, #season-layer .s-snow { animation: none !important; display: none; } }
/* Halloween */
:root[data-season="halloween"] { --accent: #c2400f; --accent-soft: #f8dccf; --accent-ink: #ffffff; }
@media (prefers-color-scheme: dark) { :root[data-season="halloween"]:not([data-theme="light"]) { --accent: #d9481a; --accent-soft: #3a1b10; --bg: #0b0b0c; --bg-2: #111113; --surface: #18181a; --surface-2: #222225; --line: #2f2f33; } }
:root[data-season="halloween"][data-theme="dark"] { --accent: #d9481a; --accent-soft: #3a1b10; --bg: #0b0b0c; --bg-2: #111113; --surface: #18181a; --surface-2: #222225; --line: #2f2f33; }
:root[data-season="halloween"] .s-web { position: absolute; top: -6px; right: -6px; width: min(32vw, 190px); color: var(--ink); opacity: .16; transform: scaleX(-1); }
:root[data-season="halloween"] .s-bat { position: absolute; left: -80px; width: 58px; color: var(--ink); opacity: .32; animation: kwbat linear infinite; transform: scale(var(--sc)); }
:root[data-season="halloween"] .s-bat svg { width: 100%; fill: currentColor; animation: kwflap .35s ease-in-out infinite alternate; transform-origin: 50% 40%; }
@keyframes kwbat { 0% { left: -80px; transform: translateY(0) scale(var(--sc)); } 25% { transform: translateY(26px) scale(var(--sc)); } 50% { transform: translateY(-14px) scale(var(--sc)); } 75% { transform: translateY(20px) scale(var(--sc)); } 100% { left: calc(100% + 80px); transform: translateY(0) scale(var(--sc)); } }
@keyframes kwflap { from { transform: scaleY(1); } to { transform: scaleY(.62); } }
:root[data-season="halloween"] .hello h1::after { content: " 🎃"; }
:root[data-season="halloween"] .topbar .brand::after, :root[data-season="halloween"] .side .brand::after { content: "🦇"; font-size: 1.05rem; margin-left: -2px; }
:root[data-season="halloween"] .card.deco { box-shadow: var(--shadow), 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent), 0 8px 30px color-mix(in srgb, var(--accent) 18%, transparent); }
:root[data-season="halloween"] .msg { background: linear-gradient(135deg, #1c1c21, #3a1550); }
:root[data-season] .msg, :root[data-season] .msg .logo, :root[data-season] .msg .msg-reply { color: #f3eee8; }
:root[data-season] .msg .msg-reply { border-color: rgba(243, 238, 232, .35); }
/* Weihnachten */
:root[data-season="xmas"] { --accent: #c8372d; --accent-soft: #f6d9d5; --accent-ink: #ffffff; }
@media (prefers-color-scheme: dark) { :root[data-season="xmas"]:not([data-theme="light"]) { --accent: #e0564a; --accent-soft: #3d1c19; --accent-ink: #ffffff; } }
:root[data-season="xmas"][data-theme="dark"] { --accent: #e0564a; --accent-soft: #3d1c19; --accent-ink: #ffffff; }
:root[data-season="xmas"] .s-snow { position: absolute; top: -12px; width: var(--sz); height: var(--sz); border-radius: 50%; background: #b9c7d6; opacity: .7; animation: kwsnow linear infinite; }
@media (prefers-color-scheme: dark) { :root[data-season="xmas"] .s-snow { background: #e8eef5; opacity: .55; } }
@keyframes kwsnow { 0% { transform: translate(0, -12px); } 50% { transform: translate(14px, 50vh); } 100% { transform: translate(-6px, 102vh); } }
:root[data-season="xmas"] .hello h1::after { content: " 🎄"; }
:root[data-season="xmas"] .topbar .brand::after, :root[data-season="xmas"] .side .brand::after { content: "❄️"; font-size: .95rem; }
:root[data-season="xmas"] .msg { background: linear-gradient(135deg, #1c1c21, #5a1712); }

/* Bodybuilding-Rubrik */
details.bb-div > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
details.bb-div > summary::-webkit-details-marker { display: none; }
details.bb-div > summary .chev { width: 22px; flex: none; transition: transform .2s; color: var(--ink-3); }
details.bb-div[open] > summary .chev { transform: rotate(180deg); }
.bb-body { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 12px; }
@media (min-width: 700px) { .bb-body { grid-template-columns: 1fr 1fr; } }
.bb-body ul, .bb-list { margin: 4px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.bb-body li, .bb-list li { line-height: 1.4; }
.pack-list { display: flex; flex-direction: column; gap: 8px; }
.pack-list .habit { text-align: left; }
.fed-pills .btn { min-width: 64px; }

/* Motivation */
.quote-card blockquote, .quote-hero blockquote { margin: 6px 0 4px; font-family: var(--display); font-weight: 600; font-size: 1.35rem; line-height: 1.25; color: var(--ink); }
.quote-hero blockquote { font-size: clamp(1.5rem, 5.5vw, 2rem); }
.quote-card, .quote-hero { border-left: 4px solid var(--accent); }
.quote-list { display: flex; flex-direction: column; }
.quote-row { display: flex; flex-direction: column; gap: 2px; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 10px 2px; font: inherit; color: var(--ink); cursor: pointer; }
.quote-row:last-child { border-bottom: 0; }
.quote-row.on { background: var(--accent-soft); border-radius: var(--r-sm); padding-inline: 8px; }
.daily-q { display: flex; flex-direction: column; gap: 8px; text-align: center; align-items: center; padding: 8px 4px; }
.daily-q blockquote { margin: 6px 0 2px; font-family: var(--display); font-weight: 700; font-size: clamp(1.6rem, 6vw, 2.1rem); line-height: 1.2; color: var(--ink); }
.daily-q .btns { justify-content: center; margin-top: 8px; }
.daily-q-modal { border-top: 5px solid var(--accent); animation: kwpop .35s ease-out; }

/* Mobility-Bibliothek */
.mob-list { display: flex; flex-direction: column; }
.mob-ex, .mob-routine { border-bottom: 1px solid var(--line); }
.mob-list > .mob-ex:last-child, .mob-routine .mob-ex:last-child { border-bottom: 0; }
.mob-sum { all: unset; box-sizing: border-box; width: 100%; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 10px 0; color: inherit; font: inherit; text-align: left; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.mob-sum:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mob-sum .grow { display: flex; flex-direction: column; min-width: 0; }
.mob-sum .chev { width: 18px; flex: none; color: var(--ink-3); transition: transform .2s; pointer-events: none; }
.open > .mob-sum .chev { transform: rotate(180deg); }
.mob-body { display: none; }
.open > .mob-body { display: block; }
.mob-ex > .mob-body { margin: 0 0 10px; color: var(--ink-2); }
.mob-routine > .mob-body { padding-left: 12px; }

/* Bodybuilding: Wettkampf-Foto als Seitenhintergrund */
#bb-bg { display: none; position: fixed; inset: 0; z-index: 0; pointer-events: none; background: center top / cover no-repeat; opacity: var(--bb-op, .22); }
#bb-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 35%, transparent) 0, color-mix(in srgb, var(--bg) 10%, transparent) 30%, color-mix(in srgb, var(--bg) 70%, transparent) 70%, var(--bg) 100%); }
:root[data-page=bodybuilding] #bb-bg { display: block; }
:root[data-page=bodybuilding] .bgfig, :root[data-page=bodybuilding] .bglogo { display: none; }
@media (min-width: 900px) { #bb-bg { left: 220px; background-size: auto 100%; background-position: right top; } }

/* Bikini-Klassen: freigestelltes Athletinnen-Foto wie bei den anderen Karten */
.bb-figcard { position: relative; isolation: isolate; overflow: hidden; }
.bb-figcard::after { content: ""; position: absolute; right: -4px; top: 0; bottom: 0; width: 46%; max-width: 260px; background: var(--cardfig) no-repeat right top / auto max(100%, 210px); opacity: calc(var(--fig-op-card) * 1.6); pointer-events: none; z-index: -1; -webkit-mask-image: linear-gradient(to left, #000 40%, transparent); mask-image: linear-gradient(to left, #000 40%, transparent); }
.bb-figcard[open]::after { width: 62%; max-width: 300px; background-size: auto 420px; }

.bb-bikini { --cardfig: var(--fig-bikini); }
.bb-men { --cardfig: var(--fig-bb); }

/* Einkaufsliste */
.shop-steps { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.shop-step { display: flex; align-items: center; gap: 10px; }
.shop-ctl { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.shop-ctl b { min-width: 1.8em; text-align: center; }
.shop-ctl .btn { min-width: 34px; padding-inline: 0; justify-content: center; }
.shop-item { width: 100%; text-align: left; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; gap: 12px; }
.shop-item .box { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--ink-3); display: grid; place-items: center; flex: none; }
.shop-item .box svg { width: 15px; }
.shop-item.on .box { background: var(--ok); border-color: var(--ok); color: var(--bg); }
.shop-item.on .grow, .shop-item.on b { color: var(--ink-3); text-decoration: line-through; }

/* Steigerung: Wiederholungen statt Gewicht */
.hint-up.hint-reps { background: var(--surface-2); }

/* Wettkampf */
.contest-card { border-color: var(--accent); }
.countdown { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 70px; padding: 6px 10px; border-radius: var(--r-sm); background: var(--accent); color: var(--accent-ink); line-height: 1; }
.countdown b { font-size: 1.9rem; font-family: var(--font-display, inherit); }
.countdown.big { flex-direction: row; gap: 12px; justify-content: flex-start; background: none; color: inherit; padding: 0; margin-top: 6px; }
.countdown.big b { font-size: 4rem; color: var(--accent); }
.countdown.big span { font-size: 1.05rem; font-weight: 600; max-width: 12ch; line-height: 1.15; }
.peak-today { background: var(--accent-soft); border-radius: var(--r-sm); padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.posing-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; max-width: 240px; }
.posing-grid span { aspect-ratio: 1; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); }
.posing-grid span.on { background: var(--accent); border-color: var(--accent); }
.posing-grid span.today { outline: 2px solid var(--ink); outline-offset: 1px; }
.peak-row.now { background: var(--accent-soft); border-radius: var(--r-sm); padding-inline: 8px; }

/* Fotovergleich mit Schieberegler */
.compare.slide { display: flex; flex-direction: column; gap: 8px; }
.cmp-stage { position: relative; width: 100%; max-width: 520px; margin: 0 auto; aspect-ratio: 3 / 4; border-radius: var(--r-sm); overflow: hidden; background: var(--surface-2); touch-action: pan-y; }
.cmp-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; aspect-ratio: auto; border-radius: 0; }
.cmp-line { position: absolute; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 0 1px rgb(0 0 0 / .25); pointer-events: none; }
.cmp-tag { position: absolute; top: 8px; font-size: .75rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: rgb(0 0 0 / .55); color: #fff; }
.cmp-tag.l { left: 8px; } .cmp-tag.r { right: 8px; }
.compare.slide input[type=range] { width: 100%; max-width: 520px; margin: 0 auto; accent-color: var(--accent); }
.cmp-cap { display: flex; justify-content: space-between; max-width: 520px; width: 100%; margin: 0 auto; }
.contest-card > .card-head:first-child { flex-wrap: nowrap; align-items: flex-start; }
.contest-card > .card-head:first-child > div:first-child { min-width: 0; }

/* Filter-Reiter (Muskelgruppen) – eine Zeile zum Wischen */
.pick-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.pick-filters::-webkit-scrollbar { display: none; }
.pick-filters .btn { flex: none; }

/* Rubrik Übungen */
.ex-cali { font-size: .68rem; padding: 2px 7px; flex: none; }
.mob-ex.open > .ex-body { display: flex; flex-direction: column; gap: 8px; padding-bottom: 10px; }
.ex-body p { margin: 0; color: var(--ink-2); }
#ex-cats, #ex-mgs { margin-top: 2px; }

/* Zuletzt in der App */
.seen { display: flex; align-items: center; gap: 6px; }
.seen-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); flex: none; }
.seen-live .seen-dot { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.seen-live { color: var(--ok) !important; font-weight: 600; }
.seen-ok .seen-dot { background: var(--ok); }
.seen-warn .seen-dot { background: var(--warn, #d9a21b); }
.seen-bad .seen-dot { background: var(--bad, #d14a3c); }

/* Check-in: Trainings nachtragen */
.retro-row { align-items: flex-start; }
.retro-row .grow { display: flex; flex-direction: column; gap: 6px; min-width: 0; width: 100%; }
.retro-done { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.retro-ctl { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.retro-ctl select { flex: 1 1 100%; min-width: 0; width: 100%; max-width: 100%; }
.retro-ctl .btn { flex: 1 1 auto; justify-content: center; }
.retro-ctl[hidden] { display: none; }

/* Eigene Notiz je Übung */
.ex-note { display: flex; flex-direction: column; gap: 4px; }
.ex-note textarea { min-height: 38px; resize: none; font-size: .92rem; padding: 8px 10px; overflow: hidden; }
.my-note { color: var(--ink-2); font-style: italic; }

/* Check-in: Ernährung & Tauschungen */
.nutsnap { display: flex; flex-direction: column; gap: 10px; }
.ns-var { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); }
.ns-row { display: flex; gap: 10px; align-items: flex-start; }
.ns-row .grow { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ns-l { min-width: 78px; padding-top: 1px; }
.nd { font-size: .78rem; color: var(--ink-2); }
.nd.big { color: var(--warn); font-weight: 700; }

/* Vergangene Tage */
.day-nav { display: flex; align-items: center; gap: 8px; }
.day-nav-mid { flex: 1; display: flex; flex-direction: column; align-items: center; line-height: 1.2; text-align: center; }
.day-nav .btn[aria-disabled="true"] { opacity: .3; pointer-events: none; }
.retro-view { border: 0; cursor: pointer; font: inherit; }

.swap-extra .grow > span:first-child { color: var(--ink-2); }
#sw-tune { display: flex; flex-direction: column; gap: 10px; }
#sw-tune[hidden], #sw-pick[hidden] { display: none; }

/* Reiter beim Athleten: auf dem Handy umbrechen statt versteckt seitlich scrollen */
@media (max-width: 699px) { .atabs { flex-wrap: wrap; overflow-x: visible; } .atabs button { flex: 1 1 auto; padding: 7px 8px; font-size: .86rem; } }

/* Eigene Makros */
.own-macros { display: grid; gap: 8px; margin: 6px 0 4px; padding: 14px; border: 1px solid var(--accent); border-radius: 14px; background: var(--accent-soft); }
.own-macros p { margin: 0; }
.own-btn { width: 100%; justify-content: center; min-height: 48px; font-size: 16px; }
