/* Akkord Werkstatt – Look „Backstage Navy“ (bewusst nur dunkel) */
@font-face { font-family: "Unbounded"; src: url(fonts/unbounded-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Unbounded"; src: url(fonts/unbounded-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Unbounded"; src: url(fonts/unbounded-latin-800-normal.woff2) format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url(fonts/dm-sans-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url(fonts/dm-sans-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url(fonts/dm-sans-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(fonts/jetbrains-mono-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(fonts/jetbrains-mono-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --bg: #0b1826; --deep: #050c15; --panel: #0e1e30; --panel2: #13263a; --panel3: #1a3149;
  --line: #1f3650; --line2: #27405a;
  --ink: #eef2f6; --ink2: #c9d5e1; --muted: #9fb0c2; --faint: #5f7184;
  --gold: #e0a052; --gold-l: #f3c27f; --gold-bg: #2a2213; --gold-line: #5a4422;
  --coral: #ff7a66; --coral-l: #ff9a8a; --coral-bg: #3a1f1c; --coral-line: #5a2a24;
  --teal: #2fb5c0; --green: #7fd4a0; --green-bg: #16332a;
  --f-display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --f-body: "DM Sans", "Segoe UI", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --r: 12px; --size: 20px;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 var(--f-body); -webkit-font-smoothing: antialiased; }
a { color: var(--gold); } a:hover { color: var(--gold-l); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
code { font-family: var(--f-mono); font-size: .9em; background: var(--panel2); padding: 1px 6px; border-radius: 6px; }

/* ---------- Bausteine ---------- */
.eyebrow { display: block; font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.muted { color: var(--muted); } .small { font-size: 13px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: var(--r); border: 1px solid var(--line2); background: var(--panel2); color: var(--ink); font-weight: 700; font-size: 14px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--gold); color: var(--ink); }
.btn-primary { background: var(--gold); border-color: var(--gold); color: var(--bg); }
.btn-primary:hover { background: var(--gold-l); color: var(--bg); }
.btn-ghost { background: transparent; }
.btn-danger { background: transparent; color: var(--coral-l); border-color: var(--coral-line); }
.btn-danger:hover { border-color: var(--coral); color: var(--coral-l); }
.btn-block { width: 100%; min-height: 52px; font-size: 16px; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.icon-btn { width: 44px; height: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r); border: 1px solid var(--line2); background: transparent; color: var(--ink2); cursor: pointer; flex: none; }
.icon-btn:hover { border-color: var(--gold); color: var(--ink); }
.icon-btn svg, .btn svg { width: 18px; height: 18px; flex: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 6px 10px; border-radius: 99px; background: var(--panel2); color: var(--ink2); }
.chip.gold { background: var(--gold-bg); color: var(--gold-l); }
.chip.coral { background: var(--coral-bg); color: var(--coral-l); }
.chip.green { background: var(--green-bg); color: var(--green); }
.pill-gold { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--bg); background: var(--gold); padding: 6px 10px; border-radius: 99px; }
.note { padding: 12px 14px; border-radius: var(--r); background: var(--panel2); color: var(--ink2); margin: 0; }
.note.err { background: var(--coral-bg); color: var(--coral-l); }
.note.ok { background: var(--green-bg); color: var(--green); }
.note p { margin: 0; }

.form { display: flex; flex-direction: column; gap: 16px; }
.form fieldset { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 12px; margin: 0; }
.form legend { padding: 0 6px; font-weight: 700; color: var(--ink2); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span, .lbl { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea, .inp {
  width: 100%; min-height: 46px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--line2);
  background: var(--panel2); color: var(--ink); font-size: 15px;
}
.field input:focus, .field select:focus, .field textarea:focus, .inp:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(224,160,82,.18); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.5; color: var(--ink2); padding: 14px; border-radius: var(--r); background: var(--panel2); }
.consent input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--gold); flex: none; }
.strength { display: flex; gap: 6px; margin-top: -8px; }
.strength i { flex: 1; height: 4px; border-radius: 2px; background: var(--line2); }
.strength i.on { background: var(--gold); }

/* ---------- Anmeldung ---------- */
.page-auth { min-height: 100%; }
.auth-wrap { min-height: 100vh; display: flex; flex-wrap: wrap; }
.auth-hero { flex: 1 1 520px; min-width: 0; position: relative; overflow: hidden; background: var(--panel); padding: 48px max(24px, 4vw); display: flex; flex-direction: column; justify-content: space-between; gap: 32px; min-height: 560px; }
.auth-brand { display: flex; align-items: center; gap: 12px; position: relative; z-index: 2; }
.brand-sub { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.hero-guitar { position: absolute; right: -20px; top: 50%; height: 115%; max-height: 900px; width: auto; max-width: none; transform: translateY(-50%) rotate(14deg); opacity: .95; z-index: 0; pointer-events: none; }
.hero-fade { position: absolute; inset: 0; z-index: 1; background: radial-gradient(closest-side at 78% 55%, rgba(224,160,82,.22), transparent 70%), linear-gradient(90deg, var(--panel) 34%, rgba(14,30,48,.6) 58%, rgba(14,30,48,0) 82%); }
.hero-copy { position: relative; z-index: 2; max-width: 520px; display: flex; flex-direction: column; gap: 18px; }
.hero-kicker { font: 700 30px/1 var(--f-display); color: var(--ink2); margin-bottom: -6px; }
.hero-title { margin: 0; font: 800 clamp(48px, 6vw, 80px)/.95 var(--f-display); letter-spacing: -.04em; }
.hero-title span { color: var(--gold); }
.hero-text { margin: 0; font-size: 18px; line-height: 1.55; color: var(--ink2); max-width: 30em; }
.hero-facts { display: flex; gap: 28px; flex-wrap: wrap; }
.hero-facts div { display: flex; flex-direction: column; gap: 2px; }
.hero-facts b { font: 700 22px/1 var(--f-mono); color: var(--gold); }
.hero-facts span { font-size: 13px; color: var(--muted); }
.hero-foot { position: relative; z-index: 2; font-size: 13px; color: var(--faint); }
.auth-main { flex: 1 1 420px; min-width: 0; display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.auth-single { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
.auth-card { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 18px; }
.auth-single .auth-card { max-width: 560px; }
.auth-title { margin: 0; font: 700 32px/1.1 var(--f-display); letter-spacing: -.02em; }
.prose { color: var(--ink2); line-height: 1.6; }
.prose h3 { font-family: var(--f-display); font-size: 17px; color: var(--ink); margin: 20px 0 6px; }
@media (max-width: 760px) {
  .auth-hero { min-height: 380px; padding-block: 28px; }
  .hero-guitar { height: 130%; right: -120px; opacity: .55; }
  .hero-facts { display: none; }
}

/* ---------- App-Rahmen ---------- */
.page-app { overflow: hidden; }
.app { height: 100%; display: flex; }
.loading { margin: auto; color: var(--muted); }
.side { width: 290px; flex: none; height: 100%; overflow-y: auto; background: var(--panel); border-right: 1px solid var(--line); padding: 24px 18px; display: flex; flex-direction: column; gap: 22px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand b { display: block; font: 800 16px/1.1 var(--f-display); letter-spacing: -.01em; }
.brand small { display: block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-head { display: flex; align-items: center; justify-content: space-between; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 14px 10px 6px; }
.nav-head .icon-btn { width: 32px; height: 32px; border-radius: 8px; }
.nav-item { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 8px 10px; border-radius: 10px; color: var(--ink2); text-decoration: none; font-size: 15px; border: 0; background: none; text-align: left; width: 100%; cursor: pointer; }
.nav-item:hover { background: var(--panel2); color: var(--ink); }
.nav-item.on { background: var(--panel3); color: var(--ink); }
.nav-item.sub { padding-left: 38px; font-size: 14px; }
.nav-item svg { width: 18px; height: 18px; flex: none; }
.nav-item .n { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.nav-item .owner { display: block; font-size: 12px; color: var(--muted); }
.nav-empty { padding: 6px 10px; font-size: 13px; color: var(--faint); }
.me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--r); background: var(--panel2); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--line2); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex: none; color: var(--ink); }
.me .who { display: flex; flex-direction: column; font-size: 13px; min-width: 0; }
.me .who b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .who span { color: var(--muted); }
.me .acts { margin-left: auto; display: flex; gap: 4px; }
.me .icon-btn { width: 36px; height: 36px; border: 0; }

.main { flex: 1; min-width: 0; height: 100%; overflow-y: auto; position: relative; }
.topbar { display: none; }
.content { padding: 36px clamp(16px, 4vw, 48px) 64px; display: flex; flex-direction: column; gap: 26px; max-width: 1280px; }

.lib-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px; }
.lib-head h1 { margin: 6px 0 10px; font: 800 clamp(36px, 5vw, 56px)/.95 var(--f-display); letter-spacing: -.03em; text-wrap: balance; overflow-wrap: anywhere; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.search { display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 14px; border-radius: var(--r); background: var(--panel2); border: 1px solid var(--line2); width: min(240px, 100%); }
.lib-head .actions { flex-wrap: wrap; justify-content: flex-end; }
.search:focus-within { border-color: var(--gold); }
.search input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: var(--ink); }
.search svg { width: 18px; height: 18px; color: var(--muted); }

.hero-card { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; padding: 22px 26px; border-radius: 20px; background: var(--gold); color: var(--bg); text-decoration: none; position: relative; overflow: hidden; }
.hero-card:hover { color: var(--bg); background: var(--gold-l); }
.hero-card .t { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.hero-card small { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.hero-card strong { font: 800 28px/1.05 var(--f-display); letter-spacing: -.02em; overflow-wrap: anywhere; }
.hero-card .go { display: inline-flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 22px; border-radius: 99px; background: var(--bg); color: var(--gold); font-weight: 700; }
.hero-card .go svg { width: 16px; height: 16px; }

.table { border-radius: 16px; border: 1px solid var(--line); overflow: hidden; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) 80px 60px 100px 44px; align-items: center; gap: 14px; padding: 12px 16px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.row:first-child { border-top: 0; }
.row.head { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding-block: 12px; }
a.row:hover { background: var(--panel2); color: var(--ink); }
.row .ti { display: flex; flex-direction: column; min-width: 0; }
.row .ti b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .ti span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .key { font: 700 14px/1 var(--f-mono); color: var(--gold); }
.row .dt { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.row .icon-btn { width: 40px; height: 40px; border: 0; }
.row.folder b::before { content: ""; }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.empty b { font: 700 20px/1.2 var(--f-display); color: var(--ink); }

/* ---------- Editor ---------- */
.ed { height: 100%; display: flex; flex-direction: column; }
.ed-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px clamp(16px, 2.5vw, 28px); border-bottom: 1px solid var(--line); background: var(--panel); }
.ed-bar .back { display: inline-flex; align-items: center; gap: 6px; color: var(--ink2); text-decoration: none; font-weight: 700; font-size: 14px; min-height: 40px; }
.ed-bar .back svg { width: 18px; height: 18px; }
.ed-bar h1 { margin: 0; font: 700 19px/1.2 var(--f-display); letter-spacing: -.02em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40vw; }
.save-state { font-size: 13px; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.save-state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.save-state.ok { color: var(--green); } .save-state.ok::before { background: var(--green); }
.save-state.dirty { color: var(--gold-l); } .save-state.dirty::before { background: var(--gold); }
.ed-bar .actions { margin-left: auto; }
.ed-body { flex: 1; min-height: 0; display: flex; }
.ed-input { width: 420px; flex: none; overflow-y: auto; padding: 22px clamp(16px, 2vw, 26px); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.ed-input .grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ed-input .span2 { grid-column: span 2; }
.ed-input textarea { min-height: 380px; flex: 1; padding: 14px; border-radius: var(--r); border: 1px solid var(--line2); background: #071220; color: var(--ink2); font: 500 13px/1.55 var(--f-mono); resize: vertical; white-space: pre; overflow: auto; }
.ed-input textarea:focus { border-color: var(--gold); outline: none; }
.ed-input .hint { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.ed-sheet { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px clamp(16px, 2.5vw, 28px); border-bottom: 1px solid var(--line); }
.grp { display: flex; align-items: center; gap: 6px; }
.grp .lbl { margin-right: 2px; }
.sep { width: 1px; height: 26px; background: var(--line2); }
.tb { min-height: 38px; min-width: 38px; padding: 0 11px; border-radius: 10px; border: 1px solid var(--line2); background: var(--panel2); color: var(--ink); font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; }
.tb:hover { border-color: var(--gold); }
.tb[aria-pressed="true"] { background: var(--gold-bg); border-color: var(--gold); color: var(--gold-l); }
.tb svg { width: 16px; height: 16px; }
.val { font: 700 14px var(--f-mono); color: var(--gold); min-width: 34px; text-align: center; font-variant-numeric: tabular-nums; }
select.tb { padding-right: 28px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.sheet-scroll { flex: 1; min-height: 0; overflow-y: auto; background: #0f1f31; }
.sheet-wrap { padding: 28px clamp(16px, 3.5vw, 48px) 80px; }

/* ---------- Capo ---------- */
.cchips { font: 700 15px/1.4 var(--f-mono); letter-spacing: .04em; color: var(--gold-l); }
.cchips.plain { color: var(--ink); }
.capo-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 12px clamp(16px, 2.5vw, 28px); border-bottom: 1px solid var(--line); background: var(--bg); font-size: 13px; color: var(--muted); }
.capo-bar svg { color: var(--gold); flex: none; }
.sug-panel { display: flex; flex-direction: column; gap: 12px; padding: 18px clamp(16px, 2.5vw, 28px) 20px; border-bottom: 1px solid var(--line); background: var(--panel); }
.sug-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.sug-head b { font: 700 15px/1.2 var(--f-display); }
.sug-head > span { font-size: 13px; color: var(--muted); }
.sug-head .cchips { font-size: 13px; color: var(--ink); }
.sug-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.sug { display: flex; flex-direction: column; gap: 4px; min-height: 56px; padding: 10px 16px; border-radius: 12px; border: 1px solid var(--line2); background: var(--panel); color: var(--ink); text-align: left; cursor: pointer; }
.sug:hover { border-color: #5d7896; }
.sug[aria-pressed="true"] { border-color: var(--gold); background: var(--gold-bg); }
.sug-top { display: flex; align-items: center; gap: 10px; }
.sug-top b { font: 700 15px var(--f-display); }
.stars { color: var(--gold); letter-spacing: 2px; }
.sug-note, .sug-foot { font-size: 13px; color: var(--muted); }
.strip-item .snd { font: 500 10px var(--f-mono); color: var(--muted); }
.stage-capo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-left: auto; }
.stage-top { flex-wrap: wrap; }
.pb { height: 44px; min-width: 44px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line2); background: var(--panel); color: var(--ink2); font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.pb:hover { border-color: var(--gold); }
.pb[aria-pressed="true"] { background: var(--gold-bg); border-color: var(--gold); color: var(--gold-l); }
.pval { font: 700 14px var(--f-mono); color: var(--gold); min-width: 64px; text-align: center; }
.stage-info { padding: 0 max(20px, env(safe-area-inset-right)) 6px max(20px, env(safe-area-inset-left)); font: 700 12px var(--f-mono); color: var(--muted); transition: opacity .3s; }
.stage-info:empty { display: none; }
.stage.calm .stage-info { opacity: 0; }

/* ---------- Blatt ---------- */
.song-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 18px; margin-bottom: 18px; }
.song-head h2 { margin: 0; font: 800 calc(var(--size) * 2) /1.02 var(--f-display); letter-spacing: -.03em; text-wrap: balance; overflow-wrap: anywhere; }
.song-head .meta { color: var(--muted); font-size: 15px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.song-head .meta b { font-family: var(--f-mono); color: var(--gold); }
.strip { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 14px; margin-bottom: 14px; border-bottom: 1px dashed var(--line2); scrollbar-width: thin; }
.strip-item { flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 6px 4px; border-radius: 12px; border: 1px solid transparent; background: transparent; cursor: pointer; color: var(--ink); }
.strip-item:hover { border-color: var(--line2); background: var(--panel2); }
.strip-item .nm { font: 700 15px/1 var(--f-mono); color: var(--gold); }
.strip-item .nf { font-size: 11px; color: var(--faint); padding: 18px 8px; }
.dia .gl { stroke: #4a6684; stroke-width: 1.2; }
.dia .nut { fill: var(--ink2); }
.dia .dot { fill: var(--gold); }
.dia .open { fill: none; stroke: var(--ink2); stroke-width: 1.5; }
.dia .mk { fill: var(--muted); font: 700 11px var(--f-body); }
.dia .mk.small { font-size: 9px; }
.dia .fr { fill: var(--muted); font: 700 10px var(--f-mono); }
.dia .fn { fill: var(--bg); font: 700 9px var(--f-mono); }
.dia .b-r { fill: var(--gold); } .dia .b-t { fill: var(--coral); } .dia .b-f { fill: var(--teal); }
.dia .hollow { fill: none; stroke-width: 1.8; }
.dia .b-r.hollow { stroke: var(--gold); } .dia .b-t.hollow { stroke: var(--coral); } .dia .b-f.hollow { stroke: var(--teal); }

.sheet { font-size: var(--size); }
.sheet-body { columns: var(--cols, 1); column-gap: 48px; }
.sec { break-inside: avoid; margin: 0 0 1.1em; }
.sec-title { display: inline-block; font: 700 .58em/1 var(--f-display); letter-spacing: .08em; text-transform: uppercase; color: var(--bg); background: var(--coral); padding: .45em .7em; border-radius: 6px; margin: .2em 0 .55em; }
.ln { display: flex; flex-wrap: wrap; align-items: flex-end; line-height: 1.3; margin: 0 0 .2em; }
.ln .s { display: inline-flex; flex-direction: column; white-space: pre; }
.ln .cw { min-height: 1.3em; display: flex; align-items: flex-end; }
.ln .c { font: 700 .75em/1.3 var(--f-mono); color: var(--gold); background: none; border: 0; padding: 0 .4em 0 0; cursor: pointer; text-align: left; }
.ln .c:hover { color: var(--gold-l); text-decoration: underline; text-underline-offset: 3px; }
.ln .c.x { cursor: default; color: var(--muted); }
.ln.only .c { padding-right: 1em; }
.ln.blank { height: .55em; }
.ln.plain { display: block; white-space: pre-wrap; }
.tab { font: 500 .62em/1.35 var(--f-mono); color: var(--ink2); background: var(--deep); border: 1px solid var(--line); border-radius: 10px; padding: .8em 1em; overflow-x: auto; margin: .3em 0 .8em; break-inside: avoid; }
.hide-chords .ln .cw, .hide-chords .ln.only, .hide-chords .strip { display: none; }

/* ---------- Bühne ---------- */
.stage { position: fixed; inset: 0; z-index: 50; background: var(--deep); display: flex; flex-direction: column; }
.stage-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: max(14px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 10px max(20px, env(safe-area-inset-left)); transition: opacity .3s; }
.stage-top .ttl { font: 700 15px/1.2 var(--f-display); color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stage-top .ttl b { font-family: var(--f-mono); color: var(--gold); margin-left: 8px; }
.stage-scroll { flex: 1; overflow-y: auto; scrollbar-width: none; }
.stage-scroll::-webkit-scrollbar { display: none; }
.stage-scroll .sheet-wrap { max-width: 1200px; margin: 0 auto; padding-bottom: 60vh; }
.stage .ln .t { color: #f4f7fa; }
.stage-ctrl { position: fixed; left: 50%; bottom: max(26px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; border-radius: 99px; background: var(--panel2); border: 1px solid var(--line2); box-shadow: 0 20px 50px rgba(0,0,0,.5); transition: opacity .3s, transform .3s; max-width: calc(100vw - 24px); }
.stage-ctrl .play { width: 58px; height: 58px; border-radius: 50%; border: 0; background: var(--gold); color: var(--bg); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.stage-ctrl .play svg { width: 22px; height: 22px; }
.stage-ctrl .fb { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--panel3); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-weight: 700; font-size: 17px; flex: none; }
.stage-ctrl .fb[aria-pressed="true"] { background: var(--gold-bg); color: var(--gold-l); }
.stage-ctrl .fb svg { width: 18px; height: 18px; }
.tempo { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 120px; }
.tempo .bars { display: flex; gap: 4px; align-items: flex-end; height: 22px; }
.tempo .bars i { width: 9px; border-radius: 2px; background: var(--line2); }
.tempo .bars i.on { background: var(--gold); }
.tempo span { font: 700 12px var(--f-mono); color: var(--gold); }
.stage-ctrl .vsep { width: 1px; height: 34px; background: var(--line2); }
.stage-hint { position: fixed; right: 24px; bottom: 40px; font-size: 13px; color: var(--faint); transition: opacity .3s; }
.stage.calm .stage-ctrl { opacity: 0; transform: translate(-50%, 20px); pointer-events: none; }
.stage.calm .stage-top, .stage.calm .stage-hint { opacity: 0; pointer-events: none; }

/* ---------- Dialoge ---------- */
.modal-bg { position: fixed; inset: 0; z-index: 80; background: rgba(5,12,21,.75); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow-y: auto; padding: 28px; border-radius: 22px; background: var(--panel); border: 1px solid var(--line2); box-shadow: 0 30px 80px rgba(0,0,0,.55); display: flex; flex-direction: column; gap: 18px; }
.modal.wide { max-width: 860px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.modal-head h2 { margin: 4px 0 0; font: 700 26px/1.1 var(--f-display); letter-spacing: -.02em; overflow-wrap: anywhere; }
.modal .foot { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.plist { display: flex; flex-direction: column; }
.prow { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.prow .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.prow .grow span { font-size: 13px; color: var(--muted); }
.allbox { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 14px; background: var(--gold-bg); border: 1px solid var(--gold-line); cursor: pointer; }
.allbox input { width: 22px; height: 22px; accent-color: var(--gold); margin: 0; flex: none; }
.allbox b { color: var(--gold-l); display: block; }
.allbox span { font-size: 13px; color: #c9b08a; }
.copybox { display: flex; gap: 8px; flex-wrap: wrap; }
.copybox input { flex: 1 1 260px; min-width: 0; min-height: 46px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--line2); background: var(--deep); color: var(--gold-l); font: 500 13px var(--f-mono); }

.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.vcard { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px 8px; border-radius: 14px; border: 1px solid var(--line2); background: var(--panel2); cursor: pointer; color: var(--ink); position: relative; }
.vcard:hover { border-color: var(--gold); }
.vcard.fav { border-color: var(--gold); background: var(--gold-bg); }
.vcard.fav::after { content: "Favorit"; position: absolute; top: -9px; left: 50%; transform: translateX(-50%); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--bg); background: var(--gold); padding: 2px 8px; border-radius: 99px; }
.vcard small { font: 500 11px var(--f-mono); color: var(--muted); }
.tones { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.tones b { font: 700 13px var(--f-mono); padding: 4px 8px; border-radius: 8px; background: var(--panel2); color: var(--ink2); }
.tones b:first-of-type { color: var(--gold); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line2); }
.seg button { min-height: 36px; padding: 0 14px; border-radius: 9px; border: 0; background: transparent; color: var(--ink2); font-weight: 700; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--gold); color: var(--bg); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 99; padding: 12px 18px; border-radius: 12px; background: var(--panel3); border: 1px solid var(--line2); color: var(--ink); font-weight: 600; box-shadow: 0 12px 30px rgba(0,0,0,.4); max-width: calc(100vw - 32px); }
.toast.err { background: var(--coral-bg); color: var(--coral-l); border-color: var(--coral-line); }

/* ---------- Admin ---------- */
.stats { display: flex; gap: 32px; flex-wrap: wrap; }
.stats div { display: flex; flex-direction: column; gap: 4px; }
.stats b { font: 800 38px/1 var(--f-display); letter-spacing: -.02em; }
.stats b small { font-size: 22px; color: var(--faint); }
.stats span { font-size: 13px; color: var(--muted); }
.invite { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; padding: 22px; border-radius: 20px; background: var(--gold); color: var(--bg); }
.invite .t { flex: 1 1 260px; display: flex; flex-direction: column; gap: 4px; }
.invite .t b { font: 700 21px/1.1 var(--f-display); }
.invite .t span { font-size: 14px; }
.invite .c { flex: 2 1 420px; display: flex; flex-wrap: wrap; gap: 10px; }
.invite input { flex: 1 1 240px; min-width: 0; min-height: 48px; padding: 0 14px; border-radius: 12px; border: 0; background: var(--bg); color: var(--gold-l); font: 500 13px var(--f-mono); }
.invite .btn { background: var(--bg); color: var(--gold); border-color: var(--bg); }
.invite .btn.ghost { background: transparent; color: var(--bg); border: 2px solid var(--bg); }
.utable { border-radius: 16px; border: 1px solid var(--line); overflow-x: auto; }
.urow { display: grid; grid-template-columns: minmax(200px, 1.6fr) 100px 70px 110px minmax(260px, 1.6fr); align-items: center; gap: 14px; padding: 12px 18px; border-top: 1px solid var(--line); min-width: 820px; }
.urow:first-child { border-top: 0; }
.urow.head { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.urow .who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.urow .who div { display: flex; flex-direction: column; min-width: 0; }
.urow .who span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.urow .acts { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- Handy ---------- */
@media (max-width: 900px) {
  .side { position: fixed; z-index: 60; left: 0; top: 0; bottom: 0; transform: translateX(-105%); transition: transform .25s; box-shadow: 20px 0 60px rgba(0,0,0,.5); padding-top: max(24px, env(safe-area-inset-top)); }
  .app.menu-open .side { transform: none; }
  .app.menu-open::after { content: ""; position: fixed; inset: 0; z-index: 55; background: rgba(5,12,21,.6); }
  .topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: max(12px, env(safe-area-inset-top)) 16px 12px; border-bottom: 1px solid var(--line); background: var(--panel); position: sticky; top: 0; z-index: 5; }
  .topbar .brand b { font-size: 15px; }
  .row { grid-template-columns: minmax(0, 1fr) 54px 40px; }
  .row .cap, .row .dt { display: none; }
  .row.head .cap, .row.head .dt { display: none; }
  .ed-body { flex-direction: column; }
  .ed-input { width: auto; border-right: 0; flex: none; }
  .ed[data-tab="sheet"] .ed-input { display: none; }
  .ed[data-tab="edit"] .ed-sheet { display: none; }
  .ed-tabs { display: flex !important; }
  .sheet-body { columns: 1 !important; }
  .ed-bar h1 { max-width: 60vw; }
  .tools .sep { display: none; }
  .stage-top .ttl { flex: 1 1 60%; }
  .stage-capo { order: 3; width: 100%; justify-content: space-between; margin-left: 0; gap: 6px; }
  .stage-capo .grp { gap: 4px; }
  .pb { padding: 0 12px; font-size: 13px; }
  .pval { min-width: 58px; font-size: 13px; }
  .tools { gap: 8px; }
  .stage-ctrl { gap: 6px; padding: 6px; }
  .stage-ctrl .opt { display: none; }
  .tempo { min-width: 80px; }
  .stage-hint { display: none; }
}
.ed-tabs { display: none; gap: 6px; padding: 10px 16px 0; }
.ed-tabs .tb { flex: 1; }

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

/* ---------- Druck / PDF ---------- */
@media print {
  @page { margin: 14mm 14mm 16mm; }
  body, .page-app { background: #fff !important; color: #000 !important; overflow: visible !important; height: auto; }
  .side, .topbar, .ed-bar, .ed-input, .tools, .ed-tabs, .stage-ctrl, .stage-top, .stage-hint, .toast, .modal-bg { display: none !important; }
  .app, .main, .ed, .ed-body, .ed-sheet, .sheet-scroll, .stage, .stage-scroll { display: block !important; position: static !important; height: auto !important; overflow: visible !important; background: #fff !important; }
  .sheet-wrap { padding: 0 !important; }
  .sheet { font-size: 12.5pt !important; color: #000; }
  .song-head h2 { font-size: 22pt; color: #000; }
  .song-head .meta, .song-head .meta b { color: #333 !important; }
  .ln .t { color: #000 !important; }
  .ln .c { color: #000 !important; font-weight: 700; }
  .print-color .ln .c { color: #a3600f !important; }
  .sec-title { background: none !important; color: #000 !important; border: 1.5px solid #000; }
  .print-color .sec-title { background: #ffe1d9 !important; color: #8a2a17 !important; border-color: #ff7a66; }
  .tab { background: #fff !important; color: #000 !important; border-color: #999; }
  .strip { border-color: #999; }
  .strip-item .nm { color: #000 !important; }
  .dia .gl { stroke: #555; } .dia .nut, .dia .dot { fill: #000; } .dia .fn { fill: #fff; } .dia .open { stroke: #000; } .dia .mk, .dia .fr { fill: #333; }
  .no-print-strip .strip { display: none; }
  .sec, .ln { break-inside: avoid; }
}
