:root {
  --bg: #141110;
  --surface: #1d1917;
  --surface-2: #27221f;
  --surface-3: #312b27;
  --line: #2f2925;
  --line-strong: #4a423a;
  --text: #f4eee6;
  --muted: #a69b8f;
  --faint: #7a7065;
  --accent: #f2b34a;
  --accent-ink: #1d1406;
  --accent-soft: rgba(242, 179, 74, 0.14);
  --wave: #4a423a;
  --danger: #ff7a6b;
  --good: #8fd18a;
  --bad: #ff9a7a;
  --radius: 16px;
  --radius-sm: 10px;
  --pin-hole: var(--surface);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100dvh;
}
body.has-mini { padding-bottom: calc(76px + var(--safe-bottom)); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.icon { display: inline-flex; flex-shrink: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.block { display: block; }
.spacer { flex: 1; }
.error { color: var(--danger); font-size: 14px; min-height: 0; }
.error:empty { display: none; }

/* ---------- Layout ---------- */
.page {
  max-width: 680px;
  margin: 0 auto;
  padding: calc(8px + var(--safe-top)) 16px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 56px;
}
.topbar-title { flex: 1; min-width: 0; }
.topbar h1 { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-sub { color: var(--muted); font-size: 13px; }
.topbar-right { display: flex; gap: 4px; align-items: center; }
.topbar.home { padding-top: 4px; }
.brand { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.brand h1 { font-size: 21px; }
.logo-mark { display: inline-flex; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px;
  border-radius: 999px; border: 1px solid transparent;
  background: var(--surface-2); color: var(--text);
  font-weight: 600; font-size: 15px;
  transition: transform 0.08s ease, background 0.15s ease, opacity 0.15s;
  user-select: none;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; pointer-events: none; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; border-color: var(--line-strong); }
.btn.danger { background: var(--danger); color: #2a0b06; }
.btn.danger.ghost { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.btn.wide { width: 100%; }
.new-song { min-height: 52px; font-size: 16px; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 999px;
  border: 0; background: transparent; color: var(--text);
}
.icon-btn:active { background: var(--surface-2); }
.icon-btn.small { width: 34px; height: 34px; color: var(--muted); }
.avatar-btn { border: 0; padding: 0; background: none; border-radius: 999px; }

.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; color: #1b130b; font-weight: 700; flex-shrink: 0;
  line-height: 1;
}

.chip {
  display: inline-flex; align-items: center; gap: 4px;
  height: 34px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: transparent; color: var(--text);
  font-size: 14px; font-weight: 600; white-space: nowrap; flex-shrink: 0;
}
.chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip.add { color: var(--accent); border-style: dashed; border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.chip.new { position: relative; }
.chip.new::after {
  content: ""; position: absolute; top: 3px; right: 3px; width: 8px; height: 8px;
  border-radius: 999px; background: var(--accent); box-shadow: 0 0 0 2px var(--bg);
}

.tag {
  display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px;
  background: var(--surface-3); color: var(--muted); font-size: 11.5px; font-weight: 600;
}
.tag.accent { background: var(--accent-soft); color: var(--accent); }
.badge-new {
  display: inline-flex; align-items: center; height: 19px; padding: 0 7px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 800; letter-spacing: 0.02em;
}
.link-btn { border: 0; background: none; color: var(--accent); font-size: 14px; padding: 4px 0; }

/* ---------- Forms ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.label { font-size: 13px; color: var(--muted); font-weight: 600; }
input:not([type=checkbox]), textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
  background: var(--bg); color: var(--text); font-size: 16px; /* 16px verhindert iOS-Zoom */
  outline: none; transition: border-color 0.15s;
}
textarea { resize: vertical; min-height: 96px; line-height: 1.45; }
input:focus, textarea:focus { border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: var(--faint); }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); margin: 2px 0 0; flex-shrink: 0; }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.input-with-btn { display: flex; gap: 8px; align-items: center; }
.two-col { display: grid; gap: 14px; }
@media (min-width: 560px) { .two-col { grid-template-columns: 1fr 1fr; } }
.row-end { display: flex; justify-content: flex-end; gap: 10px; }
.row-between { display: flex; justify-content: space-between; gap: 10px; }

.drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  min-height: 130px; padding: 20px; text-align: center;
  border: 2px dashed var(--line-strong); border-radius: var(--radius);
  color: var(--muted); cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop.has-file { border-style: solid; border-color: var(--accent); color: var(--text); }
.drop-label { font-size: 14px; word-break: break-word; }

.progress { display: flex; flex-direction: column; gap: 6px; }
.progress-track { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: var(--accent); transition: width 0.2s; }
.progress-text { font-size: 13px; color: var(--muted); }

.people { display: flex; flex-direction: column; gap: 4px; }
.people-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.person {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 4px;
  border-radius: var(--radius-sm); cursor: pointer;
}
.person input { margin: 0; }

/* ---------- Login ---------- */
.login-page { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 14px; }
.login-card h1 { font-size: 28px; letter-spacing: -0.02em; }
.login-card > .muted { margin-top: -8px; margin-bottom: 8px; }
.login-mark { margin-bottom: 4px; }

/* Code-Tastenfeld wie am iPhone */
.pin-page { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 44px; padding-top: calc(24px + var(--safe-top)); padding-bottom: calc(24px + var(--safe-bottom)); }
.pin-top { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.pin-top h1 { font-size: 22px; font-weight: 600; margin-top: 6px; }
.pin-status { color: var(--muted); font-size: 15px; min-height: 22px; }
.pin-dots { display: flex; gap: 22px; margin-top: 14px; }
.pin-dot { width: 14px; height: 14px; border-radius: 999px; border: 1.5px solid var(--text); transition: background 0.08s; }
.pin-dot.on { background: var(--text); }
.pin-dots.shake { animation: shake 0.42s cubic-bezier(0.36, 0.07, 0.19, 0.97); }
@keyframes shake {
  10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(5px); }
  30%, 50%, 70% { transform: translateX(-10px); } 40%, 60% { transform: translateX(10px); }
}
.pin-pad { display: grid; grid-template-columns: repeat(3, 78px); gap: 16px 26px; }
.pin-key {
  width: 78px; height: 78px; border-radius: 999px; border: 0;
  background: rgba(255, 255, 255, 0.12); color: var(--text);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  user-select: none; -webkit-user-select: none; touch-action: manipulation;
  transition: background 0.25s;
}
.pin-key:active { background: rgba(255, 255, 255, 0.32); transition: none; }
.pin-digit { font-size: 34px; font-weight: 400; line-height: 1; }
.pin-letters { font-size: 10px; font-weight: 700; letter-spacing: 0.18em; margin-top: 2px; min-height: 12px; color: var(--text); }
.pin-key.text { background: none; font-size: 15px; font-weight: 500; white-space: nowrap; }
.pin-key.text:active { background: none; opacity: 0.5; }
@media (max-height: 640px) {
  .pin-page { gap: 24px; }
  .pin-pad { grid-template-columns: repeat(3, 70px); gap: 12px 22px; }
  .pin-key { width: 70px; height: 70px; }
}

/* ---------- Hinweis ---------- */
.hint {
  display: flex; gap: 8px; align-items: flex-start;
  padding: 12px 8px 12px 14px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); font-size: 14px; color: var(--muted);
}
.hint p { flex: 1; padding-top: 4px; }
.hint strong { color: var(--text); }

/* ---------- Song-Liste ---------- */
.song-list { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.song-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 6px 12px 12px;
  border-bottom: 1px solid var(--line);
}
.song-row:last-child { border-bottom: 0; }
.row-play {
  width: 44px; height: 44px; border-radius: 999px; border: 0; flex-shrink: 0;
  background: var(--surface-3); color: var(--text);
  display: inline-flex; align-items: center; justify-content: center;
}
.row-play.active { background: var(--accent); color: var(--accent-ink); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 4px 0; }
.row-title { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 16px; min-width: 0; }
.row-title > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-meta { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-rating { font-size: 18px; }
.row-chevron { color: var(--faint); display: inline-flex; padding: 10px 4px; }

.secondary-link {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  color: var(--muted); font-size: 14px; border-radius: var(--radius-sm);
  margin-top: 8px; align-self: flex-start;
}
.secondary-link:hover, .secondary-link:active { background: var(--surface); }
.secondary-link .muted { color: var(--faint); }

.empty { padding: 48px 16px; text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; color: var(--muted); }

/* ---------- Song-Seite ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px; }
.chips::-webkit-scrollbar { display: none; }

.player-card {
  position: sticky; top: 0; z-index: 10;
  margin: 0 -16px; padding: calc(10px + var(--safe-top)) 16px 10px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.song-page .topbar + .chips { margin-top: -6px; }
.wave-wrap { position: relative; padding-top: 22px; }
.wave { display: block; width: 100%; height: 64px; touch-action: none; cursor: pointer; }
.time { position: absolute; bottom: -18px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.time.cur { left: 0; color: var(--text); }
.time.dur { right: 0; }
.pins { position: absolute; inset: 0 0 auto 0; height: 22px; }
.pin {
  position: absolute; top: 0; transform: translateX(-50%);
  border: 0; background: none; padding: 2px; display: inline-flex;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.5));
}
.pin.resolved { opacity: 0.35; }
.controls { display: flex; align-items: center; gap: 4px; margin-top: 22px; }
.play-btn {
  width: 56px; height: 56px; border-radius: 999px; border: 0;
  background: var(--text); color: var(--bg);
  display: inline-flex; align-items: center; justify-content: center;
}
.play-btn:active { transform: scale(0.95); }
.marker-btn { --pin-hole: var(--accent); min-height: 48px; padding: 0 18px 0 14px; font-variant-numeric: tabular-nums; }

.version-info { display: flex; flex-direction: column; gap: 6px; padding: 0 2px; }
.version-head { display: flex; align-items: center; gap: 10px; }
.version-name { font-weight: 700; }
.notes { white-space: pre-wrap; color: var(--text); background: var(--surface); padding: 12px 14px; border-radius: var(--radius-sm); font-size: 15px; }

.card { background: var(--surface); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.card h3, .section h3 { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.count { font-size: 12px; font-weight: 700; color: var(--muted); background: var(--surface-3); border-radius: 999px; padding: 1px 8px; }

.rating-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 560px) { .rating-grid { grid-template-columns: repeat(4, 1fr); } }
.rate {
  display: flex; align-items: center; gap: 8px; min-height: 50px; padding: 0 12px;
  border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: transparent;
  font-weight: 600; font-size: 14.5px; text-align: left;
}
.rate-emoji { font-size: 20px; }
.rate.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.rate:active { transform: scale(0.97); }

.impressions { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 13.5px; }
.impression { display: inline-flex; align-items: center; gap: 6px; }

.verdict { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.seg {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 56px; padding: 6px 4px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: transparent; font-size: 13px; font-weight: 600; line-height: 1.2;
}
.seg .sym { font-size: 18px; font-weight: 800; }
.seg.active.better { background: var(--good); border-color: var(--good); color: #0e2410; }
.seg.active.same { background: var(--text); border-color: var(--text); color: var(--bg); }
.seg.active.worse { background: var(--bad); border-color: var(--bad); color: #2d0f06; }

.section { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.empty-inline { padding: 4px 2px; }

.comment {
  background: var(--surface); border-radius: var(--radius); padding: 12px 12px 8px 14px;
  display: flex; flex-direction: column; gap: 6px; scroll-margin-top: 180px;
  border: 1px solid transparent; transition: border-color 0.3s, background 0.3s;
}
.comment.is-new, .reply.is-new { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.reply.is-new { border-left-color: var(--accent); }
.comment.resolved .comment-body { color: var(--muted); }
.comment.resolved .time-chip { opacity: 0.55; }
.comment.flash { animation: flash 1.4s ease; }
@keyframes flash { 0%, 40% { background: var(--surface-3); border-color: var(--accent); } 100% { background: var(--surface); } }
.comment-head { display: flex; align-items: center; gap: 8px; min-height: 30px; flex-wrap: nowrap; }
.comment-name { font-weight: 650; font-size: 14.5px; white-space: nowrap; }
.comment-time { color: var(--faint); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.comment-body { white-space: pre-wrap; word-break: break-word; font-size: 15px; }
.time-chip {
  display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 9px 0 7px; border-radius: 999px;
  border: 0; background: color-mix(in srgb, var(--c, var(--accent)) 20%, transparent); color: var(--c, var(--accent));
  font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.comment-actions { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.text-btn {
  display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 10px; border-radius: 999px;
  border: 0; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600;
}
.text-btn:active { background: var(--surface-2); }
.text-btn.on { color: var(--good); }

.reactions { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.react {
  display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 9px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: transparent; font-size: 14px;
}
.react span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.react.mine { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.react.mine span { color: var(--accent); }
.react.add { color: var(--muted); padding: 0 8px; }
.emoji-picker { display: inline-flex; gap: 2px; background: var(--surface-3); border-radius: 999px; padding: 2px 4px; }
.emoji-opt { border: 0; background: none; font-size: 20px; width: 38px; height: 34px; border-radius: 999px; }
.emoji-opt:active { background: var(--surface-2); }

.replies { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 4px 6px; padding-left: 12px; border-left: 2px solid var(--line-strong); }
.reply { display: flex; flex-direction: column; gap: 4px; padding: 4px 0 2px; border-left: 2px solid transparent; margin-left: -14px; padding-left: 12px; }
.reply .comment-body { font-size: 14.5px; }

.compose-trigger {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 0 14px;
  border-radius: var(--radius); border: 1px solid var(--line-strong); background: transparent;
  color: var(--faint); text-align: left; font-size: 15px;
}
.quote { margin: 0; padding: 10px 12px; border-left: 3px solid var(--line-strong); background: var(--bg); border-radius: 0 8px 8px 0; color: var(--muted); font-size: 14px; white-space: pre-wrap; }
.quote strong { color: var(--text); }
.at-row { display: flex; align-items: center; gap: 6px; color: var(--accent); --pin-hole: var(--surface); font-size: 15px; }
.at-row strong { font-variant-numeric: tabular-nums; }
.at-row .chip { height: 32px; padding: 0 10px; color: var(--text); }

/* ---------- Sheet ---------- */
.sheet { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.55); opacity: 0; transition: opacity 0.2s; }
.sheet-panel {
  position: relative; width: 100%; max-width: 560px; max-height: calc(100dvh - 40px - var(--safe-top));
  background: var(--surface); border-radius: 22px 22px 0 0;
  padding: 6px 16px calc(18px + var(--safe-bottom));
  display: flex; flex-direction: column;
  transform: translateY(100%); transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.4);
}
.sheet.open .sheet-backdrop { opacity: 1; }
.sheet.open .sheet-panel { transform: none; }
.sheet-head { display: flex; align-items: center; gap: 8px; min-height: 52px; }
.sheet-head h2 { flex: 1; font-size: 17px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-head .icon-btn { margin-right: -8px; color: var(--muted); }
.sheet-body { overflow-y: auto; padding-bottom: 4px; display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 640px) {
  .sheet { align-items: center; }
  .sheet-panel { border-radius: 22px; padding-bottom: 20px; transform: translateY(20px) scale(0.98); opacity: 0; transition: transform 0.2s, opacity 0.2s; }
  .sheet.open .sheet-panel { opacity: 1; }
}

.menu-list { display: flex; flex-direction: column; }
.menu-item {
  display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 6px;
  border: 0; background: none; text-align: left; font-size: 16px; border-radius: var(--radius-sm);
}
.menu-item:active { background: var(--surface-2); }
.menu-item .icon { color: var(--muted); }
.menu-item.danger { color: var(--danger); }

/* ---------- Mini-Player ---------- */
.mini {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(10px + var(--safe-bottom)); z-index: 50;
  width: calc(100% - 20px); max-width: 660px;
  display: flex; align-items: center; gap: 6px; padding: 8px 6px 8px 16px;
  background: var(--surface-3); border-radius: 18px; overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}
.mini-progress { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: transparent; }
.mini-fill { height: 100%; width: 0; background: var(--accent); }
.mini-main { flex: 1; min-width: 0; padding: 4px 0; }
.mini-title { font-weight: 650; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-sub { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mini-play {
  width: 44px; height: 44px; border-radius: 999px; border: 0; background: var(--text); color: var(--bg);
  display: inline-flex; align-items: center; justify-content: center;
}

/* ---------- Admin ---------- */
.user-list { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.user-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 10px 12px 14px; width: 100%;
  border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; color: var(--text);
}
.user-row:last-child { border-bottom: 0; }
.user-row > .icon { color: var(--faint); }

/* ---------- Cover ---------- */
.album-grid, .cover-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 560px) { .album-grid, .cover-grid { grid-template-columns: repeat(3, 1fr); } }
.album-card { display: flex; flex-direction: column; gap: 4px; }
.album-card img, .album-empty { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm); background: var(--surface); }
.album-empty { display: grid; place-items: center; color: var(--faint); }
.album-title { font-weight: 600; margin-top: 4px; }
.cover { display: flex; flex-direction: column; gap: 6px; }
.cover-img {
  position: relative; padding: 0; border: 3px solid transparent; border-radius: 14px; background: var(--surface);
  overflow: hidden; aspect-ratio: 1; transition: border-color 0.15s, transform 0.1s;
}
.cover-img:active { transform: scale(0.98); }
.cover-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover.picked .cover-img { border-color: var(--accent); }
.cover-badge {
  position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 9px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700;
}
.cover-foot { display: flex; align-items: center; justify-content: space-between; min-height: 34px; }
.voters { display: flex; align-items: center; gap: 2px; }

/* ---------- Toast ---------- */
#toast {
  position: fixed; left: 50%; top: calc(14px + var(--safe-top)); z-index: 200;
  transform: translate(-50%, -20px); opacity: 0; pointer-events: none;
  background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 999px;
  font-size: 14.5px; font-weight: 600; transition: opacity 0.2s, transform 0.2s; max-width: calc(100% - 32px); text-align: center;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.error { background: var(--danger); color: #2a0b06; }

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