/* Shared page-local menu: chip style used on introduction and concert pages */
#contents > #headmenu {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin: 0 0 1.4rem !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

#contents > #headmenu > ul {
    display: flex !important;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.75rem 1rem;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: visible;
    list-style: none;
}

#contents > #headmenu > ul > li {
    display: block;
    float: none;
    width: fit-content;
    max-width: calc(100vw - 2rem);
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    text-align: left;
}

#contents > #headmenu > ul > li > a {
    display: inline-flex;
    box-sizing: border-box;
    width: auto;
    max-width: 100%;
    padding: 0.48rem 0.65rem;
    border: 1px solid #d8dee5;
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(38, 63, 74, 0.08);
    color: #344354;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
    text-decoration: none;
    text-shadow: none;
    transition: color 0.18s ease, background-color 0.18s ease,
                border-color 0.18s ease, box-shadow 0.18s ease;
}

#contents > #headmenu > ul > li > a:hover,
#contents > #headmenu > ul > li > a:focus-visible {
    border-color: #91a6b3;
    background: #f3f7f8;
    color: #263f4a;
    box-shadow: 0 2px 5px rgba(38, 63, 74, 0.12);
    text-decoration: none;
}

#contents > #headmenu > ul > li > ul {
    display: grid;
    gap: 0.12rem;
    margin: 0.35rem 0 0;
    padding: 0 0.2rem;
    list-style: none;
}

#contents > #headmenu > ul > li > ul > li {
    float: none;
    margin: 0;
    padding: 0;
    list-style: none;
    text-align: left;
}

#contents > #headmenu > ul > li > ul > li > a {
    display: block;
    padding: 0.22rem 0.25rem;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #315f83;
    font-size: 0.84rem;
    font-weight: 400;
    line-height: 1.4;
    text-decoration: none;
    overflow-wrap: anywhere;
}

#contents > #headmenu > ul > li > ul > li > a::before {
    content: "›";
    display: inline-block;
    margin-right: 0.35rem;
    color: #7893a3;
}

#contents > #headmenu > ul > li > ul > li > a:hover,
#contents > #headmenu > ul > li > ul > li > a:focus-visible {
    background: #f3f7f8;
    color: #263f4a;
    text-decoration: underline;
}

/* On wider screens, keep submenu text from determining parent-button spacing. */
@media screen and (min-width: 768px) {
    #contents > #headmenu > ul {
        position: relative;
        gap: 0.55rem;
    }

    /* Concert menu has a second tier positioned under the parent buttons. */
    body#touchdisp #contents > #headmenu > ul {
        padding-bottom: 5.75rem;
    }

    #contents > #headmenu > ul > li {
        position: relative;
        flex: 0 0 auto;
        width: auto;
        max-width: none;
    }

    #contents > #headmenu > ul > li > ul {
        position: absolute;
        top: calc(100% + 0.3rem);
        left: 0;
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
    }
}

@media screen and (max-width: 767px) {
    #contents > #headmenu {
        margin-bottom: 1.1rem !important;
    }

    #contents > #headmenu > ul {
        gap: 0.55rem 0.8rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    #contents > #headmenu > ul > li > a {
        transition: none;
    }
}
