/* Layout und Komponenten nach Claude-Design-Handoff (Tokens: tokens.css) */
* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* sonst überstimmt display:flex am .sheet das hidden-Attribut */
html, body { height: 100%; margin: 0; }
body {
  background: var(--hf-bg); color: var(--hf-ink);
  font: 400 13.5px/1.45 'DM Sans', system-ui, -apple-system, sans-serif;
  -webkit-tap-highlight-color: transparent; overscroll-behavior: none;
}
button { font: inherit; color: inherit; cursor: pointer; }
.mono, .eyebrow, .cpos, .listen small { font-family: 'DM Mono', ui-monospace, monospace; }

/* Bühne: zentriert, max 430px */
.app {
  position: relative; max-width: 430px; margin: 0 auto; min-height: 100dvh;
  display: flex; flex-direction: column; overflow: hidden;
  padding: max(12px, env(safe-area-inset-top)) 0 env(safe-area-inset-bottom);
}
.spacer { flex: 1; min-height: 8px; }

/* Topbar */
.topbar { height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 0 8px 0 20px; }
.wordmark { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; letter-spacing: -.01em; color: var(--hf-ink); }
.manta-wing { transform-box: fill-box; transform-origin: center; animation: hf-manta 3.6s ease-in-out infinite; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: none; display: grid; place-items: center; }
.icon-btn:hover { background: var(--hf-surface-2); }

/* Header */
.head { padding: 4px 20px 0; display: flex; flex-direction: column; gap: 6px; }
.eyebrow { font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--hf-muted); }
h1 { margin: 0; font-size: 26px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.desc { margin: 0; color: var(--hf-ink-2); text-wrap: pretty; }

/* CoverFlow */
.stage {
  position: relative; height: calc(var(--hf-cover) + 76px); overflow: hidden; outline: none;
  touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none;
}
.stage.drag { cursor: grabbing; }
.cf {
  position: absolute; left: 50%; top: 16px; width: var(--hf-cover); height: var(--hf-cover);
  margin-left: calc(var(--hf-cover) / -2); border: 0; padding: 0; background: none; will-change: transform, opacity;
  transition: transform var(--hf-dur-flow) var(--hf-ease-flow), opacity .3s;
}
.stage.drag .cf { transition: none; }
.cf .face, .cf .refl {
  position: absolute; inset: 0; border-radius: var(--hf-r-cover); overflow: hidden; background: var(--hf-surface-2);
}
.cf .face { box-shadow: var(--hf-cover-shadow); }
.cf img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.cf .dim { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; }
.cf .refl {
  top: calc(100% + 3px); transform: scaleY(-1); opacity: .28; box-shadow: none; pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 64%, #000 100%);
          mask-image: linear-gradient(to bottom, transparent 64%, #000 100%);
}
.cf.ph .face { display: grid; place-items: center; padding: 14px; text-align: center; color: var(--hf-muted); font-weight: 600; }

/* Nav-Zeile */
.nav { display: flex; align-items: center; gap: 8px; padding: 4px 12px 0; }
.arrow {
  flex: none; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--hf-line);
  background: var(--hf-surface); font: 400 20px 'DM Mono', monospace; line-height: 1; transition: transform .12s, opacity .2s;
}
.arrow:active { transform: scale(.94); }
.arrow:disabled { opacity: .35; cursor: default; }
.info { flex: 1; min-width: 0; text-align: center; display: flex; flex-direction: column; gap: 3px; }
.ctitle { font-size: 19px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cartist { font-size: 14px; color: var(--hf-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cpos { margin-top: 4px; font-size: 11px; letter-spacing: .06em; color: var(--hf-muted); }

/* Aktionen */
.actions { display: flex; gap: 10px; padding: 22px 16px 0; }
.listen {
  flex: 1; height: 60px; border: 0; border-radius: var(--hf-r-btn); background: var(--hf-accent); color: var(--hf-accent-ink);
  padding: 0 14px; display: flex; align-items: center; gap: 12px; text-align: left; transition: filter .12s;
}
.listen:active { filter: brightness(.94); }
.listen-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.listen b { font-size: 16px; font-weight: 600; }
.listen small { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.share {
  width: 116px; height: 60px; border-radius: var(--hf-r-btn); border: 1px solid var(--hf-line-strong); background: var(--hf-surface);
  font-size: 15px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 8px; transition: transform .12s;
}
.share:active { transform: scale(.97); }

/* Monogramme */
.mono-badge {
  flex: none; display: grid; place-items: center; font: 600 13px 'DM Mono', monospace;
  width: 28px; height: 28px; border-radius: 7px; background: var(--m-bg, var(--hf-ink)); color: var(--m-fg, #fff);
}
.mono-badge svg { width: 62%; height: 62%; display: block; }
.listen .mono-badge { width: 34px; height: 34px; border-radius: 8px; box-shadow: 0 0 0 1.5px rgba(255,255,255,.7); }
.listen .mono-badge:empty { display: none; }
.svc-spotify { --m-bg: #1db954; --m-fg: #0b0b0b; } .svc-apple { --m-bg: #fa2d48; }
.svc-deezer { --m-bg: #a238ff; } .svc-youtube { --m-bg: #ff0033; }
.svc-qobuz { --m-bg: var(--hf-ink); --m-fg: var(--hf-bg); } .svc-tidal { --m-bg: var(--hf-ink-2); --m-fg: var(--hf-bg); }
.svc-bandcamp { --m-bg: #1da0c3; }

/* Footer */
.brand-foot { height: 40px; display: flex; align-items: center; justify-content: center; gap: 14px; font: 400 11px 'DM Mono', monospace; letter-spacing: .04em; color: var(--hf-muted); }
.brand-foot a { color: inherit; text-decoration: none; }
.brand-foot b { font: 600 12px 'DM Sans', sans-serif; color: var(--hf-ink-2); letter-spacing: 0; }
.brand-foot .legal:hover, .brand-foot a:hover { color: var(--hf-ink); }

/* Sheet */
.scrim { position: absolute; inset: 0; z-index: 300; background: var(--hf-scrim); opacity: 0; transition: opacity .28s; }
.scrim.on { opacity: 1; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 301; background: var(--hf-surface);
  border-radius: var(--hf-r-sheet) var(--hf-r-sheet) 0 0; box-shadow: var(--hf-sheet-shadow);
  padding: 6px 16px calc(22px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px;
  transform: translateY(105%); transition: transform .34s var(--hf-ease-flow); max-height: 92dvh; overflow-y: auto;
}
.sheet.on { transform: none; }
.grabber { align-self: center; width: 64px; height: 20px; border: 0; background: none; display: grid; place-items: center; padding: 0; }
.grabber i { width: 36px; height: 4px; border-radius: 2px; background: var(--hf-line-strong); }
.sheet-head { display: flex; gap: 14px; align-items: center; }
.sheet-head img { width: 60px; height: 60px; border-radius: var(--hf-r-cover); object-fit: cover; box-shadow: var(--hf-cover-shadow); background: var(--hf-surface-2); flex: none; }
.sheet-meta { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sheet-meta strong { font-size: 17px; font-weight: 600; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-meta span { color: var(--hf-ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-meta small { font: 400 11px 'DM Mono', monospace; letter-spacing: .06em; text-transform: uppercase; color: var(--hf-muted); }
.pref {
  display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 14px; border-radius: var(--hf-r-btn);
  background: var(--hf-accent); color: var(--hf-accent-ink); text-decoration: none; font-size: 16px; font-weight: 600;
}
.pref .mono-badge { width: 32px; height: 32px; box-shadow: 0 0 0 1.5px rgba(255,255,255,.7); }
.pref em { margin-left: auto; font: 500 10px 'DM Mono', monospace; letter-spacing: .08em; font-style: normal; }
.note { background: var(--hf-surface-2); border: 1px solid var(--hf-line); border-radius: 8px; padding: 10px 12px; font-size: 12.5px; }
.sub { font: 500 11px 'DM Mono', monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--hf-muted); margin: 0; }
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: flex; align-items: center; min-height: 54px; border-bottom: 1px solid var(--hf-line); }
.row a { flex: 1; display: flex; align-items: center; gap: 12px; min-height: 54px; color: var(--hf-ink); text-decoration: none; font-size: 15px; font-weight: 500; }
.row .out { margin-left: auto; color: var(--hf-muted); }
.badge-hires { font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 4px; color: var(--hf-hires); background: var(--hf-hires-bg); }
.star { width: 44px; height: 44px; border: 0; background: none; font-size: 20px; color: var(--hf-muted); }
.footnote { margin: 0; font-size: 12px; color: var(--hf-muted); }
.empty { color: var(--hf-ink-2); padding: 8px 0; }

.toast {
  position: absolute; top: 76px; left: 50%; transform: translateX(-50%); z-index: 400; background: var(--hf-ink); color: var(--hf-bg);
  font-size: 13px; font-weight: 500; padding: 8px 16px; border-radius: 20px; white-space: nowrap; pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .cf, .sheet, .scrim { transition: none; } .manta-wing { animation: none; }
}

/* 404 / Fehlerseite */
.err { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 0 24px; }
.err-art { position: relative; width: 190px; height: 150px; margin-bottom: 8px; }
.err-art i { position: absolute; width: 130px; height: 130px; border: 1.5px dashed var(--hf-line-strong); border-radius: var(--hf-r-cover); background: var(--hf-surface-2); }
.err-art i:first-child { left: 0; top: 10px; transform: rotate(-4deg); }
.err-art i:last-child { right: 0; top: 0; transform: rotate(3deg); }
.urlchip { font: 400 12px 'DM Mono', monospace; padding: 4px 10px; border-radius: 20px; border: 1px solid var(--hf-line); color: var(--hf-ink-2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.err-btn { text-decoration: none; justify-content: center; width: 100%; max-width: 340px; margin-top: 10px; }

/* Melden-Sheet */
.rep { display: flex; flex-direction: column; gap: 12px; }
.rep strong { font-size: 17px; font-weight: 600; }
.rep .hint { margin: 0; color: var(--hf-ink-2); }
.reasons { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; }
.reasons label { display: flex; align-items: center; gap: 12px; min-height: 48px; border-bottom: 1px solid var(--hf-line); font-size: 15px; }
.reasons input { width: 20px; height: 20px; accent-color: var(--hf-accent); }
.rep textarea { font: 400 16px/1.4 'DM Sans', sans-serif; color: var(--hf-ink); background: var(--hf-surface); border: 1px solid var(--hf-line-strong); border-radius: 6px; padding: 10px 12px; resize: none; width: 100%; }
.rep-send { flex: none; width: 100%; justify-content: center; }
