body {
    font-family: var(--font-family-sans);
    margin: 0;
    padding: 0;
    background-color: var(--color-white);
    color: var(--color-text);
    width: 100%;
    max-width: none; /* ensure full-bleed width */
    overflow-x: hidden;
    display: block;  /* override global flex layout from base stylesheet */
}

header {
    display: flex;
    justify-content: space-between;
    /* align-items: center; */
    padding: var(--gutter);
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
}

/* Fixed wrapper keeps the header pinned across all engines/sizes */
.fixed-header {
    --queue-sign-in-motion-duration: 450ms;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 130; /* under overlay (150/140), above content */
    background-color: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    padding-top: env(safe-area-inset-top);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transition: transform var(--queue-sign-in-motion-duration) cubic-bezier(0.22, 1, 0.36, 1);
}

/* Spacer prevents content from jumping under the fixed header */
.header-spacer { height: 0; }

/* Retain document geometry while the invitation tucks out of view. */
.fixed-header.is-sign-in-banner-tucked {
    transform: translateY(calc(-1 * var(--queue-sign-in-banner-height, 0px)));
}
.fixed-header.is-sign-in-banner-resizing { transition: none; }
.is-sign-in-banner-tucked .queue-sign-in-banner {
    visibility: hidden;
    pointer-events: none;
    /* Let the strip slide out before hiding its pixels; inert takes effect immediately. */
    transition-delay: var(--queue-sign-in-motion-duration);
}

@media (prefers-reduced-motion: reduce) {
    .fixed-header { --queue-sign-in-motion-duration: 0ms; }
}

/* Slim account strip above the queue heading; controls retain mobile touch targets. */
.queue-sign-in-banner[hidden] { display: none; }
.queue-sign-in-banner {
    transition: visibility 0s linear;
    background: #f5f0ff;
    border-bottom: 1px solid #e7dcfa;
    color: #4c2879;
}
.queue-sign-in-banner__inner {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    min-height: 44px;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 calc(8px + env(safe-area-inset-right)) 0 calc(16px + env(safe-area-inset-left));
    gap: 4px;
}
.queue-sign-in-banner__copy {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 12px;
    line-height: 1.3;
}
.queue-sign-in-banner__actions { display: flex; flex: 0 0 auto; align-items: center; }
.queue-sign-in-banner__actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0 8px;
    font-size: 12px;
    color: #5b21b6;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.queue-sign-in-banner__signup { font-weight: 700; }
.queue-sign-in-banner__dismiss[hidden] { display: none; }
.queue-sign-in-banner__dismiss {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #5b21b6;
    font-size: 22px;
    cursor: pointer;
}
.queue-sign-in-banner__dismiss:hover { background: #ede3ff; }
.queue-sign-in-banner :is(a, button):focus-visible { outline: 2px solid #5b21b6; outline-offset: -3px; }

header h1 {
    margin: 0;
    font-size: 1.3em;
    font-weight: normal;
    color: #555;
    width: 100%;
    text-align: center;
}

.menu-btn {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #555;
}

/* Desktop top-right links (hidden on mobile, visible >= 768px) */
.top-links {
    display: none;
    align-items: center;
    gap: 18px;
}
.top-links a {
    color: #555;
    text-decoration: none;
    font-size: 0.95em;
}
.top-links a:hover { text-decoration: underline; }

/* Show inline links and hide hamburger on tablet/desktop */
@media (min-width: 768px) {
    .top-links { display: flex; }
    .menu-btn { display: none; }
}

/* Mobile drawer + overlay */
.overlay {
    position: fixed;
    inset: 0;
    background: var(--color-overlay-dark);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
    z-index: 140;
}
.overlay.show {
    opacity: 1;
    pointer-events: auto;
}
.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 80%;
    max-width: 320px;
    height: 100%;
    background: var(--color-white);
    box-shadow: -2px 0 12px rgba(0,0,0,.15);
    transform: translateX(100%);
    transition: transform .25s ease;
    z-index: 150;
    display: flex;
    flex-direction: column;
    padding: 16px;
}
.mobile-menu.open { transform: translateX(0); }
.menu-header { display:flex; justify-content:space-between; align-items:center; margin-bottom: 8px; }
.menu-title { font-weight:600; color: var(--color-text); }
.close-btn { background:none; border:0; font-size:1.5rem; color:#555; cursor:pointer; }
.menu-link { padding:12px 4px; color: var(--color-text); text-decoration:none; border-bottom:1px solid var(--color-border); }
.menu-link:last-child { border-bottom:none; }

.update-info {
    text-align: center;
    color: #888;
    font-size: 0.9em;
    padding: 12px var(--gutter) 6px;
    border-bottom: none;
    margin-bottom: 12px;
    text-transform: lowercase;
    width: 100%;
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
}
.update-info::after {
    content: "";
    display: block;
    width: 160px;
    height: 1px;
    background: var(--color-border);
    margin: 10px auto 0;
}

.queue-read-status[hidden] { display: none; }
.queue-read-status {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 12px;
    width: calc(100% - 2 * var(--gutter));
    max-width: calc(var(--container-max) - 2 * var(--gutter));
    margin: 0 auto 16px;
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-background-muted);
    color: var(--color-text);
}
.queue-read-status p {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}
.queue-read-retry {
    flex: 0 0 auto;
    min-height: 44px;
    min-width: 64px;
    padding: 8px 12px;
    border: 1px solid currentColor;
    border-radius: 6px;
    background: var(--color-white);
    color: var(--color-text);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.queue-read-retry:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}
.queue-read-retry:disabled { cursor: default; }

.song-queue {
    padding: 0 var(--gutter);
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
}
.song-item {
    display: flex;
    align-items: stretch; /* Stretch children to equal height so album art can fill side */
    margin-bottom: 10px;
    padding: 10px; /* Add padding for spacing */
}

.song-item:not(:last-child) {
     border-bottom: 1px solid var(--color-border); /* Lighter separator line */
}



/* Album art container sits to the left and fills the height of .song-details */
.album-art-wrap {
    align-self: stretch;           /* Fill cross-axis height equal to .song-details */
    aspect-ratio: 1 / 1;           /* Keep square */
    height: 100%;                  /* Use stretched height to compute width via aspect-ratio */
    max-height: 100px;             /* Ensure uniform maximum */
    overflow: hidden;
    margin-right: 20px;
    border: 1px solid var(--color-border);        /* Subtle border */
    background-color: var(--color-background-muted);     /* Placeholder background */
}

/* Image fills the container */
.album-art {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.song-details {
    flex-grow: 1;
}

.artist, .title {
    font-family: var(--font-family-heading);
    font-weight: 700;
    font-size: 2em; /* Larger font for artist/title */
    margin-bottom: 0;
    color: #444;
    text-transform: uppercase; /* Match image */
    line-height: 1.1; /* Tighter line height as in the image */
    letter-spacing: 0.5px;
    word-break: break-word;
}

.title {
    font-size: 1.4em; /* Slightly smaller than artist */
    margin-bottom: 10px; /* Less space before performer info */
    line-height: 1.2; /* Tighter line height for title */
}


.performer-info {
    display: flex;
    justify-content: space-between; /* Pushes label and name apart */
    align-items: center;
    font-size: 0.95em;
    color: #666;
    margin-top: 5px;
}

.performer-info .label {
    color: #888; /* Lighter gray for "Performer:" */
    font-weight: normal;
}

.performer-identity {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.performer-info .name {
    font-weight: normal;
    color: #555;
}

.queue-performer-avatar {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    overflow: hidden;
    display: inline-grid;
    place-items: center;
    background: #f3e8ff;
    color: #6b46c1;
    font-size: 0.75rem;
    font-weight: 700;
    flex: 0 0 28px;
}

.queue-performer-avatar-link {
    display: inline-flex;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    flex: 0 0 28px;
    text-decoration: none;
    color: inherit;
}

.queue-performer-avatar-link:focus-visible {
    outline: 2px solid #6b46c1;
    outline-offset: 3px;
}

.queue-performer-avatar .avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.queue-performer-avatar.avatar-loading .avatar-image,
.queue-performer-avatar.avatar-fallback .avatar-image,
.queue-performer-avatar.avatar-error .avatar-image {
    display: none;
}

.queue-performer-avatar .avatar-initials {
    line-height: 1;
}

/* Style for performed songs (grey card look with rounded corners) */
.song-item.performed {
    background-color: #939393;
    border-color: #000;
}

.song-item.performed .song-details .artist,
.song-item.performed .song-details .title {
    color: #444;
}

.song-item.performed .performer-info,
.song-item.performed .performer-info .label,
.song-item.performed .performer-info .name {
    color: #444;
}

.song-item.performed .album-art {
    opacity: 0.8;
}

/* Hide the explicit <hr> tags as we use border-bottom now */
hr {
    display: none;
}

/* Basic responsiveness */
@media (max-width: 600px) {
    header h1 {
        font-size: 1.2em;
    }
    .artist {
        font-size: 1.5em;
    }
    .title {
        font-size: 1.1em;
    }
    .album-art-wrap {
        max-height: 70px;          /* Smaller uniform size on mobile */
    }
    .album-art {
        width: 100%;
        height: 100%;
    }
    .song-item.performed {
        padding: 10px;
    }
    .song-queue {
        padding: 0 15px;
    }
}

/* Add animation for refresh text */
@keyframes pulse {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

.update-info {
    animation: pulse 2s infinite;
}

/* Footer styling to match mock */
.queue-footer {
    text-align: center;
    padding: 30px var(--gutter);
    color: #666;
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
}
.footer-rule {
    width: 160px;
    height: 1px;
    background: var(--color-border);
    border: 0;
    margin: 30px auto 12px;
}
.footer-tagline { margin: 6px 0 12px; }
.social-link {
    color: var(--color-danger);
    font-size: 22px;
    text-decoration: none;
}
.social-link:hover { opacity: .85; }
/* Responsive layout foundation and max-width container */
:root {
  --page-max: 2160px;
  --art: 90px; /* base album art size (mobile-first) */
  --banner-height: 0px; /* JS will update this when banner is active */
  --footer-height: 60px; /* Matches height in style.css .singer-footer__nav */
  /* The countdown already includes the home-indicator inset when visible. */
  --queue-footer-safe-area: max(0px, calc(env(safe-area-inset-bottom, 0px) - var(--banner-height)));
}

/* 1. The Signups Banner (Existing ID: #signups-banner) */
#signups-banner {
    /* Ensure it stays at the very bottom */
    position: fixed !important;
    bottom: 0 !important;
    left: 0;
    right: 0;
    z-index: 120 !important; /* Above footer (100) */
    transition: transform 0.3s ease-in-out;
}

/* 2. The Navigation Footer (Existing Class: .performer-footer/.singer-footer) */
.performer-footer,
.singer-footer {
    /* Lift the footer when banner is present */
    bottom: var(--banner-height) !important;
    padding-bottom: var(--queue-footer-safe-area);
    transition: bottom 0.3s ease-in-out;
    
    /* Ensure it sits above the list but below the banner's new space */
    z-index: 100;
}

/* 3. The Main Content List */
#queue-list {
    /*
       Calculate total padding:
       Footer Height (60px)
       + Banner Height (Dynamic)
       + Footer Safe Area (only while the countdown is absent)
    */
    padding-bottom: calc(var(--footer-height) + var(--banner-height) + var(--queue-footer-safe-area)) !important;
    transition: padding-bottom 0.3s ease-in-out;
}

/* Optional: Reset body padding from style.css to avoid double-spacing */
body {
    padding-bottom: 0 !important;
}

/* Override album art sizing to scale with breakpoints */
.album-art-wrap {
  flex: 0 0 var(--art);
  width: var(--art);
  height: var(--art);
  aspect-ratio: 1 / 1;
  max-height: none; /* remove legacy cap so art can scale with --art */
  align-self: flex-start; /* keep art aligned to top of text block */
}

/* Clamp-based typography for headings to scale fluidly across viewports */
.artist {
  font-size: clamp(2.1rem, 3.75vw, 4.125rem);
}
.title {
  font-size: clamp(1.65rem, 2.7vw, 3.0rem);
}

/* Modern breakpoint scale (mobile-first) */
@media (min-width: 480px) {
  :root { --art: 100px; }
}
@media (min-width: 768px) {
  :root { --art: 115px; --gutter: 24px; }
}
@media (min-width: 1024px) {
  :root { --art: 130px; --gutter: 28px; }
}
@media (min-width: 1280px) {
  :root { --art: 150px; --gutter: 32px; }
}
@media (min-width: 1536px) {
  :root { --art: 165px; --gutter: 36px; }
}
@media (min-width: 1920px) {
  :root { --art: 175px; --gutter: 40px; }
}
/* Hard cap at desktop ultra-wide */
@media (min-width: 2160px) {
  :root { --art: 180px; }
}
/* The fixed wrapper and measured spacer also support engines without sticky positioning. */
/* Pending sync banner (attendee queue) */
.pending-sync-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px calc(12px + env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) calc(12px + env(safe-area-inset-left));
  font-size: 0.9rem;
  color: #fff;
  background: rgba(20,20,20,0.9);
  text-align: center;
  z-index: 1000;
  display: none;
}
.pending-sync-banner.is-visible {
  display: block;
}

/* ── Syndicate aggregate Hype badges (SYN.M6 Packet B) ── */
/* Public-safe, aggregate-only. No sponsor ids, recipient ids,
   first-timer, nerves, shy, sensitive-user state, report details,
   wallet balances, or private metadata rendered. */
.syndicate-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.8em;
  font-weight: 600;
  line-height: 1.4;
  background: rgba(107, 70, 193, 0.1);
  color: #6b46c1;
  border: 1px solid rgba(107, 70, 193, 0.2);
}
.syndicate-badge__icon {
  font-size: 0.9em;
  line-height: 1;
}
.syndicate-badge__text {
  line-height: 1;
}
/* Badge variants */
.syndicate-badge--highlight {
  background: rgba(255, 165, 0, 0.1);
  color: #b8860b;
  border-color: rgba(255, 165, 0, 0.25);
}
/* Reduced-motion: suppress any animation on badges */
@media (prefers-reduced-motion: reduce) {
  .syndicate-badge {
    animation: none !important;
    transition: none !important;
  }
}

/* ── Queue Request CTA (post-remediation UX) ── */
.queue-request-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px var(--gutter);
  max-width: var(--container-max);
  margin: 0 auto 8px;
}

.queue-request-cta__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  border-radius: 999px;
  background: #6b46c1;
  color: #fff;
  font-family: "Poppins", system-ui, -apple-system, sans-serif;
  font-size: 1.05em;
  font-weight: 700;
  text-decoration: none;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(107, 70, 193, 0.3);
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

.queue-request-cta__link:hover {
  background: #5b3ab0;
  box-shadow: 0 4px 12px rgba(107, 70, 193, 0.4);
}

.queue-request-cta__link:active {
  transform: scale(0.98);
}

.queue-request-cta__link:focus-visible {
  outline: 3px solid #6b46c1;
  outline-offset: 3px;
}

.queue-request-cta__icon {
  font-size: 1.2em;
  line-height: 1;
}

.queue-request-cta__text {
  white-space: nowrap;
}

.queue-request-cta__dismiss {
  background: none;
  border: none;
  font-size: 1.4em;
  line-height: 1;
  color: #999;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 50%;
  transition: background 0.2s ease, color 0.2s ease;
}

.queue-request-cta__dismiss:hover {
  background: rgba(0, 0, 0, 0.08);
  color: #555;
}

.queue-request-cta__dismiss:focus-visible {
  outline: 2px solid #6b46c1;
  outline-offset: 2px;
}

@media (max-width: 600px) {
  .queue-request-cta__link {
    font-size: 1em;
    padding: 10px 24px;
  }
}

/* ── Just-submitted request highlight ── */
@keyframes just-submitted-pulse {
  0% {
    background-color: rgba(107, 70, 193, 0.15);
    box-shadow: 0 0 0 0 rgba(107, 70, 193, 0.4);
  }
  50% {
    background-color: rgba(107, 70, 193, 0.08);
    box-shadow: 0 0 0 6px rgba(107, 70, 193, 0);
  }
  100% {
    background-color: rgba(107, 70, 193, 0.12);
    box-shadow: 0 0 0 0 rgba(107, 70, 193, 0);
  }
}

.song-item.just-submitted {
  animation: just-submitted-pulse 1.8s ease-out 3;
  background-color: rgba(107, 70, 193, 0.12);
  border-radius: 8px;
  position: relative;
}

.song-item.just-submitted:focus-visible {
  outline: 3px solid #6b46c1;
  outline-offset: 2px;
}

.just-submitted-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: #6b46c1;
  color: #fff;
  font-size: 0.75em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 6px;
  line-height: 1.4;
}

@media (prefers-reduced-motion: reduce) {
  .song-item.just-submitted {
    animation: none !important;
    background-color: rgba(107, 70, 193, 0.12);
  }
}
