/* trainiere.ch – Gestaltung (übernommen aus Version 2) */

@font-face { font-family: 'Archivo'; font-style: italic; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  src: url(fonts/archivo-italic-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Archivo'; font-style: italic; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  src: url(fonts/archivo-italic-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  src: url(fonts/archivo-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  src: url(fonts/archivo-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 400; font-display: swap; src: url(fonts/plexmono-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 400; font-display: swap; src: url(fonts/plexmono-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 500; font-display: swap; src: url(fonts/plexmono-500-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 500; font-display: swap; src: url(fonts/plexmono-500-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 600; font-display: swap; src: url(fonts/plexmono-600-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 600; font-display: swap; src: url(fonts/plexmono-600-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }

:root {
  --ink: #151513; --ink-h: #24231F; --paper: #F6F5F2; --white: #FFFFFF;
  --line: #DEDBD4; --line2: #C9C5BC; --soft: #ECEAE5; --muted: #8C8980; --text2: #5A5852;
  --orange: #F2501E; --orange-h: #DA4313; --rust: #B8370B; --peach: #FFE8DF;
  --red: #D42A1E; --red-soft: #FBE3E1; --green: #167343; --green2: #1E9A55; --green-soft: #E1F4E8;
  --gold: #8A6200; --gold-soft: #FBF1D6;
  --dark2: #2A2925; --dark3: #3A3934; --darkline: #2E2D29; --on-dark: #BDBAB2;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --sans: 'Archivo', Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); -webkit-font-smoothing: antialiased; overflow-x: hidden; max-width: 100%; }
body { min-height: 100vh; font-family: var(--sans); color: var(--ink); -webkit-tap-highlight-color: transparent; }
a { color: var(--rust); }
a:hover { color: var(--ink); }
button, input, select, textarea { font-family: inherit; }
button { color: inherit; }
input:focus, select:focus, textarea:focus { border-color: var(--ink) !important; outline: none; }
button:focus-visible, label:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
img { display: block; }
[hidden] { display: none !important; }

/* --- Schrift --- */
.mono { font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.mono-s { font: 500 11px/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.display { margin: 0; font: italic 800 clamp(32px, 10vw, 44px)/0.92 var(--sans); font-stretch: 112%; text-transform: uppercase; letter-spacing: -0.015em; }
.display-l { font-size: clamp(34px, 11vw, 48px); }
.h1 { margin: 0; font: 700 30px/1.1 var(--sans); letter-spacing: -0.01em; }
.h2 { margin: 0; font: 700 22px/1.15 var(--sans); }
.h3 { margin: 0; font: 700 20px/1.15 var(--sans); }
.p { margin: 0; font: 400 15px/1.5 var(--sans); color: var(--text2); }
.p-s { margin: 0; font: 400 14px/1.5 var(--sans); color: var(--text2); }
.hint { font: 400 13px/1.4 var(--sans); color: var(--muted); }
.err { font: 500 14px/1.3 var(--sans); color: var(--red); }
.ok-text { font: 600 12px/1.4 var(--mono); letter-spacing: .04em; color: var(--green); }
.num { font-stretch: 88%; font-variant-numeric: tabular-nums; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* --- Logo --- */
.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark { border-radius: 9px; background: var(--ink); display: flex; align-items: center; justify-content: center; gap: 1px; flex: none; width: 32px; height: 32px; }
.logo-mark span:first-child { font: italic 900 19px/1 var(--sans); color: var(--paper); letter-spacing: -0.04em; margin-top: -2px; }
.logo-mark span:last-child { width: 4px; height: 4px; background: var(--orange); border-radius: 1px; align-self: flex-end; margin-bottom: 10px; }
.logo-mark.xl { width: 72px; height: 72px; border-radius: 16px; }
.logo-mark.xl span:first-child { font-size: 42px; margin-top: -3px; }
.logo-mark.xl span:last-child { width: 9px; height: 9px; border-radius: 2px; margin-bottom: 21px; }
.logo-mark.inv { background: var(--paper); }
.logo-mark.inv span:first-child { color: var(--ink); }
.logo-word { display: flex; align-items: baseline; gap: 2px; }
.logo-word b { font: italic 800 19px/1 var(--sans); font-stretch: 112%; letter-spacing: -0.015em; }
.logo-word i { width: 5px; height: 5px; background: var(--orange); border-radius: 1px; }
.logo-word b + i + b { color: var(--muted); }

/* --- Rahmen --- */
.wrap { max-width: 560px; margin: 0 auto; padding: 20px 20px 120px; display: flex; flex-direction: column; gap: 14px; }
.wrap-wide { max-width: 900px; margin: 0 auto; padding: 24px 20px 80px; display: flex; flex-direction: column; gap: 16px; }
.center-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-wrap { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }

.card { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.card.pad-l { padding: 22px; }
.card.list { padding: 6px 20px; gap: 0; }
.card-dark { background: var(--ink); border-radius: 20px; padding: 22px; display: flex; flex-direction: column; gap: 16px; color: var(--paper); min-width: 0; overflow: hidden; }
.card-soft { background: var(--soft); border-radius: 20px; padding: 20px; font: 400 15px/1.5 var(--sans); color: var(--text2); }
.card-dark .on-dark { font: 400 15px/1.4 var(--sans); color: var(--on-dark); }
.card-dark .on-dark b { color: var(--paper); }
.explain { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; font: 400 14px/1.5 var(--sans); color: var(--on-dark); }
.explain b { color: var(--paper); }

.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--soft); }
.list-row:last-child { border-bottom: 0; }

/* --- Knöpfe --- */
.btn { height: 48px; padding: 0 18px; border: 0; border-radius: 10px; font: 600 15px/1 var(--sans); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; color: var(--ink); background: transparent; white-space: nowrap; text-decoration: none; }
.btn img { width: 18px; height: 18px; flex: none; }
.btn-s { height: 44px; padding: 0 16px; font-size: 14px; }
.btn-xs { height: 40px; padding: 0 14px; font-size: 14px; }
.btn-orange { background: var(--orange); }
.btn-orange:hover { background: var(--orange-h); }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { background: var(--ink-h); }
.btn-dark img { filter: invert(1); }
.btn-line { border: 1.5px solid var(--ink); background: var(--white); }
.btn-line2 { border: 1.5px solid var(--line2); }
.btn-line2:hover { border-color: var(--ink); }
.btn-ghost { font-weight: 500; color: var(--text2); }
.btn-ghost:hover { background: var(--soft); }
.btn-danger { color: var(--red); }
.btn-danger:hover { background: var(--red-soft); }
.btn-danger-line { border: 1.5px solid var(--red); color: var(--red); }
.btn-danger-line:hover { background: var(--red-soft); }
.btn-big { height: 60px; border-radius: 14px; font: italic 800 18px/1 var(--sans); font-stretch: 112%; text-transform: uppercase; }
.btn-cta { height: 52px; padding: 0 22px; border-radius: 12px; font: italic 800 16px/1 var(--sans); font-stretch: 112%; text-transform: uppercase; }
.btn-dashed { height: 52px; border: 1.5px dashed var(--line2); border-radius: 14px; background: transparent; font: 600 15px/1 var(--sans); width: 100%; }
.btn-dashed:hover { border-color: var(--ink); background: var(--white); }
.self-start { align-self: flex-start; }
.icon-btn { width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; padding: 0; }
.icon-btn:hover { background: var(--soft); }
.icon-btn img { width: 18px; height: 18px; opacity: .6; }
.icon-btn.soft { background: var(--soft); }
.icon-btn.soft img { opacity: 1; }
.icon-btn.del:hover { background: var(--red-soft); }
.linkish { border: 0; background: none; padding: 4px 0; font: 500 13px/1 var(--sans); color: var(--red); cursor: pointer; }

.chip { height: 34px; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--white); font: 500 13px/1 var(--sans); cursor: pointer; white-space: nowrap; }
.chip.sel { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip-s { height: 36px; font-size: 14px; padding: 0 14px; }
.tag { font: 600 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 6px 8px; border-radius: 6px; white-space: nowrap; display: inline-block; }
.tag-orange { background: var(--orange); color: var(--ink); }
.tag-peach { background: var(--peach); color: var(--rust); }
.tag-soft { background: var(--soft); color: var(--text2); }
.tag-green { background: var(--green-soft); color: var(--green); }
.tag-gold { background: var(--gold-soft); color: var(--gold); }

/* --- Eingaben --- */
.input { height: 48px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--white); font-size: 16px; color: var(--ink); width: 100%; min-width: 0; }
.input-l { height: 52px; padding: 0 16px; border-radius: 12px; font-size: 17px; }
.input-s { height: 44px; padding: 0 12px; }
.input-num { font: 700 18px/1 var(--sans); }
textarea.input { height: auto; padding: 12px 14px; font: 400 15px/1.5 var(--sans); resize: vertical; }
textarea.input.mono-in { font: 400 14px/1.5 var(--mono); }
select.input { padding: 0 10px; font-size: 15px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span:first-child { font: 500 11px/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.search { position: relative; display: flex; align-items: center; flex: 1 1 220px; min-width: 0; }
.search .input { padding-right: 48px; height: 46px; }
.search .icon-btn { position: absolute; right: 4px; width: 38px; height: 38px; border-radius: 8px; background: var(--soft); }

.seg { display: flex; gap: 2px; padding: 4px; border-radius: 10px; background: var(--soft); }
.seg button { flex: 1; height: 40px; border: 0; border-radius: 7px; background: transparent; font: 500 14px/1 var(--sans); cursor: pointer; }
.seg button.sel { background: var(--white); font-weight: 600; box-shadow: 0 1px 2px rgba(21, 21, 19, .08); }

.switch-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 0; border-radius: 12px; background: var(--soft); text-align: left; cursor: pointer; width: 100%; }
.switch { width: 48px; height: 28px; border-radius: 999px; background: var(--line2); padding: 3px; display: flex; justify-content: flex-start; flex: none; transition: background .2s; }
.switch::after { content: ''; width: 22px; height: 22px; border-radius: 50%; background: var(--white); box-shadow: 0 1px 2px rgba(21, 21, 19, .2); }
.switch.on { background: var(--orange); justify-content: flex-end; }
.check-box { width: 26px; height: 26px; border-radius: 7px; border: 1.5px solid var(--line); background: var(--white); display: flex; align-items: center; justify-content: center; flex: none; }
.check-box img { width: 16px; height: 16px; filter: invert(1); opacity: 0; }
.check-box.on { background: var(--ink); border-color: var(--ink); }
.check-box.on img { opacity: 1; }

/* --- Kopfzeile, Tabs --- */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(246, 245, 242, .94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.topbar-in { max-width: 560px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 10px; }
.who-chip { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px 0 4px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--white); cursor: pointer; max-width: 200px; }
.who-chip:hover { border-color: var(--line2); }
.who-chip span:last-child { font: 600 14px/1 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar { border-radius: 50%; background: var(--ink); color: var(--paper); display: flex; align-items: center; justify-content: center; font: italic 900 14px/1 var(--sans); flex: none; width: 30px; height: 30px; }
.avatar.m { width: 40px; height: 40px; font-size: 18px; }
.avatar.l { width: 52px; height: 52px; font-size: 24px; }
.offline-bar { background: var(--gold-soft); color: var(--gold); font: 500 13px/1.3 var(--sans); text-align: center; padding: 8px 16px; }

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; background: var(--white); border-top: 1px solid var(--line); }
.tabbar-in { max-width: 560px; margin: 0 auto; display: flex; justify-content: space-around; padding: 8px 8px calc(14px + env(safe-area-inset-bottom)); }
.tab { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 96px; min-height: 48px; padding: 6px 8px; border: 0; background: transparent; cursor: pointer; opacity: .45; font: 600 12px/1 var(--sans); }
.tab img { width: 24px; height: 24px; }
.tab::before { content: ''; position: absolute; top: -9px; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: transparent; }
.tab.sel { opacity: 1; }
.tab.sel::before { background: var(--orange); }

/* --- Startseite --- */
.segs { display: flex; gap: 4px; }
.segs span { flex: 1; height: 10px; border-radius: 2px; background: var(--dark3); }
.segs span.on { background: var(--orange); }
.segs.light span { background: var(--line); }
.segs.light span.on { background: var(--orange); }
.segs.light span.done { background: var(--ink); }
.segs.week { gap: 6px; }
.segs.week span { height: 14px; border-radius: 3px; background: var(--line); }
.segs.week span.on { background: var(--ink); }
.segs.week span.extra { background: var(--orange); }
.segs.thin { gap: 3px; padding: 6px 0 8px; }
.lvl-title { margin: 0; font: italic 800 clamp(24px, 9vw, 52px)/0.92 var(--sans); font-stretch: 112%; text-transform: uppercase; letter-spacing: -0.015em; color: var(--paper); white-space: nowrap; }
.reward-line { display: flex; align-items: center; gap: 12px; padding-top: 14px; border-top: 1px solid var(--darkline); }
.reward-line .ico { width: 36px; height: 36px; border-radius: 10px; background: var(--dark2); display: flex; align-items: center; justify-content: center; flex: none; }
.reward-line .ico img { width: 18px; height: 18px; filter: invert(1); }
.resume { background: var(--orange); border: 0; border-radius: 20px; padding: 20px; display: flex; align-items: center; gap: 16px; text-align: left; cursor: pointer; width: 100%; }
.resume:hover { background: var(--orange-h); }
.round { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; }
.round img { width: 20px; height: 20px; }
.round.dark { background: var(--ink); width: 48px; height: 48px; }
.round.dark img { filter: invert(1); width: 22px; height: 22px; }
.round.orange { background: var(--orange); }
.plan-card { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 18px 18px 18px 20px; display: flex; align-items: center; gap: 14px; text-align: left; cursor: pointer; width: 100%; }
.plan-card:hover { border-color: var(--ink); }
.plan-card .name { font: 700 20px/1.15 var(--sans); letter-spacing: -0.01em; }
.plan-card .meta { font: 400 14px/1.3 var(--sans); color: var(--text2); }
.plan-wrap { display: flex; align-items: stretch; gap: 8px; }
.plan-wrap .plan-card { flex: 1; min-width: 0; }
.plan-edit { width: 52px; border: 1px solid var(--line); border-radius: 20px; background: var(--white); display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.plan-edit img { width: 18px; height: 18px; opacity: .55; }
.plan-edit:hover { border-color: var(--ink); }

/* --- Profilwahl --- */
.who-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.who-card { background: var(--white); border: 1.5px solid var(--line); border-radius: 20px; padding: 20px; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 14px; }
.who-card:hover, .who-card.sel { border-color: var(--ink); }
.who-card .nm { font: 700 18px/1.2 var(--sans); }

/* --- Training --- */
.tr-head { display: flex; align-items: center; gap: 10px; }
.tr-back { width: 44px; height: 44px; border-radius: 10px; border: 0; background: var(--soft); display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.tr-back:hover { background: var(--line); }
.tr-back img { width: 22px; height: 22px; }
.tr-item { background: var(--white); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.tr-item.next { border: 2px solid var(--orange); }
.tr-top { display: flex; align-items: center; gap: 12px; padding: 10px; }
.tr-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; border: 0; background: transparent; padding: 0; text-align: left; cursor: pointer; }
.thumb { width: 60px; height: 60px; border-radius: 14px; background: var(--soft); display: flex; align-items: center; justify-content: center; flex: none; overflow: hidden; }
.thumb img { width: 48px; height: 48px; object-fit: contain; }
.thumb.m { width: 48px; height: 48px; border-radius: 10px; }
.thumb.m img { width: 40px; height: 40px; }
.thumb.s { width: 44px; height: 44px; border-radius: 10px; }
.thumb.s img { width: 36px; height: 36px; }
.thumb.xs { width: 40px; height: 40px; border-radius: 9px; }
.thumb.xs img { width: 32px; height: 32px; }
.thumb.xl { width: 104px; height: 104px; border-radius: 20px; }
.thumb.xl img { width: 88px; height: 88px; }
.tr-name { font: 600 16px/1.25 var(--sans); }
.tr-name.done { color: var(--text2); }
.tr-amt { font: 700 15px/1 var(--sans); font-stretch: 88%; font-variant-numeric: tabular-nums; }
.tr-pts { font: 600 11px/1 var(--mono); letter-spacing: .04em; color: var(--muted); }
.tr-pts.done { color: var(--green); }
.tr-check { width: 56px; height: 56px; border-radius: 14px; border: 1.5px solid var(--line2); background: var(--white); display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none; transition: all .15s; }
.tr-check img { width: 26px; height: 26px; opacity: .3; }
.tr-check.on { background: var(--ink); border-color: var(--ink); }
.tr-check.on img { filter: invert(1); opacity: 1; }
.tr-detail { padding: 4px 14px 16px; display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--soft); }
.stepper { display: grid; grid-template-columns: 44px minmax(72px, 1fr) 44px; align-items: center; height: 52px; border-radius: 12px; background: var(--soft); padding: 4px; min-width: 200px; }
.stepper button { height: 44px; border: 0; border-radius: 9px; background: transparent; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.stepper button:hover { background: var(--line); }
.stepper button img { width: 18px; height: 18px; }
.stepper span { text-align: center; font: 700 20px/1 var(--sans); font-stretch: 88%; font-variant-numeric: tabular-nums; }
.bottom-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(246, 245, 242, 0), var(--paper) 30%); }
.bottom-bar-in { max-width: 528px; margin: 0 auto; background: var(--ink); border-radius: 20px; padding: 12px 12px 12px 20px; display: flex; align-items: center; gap: 14px; color: var(--paper); }
.big-pts { font: 700 30px/1 var(--sans); font-stretch: 88%; font-variant-numeric: tabular-nums; }

/* --- Abschluss --- */
.done-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 16px 0 12px; }
.done-num { font: 700 clamp(64px, 24vw, 112px)/0.9 var(--sans); font-stretch: 88%; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.pts-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--soft); }
.pts-row:last-child { border-bottom: 0; }
.pts-row span:first-child { display: flex; align-items: center; gap: 10px; font: 500 15px/1.3 var(--sans); }
.pts-row img { width: 18px; height: 18px; }
.pts-row span:last-child { font: 700 17px/1 var(--sans); font-stretch: 88%; font-variant-numeric: tabular-nums; }
.badge-big { width: 52px; height: 52px; border-radius: 50%; background: var(--orange); display: flex; align-items: center; justify-content: center; flex: none; }
.badge-big img { width: 24px; height: 24px; }

/* --- Fortschritt --- */
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stat { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.stat b { font: 700 34px/1 var(--sans); font-stretch: 88%; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.badge-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 8px; }
.badge { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.badge .b-ico { width: 56px; height: 56px; border-radius: 50%; background: var(--soft); display: flex; align-items: center; justify-content: center; }
.badge .b-ico img { width: 24px; height: 24px; opacity: .3; }
.badge.ok .b-ico { background: var(--orange); }
.badge.ok .b-ico img { opacity: 1; }
.badge .b-name { font: 600 12px/1.2 var(--sans); color: var(--muted); }
.badge.ok .b-name { color: var(--ink); }
.badge .b-hint { font: 400 11px/1.25 var(--sans); color: var(--muted); }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 150px; }
.bar { flex: 1; min-width: 0; max-width: 56px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.bar i { width: 100%; background: var(--ink); border-radius: 4px; min-height: 4px; display: block; }
.bar.last i { background: var(--orange); }
.bar small { font: 600 10px/1 var(--mono); color: var(--text2); }
.bar small:last-child { font-weight: 500; color: var(--muted); }
.kv { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--soft); }
.kv:last-child { border-bottom: 0; }
.kv > span:first-child { font: 500 15px/1.3 var(--sans); }
.kv b { font: 700 16px/1 var(--sans); font-stretch: 88%; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kv .sub { display: block; font: 500 11px/1 var(--mono); color: var(--muted); margin-top: 4px; }
.pending { font: 600 10px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--gold); }

/* --- Admin --- */
.admin-top { background: var(--ink); color: var(--paper); position: sticky; top: 0; z-index: 20; padding-top: env(safe-area-inset-top); }
.admin-top-in { max-width: 900px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 12px; }
.admin-title { font: italic 800 20px/1 var(--sans); font-stretch: 112%; text-transform: uppercase; }
.admin-tabs { max-width: 900px; margin: 0 auto; padding: 0 12px; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.admin-tabs button { position: relative; height: 46px; padding: 0 14px; border: 0; background: transparent; color: var(--muted); font: 600 14px/1 var(--sans); cursor: pointer; white-space: nowrap; border-bottom: 3px solid transparent; }
.admin-tabs button.sel { color: var(--paper); border-bottom-color: var(--orange); }
.ex-tile { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 10px; display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer; min-width: 0; }
.ex-tile:hover { border-color: var(--ink); }
.ex-tile .nm { font: 600 15px/1.2 var(--sans); }
.ex-tile .meta { font: 400 12px/1.3 var(--sans); color: var(--muted); }
.example { background: var(--soft); border-radius: 10px; padding: 12px 14px; font: 500 12px/1.6 var(--mono); color: var(--text2); overflow-x: auto; white-space: nowrap; }
.imp-table { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.imp-row { display: grid; grid-template-columns: 28px minmax(0, 2fr) minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--soft); cursor: pointer; font: 400 14px/1.3 var(--sans); }
.imp-row:last-child { border-bottom: 0; }
.imp-row input { width: 20px; height: 20px; accent-color: var(--ink); }
.icon-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) minmax(0, 1.4fr); gap: 12px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--soft); }
.drop { border: 1.5px dashed var(--line2); border-radius: 14px; padding: 28px; display: flex; flex-direction: column; align-items: center; gap: 10px; cursor: pointer; text-align: center; }
.drop:hover { border-color: var(--ink); background: var(--paper); }
.drop img { width: 32px; height: 32px; opacity: .6; }
.lvl-chip { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 10px; background: var(--soft); min-width: 96px; }
.lvl-chip b { font: 700 14px/1 var(--sans); }
.lvl-chip span { font: 500 11px/1 var(--mono); color: var(--text2); }
.set-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.person { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--soft); cursor: pointer; width: 100%; border-left: 0; border-right: 0; border-top: 0; background: transparent; text-align: left; }
.person:last-child { border-bottom: 0; }
.person:hover .nm { text-decoration: underline; }
.person .nm { font: 600 16px/1.2 var(--sans); }
.person .meta { font: 400 13px/1.3 var(--sans); color: var(--muted); }
.group-head { display: flex; align-items: center; gap: 10px; padding: 16px 0 6px; }
.file-label { position: relative; overflow: hidden; }
.file-label input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* --- Fenster --- */
.modal-back { position: fixed; inset: 0; z-index: 50; background: rgba(21, 21, 19, .55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-back.bottom { align-items: flex-end; }
.modal { width: 100%; max-width: 600px; max-height: 92vh; overflow-y: auto; background: var(--white); border-radius: 24px; padding: 24px; display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 16px; }
.modal.narrow { max-width: 380px; }
.modal.flexcol { display: flex; flex-direction: column; gap: 10px; overflow: hidden; padding: 20px; max-width: 560px; }
.modal-title { margin: 0; font: italic 800 clamp(24px, 8vw, 32px)/0.95 var(--sans); font-stretch: 112%; text-transform: uppercase; }
.pick-list { flex: 1 1 auto; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; min-height: 120px; }
.pick-item { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; border: 1.5px solid var(--soft); background: var(--white); cursor: pointer; text-align: left; }
.pick-item.sel { border-color: var(--ink); }
.pick-item .nm { font: 600 15px/1.2 var(--sans); }
.pick-item .meta { font: 400 12px/1.2 var(--sans); color: var(--muted); }
.pick-sel { height: 32px; padding: 0 8px 0 12px; border-radius: 999px; border: 0; background: var(--ink); color: var(--paper); font: 500 13px/1 var(--sans); display: flex; align-items: center; gap: 6px; cursor: pointer; }
.pick-sel img { width: 14px; height: 14px; filter: invert(1); }
.group-opt { height: 56px; padding: 0 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--white); display: flex; align-items: center; gap: 12px; cursor: pointer; text-align: left; width: 100%; font: 600 16px/1 var(--sans); }
.group-opt.sel { border-color: var(--ink); background: var(--paper); }
.sym-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
.sym-grid button { aspect-ratio: 1; border-radius: 10px; border: 1.5px solid var(--soft); background: var(--paper); display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 4px; }
.sym-grid button.sel { border-color: var(--ink); }
.sym-grid img { width: 100%; height: 100%; }
.pl-entry { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--soft); }
.pl-entry .n { font: 600 12px/1 var(--mono); color: var(--muted); width: 22px; text-align: right; flex: none; }
.pl-entry .nm { flex: 1; min-width: 0; font: 500 14px/1.25 var(--sans); overflow: hidden; text-overflow: ellipsis; }
.pl-entry input { width: 70px; height: 40px; padding: 0 8px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--white); font: 700 15px/1 var(--sans); text-align: right; flex: none; }
.pl-entry .u { font: 500 12px/1 var(--sans); color: var(--muted); width: 30px; flex: none; }
.pl-entry .icon-btn { width: 32px; height: 36px; border-radius: 8px; }
.pl-entry .icon-btn img { width: 16px; height: 16px; }
.pl-hit { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border: 1px solid var(--soft); border-radius: 10px; background: var(--paper); cursor: pointer; text-align: left; width: 100%; }
.pl-hit:hover { border-color: var(--ink); }
.pl-hit img { width: 28px; height: 28px; }
.pl-hit img:last-child { width: 18px; height: 18px; }

.toast-wrap { position: fixed; left: 16px; right: 16px; bottom: 110px; z-index: 60; display: flex; justify-content: center; pointer-events: none; }
.toast { max-width: 460px; background: var(--ink); color: var(--paper); border-radius: 14px; padding: 14px 18px; font: 500 15px/1.35 var(--sans); box-shadow: 0 18px 44px -14px rgba(21, 21, 19, .32); }

.loading { min-height: 100vh; display: flex; align-items: center; justify-content: center; }

@media (max-width: 420px) {
  .imp-row { grid-template-columns: 24px minmax(0, 1fr) auto; }
  .imp-row > span:nth-child(3), .imp-row > span:nth-child(4) { display: none; }
  .icon-row { grid-template-columns: 52px minmax(0, 1fr); }
  .icon-row select { grid-column: 1 / -1; }
}
