/* Dance Diary – Stylesheet
   Marke: Orange aus dem ".d"-Logo, tiefes Marineblau. Kühles Papierweiss als Grund. */
:root {
  --navy: #14224a;
  --navy-2: #24366e;
  --orange: #e8730c;
  --orange-ink: #a94f06;      /* Orange als Textfarbe auf Weiss (Kontrast) */
  --paper: #f5f6f8;
  --surface: #ffffff;
  --ink: #1a2133;
  --muted: #5b6376;
  --line: #dfe3ea;
  --rule: #e9edf3;             /* Notizlinien */
  --danger: #b42318;
  --focus: #2f6fed;
  --radius-s: 6px;
  --radius-m: 10px;
  --shadow-pop: 0 12px 40px rgba(20, 34, 74, .22);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 var(--font); color: var(--ink); background: var(--paper); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0; }
a { color: var(--navy-2); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg { width: 1.1em; height: 1.1em; flex: none; }

/* ---------- Kopfzeile ---------- */
.topbar { background: var(--navy); color: #fff; border-bottom: 4px solid var(--orange); position: sticky; top: 0; z-index: 20; }
.topbar-inner { max-width: 1280px; margin: 0 auto; padding: 0 16px; height: 60px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand .logo { width: 34px; height: 34px; object-fit: contain; display: block; }
.brand-name { font-weight: 700; letter-spacing: -.01em; }
.mainnav { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.mainnav a, .nav-soon { padding: 8px 12px; border-radius: var(--radius-s); color: #d6dcf0; text-decoration: none; white-space: nowrap; }
.mainnav a:hover { background: var(--navy-2); color: #fff; }
.mainnav a[aria-current="page"] { color: #fff; background: var(--navy-2); box-shadow: inset 0 -3px 0 var(--orange); }
.nav-soon { color: #7f8bb3; cursor: default; }
.account { position: relative; }
.account summary { list-style: none; cursor: pointer; border-radius: 50%; }
.account summary::-webkit-details-marker { display: none; }
.avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 2px solid var(--orange); }
.avatar-initial { display: grid; place-items: center; background: var(--navy-2); font-weight: 700; }
.account-menu { position: absolute; right: 0; top: calc(100% + 10px); background: var(--surface); color: var(--ink); min-width: 240px;
  border-radius: var(--radius-m); box-shadow: var(--shadow-pop); padding: 14px 16px; }
.account-name { margin: 0 0 10px; font-weight: 600; }
.account-name small { display: block; font-weight: 400; color: var(--muted); }

/* ---------- Grundbausteine ---------- */
.page { max-width: 1280px; margin: 0 auto; padding: 20px 16px 64px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 16px;
  border-radius: var(--radius-s); border: 1px solid transparent; cursor: pointer; font-weight: 600; text-decoration: none; white-space: nowrap; }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: #d4660a; }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: #b9c1cf; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger-ghost { background: none; color: var(--danger); border-color: #f0c6c2; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--navy-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.icon-btn { background: none; border: 0; font-size: 28px; line-height: 1; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; color: var(--muted); }
.icon-btn:hover { background: var(--paper); }
.badge { background: var(--orange); color: #fff; border-radius: 999px; font-size: 12px; padding: 1px 7px; font-weight: 700; }
.stack { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.stack > *, .grid-2 > * { min-width: 0; }
.modal { max-height: calc(100vh - 32px); overflow: auto; }
.field { display: grid; gap: 5px; }
.field > span { font-size: 14px; font-weight: 600; color: var(--muted); }
.field input, .field select, .field textarea, .field-inline select, .dance-select select, .search input {
  width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); }
.field input:focus, .field select:focus { border-color: var(--focus); }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--orange); }
.notice { margin: 0; padding: 10px 12px; border-radius: var(--radius-s); }
.notice-error { background: #fdecea; color: var(--danger); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.checks { display: flex; gap: 24px; }
.spacer { flex: 1; }

/* ---------- Anmeldung ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background: #1a0a04 url("dance.jpg") center bottom / cover no-repeat; }
.login-panel { width: 100%; max-width: 380px; background: var(--surface); border-radius: var(--radius-m); padding: 28px; box-shadow: var(--shadow-pop); border-top: 4px solid var(--orange); }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.login-brand .logo { width: 44px; height: 44px; object-fit: contain; display: block; }
.login-brand h1 { font-size: 24px; letter-spacing: -.02em; color: var(--navy); }

/* ---------- Werkzeugleiste ---------- */
.toolbar { position: sticky; top: 64px; z-index: 10; background: var(--paper); padding: 6px 0 10px; margin-bottom: 4px; }
.toolbar-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-title { font-size: 26px; letter-spacing: -.02em; color: var(--navy); margin-right: 6px; }
.dance-select select { font-weight: 700; color: var(--navy); min-width: 190px; border-color: var(--navy); }
.search { position: relative; flex: 1; min-width: 200px; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); fill: none; stroke: var(--muted); stroke-width: 2; }
.search input { padding-left: 34px; }
.btn svg { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.toolbar-more { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin-top: 10px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); }
.field-inline { display: flex; align-items: center; gap: 8px; }
.field-inline span { font-size: 14px; color: var(--muted); font-weight: 600; }
.field-inline select { width: auto; min-width: 130px; }
.result-count { color: var(--muted); margin: 6px 0 12px; font-size: 14px; }
.empty { background: var(--surface); border: 1px dashed #c6cdd9; border-radius: var(--radius-m); padding: 32px; text-align: center; color: var(--muted); }

/* ---------- Videoliste ----------
   Kein Kartenraster: eine Liste wie in einem Notizbuch – Bild, Fakten, eigene Notiz. */
.video-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); }
.video { display: grid; grid-template-columns: 224px minmax(0, 1fr) minmax(0, 1.15fr); gap: 20px; padding: 16px; border-top: 1px solid var(--line); }
.video:first-child { border-top: 0; }
.video.is-inactive { opacity: .62; }
.thumb { position: relative; padding: 0; border: 0; border-radius: var(--radius-s); overflow: hidden; background: var(--navy); aspect-ratio: 16 / 9; cursor: pointer; align-self: start; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .play { position: absolute; inset: auto 8px 8px auto; width: 38px; height: 38px; border-radius: 50%; background: var(--orange); display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.thumb .play svg { fill: #fff; width: 18px; height: 18px; margin-left: 2px; }
.thumb:hover .play { transform: scale(1.08); }
.video-title { font-size: 18px; letter-spacing: -.01em; color: var(--navy); margin-bottom: 6px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 0; font-size: 14px; }
.facts div { display: contents; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.links { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 10px 0 0; }
.chip { font-size: 13px; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); }
.chip-figure { border-color: #c9d3ee; background: #eef2fb; color: var(--navy-2); }
.chip-diary { border-color: #f4d3b6; background: #fdf3ea; color: var(--orange-ink); }
.chip-audio button { background: none; border: 0; padding: 0; cursor: pointer; color: inherit; }
.edit { margin-top: 10px; font-size: 14px; }

/* Die eigene Notiz – das Erkennungsmerkmal: liniert wie ein Tagebuchblatt */
.note { position: relative; display: grid; gap: 6px; align-content: start; }
.note-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stars { display: flex; }
.star { background: none; border: 0; padding: 2px; cursor: pointer; line-height: 0; }
.star svg { width: 22px; height: 22px; fill: #d5dae3; }
.star.on svg { fill: var(--orange); }
.star:hover svg { fill: #f2a35c; }
.note-reife { border: 0; background: none; color: var(--muted); font-size: 14px; max-width: 55%; cursor: pointer; text-align: right; }
.note-label { border: 0; border-bottom: 1px solid var(--line); padding: 4px 0; font-size: 14px; font-weight: 600; color: var(--orange-ink); background: none; }
.note-label::placeholder { color: #a7aebb; font-weight: 400; }
.note-text { width: 100%; resize: vertical; min-height: 96px; border: 0; padding: 0 2px; line-height: 24px; background:
  repeating-linear-gradient(to bottom, transparent 0 23px, var(--rule) 23px 24px); background-attachment: local; }
.note-text::placeholder { color: #a7aebb; }
.note-label:focus, .note-text:focus { outline: none; }
.note:focus-within { box-shadow: -3px 0 0 var(--orange); padding-left: 10px; margin-left: -13px; }
.note-status { position: absolute; right: 0; bottom: -18px; font-size: 12px; color: var(--muted); }
.note-status.is-error { color: var(--danger); }

.thumb-empty { display: grid; place-items: center; cursor: default; background:
  repeating-linear-gradient(135deg, #eef1f6 0 10px, #e6eaf1 10px 20px); color: var(--muted); font-size: 13px; }
.chip-video { border-color: #c9d3ee; }
.chip-video button { background: none; border: 0; padding: 0; cursor: pointer; color: var(--navy-2); }
.chip-video button::before { content: "▶ "; color: var(--orange); font-size: 10px; }

/* Figuren: Leader/Follower nebeneinander – so, wie man Schritte notiert */
.arrow { color: var(--orange); font-weight: 700; padding: 0 2px; }
.lf { border-collapse: collapse; margin-top: 8px; font-size: 14px; }
.lf th, .lf td { padding: 2px 14px 2px 0; text-align: left; }
.lf thead th { color: var(--muted); font-weight: 600; font-size: 12px; }
.lf tbody th { color: var(--muted); font-weight: 400; }
.lf .rhythm { font-variant-numeric: tabular-nums; letter-spacing: .06em; font-weight: 600; color: var(--navy); }

.modal.modal-wide { width: min(680px, calc(100vw - 32px)); }
.tech { border: 1px solid var(--line); border-radius: var(--radius-m); padding: 12px 14px 14px; margin: 0; display: grid; gap: 12px; }
.tech legend { font-weight: 700; color: var(--navy); padding: 0 6px; }
.tech-grid { display: grid; grid-template-columns: auto 1fr 1fr; gap: 6px 10px; align-items: center; }
.tech-grid input { min-height: 38px; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--radius-s); width: 100%; }
.tech-head { font-size: 13px; font-weight: 600; color: var(--muted); }
.tech-row { font-size: 14px; color: var(--muted); }
.linker { border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 8px; }
.linker h3 { font-size: 16px; color: var(--navy); }
.hint, .muted { color: var(--muted); font-size: 14px; margin: 0; }
.linked, .results { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; grid-template-columns: minmax(0, 1fr); }
.linked li, .results li { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: var(--radius-s); background: var(--paper); }
.results { max-height: 220px; overflow: auto; }
.results li { background: none; border-bottom: 1px solid var(--rule); border-radius: 0; }
.linked-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.prio { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); cursor: pointer; }
.prio input { accent-color: var(--orange); }
.btn-small { min-height: 30px; padding: 0 10px; font-size: 13px; }
.search-small input { min-height: 36px; }

/* ---------- Tagebuch ---------- */
.toolbar-static { position: static; }
.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); padding: 2px; }
.segmented a, .segmented label { padding: 7px 14px; border-radius: 4px; text-decoration: none; color: var(--muted); font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.segmented a[aria-current="page"], .segmented label:has(input:checked) { background: var(--navy); color: #fff; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented-small label { padding: 5px 10px; font-size: 14px; }
.month-nav { display: flex; align-items: center; gap: 8px; flex: 1; }
.month-title { font-size: 20px; color: var(--navy); min-width: 170px; text-align: center; }
.btn-icon { width: 40px; padding: 0; font-size: 22px; }
.jump { margin-left: 8px; }

.calendar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; }
.cal-head, .cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head span { padding: 8px 10px; font-size: 13px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); }
.cal-day { min-height: 112px; padding: 6px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 3px; cursor: pointer; }
.cal-week .cal-day:last-child { border-right: 0; }
.cal-day:hover { background: #fafbfc; }
.cal-day.is-weekend { background: #fbfbfd; }
.cal-day.is-other .cal-num { color: #b6bdc9; }
.cal-num { font-size: 14px; font-weight: 600; color: var(--ink); align-self: flex-end; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; }
.cal-day.is-today .cal-num { background: var(--orange); color: #fff; }
.cal-entry { display: flex; align-items: baseline; gap: 5px; width: 100%; text-align: left; border: 0; border-radius: 4px; padding: 3px 6px; background: var(--orange); color: #fff; font-size: 13px; line-height: 1.3; cursor: pointer; }
.cal-entry:hover { background: #d4660a; }
.cal-entry time { font-weight: 700; font-variant-numeric: tabular-nums; }
.cal-entry span:not(.cal-dot) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.cal-dot { width: 6px; height: 6px; border-radius: 50%; background: #fff; flex: none; align-self: center; opacity: .85; }
.cal-day.is-other .cal-entry { opacity: .6; }

.list-month { font-size: 15px; color: var(--muted); margin: 22px 0 8px; font-weight: 600; }
.diary-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); }
.diary-item + .diary-item { border-top: 1px solid var(--line); }
.diary-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 16px; width: 100%; padding: 14px 16px; text-align: left; background: none; border: 0; cursor: pointer; }
.diary-row:hover { background: #fafbfc; }
.diary-date { display: grid; justify-items: center; align-content: start; border-right: 3px solid var(--orange); padding-right: 12px; }
.diary-date b { font-size: 26px; line-height: 1; color: var(--navy); }
.diary-date small { color: var(--muted); font-size: 13px; }
.diary-body { display: grid; gap: 2px; min-width: 0; }
.diary-title { font-weight: 700; color: var(--navy); font-size: 17px; }
.diary-meta { color: var(--muted); font-size: 14px; }
.diary-excerpt { color: var(--ink); font-size: 14px; margin-top: 4px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.diary-counts { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.chip-label { border-color: #f4d3b6; background: #fdf3ea; color: var(--orange-ink); font-size: 12px; }
.chip-video-count { border-color: #c9d3ee; background: #eef2fb; color: var(--navy-2); }
.diary-text { min-height: 168px; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 0 10px; background-color: var(--surface); }
.link-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.link-cols > div { display: grid; gap: 6px; align-content: start; min-width: 0; }
.link-search { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.link-search select { min-height: 36px; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 0 8px; background: var(--surface); }
.link-search .search { min-width: 180px; }
.linkplay { background: none; border: 0; padding: 0; cursor: pointer; text-align: left; color: var(--navy-2); }
.linkplay::before { content: "▶ "; color: var(--orange); font-size: 10px; }

/* ---------- Dialoge ---------- */
.modal { border: 0; border-radius: var(--radius-m); padding: 22px; width: min(560px, calc(100vw - 32px)); box-shadow: var(--shadow-pop); }
.modal::backdrop { background: rgba(14, 22, 48, .55); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.modal-head h2 { font-size: 20px; color: var(--navy); }
.modal-actions { display: flex; gap: 10px; align-items: center; margin-top: 6px; }
.modal-small { width: min(420px, calc(100vw - 32px)); }
.modal-video { width: min(960px, calc(100vw - 32px)); padding: 14px; background: var(--navy); color: #fff; }
.modal-video .modal-head h2 { color: #fff; font-size: 16px; }
.modal-video .icon-btn { color: #fff; }
.modal-video .icon-btn:hover { background: var(--navy-2); }
.player-frame { aspect-ratio: 16 / 9; }
.player-frame iframe { width: 100%; height: 100%; border: 0; border-radius: var(--radius-s); }
#audio-player:not([hidden]) { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); width: min(480px, calc(100vw - 32px)); z-index: 30; box-shadow: var(--shadow-pop); border-radius: 999px; }

/* ---------- Kleinere Bildschirme ---------- */
@media (max-width: 1000px) {
  .video { grid-template-columns: 180px minmax(0, 1fr); }
  .note { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .topbar-inner { gap: 12px; }
  .brand-name { display: none; }
  .toolbar { position: static; }
  .page-title { width: 100%; font-size: 22px; }
  .dance-select { flex: 1; }
  .dance-select select { min-width: 0; }
  .search { order: 5; flex-basis: 100%; }
  .video { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .video-list { border-radius: 0; margin: 0 -16px; border-left: 0; border-right: 0; }
  .thumb { width: 100%; }
  .thumb-empty { display: none; }
  .month-nav { order: 3; flex-basis: 100%; justify-content: space-between; }
  .month-title { min-width: 0; font-size: 18px; }
  .cal-day { min-height: 64px; padding: 3px; }
  .cal-num { width: 22px; height: 22px; font-size: 12px; align-self: center; }
  .cal-entry { padding: 0; height: 6px; font-size: 0; border-radius: 3px; }
  .cal-entry time, .cal-entry span { display: none; }
  .diary-row { grid-template-columns: 48px minmax(0, 1fr); }
  .diary-counts { grid-column: 2; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .link-cols { grid-template-columns: 1fr; }
  .tech-grid { grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .note:focus-within { margin-left: 0; padding-left: 8px; }
  .modal { padding: 16px; }
  .modal-actions { flex-wrap: wrap; }
  .modal-actions .btn-primary { flex: 1 1 100%; order: -1; }
  .modal-actions .btn-ghost { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Monatsliste unter dem Kalender nur auf dem Handy */
.month-agenda { display: none; margin-top: 14px; }
@media (max-width: 640px) { .month-agenda { display: block; } }

/* ---------- Listen (Playlists, Figurenlisten) ---------- */
.lead { color: var(--muted); max-width: 70ch; margin: 4px 0 18px; }
.list-section { font-size: 16px; color: var(--navy); margin: 22px 0 10px; }
.list-rows { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); }
.list-row { display: flex; gap: 16px; align-items: center; padding: 14px 16px; border-left: 4px solid var(--orange); }
.list-row + .list-row { border-top: 1px solid var(--line); }
.list-row.is-inactive { border-left-color: var(--line); }
.list-row.is-inactive .list-name { color: var(--muted); }
.list-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.list-name { font-size: 17px; color: var(--navy); overflow-wrap: anywhere; }
.list-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; margin: 0; font-size: 14px; color: var(--muted); }
.list-comment { margin: 2px 0 0; font-size: 14px; }
.list-actions { display: flex; gap: 8px; align-items: center; flex: none; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; color: var(--muted); }
.switch input { appearance: none; width: 38px; height: 22px; border-radius: 999px; background: #cfd5df; position: relative; cursor: pointer; transition: background .15s; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked { background: var(--orange); }
.switch input:checked::after { transform: translateX(16px); }
.share-grid { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; align-items: start; }
.qr { width: 200px; aspect-ratio: 1; border: 1px solid var(--line); border-radius: var(--radius-s); background: #fff; }
.qr svg { width: 100%; height: 100%; display: block; }
.share-grid p { margin: 0; }
.share-grid input[readonly] { font-size: 13px; color: var(--muted); }
.members { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; grid-template-columns: minmax(0, 1fr); }
.members li { display: flex; gap: 14px; align-items: center; padding: 8px 10px; background: var(--paper); border-radius: var(--radius-s); }
.member-name { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.member-name small { display: block; font-weight: 400; color: var(--muted); }
.move { border-top: 1px solid var(--line); padding-top: 12px; display: grid; gap: 6px; }
.move h3, .share-dialog h3, #share-dialog h3 { font-size: 16px; color: var(--navy); }
@media (max-width: 640px) {
  .list-row { flex-wrap: wrap; }
  .list-actions { width: 100%; }
  .share-grid { grid-template-columns: 1fr; justify-items: center; }
}

/* Einladung */
.join-panel { max-width: 440px; }
.join-intro { margin: 0 0 16px; font-size: 17px; }
.join-tabs { width: 100%; margin-bottom: 14px; }
.join-tabs a { flex: 1; justify-content: center; }

/* ---------- Einstellungen ---------- */
.account-link { display: block; padding: 6px 0; color: var(--navy-2); }
.settings { max-width: 860px; }
.settings .page-title { margin: 6px 0 12px; }
.settings-nav { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 18px; font-size: 14px; }
.settings-nav a { color: var(--muted); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.settings-nav a:hover { color: var(--navy); border-bottom-color: var(--orange); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 20px 22px; margin-bottom: 16px; scroll-margin-top: 80px; display: grid; gap: 12px; }
.panel h2 { font-size: 19px; color: var(--navy); }
.panel p { margin: 0; }
.narrow { max-width: 420px; }
.form-foot { display: flex; align-items: center; gap: 14px; }
.avatar-edit { display: flex; align-items: center; gap: 18px; }
.avatar-big { width: 88px; height: 88px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--navy); color: #fff; font-size: 34px; font-weight: 700; border: 3px solid var(--orange); flex: none; }
.avatar-big img { width: 100%; height: 100%; object-fit: cover; }
.file-btn { position: relative; overflow: hidden; width: max-content; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-btn:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.field input[readonly] { background: var(--paper); color: var(--muted); }
.place { position: relative; }
.place-results { position: absolute; z-index: 5; left: 0; right: 0; top: 100%; margin: 4px 0 0; padding: 4px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); box-shadow: var(--shadow-pop); max-height: 260px; overflow: auto; }
.place-results li { padding: 7px 10px; border-radius: 4px; cursor: pointer; }
.place-results li:hover, .place-results li:focus { background: var(--paper); outline: none; color: var(--navy); }
.usage { border-collapse: collapse; width: 100%; max-width: 560px; font-size: 15px; }
.usage th, .usage td { text-align: left; padding: 6px 12px 6px 0; border-bottom: 1px solid var(--rule); }
.usage thead th { font-size: 13px; color: var(--muted); font-weight: 600; }
.usage tbody th { font-weight: 400; }
.usage td { font-variant-numeric: tabular-nums; }
.usage-bar { width: 30%; }
.usage-bar span { display: block; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--orange) var(--p), var(--rule) var(--p)); }
.downloads { display: flex; flex-wrap: wrap; gap: 10px; }
.place label span { font-size: 14px; font-weight: 600; color: var(--muted); }
.place { display: grid; gap: 5px; align-content: start; }
.avatar-big img, .avatar { font-size: 0; }
.notice-ok { background: #e7f6ee; color: #14613a; }
.login-links { text-align: center; }

/* ---------- Audios ---------- */
.row-actions { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin-top: 10px; }
.row-actions .edit { margin-top: 0; }
.audio-btn, .link-btn { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; }
.audio-btn svg, .link-btn svg { fill: none; stroke: var(--orange); stroke-width: 2; width: 16px; height: 16px; stroke-linecap: round; }
.audio-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
.audio-item { border: 1px solid var(--line); border-left: 4px solid var(--orange); border-radius: var(--radius-s); padding: 10px 12px; display: grid; gap: 8px; }
.audio-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.audio-name { font-weight: 600; color: var(--navy); border: 0; border-bottom: 1px dashed transparent; padding: 2px 0; background: none; font-size: 15px; min-width: 0; flex: 1; }
input.audio-name:hover, input.audio-name:focus { border-bottom-color: var(--line); outline: none; }
.audio-item audio { width: 100%; height: 36px; }
.transcript { display: grid; gap: 6px; }
.transcript textarea { min-height: 72px; }
.danger-link { color: var(--danger); }
.recorder { border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 10px; }
.rec-idle, .rec-live { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.rec-review { display: grid; gap: 10px; }
.rec-review audio { width: 100%; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #fff; display: inline-block; }
.rec-dot.is-live { background: var(--danger); animation: rec 1.2s ease-in-out infinite; width: 14px; height: 14px; }
.rec-time { font-size: 28px; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; min-width: 80px; }
@keyframes rec { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .rec-dot.is-live { animation: none; } }

/* ---------- Steuertabellen ---------- */
.page-wide { max-width: 1500px; }
.ctl-info { display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: center; justify-content: space-between; }
.ctl-hint { margin: 2px 0 8px; }
.ctl-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); }
.ctl { border-collapse: collapse; width: 100%; font-size: 14px; }
.ctl th { position: sticky; top: 0; background: var(--paper); text-align: left; font-weight: 600; color: var(--muted); padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ctl td { padding: 4px 6px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.ctl tr:last-child td { border-bottom: 0; }
.ctl input:not([type="checkbox"]), .ctl select, .ctl textarea { width: 100%; min-width: 150px; min-height: 34px; padding: 5px 8px; border: 1px solid transparent; border-radius: var(--radius-s); background: transparent; font: inherit; color: inherit; }
.ctl input[type="number"] { min-width: 70px; }
.ctl textarea { min-width: 220px; resize: vertical; }
.ctl input:not([type="checkbox"]):hover, .ctl select:hover, .ctl textarea:hover { border-color: var(--line); }
.ctl input:focus, .ctl select:focus, .ctl textarea:focus { border-color: var(--navy-2); background: var(--surface); outline: none; }
.ctl input:disabled, .ctl select:disabled, .ctl textarea:disabled { color: var(--muted); }
.ctl .ctl-bool, .ctl td:has(> input[type="checkbox"]) { text-align: center; }
.ctl input[type="checkbox"] { width: 18px; height: 18px; margin-top: 8px; accent-color: var(--orange); }
.ctl .ctl-act { white-space: nowrap; text-align: right; width: 1%; }
.ctl-new td { background: #fff7ef; }
.ctl-state { font-size: 12px; color: var(--muted); margin-right: 6px; display: inline-block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.ctl-state.is-ok { color: #2e7d4f; }
.ctl-state.is-error { color: #b42318; white-space: normal; }
.ctl-del { color: var(--muted); }
.ctl-del:hover { color: #b42318; }
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin: 16px 0; }

.audio-offer { margin-top: 8px; padding: 10px 12px; border-radius: var(--radius-s); background: #fff7ef; border: 1px solid #f3d3b3; display: grid; gap: 8px; }
.audio-offer p { margin: 0; font-size: 14px; }
.audio-offer-done { color: #2e7d4f; }

/* ---------- Video aufnehmen ---------- */
.capture .cam { position: relative; background: #0b1124; border-radius: var(--radius-m); overflow: hidden; aspect-ratio: 16 / 9; display: grid; place-items: center; }
.capture .cam video { width: 100%; height: 100%; object-fit: contain; background: #0b1124; }
.capture .cam-badge { position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(0, 0, 0, .6); color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }
.capture .cam-empty { color: #c9d1e6; margin: 0; }
.capture .cam-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.capture progress { width: 100%; height: 14px; accent-color: var(--orange); }
.capture [data-up-warn] { margin: 0; padding-left: 18px; }
@media (max-width: 640px) {
  .capture .cam { aspect-ratio: 3 / 4; }
  .capture .cam-actions .btn { flex: 1 1 100%; justify-content: center; }
}

/* ---------- Songs (Spotify) ---------- */
.range-group { display: flex; align-items: center; gap: 6px; }
.range-group > span:first-child { font-size: 14px; color: var(--muted); font-weight: 600; }
.range-group input { width: 72px; min-height: 36px; padding: 4px 8px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); }
.songs-flash { margin: 6px 0 10px; }
.songs-page .empty { margin-bottom: 14px; }
.songs-page .empty .btn { margin-top: 8px; }

.sync-panel { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--orange); border-radius: var(--radius-m); padding: 14px 16px; margin: 6px 0 14px; display: grid; gap: 8px; }
.sync-head { display: flex; justify-content: space-between; align-items: center; color: var(--navy); }
.sync-panel progress { width: 100%; height: 8px; accent-color: var(--orange); }
.sync-panel .is-error { color: var(--danger); }
.sync-log { margin: 0; padding-left: 18px; }

.pl-strip { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 12px; margin-bottom: 4px; scroll-snap-type: x proximity; }
.pl-card { flex: 0 0 120px; display: grid; gap: 4px; scroll-snap-align: start; }
.pl-card.is-current .pl-cover { box-shadow: 0 0 0 3px var(--orange); }
.pl-card.is-locked { opacity: .6; }
.pl-cover, .song-cover { position: relative; padding: 0; border: 0; border-radius: var(--radius-s); overflow: hidden; background: var(--navy); aspect-ratio: 1; cursor: pointer; width: 100%; }
.pl-cover img, .song-cover img { width: 100%; height: 100%; object-fit: cover; }
.pl-noimg { display: grid; place-items: center; width: 100%; height: 100%; color: #fff; font-size: 30px; }
.pl-cover .play, .song-cover .play { position: absolute; right: 6px; bottom: 6px; width: 32px; height: 32px; border-radius: 50%; background: var(--orange); display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.pl-cover .play svg, .song-cover .play svg { fill: #fff; width: 15px; height: 15px; margin-left: 2px; }
.pl-cover:hover .play, .song-cover:hover .play { transform: scale(1.08); }
.pl-name { font-size: 14px; font-weight: 600; color: var(--navy); text-decoration: none; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pl-name:hover { text-decoration: underline; }
.pl-meta { font-size: 12px; color: var(--muted); }

.pl-current { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; justify-content: space-between; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 12px 16px; margin-bottom: 10px; }
.pl-current h2 { font-size: 20px; color: var(--navy); }
.pl-actions { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }

.songs-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; }
.songs-head .result-count { margin: 6px 0; }
.sort select { min-height: 36px; padding: 4px 8px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); }
.select-all { display: flex; gap: 18px; align-items: center; margin: 0 0 8px; font-size: 14px; }

.video.song { grid-template-columns: 22px 72px minmax(0, 1fr) minmax(0, 1fr); gap: 14px 16px; }
.song-check { padding-top: 4px; }
.song-check input { width: 18px; height: 18px; accent-color: var(--orange); cursor: pointer; }
.song-cover { width: 72px; height: 72px; align-self: start; }
.song .video-title { font-size: 17px; margin-bottom: 2px; }
.song-sub { margin: 0 0 8px; font-size: 14px; }
.explicit { display: inline-block; font-size: 10px; line-height: 14px; padding: 0 4px; border-radius: 2px; background: var(--muted); color: #fff; vertical-align: 2px; }
.features { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 13px; }
.bpm { color: var(--navy); }
.bpm strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.key { color: var(--muted); }
.meter { display: inline-grid; grid-template-columns: auto 48px 22px; align-items: center; gap: 6px; color: var(--muted); }
.meter-bar { height: 6px; border-radius: 3px; background: var(--rule); overflow: hidden; }
.meter-bar span { display: block; height: 100%; background: var(--orange); border-radius: 3px; }
.meter-val { font-variant-numeric: tabular-nums; text-align: right; color: var(--ink); }
.song .links { margin-top: 8px; }
.song .chip a { color: inherit; text-decoration: none; }
.song .chip a:hover { text-decoration: underline; }
.song-dances { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.dance-chips { list-style: none; display: contents; padding: 0; margin: 0; }
.chip-dance { display: inline-flex; align-items: center; gap: 2px; border-color: #f4d3b6; background: #fdf3ea; color: var(--orange-ink); font-weight: 600; padding-right: 3px; }
.chip-dance button { background: none; border: 0; cursor: pointer; color: inherit; font-size: 15px; line-height: 1; padding: 0 4px; border-radius: 50%; }
.chip-dance button:hover { background: #f8dcc2; }
.song-dances select { min-height: 32px; padding: 2px 6px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); font-size: 14px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 16px; color: var(--muted); }

.selection-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; z-index: 31; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: var(--radius-m); box-shadow: var(--shadow-pop); width: max-content; max-width: calc(100vw - 32px); }
.selection-bar select { max-width: 170px;  min-height: 30px; border-radius: var(--radius-s); border: 0; padding: 2px 6px; font-size: 14px; color: var(--ink); }
.selection-bar .linkbtn { color: #d6dcf0; font-size: 14px; }
.sp-player { position: fixed; right: 16px; bottom: 16px; z-index: 30; width: min(420px, calc(100vw - 32px)); background: var(--navy); border-radius: var(--radius-m); box-shadow: var(--shadow-pop); padding: 6px 8px 8px; }
.sp-player-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #fff; font-size: 13px; padding-left: 4px; }
.sp-player-head span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-player .icon-btn { color: #fff; width: 32px; height: 32px; font-size: 22px; }
.sp-player .icon-btn:hover { background: var(--navy-2); }
.sp-player iframe { display: block; border: 0; border-radius: 12px; width: 100%; }
body.has-player .songs-page { padding-bottom: 220px; }
body.has-player .selection-bar { bottom: 200px; }
body.has-selection .songs-page { padding-bottom: 120px; }

@media (max-width: 1000px) {
  .video.song { grid-template-columns: 22px 72px minmax(0, 1fr); }
  .video.song .note { grid-column: 3 / -1; }
}
@media (max-width: 640px) {
  .video.song { grid-template-columns: 22px 56px minmax(0, 1fr); gap: 10px 12px; }
  .video.song .note { grid-column: 1 / -1; }
  .song-cover { width: 56px; height: 56px; }
  .range-group input { width: 64px; }
  .songs-page [data-sync] .btn-label { display: none; }
  .songs-page [data-sync] { padding: 0 12px; }
  .pl-card { flex-basis: 100px; }
  .sp-player { right: 8px; left: 8px; width: auto; bottom: 8px; }
  .selection-bar { bottom: 8px; left: 8px; right: 8px; transform: none; width: auto; }
  body.has-player .selection-bar { bottom: 190px; }
}
.pl-dance { color: var(--orange-ink); font-weight: 600; }

/* Auf Sonos abspielen (Spotify Connect) */
.remote-btn { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; }
.remote-btn svg { fill: none; stroke: var(--orange); stroke-width: 2; width: 16px; height: 16px; }
.btn.remote-btn svg { stroke: var(--orange); }
.pl-card .remote-btn { font-size: 12px; }
.pl-card .remote-btn svg { width: 13px; height: 13px; }
.device-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.device { width: 100%; display: grid; gap: 2px; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); cursor: pointer; }
.device strong { color: var(--navy); }
.device span { font-size: 13px; color: var(--muted); }
.device:hover { border-color: var(--orange); }
.device.is-last { border-left: 4px solid var(--orange); }
.device.is-busy { opacity: .6; cursor: progress; }
.remote-bar { position: fixed; left: 16px; bottom: 16px; z-index: 30; width: min(440px, calc(100vw - 32px)); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "icon info close" "btns btns btns"; align-items: center; gap: 4px 10px;
  background: var(--navy); color: #fff; border-radius: var(--radius-m); box-shadow: var(--shadow-pop); padding: 8px 10px; }
.remote-icon { grid-area: icon; line-height: 0; }
.remote-icon svg { fill: none; stroke: var(--orange); stroke-width: 2; width: 22px; height: 22px; }
.remote-info { grid-area: info; display: grid; min-width: 0; font-size: 13px; }
.remote-info span, .remote-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.remote-info span { color: #d6dcf0; }
.remote-buttons { grid-area: btns; display: flex; gap: 4px; align-items: center; }
.remote-bar .icon-btn { color: #fff; width: 36px; height: 36px; font-size: 18px; }
.remote-bar .icon-btn:hover { background: var(--navy-2); }
.remote-bar [data-rb-close] { grid-area: close; font-size: 22px; }
.remote-bar input[type=range] { grid-row: 2; grid-column: 2 / -1; justify-self: end; width: 140px; accent-color: var(--orange); }
.remote-error { grid-column: 1 / -1; margin: 0; font-size: 12px; color: #ffc9b8; }
body.has-remote .songs-page { padding-bottom: 220px; }
body.has-remote .selection-bar { bottom: 130px; }
@media (max-width: 1100px) { body.has-remote.has-player .sp-player { bottom: 140px; } }
@media (max-width: 640px) {
  .remote-bar { left: 8px; right: 8px; width: auto; bottom: 8px; }
  body.has-remote .selection-bar { bottom: 128px; }
  body.has-remote.has-player .sp-player { bottom: 128px; }
  body.has-remote.has-player .selection-bar { bottom: 310px; }
}
.bridge { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--paper); }
.bridge.is-hint { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(232, 115, 12, .2); }
#remote-dialog h3 { font-size: 15px; color: var(--navy); }
.bridge .btn { justify-self: start; }
.device.is-bridge { opacity: .7; }


/* Songs ↔ Videos, Beliebtheit */
.chip-song { border-color: #bfe3cc; background: #edf8f1; color: #1d5b36; }
.chip-song a { color: inherit; text-decoration: none; }
.chip-song a:hover { text-decoration: underline; }
.chip-song a::before { content: "♪ "; }
.meter-pop .meter-bar span { background: var(--navy-2); }
.linked a.linked-title { color: var(--navy-2); text-decoration: none; }
.linked a.linked-title:hover { text-decoration: underline; }
.link-cols:has(> div:nth-child(3)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.link-cols:has(> div:only-child) { grid-template-columns: 1fr; }
@media (max-width: 720px) { .link-cols:has(> div:nth-child(3)) { grid-template-columns: 1fr; } }
