/* Schriften liegen lokal in vendor/fonts (lateinischer Zeichensatz, variabel). */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-weight: 500 700;
  font-display: swap;
  src: url('vendor/fonts/BricolageGrotesque-latin.woff2') format('woff2');
}
@font-face {
  font-family: Inter;
  font-weight: 400 600;
  font-display: swap;
  src: url('vendor/fonts/Inter-latin.woff2') format('woff2');
}

:root {
  --bg: #121010;
  --card: #1d1916;
  --nav: #171412;
  --line: #332b26;
  --line-soft: #2a2420;
  --line-strong: #5a4e45;
  --text: #f5eee6;
  --soft: #d8c8b6;
  --muted: #b3a596;
  --accent: #f2a33a;
  --accent-ink: #1b1206;
  --good: #7ad69a;
  --good-ink: #0f1f15;
  --bad: #ef6b5a;
  --display: 'Bricolage Grotesque', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --body: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 var(--body);
}

#app {
  max-width: 560px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 20px) 16px calc(env(safe-area-inset-bottom) + 96px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

header h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 40px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
header h1.h-sm {
  font-size: 30px;
  line-height: 1.1;
}
header p {
  margin: 6px 0 0;
  color: var(--muted);
}
header p.eyebrow,
.label {
  margin: 0 0 2px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
header p.eyebrow.keep {
  text-transform: none;
}
header p.eyebrow.accent {
  color: var(--accent);
}
header.split {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
}
h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 21px;
  line-height: 1.2;
}
h3 {
  margin: 10px 0 -4px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.card h3 {
  margin: 0;
}
p {
  margin: 0;
}

.ic {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ic.solid {
  fill: currentColor;
  stroke: none;
}

/* Sechs Saiten als Markenzeichen im Kopf */
.strings-mark {
  width: 96px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-bottom: 6px;
}
.strings-mark i {
  height: 1px;
  background: var(--line-strong);
}
.strings-mark i:nth-child(n + 3) {
  height: 2px;
}
.strings-mark i:nth-child(n + 5) {
  height: 3px;
}
.strings-mark i:last-child {
  background: var(--accent);
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.card.center {
  align-items: center;
  text-align: center;
}
.card.center > button {
  align-self: stretch;
}
.muted {
  color: var(--muted);
  font-size: 13px;
}
.error {
  color: var(--bad);
  font-size: 14px;
}

.row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.row.between {
  justify-content: space-between;
  align-items: center;
}
.row > button.primary,
.row > button.secondary {
  flex: 1 1 140px;
}
.row.links {
  gap: 4px 18px;
  margin-top: -8px;
}
.row.links .link {
  min-height: 44px;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.primary,
.secondary {
  min-height: 52px;
  padding: 12px 18px;
  border-radius: 16px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}
.primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.primary.big {
  min-height: 56px;
  font-size: 17px;
}
.secondary {
  background: transparent;
  border: 1px solid var(--line-strong);
}
.primary:active,
.secondary:active,
.chip:active,
.round:active {
  transform: scale(0.97);
}
.link {
  color: var(--muted);
  padding: 4px 0;
  font-size: 13px;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.link:hover {
  color: var(--text);
}
.center-btn {
  align-self: center;
  padding: 10px;
  min-height: 44px;
}

/* Runde Tasten (Einheit, Player) */
.round {
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  display: grid;
  place-items: center;
}
.round.big {
  width: 72px;
  height: 72px;
  border: 0;
  background: var(--accent);
  color: var(--accent-ink);
}
.round.big .ic {
  width: 28px;
  height: 28px;
}
.round.sq {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: none;
  color: var(--muted);
}
.round:disabled {
  opacity: 0.4;
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chip {
  position: relative;
  overflow: hidden;
  padding: 8px 16px;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
.chip.on {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
  font-weight: 600;
}
.chip.accent {
  border-color: var(--accent);
  color: var(--accent);
}
.chip.good {
  background: var(--good);
  border-color: var(--good);
  color: var(--good-ink);
  font-weight: 600;
}
.chip.add {
  border-style: dashed;
  border-color: var(--line-strong);
}
.chip .lv {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 4px;
  width: 0;
  background: var(--good);
  transition: width 0.1s linear;
}

/* Umschalter mit festen Optionen */
.seg {
  display: flex;
  padding: 3px;
  border-radius: 13px;
  background: var(--bg);
  border: 1px solid var(--line);
}
.seg button {
  flex: 1 0 auto;
  min-width: 44px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}
.seg.wide button {
  min-height: 44px;
  font-size: 14px;
}
.seg button.on {
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
}

/* Saitenwahl */
.strings {
  align-self: stretch;
  display: flex;
  gap: 6px;
}
.strings button {
  flex: 1;
  min-width: 0;
  min-height: 56px;
  border-radius: 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-weight: 600;
  font-size: 17px;
}
.strings button i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3d342e;
}
.strings .auto {
  flex: 1.5;
  font-size: 14px;
}
.strings button.on {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}
.strings button.heard {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.strings button.heard i {
  background: var(--accent);
}
.strings button.tuned i {
  background: var(--good);
}

/* Heute */
.streak {
  flex-direction: row;
  gap: 18px;
  align-items: stretch;
}
.streak-num {
  flex: 0 0 112px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}
.streak-num b {
  font-family: var(--display);
  font-size: 68px;
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.streak-num strong,
.streak-num span {
  display: block;
  font-weight: 600;
}
.streak-num span {
  font-weight: 400;
}
.week {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.day .col {
  width: 100%;
  height: 84px;
  display: flex;
  align-items: flex-end;
}
.day i {
  width: 100%;
  height: 20px;
  border-radius: 7px;
  background: var(--line-soft);
}
.day.done i {
  background: var(--accent);
}
.day.today:not(.done) i {
  height: 100%;
  background: none;
  border: 1.5px dashed var(--accent);
}
.day.today span {
  color: var(--text);
  font-weight: 600;
}

.planbar {
  display: flex;
  gap: 3px;
  height: 6px;
}
.planbar i {
  border-radius: 3px;
  overflow: hidden;
  background: #a38d79;
}
.planbar i:first-child {
  background: #7a6a5c;
}
.planbar i:last-child {
  background: var(--soft);
}
.planbar i.new {
  background: var(--accent);
}
.planbar.live i {
  background: var(--line);
}
.planbar.live i.past {
  background: var(--muted);
}
.planbar.live u {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.25s linear;
}

.plan {
  list-style: none;
  margin: 0;
  padding: 0;
}
.plan li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid var(--line-soft);
}
.plan li:first-child {
  border-top: 0;
  padding-top: 0;
}
.plan li > div {
  flex: 1;
  min-width: 0;
}
.plan .min {
  flex: 0 0 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.plan li.new .min {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.plan small,
.topic small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.plan li.new small,
.topic.learning small {
  color: var(--accent);
}
.plan b {
  display: block;
  font-weight: 600;
}
.plan .link {
  min-height: 44px;
  flex: none;
}

.nudge {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px dashed var(--line-strong);
  text-align: left;
}
.nudge > .ic:first-child {
  color: var(--accent);
}
.nudge > .ic:last-child {
  color: var(--muted);
}
.nudge div {
  flex: 1;
}
.nudge b {
  display: block;
  font-weight: 600;
  font-size: 14px;
}
.nudge span {
  color: var(--muted);
  font-size: 13px;
}

/* Einheit */
.s-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.s-prog {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.s-prog .muted {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.ring {
  position: relative;
  align-self: center;
  width: 236px;
  max-width: 64vw;
  aspect-ratio: 1;
  margin: 6px 0;
}
.ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.ring circle {
  fill: none;
  stroke-width: 5;
}
.ring .track,
.mini-ring .track {
  stroke: var(--line-soft);
}
.ring .prog {
  stroke: var(--accent);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.25s linear;
}
.ring-in {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--muted);
  font-size: 13px;
}
#s-time {
  font-family: var(--display);
  font-size: 64px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.transport {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}
.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 36px;
  min-height: 24px;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -1px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--line-soft);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
}
.upnext {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 0 4px;
  font-size: 13px;
  color: var(--muted);
}
.upnext b {
  flex: 1;
  min-width: 0;
  color: var(--text);
  font-weight: 600;
}

/* Stimmgerät */
.listening {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 10px;
  margin-bottom: 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.listening i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--good);
}
.meterbox {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.dial {
  position: relative;
  width: 100%;
  max-width: 330px;
  aspect-ratio: 330 / 204;
}
.dial svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke-linecap: round;
}
.dial .arc {
  stroke: var(--line);
  stroke-width: 10;
}
.dial .zone {
  stroke: var(--good);
  stroke-width: 10;
}
.dial .tick {
  stroke: #6d5f54;
  stroke-width: 2;
}
.dial .tick.mid {
  stroke: var(--text);
}
.dial text {
  fill: var(--muted);
  font: 12px var(--body);
  text-anchor: middle;
}
.needle {
  stroke: var(--accent);
  stroke-width: 5;
  transform-origin: 165px 180px;
  transition: transform 0.12s ease-out;
}
.dial-in {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.note {
  font-family: var(--display);
  font-size: clamp(64px, 24vw, 96px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.03em;
}
.cents {
  color: var(--muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.hint {
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 20px;
  background: var(--bg);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-wrap: balance;
}
.tool .hint {
  background: var(--card);
}
.meterbox.idle .note,
.meterbox.idle .needle {
  opacity: 0.3;
}
.meterbox.idle .hint {
  border-color: var(--line);
  color: var(--muted);
  font-weight: 400;
}
.meterbox.ok .note {
  color: var(--good);
}
.meterbox.ok .hint {
  border-color: var(--good);
  color: var(--good);
}
.meterbox.ok .needle {
  stroke: var(--good);
}

/* Setup & Lernen */
.mini-ring {
  position: relative;
  width: 60px;
  height: 60px;
  flex: none;
}
.mini-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.mini-ring circle {
  fill: none;
  stroke-width: 5;
}
.mini-ring .prog {
  stroke: var(--good);
  stroke-linecap: round;
}
.mini-ring span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.stepper {
  padding: 4px 16px;
  gap: 0;
}
.stepper > .step + .step {
  border-top: 1px solid var(--line-soft);
}
.step-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 8px 0;
  text-align: left;
  width: 100%;
}
.step-head b {
  flex: 1;
  font-weight: 500;
}
.step-head > div {
  flex: 1;
  min-width: 0;
}
.step-head > div b {
  display: block;
}
.step-head .state {
  font-size: 13px;
  color: var(--muted);
  display: flex;
}
.step.open > .step-head b {
  font-family: var(--display);
  font-weight: 700;
  font-size: 21px;
  line-height: 1.2;
}
.step.open > .step-head .state {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.num {
  flex: 0 0 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
}
.num .ic {
  width: 16px;
  height: 16px;
  stroke-width: 3;
}
.step.open .num {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.step.done .num {
  background: var(--good);
  border-color: var(--good);
  color: var(--bg);
}
.step.done:not(.open) > .step-head b,
.topic.done:not(.open) b {
  color: var(--muted);
}
.step-body {
  padding: 2px 0 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.step-body > p {
  color: var(--soft);
  font-size: 14px;
}
.step-body > p.tools,
.tools {
  color: var(--muted);
  font-size: 13px;
}
.field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 600;
}
.field.warn {
  border-color: var(--accent);
}
.field.good {
  border-color: var(--good);
}
.field em {
  display: block;
  font-style: normal;
  font-weight: 400;
  color: var(--muted);
  font-size: 12px;
}
.field .inp {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: var(--muted);
  font-weight: 400;
}
.field input {
  width: 72px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font-family: var(--display);
  font-weight: 700;
  font-size: 30px;
  text-align: right;
}
.field input::placeholder {
  color: var(--line-strong);
}
.field.stacked {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  font-weight: 400;
  color: var(--muted);
  font-size: 13px;
}
.field select,
#p-track {
  min-height: 46px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  width: 100%;
}
.fb {
  font-size: 13px;
  margin-top: -6px;
  padding: 0 4px;
}
.fb.good {
  color: var(--good);
}
.fb.warn {
  color: var(--accent);
}
.tool {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  text-align: center;
}
.tool > button {
  align-self: stretch;
}
.tool .strings button {
  background: var(--card);
}
.tool .strings button.on {
  background: var(--text);
}

/* Navigation */
#nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  background: color-mix(in srgb, var(--nav) 90%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
#nav[hidden] {
  display: none;
}
#nav button {
  flex: 1;
  max-width: 140px;
  min-height: 64px;
  padding: 10px 0 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
}
#nav svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#nav button.on {
  color: var(--accent);
  font-weight: 600;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

/* Songs */
.filebtn {
  cursor: pointer;
}
label.secondary.filebtn {
  flex: 1 1 140px;
}
.songs,
.binds {
  display: flex;
  flex-direction: column;
}
.song,
.bind {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 0;
  border-top: 1px solid var(--line-soft);
}
.song-open {
  flex: 1;
  text-align: left;
  min-width: 0;
  min-height: 44px;
}
.song b,
.bind b {
  display: block;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.song small,
.bind small {
  color: var(--muted);
  font-size: 13px;
}
.bind > div {
  flex: 1;
}
.bind.learning small {
  color: var(--accent);
}

/* Player */
#player {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px 40px;
}
.p-bar {
  position: sticky;
  top: 0;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: calc(env(safe-area-inset-top) + 12px) 0 10px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.p-top {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
#p-title {
  flex: 1;
  min-width: 120px;
  font-family: var(--display);
  font-size: 22px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
#p-track {
  width: auto;
  max-width: 220px;
  min-height: 44px;
  background: var(--card);
}
#p-session {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
#p-session:empty {
  display: none;
}
.p-deck {
  display: flex;
  align-items: center;
  gap: 10px 24px;
  flex-wrap: wrap;
}
.p-transport,
.p-tempo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.p-transport .round {
  width: 44px;
  height: 44px;
  background: none;
}
.p-transport .round.big {
  width: 56px;
  height: 56px;
  background: var(--accent);
}
.p-transport .round.big .ic {
  width: 24px;
  height: 24px;
}
#p-time {
  min-width: 84px;
  font-size: 14px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.p-tempo {
  flex: 1 1 150px;
  max-width: 340px;
}
.p-tempo-mid {
  flex: 1;
  min-width: 68px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
#p-speed {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  white-space: nowrap;
}
#p-speed b {
  font-weight: 600;
  font-size: 17px;
}
#p-speed small {
  color: var(--muted);
  font-size: 12px;
}
.p-speedbar {
  position: relative;
  height: 6px;
  border-radius: 3px;
  background: var(--line);
}
.p-speedbar i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
  transition: width 0.15s ease-out;
}
/* Marke bei 100 % (Bereich 25–150 %) */
.p-speedbar::after {
  content: '';
  position: absolute;
  left: 60%;
  top: -4px;
  width: 2px;
  height: 14px;
  background: var(--muted);
}
.p-groups {
  flex: 1 1 100%;
  display: flex;
  gap: 8px 18px;
  overflow-x: auto;
  scrollbar-width: none;
}
.p-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
.p-bar .chips {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.p-bar .chip {
  white-space: nowrap;
  flex: none;
  border-radius: 12px;
  padding: 8px 14px;
  color: var(--soft);
}
.p-bar .chip.on {
  color: var(--bg);
}
.p-bar .chip.accent {
  color: var(--accent);
}
.p-bar .chip.good {
  color: var(--good-ink);
}
@media (min-width: 900px) {
  .p-groups {
    flex: 1 1 420px;
    flex-direction: column;
    overflow: visible;
  }
  .p-group {
    flex-wrap: wrap;
  }
  .p-group .label {
    flex: 0 0 48px;
    margin: 0;
  }
}
#p-status {
  min-height: 19px;
}
.p-paper {
  margin-top: 12px;
  padding: 8px;
  border-radius: 18px;
  background: #f7f3ec;
  color: #111;
  overflow-x: auto;
}
.at-cursor-bar {
  background: rgba(242, 163, 58, 0.22);
}
.at-cursor-beat {
  background: #c2410c;
  width: 3px;
}
/* Markierter Abschnitt: dezent im Farbton der App statt Blau, damit es nicht wie ein Darstellungsfehler wirkt. */
.at-selection div {
  background: rgba(194, 65, 12, 0.1);
}
/* Beim Ziehen über die Noten keinen Text markieren. */
.p-paper {
  user-select: none;
  -webkit-user-select: none;
}
.at-highlight * {
  fill: #c2410c;
  stroke: #c2410c;
}

[hidden] {
  display: none !important;
}

/* Mitspiel-Auswertung */
.hits {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  flex-wrap: wrap;
  font-size: 14px;
  font-weight: 600;
}
.hits i {
  width: 7px;
  height: 8px;
  border-radius: 2px;
  background: #6d5f54;
}
.hits i.h {
  height: 16px;
  background: var(--good);
}
.hits span {
  margin-left: 8px;
}

/* Player auf dem Handy: Transport und Tempo in einer Zeile */
@media (max-width: 599px) {
  .p-deck {
    gap: 10px 8px;
  }
  .p-transport {
    gap: 8px;
  }
  .p-transport .round.big {
    width: 52px;
    height: 52px;
  }
  #p-time {
    min-width: 0;
    font-size: 12px;
  }
  .p-tempo {
    flex: 0 1 auto;
    gap: 4px;
    margin-left: auto;
  }
  .p-tempo-mid {
    min-width: 52px;
  }
  .p-speedbar {
    display: none;
  }
  #p-speed {
    flex-direction: column;
    align-items: center;
    gap: 0;
  }
}
details summary {
  cursor: pointer;
  color: var(--accent);
}
details p {
  margin-top: 8px;
}

/* Band-Raum */
#player.guest [data-p='playPause'],
#player.guest [data-p='restart'],
#player.guest .p-speed button,
#player.guest #p-loop,
#player.guest #p-ramp,
#player.guest #p-metro,
#player.guest #p-countIn,
#player.guest #p-clear,
#player.guest #p-sections {
  display: none;
}
#p-room {
  color: var(--accent);
  font-size: 14px;
}
.members {
  display: flex;
  flex-direction: column;
}
.member {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.member span {
  color: var(--muted);
}
.field input.wide {
  width: 180px;
  text-align: left;
}
.addr {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--text);
  overflow-wrap: anywhere;
}

/* Mixer */
.mixer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  max-height: 46vh;
  overflow-y: auto;
}
.mx-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.mx-name {
  flex: 0 0 150px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}
.mx-name em {
  font-style: normal;
  color: var(--accent);
  font-size: 12px;
}
.mx-master .mx-name {
  font-weight: 700;
}
.mx-row input[type='range'] {
  flex: 1 1 140px;
  min-width: 100px;
  accent-color: var(--accent);
}
.mx-row output {
  flex: 0 0 52px;
  text-align: right;
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.chip.sm {
  min-height: 32px;
  min-width: 36px;
  padding: 4px 10px;
  font-size: 13px;
}
.mx-audio {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--line-soft);
}
.mx-sub .mx-name {
  color: var(--muted);
}
.mx-off {
  width: 70px;
  min-height: 32px;
  padding: 4px 8px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  text-align: right;
}
.mx-sub select {
  min-height: 32px;
  padding: 4px 8px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  max-width: 220px;
}
.mixer label.chip {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}
@media (max-width: 560px) {
  .mx-name {
    flex-basis: 100%;
  }
}

/* Tonhöhe, Griffbrett, Timing, Akkorde */
.p-pitch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  white-space: nowrap;
}
.fretboard {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}
.fret-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 13px;
  min-height: 20px;
}
.fret-head b {
  font-size: 16px;
  color: var(--accent);
}
.fret-scroll {
  overflow-x: auto;
}
.fretboard svg {
  display: block;
  width: 100%;
}
.fretboard .st {
  stroke: var(--line-strong);
  stroke-width: 1.6;
}
.fretboard .fr {
  stroke: var(--line);
  stroke-width: 2;
}
.fretboard .nut {
  stroke: var(--soft);
  stroke-width: 5;
}
.fretboard .inlay {
  fill: var(--line-soft);
}
.fretboard text {
  fill: var(--muted);
  font-size: 11px;
}
.fretboard text.num,
.fretboard text.fn {
  text-anchor: middle;
}
.fretboard .bar {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  opacity: 0.55;
}
.fretboard .now {
  fill: var(--accent);
}
.fretboard text.fn {
  fill: var(--accent-ink);
  font-weight: 700;
}
.hits .timing {
  flex-basis: 100%;
  margin-left: 0;
  color: var(--soft);
}
.tap-info {
  flex: 1 1 200px;
  color: var(--accent);
  font-size: 13px;
}
.chord-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 8px;
}
.chord {
  margin: 0;
  text-align: center;
}
.chord svg {
  width: 100%;
  max-width: 110px;
}
.chord .grid line {
  stroke: var(--line-strong);
  stroke-width: 1;
}
.chord .nut {
  stroke: var(--text);
  stroke-width: 4;
}
.chord .dot {
  fill: var(--accent);
}
.chord .open {
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.4;
}
.chord text {
  fill: var(--muted);
  font-size: 11px;
  text-anchor: middle;
}
.chord text.base {
  text-anchor: start;
  font-size: 10px;
}
.chord figcaption {
  font-weight: 650;
  font-size: 14px;
}

/* Notenansicht: Zoom, Leiste einklappen, Desktop über den ganzen Bildschirm */
.p-zoom {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--soft);
}
#p-zoom {
  min-width: 44px;
  text-align: center;
}
#player.compact .p-groups,
#player.compact #p-status,
#player.compact #p-room,
#player.compact #p-sections,
#player.compact #p-view,
#player.compact #p-mixer-panel {
  display: none;
}
@media (min-width: 900px) {
  /* Wie in einem Notenprogramm: Leiste oben fest, das Blatt füllt den Rest und scrollt selbst. */
  #player:not([hidden]) {
    max-width: none;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0 16px 12px;
  }
  #player .p-bar {
    position: static;
    flex: none;
    max-height: 62vh;
    overflow-y: auto;
  }
  #player .p-paper {
    flex: 1;
    min-height: 0;
    margin-top: 10px;
    overflow: auto;
  }
  #player.compact .p-bar {
    padding-bottom: 6px;
  }
}
.mx-n {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-right: 6px;
  border-radius: 6px;
  background: var(--line);
  color: var(--soft);
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
}

/* Anmeldung und Konto */
.authform {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}
.authfield {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: var(--soft);
}
.authfield input {
  min-height: 48px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 16px;
}
.member .link {
  display: inline;
  padding: 0;
}

/* Band: Raumleiste, Notizen, Setlisten */
.p-bandbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 14px;
}
.p-bandbar #p-room {
  flex: 1 1 200px;
}
.note-text {
  flex: 1 1 160px;
}
.song small {
  display: block;
}
.row select,
.authform select,
.authform input[type='date'] {
  flex: 1 1 140px;
  min-height: 46px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
.song .link:disabled {
  opacity: 0.3;
}

/* ---------- Großer Bildschirm (Desktop, 27"–32") ----------
   Navigation als Seitenleiste, Ansichten mehrspaltig. Die Ansicht steht in #app[data-view].
   Ab sehr breiten Fenstern wird der Inhalt zusätzlich vergrößert (--z), damit er auf
   einem 5K- oder 4K-Bildschirm aus normalem Abstand gut lesbar bleibt. */
@media (min-width: 1100px) {
  :root {
    --side: 236px;
    --z: 1;
  }
  body {
    font-size: 16px;
  }
  body:has(#nav:not([hidden])) {
    padding-left: var(--side);
  }

  #nav {
    top: 0;
    right: auto;
    width: var(--side);
    flex-direction: column;
    justify-content: flex-start;
    gap: 4px;
    padding: 30px 14px;
    border-top: 0;
    border-right: 1px solid var(--line);
    background: var(--nav);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  #nav::before {
    content: 'Saitenweise';
    padding: 0 12px 26px;
    font-family: var(--display);
    font-weight: 700;
    font-size: 24px;
    letter-spacing: -0.01em;
  }
  #nav button {
    flex: none;
    max-width: none;
    min-height: 48px;
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    padding: 0 12px;
    border-radius: 12px;
    font-size: 15px;
  }
  #nav button:hover {
    color: var(--text);
  }
  #nav button.on {
    background: var(--card);
  }

  #app {
    zoom: var(--z);
    display: block;
    max-width: 1240px;
    padding: 44px 48px 72px;
  }
  #app > * + * {
    margin-top: 16px;
  }
  header h1 {
    font-size: 52px;
  }
  header h1.h-sm {
    font-size: 40px;
  }
  header p {
    font-size: 17px;
  }
  header p.eyebrow {
    font-size: 13px;
  }
  #app > header {
    margin-bottom: 12px;
  }
  .card {
    padding: 22px 24px 24px;
  }
  .stepper {
    padding: 6px 22px;
  }
  .muted {
    font-size: 14px;
  }

  /* Raster: Kopf über alles, danach zwei Spalten. Die letzte Zeile (1fr) nimmt den
     Höhenunterschied auf, damit die kürzere Spalte nicht auseinandergezogen wird. */
  #app[data-view='heute'],
  #app[data-view='tuner'],
  #app[data-view='setup'],
  #app[data-view='session'] {
    display: grid;
    column-gap: 24px;
    align-items: start;
    grid-template-rows: repeat(7, auto) 1fr;
  }

  /* Heute: links Serie und Hinweise, rechts die Einheit */
  #app[data-view='heute'] {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  }
  #app[data-view='heute'] > * {
    grid-column: 1;
  }
  #app[data-view='heute'] > header {
    grid-column: 1 / -1;
  }
  #app[data-view='heute'] > .streak + .card {
    grid-column: 2;
    grid-row: 2 / -1;
  }
  .streak {
    gap: 28px;
  }
  .streak-num {
    flex-basis: 150px;
  }
  .streak-num b {
    font-size: 96px;
  }
  .day .col {
    height: 120px;
  }
  .plan li {
    padding: 13px 0;
  }
  .plan b {
    font-size: 17px;
  }

  /* Stimmgerät: links die Anzeige, rechts Einstellungen */
  #app[data-view='tuner'] {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  }
  #app[data-view='tuner'] > * {
    grid-column: 2;
  }
  #app[data-view='tuner'] > header {
    grid-column: 1 / -1;
  }
  #app[data-view='tuner'] > .card.center {
    grid-column: 1;
    grid-row: 2 / -1;
    padding: 32px;
    gap: 18px;
  }
  #app[data-view='tuner'] .card.center + .card {
    margin-top: 16px;
  }
  #app[data-view='tuner'] .dial {
    max-width: 520px;
  }
  #app[data-view='tuner'] .note {
    font-size: 150px;
  }
  #app[data-view='tuner'] .cents {
    font-size: 18px;
  }
  #app[data-view='tuner'] .hint {
    min-height: 48px;
    padding: 10px 22px;
    border-radius: 24px;
    font-size: 18px;
  }
  #app[data-view='tuner'] .card.center .strings {
    max-width: 520px;
    align-self: center;
    width: 100%;
  }
  #app[data-view='tuner'] .card.center .strings button {
    min-height: 68px;
    font-size: 20px;
  }
  #app[data-view='tuner'] .card.center > button {
    align-self: center;
    width: 100%;
    max-width: 520px;
  }

  /* Setup: links Gitarre und Überblick (bleibt stehen), rechts die Schritte */
  #app[data-view='setup'] {
    grid-template-columns: 340px minmax(0, 1fr);
    column-gap: 40px;
  }
  #app[data-view='setup'] > * {
    grid-column: 1;
  }
  #app[data-view='setup'] > .stepper {
    grid-column: 2;
    grid-row: 1 / -1;
    margin-top: 0;
    max-width: 780px;
  }
  .step-head {
    min-height: 60px;
  }
  .step-head b {
    font-size: 17px;
  }
  .step.open > .step-head b {
    font-size: 24px;
  }
  .step-body {
    gap: 14px;
    padding-bottom: 22px;
  }
  .step-body > p {
    font-size: 16px;
    max-width: 68ch;
  }
  .steps li {
    max-width: 68ch;
  }

  /* Lernen: eine Spalte je Stufe */
  #app[data-view='lernen'] {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 24px;
    align-items: start;
  }
  #app[data-view='lernen'] > * {
    grid-column: 1 / -1;
  }
  #app[data-view='lernen'] > .primary {
    justify-self: start;
    padding-inline: 28px;
  }
  #app[data-view='lernen'] > h3 {
    grid-column: auto;
    grid-row: 4;
    margin: 28px 0 0;
  }
  #app[data-view='lernen'] > .stepper {
    grid-column: auto;
    grid-row: 5;
  }
  #app[data-view='lernen'] > .card:not(.stepper) {
    grid-row: 6;
  }

  /* Einstellungen und Fortschritt: viele Karten, deshalb in Spalten fließen lassen */
  #app[data-view='settings'],
  #app[data-view='stats'] {
    columns: 2;
    column-gap: 24px;
  }
  #app[data-view='settings'] > header,
  #app[data-view='stats'] > header,
  #app[data-view='stats'] > .tiles {
    column-span: all;
    margin-bottom: 28px;
  }
  #app[data-view='settings'] > *,
  #app[data-view='stats'] > * {
    break-inside: avoid;
  }
  #app[data-view='settings'] > .card,
  #app[data-view='stats'] > .card {
    margin: 0 0 20px;
  }

  /* Einheit: links die Uhr, rechts die Anleitung */
  #app[data-view='session'] {
    max-width: 1120px;
    padding-top: 9vh;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 56px;
    grid-template-rows: auto auto auto auto 1fr;
  }
  #app[data-view='session'] > .s-top {
    grid-column: 1 / -1;
    margin-bottom: 28px;
  }
  #app[data-view='session'] > .ring {
    grid-column: 1;
    grid-row: 2 / 4;
    justify-self: center;
    width: 380px;
    margin: 0;
  }
  #app[data-view='session'] > .transport {
    grid-column: 1;
    grid-row: 4;
    margin-top: 28px;
  }
  #app[data-view='session'] > header {
    grid-column: 2;
    grid-row: 2;
    align-self: end;
  }
  #app[data-view='session'] > .card {
    grid-column: 2;
    grid-row: 3;
    font-size: 17px;
  }
  #app[data-view='session'] > .upnext {
    grid-column: 2;
    grid-row: 4;
    font-size: 15px;
  }
  #app[data-view='session'] #s-time {
    font-size: 104px;
  }
  #app[data-view='session'] .ring-in {
    font-size: 16px;
  }
  #app[data-view='session'] .planbar {
    height: 8px;
  }
  .transport .round {
    width: 60px;
    height: 60px;
  }
  .transport .round.big {
    width: 84px;
    height: 84px;
  }

  /* Anmeldung und Abschluss: eine ruhige, schmale Spalte */
  #app[data-view='gate'],
  #app[data-view='done'] {
    max-width: 620px;
    padding-top: 12vh;
  }
}

/* 27" 5K und 32" 4K im Vollbild (rund 2560 px breit): alles etwas größer */
@media (min-width: 1700px) {
  :root {
    --z: 1.12;
    --side: 256px;
  }
  #nav {
    padding: 36px 16px;
  }
  #nav::before {
    font-size: 27px;
  }
  #nav button {
    min-height: 54px;
    font-size: 17px;
  }
  #nav svg {
    width: 26px;
    height: 26px;
  }
  #app[data-view='settings'] {
    max-width: 1500px;
    columns: 3;
  }
}
@media (min-width: 2200px) {
  :root {
    --z: 1.3;
    --side: 288px;
  }
  #nav::before {
    font-size: 30px;
  }
  #nav button {
    min-height: 60px;
    font-size: 19px;
    gap: 14px;
  }
  #nav svg {
    width: 28px;
    height: 28px;
  }
}

/* Auch die Bedienleiste des Players wächst auf großen Bildschirmen mit (das Notenblatt hat seinen eigenen Zoom). */
@media (min-width: 1700px) {
  #player .p-bar {
    zoom: var(--z);
  }
}
.chip.rec {
  border-color: var(--bad);
  color: var(--bad);
}
.p-bar .chip.rec {
  border-color: var(--bad);
  color: var(--bad);
}

/* Fortschritt */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}
.tile {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--line);
}
.tile b {
  font-family: var(--display);
  font-size: 26px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.tile span {
  color: var(--soft);
  font-size: 14px;
}
.tile small {
  color: var(--muted);
  font-size: 12px;
}
.chart {
  width: 100%;
  display: block;
  overflow: visible;
}
.chart .axis {
  stroke: var(--line);
  stroke-width: 1;
}
.chart .bar {
  fill: var(--accent);
  opacity: 0.55;
}
.chart .bar.now,
.chart g:hover .bar {
  opacity: 1;
}
.chart .hit {
  fill: transparent;
}
.chart text {
  fill: var(--muted);
  font-size: 11px;
  text-anchor: middle;
  font-variant-numeric: tabular-nums;
}
.chart text.val {
  fill: var(--text);
  font-weight: 650;
}
.chart text.end {
  text-anchor: start;
  font-size: 12px;
}
.chart .line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.chart .pt {
  fill: transparent;
}
.chart .pt.now {
  fill: var(--accent);
  stroke: var(--card);
  stroke-width: 2;
}
.chart.spark {
  width: 260px;
  max-width: 55%;
  flex: none;
}
.prog {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line-soft);
}
.prog small {
  display: block;
  color: var(--muted);
  font-size: 13px;
}
.hbars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hbar {
  display: grid;
  grid-template-columns: minmax(90px, 34%) 1fr auto;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}
.hbar span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hbar i {
  height: 10px;
  border-radius: 0 4px 4px 0;
  background: var(--accent);
}
.hbar b {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--soft);
}
table.plain {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 13px;
}
table.plain th,
table.plain td {
  text-align: left;
  padding: 4px 0;
  border-bottom: 1px solid var(--line-soft);
}
table.plain td:last-child,
table.plain th:last-child {
  text-align: right;
}

/* Trainer */
.tr-q {
  font-family: var(--display);
  font-size: 26px;
  line-height: 1.25;
  text-wrap: balance;
}
.tr-q b {
  color: var(--accent);
}

/* Spuren und Mixer als schmale Leiste rechts neben den Noten */
.p-main {
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  margin-top: 12px;
}
.p-main .p-paper {
  margin-top: 0;
}
.mixer.side {
  gap: 6px;
  padding: 10px;
  max-height: 40vh;
  font-size: 13px;
}
.mixer.side .mx-row {
  gap: 6px;
}
.mixer.side .mx-name {
  flex: 1 1 100%;
  font-size: 13px;
}
.mixer.side .mx-track .mx-name {
  flex: 1 1 0;
}
.mixer.side input[type='range'] {
  flex: 1 1 80px;
  min-width: 60px;
  height: 18px;
}
.mixer.side output {
  flex: 0 0 40px;
  font-size: 12px;
}
.mixer.side .chip.sm {
  min-height: 26px;
  min-width: 28px;
  padding: 2px 7px;
  font-size: 12px;
  border-radius: 8px;
}
.mixer.side .label small {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  color: var(--muted);
}
.mx-pick {
  text-align: left;
  color: var(--soft);
  padding: 3px 0;
}
.mx-track.shown .mx-pick {
  color: var(--accent);
  font-weight: 700;
}
.mx-track {
  padding: 4px 0;
  border-top: 1px solid var(--line-soft);
}
.mx-eye {
  flex: none;
  width: 22px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.mx-eye.on {
  color: var(--accent);
}
.mixer.side .mx-n {
  width: 18px;
  height: 18px;
  font-size: 10px;
  margin-right: 5px;
}
.mixer.side select,
.mixer.side .mx-off {
  min-height: 28px;
  font-size: 12px;
  max-width: 100%;
}
#player.compact .p-main .mixer.side {
  display: flex;
}
@media (min-width: 900px) {
  #player .p-main {
    flex: 1;
    min-height: 0;
    flex-direction: row;
    margin-top: 10px;
  }
  #player .p-main .p-paper {
    flex: 1;
    min-width: 0;
    min-height: 0;
    overflow: auto;
  }
  #player .mixer.side {
    flex: 0 0 280px;
    max-height: none;
    overflow-y: auto;
    align-self: stretch;
  }
  #player .mixer.side[hidden] {
    display: none;
  }
  /* Die Spurwahl steckt in der Leiste – das Auswahlfeld oben nur zeigen, wenn sie zu ist. */
  #player.side-open #p-track {
    display: none;
  }
  #p-track {
    max-width: 170px;
    min-height: 34px;
    padding: 4px 8px;
    font-size: 13px;
  }
}
@media (min-width: 900px) {
  #player .p-main .p-paper {
    margin-top: 0;
  }
}
/* Spurname bekommt die erste Zeile; Regler, Stumm und Solo stehen darunter. */
.mixer.side .mx-track .mx-name {
  flex: 1 1 calc(100% - 34px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Song-Bibliothek */
.filebtn.small {
  min-height: 40px;
  padding: 8px 14px;
  font-size: 14px;
  flex: none;
}
.libsearch {
  flex: 2 1 220px;
  min-height: 46px;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
.song.lib {
  flex-wrap: wrap;
}
.song.lib.open {
  background: color-mix(in srgb, var(--accent) 5%, transparent);
  margin: 0 -10px;
  padding-left: 10px;
  padding-right: 10px;
  border-radius: 12px;
}
.star {
  flex: 0 0 28px;
  font-size: 18px;
  color: var(--muted);
  text-align: center;
}
.star.on {
  color: var(--accent);
}
.song-details {
  flex: 1 1 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 6px 0 4px 40px;
}
.song-details h3 {
  margin: 4px 0 -4px;
}
table.meta th {
  width: 34%;
  font-weight: 500;
  color: var(--muted);
  vertical-align: top;
  padding-right: 10px;
}
table.plain.meta td:last-child {
  text-align: left;
}
@media (max-width: 560px) {
  .song-details {
    padding-left: 0;
  }
}
.mx-src {
  flex: 1 1 90px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--accent);
  font-size: 12px;
}
.mx-file {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

/* Balance-Regler im Mixer */
.mx-pan {
  flex: 1 1 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}
.mx-pan input[type='range'] {
  flex: 1 1 80px;
  min-width: 60px;
  height: 16px;
  accent-color: var(--soft);
}
.mx-pan output {
  flex: 0 0 46px;
  text-align: right;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.mx-pan input:disabled {
  opacity: 0.35;
}

/* Bedienleiste oben am Desktop kompakter */
@media (min-width: 900px) {
  #player .p-bar {
    gap: 6px;
    padding-top: 8px;
    padding-bottom: 6px;
  }
  #player .p-top {
    gap: 8px;
  }
  #player #p-title {
    font-size: 17px;
  }
  #player .round {
    width: 36px;
    height: 36px;
  }
  #player .round.big {
    width: 46px;
    height: 46px;
  }
  #player .round.sq {
    width: 30px;
    height: 30px;
    border-radius: 10px;
  }
  #player .round .ic {
    width: 18px;
    height: 18px;
  }
  #player .round.big .ic {
    width: 22px;
    height: 22px;
  }
  #player .p-bar .chip {
    min-height: 28px;
    padding: 3px 10px;
    font-size: 12.5px;
    border-radius: 9px;
  }
  #player .p-bar .chip.sm {
    min-height: 24px;
    min-width: 26px;
    padding: 2px 7px;
    font-size: 12px;
  }
  #player .p-deck {
    gap: 6px 16px;
  }
  #player .p-groups {
    gap: 4px 14px;
  }
  #player .p-group {
    gap: 5px;
  }
  #player .p-group .label {
    flex-basis: 40px;
    font-size: 10.5px;
  }
  #player #p-speed b {
    font-size: 15px;
  }
  #player #p-status,
  #player .p-bandbar,
  #player .p-pitch {
    font-size: 12.5px;
  }
  #player #p-status {
    min-height: 16px;
  }
}

/* Griffbrett: kompakter und besser erkennbar */
.fretboard svg {
  max-width: 860px;
}
.fretboard .st {
  stroke: var(--soft);
  stroke-width: 1.4;
  opacity: 0.55;
}
.fretboard .fr {
  stroke: var(--line-strong);
}
.fretboard .inlay {
  fill: var(--line);
}
.fretboard .capo {
  fill: var(--muted);
  opacity: 0.7;
}
.fretboard .bar {
  stroke-width: 2;
  opacity: 0.75;
}

/* ---------- Navigation mit Band und Einstellungen ---------- */
#nav .l {
  display: none;
}
@media (max-width: 1099px) {
  #nav button {
    min-width: 0;
  }
}
@media (min-width: 1100px) {
  #nav .l {
    display: inline;
  }
  #nav .s {
    display: none;
  }
  /* Einstellungen sitzen unten in der Seitenleiste, getrennt von den Arbeitsbereichen */
  #nav button[data-v='settings'] {
    margin-top: auto;
  }

  /* Band: links Bands und Mitglieder, rechts der Raum */
  #app[data-view='band'] {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
    column-gap: 24px;
    align-items: start;
  }
  #app[data-view='band'] > header {
    grid-column: 1 / -1;
  }
  #app[data-view='band'] > .card {
    margin-top: 16px;
  }
  /* ohne Konto oder Band steht nur eine Karte da */
  #app[data-view='band'] > .card:only-of-type {
    grid-column: 1 / -1;
    max-width: 720px;
  }
}

/* ---------- Metronom in der Übeeinheit ---------- */
.metro {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 14px;
}
.metro .chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.metro small {
  flex-basis: 100%;
  text-align: center;
}
.metro-bpm {
  display: flex;
  align-items: center;
  gap: 4px;
}
.metro-bpm span {
  min-width: 92px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.metro-bpm b {
  font-family: var(--display);
  font-size: 26px;
  line-height: 1;
  color: var(--text);
}
.beat {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.25;
}
.beat.hit {
  opacity: 1;
}
.beat.hit.one {
  transform: scale(1.6);
}
@media (min-width: 1100px) {
  #app[data-view='session'] > .metro {
    grid-column: 1;
    grid-row: 5;
    margin-top: 28px;
  }
  #app[data-view='session'] .metro-bpm b {
    font-size: 32px;
  }
}

/* ---------- Fortschritt: Kurzfassung auf „Heute“ und Übekalender ---------- */
.teaser .chart {
  margin-top: 4px;
}
.cal {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: calc(var(--weeks) * 24px);
}
.cal-months,
.cal-grid {
  display: grid;
  grid-template-columns: repeat(var(--weeks), minmax(0, 1fr));
  gap: 3px;
}
.cal-months {
  font-size: 11px;
  color: var(--muted);
}
.cal-months span {
  white-space: nowrap;
}
.cal-grid {
  grid-auto-flow: column;
  grid-template-rows: repeat(7, auto);
}
.cal-grid i {
  aspect-ratio: 1;
  border-radius: 3px;
  background: var(--line-soft);
}
.cal-legend i {
  border-radius: 3px;
  background: var(--line-soft);
}
.cal-grid i.off {
  background: none;
}
.cal i.l1,
.cal-legend i.l1 {
  background: color-mix(in srgb, var(--accent) 30%, var(--card));
}
.cal i.l2,
.cal-legend i.l2 {
  background: color-mix(in srgb, var(--accent) 55%, var(--card));
}
.cal i.l3,
.cal-legend i.l3 {
  background: color-mix(in srgb, var(--accent) 78%, var(--card));
}
.cal i.l4,
.cal-legend i.l4 {
  background: var(--accent);
}
.cal-legend {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.cal-legend i {
  display: inline-block;
  width: 12px;
  height: 12px;
}

/* ---------- Lernpläne ---------- */
.plan-pick {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 12px;
}
.plan-pick .link,
.card > .link {
  min-height: 32px;
}
.plan-edit input,
.plan-edit select,
.plan-edit textarea {
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 15px;
}
.plan-edit textarea {
  resize: vertical;
  line-height: 1.4;
}
.plan-edit .plan-name {
  flex: 1 1 160px;
  min-width: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
}
.plan-days {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.plan-days .chip {
  min-width: 44px;
  min-height: 40px;
}
.plan-blocks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.plan-blocks li {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid var(--line-soft);
}
.plan-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.plan-row select {
  flex: 1 1 200px;
  min-width: 0;
}
.plan-min {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}
.plan-min input {
  width: 68px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.plan-row .round.sq {
  width: 40px;
  height: 40px;
}
.plan-row .round:disabled {
  opacity: 0.3;
  cursor: default;
}
@media (min-width: 1100px) {
  #app[data-view='plans'] {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 24px;
    align-items: start;
  }
  #app[data-view='plans'] > header,
  #app[data-view='plans'] > .row,
  #app[data-view='plans'] > p.card {
    grid-column: 1 / -1;
  }
  #app[data-view='plans'] > p.card {
    max-width: 720px;
  }
}
#app[data-view='plans'] > .row > .primary {
  flex: 0 0 auto;
  padding-inline: 28px;
}
