/* Look angelehnt an para-dei.de: Bordeaux, Sand, schmale Versalien (Karantina), Serifenschrift (Cormorant Garamond) */
:root {
  --ink: #140b0b;
  --bg: #1d1011;
  --bg-2: #2a1719;
  --line: rgba(211, 198, 192, 0.18);
  --text: #eee5e0;
  --muted: #b9a59e;
  --wine: #8c2c31;
  --wine-dark: #6f2126;
  --wine-light: #a83a40;
  --sand: #d3c6c0;
  --paper: rgba(222, 211, 205, 0.94);
  --paper-ink: #1b1212;
  --paper-muted: #6b5753;
  --paper-line: rgba(27, 18, 18, 0.14);
  --radius: 4px;
  --display: "Karantina", "Oswald", Impact, sans-serif;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Assistant", system-ui, sans-serif;
  --hero: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 19px/1.45 var(--serif);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
/* Bandfoto ganz dezent im Hintergrund, wie auf der Website */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2;
  background: var(--hero) center 20% / cover no-repeat;
  filter: blur(6px) saturate(0.8); transform: scale(1.05); opacity: 0.35;
}
body::after { content: ""; position: fixed; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(29,16,17,.55), rgba(29,16,17,.92) 55%); }
body.has-player { padding-bottom: 100px; }
a { color: var(--sand); }
h1 { font: 400 40px/1 var(--display); letter-spacing: 0.04em; text-transform: uppercase; margin: 0 0 12px; }
p { margin: 0 0 14px; }
svg { width: 22px; height: 22px; display: block; }

#view { max-width: 760px; margin: 0 auto; padding: max(20px, env(safe-area-inset-top)) 16px 32px; }

.display { font: 400 clamp(54px, 15vw, 84px)/0.92 var(--display); letter-spacing: 0.04em; text-transform: uppercase; }
.display.sm { font-size: clamp(44px, 12vw, 66px); }
.eyebrow { font: 600 13px var(--sans); text-transform: uppercase; letter-spacing: 0.2em; color: var(--sand); opacity: .85; margin-bottom: 8px; }
.lead { font-size: 21px; color: var(--sand); max-width: 30em; }
.muted { color: var(--muted); }
.small { font-size: 16px; color: var(--muted); }
.label-sm { display: block; font: 600 13px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 26px 0 8px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--wine); color: var(--sand); border: 1px solid var(--wine); border-radius: var(--radius);
  padding: 14px 24px; font: 600 15px var(--serif); letter-spacing: .16em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; transition: background .15s, transform .15s;
}
.btn:hover { background: var(--wine-light); border-color: var(--wine-light); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.wide { width: 100%; margin-top: 14px; }
.btn.ghost { background: transparent; color: var(--sand); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--sand); }
.btn svg { width: 18px; height: 18px; }
.small-btn { padding: 8px 12px; font-size: 13px; letter-spacing: .1em; }

input {
  width: 100%; background: #fbf8f6; color: var(--paper-ink);
  border: 1px solid transparent; border-radius: var(--radius);
  padding: 13px 14px; font: 500 19px var(--serif); outline: none;
}
input::placeholder { color: #8f7d78; }
input:focus { border-color: var(--wine-light); box-shadow: 0 0 0 3px rgba(140, 44, 49, .35); }

.code-form { display: flex; gap: 8px; }
.code-form input { font: 600 18px ui-monospace, Menlo, monospace; letter-spacing: 0.1em; text-transform: uppercase; }
.code-form input::placeholder { text-transform: none; letter-spacing: 0; font: italic 18px var(--serif); }
.code-form .btn { flex: none; }
.code-form + .small { margin-top: 10px; }

.notice { background: rgba(140, 44, 49, 0.25); border-left: 3px solid var(--wine-light); padding: 14px 16px; margin: 18px 0; font-size: 18px; }
.notice.slim { margin: 0 0 14px; }

.loading { display: grid; place-items: center; min-height: 60vh; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--sand); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Logo */
.brand-logo { display: block; max-width: 100%; height: auto; filter: drop-shadow(0 4px 18px rgba(0,0,0,.35)); }
.brand-text { font: 400 64px/1 var(--display); letter-spacing: .06em; text-transform: uppercase; color: #fff; }

/* Start */
/* Logo oben auf dunklem Grund, Foto darunter – so liegt das Logo nie über den Gesichtern */
.hero {
  position: relative; margin: calc(-1 * max(20px, env(safe-area-inset-top))) -16px 0;
  aspect-ratio: 1 / 1.28; overflow: hidden; background: var(--bg);
}
.hero-img { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 78.1%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, var(--bg) 0%, var(--bg) 21%, rgba(29,16,17,0) 34%, rgba(29,16,17,0) 52%, rgba(29,16,17,.72) 70%, var(--bg) 88%); }
.hero-brand { position: absolute; z-index: 1; left: 0; right: 0; top: max(28px, env(safe-area-inset-top)); display: flex; justify-content: center; padding: 0 8%; }
.hero-brand .brand-logo { width: min(520px, 100%); }
.hero.no-photo { aspect-ratio: auto; height: 220px; }
/* Text ragt ins untere Drittel des Fotos, damit Code-Feld und Knopf ohne Scrollen sichtbar sind */
.welcome-body { position: relative; z-index: 1; margin-top: -44vw; }
.hero.no-photo + .welcome-body { margin-top: -40px; }
.welcome .display { font-size: clamp(48px, 13vw, 72px); margin-bottom: 10px; }
.welcome .lead { font-size: 19px; line-height: 1.4; margin-bottom: 0; }
.welcome .label-sm { margin-top: 18px; }
@media (min-width: 760px) {
  .hero { margin: 0; border-radius: var(--radius); aspect-ratio: auto; height: min(620px, 72vh); }
  .hero-img { height: calc(100% - 150px); object-position: center 30%; }
  .hero::after { background: linear-gradient(180deg, var(--bg) 0%, var(--bg) 150px, rgba(29,16,17,0) 210px, rgba(29,16,17,0) 50%, rgba(29,16,17,.75) 72%, var(--bg) 92%); }
  .hero-brand .brand-logo { width: 380px; }
  .welcome-body { margin-top: max(-230px, -26vh); padding: 0 32px; }
}

.center { text-align: center; padding-top: 10vh; max-width: 520px; margin: 0 auto; }
.center .btn { margin-top: 10px; }
.center .unlock-items { text-align: left; margin: 20px 0; }

/* Code einlösen */
.unlock { padding-top: 3vh; max-width: 520px; margin: 0 auto; }
.top-brand { width: 150px; margin-bottom: 26px; }
.unlock-items { display: grid; gap: 10px; margin: 22px 0 8px; }
.unlock-item { display: flex; gap: 14px; align-items: center; background: var(--paper); color: var(--paper-ink); border-radius: var(--radius); padding: 10px; }
.unlock-item strong { display: block; font: 400 30px/1 var(--display); letter-spacing: .04em; text-transform: uppercase; }
.unlock-item span { color: var(--paper-muted); font-size: 16px; }
.register { margin-top: 8px; }
.lockline { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; }
.lockline svg { flex: none; width: 18px; height: 18px; margin-top: 3px; color: var(--sand); }
.pair-icon { width: 64px; height: 64px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 50%; background: var(--wine); color: var(--sand); }
.pair-icon svg { width: 30px; height: 30px; }

/* Cover */
.cover { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 2px; display: block; background: var(--bg-2); }
.cover.sm { width: 68px; height: 68px; flex: none; }
.cover.lg { width: min(280px, 72vw); box-shadow: 0 24px 60px rgba(0,0,0,.55); }
.cover-empty { display: grid; place-items: center; background: linear-gradient(135deg, var(--wine), var(--wine-dark)); }
.cover-empty span { font: 400 2.6em var(--display); color: var(--sand); }
.cover.sm.cover-empty span { font-size: 30px; }

/* Bibliothek */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 26px; }
.top .top-logo { height: 46px; width: auto; display: block; margin-bottom: 8px; }
.top h1 { margin: 0; font-size: 44px; }
.top > .icon-btn + h1 { flex: 1; font-size: 36px; }
.top-actions { display: flex; gap: 8px; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(211,198,192,.1); color: var(--sand); border: 1px solid var(--line); text-decoration: none; flex: none; }
.icon-btn:hover { background: var(--wine); border-color: var(--wine); }
.section-title { font: 400 30px var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--sand); margin: 4px 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px 14px; }
@media (min-width: 600px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.card { color: var(--text); text-decoration: none; }
.card .cover { margin-bottom: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.45); transition: transform .2s; }
.card:hover .cover { transform: translateY(-3px); }
.card strong { display: block; font: 400 28px/1 var(--display); letter-spacing: .05em; text-transform: uppercase; }
.card span { color: var(--muted); font-size: 16px; }
.empty { text-align: center; padding: 60px 0; color: var(--muted); }

/* Album – heller Bereich wie „Neueste Musik“ auf der Website */
.album { position: relative; }
.album-bg { position: fixed; inset: 0 0 auto 0; height: 70vh; background-size: cover; background-position: center; filter: blur(50px) saturate(1.2); opacity: .3; z-index: -1; mask-image: linear-gradient(#000, transparent); -webkit-mask-image: linear-gradient(#000, transparent); }
.album-top { margin-bottom: 14px; }
.album-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 22px; margin-bottom: 24px; }
@media (min-width: 640px) {
  .album-hero { flex-direction: row; align-items: flex-end; text-align: left; }
  .cover.lg { width: 240px; }
}
.album-info h1 { margin-bottom: 6px; }
.album-info .desc { color: var(--sand); font-size: 18px; font-style: italic; max-width: 34em; }
.play-all { margin-top: 6px; }
.paper { background: var(--paper); color: var(--paper-ink); border-radius: var(--radius); padding: 6px 14px; }
.paper .notice { background: rgba(140,44,49,.1); color: var(--paper-ink); }
.tracks { list-style: none; padding: 0; margin: 0; }
.track { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 8px; padding: 14px 4px; cursor: pointer; }
.track + .track { border-top: 1px solid var(--paper-line); }
.track:hover .t-title { color: var(--wine-light); }
.t-no { color: var(--paper-muted); font: 600 15px var(--sans); text-align: center; }
.t-title { color: var(--wine); font-size: 20px; font-weight: 600; }
.t-dur { color: var(--paper-muted); font: 500 15px var(--sans); font-variant-numeric: tabular-nums; }
.track.playing { background: rgba(140,44,49,.08); }
.eq { display: none; gap: 2px; height: 14px; align-items: flex-end; justify-content: center; }
.eq i { width: 3px; background: var(--wine); border-radius: 1px; animation: eq 0.9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -0.3s; }
.eq i:nth-child(3) { animation-delay: -0.6s; }
.track.playing .num { display: none; }
.track.playing .eq { display: inline-flex; }
.track.paused .eq i { animation-play-state: paused; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 14px; } }

/* Panels / Geräte */
.panel { background: var(--paper); color: var(--paper-ink); border-radius: var(--radius); padding: 20px; }
.panel .small { color: var(--paper-muted); }
.panel a { color: var(--wine); }
.devices { list-style: none; padding: 0; margin: 18px 0 6px; display: grid; gap: 10px; }
.devices li { display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,.5); border-radius: var(--radius); padding: 12px 14px; }
.devices li > div { flex: 1; min-width: 0; }
.devices strong { display: block; font-family: var(--sans); font-size: 16px; }
.devices span { color: var(--paper-muted); font: 14px var(--sans); }
.devices .btn.ghost { color: var(--wine); border-color: var(--paper-line); }
.d-icon { color: var(--wine); }
.badge { background: var(--wine); color: var(--sand) !important; font: 600 12px var(--sans) !important; letter-spacing: .06em; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.pair { display: flex; gap: 18px; align-items: center; margin-top: 18px; background: rgba(255,255,255,.5); border-radius: var(--radius); padding: 16px; flex-wrap: wrap; }
.pair-qr { width: 150px; height: 150px; background: #fff; padding: 8px; flex: none; }
.pair-qr svg { width: 100%; height: 100%; }
.pair > div:last-child { flex: 1; min-width: 200px; }
.pair a { word-break: break-all; }

/* Player – Bordeaux-Leiste wie der Player auf der Website */
.player {
  position: fixed; left: 8px; right: 8px; bottom: max(8px, env(safe-area-inset-bottom));
  max-width: 760px; margin: 0 auto;
  background: var(--wine); color: var(--sand);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 16px 40px rgba(0,0,0,.5); z-index: 10;
}
.p-progress { height: 4px; background: rgba(0,0,0,.25); cursor: pointer; }
.p-bar { height: 100%; width: 0; background: var(--sand); }
.p-inner { display: flex; align-items: center; gap: 10px; padding: 10px; }
.p-cover { width: 50px; height: 50px; border-radius: 2px; object-fit: cover; flex: none; background: var(--wine-dark); }
.p-meta { flex: 1; min-width: 0; }
.p-meta strong, .p-meta span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-meta strong { font: 400 24px/1.05 var(--display); letter-spacing: .05em; text-transform: uppercase; color: #fff; }
.p-meta span { color: var(--sand); font-size: 15px; opacity: .85; }
.p-time { font: 13px var(--sans); font-variant-numeric: tabular-nums; display: none; opacity: .85; }
@media (min-width: 560px) { .p-time { display: block; } }
.p-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: var(--sand); display: grid; place-items: center; cursor: pointer; flex: none; }
.p-play { width: 46px; height: 46px; background: var(--sand); color: var(--wine); }

.toast {
  position: fixed; left: 50%; top: max(16px, env(safe-area-inset-top)); transform: translate(-50%, -150%);
  background: var(--sand); color: var(--paper-ink); padding: 12px 18px; border-radius: var(--radius); font: 600 18px var(--serif);
  max-width: calc(100% - 32px); box-shadow: 0 12px 30px rgba(0,0,0,.4); transition: transform .3s ease, opacity .3s; z-index: 20; text-align: center; opacity: 0; pointer-events: none;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
