:root {
  --bg: #0E0F13; --card: #181A21; --card2: #22252E; --line: #2C2F3A; --line2: #3A3E4B;
  --text: #F4F4F0; --muted: #A3A6B4; --soft: #C9CBD4;
  --lime: #C8F04A; --lime-dk: #1A1F10; --lime-tx: #2A3313;
  --hot: #FF7A59; --hot-tx: #FF9B80; --hot-dk: #1F1714;
  --r: 18px;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); }
body { font: 15px/1.4 Inter, system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
body.busy { cursor: progress; }
body.busy button { pointer-events: none; opacity: .85; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--lime); }
.ic { flex-shrink: 0; vertical-align: middle; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
code { background: var(--card2); padding: 1px 5px; border-radius: 6px; font-size: 12px; }

#app { max-width: 560px; margin: 0 auto; height: 100%; }
.splash { height: 100%; display: flex; align-items: center; justify-content: center; }
.page { min-height: 100%; padding: calc(24px + var(--safe-t)) 18px calc(32px + var(--safe-b)); display: flex; flex-direction: column; gap: 18px; }
.pad-top { padding-top: calc(44px + var(--safe-t)); }

/* Typo */
.logo { display: flex; align-items: center; gap: 10px; font: 800 19px 'Bricolage Grotesque', sans-serif; letter-spacing: .03em; }
.logo-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--lime); color: var(--bg); display: flex; align-items: center; justify-content: center; }
.hero { font: 800 38px/1.03 'Bricolage Grotesque', sans-serif; margin: 6px 0 0; }
.h1 { font: 800 28px/1.08 'Bricolage Grotesque', sans-serif; margin: 0; }
.h2 { font: 800 22px/1.1 'Bricolage Grotesque', sans-serif; margin: 0; }
.h3 { font: 800 19px/1.2 'Bricolage Grotesque', sans-serif; margin: 6px 0 0; display: flex; align-items: center; gap: 8px; }
.lead { font-size: 17px; color: #D8DAE2; margin: 0; }
.eyebrow { display: block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); } .sm { font-size: 13px; } .xs { font-size: 12px; } .lg { font-size: 16px; }
.b { font-weight: 700; } .lime { color: var(--lime); } .orange { color: var(--hot-tx); }
.center { text-align: center; align-items: center; } .nowrap { white-space: nowrap; } .upper { text-transform: uppercase; letter-spacing: .08em; }
.bignum { font: 800 40px/1 'Bricolage Grotesque', sans-serif; margin: 4px 0; }
.pts { font: 800 17px 'Bricolage Grotesque', sans-serif; white-space: nowrap; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.demo { font-size: 12px; color: var(--hot-tx); background: var(--hot-dk); border: 1px solid var(--hot); border-radius: 12px; padding: 8px 12px; }

/* Layout */
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack-s { display: flex; flex-direction: column; gap: 8px; }
.stack-xs { display: flex; flex-direction: column; gap: 4px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; } .row.end { align-items: flex-end; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.w100 { width: 100%; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips.scroll::-webkit-scrollbar { display: none; }

/* Karten */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.card.center { display: flex; flex-direction: column; align-items: center; }
.card.list { padding: 4px 16px; display: flex; flex-direction: column; }
.list .eyebrow.pad { padding: 10px 0 6px; }
.li { display: flex; align-items: center; gap: 12px; min-height: 54px; border-top: 1px solid var(--card2); font-size: 14px; }
.list .eyebrow + .li, .card.list > .li:first-child { border-top: 0; }
.btnli { width: 100%; background: none; border: 0; border-top: 1px solid var(--card2); padding: 8px 0; text-align: left; cursor: pointer; }
.btnli.lime { color: var(--lime); font-weight: 600; }
.row-btn { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer; color: var(--text); }
.task { width: 100%; display: flex; flex-direction: column; gap: 8px; text-align: left; cursor: pointer; color: var(--text); }
.task.bonus, .card.bonus { border-color: var(--hot); background: var(--hot-dk); }
.task.custom { border-color: var(--lime); }
.task.faded { opacity: .6; }
.bolt { width: 44px; height: 44px; border-radius: 14px; background: var(--hot); color: var(--bg); display: flex; align-items: center; justify-content: center; }
.note { background: var(--card2); color: var(--soft); border-radius: 14px; padding: 12px 14px; font-size: 13px; display: flex; gap: 8px; align-items: center; }
.warn { border: 1px dashed var(--hot); color: var(--hot-tx); border-radius: 14px; padding: 12px 14px; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.stat { background: var(--card2); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; text-align: left; }
.stat b { font: 800 21px 'Bricolage Grotesque', sans-serif; }
.stat span { font-size: 12px; color: var(--muted); }
.code { min-height: 64px; border: 1.5px dashed var(--line2); border-radius: 14px; display: flex; align-items: center; justify-content: center; font: 800 30px 'Bricolage Grotesque', sans-serif; letter-spacing: .14em; }
.king { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; background: var(--hot-dk); border: 1px solid var(--hot); color: var(--hot); }
.king span { display: flex; flex-direction: column; color: var(--text); }

/* Kleinteile */
.tag { padding: 4px 10px; border-radius: 999px; background: var(--card2); font-size: 12px; font-weight: 600; white-space: nowrap; }
.tag.hot { background: var(--hot); color: var(--bg); font-weight: 700; }
.badge { min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: var(--lime); color: var(--bg); font: 700 13px Inter, sans-serif; display: inline-flex; align-items: center; justify-content: center; }
.pill { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.p-open { background: var(--card2); color: var(--soft); } .p-pend { background: var(--lime-tx); color: var(--lime); }
.p-done { background: var(--lime); color: var(--bg); } .p-rej { background: var(--card2); color: var(--hot-tx); } .p-skip { background: var(--card2); color: var(--muted); }
.kind { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--card2); }
.k-group { color: var(--lime); } .k-bonus { background: var(--hot); color: var(--bg); } .k-custom { border: 1px solid var(--lime); color: var(--lime); background: none; }
.av { width: 42px; height: 42px; flex-shrink: 0; border-radius: 50%; background: var(--card2); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.av.me { background: var(--lime); color: var(--bg); }
.av.xl { width: 80px; height: 80px; font: 800 28px 'Bricolage Grotesque', sans-serif; }
.bar { height: 8px; border-radius: 999px; background: var(--card2); overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: 999px; background: var(--lime); }
.bar span.grey { background: #7C8090; }
.slot { padding: 5px 10px; border-radius: 10px; background: var(--card2); color: var(--soft); font-size: 13px; font-weight: 600; }
.slot.done { background: var(--lime); color: var(--bg); }
.crew { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; }
.crew-p { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 56px; }
.rankbtn { border: 0; background: none; text-align: right; display: flex; flex-direction: column; align-items: flex-end; cursor: pointer; padding: 0; }
.rankbtn b { font: 800 32px/1 'Bricolage Grotesque', sans-serif; }
.round { padding: 10px 0; border-top: 1px solid var(--card2); display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.round.cur { background: var(--lime-dk); margin: 0 -16px; padding: 12px 16px; border-top-color: var(--lime); }

/* Buttons */
.btn { min-height: 48px; padding: 0 16px; border-radius: 14px; border: 1px solid transparent; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn.big { min-height: 56px; font-size: 16px; width: 100%; }
.btn.sm { min-height: 40px; padding: 0 12px; font-size: 13px; }
.btn.primary { background: var(--lime); color: var(--bg); }
.btn.hot { background: var(--hot); color: var(--bg); }
.btn.outline { background: none; border-color: var(--line); color: var(--text); font-weight: 600; }
.btn.ghost { background: var(--card2); color: var(--text); }
.btn.dashed { background: none; border: 1.5px dashed var(--lime); color: var(--lime); }
.btn.link { background: none; min-height: 44px; padding: 0 4px; color: var(--lime); font-weight: 600; }
.btn.danger { background: var(--hot); color: var(--bg); }
.danger-t { color: var(--hot-tx) !important; }
.icbtn { width: 44px; height: 44px; flex-shrink: 0; border-radius: 14px; border: 0; background: var(--card); color: var(--text); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.icbtn.on { background: var(--lime); color: var(--bg); }

/* Formulare */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.field > span em { font-style: normal; font-weight: 500; }
input, select, textarea { width: 100%; min-height: 48px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); font-size: 16px; font-weight: 400; }
textarea { padding: 12px 14px; resize: vertical; }
.card input, .card select, .card textarea { background: var(--bg); }
.page > form input, .stack > form input { background: var(--card); }
input[type=date] { padding: 0 10px; }
.segs { display: flex; gap: 6px; }
.segs.four { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rb, .cb { position: relative; flex: 1; }
.rb input, .cb input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.rb span { min-height: 44px; padding: 0 6px; border-radius: 12px; background: var(--card2); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; text-align: center; cursor: pointer; }
.rb input:checked + span { background: var(--lime); color: var(--bg); }
.rb input:focus-visible + span, .cb input:focus-visible + span { outline: 2px solid var(--lime); outline-offset: 2px; }
.cb { flex: 0 0 auto; }
.cb span { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line2); display: flex; align-items: center; font-size: 14px; font-weight: 600; cursor: pointer; }
.cb input:checked + span { background: var(--lime); border-color: var(--lime); color: var(--bg); }
.seg2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--card); padding: 4px; border-radius: 14px; }
.card .seg2 { background: var(--bg); }
.seg2.sm { width: 180px; }
.segb { min-height: 40px; border: 0; border-radius: 10px; background: none; color: var(--soft); font-weight: 600; cursor: pointer; }
.segb.on { background: var(--lime); color: var(--bg); }
.toggle { cursor: pointer; }
.toggle input { position: absolute; opacity: 0; width: 1px; min-height: 0; }
.toggle i { width: 50px; height: 30px; flex-shrink: 0; border-radius: 999px; background: var(--line2); position: relative; transition: background .2s; }
.toggle i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--soft); transition: transform .2s; }
.toggle input:checked + i { background: var(--lime); }
.toggle input:checked + i::after { transform: translateX(20px); background: var(--bg); }
.toggle .grow b { font-size: 15px; }

/* Ein-/Ausblenden je nach Auswahl */
.newchal .only-person, .newchal .only-hourly { display: none; }
.newchal:has(input[name=who][value=person]:checked) .only-person { display: flex; }
.newchal:has(input[name=rep][value=hourly]:checked) .only-hourly { display: grid; }
.newchal:has(input[name=rep][value=hourly]:checked) .field.only-hourly { display: flex; }
.newchal:has(input[name=rep][value=hourly]:checked) .no-hourly { display: none; }
.newchal:has(input[name=rep][value=daily]:checked) .no-daily { display: none; }
.dayform .only-hourly-d { display: none; }
.dayform:has(input[name=mode][value=hourly]:checked) .only-hourly-d { display: flex; }
.dayform:has(input[name=mode][value=hourly]:checked) .only-count { display: none; }

/* Tabs & Chips */
.tabs4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; background: var(--card); padding: 5px; border-radius: 16px; }
.tabb { min-height: 52px; border: 0; border-radius: 12px; background: none; color: var(--soft); font-size: 13px; font-weight: 700; white-space: nowrap; cursor: pointer; padding: 0 2px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.tabb small { font-size: 11px; font-weight: 600; opacity: .8; }
.tabb.on { background: var(--lime); color: var(--bg); } .tabb.on.hot { background: var(--hot); }
.chip { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line2); background: none; font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.chip.on { background: var(--lime); border-color: var(--lime); color: var(--bg); }
.tripchip, .daychip { flex-shrink: 0; min-width: 120px; min-height: 64px; padding: 10px 12px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); display: flex; flex-direction: column; align-items: flex-start; gap: 1px; cursor: pointer; text-align: left; }
.daychip { min-width: 92px; background: var(--card2); }
.tripchip span, .daychip span { font-size: 12px; color: var(--muted); font-weight: 600; }
.tripchip.on, .daychip.on { background: var(--lime); border-color: var(--lime); color: var(--bg); }
.tripchip.on span, .daychip.on span { color: var(--lime-tx); }
.nearb { display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 84px; justify-content: center; cursor: pointer; color: var(--text); padding: 10px 6px; }
.nearb .ic { color: var(--lime); }

/* Ranking */
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-items: end; }
.pod { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--lime); }
.pod b.sm { color: var(--text); }
.pod-b { width: 100%; border-radius: 14px 14px 6px 6px; background: var(--card2); color: var(--text); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.pod-b b { font: 800 26px 'Bricolage Grotesque', sans-serif; } .pod-b span { font-size: 12px; color: var(--muted); }
.p1 .pod-b { height: 118px; background: var(--lime); color: var(--bg); } .p1 .pod-b span { color: var(--lime-tx); font-weight: 700; }
.p2 .pod-b { height: 88px; } .p3 .pod-b { height: 68px; }
.rankrow { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.rankrow.me { background: var(--lime-dk); border-color: var(--lime); }
.rk { width: 22px; text-align: center; font: 800 18px 'Bricolage Grotesque', sans-serif; }

/* App-Rahmen */
.shell { height: 100%; display: flex; flex-direction: column; position: relative; }
.hdr { display: flex; align-items: center; gap: 10px; padding: calc(10px + var(--safe-t)) 14px 8px; }
.hdr-t { flex: 1; min-width: 0; border: 0; background: none; text-align: left; cursor: pointer; display: flex; flex-direction: column; padding: 0; }
.hdr-t b { font: 800 18px 'Bricolage Grotesque', sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hdr-t span { font-size: 12px; color: var(--muted); }
.main { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 6px 16px 96px; display: flex; flex-direction: column; gap: 14px; }
.nav { display: flex; gap: 2px; padding: 6px 8px calc(8px + var(--safe-b)); border-top: 1px solid var(--card2); background: var(--bg); }
.navb { flex: 1; min-height: 56px; border: 0; border-radius: 14px; background: none; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600; cursor: pointer; }
.navb.on { background: var(--lime-dk); color: var(--lime); }
.fab { position: absolute; right: 16px; bottom: calc(92px + var(--safe-b)); z-index: 4; width: 62px; height: 62px; border-radius: 50%; border: 0; background: var(--lime); color: var(--bg); display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 8px 24px rgba(0,0,0,.55); }
.fab-n { position: absolute; top: -4px; right: -4px; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 999px; background: var(--hot); color: var(--bg); font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; border: 2px solid var(--bg); }

/* Drink-Fenster */
.sheet-wrap { position: absolute; inset: 0; z-index: 6; display: flex; flex-direction: column; }
.sheet-bg { flex: 1; min-height: 40px; border: 0; background: rgba(0,0,0,.6); cursor: pointer; }
.sheet { max-height: 88%; overflow-y: auto; background: #14161C; border-top: 1px solid var(--line); border-radius: 28px 28px 0 0; padding: 10px 16px calc(24px + var(--safe-b)); display: flex; flex-direction: column; gap: 14px; }
.grab { align-self: center; width: 40px; height: 5px; border-radius: 999px; background: var(--line2); }
.drink { min-height: 104px; padding: 10px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; cursor: pointer; }
.drink b { font-size: 14px; line-height: 1.15; }
.drink.flash { border: 1.5px solid var(--lime); background: var(--lime-dk); }
.cnt { min-width: 26px; height: 26px; padding: 0 7px; border-radius: 999px; background: var(--card2); color: var(--muted); font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.cnt.on { background: var(--lime); color: var(--bg); }
.warnbox { border: 1.5px solid var(--hot); background: var(--hot-dk); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 12px; font-weight: 600; }
.warnbox > span { display: flex; gap: 10px; align-items: flex-start; } .warnbox .ic { color: var(--hot); }

/* Meldungen */
#toast { position: fixed; left: 50%; bottom: calc(110px + var(--safe-b)); transform: translate(-50%, 20px); z-index: 20; max-width: min(520px, calc(100% - 32px)); width: max-content; padding: 13px 16px; border-radius: 16px; background: var(--text); color: var(--bg); font-weight: 600; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.45); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#banner { position: fixed; left: 10px; right: 10px; top: calc(10px + var(--safe-t)); z-index: 21; max-width: 540px; margin: 0 auto; display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 20px; background: var(--text); color: var(--bg); box-shadow: 0 12px 32px rgba(0,0,0,.45); cursor: pointer; transform: translateY(-250%); opacity: 0; visibility: hidden; transition: transform .3s, opacity .3s, visibility .3s; }
#banner.show { transform: translateY(0); opacity: 1; visibility: visible; }
.bn-ic { width: 38px; height: 38px; border-radius: 10px; background: var(--bg); color: var(--lime); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.bn-tx { display: flex; flex-direction: column; font-size: 14px; }
