/* ========== HEADER ========== */
.app-header {
    padding: 1rem 2rem 0 calc(2rem + var(--title-indent-mobile));
}

.app-header-inner {
    max-width: 1400px;
    margin: 0 auto;
}

.site-title {
    display: block;
    text-decoration: none;
    color: var(--md-sys-color-primary);
    font-family: 'Knewave', cursive;
    line-height: 1;
    font-size: clamp(32px, 7vw, 48px);
    letter-spacing: .3px;
    white-space: normal;
    word-break: break-word;
    min-width: 0;
    margin-top: var(--title-top-offset-mobile);
    margin-right: 56px;
}

.header-container {
    position: fixed;
    top: 10px;
    right: 2rem;
    height: 72px;
    z-index: 100;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.floating-header {
    background-color: var(--md-sys-color-surface-container-high);
    border-radius: 32px;
    box-shadow: 0 3px 6px 2px rgba(0, 0, 0, 0.15), 0 1px 3px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    pointer-events: auto;
    width: auto;
    min-width: 40px;
    height: 40px;
    box-sizing: border-box;
}

.floating-header.expanded {
    animation: expansion var(--expansion-duration) cubic-bezier(0.5, 0, 1, 1) forwards,
        bounce-position var(--overshoot-duration) cubic-bezier(0, 0, 0.2, 1) var(--expansion-duration) forwards;
}

.floating-header.collapsing {
    animation: contraction var(--expansion-duration) cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.floating-header.collapsing .header-actions {
    animation: fade-out var(--fade-duration) ease-in forwards;
    pointer-events: none;
}

.floating-header.expanded .header-actions {
    animation: fade-in var(--fade-duration) ease-out var(--expansion-duration) forwards;
    pointer-events: auto;
    margin-right: 0.5rem;
    width: auto;
    overflow: visible;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
}

#header-expander {
    transition: transform 0.3s ease-in-out;
}

.floating-header.expanded #header-expander {
    transform: rotate(180deg);
}