@charset "utf-8";

.has_footer_menu {
    --footer-menu-height: 96px;
    padding-bottom: calc(var(--footer-menu-height) + env(safe-area-inset-bottom, 0px));
}

nav.footer_menu {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 5000;
    display: block;
    box-sizing: border-box;
    width: 100%;
    height: calc(var(--footer-menu-height) + env(safe-area-inset-bottom, 0px));
    margin: 0;
    padding: 5px env(safe-area-inset-right, 0px) calc(6px + env(safe-area-inset-bottom, 0px)) env(safe-area-inset-left, 0px);
    border-spacing: 0;
    background: linear-gradient(180deg, #321014 0%, #1a0608 100%);
    border-top: 1px solid #c9a84c;
    border-bottom: 0;
    box-shadow: 0 -3px 12px rgba(0, 0, 0, .3);
}

nav.footer_menu ul {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    gap: 0;
    width: 100%;
    max-width: 430px;
    height: 100%;
    margin: 0 auto;
    padding: 0;
}

nav.footer_menu ul li {
    display: block;
    min-width: 0;
    min-height: 0;
    height: 100%;
}

nav.footer_menu a {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 0;
    height: 100%;
    transition: background-color .15s ease;
}

nav.footer_menu img {
    display: block;
    width: 100%;
    min-width: 0;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* メインコンテンツの幅指定（ot/styles.css）と揃える。 */
@media (max-width: 640px) {
    nav.footer_menu ul {
        max-width: none;
    }
}

nav.footer_menu a:hover {
    background-color: rgba(201, 168, 76, .12);
}

nav.footer_menu a:focus-visible {
    outline: 2px solid #e8c96a;
    outline-offset: -2px;
    background-color: rgba(201, 168, 76, .12);
}

.has_footer_menu .btn_pagetop,
.has_footer_menu .btn_back_btm {
    bottom: calc(var(--footer-menu-height) + env(safe-area-inset-bottom, 0px) + 10px);
}

/* お知らせ詳細は本文が絶対配置のため、本文側にも下部余白を確保する。 */
.okutetsu_news_detail article.single {
    padding-bottom: calc(var(--footer-menu-height) + env(safe-area-inset-bottom, 0px));
}

.okutetsu_news_detail nav.footer_menu {
    z-index: 120001;
}
