:root {
  /* Palette „Variante A – Editorial Vinyl" */
  --bg: #14181C;            /* Midnight (Hintergrund) */
  --surface: #1f2937;       /* Surface (Karten/Felder) */
  --surface-2: #2a3647;     /* etwas hellere Fläche (Badges, Tabs) */
  --border: #2f3a49;
  --text: #f3f4f6;          /* Off White (Text + Icons) */
  --muted: #8e97ad;         /* Muted Text */
  --rose: #d96a8a;          /* Dusty Rose: Akzente, Likes, Favoriten, aktive Elemente */
  --petrol: #3fa7c6;        /* Petrol Blue: Entdecken, Play, Progress, Interaktionen */
  --indigo: #6f68b8;        /* Soft Indigo: Künstler, Alben, Badges, Highlights */
  --accent: var(--petrol);  /* Hauptaktionen / Fokus / Play */
  --accent-2: var(--indigo);/* Notizen / Highlights */
  --danger: #e0533d;
  --radius: 14px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* App-Layout: feste Höhe, eigener Scrollbereich (#main). So bleibt die
   untere Tab-Leiste verlässlich unten – auch auf iOS, wo position:fixed
   beim Scrollen "wegrutschen" kann. */
html { height: 100%; }
body {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#main {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.hidden { display: none !important; }

/* Header */
.app-header {
  flex: 0 0 auto;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 16px;
  background: rgba(20, 24, 28, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.app-header h1 { font-size: 20px; margin: 0; font-weight: 700; text-align: center; }
.header-actions { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); }
.header-gear { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--text); cursor: pointer; padding: 4px; display: inline-flex; }
.header-gear.hidden { display: none; }
.header-gear svg { width: 23px; height: 23px; display: block; }
.header-share { background: none; border: none; color: var(--text); cursor: pointer; padding: 4px; display: inline-flex; }
.header-share.hidden { display: none; }
.header-share svg { width: 22px; height: 22px; display: block; }
.badge {
  background: var(--surface-2);
  color: var(--muted);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 13px;
}

/* Views */
.view { display: none; padding: 12px 16px 24px; }
.view.active { display: block; }

/* Toolbar */
.toolbar { display: flex; gap: 8px; margin-bottom: 10px; }
.filterbar { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.filter-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; flex-shrink: 0;
  background: none; border: none; padding: 0;
  color: #3b4658; cursor: pointer;
}
.filter-toggle svg { width: 22px; height: 22px; display: block; }
.filter-toggle.active { color: var(--rose); }
.rating-filter.rating-input { gap: 2px; }
.rating-filter.rating-input .note-slot, .rating-filter.rating-input svg { width: 21px; height: 21px; }
.rating-clear-btn { font-size: 12px; }
.search {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 11px 14px;
  font-size: 15px;
}
.sort {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 0 10px;
  font-size: 14px;
}
input, textarea, select { outline: none; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); }

/* Cover-Raster (Kachelansicht) */
.record-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px 12px;
}
@media (min-width: 520px) { .record-list { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 720px) { .record-list { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 960px) { .record-list { grid-template-columns: repeat(6, 1fr); } }

.tile { cursor: pointer; display: flex; flex-direction: column; min-width: 0; }
.tile-cover {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.tile:active .tile-cover { opacity: .85; }
.tile-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile-cover.placeholder {
  background-color: var(--surface-2);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238e97ad' stroke-width='1.4'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3Ccircle cx='12' cy='12' r='2.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 38%;
}
.tile-meta { display: flex; align-items: center; gap: 5px; margin-top: 6px; }
.tile .rating-display { margin: 0; }
.tile-like { display: inline-flex; color: var(--rose); }
.tile-like .heart-ico { width: 15px; height: 15px; display: block; }
.tile-title { font-weight: 600; font-size: 13px; margin: 4px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-artist { color: var(--muted); font-size: 12px; margin: 1px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-note { color: var(--accent-2); font-size: 11px; margin: 3px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note-ico { width: 12px; height: 12px; vertical-align: -2px; margin-right: 3px; }

.empty-hint { color: var(--muted); text-align: center; margin-top: 48px; line-height: 1.5; padding: 0 24px; }

/* ---------- Einheitliche Empty States ---------- */
.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 40px 24px; color: var(--muted); }
.empty-state .es-ico { width: 48px; height: 48px; color: var(--border); margin-bottom: 2px; }
.empty-state .es-ico svg { width: 100%; height: 100%; }
.empty-state .es-title { margin: 0; color: var(--text); font-weight: 700; font-size: 16px; }
.empty-state .es-text { margin: 0; font-size: 13.5px; line-height: 1.5; max-width: 320px; }
.empty-state .es-cta { margin-top: 8px; min-width: 180px; }

/* ---------- Onboarding-Karte (Erststart) ---------- */
.onboard { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px 16px 16px; margin: 4px 0 18px; }
.onboard-title { margin: 0 0 14px; font-weight: 700; font-size: 17px; color: var(--text); }
.onboard-x { position: absolute; top: 10px; right: 12px; background: none; border: none; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.onboard-steps { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.onboard-step { display: flex; align-items: center; gap: 12px; }
.onboard-num { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; background: var(--rose); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.onboard-step span:last-child { color: var(--text); font-size: 14.5px; line-height: 1.35; }
.onboard-cta { width: 100%; }

/* ---------- Like-Animation ---------- */
@keyframes heart-pop { 0% { transform: scale(1); } 35% { transform: scale(1.4); } 70% { transform: scale(.88); } 100% { transform: scale(1); } }
.heart-pop { animation: heart-pop .4s ease; transform-origin: center; }

/* Bewertung mit Musiknoten */
.note-slot { position: relative; display: inline-block; line-height: 0; }
.note-empty { display: block; color: #3b4658; }
.note-fill {
  position: absolute; top: 0; left: 0; height: 100%;
  width: 0; overflow: hidden; color: var(--petrol);
}
.note-empty svg, .note-fill svg { display: block; }

/* Anzeige in der Liste (klein) */
.rating-display { display: inline-flex; gap: 1px; margin-top: 5px; }
.rating-display .note-slot, .rating-display svg { width: 16px; height: 16px; }

/* Eingabe (groß, gut tippbar) */
.rating-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rating-row-label { color: var(--muted); font-size: 13px; }
.rating-input { display: inline-flex; gap: 2px; touch-action: manipulation; }
.rating-input .note-slot { cursor: pointer; }
.rating-input .note-slot, .rating-input svg { width: 30px; height: 30px; }
.link-btn {
  background: none; border: none; color: var(--muted);
  font-size: 12px; cursor: pointer; text-decoration: underline; padding: 0;
}

/* Forms */
.form { display: flex; flex-direction: column; gap: 14px; max-width: 560px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
.form input, .form textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 11px 12px;
  font-size: 15px;
  font-family: inherit;
}
.target-pick { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.target-pick legend { color: var(--muted); font-size: 13px; padding: 0 4px; }
.radio { flex-direction: row !important; align-items: center; gap: 8px !important; color: var(--text) !important; }
.hint { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 0; }

/* Buttons */
.btn {
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}
.btn:active { transform: scale(0.98); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.ghost { background: transparent; }
.btn.danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.import-label { display: inline-block; }

/* Scan */
.scan-area { display: flex; flex-direction: column; gap: 14px; align-items: stretch; }
#reader { width: 100%; border-radius: var(--radius); overflow: hidden; background: #000; min-height: 60px; }
.scan-controls { display: flex; gap: 8px; }
.scan-controls .btn { flex: 1; }
.manual-barcode { display: flex; gap: 8px; }
.manual-barcode input {
  flex: 1;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 11px 12px;
  font-size: 15px;
}
.icon-scan-btn {
  flex-shrink: 0;
  width: 50px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.icon-scan-btn:active { background: var(--surface-2); }
.icon-scan-btn svg { width: 24px; height: 24px; display: block; }
.scan-status { color: var(--muted); font-size: 14px; text-align: center; min-height: 20px; }
.scan-status.error { color: var(--danger); }
.scan-status.ok { color: var(--accent-2); }

/* Trenner zwischen Scan und manueller Eingabe */
.add-divider {
  display: flex; align-items: center;
  color: var(--muted); font-size: 13px;
  margin: 22px 0 18px;
}
.add-divider::before, .add-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.add-divider span { padding: 0 12px; }

/* Vorschläge (Trending, Genres, Jahrzehnte …) */
#search-suggestions.hidden { display: none; }
.sugg-block { margin-bottom: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chip {
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  border-radius: 999px; padding: 8px 14px; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.chip:active { background: var(--surface-2); }
.chips .hint { padding: 4px 0; }

/* Kategorie-Reihen mit Cover-Vorschau */
.cat-row { margin-bottom: 20px; }
.cat-head {
  display: flex; align-items: center; gap: 8px;
  background: none; border: none; color: var(--text);
  font-size: 16px; font-weight: 600; cursor: pointer;
  padding: 0 0 10px; width: 100%; text-align: left;
}
.cat-more { color: var(--accent); font-size: 13px; font-weight: 600; margin-left: auto; }
.cat-covers { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.cat-cover {
  padding: 0; margin: 0; border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden; background: var(--surface-2); aspect-ratio: 1 / 1; cursor: pointer; display: block;
}
.cat-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cat-cover.placeholder {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238e97ad' stroke-width='1.4'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3Ccircle cx='12' cy='12' r='2.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 40%;
}

/* Browse-Reiter im Such-Tab */
.browse-tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 14px; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
.btab { flex: 0 0 auto; background: var(--surface); border: 1px solid var(--border); color: var(--muted); border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.browse-back { background: none; border: none; color: var(--accent); font-size: 14px; font-weight: 600; cursor: pointer; padding: 0 0 10px; }
.browse-title { font-weight: 600; margin: 0 0 12px; font-size: 16px; }
.browse-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.browse-list { list-style: none; margin: 0; padding: 0; }
.browse-row { display: flex; align-items: center; justify-content: space-between; padding: 15px 4px; border-bottom: 1px solid var(--border); font-size: 16px; color: var(--text); cursor: pointer; }
.browse-row .chev { color: var(--muted); }
.browse-grid button { padding: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--surface-2); cursor: pointer; display: block; }
.browse-grid img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }

/* Playlist-Kopf + Plus */
.pl-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.pl-header-title { font-weight: 600; }
.pl-add-btn { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; border: none; font-size: 22px; line-height: 1; cursor: pointer; }

/* Datenbank-Suchergebnisse */
.search-results { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.search-result {
  display: flex; gap: 12px; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px; cursor: pointer;
}
.search-result:active { background: var(--surface-2); }
.sr-cover {
  width: 54px; height: 54px; border-radius: 8px; overflow: hidden;
  background: var(--surface-2); flex-shrink: 0;
}
.sr-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sr-cover.placeholder {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238e97ad' stroke-width='1.4'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3Ccircle cx='12' cy='12' r='2.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 42%;
}
.sr-info { min-width: 0; flex: 1; }
.sr-title { font-weight: 600; font-size: 14px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-artist { color: var(--muted); font-size: 13px; margin: 1px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-sub { color: var(--muted); font-size: 12px; margin: 1px 0 0; }

/* Tabbar */
.tabbar {
  flex: 0 0 auto;
  position: relative; /* damit z-index über der Detailseite (fixed, z40) greift */
  display: flex;
  background: rgba(20, 24, 28, 0.92);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  padding-bottom: var(--safe-bottom);
  z-index: 50;
}
.tab {
  flex: 1;
  background: none;
  border: none;
  color: var(--text);
  padding: 12px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
/* Aktiver Tab: Beschriftung etwas größer */
.tab.active {
  font-size: 12.5px;
  font-weight: 600;
}
.tab-ico {
  width: 24px;
  height: 24px;
  display: block;
  box-sizing: content-box;
  /* Polsterung bildet den abgerundeten Kasten hinter dem Icon */
  padding: 4px 11px;
  border-radius: 16px;
  transition: background .18s ease, color .12s ease, stroke-width .12s ease;
}
/* Aktiver Tab: kein Kasten – das Icon färbt sich in Dusty Rose */
.tab.active .tab-ico {
  color: var(--rose);
  stroke-width: 2.1px;
}

/* Dialogs */
dialog {
  border: none;
  background: var(--surface);
  color: var(--text);
  border-radius: 18px;
  padding: 0;
  width: min(92vw, 480px);
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
dialog::backdrop { background: rgba(0,0,0,.6); }
.detail { padding: 20px; position: relative; display: flex; flex-direction: column; gap: 14px; }
.detail-head { display: flex; gap: 14px; }
.detail-head img {
  width: 96px; height: 96px; border-radius: 10px; object-fit: cover;
  background: var(--surface-2); flex-shrink: 0;
}
.detail-meta { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.detail-input {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 7px 9px;
  font-size: 14px;
}
.detail-input.strong { font-weight: 700; font-size: 16px; }
.detail-note-label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 13px; }
.detail-note-label textarea {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 10px;
  font-size: 15px;
  font-family: inherit;
  resize: vertical;
}
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.detail-actions .btn { flex: 1; min-width: 120px; }
.dialog-close {
  position: absolute; top: 10px; right: 12px;
  background: none; border: none; color: var(--muted);
  font-size: 26px; line-height: 1; cursor: pointer; padding: 4px;
}
.r-artist { color: var(--muted); margin: 0; font-size: 14px; }
.r-title { font-weight: 700; font-size: 17px; margin: 2px 0; }
.r-sub { color: var(--muted); margin: 0; font-size: 13px; }

/* Album-Detailseite (Vollbild) */
.detail-page {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}
.detail-page.hidden { display: none; }
.detail-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  padding-top: max(10px, env(safe-area-inset-top));
  background: rgba(20, 24, 28, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.icon-btn {
  background: none; border: none; color: var(--text);
  font-size: 30px; line-height: 1; cursor: pointer; padding: 0 8px;
}
.icon-btn svg { width: 24px; height: 24px; display: block; }
.detail-bar-actions { display: flex; gap: 8px; }
.icon-btn-text {
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 9px; padding: 8px 12px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.danger-text { color: var(--danger); border-color: var(--danger); background: transparent; }
.detail-scroll {
  flex: 1; overflow-y: auto;
  padding: 18px 16px calc(80px + var(--safe-bottom));
  -webkit-overflow-scrolling: touch;
}
.dp-hero { position: relative; text-align: center; }
.dp-hero > *:not(.dp-hero-bg) { position: relative; z-index: 1; }
.dp-hero-bg {
  position: absolute; top: -18px; left: -16px; right: -16px; height: 340px;
  background-size: cover; background-position: center;
  filter: blur(40px) saturate(1.6); opacity: 0;
  transform: scale(1.15); z-index: 0; pointer-events: none;
  transition: opacity .4s ease;
}
.dp-hero-bg.has-bg { opacity: .5; }
.dp-hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(20,24,28,.2) 0%, var(--bg) 90%);
}
.dp-cover-wrap {
  position: relative;
  width: min(78%, 320px);
  margin: 8px auto 18px;
}
.dp-cover {
  position: relative; z-index: 2;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
/* Vinyl-Platte, die rechts hinter dem Cover hervorschaut – etwa zur Hälfte sichtbar.
   Die Farbe kommt aus der Variable --vinyl (von app.js gesetzt). */
.dp-vinyl {
  --vinyl: #15151a;
  --label: #e9e2d0;
  position: absolute; z-index: 1;
  top: 5%; height: 90%; aspect-ratio: 1 / 1;
  right: -46%;
  border-radius: 50%;
  background:
    /* Lichtreflex/Glanz */
    linear-gradient(135deg, rgba(255,255,255,.30) 0%, rgba(255,255,255,0) 22%, rgba(255,255,255,0) 57%, rgba(255,255,255,.13) 70%, rgba(255,255,255,0) 85%),
    /* Label */
    radial-gradient(circle at 50% 50%, var(--label) 0 19%, rgba(0,0,0,0) 19.4%),
    /* Label-Schattenring */
    radial-gradient(circle at 50% 50%, rgba(0,0,0,0) 0 19.2%, rgba(0,0,0,.45) 19.8% 20.9%, rgba(0,0,0,0) 21.3%),
    /* feine Rillen */
    repeating-radial-gradient(circle at 50% 50%, rgba(0,0,0,.5) 0 .6px, rgba(0,0,0,0) .6px 2.4px),
    /* Tiefe zum Rand */
    radial-gradient(circle at 50% 50%, rgba(255,255,255,.05) 0 50%, rgba(0,0,0,.45) 100%),
    var(--vinyl);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .6);
}
.dp-vinyl::after {
  content: ''; position: absolute; top: 50%; left: 50%;
  width: 4%; height: 4%; transform: translate(-50%, -50%);
  border-radius: 50%; background: #0c1220;
  box-shadow: 0 0 0 1px rgba(0,0,0,.4);
}
.dp-newcover { display: block; margin: 0 auto 4px; }

/* Farbige Vinyl-Varianten, die das Album anbietet */
.dp-variants {
  display: flex; flex-wrap: wrap; justify-content: center;
  align-items: center; gap: 8px;
  margin: 0 auto 12px; max-width: 320px;
}
.dp-variants .dp-variants-label {
  width: 100%; text-align: center;
  font-size: 12px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 2px;
}
.dp-swatch {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface-2); color: var(--text);
  font-size: 12px; cursor: pointer; line-height: 1;
}
.dp-swatch .dot {
  width: 16px; height: 16px; border-radius: 50%;
  border: 1px solid rgba(0,0,0,.35);
  box-shadow: inset 0 1px 2px rgba(255,255,255,.4);
}
.dp-swatch.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

/* Vorschau-Modus (Album aus der Suche, noch nicht gespeichert) */
#dp-preview-actions { display: none; gap: 8px; }
#dp-preview-actions .btn { flex: 1; }
#detail-page.preview #dp-preview-actions { display: none; }
#detail-page.preview #dp-move,
#detail-page.preview #dp-delete,
#detail-page.preview .dp-save-row,
#detail-page.preview .dp-edit,
#detail-page.preview #dp-diary-section,
#detail-page.preview #dp-newcover { display: none; }

/* Tagebuch / Hör-Log */
.dp-diary-add { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.dp-diary-add input[type="date"] { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; color: var(--text); padding: 9px 10px; font-family: inherit; font-size: 14px; }
.dp-diary-add input[type="text"] { flex: 1; min-width: 120px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; color: var(--text); padding: 9px 12px; font-family: inherit; font-size: 14px; }
.dp-diary-add .btn { width: auto; padding: 9px 16px; }
.dp-plays { list-style: none; margin: 0; padding: 0; }
.dp-plays li { display: flex; align-items: center; gap: 8px; padding: 7px 2px; border-bottom: 1px solid var(--border); font-size: 14px; }
.play-date { color: var(--text); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.play-note { flex: 1; min-width: 0; color: var(--muted); }
.play-del { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1; }

/* Cover-Auswahl-Dialog */
#cover-dialog { width: min(94vw, 520px); }
.cover-pick { padding: 16px; position: relative; }
.cover-pick-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-weight: 600; }
.cover-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-height: 66vh; overflow-y: auto; align-items: start; }
.cover-grid button { display: block; width: 100%; padding: 0; margin: 0; border: 2px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--surface-2); cursor: pointer; }
.cover-grid button:active { border-color: var(--accent); }
.cover-grid img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }

/* Profil-Seite */
.profile { max-width: 640px; margin: 0 auto; }
.profile-banner {
  height: 165px; border-radius: 14px; background-color: var(--surface-2);
  background-size: cover; background-position: center;
  position: relative; border: 1px solid var(--border); overflow: hidden;
}
.profile-banner.banner-collage { display: flex; }
.profile-banner.banner-collage > span { flex: 1; min-width: 0; background-size: cover; background-position: center; }
.banner-veil { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(20,24,28,.12), rgba(20,24,28,.6)); pointer-events: none; }
/* Banner-Auswahl-Dialog */
.banner-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.banner-opt { padding: 0; border: 2px solid transparent; border-radius: 10px; background: none; cursor: pointer; text-align: center; }
.banner-opt.sel { border-color: var(--rose); }
.banner-prev { display: block; position: relative; width: 100%; height: 60px; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.banner-prev.banner-collage { display: flex; }
.banner-prev.banner-collage > span { flex: 1; background-size: cover; background-position: center; }
.banner-opt-lbl { display: block; font-size: 12px; color: var(--muted); padding: 5px 0 7px; text-transform: capitalize; }
.profile-avatar-wrap { display: flex; justify-content: center; margin-top: -46px; }
.profile-avatar {
  width: 90px; height: 90px; border-radius: 50%;
  border: 3px solid var(--bg); background-color: var(--surface-2);
  background-size: cover; background-position: center;
  cursor: pointer; padding: 0; position: relative; z-index: 2;
  display: inline-flex; align-items: center; justify-content: center; color: var(--muted);
}
.avatar-ph { width: 48%; height: 48%; }
.banner-edit {
  position: absolute; right: 10px; bottom: 10px;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(0, 0, 0, .55); border: none; color: #fff; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.banner-edit svg { width: 20px; height: 20px; }
.profile-meta-line { text-align: center; color: var(--muted); font-size: 13px; margin: 12px 0 0; }
.profile-meta-line a { color: var(--muted); text-decoration: none; }
.profile-meta-line:empty { display: none; }
.meta-ico { width: 13px; height: 13px; display: inline-block; vertical-align: -2px; color: var(--muted); }
.profile-bio-display { text-align: center; color: var(--muted); font-size: 14px; margin: 8px 0 0; line-height: 1.5; white-space: pre-wrap; }
.profile-bio-display:empty { display: none; }
.profile-section { margin-top: 24px; }
.ps-images { display: flex; gap: 8px; }
.ps-images .btn { flex: 1; }

.fav-slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.fav-slot {
  aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; position: relative;
  border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; padding: 0;
}
.fav-slot.empty { color: var(--muted); font-size: 26px; display: flex; align-items: center; justify-content: center; border-style: dashed; }
.fav-slot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fav-disc {
  display: block; width: 100%; height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238e97ad' stroke-width='1.4'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3Ccircle cx='12' cy='12' r='2.4'/%3E%3C/svg%3E");
  background-size: 42%; background-position: center; background-repeat: no-repeat;
}
.fav-x { position: absolute; top: 3px; right: 4px; color: #fff; background: rgba(0,0,0,.55); border-radius: 50%; width: 18px; height: 18px; line-height: 17px; font-size: 13px; text-align: center; }

.stat-total { font-size: 15px; color: var(--text); margin: 0 0 12px; font-weight: 600; }
.rating-chart { display: flex; flex-direction: column; gap: 6px; }
.chart-row { display: flex; align-items: center; gap: 8px; }
.chart-label { width: 28px; font-size: 12px; color: var(--muted); text-align: right; }
.chart-bar-track { flex: 1; background: var(--surface-2); border-radius: 6px; height: 14px; overflow: hidden; }
.chart-bar { height: 100%; background: var(--petrol); border-radius: 6px; min-width: 2px; }
.chart-count { width: 22px; font-size: 12px; color: var(--muted); }

.value-total { font-size: 17px; font-weight: 700; color: var(--text); margin: 0 0 10px; }
.price-list { list-style: none; margin: 0; padding: 0; }
.price-list li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.pl-name { color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-price { color: var(--accent-2); white-space: nowrap; }

/* Zuletzt hinzugefügt */
.recent-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.recent-cell { background: none; border: none; padding: 0; cursor: pointer; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.recent-cover { width: 100%; aspect-ratio: 1 / 1; border-radius: 8px; overflow: hidden; background-color: var(--surface-2); border: 1px solid var(--border); }
.recent-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.recent-cover.placeholder {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238e97ad' stroke-width='1.4'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3Ccircle cx='12' cy='12' r='2.4'/%3E%3C/svg%3E");
  background-size: 40%; background-position: center; background-repeat: no-repeat;
}
.recent-cell .rating-display { justify-content: center; gap: 1px; margin: 0; }
.recent-cell .rating-display .note-slot, .recent-cell .rating-display svg { width: 12px; height: 12px; }

/* Bewertungs-Histogramm */
.histo { display: flex; align-items: flex-end; gap: 8px; }
.histo-end { color: var(--petrol); display: inline-flex; align-items: flex-end; gap: 1px; flex-shrink: 0; }
.mini-note { width: 13px; height: 13px; display: block; }
.histo-bars { flex: 1; display: flex; align-items: flex-end; gap: 1px; height: 48px; }
.histo-bar { flex: 1; background: #313d4e; min-height: 3px; position: relative; }
.histo-val {
  position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
  margin-bottom: 5px; font-size: 11px; font-weight: 600; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 1px 6px; border-radius: 5px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .12s;
}
.histo-bar:hover .histo-val, .histo-bar.show-val .histo-val { opacity: 1; }

/* Statistik-Zeilen */
.stat-rows { list-style: none; margin: 18px 0 0; padding: 0; }
.stat-rows li { display: flex; justify-content: space-between; align-items: center; padding: 14px 2px; border-bottom: 1px solid var(--border); font-size: 15px; color: var(--text); }
.stat-rows li[data-go] { cursor: pointer; }
.stat-num { color: var(--muted); }
.profile-pricelist { margin-top: 6px; }
.profile-pricelist summary { cursor: pointer; color: var(--muted); font-size: 14px; padding: 12px 0; }

.profile-settings { margin-top: 26px; border-top: 1px solid var(--border); }
.profile-settings summary { cursor: pointer; color: var(--muted); font-size: 14px; padding: 12px 0; }
.profile-version { text-align: center; margin-top: 20px; }

/* Profil-Tabs */
.profile-tabs { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.ptab { flex: 1; background: none; border: none; color: var(--muted); font-size: 14px; font-weight: 600; padding: 11px 4px; cursor: pointer; border-bottom: 2px solid transparent; }
.ptab.active { color: var(--text); border-bottom-color: var(--accent); }
.ptab-panel { display: none; }
.ptab-panel.active { display: block; }

/* Playlists */
.pl-create { display: flex; gap: 8px; margin-bottom: 14px; }
.pl-create input { flex: 1; min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; color: var(--text); padding: 11px 12px; font-size: 15px; }
.playlist-item { border: 1px solid var(--border); border-radius: 12px; margin-bottom: 10px; overflow: hidden; }
.playlist-head { display: flex; align-items: center; justify-content: space-between; padding: 13px 14px; cursor: pointer; gap: 10px; }
.pl-title { font-weight: 600; }
.pl-count { color: var(--muted); font-size: 13px; }
.playlist-del { background: none; border: none; color: var(--danger); cursor: pointer; font-size: 13px; flex-shrink: 0; }
.playlist-albums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 0 12px 12px; }
.pa-cover { aspect-ratio: 1 / 1; border-radius: 8px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); cursor: pointer; padding: 0; }
.pa-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.playlist-empty, .pl-none { color: var(--muted); font-size: 13px; padding: 0 4px 10px; }

/* Playlist-Auswahl-Dialog */
.playlist-choice { display: flex; flex-direction: column; margin-bottom: 12px; max-height: 50vh; overflow-y: auto; }
.playlist-choice label { display: flex; align-items: center; gap: 10px; padding: 11px 4px; font-size: 15px; cursor: pointer; border-bottom: 1px solid var(--border); color: var(--text); }
.playlist-choice input { width: 18px; height: 18px; accent-color: var(--accent); }

/* Startseite */
/* Home-Untertabs (Alben / Reviews / Lists) */
.home-tabs {
  display: flex; gap: 4px; margin: 2px 0 18px;
  border-bottom: 1px solid var(--border);
}
.home-tab {
  flex: 1; background: none; border: none; color: var(--muted);
  font-size: 14px; font-weight: 600; padding: 10px 4px; cursor: pointer;
  border-bottom: 2px solid transparent;
}
.home-tab.active { color: var(--text); border-bottom-color: var(--rose); }

/* Such-Filter-Zeile (Alben / Künstler/in / Members / Reviews / Playlists) */
.search-filters {
  display: flex; gap: 6px; margin: 0 0 14px; overflow-x: auto;
  scrollbar-width: none;
}
.search-filters::-webkit-scrollbar { display: none; }
.sfilter {
  flex: 0 0 auto; background: var(--surface); border: 1px solid var(--border);
  color: var(--muted); font-size: 13px; font-weight: 600; padding: 7px 13px;
  border-radius: 999px; cursor: pointer; white-space: nowrap;
}
.sfilter.active { background: var(--rose); border-color: var(--rose); color: #fff; }

.search-cancel {
  flex: 0 0 auto; white-space: nowrap; color: var(--petrol);
  font-size: 15px; font-weight: 600; padding: 0 4px; background: none; border: none; cursor: pointer;
}

/* Reviews-Tab */
.rev-list { display: flex; flex-direction: column; gap: 12px; }
.rev-card {
  display: flex; gap: 12px; text-align: left; width: 100%;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px; cursor: pointer; color: var(--text);
}
.rev-card:active { background: var(--surface-2); }
.rev-cover {
  width: 64px; height: 64px; flex-shrink: 0; border-radius: 6px; overflow: hidden;
  background: var(--surface-2);
}
.rev-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rev-body { flex: 1; min-width: 0; }
.rev-head { display: flex; flex-direction: column; }
.rev-title { font-weight: 700; font-size: 15px; }
.rev-artist { color: var(--indigo); font-size: 13px; }
.rev-who { color: var(--muted); font-size: 12px; margin: 2px 0 4px; }
.rev-text { margin: 0; font-size: 13px; color: var(--text); line-height: 1.4; }

/* Lists-Tab */
.lists-wrap { display: flex; flex-direction: column; gap: 12px; }
.list-card {
  display: flex; gap: 12px; align-items: center; text-align: left; width: 100%;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px; cursor: pointer; color: var(--text);
}
.list-card:active { background: var(--surface-2); }
.ll-covers {
  width: 56px; height: 56px; flex-shrink: 0;
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr;
  gap: 2px; border-radius: 6px; overflow: hidden; background: var(--surface-2);
}
.ll-cover { background: var(--surface-2); overflow: hidden; }
.ll-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ll-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ll-name { font-weight: 700; font-size: 15px; }
.ll-by { color: var(--muted); font-size: 12px; }

.home-greet {
  display: flex; align-items: center; gap: 12px;
  margin: 2px 0 20px;
}
.home-greet-av {
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid var(--rose);
  padding: 2px; /* kleiner Abstand zwischen Bild und Rahmen */
  background-color: var(--surface-2);
  background-size: cover; background-position: center;
  background-clip: content-box;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); cursor: pointer; overflow: hidden;
}
.home-greet-av.placeholder { color: var(--muted); }
.home-greet-text { flex: 1; min-width: 0; }
.home-greet-hello {
  display: block; font-size: 19px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.home-bell {
  flex-shrink: 0; background: none; border: none; color: var(--text);
  cursor: pointer; padding: 6px; display: inline-flex; border-radius: 50%;
}
.home-bell:active { background: var(--surface-2); }
.home-bell svg { width: 24px; height: 24px; display: block; }
.home-section { margin-bottom: 22px; }

/* Horizontale, wischbare Reihen auf der Startseite */
/* ---------- Skeleton-Loader ---------- */
@keyframes skel-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skel { background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 37%, var(--surface-2) 63%); background-size: 200% 100%; animation: skel-shimmer 1.3s linear infinite; border-radius: 8px; display: block; }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }
.skel-line { height: 11px; border-radius: 5px; margin-top: 7px; }
.skel-line.sk-80 { width: 80%; }
.skel-line.sk-60 { width: 60%; }
.skel-line.sk-40 { width: 40%; }
.skel-chart { flex: 0 0 auto; width: 132px; }
.skel-chart .skel-cover { width: 132px; height: 132px; border-radius: 10px; }
.skel-rev { display: flex; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.skel-rev .skel-cover { width: 64px; height: 64px; border-radius: 6px; flex-shrink: 0; }
.skel-rev .skel-body { flex: 1; }
.skel-listrow { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.skel-listrow .skel-cover { width: 56px; height: 56px; border-radius: 6px; flex-shrink: 0; }
.skel-listrow .skel-body { flex: 1; }
.skel-grid-cell { aspect-ratio: 1 / 1; border-radius: 8px; }
.skel-sr { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; }
.skel-sr .skel-cover { width: 54px; height: 54px; border-radius: 8px; flex-shrink: 0; }
.skel-sr .skel-body { flex: 1; }

.chart-list, .home-friends {
  list-style: none; margin: 0; padding: 0 0 6px;
  display: flex; flex-direction: row; gap: 12px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.chart-list::-webkit-scrollbar, .home-friends::-webkit-scrollbar { display: none; }
.chart-item {
  position: relative; flex: 0 0 auto; width: 132px;
  display: flex; flex-direction: column; gap: 6px;
  padding: 0; border: none; background: none; cursor: pointer;
  text-align: left; scroll-snap-align: start;
}
.chart-rank {
  position: absolute; top: 6px; left: 6px; z-index: 2;
  min-width: 20px; height: 20px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(20, 24, 28, .8); color: #fff;
  border-radius: 7px; font-size: 12px; font-weight: 700;
  font-variant-numeric: tabular-nums; backdrop-filter: blur(2px);
}
.chart-cover {
  width: 132px; height: 132px; border-radius: 10px;
  overflow: hidden; background: var(--surface-2); border: 1px solid var(--border);
}
.chart-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chart-cover.placeholder {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238e97ad' stroke-width='1.4'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3Ccircle cx='12' cy='12' r='2.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 45%;
}
.chart-meta { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.chart-title {
  font-weight: 600; font-size: 14px; color: var(--text); line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.chart-artist { font-size: 12.5px; color: var(--indigo); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.home-empty-card {
  flex: 0 0 86%;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px; color: var(--muted);
  font-size: 13.5px; line-height: 1.5;
}
.home-section .dp-label { margin-bottom: 10px; }
.home-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.dp-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dp-cover.placeholder {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238e97ad' stroke-width='1.4'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3Ccircle cx='12' cy='12' r='2.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 34%;
}
.dp-title { font-size: 22px; font-weight: 700; margin: 0; line-height: 1.2; }
.dp-artist { color: var(--indigo); margin: 5px 0 0; font-size: 15px; font-weight: 600; }
.dp-meta { color: var(--muted); margin: 6px 0 0; font-size: 13px; }
.dp-cond { color: var(--muted); margin: 4px 0 0; font-size: 13px; }
.dp-cond:empty { display: none; }
.dp-listen { display: flex; gap: 10px; justify-content: center; margin-top: 16px; }
.listen-btn {
  flex: 1; max-width: 170px; text-align: center;
  padding: 10px 14px; border-radius: 10px;
  font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
}
.listen-btn.spotify { background: #1db954; color: #fff; }
.listen-btn.apple { background: #fa243c; color: #fff; }
.listen-btn svg { width: 18px; height: 18px; }

/* Streaming als kleine runde Icons */
.dp-listen { display: flex; gap: 12px; justify-content: center; margin-top: 16px; }
.listen-ico { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.listen-ico img { width: 36px; height: 36px; display: block; border-radius: 8px; object-fit: cover; }

/* Bearbeiten-Panel (über ⋯ oben rechts) */
.dp-edit-panel.hidden { display: none; }
.dp-edit-panel { border-top: 1px solid var(--border); margin-top: 20px; padding-top: 4px; }
.dp-owner-actions { margin-top: 18px; }

/* Community-Bewertung (Histogramm + Schnitt) */
.cr-wrap { display: flex; align-items: flex-end; gap: 8px; }
.cr-min { color: var(--petrol); flex: 0 0 auto; }
.cr-min svg { width: 14px; height: 14px; display: block; }
.cr-bars { flex: 1; display: flex; align-items: flex-end; gap: 1px; height: 56px; }
.cr-bar { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.cr-fill { width: 100%; min-height: 2px; background: var(--surface-2); border-radius: 2px; }
.cr-side { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; }
.cr-avg { font-size: 26px; font-weight: 700; line-height: 1; color: var(--text); }
.cr-stars { margin-top: 2px; }
.cr-count { margin: 6px 0 0; font-size: 12px; color: var(--muted); }

/* Reviews unter dem Album */
.ar-card { padding: 12px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.ar-card:last-child { border-bottom: none; }
.ar-head { display: flex; align-items: center; gap: 8px; }
.ar-av { width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2) center/cover; flex: 0 0 auto; }
.ar-name { font-weight: 600; font-size: 14px; color: var(--text); }
.ar-rating { margin-left: auto; }
.ar-text { margin: 6px 0 0; font-size: 14px; color: var(--text); line-height: 1.45; white-space: pre-wrap; }

/* Album-Aktions-Sheet (⋯) */
.actions-sheet { border: none; padding: 0; background: transparent; margin: auto auto 0; width: min(100vw, 700px); max-height: 90vh; }
.actions-sheet::backdrop { background: rgba(0, 0, 0, .6); }
.as-sheet {
  background: var(--surface); border-radius: 18px 18px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); max-height: 90vh; overflow-y: auto;
}
.as-head { text-align: center; font-weight: 700; font-size: 17px; margin: 2px 0 16px; color: var(--text); }
.as-head .as-year { color: var(--muted); font-weight: 400; }
.as-toggles { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.as-toggle { display: flex; flex-direction: column; align-items: center; gap: 6px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 14px 6px; color: var(--muted); cursor: pointer; }
.as-toggle .as-ico svg { width: 26px; height: 26px; display: block; }
.as-toggle .as-lbl { font-size: 12px; font-weight: 600; }
.as-toggle.active { color: var(--petrol); border-color: var(--petrol); }
.as-toggle.liked { color: var(--rose); border-color: var(--rose); }
.as-rated { margin-top: 16px; text-align: center; }
.as-rated .rating-row { justify-content: center; }
.as-row { width: 100%; margin-top: 10px; padding: 13px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); border-radius: 12px; font-size: 15px; cursor: pointer; text-align: center; }
.as-done { width: 100%; margin-top: 16px; padding: 14px; border: none; border-radius: 12px; background: var(--surface-2); color: var(--text); font-weight: 700; font-size: 16px; cursor: pointer; }
.dp-section { margin-top: 24px; }
.like-btn {
  display: inline-flex; align-items: center;
  background: none; border: none; padding: 2px;
  color: var(--muted); cursor: pointer;
}
.like-btn .heart-ico { width: 24px; height: 24px; display: block; }
.like-btn.liked { color: var(--rose); }
#dp-rating-clear { margin-left: auto; }
.dp-label {
  display: block; color: var(--muted); font-size: 12px;
  margin-bottom: 8px; text-transform: uppercase; letter-spacing: .05em;
}
#dp-note, #dp-review {
  width: 100%; background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text); padding: 11px 12px;
  font-family: inherit; font-size: 15px; resize: vertical;
}
.dp-tracklist { list-style: none; margin: 0; padding: 0; }
.dp-tracklist li {
  display: flex; gap: 12px; align-items: baseline;
  padding: 9px 2px; border-bottom: 1px solid var(--border); font-size: 14px;
}
.trk-pos { color: var(--muted); min-width: 26px; }
.trk-title { flex: 1; min-width: 0; }
.trk-dur { color: var(--muted); font-variant-numeric: tabular-nums; }
.trk-play { background: none; border: none; color: var(--muted); cursor: pointer; padding: 0; flex: 0 0 auto; align-self: center; display: inline-flex; }
.trk-play svg { width: 16px; height: 16px; display: block; }
.trk-play.playing { color: var(--petrol); }
.trk-play-none { flex: 0 0 16px; }
.trk-like { background: none; border: none; color: var(--muted); cursor: pointer; padding: 0 0 0 8px; flex: 0 0 auto; align-self: center; display: inline-flex; }
.trk-like .heart-ico { width: 16px; height: 16px; }
.trk-like.liked { color: var(--rose); }
/* Album-Infos (#16) */
.info-row { display: flex; gap: 10px; padding: 4px 0; font-size: 14px; }
.info-k { flex: 0 0 84px; color: var(--muted); }
.info-v { flex: 1; color: var(--text); }
.info-notes { margin: 8px 0 0; font-size: 13px; color: var(--muted); line-height: 1.45; white-space: pre-wrap; }
.dp-edit { margin-top: 24px; border-top: 1px solid var(--border); }
.dp-edit summary { cursor: pointer; color: var(--muted); font-size: 14px; padding: 12px 0; }
.dp-edit .form { margin-top: 6px; }
.dp-save-row { display: flex; justify-content: flex-end; margin-top: 10px; }
.dp-save { width: auto; padding: 8px 18px; font-size: 13px; }

/* Toast */
.toast {
  position: fixed;
  bottom: calc(80px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 14px;
  z-index: 50;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  transition: opacity .25s, transform .25s;
}
.toast.hidden { opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(8px); }

/* ---------- Auth (Login/Registrierung/Reset) ---------- */
.auth-page {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(20, 24, 28, .92); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; overflow-y: auto;
}
.auth-page.hidden { display: none; }
.auth-card {
  position: relative; width: 100%; max-width: 360px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 24px 22px 18px;
  box-shadow: 0 20px 50px rgba(0,0,0,.5);
}
.auth-close {
  position: absolute; top: 10px; right: 12px;
  background: none; border: none; color: var(--muted);
  font-size: 26px; line-height: 1; cursor: pointer; padding: 4px;
}
.auth-logo { display: block; width: 64px; height: 64px; border-radius: 14px; margin: 4px auto 10px; }
.auth-title { text-align: center; font-size: 20px; margin: 0 0 16px; }
.auth-tabs { display: flex; gap: 6px; background: var(--surface-2); border-radius: 999px; padding: 4px; margin-bottom: 16px; }
.auth-tab {
  flex: 1; background: none; border: none; color: var(--muted);
  padding: 9px 0; border-radius: 999px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.auth-tab.active { background: var(--accent); color: #fff; }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); }
.auth-field input {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); padding: 12px; font-size: 16px; font-family: inherit;
}
.auth-field input:focus { border-color: var(--accent); outline: none; }
.auth-submit { width: 100%; margin-top: 4px; }
.auth-forgot, .auth-guest { display: block; margin: 4px auto 0; text-align: center; }
.auth-guest { margin-top: 14px; color: var(--muted); }
.auth-msg { margin: 0; font-size: 13px; min-height: 0; line-height: 1.4; }
.auth-msg.error { color: var(--danger); }
.auth-msg.ok { color: var(--accent); }

/* Logout-Button nur sichtbar, wenn eingeloggt */
.logout-btn { display: none; width: 100%; margin: 8px 0 6px; }
body.logged-in .logout-btn { display: block; }

/* ---------- Freunde ---------- */
.find-friends-btn { width: 100%; margin: 2px 0 16px; }
#friends-dialog { width: min(94vw, 460px); }
.friends-pick { padding: 16px; }
.friends-head { display: flex; justify-content: space-between; align-items: center; font-weight: 600; margin-bottom: 12px; }
#friends-search { width: 100%; margin-bottom: 12px; }
.friends-results { display: flex; flex-direction: column; gap: 8px; max-height: 62vh; overflow-y: auto; }
.friend-row { display: flex; align-items: center; gap: 10px; }
.friend-av { width: 38px; height: 38px; flex-shrink: 0; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); background-size: cover; background-position: center; }
.friend-name { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 14px; line-height: 1.25; }
.friend-name small { color: var(--muted); font-size: 12px; }
.friend-follow { width: auto; padding: 8px 14px; font-size: 13px; flex-shrink: 0; }
.friend-by { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.friend-row { width: 100%; background: none; border: none; cursor: pointer; text-align: left; }
.friend-go { margin-left: auto; color: var(--muted); font-size: 20px; }

/* Profilseite eines anderen Nutzers */
.up-name { text-align: center; font-size: 21px; font-weight: 700; margin: 10px 0 0; }
.up-handle { text-align: center; color: var(--muted); margin: 2px 0 0; font-size: 13px; }
.up-center { text-align: center; }
.up-follow { display: block; width: auto; margin: 16px auto 4px; padding: 10px 28px; }
.stat-toggle { cursor: pointer; }
.stat-chev { display: inline-block; margin-left: 5px; color: var(--muted); transition: transform .15s ease; }
.stat-toggle.open .stat-chev { transform: rotate(90deg); }
.uptab-panel { margin-top: 12px; }

/* Sammlungswert-Diagramm (min–max) */
.vr-bar { height: 14px; border-radius: 999px; background: var(--surface-2); overflow: hidden; position: relative; }
.vr-fill { position: absolute; inset: 0; background: linear-gradient(90deg, var(--petrol), var(--indigo), var(--rose)); }
.vr-labels { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-weight: 700; font-size: 18px; }
.vr-dash { color: var(--muted); font-weight: 400; font-size: 13px; }
.vr-note { color: var(--muted); font-size: 12px; margin: 6px 0 0; line-height: 1.4; }
.vr-loading { color: var(--petrol); }

/* Listen: Beschreibung + Anlege-Dialog */
.pl-desc { color: var(--muted); font-size: 13px; line-height: 1.4; margin: 2px 0 8px; }
.pl-create { display: flex; flex-direction: column; gap: 8px; }
#new-playlist-desc { width: 100%; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; color: var(--text); padding: 10px 12px; font-family: inherit; font-size: 15px; resize: vertical; }
#up-lists .playlist-item { margin-bottom: 14px; }

/* Feed-Karte: Bewertung + Review-Schnipsel */
.friend-rating { display: block; margin-top: 3px; }
.friend-rev { display: block; font-size: 11px; color: var(--muted); font-style: italic; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Aktivitäts-Fenster (Review, Like, Kommentare) */
#activity-dialog { width: min(94vw, 460px); }
.activity-sheet { padding: 16px; }
.activity-album { display: flex; gap: 12px; width: 100%; background: none; border: none; text-align: left; cursor: pointer; padding: 0; margin-bottom: 10px; align-items: center; }
.activity-album .chart-cover { width: 64px; height: 64px; flex-shrink: 0; }
.act-rating { margin: 2px 0 6px; }
.act-review { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; font-size: 14px; line-height: 1.45; margin: 6px 0 10px; white-space: pre-line; }
.act-actions { display: flex; align-items: center; gap: 8px; margin: 4px 0 10px; }
.act-like-count { color: var(--muted); font-size: 14px; }
.act-comments-label { margin-top: 6px; }
.act-comments { display: flex; flex-direction: column; gap: 8px; max-height: 32vh; overflow-y: auto; margin: 8px 0; }
.act-comment { display: flex; gap: 6px; align-items: baseline; font-size: 14px; }
.act-c-name { font-weight: 600; flex-shrink: 0; }
.act-c-text { flex: 1; min-width: 0; }
.act-c-del { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1; }
.act-comment-add { display: flex; gap: 8px; margin-top: 8px; }
.act-comment-add input { flex: 1; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; color: var(--text); padding: 10px 12px; font-size: 15px; font-family: inherit; }
.act-comment-add .btn { width: auto; padding: 10px 16px; }

/* Stackd Wrapped */
.wrapped-btn { width: 100%; margin: 6px 0 0; }
#wrapped-dialog { width: min(94vw, 460px); }
.wrapped-sheet { padding: 16px; }
.wrapped-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wrapped-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 14px; text-align: center; display: flex; flex-direction: column; gap: 4px; }
.wrapped-num { font-size: 24px; font-weight: 700; color: var(--text); }
.wrapped-lbl { font-size: 12px; color: var(--muted); }
.wrapped-h { display: block; margin-top: 16px; }
.wrapped-album { display: flex; gap: 12px; width: 100%; background: none; border: none; text-align: left; cursor: pointer; padding: 0; align-items: center; margin-top: 6px; }
.wrapped-album .chart-cover { width: 56px; height: 56px; flex-shrink: 0; }
.wrapped-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; background: none; border: none; text-align: left; cursor: pointer; padding: 8px 2px; border-bottom: 1px solid var(--border); }
.vh-wrap { margin-top: 8px; }
.vh-chart { width: 100%; height: 70px; display: block; }
.vh-line { fill: none; stroke: var(--petrol); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.vh-area { fill: var(--petrol); opacity: 0.12; stroke: none; }
.vh-labels { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; font-size: 12px; color: var(--muted); }
.vh-diff { font-weight: 700; }
.vh-diff.up { color: #4caf50; }
.vh-diff.down { color: var(--rose); }

/* Listen-Ansicht (sortierbar/ranked) */
.pl-title { background: none; border: none; color: var(--text); font: inherit; font-weight: 700; cursor: pointer; padding: 0; text-align: left; }
#playlist-view-dialog { width: min(94vw, 460px); }
#plv-title { font-weight: 700; font-size: 17px; }
.plv-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.plv-rank { width: 22px; flex-shrink: 0; text-align: center; font-weight: 700; color: var(--muted); }
.plv-album { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; background: none; border: none; text-align: left; cursor: pointer; padding: 0; color: var(--text); }
.plv-cover { width: 44px; height: 44px; flex-shrink: 0; border-radius: 5px; overflow: hidden; background: var(--surface-2); }
.plv-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.plv-meta { min-width: 0; display: flex; flex-direction: column; }
.plv-ctrls { flex-shrink: 0; display: flex; align-items: center; gap: 2px; }
.plv-mv, .plv-rm { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 14px; padding: 6px; border-radius: 6px; }
.plv-mv:disabled { opacity: 0.3; cursor: default; }
.plv-mv:active, .plv-rm:active { background: var(--surface-2); }
.plv-rm { color: var(--rose); font-size: 18px; }

/* Genre-Statistik (#9) */
.genre-row { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: none; cursor: pointer; padding: 5px 0; color: var(--text); text-align: left; }
.genre-name { flex: 0 0 38%; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.genre-bar { flex: 1; height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.genre-fill { display: block; height: 100%; background: linear-gradient(90deg, var(--petrol), var(--indigo)); border-radius: 999px; }
.genre-count { flex: 0 0 auto; font-size: 12px; color: var(--muted); min-width: 18px; text-align: right; }
.genre-loading { margin-top: 6px; }

/* Sammlungswert direkt unter dem Filter im Collection-Tab */
.value-collection { margin: 2px 0 12px; }

/* Checkbox-Zeile in Profil-Einstellungen */
.ps-check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); cursor: pointer; }
.ps-check input { width: auto; margin: 0; }

/* Lieblingssongs im Profil */
.fav-songs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fav-song { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px; text-align: left; cursor: pointer; color: var(--text); display: flex; flex-direction: column; min-width: 0; }
.fs-title { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fs-artist { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fav-songs-edit { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fav-song-slot { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px; text-align: left; cursor: pointer; color: var(--text); display: flex; flex-direction: column; justify-content: center; min-width: 0; position: relative; min-height: 46px; }
.fav-song-slot.empty { align-items: center; color: var(--muted); }
.fav-song-slot .fav-x { position: absolute; top: 2px; right: 8px; color: var(--muted); font-size: 16px; }
.song-pick-list { max-height: 55vh; overflow-y: auto; }
.song-pick-row { display: flex; flex-direction: column; width: 100%; background: none; border: none; border-bottom: 1px solid var(--border); padding: 11px 2px; text-align: left; cursor: pointer; color: var(--text); }

/* Info-/Rechtsseiten (Suche → Discend.app) */
.browse-section { margin: 60px 0 10px; font-size: 15px; font-weight: 700; color: var(--text); }
.info-page { padding: 4px 2px 8px; line-height: 1.5; }
.info-page h2 { font-size: 20px; margin: 0 0 12px; color: var(--text); }
.info-page h3 { font-size: 15px; margin: 16px 0 4px; color: var(--text); }
.info-page p { margin: 6px 0; color: var(--text); font-size: 14px; }
.info-page ul { margin: 6px 0; padding-left: 18px; }
.info-page li { margin: 4px 0; font-size: 14px; color: var(--text); }
.info-page a { color: var(--petrol); }
.info-note { color: var(--muted); font-size: 12px; font-style: italic; margin-top: 14px; }

/* Profil-Einstellungen (Settings-Sheet) */
.settings-sheet { border: none; padding: 0; background: transparent; width: 100vw; max-width: 100vw; height: 92vh; max-height: 92vh; margin: auto auto 0; }
.settings-sheet::backdrop { background: rgba(0, 0, 0, .6); }
.set-wrap { background: var(--surface); height: 100%; display: flex; flex-direction: column; border-radius: 16px 16px 0 0; overflow: hidden; }
.set-bar { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; padding-top: max(14px, env(safe-area-inset-top)); border-bottom: 1px solid var(--border); }
.set-title { font-weight: 700; font-size: 17px; color: var(--text); }
.set-cancel { background: none; border: none; color: var(--muted); font-size: 16px; cursor: pointer; }
.set-save { background: none; border: none; color: var(--rose); font-weight: 700; font-size: 16px; cursor: pointer; }
.set-body { position: relative; flex: 1; overflow: hidden; }
.set-panel { position: absolute; inset: 0; overflow-y: auto; padding: 8px 16px calc(24px + env(safe-area-inset-bottom)); transition: transform .25s ease; }
#ps-auth-panel { transform: translateX(100%); }
.settings-sheet.show-auth #ps-main { transform: translateX(-100%); }
.settings-sheet.show-auth #ps-auth-panel { transform: translateX(0); }
.set-signed { padding: 12px 0; color: var(--text); font-size: 15px; }
.set-row { display: flex; align-items: center; justify-content: space-between; width: 100%; background: none; border: none; border-top: 1px solid var(--border); padding: 14px 2px; color: var(--text); font-size: 15px; cursor: pointer; text-align: left; }
.set-row .set-chev { color: var(--muted); }
.set-signout { color: var(--rose); border-bottom: 1px solid var(--border); }
.set-lang-opt { justify-content: space-between; }
.set-lang-opt .set-lang-check { color: var(--rose); font-weight: 700; opacity: 0; }
.set-lang-opt.active .set-lang-check { opacity: 1; }
.set-section-label { text-transform: uppercase; font-size: 12px; letter-spacing: .05em; color: var(--muted); margin: 20px 0 6px; }
.set-fields { display: flex; flex-direction: column; }
.set-field { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--border); padding: 11px 0; }
.set-field > span { flex: 0 0 110px; color: var(--text); font-size: 15px; }
.set-field input, .set-field textarea { flex: 1; min-width: 0; background: none; border: none; color: var(--text); font: inherit; font-size: 15px; text-align: right; resize: none; }
.set-field input::placeholder, .set-field textarea::placeholder { color: var(--muted); }
.set-field-bio { align-items: flex-start; }
.set-field-bio > span { padding-top: 2px; }
.set-field-bio textarea { text-align: left; }
.set-check input { flex: 0 0 auto; width: auto; }
.set-back { background: none; border: none; color: var(--rose); font-size: 15px; cursor: pointer; padding: 8px 0; }
.set-wide { width: 100%; margin-top: 8px; }
.set-delete { color: var(--danger, #ff6b6b); border-bottom: 1px solid var(--border); margin-top: 8px; }
.set-danger { background: var(--danger, #c0392b); color: #fff; border: none; }
.set-danger:disabled { opacity: .45; cursor: default; }
#ps-delete-panel { transform: translateX(100%); }
.settings-sheet.show-delete #ps-main { transform: translateX(-100%); }
.settings-sheet.show-delete #ps-delete-panel { transform: translateX(0); }
#ps-lang-panel { transform: translateX(100%); }
.settings-sheet.show-lang #ps-main { transform: translateX(-100%); }
.settings-sheet.show-lang #ps-lang-panel { transform: translateX(0); }
.set-panel .ps-images { display: flex; gap: 8px; }
.set-panel .ps-images .btn { flex: 1; }

/* ---------- Desktop: zentrierte Spalte (Handy <720px bleibt unverändert) ---------- */
@media (min-width: 720px) {
  .app-header { width: 100%; max-width: 700px; margin-left: auto; margin-right: auto; }
  .view { max-width: 700px; margin-left: auto; margin-right: auto; }
  .tabbar { width: 100%; max-width: 700px; margin-left: auto; margin-right: auto; }
  /* Vollbild-Overlays (Album-Detail, Freundesprofil) als zentrierte Spalte */
  .detail-page {
    inset: 0 auto 0 auto; left: 50%; transform: translateX(-50%);
    width: 100%; max-width: 700px;
    border-left: 1px solid var(--border); border-right: 1px solid var(--border);
  }
}
