.sticky-top-bar {
    position: fixed;
    top: env(safe-area-inset-top, 0px); /* Position below iOS status bar in PWA */
    left: 0; 
    right: 0;
    z-index: 9000;
    color: #fff;
    width: 100vw;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    /* Match navigation gradient+blur style */
    background: transparent;
}
.sticky-top-bar::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: calc(-1 * env(safe-area-inset-top, 0px)); /* Extend into safe area */
    bottom: -1px; /* Extend 10px below for smooth blend with nav */
    /* Gradient matching nav-header, with smooth fade to transparent at bottom */
    background: linear-gradient(to bottom, 
            rgb(34, 34, 34) 0%, 
            rgba(34, 34, 34, 0.95) 40%, 
            rgba(34, 34, 34, 0.7) 70%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: -1;
    pointer-events: none;
    opacity: 1;
    transition: opacity 200ms ease;
}

/* Hide sticky-top-bar background when nav is scrolled to avoid duplication */
@supports selector(body:has(.nav-header.is-scrolled)) {
  body:has(.nav-header.is-scrolled) .sticky-top-bar::before {
    opacity: 0;
  }
}
.sticky-bar-inner {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    padding: 10px 10px 10px 20px;
    gap: auto;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* When a page has no nav header, keep sticky message gradient within its own height */
@supports selector(body:has(.nav-header)) {
  body:not(:has(.nav-header)) .sticky-top-bar::before {
    bottom: 0; /* don't extend below bar if nav is absent */
  }
}
.sticky-bar-message {
    flex: 1 1 0;
    text-align: center;
    margin: 0;
    line-height: 1.5;
}
.sticky-bar-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    margin: 0;
    align-self: flex-start;
}

/* Match container width on wider screens */
@media (min-width: 630px) {
    .sticky-top-bar {
        top: 30px; /* Match body padding to align with container top */
        left: 50%;
        transform: translateX(-50%);
        width: calc(100% - 60px); /* Account for body padding: 30px on each side */
        max-width: 900px; /* Match .container max-width */
    }
    
    .sticky-top-bar::before {
        border-top-left-radius: 1.75em; /* Match .container border-radius */
        border-top-right-radius: 1.75em;
    }
} 