.tab-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    position: relative;
    max-width: 800px;
    margin: 0 auto 20px auto;
    padding: 0 15px;
}

.tab-btn {
    position: relative;
    z-index: 1;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.7);
    color: #3868c9;
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    flex: 0 0 calc((100% - 8px) / 2);
    width: calc((100% - 8px) / 2);
    max-width: none;
    height: 70px;
    padding: 8px 5px;
    border-radius: 5px;
    margin-bottom: 0;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    line-height: 1.3;
    overflow-wrap: break-word;
    word-break: break-word;
    border: 2px solid #7a64d1;
}

.tab-btn.sukagawa:hover:not(.active){
    background: rgba(0,80,255,0.2);
}
.tab-btn.book:hover:not(.active){
    background: rgba(0, 255, 255, 0.2);
}
.tab-btn.matayoshi:hover:not(.active){
    background: rgba(253, 192, 23, 0.2);
}
.tab-btn.chevon:hover:not(.active){
    background: rgba(53, 19, 19, 0.2);
}

.tab-btn.active {
    z-index: 10;
    background-color: #7a64d1;
    color: #ffffff;
    box-shadow: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding-bottom: 12px;
}

.tab-btn:hover:not(.active) {
    transform: translateY(-5px);
}

.tab-content-container {
    position: relative;
    max-width: 1000px;
    z-index: 5;
    margin: 0 auto;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    text-align: center;
    min-height: 200px;
}

.tab-pane {
    margin: 30px 40px 40px 40px;
    border-radius: 15px;
}

.tab-heading {
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    font-size: 1.8em;
    color: #3868c9;
    border-bottom: 3px solid #7a64d1;
}

.tab-text {
    font-size: 1.1em;
    line-height: 1.8;
    color: #2c3e50;
    text-align: left;
}

.tab-text a {
    color: #4a90e2;
    text-decoration: none;
    transition: color 0.3s, border-bottom 0.3s;
    border-bottom: 1px solid transparent;
}

.tab-text a:hover {
    color: #357abd;
    border-bottom: 1px solid #357abd;
}

.highlight {
    color: #ff5e62;
    font-weight: bold;
    text-shadow: 0 0 1px rgba(0, 0, 0, 0.05);
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes layoutSnap {
    0% {
        opacity: 0;
        transform: scale(0.92);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.tab-nav.layout-changed {
    animation: layoutSnap 0.25s ease-out;
}

.top-img {
    background-color: transparent;
    background: transparent;
    border-width: 0;
    height: 100%;
    justify-content: center;
}

.img > top-img {
    height: 100%;
    width: 100%;
    object-fit: contain;
}

@media screen and (max-width: 767px) {
    .top-img {
        margin: 0% 15%;
    }
}