/* Suppress Safari auto-detected links (phone numbers, IBANs, dates, etc.) */
a[x-apple-data-detectors] {
  color: inherit !important;
  text-decoration: none !important;
  pointer-events: none;
}

:root {
  --bg: #F6E5E4;
  --panel: #FDF0EF;
  --accent: #C0C3FB;
  --primary: #EA897E;
  --text: #3B1C1A;
  --text-muted: #8A5A55;
  --radius: 14px;
  --transition: 0.18s ease;
  --primary-glow: rgba(234, 137, 126, 0.18);
  --primary-tint: rgba(234, 137, 126, 0.10);
}

html.dark {
  --bg: #0E0F1A;
  --panel: #181A2E;
  --accent: #4A4D8C;
  --primary: #EA897E;
  --text: #FAE8E6;
  --text-muted: #B08A85;
  --primary-glow: rgba(234, 137, 126, 0.25);
  --primary-tint: rgba(234, 137, 126, 0.15);
  color-scheme: dark;
}

html.dark .site-header { border-color: var(--accent); }

.material-symbols-outlined {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  line-height: 1;
  display: inline-flex;
  user-select: none;
  flex-shrink: 0;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 500;
  background: var(--accent);
  color: var(--text);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.app-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 6px 0 16px;
  height: 52px;
  border-bottom: 3px solid var(--accent);
  /* needed for absolute-positioned title */
  overflow: hidden;
}

.site-header--home {
  background: transparent;
  border-bottom: none;
  justify-content: space-between;
  padding-left: 6px;
}

/* ── Dark mode toggle ── */
.dark-toggle {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel);
  border: none;
  border-radius: 50%;
  color: var(--primary);
  cursor: pointer;
  padding: 0;
  transition: opacity var(--transition), background var(--transition);
}

.dark-toggle:active { opacity: 0.6; }

.dark-toggle .material-symbols-outlined { font-size: 1.3rem; }

.back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 4px 0;
  white-space: nowrap;
  flex-shrink: 0;
}

.back-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.header-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 140px);
  pointer-events: none;
}

.header-qr-btn {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel);
  border: none;
  border-radius: 50%;
  color: var(--primary);
  cursor: pointer;
  padding: 0;
  transition: opacity var(--transition);
}

.header-qr-btn:active {
  opacity: 0.6;
}

.header-qr-btn .material-symbols-outlined {
  font-size: 1.3rem;
}

/* ── Main content ── */
.page-content {
  flex: 1;
  padding: 20px 16px 40px;
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
  animation: pageEnter 0.22s ease both;
}

@keyframes pageEnter {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; }
}

/* ── Buttons ── */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 56px;
  padding: 14px 20px;
  border-radius: var(--radius);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: filter var(--transition), transform var(--transition);
  text-decoration: none;
  width: 100%;
}

.btn:active {
  filter: brightness(0.92);
  transform: scale(0.97);
  transition: filter 0.05s, transform 0.05s;
}

@media (hover: hover) {
  .btn:hover { filter: brightness(0.95); }
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-accent {
  background: var(--accent);
  color: var(--text);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-panel {
  background: var(--panel);
  color: var(--text);
}

/* ── Cards / panels ── */
.card {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 18px;
}

/* ── Feedback messages ── */
.feedback {
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 500;
  overflow: hidden;
  transition: opacity 0.25s ease, max-height 0.25s ease, padding 0.25s ease, margin 0.25s ease;
}

.feedback:not(.show) {
  opacity: 0;
  max-height: 0;
  padding: 0 !important;
  margin: 0 !important;
  pointer-events: none;
}

.feedback.show {
  opacity: 1;
  max-height: 200px;
  padding: 14px 16px;
  pointer-events: auto;
}

.feedback-success {
  background: #d4edda;
  color: #155724;
}

.feedback-error {
  background: #f8d7da;
  color: #721c24;
}

/* ── Home page ── */
.home-hero {
  text-align: center;
  padding: 30px 0 28px;
}

.hero-heart {
  width: 56px;
  height: 56px;
  display: block;
  margin: 0 auto 14px;
  animation: heartbeat 1.6s ease-in-out infinite;
}

.home-hero h1 {
  font-size: clamp(1.3rem, 6vw, 1.9rem);
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
  word-break: break-word;
}

.home-hero p {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.nav-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nav-btn {
  background: var(--panel);
  color: var(--text);
  border-radius: var(--radius);
  min-height: 62px;
  padding: 16px 20px;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: filter var(--transition), transform var(--transition);
  border: none;
}

.nav-btn:active {
  filter: brightness(0.94);
  transform: scale(0.97);
  transition: filter 0.05s, transform 0.05s;
}

@media (hover: hover) {
  .nav-btn:hover { filter: brightness(0.95); }
}

.nav-btn .icon {
  width: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-btn .icon .material-symbols-outlined {
  font-size: 1.6rem;
  color: var(--primary);
}

.nav-btn-admin {
  border: 2px solid var(--primary);
}

/* ── Timeline ── */
.timeline {
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent);
}

.timeline-item {
  position: relative;
  padding: 12px 16px;
  margin-bottom: 10px;
  background: var(--panel);
  border-radius: var(--radius);
  border-left: 3px solid transparent;
  transition: opacity var(--transition), border-color var(--transition);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  transition: background var(--transition);
}

.timeline-item.past {
  opacity: 0.45;
}

.timeline-item.active {
  border-left-color: var(--primary);
}

.timeline-item.active::before {
  background: var(--primary);
}

.timeline-item.active .tl-label {
  color: var(--primary);
  font-weight: 700;
}

.tl-time {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tl-label {
  font-size: 1rem;
  font-weight: 500;
  margin-top: 2px;
  transition: color var(--transition);
}

.debug-bar {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 3px solid var(--accent);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.debug-bar label {
  display: block;
  margin-bottom: 6px;
}

.debug-bar input[type="time"] {
  padding: 8px 12px;
  border-radius: 8px;
  border: 3px solid var(--accent);
  background: var(--panel);
  font-size: 1rem;
  color: var(--text);
  width: 100%;
  max-width: 200px;
}

/* ── Upload page ── */
.upload-area {
  background: transparent;
  border: 3px dashed rgba(234, 137, 126, 0.5);
  border-radius: var(--radius);
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.upload-area:hover,
.upload-area.dragover {
  border-color: var(--primary);
  background: var(--primary-tint);
}

.upload-area input[type="file"] {
  display: none;
}

.upload-icon {
  margin-bottom: 12px;
}

.upload-icon .material-symbols-outlined {
  font-size: 3rem;
  color: var(--primary);
}

.upload-area p {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 400;
  margin-top: 4px;
}

.upload-area .file-name {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--primary);
  font-weight: 500;
  min-height: 20px;
}

.upload-progress {
  display: none;
  margin-top: 12px;
  height: 4px;
  background: var(--panel);
  border-radius: 2px;
  overflow: hidden;
}

.upload-progress.show { display: block; }

.upload-progress-bar {
  height: 100%;
  background: var(--primary);
  width: 0%;
  transition: width 0.3s ease;
  border-radius: 2px;
}

/* ── Gallery ── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}


.gallery-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 60px 20px;
  font-size: 0.95rem;
}

.gallery-count {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 52px 12px 12px;
  overflow-y: auto;
}

.lightbox.open {
  display: flex;
}

.lightbox-close {
  position: fixed;
  top: 6px;
  right: 6px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--primary);
  cursor: pointer;
  background: var(--panel);
  border: none;
  border-radius: 50%;
  line-height: 1;
  padding: 0;
  z-index: 201;
}

/* ── Liederwunsch ── */
.search-row {
  display: flex;
  gap: 8px;
}

.search-input-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  width: 100%;
  padding: 14px 40px 14px 16px;
  border-radius: var(--radius);
  border: 3px solid var(--accent);
  background: var(--panel);
  font-size: 1rem;
  color: var(--text);
  outline: none;
  min-height: 52px;
  transition: border-color var(--transition);
}

.search-input:focus {
  border-color: var(--primary);
}

.search-input::placeholder {
  color: var(--text);
  opacity: 0.45;
}

.search-input:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.search-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.search-clear {
  position: absolute;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: none;
  color: var(--primary);
  border: none;
  font-size: 0.75rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
}

.search-btn {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: var(--radius);
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: filter var(--transition);
}

.search-btn .material-symbols-outlined {
  font-size: 1.4rem;
}

.search-btn:active { filter: brightness(0.9); }

@media (hover: hover) {
  .search-btn:hover { filter: brightness(0.88); }
  .track-card:hover { background: var(--accent); }
}

.track-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--panel);
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color var(--transition), background var(--transition);
}

.track-card:active { background: var(--accent); }

.track-card.selected {
  border-color: var(--primary);
  background: var(--primary-tint);
}

.track-cover,
.track-cover-placeholder {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: var(--accent);
  flex-shrink: 0;
}

.track-cover { object-fit: cover; transition: opacity 0.3s ease; }

.track-cover-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--primary);
}

.track-info {
  flex: 1;
  min-width: 0;
}

/* Shared text truncation */
.track-name,
.track-artist,
.queue-attribution,
.admin-list-title,
.admin-list-sub {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.track-artist {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 400;
}

.queue-section {
  margin-top: 8px;
}

.queue-empty {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 4px 0;
}

.section-header {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary);
  padding: 12px 0 8px;
}

.queue-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 4px;
}

.queue-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  background: var(--panel);
}

/* ── Now Playing card ── */
.now-playing-section {
  margin-top: 16px;
  margin-bottom: 4px;
}

.now-playing-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.now-playing-label .material-symbols-outlined {
  font-size: 1rem;
}

.now-playing-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  background: var(--panel);
  border: 2px solid var(--accent);
}

.queue-item img,
.queue-item .track-cover-placeholder {
  width: 44px;
  height: 44px;
  border-radius: 6px;
}

.queue-item img { transition: opacity 0.3s ease; background: var(--accent); }
.now-playing-card img { transition: opacity 0.3s ease; background: var(--accent); border-radius: 6px; }

/* ── Zustupf ── */
.zustupf-section {
  margin-bottom: 20px;
}

.zustupf-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.iban-display {
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text);
  padding: 16px;
  background: var(--panel);
  border: 3px solid var(--accent);
  border-radius: var(--radius);
  word-break: break-all;
}

.copy-feedback {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--primary);
  transition: opacity 0.3s;
}

.divider {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 28px 0;
  position: relative;
}

.divider::before,
.divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--accent);
}

.divider::before { left: 0; }
.divider::after { right: 0; }

/* ── Welcome page ── */
.welcome-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80dvh;
  padding: 32px 0;
}

.welcome-hero {
  text-align: center;
  margin-bottom: 40px;
}

.welcome-heart {
  font-size: 3.5rem;
  color: var(--primary);
  display: block;
  margin-bottom: 12px;
  animation: heartbeat 1.6s ease-in-out infinite;
}

.welcome-hero h1 {
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.01em;
}

.welcome-hero p {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.welcome-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.welcome-input {
  width: 100%;
  padding: 16px;
  border-radius: var(--radius);
  border: 3px solid var(--accent);
  background: var(--panel);
  font-size: 1.1rem;
  color: var(--text);
  outline: none;
  min-height: 56px;
  transition: border-color var(--transition);
  text-align: center;
}

.welcome-input:focus {
  border-color: var(--primary);
}

/* ── Zustupf payment cards ── */
.zustupf-hero {
  text-align: center;
  padding: 24px 0 32px;
}

.zustupf-hero-icon {
  font-size: 3rem;
  color: var(--primary);
  display: block;
  margin-bottom: 10px;
}

.zustupf-hero p {
  color: var(--text-muted);
  font-size: 1rem;
}

.payment-card {
  background: var(--panel);
  border: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.payment-card + .payment-card {
  margin-top: 16px;
}

.payment-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.payment-card-icon {
  font-size: 2rem;
  color: var(--primary);
}

.payment-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.payment-card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 400;
  margin: 0;
}

/* ── Lightbox caption & download ── */
.lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  max-height: 90dvh;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 70dvh;
  object-fit: contain;
  border-radius: 8px;
  border: 3px solid var(--accent);
}

.lightbox-caption {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}

.lightbox-download {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  background: var(--primary);
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: filter var(--transition);
}

.lightbox-download:active {
  filter: brightness(0.88);
}


/* ── Queue attribution ── */
.queue-attribution {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 2px;
}

/* ── Gallery items with like overlay ── */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.gallery-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
}

.gallery-item.loading {
  background: linear-gradient(90deg, var(--panel) 25%, var(--accent) 50%, var(--panel) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease infinite;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s ease, filter var(--transition);
}

.gallery-item:active img {
  filter: brightness(0.85);
}

.gallery-uploader {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: rgba(0,0,0,0.5);
  color: rgba(255,255,255,0.9);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 20px;
  pointer-events: none;
  max-width: calc(100% - 60px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.like-btn {
  position: absolute;
  bottom: 6px;
  right: 6px;
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(0,0,0,0.45);
  color: rgba(255,255,255,0.8);
  border: none;
  border-radius: 20px;
  padding: 5px 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  line-height: 1;
}

.like-btn-icon {
  width: 13px;
  height: 13px;
  display: block;
  flex-shrink: 0;
}

.like-btn.has-likes {
  background: rgba(0,0,0,0.75);
  color: #fff;
}

.like-btn.liked {
  background: rgba(234,137,126,0.95);
  color: #fff;
}

.like-btn .like-count {
  font-size: 0.85rem;
}

/* Lightbox actions row */
.lightbox-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.lightbox-like-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  background: var(--panel);
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.lightbox-like-btn.liked {
  background: var(--primary);
  color: #fff;
}

.lightbox-like-btn .material-symbols-outlined,
.lightbox-delete-btn .material-symbols-outlined {
  font-size: 1.2rem;
}

.lightbox-delete-btn {
  display: flex;
  align-items: center;
  color: var(--primary);
  background: var(--panel);
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.lightbox-delete-btn:active {
  background: var(--primary);
  color: #fff;
}

/* ── Admin page ── */
.admin-stats {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
}

.admin-stat {
  flex: 1;
  background: var(--panel);
  border-radius: var(--radius);
  padding: 14px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.admin-stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-section {
  margin-top: 28px;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 320px;
  overflow-y: auto;
}

.admin-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--panel);
}

.admin-list-info {
  flex: 1;
  min-width: 0;
}

.admin-list-title {
  font-size: 0.9rem;
  font-weight: 600;
}

.admin-list-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 400;
}

.admin-icon-btn,
.queue-delete-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  color: var(--primary);
  flex-shrink: 0;
  transition: color var(--transition), background var(--transition);
}

.admin-icon-btn .material-symbols-outlined,
.queue-delete-btn .material-symbols-outlined {
  font-size: 1.2rem;
}

.admin-icon-btn.danger:active,
.queue-delete-btn:active {
  color: var(--primary);
  background: var(--primary-glow);
}

.admin-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--primary);
  color: #fff;
  border-radius: 4px;
  padding: 2px 5px;
  vertical-align: middle;
}

.admin-empty {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 8px 0;
}

.admin-row {
  display: flex;
  gap: 10px;
}

.btn.danger {
  color: var(--primary);
  border-color: var(--primary);
}

/* Timeline editor */
.timeline-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.tl-time-input,
.tl-label-input {
  padding: 10px 12px;
  border-radius: 10px;
  border: 3px solid var(--accent);
  background: var(--panel);
  font-size: 0.95rem;
  color: var(--text);
}

.tl-time-input { width: 110px; flex-shrink: 0; }
.tl-label-input { flex: 1; outline: none; }

.tl-time-input:focus,
.tl-label-input:focus {
  border-color: var(--primary);
  outline: none;
}

/* QR codes */
.qr-grid {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.qr-card {
  flex: 1;
  min-width: 140px;
  background: var(--panel);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.qr-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.qr-card canvas {
  border-radius: 8px;
  max-width: 100%;
}

.qr-url {
  font-size: 0.75rem;
  color: var(--text-muted);
  word-break: break-all;
  text-align: center;
}

/* ── Utilities ── */
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.gap-8 { gap: 8px; }
.flex-col { display: flex; flex-direction: column; }

/* ── Footer wave ── */
.site-footer {
  position: relative;
  flex-shrink: 0;
  height: 80px;
  overflow: hidden;
  margin-bottom: -12px;
}

.footer-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 200%;
  height: 80px;
}

.footer-wave svg {
  display: block;
  width: 100%;
  height: 100%;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  12%       { transform: scale(1.10); }
  24%       { transform: scale(1); }
  36%       { transform: scale(1.06); }
  50%       { transform: scale(1); }
}

@keyframes wave-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@keyframes wave-scroll-reverse {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}

@keyframes wave-bob-slow { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes wave-bob-med  { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes wave-bob-fast { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

.footer-wave--slow     { animation: wave-scroll 60s linear infinite 0s; }
.footer-wave--slow svg { animation: wave-bob-slow 18s ease-in-out infinite; }

.footer-wave--med      { animation: wave-scroll-reverse 40s linear infinite -13.33s; }
.footer-wave--med  svg { animation: wave-bob-med  13s ease-in-out infinite 3s; }

.footer-wave--fast     { animation: wave-scroll 25s linear infinite -15s; }
.footer-wave--fast svg { animation: wave-bob-fast  9s ease-in-out infinite 6s; }

/* ── Gallery toolbar ── */
.gallery-toolbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  background: var(--panel);
  border-radius: var(--radius);
  border: 3px solid var(--accent);
  padding: 10px 14px;
  margin-bottom: 14px;
}

.gallery-count-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
}

.gallery-count-badge .material-symbols-outlined {
  font-size: 1.25rem;
  color: var(--primary);
}

.gallery-sort-seg {
  display: flex;
  background: var(--bg);
  border-radius: 20px;
  padding: 3px;
  gap: 2px;
}

.sort-seg-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  opacity: 0.4;
  transition: background var(--transition), color var(--transition), opacity var(--transition);
}

.sort-seg-btn.active {
  background: var(--primary);
  color: #fff;
  opacity: 1;
}

.sort-seg-btn .material-symbols-outlined {
  font-size: 1rem;
}

/* ── Hide scrollbar ── */
* { scrollbar-width: none; }
*::-webkit-scrollbar { display: none; }
