/* =========================================
   PIXEL MUSIC — component styles
   Palette / tokens adapted from the brand stylesheet
   ========================================= */
:root {
  --bg: #1a1520;
  --bg-deep: #120f18;
  --text: #f5e6d0;
  --text-dim: #d4a574;

  --accent-purple: #a78bfa;
  --accent-orange: #fb923c;
  --accent-gold: #fbbf24;
  --accent-peach: #fdba74;

  --surface: #211a29;
  --border: #493448;

  --font-script: "Dancing Script", cursive;
  --font-body: "Inter", ui-sans-serif, system-ui, sans-serif;

  --success: #4caf7d;
  --danger: #f47174;
}

* { box-sizing: border-box; }

html, body { height: 100%; margin: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--font-script); margin: 0; font-weight: 700; }

a { color: var(--accent-gold); }

/* ---------- layout ---------- */
.container {
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  flex: 1;
  position: relative;
  z-index: 1;
}

.container-wide { max-width: 920px; }

/* ---------- surfaces ---------- */
.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
}

.glow { box-shadow: 0 0 32px -8px rgba(251, 146, 60, 0.35); }

.card { padding: 1.5rem; }

.center { display: flex; align-items: center; justify-content: center; text-align: center; }

.muted { color: var(--text-dim); }

.row { display: flex; gap: 0.75rem; align-items: center; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 0.75rem; }

/* ---------- form fields ---------- */
.field {
  background: rgba(18, 15, 24, 0.6);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  padding: 0.85rem 1rem;
  font-size: 1rem;
  font-family: var(--font-body);
  width: 100%;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.field::placeholder { color: #7d6f95; }

.field:focus {
  outline: none;
  border-color: var(--accent-orange);
  box-shadow: 0 0 20px rgba(251, 146, 60, 0.15);
}

.field.hidden-field {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* ---------- buttons ---------- */
.btn {
  border-radius: 3px;
  font-weight: 500;
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.75rem 1.75rem;
  cursor: pointer;
  border: 1px solid var(--accent-orange);
  background: transparent;
  color: var(--accent-orange);
  position: relative;
  overflow: hidden;
  z-index: 1;
  transition: color 0.35s ease, border-color 0.35s ease, transform 0.2s ease;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 0%;
  background: var(--accent-orange);
  transition: width 0.35s ease;
  z-index: -1;
}

.btn:hover:not(:disabled) {
  color: #fff;
  border-color: var(--accent-purple);
  transform: translateY(-1px);
}

.btn:hover:not(:disabled)::before { width: 100%; }

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

.btn-primary {
  background: transparent;
  color: var(--accent-orange);
  border-color: var(--accent-orange);
}

.btn-primary::before { display: none; }

.btn-primary:hover:not(:disabled) {
  color: #1a1408;
  box-shadow: 0 0 28px -4px rgba(251, 146, 60, 0.6);
}

.btn-ghost {
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost.danger-outline { border-color: rgba(244, 113, 116, 0.5); color: var(--danger); }
.btn-ghost.active { border-color: var(--accent-orange); color: var(--accent-orange); background: var(--surface); }

.btn-sm { padding: 0.5rem 1.1rem; font-size: 0.72rem; }

/* ---------- pills / status ---------- */
.pill {
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.3rem 0.7rem;
  border-radius: 2px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  white-space: nowrap;
}
.pill.accepted { color: var(--success); border-color: rgba(76, 175, 125, 0.4); }
.pill.rejected { color: var(--danger); border-color: rgba(244, 113, 116, 0.4); }
.pill.playing { color: var(--accent-gold); border-color: rgba(251, 191, 36, 0.5); }
.pill.played { color: var(--accent-purple); border-color: rgba(167, 139, 250, 0.45); }

/* ---------- request list ---------- */
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }

.request-item { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem; }
.request-item .title { font-weight: 600; }
.request-item .meta { font-size: 0.88rem; color: var(--text-dim); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flex-1 { flex: 1; min-width: 0; }

.guest-status {
  position: absolute;
  top: 0.65rem;
  right: 0.45rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0.1rem 0;
  flex: 0 0 auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: rgba(245, 230, 208, 0.5);
  font-size: 0.62rem;
  line-height: 1;
  white-space: nowrap;
}
.guest-status::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-gold); box-shadow: 0 0 8px rgba(251, 191, 36, 0.45); }
#request-list .guest-status.accepted::after { background: var(--success); box-shadow: 0 0 8px rgba(76, 175, 125, 0.5); }
#request-list .guest-status.playing::after { background: var(--accent-gold); box-shadow: 0 0 8px rgba(251, 191, 36, 0.55); }
#request-list .guest-status.played::after { background: var(--accent-purple); box-shadow: 0 0 8px rgba(167, 139, 250, 0.5); }
#request-list .guest-status.rejected::after { background: var(--danger); box-shadow: 0 0 8px rgba(244, 113, 116, 0.5); }
.privacy-note { margin: 0; color: var(--text-dim); font-size: 0.75rem; line-height: 1.45; }

/* Admin queue and event settings */
.event-settings-grid { display: grid; grid-template-columns: minmax(0, 1fr) 170px; gap: 0.75rem; }
.event-settings-grid label { color: var(--text-dim); font-size: 0.82rem; display: flex; flex-direction: column; gap: 0.35rem; }
.event-settings-actions { flex-wrap: wrap; }
.request-overview-title { margin: 0 0 .75rem; }
.event-create-heading { margin-bottom: 1.25rem; }
.event-create-heading h2 { margin: .1rem 0 .35rem; }
.event-create-heading .muted { margin: 0; font-size: .88rem; }
.active-event-card { margin-top: 1.25rem; padding: 1.25rem; border: 1px solid var(--border); border-left: 3px solid var(--accent-orange); background: rgba(18,15,24,.42); }
.active-event-heading { margin-bottom: 1rem; }
.active-event-heading h3 { color: var(--text); font-size: 1.4rem; }
.public-event-editor { border-left: 3px solid var(--accent-orange); }
.public-event-heading { margin-bottom: 1.25rem; }
.public-event-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.public-event-form-grid label,
#public-event-form > label,
.public-event-image-field > label { color: var(--text-dim); font-size: .82rem; display: flex; flex-direction: column; gap: .35rem; }
.public-event-image-preview { display: flex; align-items: flex-end; gap: .75rem; margin-top: .7rem; }
.public-event-image-preview[hidden] { display: none; }
.public-event-image-preview img { width: min(240px, 100%); aspect-ratio: 16 / 10; object-fit: cover; border: 1px solid var(--border); }
.public-event-location-field,
.public-event-link-field { grid-column: span 1; }
.admin-public-event-list { display: flex; flex-direction: column; gap: .65rem; margin-top: .7rem; }
.admin-public-event-card { display: flex; align-items: flex-start; gap: 1rem; padding: 1rem 1.15rem; }
.admin-public-event-image { width: 120px; height: 90px; flex: 0 0 120px; object-fit: cover; border: 1px solid var(--border); }
.admin-public-event-card h3 { margin: .2rem 0; font-size: 1.2rem; color: var(--text); }
.admin-public-event-card p { margin: 0; }
.admin-public-event-date { color: var(--accent-gold); font-size: .75rem; font-weight: 600; }
.admin-public-event-description { margin-top: .55rem !important; color: var(--text-dim); font-size: .86rem; }
.admin-public-event-actions { flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; }
.queue-heading h2 { font-size: 1.25rem; }
.queue-now { display: flex; flex-direction: column; gap: 0.55rem; padding: 1rem; border-radius: 14px; background: rgba(251, 191, 36, 0.09); border: 1px solid rgba(251, 191, 36, 0.35); }
.queue-label { color: var(--accent-gold); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; }
.queue-next-title { margin: 1rem 0 0.5rem; font-size: 1rem; color: var(--text-dim); }
.queue-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.queue-list li { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.7rem 0; border-bottom: 1px solid var(--border); }
.queue-list li:last-child { border-bottom: 0; }
.admin-request-item { position: relative; padding-top: 2.4rem; }
.admin-request-item .flex-1 { position: relative; padding-right: 1.75rem; }
.admin-request-item > .status {
  position: absolute;
  top: .75rem;
  right: .85rem;
  z-index: 1;
}
.edit-btn { position: absolute; top: 0; right: 0; border: 0; background: transparent; color: var(--text-dim); cursor: pointer; font-size: 1rem; line-height: 1; padding: 0.15rem; }
.edit-btn:hover, .edit-btn:focus-visible { color: var(--accent-gold); }

/* Mobile song cards: artwork, information and reactions each have one clear role. */
#request-list .request-card {
  position: relative;
  align-items: stretch;
  padding: 0.9rem;
  border-radius: 4px;
  background: var(--surface);
}
#request-list .request-main { display: flex; gap: 0.85rem; align-items: center; min-width: 0; }
#request-list .request-art {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(18, 15, 24, 0.7);
  border: 1px solid var(--border);
}
#request-list .request-art:empty::after { content: "♫"; color: var(--accent-gold); font-size: 1.5rem; }
#request-list .request-art .link-preview,
#request-list .request-art .link-fallback {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: hidden;
}
#request-list .request-art .link-preview-thumb { width: 100%; height: 100%; border-radius: 0; }
#request-list .request-art .link-preview-title { display: none; }
#request-list .request-art .link-fallback { display: grid; place-items: center; font-size: 0; text-decoration: none; }
#request-list .request-art .link-fallback::after { content: "↗"; color: var(--accent-gold); font-size: 1.4rem; }
#request-list .request-info { min-width: 0; flex: 1; }
#request-list .request-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; min-width: 0; }
#request-list .title { margin: 0; min-width: 0; flex: 1; font-size: 1.05rem; line-height: 1.25; }
#request-list .artist { margin: 0.25rem 0 0; font-size: 0.9rem; }
#request-list .guest-name { margin: 0.2rem 0 0; font-size: 0.76rem; }
#request-list .reaction-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem; margin-top: 0.9rem; }
#request-list .reaction-btn {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.45rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(18, 15, 24, 0.45);
  color: var(--text-dim);
  font-family: var(--font-body);
  font-size: 0.72rem;
  cursor: pointer;
}
#request-list .reaction-btn:hover:not(:disabled) { border-color: var(--accent-orange); color: var(--text); }
#request-list .reaction-btn.selected { border-color: var(--accent-gold); color: var(--accent-gold); background: rgba(251, 191, 36, 0.1); }
#request-list .reaction-btn:disabled { cursor: default; }
#request-list .reaction-btn .like-count,
#request-list .reaction-btn .dislike-count { font-weight: 700; color: var(--text); }

/* DJs need a more recognisable cover image while scanning the queue. */
.admin-request-item .link-preview {
  padding: 0.35rem 0.75rem 0.35rem 0.35rem;
}

.admin-request-item .link-preview-thumb {
  width: 64px;
  height: 64px;
  border-radius: 8px;
}

.admin-request-item .link-preview-title {
  max-width: 360px;
}

:focus-visible { outline: 2px solid var(--accent-orange); outline-offset: 2px; }

.error-text { color: var(--danger); font-size: 0.9rem; margin: 0; }
.hint-text { color: var(--text-dim); font-size: 0.9rem; margin: 0; }

.tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.empty-state { padding: 2.5rem 1.5rem; text-align: center; color: var(--text-dim); }

.admin-password-dialog { width: min(520px, calc(100vw - 2rem)); max-width: none; margin: auto; color: var(--text); background: var(--bg-deep); }
.admin-password-dialog::backdrop { background: rgba(10, 8, 14, .78); backdrop-filter: blur(3px); }
.admin-password-dialog > div:first-child { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.admin-password-dialog h2 { font-size: 1.5rem; }
.admin-password-dialog form { max-width: 520px; }
.admin-password-dialog label { display: flex; flex-direction: column; gap: .4rem; color: var(--text-dim); font-size: .86rem; }

/* ---------- toasts ---------- */
.toast-container {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  pointer-events: none;
}

.toast {
  background: rgba(18, 15, 24, 0.92);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.65rem 1.1rem;
  border-radius: 4px;
  font-size: 0.85rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast-visible { opacity: 1; transform: translateY(0); }
.toast-warn { border-color: rgba(244, 113, 116, 0.4); color: var(--danger); }

/* ---------- link preview ---------- */
.link-preview-container { margin-top: 0.35rem; }

.link-fallback {
  font-size: 0.85rem;
  color: var(--accent-gold);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.link-preview {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  background: rgba(18, 15, 24, 0.5);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.3rem 0.6rem 0.3rem 0.3rem;
  max-width: 100%;
}

.link-preview-thumb {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.link-preview-title {
  font-size: 0.8rem;
  color: var(--text-dim);
  max-width: 220px;
}

/* ---------- cooldown progress bar ---------- */
.cooldown-wrap { display: flex; flex-direction: column; gap: 0.4rem; }

.cooldown-track {
  height: 6px;
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.cooldown-fill {
  height: 100%;
  width: 0%;
  background: var(--accent-gold);
  transition: width 1s linear;
}

/* ---------- undo (admin) ---------- */
.undo-row { border-color: rgba(244, 113, 116, 0.35); }

.undo-track {
  height: 3px;
  border-radius: 1px;
  background: rgba(244, 113, 116, 0.2);
  overflow: hidden;
  margin-top: 0.4rem;
}

.undo-fill {
  height: 100%;
  width: 100%;
  background: var(--danger);
  transform-origin: left;
  transition: width 5s linear;
}

/* ---------- admin reconnect banner ---------- */
.reconnect-banner {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.6rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(244, 113, 116, 0.35);
  background: rgba(244, 113, 116, 0.08);
  color: var(--danger);
  font-size: 0.85rem;
}

.reconnect-banner.visible { display: flex; }

.reconnect-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
  animation: reconnectPulse 1.2s ease-in-out infinite;
}

@keyframes reconnectPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* Phone-first presentation: the guest view is the primary interface. */
@media (max-width: 640px) {
  .container { padding: 1.25rem 1rem 2rem; gap: 1.25rem; }
  .container-wide { max-width: 640px; }
  .card { padding: 1rem; }
  .field { min-height: 48px; font-size: 16px; }
  .btn { min-height: 44px; padding: 0.65rem 1rem; }
  .btn-sm { min-height: 38px; padding: 0.45rem 0.8rem; }
  .request-item { padding: 1rem; }
  .row-between { align-items: stretch; }
  .admin-request-item { align-items: stretch; flex-wrap: wrap; }
  .admin-request-item > .status { align-self: auto; }
  .moderate-actions { width: 100%; flex-wrap: wrap; }
  .moderate-actions .btn { flex: 1 1 130px; }
  .event-settings-grid { grid-template-columns: 1fr; }
  .public-event-form-grid { grid-template-columns: 1fr; }
  .public-event-location-field, .public-event-link-field { grid-column: auto; }
  .admin-public-event-card { flex-direction: column; }
  .admin-public-event-image { width: 100%; height: auto; max-height: 240px; aspect-ratio: 16 / 9; }
  .admin-public-event-actions { width: 100%; }
  .admin-public-event-actions .btn { flex: 1; }
  .event-settings-actions .btn { flex: 1 1 150px; }
  .queue-list li { align-items: stretch; flex-direction: column; }
  .queue-list li .btn { width: 100%; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 0.2rem; }
  .tabs .btn { flex: 0 0 auto; }
}

/* Shared Pixel Music shell: aligned with the public main site. */
.app-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .55rem max(1rem, calc((100vw - 1040px) / 2));
  border-bottom: 1px solid var(--border);
  background: rgba(18, 15, 24, .96);
}

.app-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: .7rem;
  color: var(--accent-orange);
  text-decoration: none;
}

.app-brand-logo {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  object-fit: contain;
}

.app-brand span {
  font-family: var(--font-script);
  font-size: 1.65rem;
  font-weight: 700;
  white-space: nowrap;
}

.app-nav {
  display: flex;
  align-items: center;
  gap: .45rem;
}

.app-nav a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: .55rem .8rem;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-size: .78rem;
  font-weight: 600;
}

.app-nav a:hover,
.app-nav a:focus-visible {
  border-color: var(--accent-orange);
  color: var(--accent-orange);
}

.app-topbar + .container {
  padding-top: 1.5rem;
}

.card,
.empty-state {
  border-left: 3px solid var(--accent-orange);
}

.admin-page-heading {
  margin: .15rem 0 0;
  color: var(--accent-orange);
  font-size: 2rem;
}

.login-card {
  text-align: center;
}

.login-card .form-kicker,
.login-card h1 {
  text-align: center;
}

.login-card h1 {
  margin-bottom: .55rem;
  color: var(--accent-orange);
  font-size: 1.8rem;
}

.login-logo {
  width: 104px;
  height: 104px;
  margin: 0 auto .35rem;
}

@media (max-width: 640px) {
  .app-topbar {
    min-height: 62px;
    gap: .5rem;
    padding: .4rem .7rem;
  }

  .app-brand { gap: .45rem; }
  .app-brand-logo { width: 46px; height: 46px; flex-basis: 46px; }
  .app-brand span { font-size: 1.35rem; }
  .app-nav { gap: .3rem; overflow-x: auto; }
  .app-nav a { min-height: 44px; padding: .5rem .65rem; font-size: .72rem; }
  .app-topbar + .container { padding-top: .9rem; }
  .page-logo { width: 5rem; height: 5rem; }
  .request-logo { width: 56px; height: 56px; flex-basis: 56px; }
  .admin-page-header { align-items: stretch; flex-direction: column; }
  .admin-page-heading { font-size: 1.75rem; }
  .admin-header-actions { width: 100%; }
  .admin-header-actions .btn { flex: 1; }
  .btn { min-height: 44px; }
  .btn-sm { min-height: 42px; }
  .tabs { scrollbar-width: thin; }
  .field, textarea.field, select.field { font-size: 16px; }
  .login-card { max-width: none !important; }
}

@media (max-width: 380px) {
  .app-brand span { display: none; }
}

@media (max-width: 420px) {
  #request-list .reaction-btn { font-size: 0.68rem; gap: 0.3rem; }
}

/* 2026 brand refresh: solid, poster-inspired surfaces and a clearer hierarchy. */
:root {
  --bg: #1a1520;
  --bg-deep: #120f18;
  --text: #f0e6ff;
  --text-dim: #d4a574;
  --accent-purple: #a78bfa;
  --accent-orange: #fb923c;
  --accent-gold: #fbbf24;
  --accent-peach: #fdba74;
  --surface: #211a29;
  --border: #493448;
  --font-script: "Dancing Script", "Segoe Script", cursive;
  --font-body: "Inter", "Segoe UI", Arial, sans-serif;
}

body {
  background: var(--bg);
}

h1, h2, h3 { font-family: var(--font-script); letter-spacing: 0; }
h1 { text-transform: none; }
h2 { color: var(--accent-orange); }
.container { max-width: 680px; }
.container-wide { max-width: 1040px; }

.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
}
.glow { box-shadow: 0 18px 50px rgba(0, 0, 0, .22); }
.card { padding: 1.6rem; }

.page-logo { display: block; width: 8rem; height: 8rem; object-fit: contain; }
.no-event-logo { margin: 0 auto 1rem; }
.loading-note { color: var(--text-dim); font-size: .85rem; letter-spacing: .04em; }
.brand-kicker { margin: -.45rem 0 0; color: var(--text-dim); font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; }
.songwunsch-page .event-name {
  max-width: min(100%, 42rem);
  margin: .35rem 0 0;
  color: var(--accent-peach);
  font-family: var(--font-script);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  text-wrap: balance;
}
.request-form-heading { display: flex; align-items: center; gap: 1rem; padding-bottom: 1rem; margin-bottom: 1.1rem; border-bottom: 1px solid var(--border); text-align: left; }
.request-logo { width: 76px; height: 76px; flex: 0 0 76px; }
.form-kicker { margin: 0 0 .1rem; color: var(--text-dim); font-size: .68rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }

.field { background: #15111a; border-radius: 3px; border-color: var(--border); }
.field:focus { border-color: var(--accent-gold); box-shadow: 0 0 0 3px rgba(239,189,100,.12); }
.field::placeholder { color: #82758d; }

.btn { border-radius: 3px; letter-spacing: .04em; text-transform: none; transition: background .15s ease, color .15s ease, border-color .15s ease; }
.btn::before { display: none; }
.btn:hover:not(:disabled) { transform: none; background: rgba(251, 146, 60, .1); color: var(--accent-orange); border-color: var(--accent-orange); }
.btn-primary { background: transparent; color: var(--accent-orange); border-color: var(--accent-orange); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.btn-primary:hover:not(:disabled) { background: var(--accent-orange); color: var(--bg-deep); box-shadow: none; }
.btn-ghost.active { background: rgba(251, 146, 60, .12); border-color: var(--accent-orange); color: var(--accent-orange); }
.pill { border-radius: 2px; letter-spacing: .03em; text-transform: none; }

#request-list .request-card { padding: 1rem; border-radius: 4px; background: var(--surface); }
#request-list .request-art { border-radius: 3px; background: #15111a; }
#request-list .reaction-btn { border-radius: 3px; background: #17121c; }
#request-list .reaction-btn svg { width: 16px; height: 16px; fill: currentColor; flex: 0 0 auto; }
.guest-status { position: absolute; top: .75rem; right: .85rem; justify-content: flex-end; line-height: 1.2; white-space: normal; text-align: right; max-width: 120px; }
#request-list .request-card { padding-top: 2.35rem; }
.guest-status::after { flex: 0 0 8px; }
.queue-now, .reconnect-banner, .link-preview, .toast { border-radius: 4px; }
.toast { background: #17121c; }
.edit-btn span { font-size: .72rem; text-decoration: underline; text-underline-offset: 3px; }
.cooldown-track, .undo-track { border-radius: 1px; }
.cooldown-fill { background: var(--accent-gold); }

@media (prefers-reduced-motion: reduce) {
  .reconnect-dot { animation: none; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

@media (max-width: 640px) {
  .container { padding: 1rem .85rem 2rem; }
  .card { padding: 1rem; }
  .glow { box-shadow: 0 14px 35px rgba(0, 0, 0, .22); }
  .request-logo { width: 62px; height: 62px; flex-basis: 62px; }
  .row-between > h2 { width: 100%; }
  #request-list .request-main { align-items: flex-start; }
  #request-list .request-art { width: 60px; height: 60px; flex-basis: 60px; }
  #request-list .request-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  #request-list .reaction-row { gap: .4rem; }
  #request-list .reaction-btn { min-width: 0; padding: .5rem .35rem; white-space: nowrap; }
  #request-list .reaction-btn span:last-child { display: none; }
  #request-list .reaction-btn .like-count::after { content: " Gefällt mir"; font-weight: 400; }
  #request-list .reaction-btn .dislike-count::after { content: " Nein"; font-weight: 400; }
  .guest-status { font-size: .58rem; max-width: 92px; }
}

/* Final mobile overrides kept last to avoid conflicts with legacy rules above. */
input[type="file"]::file-selector-button {
  min-height: 40px;
  margin: -.35rem .65rem -.35rem -.65rem;
  padding: .55rem .75rem;
  border: 0;
  border-right: 1px solid var(--border);
  background: #211a29;
  color: var(--accent-orange);
  font: 600 .78rem var(--font-body);
  cursor: pointer;
}

@media (max-width: 640px) {
  .page-logo { width: 5.25rem; height: 5.25rem; }
  .no-event-logo { width: 6rem; height: 6rem; }
  .login-logo { width: 6.25rem; height: 6.25rem; }
  .request-logo { width: 56px; height: 56px; flex-basis: 56px; }
  .request-form-heading { gap: .75rem; }
  .request-form-heading h2 { font-size: 1.25rem !important; }
  .container { gap: 1.15rem; }
}

/* Public guest view: use the same visual language as the main site. */
.songwunsch-page {
  line-height: 1.7;
  padding-top: calc(5.5rem + 2rem + 1px);
  --song-surface: #211a29;
  --song-surface-deep: #15111a;
  --song-border: #493448;
}

.songwunsch-page .container {
  max-width: 52rem;
}

.songwunsch-page .eq-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(8px, 2vw, 24px);
  padding: 0 5vw;
  pointer-events: none;
  overflow: hidden;
}

.songwunsch-page .eq-bar {
  width: clamp(6px, 1.5vw, 18px);
  height: var(--h);
  background: linear-gradient(to top, var(--accent-purple), var(--accent-orange), var(--accent-gold));
  border-radius: 3px 3px 0 0;
  opacity: .08;
  animation: songwunschEqPulse 3s ease-in-out infinite;
  animation-delay: var(--delay);
  filter: blur(1px);
}

@keyframes songwunschEqPulse {
  0%, 100% { transform: scaleY(1); opacity: .06; }
  50% { transform: scaleY(1.15); opacity: .12; }
}

.songwunsch-page .app-topbar {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  min-height: 0;
  padding: 1rem max(1rem, calc((100vw - 52rem) / 2));
  background: rgba(26, 21, 32, .8);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
}

.songwunsch-page .app-brand-logo {
  width: 5.5rem;
  height: 5.5rem;
  flex-basis: 5.5rem;
}

.songwunsch-page .app-nav {
  gap: .75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.songwunsch-page .app-nav a {
  min-height: 0;
  padding: .5rem 1.25rem;
  border-radius: 2px;
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: transparent;
  transition: color .35s ease, border-color .35s ease, background .35s ease;
}

.songwunsch-page .app-nav a[aria-current="page"],
.songwunsch-page .app-nav a:hover,
.songwunsch-page .app-nav a:focus-visible {
  color: #fff;
  border-color: var(--accent-purple);
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-orange));
}

.songwunsch-page .app-topbar + .container {
  padding-top: 4rem;
}

.songwunsch-page h1 {
  margin: 1rem 0 1.5rem;
  font-size: clamp(3rem, 8vw, 5rem);
  line-height: 1.1;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-orange), var(--accent-gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 30px rgba(251, 146, 60, .15));
}

.songwunsch-page h2 {
  margin: 0 0 1.25rem;
  padding-left: 1rem;
  border-left: 3px solid var(--accent-orange);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.2;
}

.songwunsch-page .glass,
.songwunsch-page .card {
  background: var(--song-surface);
  border-color: var(--song-border);
  border-radius: 6px;
}

.songwunsch-page .request-form-card {
  background: var(--song-surface);
  border-color: var(--song-border);
  box-shadow: none;
  transition: transform .35s ease, border-color .35s ease, box-shadow .35s ease;
}

.songwunsch-page .request-form-card:hover,
.songwunsch-page #request-list .request-card:hover {
  transform: translateY(-4px);
  border-color: rgba(251, 146, 60, .3);
  box-shadow: 0 15px 35px rgba(0, 0, 0, .4), 0 0 30px rgba(251, 146, 60, .06);
}

.songwunsch-page .field {
  border-radius: 4px;
  background: var(--song-surface-deep);
  border-color: var(--song-border);
}

.songwunsch-page .field:focus {
  border-color: var(--accent-orange);
  box-shadow: 0 0 20px rgba(251, 146, 60, .1);
}

.songwunsch-page .field::placeholder { color: #6b5b8a; }

.songwunsch-page .btn {
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 500;
  transition: color .4s ease, border-color .4s ease;
}

.songwunsch-page .btn::before {
  display: block;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-orange));
  transition: width .4s ease;
}

.songwunsch-page .btn:hover:not(:disabled) {
  color: #fff;
  border-color: var(--accent-purple);
  background: transparent;
}

.songwunsch-page .btn:hover:not(:disabled)::before { width: 100%; }

.songwunsch-page .btn-ghost.active {
  color: #fff;
  border-color: var(--accent-purple);
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-orange));
}

.songwunsch-page #request-list .request-card {
  padding: 1.25rem;
  border-radius: 6px;
  background: var(--song-surface);
  border-color: var(--song-border);
  transition: transform .35s ease, border-color .35s ease, box-shadow .35s ease;
}

.songwunsch-page #request-list .request-art {
  border-radius: 4px;
  background: var(--song-surface-deep);
}

.songwunsch-page #request-list .reaction-btn {
  border-radius: 4px;
  background: var(--song-surface-deep);
  border-color: var(--song-border);
  transition: color .35s ease, border-color .35s ease, background .35s ease;
}

.songwunsch-page #request-list .reaction-btn:hover:not(:disabled) {
  color: #fff;
  border-color: var(--accent-purple);
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-orange));
}

@media (max-width: 736px) {
  .songwunsch-page {
    padding-top: 5.8rem;
  }

  .songwunsch-page .app-topbar {
    padding: .55rem .5rem;
  }

  .songwunsch-page .app-brand-logo {
    width: 3.15rem;
    height: 3.15rem;
    flex-basis: 3.15rem;
  }

  .songwunsch-page .app-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .3rem;
    flex: 1;
  }

  .songwunsch-page .app-nav a {
    width: 100%;
    min-height: 2rem;
    display: inline-flex;
    justify-content: center;
    padding: .3rem .15rem;
    font-size: clamp(.52rem, 2.4vw, .65rem);
    line-height: 1.1;
    letter-spacing: .02em;
    white-space: nowrap;
  }

  .songwunsch-page .app-nav a:last-child {
    grid-column: span 2;
  }

  .songwunsch-page .app-topbar + .container {
    padding-top: 1.5rem;
  }

  .songwunsch-page .row-between {
    align-items: center;
  }

  .songwunsch-page .row-between > h2 {
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
  }

  .songwunsch-page .row-between .tabs {
    flex: 0 1 auto;
  }
}

/* Unified poster theme shared with the public Pixel Music website. */
:root {
  --bg: #291f22;
  --bg-deep: #1d1718;
  --text: #f7e6c6;
  --text-dim: #d9aa82;
  --accent-purple: #92517f;
  --accent-orange: #df8a72;
  --accent-gold: #f0bd62;
  --accent-peach: #e7a080;
  --surface: #38292e;
  --surface-deep: #241b1e;
  --border: rgba(240, 189, 98, .28);
}

body {
  background:
    radial-gradient(circle at 18% 8%, rgba(146, 81, 127, .12), transparent 30rem),
    radial-gradient(circle at 85% 90%, rgba(223, 138, 114, .10), transparent 34rem),
    var(--bg);
}

.app-topbar {
  background: rgba(36, 27, 30, .94);
  border-bottom-color: var(--border);
}

.app-nav a {
  background: var(--surface-deep);
  border-color: var(--border);
}

.songwunsch-page .app-nav a[aria-current="page"],
.songwunsch-page .app-nav a:hover,
.songwunsch-page .app-nav a:focus-visible,
.app-shell-page .app-nav a:hover,
.app-shell-page .app-nav a:focus-visible {
  color: #fff;
  border-color: var(--accent-gold);
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-orange));
}

.songwunsch-page {
  --song-surface: var(--surface);
  --song-surface-deep: var(--surface-deep);
  --song-border: var(--border);
}

.eq-bar,
.songwunsch-page .eq-bar,
.app-shell-page .eq-bar {
  background: linear-gradient(to top, var(--accent-gold), var(--accent-orange) 48%, var(--accent-purple));
  opacity: .13;
  box-shadow: 0 0 14px rgba(240, 189, 98, .14);
}

.glass,
.card,
.request-item,
.active-event-card,
.public-event-editor,
.admin-public-event-card {
  background: var(--surface);
  border-color: var(--border);
  border-radius: 8px 8px 32px 8px;
  box-shadow: 0 16px 40px rgba(13, 8, 10, .18);
}

.field,
.songwunsch-page .field {
  background: var(--surface-deep);
  border-color: var(--border);
  border-radius: 4px;
}

h1,
.admin-page-heading,
.login-card h1,
.songwunsch-page h1 {
  background: linear-gradient(120deg, var(--accent-purple), var(--accent-peach) 48%, var(--accent-gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

h2,
.songwunsch-page h2 {
  color: var(--accent-peach);
  border-left-color: var(--accent-gold);
}

.btn-primary,
.form-submit {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.btn::before,
.songwunsch-page .btn::before {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-orange));
}

/* Admin and login use the public main page as their visual reference. */
.app-shell-page { line-height: 1.7; }
.app-shell-page .eq-bg {
  position: fixed; inset: 0; z-index: 0; display: flex; align-items: flex-end;
  justify-content: center; gap: clamp(8px, 2vw, 24px); padding: 0 5vw;
  pointer-events: none; overflow: hidden;
}
.app-shell-page .eq-bar {
  width: clamp(6px, 1.5vw, 18px); height: var(--h);
  background: linear-gradient(to top, var(--accent-gold), var(--accent-orange) 48%, var(--accent-purple));
  border-radius: 3px 3px 0 0; opacity: .13; filter: blur(1px);
  animation: songwunschEqPulse 3s ease-in-out infinite; animation-delay: var(--delay);
}
.app-shell-page .app-topbar {
  min-height: 0; padding: 1rem max(1rem, calc((100vw - 52rem) / 2));
  background: rgba(36,27,30,.94); backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
}
.app-shell-page .app-brand-logo { width: 5.5rem; height: 5.5rem; flex-basis: 5.5rem; }
.app-shell-page .app-nav { gap: .75rem; flex-wrap: wrap; justify-content: flex-end; }
.app-shell-page .app-nav a {
  min-height: 0; padding: .5rem 1.25rem; border-radius: 2px; font-size: .8rem;
  font-weight: 500; letter-spacing: .08em; text-transform: uppercase; background: var(--surface-deep);
}
.app-shell-page .app-nav a:hover,
.app-shell-page .app-nav a:focus-visible {
  color: #fff; border-color: var(--accent-purple);
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-orange));
}
.app-shell-page .app-topbar + .container { padding-top: 3rem; }
.app-shell-page .glass { background: var(--surface); border-radius: 8px 8px 32px 8px; }
.app-shell-page .card { border-radius: 8px 8px 32px 8px; }
.app-shell-page .admin-page-heading,
.app-shell-page .login-card h1 {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-orange), var(--accent-gold));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.app-shell-page .field { border-radius: 4px; background: var(--surface-deep); }

@media (max-width: 736px) {
  .app-shell-page .app-topbar { padding: .55rem .5rem; }
  .app-shell-page .app-brand-logo { width: 3.15rem; height: 3.15rem; flex-basis: 3.15rem; }
  .app-shell-page .app-nav {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .3rem; flex: 1;
  }
  .app-shell-page .app-nav a {
    width: 100%; min-height: 2rem; justify-content: center; padding: .3rem .15rem;
    font-size: clamp(.52rem, 2.4vw, .65rem); line-height: 1.1; letter-spacing: .02em; white-space: nowrap;
  }
  .admin-page .app-nav a:last-child { grid-column: span 2; }
  .app-shell-page .app-topbar + .container { padding-top: 1.5rem; }
}
