:root {
  --w: 480px;
  --bg: #f3f5f7;
  --card: #fff;
  --ink: #1d2126;
  --muted: #8b908a;
  --line: #e3e7ea;
  --soft: #eceff2;
  --accent: #2ea3f2;
  --accent-d: #1b83c9;
  --accent-soft: #e2f2fd;
  --warn-bg: #fdeede;
  --warn-ink: #c2651a;
  --bad: #d9534f;
  --bad-soft: #fbe6e5;
  --gold: #f0c24b;
  --shadow: 0 1px 2px rgba(20, 30, 20, .05), 0 4px 14px rgba(20, 30, 20, .04);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121417;
    --card: #1c1f23;
    --ink: #eceff2;
    --muted: #8f958d;
    --line: #2b3035;
    --soft: #24282d;
    --accent-soft: #15324a;
    --warn-bg: #3a2a18;
    --warn-ink: #f0a45f;
    --bad-soft: #3b2220;
    --shadow: none;
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 Roboto, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
#app { max-width: var(--w);  margin: 0 auto; min-height: 100vh; padding: 0 14px 90px; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 1px solid var(--line); background: var(--card); padding: 8px 14px; border-radius: 99px; }
button:disabled { opacity: .45; cursor: default; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
button.ghost { background: transparent; }
button.danger { color: var(--bad); }
button.sm { padding: 4px 11px; font-size: 13px; }
input, textarea, select { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
input:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent); border-color: var(--accent); }
textarea { resize: vertical; min-height: 110px; }
label.f { display: block; margin: 14px 0 5px; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
h1, h2, h3, p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.err { color: var(--bad); font-size: 14px; min-height: 1.2em; margin-top: 8px; }
.cap { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin: 20px 2px 8px; display: flex; align-items: center; gap: 6px; }

/* hero */
.hero, .shero { margin: 0 -14px; padding: 22px 20px 20px; padding-top: max(22px, env(safe-area-inset-top)); color: #fff; background: radial-gradient(120% 90% at 100% 0%, rgba(46,163,242,.55), transparent 62%), linear-gradient(160deg, #3a3e46, #1f2227); border-radius: 0 0 28px 28px; }
.hero .top { display: flex; justify-content: space-between; align-items: center; font-size: 13px; opacity: .95; }
.hero h1 { font-size: 30px; line-height: 1.1; font-weight: 800; margin: 14px 0 6px; letter-spacing: -.02em; }
.hero p { opacity: .9; }
.hero .stats { display: flex; gap: 10px; margin-top: 18px; }
.hero .stat { flex: 1; text-align: center; background: rgba(255,255,255,.17); border-radius: 14px; padding: 10px 6px; }
.hero .stat b { display: block; font-size: 24px; line-height: 1.1; }
.hero .stat span { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .9; }
.pill { background: rgba(255,255,255,.2); border: 0; color: #fff; padding: 5px 12px; font-size: 13px; border-radius: 99px; }
.search { margin: 14px 0 6px; position: relative; }
.search input { padding-left: 36px; border-radius: 99px; box-shadow: var(--shadow); }
.search svg { position: absolute; left: 13px; top: 12px; width: 17px; height: 17px; stroke: var(--muted); }

/* header on subpages */
.head { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 12px 0 10px; background: var(--bg); }
.head h1 { font-size: 17px; font-weight: 700; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.round { width: 34px; height: 34px; padding: 0; border-radius: 50%; display: grid; place-items: center; flex: none; }
.modepill { font-size: 12px; font-weight: 600; background: var(--accent-soft); color: var(--accent-d); padding: 4px 10px; border-radius: 99px; flex: none; }
svg.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* lists */
.list { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); cursor: pointer; width: 100%; text-align: left; background: none; border-radius: 0; border-left: 0; border-right: 0; border-top: 0; }
.item:last-child { border-bottom: 0; }
.item:active { background: var(--soft); }
.item .t { font-weight: 600; }
.item .s { font-size: 12.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.av { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-d); display: grid; place-items: center; font-weight: 700; flex: none; }
.ring { --p: 0; width: 38px; height: 38px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 10.5px; font-weight: 700; color: var(--bad);
  background: conic-gradient(var(--c, var(--bad)) calc(var(--p) * 1%), var(--soft) 0); position: relative; }
.ring::before { content: ""; position: absolute; inset: 3.5px; background: var(--card); border-radius: 50%; }
.ring span { position: relative; }
.ring.mid { --c: var(--warn-ink); color: var(--warn-ink); }
.ring.ok { --c: var(--accent); color: var(--accent-d); }
.ring.none { color: var(--muted); }
.chip { display: inline-block; font-size: 11.5px; padding: 2px 9px; border-radius: 99px; background: var(--soft); color: var(--muted); font-weight: 600; }
.chip.ok { background: var(--accent-soft); color: var(--accent-d); }
.chip.warn { background: var(--warn-bg); color: var(--warn-ink); }

/* section chips */
.secs { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.sec { padding: 5px 11px; font-size: 13px; background: var(--card); box-shadow: var(--shadow); border: 1px solid var(--line); }
.sec small { color: var(--muted); margin-left: 2px; }
.sec.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.sec.on small { color: rgba(255,255,255,.85); }

/* mode cards */
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mode { text-align: left; border-radius: 16px; padding: 12px 12px 13px; border-color: transparent; box-shadow: var(--shadow); display: block; }
.mode .ic { width: 32px; height: 32px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-d); display: grid; place-items: center; margin-bottom: 14px; }
.mode b { display: block; font-size: 14px; }
.mode span { font-size: 12px; color: var(--muted); line-height: 1.3; display: block; }
.test { width: 100%; margin-top: 10px; border-radius: 16px; padding: 20px; font-weight: 800; letter-spacing: .16em; display: flex; justify-content: center; align-items: center; gap: 10px; border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: var(--shadow); }

/* board */
.board .r { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.board .r:last-child { border-bottom: 0; }
.rk { width: 22px; height: 22px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--muted); }
.rk.g1 { background: var(--gold); color: #5a4300; }
.board .sc { text-align: right; font-weight: 700; }
.board .sc small { display: block; font-weight: 400; font-size: 11px; color: var(--muted); }

/* lyrics */
.lyrics { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 14px 16px 4px; }
.vname { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; display: flex; align-items: center; gap: 6px; }
.vname::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.verse { margin-bottom: 14px; }
.verse div.l { padding: 2px 0; }

/* practice */
.banner { background: var(--warn-bg); color: var(--warn-ink); border-radius: 12px; padding: 9px 12px; font-size: 13px; margin-bottom: 12px; }
.seg { display: flex; background: var(--soft); border-radius: 99px; padding: 3px; margin-bottom: 10px; }
.seg button { flex: 1; border: 0; background: transparent; padding: 6px; font-size: 13.5px; }
.seg button.on { background: var(--accent); color: #fff; font-weight: 600; }
.pcard { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 14px 16px; margin-bottom: 10px; }
.pline { display: flex; flex-wrap: wrap; gap: 5px 6px; align-items: center; margin: 5px 0; line-height: 1.9; }
.blank { padding: 1px 6px; border-radius: 99px; text-align: center; background: var(--soft); border: 1px solid var(--line); font-size: 14.5px; }
.blank.good { background: var(--accent-soft); border-color: var(--accent); }
.blank.bad { background: var(--bad-soft); border-color: var(--bad); }
.blank.hint { background: var(--warn-bg); border-color: var(--warn-ink); }
.counter { font-size: 12px; color: var(--muted); text-align: right; margin: -4px 2px 6px; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.lcard { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: 11px 13px; margin-bottom: 8px; }
.lcard.done-ok { outline: 2px solid var(--accent); }
.lcard.done-bad { outline: 2px solid var(--bad); }
.inits { display: flex; flex-wrap: wrap; gap: 5px; cursor: pointer; min-height: 28px; }
.init { min-width: 26px; height: 26px; border-radius: 99px; background: var(--soft); border: 1px solid var(--line); display: grid; place-items: center; font-size: 12.5px; font-weight: 600; padding: 0 5px; }
.rv { cursor: pointer; font-size: 16px; min-height: 28px; }
.rv.blur { filter: blur(6px); user-select: none; }
.rate { display: flex; gap: 6px; margin-top: 8px; }
.rate button { padding: 3px 11px; font-size: 12.5px; }
.rate button.ok.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.rate button.no.on { background: var(--bad); color: #fff; border-color: var(--bad); }
.slot { min-height: 46px; background: var(--soft); border-radius: 12px; padding: 7px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.slot .ph { color: var(--muted); font-size: 13.5px; padding: 0 5px; }
.tokens { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.tok { padding: 6px 13px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); user-select: none; }
.tok.placed { background: var(--accent-soft); border-color: var(--accent); }
.tok.bad { background: var(--bad-soft); border-color: var(--bad); }
.big { font-size: 46px; font-weight: 800; text-align: center; letter-spacing: -.02em; }
.result { text-align: center; padding: 8px 0; }
.result h2 { font-size: 22px; margin-bottom: 2px; }
.slotw { display: inline-grid; place-items: center; min-width: 22px; height: 24px; padding: 0 3px; border-bottom: 2px solid var(--line); font-weight: 600; font-size: 14px; margin: 1px 0; }
.slotw.cur { border-color: var(--accent); background: var(--accent-soft); border-radius: 6px 6px 0 0; }
.slotw.good { border-color: var(--accent); color: var(--accent-d); }
.slotw.bad { border-color: var(--bad); color: var(--bad); }
.tw { display: inline-flex; gap: 3px; flex-wrap: nowrap; align-items: baseline; margin-right: 6px; }
.typer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 8; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); }
.typer input { max-width: calc(var(--w) - 28px); display: block; margin: 0 auto; text-align: center; font-size: 17px; border-radius: 99px; }

/* tabs */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; background: color-mix(in srgb, var(--card) 94%, transparent); border-top: 1px solid var(--line); backdrop-filter: blur(8px); padding-bottom: env(safe-area-inset-bottom); }
.tabs div { max-width: var(--w); margin: 0 auto; display: flex; }
.tabs button { flex: 1; border: 0; background: none; border-radius: 0; color: var(--muted); font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; padding: 9px 0 8px; display: flex; flex-direction: column; align-items: center; gap: 2px; border-top: 2px solid transparent; }
.tabs button.on { color: var(--accent-d); border-top-color: var(--accent); }
.fab { position: fixed; right: max(16px, calc(50% - var(--w) / 2 + 16px)); bottom: calc(66px + env(safe-area-inset-bottom)); z-index: 6; width: 50px; height: 50px; padding: 0; border-radius: 50%; display: grid; place-items: center; box-shadow: 0 6px 18px rgba(46,163,242,.45); }

/* editor */
.ed { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 12px; margin-bottom: 10px; }
.ed textarea { min-height: 96px; margin-top: 8px; }
.adds { display: flex; flex-wrap: wrap; gap: 6px; }
.chk { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.chk:last-child { border-bottom: 0; }
.chk input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; padding: 0; }
.auth { max-width: 340px; margin: 0 auto; padding-top: 70px; }
.auth h1 { text-align: center; font-size: 28px; font-weight: 800; color: var(--accent-d); letter-spacing: -.02em; }
.bignum { font-size: 34px; font-weight: 800; line-height: 1; }

/* ---- Citykirken-tema, sangside, øvelser ---- */
.kick { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .75; }
.hero .kick { margin-top: 16px; }
.hero h1 { margin-top: 4px; }
.shero { padding-bottom: 22px; }
.shero .top { display: flex; justify-content: space-between; align-items: center; }
.glass { background: rgba(255,255,255,.16); border: 0; color: #fff; }
.shero .srow { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.shero h1 { font-size: 26px; line-height: 1.12; font-weight: 800; letter-spacing: -.02em; }
.shero .art { opacity: .8; margin-top: 4px; font-size: 14px; }
.shero .schips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.shero .chip { background: rgba(255,255,255,.16); color: #fff; }
.shero .chip.ok { background: #2ea3f2; }
.ring.lg { width: 78px; height: 78px; font-size: 20px; flex: none; --c: #fff; color: #fff; background: conic-gradient(#fff calc(var(--p) * 1%), rgba(255,255,255,.2) 0); }
.ring.lg::before { inset: 6px; background: #2b2f35; }
.ring.lg.ok { --c: #7fd0ff; background: conic-gradient(#7fd0ff calc(var(--p) * 1%), rgba(255,255,255,.2) 0); }
.sec::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sc, var(--accent)); display: inline-block; margin-right: 6px; }
.sec.on { background: var(--sc, var(--accent)); border-color: var(--sc, var(--accent)); }
.sec.on::before { background: #fff; }
.vname::before { background: var(--sc, var(--accent)); }
.vname { color: var(--sc, var(--muted)); }
.vname .vp { margin-left: auto; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.verse { border-left: 3px solid var(--sc, var(--line)); padding-left: 12px; }
.lyrics .vname { text-transform: uppercase; }
.test { background: linear-gradient(135deg, #2ea3f2, #1b83c9); color: #fff; border: 0; font-size: 16px; box-shadow: 0 8px 22px rgba(46,163,242,.38); }
.test svg { stroke: #fff; }
.mode { transition: transform .12s ease, box-shadow .12s ease; }
.mode:active { transform: scale(.97); }
.next { background: var(--card); border-radius: 20px; box-shadow: var(--shadow); padding: 16px; margin: 14px 0 0; border: 1px solid var(--line); }
.next .kick { color: var(--accent-d); opacity: 1; margin: 0 0 8px; }
.next b { font-size: 17px; }
.next .primary { width: 100%; margin-top: 14px; padding: 12px; font-size: 16px; box-shadow: 0 6px 16px rgba(46,163,242,.35); }
.head { position: sticky; }
.head .pbar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; }
.head .pbar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 3px; transition: width .35s cubic-bezier(.3,.8,.3,1); }
.pline { font-size: 17px; line-height: 2.05; }
.pline .blank { font-size: 16px; padding: 3px 8px; }
.rv, .rv span { font-size: 17px; }
.lcard { transition: outline-color .2s, transform .2s; border-left: 4px solid var(--sc, transparent); }
.blank { transition: background .2s, border-color .2s; }
.blank.good { animation: pop .35s ease; }
.blank.bad { animation: shake .35s ease; }
.lcard.done-ok { animation: pop .35s ease; }
.lcard.done-bad { animation: shake .35s ease; }
.slotw.cur { animation: pulse 1.1s ease-in-out infinite; }
.tok { transition: transform .12s ease, background .2s; }
.tok:active { transform: scale(.94); }
.tok.placed { animation: pop .25s ease; }
.result { animation: rise .45s cubic-bezier(.2,.9,.3,1.2); }
.result .big { background: linear-gradient(135deg, #2ea3f2, #e56052); -webkit-background-clip: text; background-clip: text; color: transparent; }
.vname { transition: color .2s; }
@keyframes pop { 0% { transform: scale(.94); } 60% { transform: scale(1.04); } 100% { transform: scale(1); } }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(46,163,242,.0); } 50% { box-shadow: 0 0 0 4px rgba(46,163,242,.25); } }
@media (min-width: 700px) { :root { --w: 560px; } .modes { gap: 12px; } .hero, .shero { margin: 0 -14px; border-radius: 0 0 32px 32px; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media (prefers-color-scheme: dark) { :root { --accent-d: #6cc2f7; } }

/* ---- fejring, tomme tilstande, overgange, store skærme ---- */
#app.enter { animation: viewin .26s ease both; }
/* kun gennemsigtighed: en transformation på #app ville gøre alle fixerede elementer (menu, live-bjælke, zoner) relative til siden i stedet for skærmen */
@keyframes viewin { from { opacity: 0; } to { opacity: 1; } }
.toast { position: fixed; top: max(16px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 60; background: #24282d; color: #fff; padding: 10px 18px; border-radius: 99px; font-weight: 700; box-shadow: 0 10px 30px rgba(0,0,0,.3); animation: toastin .4s cubic-bezier(.2,.9,.3,1.3) both; white-space: nowrap; }
@keyframes toastin { from { opacity: 0; transform: translate(-50%, -16px) scale(.9); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 50; }
.confetti i { position: absolute; top: -16px; width: 8px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { top: 105vh; margin-left: 24px; transform: rotate(720deg); } }
.empty { text-align: center; padding: 22px 16px; }
.empty svg { width: 120px; height: 90px; }
.empty b { display: block; font-size: 16px; margin-top: 4px; }
.empty p { margin-top: 4px; }
@media (min-width: 700px) { body { background: radial-gradient(900px 400px at 50% -80px, color-mix(in srgb, var(--accent) 14%, transparent), transparent), var(--bg); } .hero, .shero { border-radius: 0 0 32px 32px; } }
@media (min-width: 900px) { :root { --w: 640px; } }
@media (prefers-reduced-motion: reduce) { .confetti { display: none; } .toast { animation: none; } }

/* ---- undersider: fælles hoved, medaljer ---- */
.shero.compact { padding-bottom: 20px; }
.shero.compact .srow { margin-top: 12px; }
.head { background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.rk.g2 { background: #cfd5db; color: #384048; }
.rk.g3 { background: #dfa66a; color: #4d2f10; }
.board .r.me, .item.me { background: var(--accent-soft); }
.board .r { transition: background .2s; }
.seg { box-shadow: var(--shadow); }

/* ---- akkordark, toneart, sæt, live ---- */
.chip.key { background: var(--accent-soft); color: var(--accent-d); font-weight: 800; }
.num { width: 24px; height: 24px; border-radius: 8px; background: var(--soft); color: var(--muted); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.keysel { width: auto; padding: 5px 8px; border-radius: 10px; font-weight: 700; color: var(--accent-d); }
.ctl { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 14px; margin-bottom: 12px; }
.keynow { font-size: 30px; font-weight: 800; text-align: center; letter-spacing: -.02em; color: var(--accent-d); }
.keygrid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.keyb { padding: 8px 0; border-radius: 12px; font-weight: 700; text-align: center; }
.keyb.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.keyb.orig:not(.on) { border-color: var(--accent); }
.tog { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.tog input { width: 18px; height: 18px; padding: 0; accent-color: var(--accent); }
.sheet { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 16px 18px 6px; font-size: calc(17px * var(--fs, 1)); line-height: 1.3; overflow-wrap: anywhere; }
.csec { margin-bottom: 1.1em; }
.chead { font-weight: 800; color: var(--sc); text-transform: uppercase; font-size: .68em; letter-spacing: .09em; margin-bottom: .35em; display: flex; align-items: center; gap: 6px; }
.chead::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--sc); }
.cl { margin: .5em 0; }
.wd { display: inline-block; white-space: nowrap; vertical-align: bottom; }
.u { display: inline-flex; flex-direction: column; vertical-align: bottom; }
.ch { font-weight: 800; color: var(--accent-d); font-size: .84em; line-height: 1.2; min-height: 1.2em; padding-right: .4em; }
.tx { white-space: pre; }
.cl.only .wd { margin-right: .5em; }
.livecard { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 12px; text-align: left; border: 0; border-radius: 16px; padding: 14px 16px; background: linear-gradient(135deg, #e5483b, #c1281c); color: #fff; box-shadow: 0 8px 20px rgba(229,72,59,.35); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #ff453a; box-shadow: 0 0 0 0 rgba(255,69,58,.7); animation: live 1.4s infinite; flex: none; }
.livecard .dot { background: #fff; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(255,69,58,.6); } 70% { box-shadow: 0 0 0 9px rgba(255,69,58,0); } 100% { box-shadow: 0 0 0 0 rgba(255,69,58,0); } }
.livepanel { background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 14px 16px; margin-bottom: 4px; }
.livepanel.on { border-color: #e5483b; }
body.stage { background: #0c0d10; }
body.stage.stagelight { background: #fff; }
body.stage { --bg: #0c0d10; --card: #15171b; --ink: #f2f4f6; --muted: #98a1ab; --line: #272b31; --soft: #1e2126; --accent-d: #7fd0ff; --accent-soft: #14304a; --shadow: none; }
body.stage.stagelight { --bg: #fff; --card: #f6f7f8; --ink: #14171a; --muted: #6b747d; --line: #e1e4e7; --soft: #eceff1; --accent-d: #1b83c9; --accent-soft: #e2f2fd; }
.livebar { position: sticky; top: 0; z-index: 7; display: flex; align-items: center; gap: 6px; padding: 10px 0; background: var(--bg); }
.livebar .lt { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.livebar .ls { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.stage .glass { background: var(--soft); color: var(--ink); }
.keyrow { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 16px; padding: 8px 12px; margin-bottom: 12px; }
.lnav { position: fixed; left: 50%; transform: translateX(-50%); width: 100%; max-width: var(--w); bottom: 0; z-index: 9; display: flex; gap: 8px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); }
.lnav button { padding: 14px 20px; font-size: 18px; font-weight: 700; border-radius: 16px; }
.drawer { position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.55); display: flex; align-items: flex-end; justify-content: center; }
.dsheet { background: var(--card); width: 100%; max-width: var(--w); max-height: 75vh; overflow: auto; border-radius: 22px 22px 0 0; padding: 14px; color: var(--ink); }
.dsheet .item { border-radius: 12px; }
[hidden] { display: none !important; }
body.stage { color: var(--ink); }

/* ---- tempo, kreditering ---- */
.credits { margin: 12px 4px 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.bpmrow { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 16px; padding: 8px 14px; margin-bottom: 12px; }
.bpmn { font-size: 20px; font-weight: 800; color: var(--accent-d); letter-spacing: -.01em; }
.beat { width: 16px; height: 16px; border-radius: 50%; background: var(--accent-d); animation: beat linear infinite; flex: none; }
@keyframes beat { 0% { transform: scale(1.5); opacity: 1; } 25% { transform: scale(1); opacity: .35; } 100% { transform: scale(1); opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .beat { animation: none; opacity: 1; } }

/* ---- tryk-zoner, auto-scroll, noter ---- */
.zone { position: fixed; top: 64px; bottom: 92px; width: calc(var(--w) * .22); z-index: 1; pointer-events: none; }
.zl { left: max(0px, calc(50% - var(--w) / 2)); }
.zr { right: max(0px, calc(50% - var(--w) / 2)); }
.zone::after { position: absolute; top: 50%; transform: translateY(-50%); font-size: 46px; opacity: .1; line-height: 1; color: var(--ink); }
.zl::after { content: "‹"; left: 4px; }
.zr::after { content: "›"; right: 4px; }
.zone.flash { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.scrollrow { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 16px; padding: 8px 14px; margin-bottom: 12px; }
.scrollrow b { font-variant-numeric: tabular-nums; }
.sticky { background: #fdf0a0; color: #3b3200; border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; box-shadow: 0 6px 16px rgba(0,0,0,.18); transform: rotate(-.4deg); }
.sticky b { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; opacity: .7; margin-bottom: 2px; }
.sticky .nt { white-space: pre-wrap; font-size: 1.05em; }
/* kompakt live-top */
body.stage .keyrow, body.stage .bpmrow, body.stage .scrollrow { padding: 6px 12px; margin-bottom: 8px; border-radius: 14px; }
body.stage .keynow { font-size: 24px; }
body.stage .banner { margin-bottom: 8px; padding: 8px 12px; }
body.stage .livebar .lt .chip { font-size: 11px; padding: 1px 8px; }

.auth .logo { display: block; margin: 0 auto 12px; width: 96px; height: auto; }

.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; letter-spacing: -.01em; }
.brand img { height: 24px; width: auto; display: block; }

/* ---- offline ---- */
#offpill { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(68px + env(safe-area-inset-bottom)); z-index: 40; background: #24282d; color: #fff; padding: 7px 14px; border-radius: 99px; font-size: 12.5px; font-weight: 600; box-shadow: 0 6px 18px rgba(0,0,0,.3); white-space: nowrap; pointer-events: none; }
body.stage #offpill { bottom: calc(84px + env(safe-area-inset-bottom)); }
.offrow { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; margin: 10px 0 0; }

/* ---- delte noter fra MD ---- */
.mdnote { background: #fde0dc; color: #5a1710; border-left: 5px solid #e56052; border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; box-shadow: 0 6px 16px rgba(0,0,0,.14); }
.mdnote b { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #b3382a; margin-bottom: 2px; }
.mdnote .nt { white-space: pre-wrap; font-size: 1.08em; font-weight: 600; }
.mdline { font-size: 12.5px; color: #e56052; font-weight: 700; margin-top: 2px; white-space: pre-wrap; }
.linkbtn { background: none; border: 0; padding: 3px 0 0; color: var(--accent-d); font-size: 12.5px; font-weight: 700; cursor: pointer; border-radius: 0; }

/* ---- rækkefølge og "vi er her nu" ---- */
.csec.now { border-left: 5px solid var(--sc); padding-left: 10px; margin-left: -4px; background: color-mix(in srgb, var(--sc) 14%, transparent); border-radius: 10px; }
.csec.rep { margin-bottom: .6em; }
.csec.rep .chead { margin-bottom: 0; opacity: .75; }
.nowb { margin-left: auto; background: var(--sc); color: #fff; font-size: 10px; letter-spacing: .08em; padding: 1px 8px; border-radius: 99px; }
.repn { font-weight: 600; letter-spacing: 0; text-transform: none; opacity: .8; }
.chead.markable { cursor: pointer; padding: 4px 0; }
.sectrow { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 14px; padding: 6px 12px; margin-bottom: 8px; }
.flowline { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.flowpick { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---- næste sang i bunden ---- */
.lnav #setl { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 0; padding: 9px 14px; }
.lnav #setl .l1 { font-weight: 800; font-size: 17px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lnav #setl .l2 { font-size: 12.5px; font-weight: 600; color: var(--muted); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lnav #setl .sgn { color: var(--accent-d); }
.segueline { font-size: 12.5px; color: var(--accent-d); font-weight: 700; margin-top: 2px; }

/* ---- kompakt live-top ---- */
body.stage .livebar { padding: 8px 0; }
body.stage .livebar .ls { display: flex; align-items: center; gap: 6px; font-size: 15px; }
.lchips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; }
.lchips .nm { flex: 1 1 100%; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lchips .chip { border: 0; cursor: pointer; font-size: 12px; padding: 4px 10px; }
.lchips .chip.on { background: var(--accent); color: #fff; }
.ctlrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--card); border-radius: 14px; padding: 6px 10px; margin-bottom: 8px; }
.kgrp, .tgrp { display: flex; align-items: center; gap: 8px; }
.kc { display: flex; flex-direction: column; align-items: center; line-height: 1.1; min-width: 56px; }
.kc small, .tgrp small { font-size: 10.5px; color: var(--muted); }
body.stage .keynow { font-size: 22px; }
body.stage .bpmn { font-size: 18px; }
body.stage .mdnote, body.stage .sticky { padding: 7px 12px; margin-bottom: 8px; transform: none; box-shadow: none; }
body.stage .mdnote b, body.stage .sticky b { font-size: 10px; }
body.stage .mdnote .nt, body.stage .sticky .nt { font-size: 1em; }
body.stage .sectrow { padding: 4px 10px; margin-bottom: 8px; }

/* ---- noter låst under topbjælken i live ---- */
.pinned { position: sticky; top: var(--lbh, 50px); z-index: 6; background: var(--bg); padding: 2px 0 6px; max-height: 32vh; overflow-y: auto; }
.pinned .mdnote, .pinned .sticky { margin-bottom: 6px; padding: 6px 12px; line-height: 1.3; }
.pinned .mdnote:last-child, .pinned .sticky:last-child { margin-bottom: 0; }
.pinned .mdnote b, .pinned .sticky b { display: inline-block; margin: 0 8px 0 0; vertical-align: baseline; }
.pinned .nt { display: inline; white-space: pre-wrap; }

/* ---- kompakt tekst uden akkorder: så hele sangen kan være på en side ---- */
.sheet.plain { padding-top: 12px; padding-bottom: 2px; line-height: 1.22; }
.sheet.plain .cl { margin: .1em 0; }
.sheet.plain .csec { margin-bottom: .6em; }
.sheet.plain .chead { margin-bottom: .15em; }
.sheet.plain .csec.rep { margin-bottom: .3em; }

/* ---- tablets: bredere side og tekst i flere spalter ---- */
@media (min-width: 700px) { :root { --w: 720px; } }
@media (min-width: 1000px) { :root { --w: 820px; } }
body.stage { --w: min(100vw, 1500px); }
@media (min-width: 700px) {
  body.stage #app { padding-left: 24px; padding-right: 24px; }
  .sheet { column-width: 19em; column-gap: 40px; }
  .sheet .csec { break-inside: avoid; }
  .sheet .chead { break-after: avoid; }
  .rows { display: flex; flex-wrap: wrap; gap: 8px; }
  .rows > * { flex: 1 1 300px; margin-bottom: 0 !important; }
  .rows:empty { display: none; }
}
@media (max-width: 699px) { .rows > * { margin-bottom: 8px; } }

/* ---- tablets og computer: menuen står øverst, over listerne ---- */
@media (min-width: 700px) {
  .tabs { top: 0; bottom: auto; border-top: 0; border-bottom: 1px solid var(--line); padding-bottom: 0; padding-top: env(safe-area-inset-top); }
  .tabs button { flex-direction: row; justify-content: center; gap: 8px; font-size: 12px; padding: 15px 0 13px; border-top: 0; border-bottom: 2px solid transparent; }
  .tabs button.on { border-bottom-color: var(--accent); }
  #app:has(.tabs) { padding-top: calc(54px + env(safe-area-inset-top)); padding-bottom: 40px; }
  .fab { bottom: 28px; }
  #offpill { bottom: 20px; }
}

/* ---- live: hele sangen på én side i 2 kolonner (iPad og op) ---- */
@media (min-width: 700px) {
  .sheet.fit { column-count: 2; column-width: auto; column-gap: 44px; column-fill: auto; height: var(--fh); overflow: hidden; padding-bottom: 0; }
  .sheet.fit .csec { break-inside: auto; }
  .sheet.fit .cl { break-inside: avoid; }
  .sheet.fit .chead { break-after: avoid; }
  .livev .pinned { position: static; max-height: none; }
  .livev.fitv #lc > div[style*="height:100px"] { display: none; }
}

/* ---- øv akkorder ---- */
.cq .slot { display: inline-block; min-width: 2.2em; text-align: center; border-radius: 8px; background: var(--soft); color: var(--muted); padding: 0 .4em; }
.cq .slot.on { background: var(--accent); color: #fff; }
.cq b.ok { color: #1f9d55; }
.copts { display: flex; flex-wrap: wrap; gap: 8px; }
.copts button { min-width: 64px; padding: 12px 16px; font-size: 18px; font-weight: 700; border-radius: 14px; }
.copts button.bad { background: #fde8e8; color: #b42318; border-color: #f3b4b4; }
.cres { text-align: center; padding: 24px 0; }
.cres .ring { margin: 0 auto 12px; }

/* ---- tættere linjer ---- */
.sheet { line-height: 1.18; }
.cl { margin: .3em 0; }
.sheet.plain { line-height: 1.1; padding-top: 10px; }
.sheet.plain .cl { margin: 0; }
.csec { margin-bottom: .8em; }
.sheet.plain .csec { margin-bottom: .45em; }
.chead { margin-bottom: .2em; }
.sheet.plain .chead { margin-bottom: .1em; }

/* ---- tegning i live ---- */
.inkwrap { position: relative; }
.ink { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; overflow: visible; }
.ink path { fill: none; stroke-width: 3.2px; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; opacity: .92; }
.ink .gmd path { stroke: #ff3b30; }
.ink .gme path { stroke: #19b24b; }
.ink.on { pointer-events: auto; touch-action: none; cursor: crosshair; outline: 2px dashed color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: -2px; border-radius: 16px; }
.inktools { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 12; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; padding: 8px 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 6px 22px rgba(0,0,0,.35); max-width: calc(100vw - 20px); }
.inktools .seg { margin-bottom: 0; }
