:root {
  --bg: #0a0a0b;
  --surface: #141416;
  --surface-2: #1d1d20;
  --line: #2a2a2e;
  --text: #eceef2;
  --muted: #8b919e;
  --accent: #e2bd84;
  --accent-ink: #1b140a;
  --yes: #3ecf8e;
  --no: #f06a6a;
  --maybe: #8aa4ff;
  --radius: 14px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); -webkit-text-size-adjust: 100%; }
body { font-size: 16px; line-height: 1.45; min-height: 100dvh; }
a { color: var(--accent); text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; }
.hidden { display: none !important; }

/* Layout */
.top {
  position: sticky; top: 0; z-index: 10;
  padding: calc(var(--safe-t) + 14px) 16px 12px;
  background: rgba(10,10,11,.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px;
}
.top h1 { font-size: 20px; font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top .band { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; display: block; }
main { padding: 16px 16px calc(96px + var(--safe-b)); max-width: 760px; margin: 0 auto; }

.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(16,16,18,.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line); padding-bottom: var(--safe-b);
}
.nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 0 9px; color: var(--muted); font-size: 11px; font-weight: 600; position: relative; }
.nav a svg { width: 24px; height: 24px; }
.nav a.active { color: var(--accent); }
.nav .badge { position: absolute; top: 5px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--no); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }

@media (min-width: 900px) {
  .nav { top: 0; bottom: 0; right: auto; width: 92px; grid-template-columns: 1fr; grid-auto-rows: min-content; padding-top: 24px; border-top: 0; border-right: 1px solid var(--line); }
  .nav a { padding: 14px 0; }
  .top, main { margin-left: 92px; }
  .top { padding-left: 32px; }
}

/* Elements */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stack > * + * { margin-top: 12px; }
.section-title { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; margin: 24px 2px 10px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.row { display: flex; align-items: center; gap: 10px; }
.spacer { flex: 1; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface-2); font-weight: 600; cursor: pointer; white-space: nowrap;
}
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.danger { color: var(--no); }
.btn.ghost { background: transparent; }
.btn.block { width: 100%; }
.btn.sm { height: 36px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.icon-btn svg { width: 20px; height: 20px; }
.fab { position: fixed; right: 18px; bottom: calc(84px + var(--safe-b)); z-index: 15; width: 58px; height: 58px; border-radius: 18px; border: 0; background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 30px rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.fab svg { width: 28px; height: 28px; }
@media (min-width: 900px) { .fab { bottom: 28px; right: 28px; } }

/* Forms */
label.field { display: block; }
label.field > span { display: block; font-size: 13px; color: var(--muted); font-weight: 600; margin: 0 2px 6px; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; min-height: 46px; outline: none; -webkit-appearance: none; appearance: none;
}
textarea { min-height: 90px; resize: vertical; }
select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
input[type=date], input[type=time] { color-scheme: dark; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.form-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.form-group > h3 { font-size: 14px; color: var(--accent); margin-bottom: 14px; font-weight: 700; }
.form-group > * + * { margin-top: 12px; }
.form-group > h3 + * { margin-top: 0; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 4px; gap: 4px; }
.seg button { height: 38px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 600; cursor: pointer; }
.seg button.on { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.seg button.on.yes { color: var(--yes); }
.seg button.on.no { color: var(--no); }
.error { color: var(--no); font-size: 14px; min-height: 1em; }

/* Calendar */
.cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.cal-head h2 { flex: 1; font-size: 22px; }
.cal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-dow { text-align: center; font-size: 11px; color: var(--muted); font-weight: 700; padding: 4px 0 8px; text-transform: uppercase; }
.cal-day { aspect-ratio: 1 / 1; border: 0; background: transparent; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; font-size: 15px; font-weight: 600; position: relative; }
.cal-day.other { color: #4a4f5a; }
.cal-day.today .num { color: var(--accent); }
.cal-day.sel { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.cal-day.has-gig .num { background: var(--accent); color: var(--accent-ink); }
.cal-day .num { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.cal-day .dots { display: flex; gap: 3px; height: 6px; }
.cal-day .dot { width: 6px; height: 6px; border-radius: 50%; }
.dot.gig { background: var(--accent); }
.dot.req { box-shadow: inset 0 0 0 1.5px var(--maybe); }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); padding: 10px 6px 2px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

/* Gig list items */
.item { display: flex; gap: 14px; align-items: stretch; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; cursor: pointer; color: var(--text); }
.item + .item { margin-top: 10px; }
.item:active { background: var(--surface-2); }
.datebox { flex: none; width: 54px; border-radius: 12px; background: var(--surface-2); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 6px 0; }
.datebox .d { font-size: 22px; font-weight: 800; line-height: 1; }
.datebox .m { font-size: 11px; text-transform: uppercase; color: var(--accent); font-weight: 700; letter-spacing: .06em; margin-top: 4px; }
.datebox.req .m { color: var(--maybe); }
.item .body { flex: 1; min-width: 0; }
.item .title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .meta { font-size: 14px; color: var(--muted); margin-top: 2px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.chip { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.chip.yes { color: var(--yes); border-color: rgba(62,207,142,.35); }
.chip.no { color: var(--no); border-color: rgba(240,106,106,.35); }
.chip.maybe { color: var(--maybe); border-color: rgba(138,164,255,.35); }
.chip.accent { color: var(--accent); border-color: rgba(226,189,132,.4); }
.empty { text-align: center; color: var(--muted); padding: 34px 16px; border: 1px dashed var(--line); border-radius: var(--radius); }

/* Detail */
.detail-hero { padding: 20px; }
.detail-hero .when { color: var(--accent); font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; }
.detail-hero h2 { font-size: 26px; margin-top: 6px; }
.timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.timeline div { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.timeline b { display: block; font-size: 20px; }
.timeline small { color: var(--muted); font-size: 12px; font-weight: 600; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 10px 14px; }
.kv dt { color: var(--muted); font-size: 14px; }
.kv dd { margin: 0; font-weight: 500; word-break: break-word; }
.vote-bar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.vote-bar button { height: 56px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; }
.vote-bar button.yes.on { background: rgba(62,207,142,.14); border-color: var(--yes); color: var(--yes); }
.vote-bar button.no.on { background: rgba(240,106,106,.14); border-color: var(--no); color: var(--no); }
.vote-bar button.maybe.on { background: rgba(138,164,255,.14); border-color: var(--maybe); color: var(--maybe); }
.member { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.member:last-child { border-bottom: 0; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex: none; }
.progress { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; display: flex; margin-top: 10px; }
.progress i { display: block; height: 100%; }

/* Tabs */
.tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 14px; scrollbar-width: none; }
.tabs button { flex: none; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-weight: 600; font-size: 14px; cursor: pointer; }
.tabs button.on { background: var(--text); color: var(--bg); border-color: var(--text); }

/* Songs */
.song { display: flex; gap: 12px; align-items: flex-start; }
.like { flex: none; width: 52px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); display: flex; flex-direction: column; align-items: center; padding: 8px 0; cursor: pointer; color: var(--muted); }
.like svg { width: 20px; height: 20px; }
.like b { font-size: 15px; }
.like.on { color: var(--accent); border-color: rgba(226,189,132,.5); }

/* Login */
.login { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login .box { width: 100%; max-width: 380px; }
.login .logo { width: 64px; height: 64px; border-radius: 18px; display: block; margin-bottom: 20px; }
.login h1 { font-size: 28px; margin-bottom: 4px; }

/* Sheet / dialogs */
.sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--surface); border: 1px solid var(--line); border-radius: 20px 20px 0 0; width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto; padding: 20px 16px calc(20px + var(--safe-b)); }
@media (min-width: 700px) { .sheet-bg { align-items: center; } .sheet { border-radius: 20px; } }

#toast { position: fixed; left: 50%; bottom: calc(96px + var(--safe-b)); transform: translateX(-50%) translateY(20px); background: var(--text); color: var(--bg); padding: 11px 18px; border-radius: 12px; font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: .25s; z-index: 60; max-width: calc(100% - 32px); text-align: center; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.hint { background: rgba(226,189,132,.08); border: 1px solid rgba(226,189,132,.3); border-radius: 12px; padding: 12px 14px; font-size: 14px; }
code.url { display: block; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px; font-size: 12px; word-break: break-all; color: var(--muted); }
.dot { display: inline-block; }
.btn svg { width: 18px; height: 18px; flex: none; }
.vote-bar button { font-size: 15px; white-space: nowrap; padding: 0 6px; }

/* Branding */
.top .brand { width: 40px; height: 40px; flex: none; object-fit: contain; }
.top .brand-link { display: flex; flex: none; }

.login { position: relative; align-items: flex-end; padding: 0; overflow: hidden; background: #000; }
.login .bg { position: absolute; inset: 0; background: url(/img/band-sm.jpg) 50% 0 / 135% auto no-repeat; }
@media (min-width: 700px) { .login .bg { background: url(/img/band.jpg) center / cover no-repeat; } .login .bg::after { background: rgba(0,0,0,.45); } }
.login .bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,0) 22%, rgba(10,10,11,.6) 34%, #0a0a0b 44%); }
.login .box { position: relative; padding: 0 24px calc(32px + var(--safe-b)); margin: 0 auto; }
.login .logo-big { display: block; width: 210px; height: auto; margin: 0 auto 26px; filter: drop-shadow(0 4px 24px rgba(0,0,0,.6)); }
.login .welcome { text-align: center; margin-bottom: 6px; }
.login .welcome .muted { font-size: 15px; }
@media (min-width: 700px) { .login { align-items: center; } .login .box { background: rgba(10,10,11,.78); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--line); border-radius: 22px; padding: 32px; margin: 0; } }

.hero { position: relative; border-radius: 18px; overflow: hidden; min-height: 210px; display: flex; align-items: flex-end; margin-bottom: 18px; border: 1px solid var(--line); color: #fff; cursor: pointer; background: #000; }
.hero .ph { position: absolute; inset: 0; background: url(/img/band-sm.jpg) center 35% / cover no-repeat; transform: scale(1.02); }
.hero .ph::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05) 0%, rgba(0,0,0,.35) 45%, rgba(0,0,0,.88) 100%); }
.hero .hero-logo { position: absolute; top: 12px; right: 12px; width: 74px; opacity: .92; }
.hero .in { position: relative; padding: 18px; width: 100%; }
.hero .kicker { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; color: var(--accent); }
.hero h2 { font-size: 24px; margin-top: 4px; text-shadow: 0 2px 12px rgba(0,0,0,.5); }
.hero .sub { color: rgba(255,255,255,.78); font-size: 14px; margin-top: 2px; }
.hero .count { position: absolute; right: 18px; bottom: 18px; text-align: right; }
.hero .count b { display: block; font-size: 34px; line-height: 1; font-weight: 800; }
.hero .count small { color: rgba(255,255,255,.7); font-size: 12px; font-weight: 600; }
@media (min-width: 700px) { .hero { min-height: 260px; } .hero .ph { background-image: url(/img/band.jpg); } }

.profile-hero { position: relative; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: #000; }
.profile-hero .ph { height: 110px; background: url(/img/band-sm.jpg) center 30% / cover no-repeat; position: relative; }
.profile-hero .ph::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.1), var(--surface)); }
.profile-hero .row { background: var(--surface); padding: 0 16px 16px; margin-top: -26px; position: relative; align-items: flex-end; }
.profile-hero .avatar { border: 3px solid var(--surface); background: var(--surface-2); }

/* Rollen & Ton */
.chip.warn { color: #f0b25a; border-color: rgba(240,178,90,.4); }
.cal-day.has-gig.not-mine .num { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--accent); }
.dot.other { box-shadow: inset 0 0 0 1.5px var(--accent); }
.item.dim { opacity: .62; }
.member.dim { opacity: .6; }

/* Probe: Anhänge */
.atts { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.att { display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 14px; min-width: 0; }
.att.col { flex-direction: column; align-items: stretch; }
.att a, .att-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-ic { display: inline-flex; color: var(--accent); flex: none; }
.att-ic svg { width: 16px; height: 16px; }
.att audio { width: 100%; height: 36px; margin-top: 4px; color-scheme: dark; }
.att .x { flex: none; width: 28px; height: 28px; border-radius: 8px; border: 0; background: transparent; color: var(--muted); font-size: 18px; cursor: pointer; }
.att .x:hover { color: var(--no); }
label.btn { cursor: pointer; }
