@media (max-width:431px) {

    .main-content {
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        position: relative;
        padding: 10px;
        box-sizing: border-box;
        z-index: 3;
        margin-right: auto;
    }

    .top-header {
        display: none;
    }

    .map-placeholder {
        display: none;
    }

    .left-container {
        width: 100%;
        height: calc(0% + 55px);
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        z-index: 3;
        box-sizing: border-box;
    }

    .sidebar {
        width: 60px;
        height: 100%;
        flex: 1;
        background-color: #ffffff;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin: 0px 0px 0px 0px;
        transition: background-color 0.3s ease-in-out;
    }

    .logo {
        width: 40px;
        padding: 10px 10px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .logo-image {
        width: 30px;
        height: auto;
        object-fit: contain;
    }

    .menu-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        z-index: 3;
        box-sizing: border-box;
        width: 13%;
        height: 100%;
        padding: 0px 0px;
    }

    .hamburger-menu span {
        width: 25px;
        height: 3px;
        background-color: var(--color-orange);
    }

    .menu-popup.show {
        top: calc(60px);
        left: calc(10px);
    }

    .menu-popup-content {
        padding: 20px 20px;
        height: 100%;
        width: 100%;
        box-sizing: border-box;
        position: relative;
    }

    .menu-popup {
        position: fixed;
        top: 0px;
        height: calc(100dvh - 85px);
        width: calc(100% - 20px);
        background-color: var(--color-orange);
        z-index: 5;
        transition: top 0.3s ease-in-out;
        overflow-y: auto;
        margin: 15px 0px 15px 0px;
    }

    .menu-text {
        display: none;
    }

    .bottom-container {
        position: fixed;
        top: calc(100% - 10px);
        height: 0%;
        right: 0px;
        width: calc(100% - 20px);
        margin: 0px 10px 0px 10px;
        display: none;
    }

    .footer-info {
        position: absolute;
        width: calc(100% - 20px);
        bottom: 0;
        background-color: rgba(255, 255, 255, 0.9);
        color: #333;
        padding: 15px 10px;
        margin-bottom: 0px;
        display: none;
        align-items: center;
        gap: 25px;
        font-size: 10px;
        font-weight: 700;
        white-space: nowrap;
    }

    .logo3 {
        margin: 0px 0px 0px 20px;
    }

    .contact-button-footer {
        background-color: #000;
        padding: 5px 20px;
        border-radius: 15px;
        /* 角丸 */
        text-decoration: none;
        font-weight: bold;
        margin-left: 0px;
        /* MEMBERとの間隔 */
    }

    .bottom-content {
        display: none;
    }

    .bottom-content2 {
        display: none;
    }

    .button-container {
        display: flex;
        justify-content: center;
        align-items: center;
        margin-top: auto;
    }

    .more-info {
        background-color: var(--color-orange);
        color: white;
        width: 100%;
        border: none;
        padding: 6px 48px;
        border-radius: 50px;
        font-size: 0.9rem;
        cursor: pointer;
        transition: opacity 0.3s ease;
        flex: 1;
        /* 同じ大きさになるよう追加 */
        max-width: 100%;
        /* 最大幅を設定 */
        white-space: nowrap;
        /* テキスト折り返しなし */
        text-align: center;
        /* テキストを中央揃え */
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .official-web {
        background-color: white;
        color: var(--color-orange);
        border: none;
        padding: 6px 48px;
        border-radius: 50px;
        font-size: 0.9rem;
        cursor: pointer;
        transition: opacity 0.3s ease;
        flex: 1;
        /* 同じ大きさになるよう追加 */
        max-width: 100%;
        /* 最大幅を設定 */
        white-space: nowrap;
        /* テキスト折り返しなし */
        text-align: center;
        /* テキストを中央揃え */
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .overlay.show {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.7);
        z-index: 1;
    }

    .page-text {
        position: absolute;
        top: 95px;
        right: 0px;
        left: 0px;
        bottom: 0px;
        text-align: right;
        margin-right: 10px;
    }

    .page-subtitle {
        color: var(--color-orange);
        font-size: 20px;
        font-weight: bold;
    }

    .page-title {
        color: var(--color-orange);
        font-size: 50px;
        font-weight: bold;
        margin-top: -1rem;
        /* サブタイトルとの間隔を詰める */
    }

    .top-container {
        top: 0;
        width: 100%;
        height: calc(0% + 170px)
    }
    
    .middle-container {
        top: calc(0% + 170px);
        height: calc(100dvh - 200px);
        right: 0px;
        width: 100%;
        margin-top: 20px;
    }

    .services-scroll {
        flex-direction: column;
        overflow-x: hidden;
        overflow-y: scroll;
        gap: 0.5rem;
        padding: 0px 20px;
        scroll-snap-type: y mandatory;
        height: 100%;
    }

    .service-card {
        position: relative;
        width: 100%;
        box-sizing: border-box;
        height: auto;
        border: 1px solid var(--color-orange);
        border-radius: 10px;
        padding: 15px 20px 20px 20px;
        color: white;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .service-logo {
        position: absolute;
        top: 35px;
        right: 15px;
        left: auto;
        bottom: auto;
        width: auto;
        height: 280px;
        opacity: 0.4;
        z-index: -1;
        mix-blend-mode: normal;
    }
    
    .service-title h2 {
        font-size: 2.5rem;
        color: var(--color-orange);
        margin: 0;
        white-space: nowrap;
    }

    .service-content li {
        font-size: 0.9rem;
        margin-bottom: 1rem;
        line-height: 1.4;
    }

    .service-content h3 {
        font-size: 1.3rem;
        margin: 0 0 1rem 0;
        color: var(--color-orange);
    }

    .service-content {
        padding: 0rem 0.5rem 0rem 0.5rem;
        height: auto;
        min-height: 200px;
        overflow-y: scroll;
    }

    .pronunciation {
        font-size: 1.2rem;
        color: var(--color-orange);
        margin-left: 0.8rem;
    }

    .contact-slideout {
        position: fixed;
        top: 0;
        right: -100%;
        width: calc(100% - 20px);
        height: calc(100dvh - 20px);
        background-color: var(--color-orange);
        z-index: 6;
        transition: right 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
        margin: 10px;
    }
    
    .contact-slideout.show {
        right:calc(0px);
    }

    .privacy-popup-content {
        padding: 0.5em;
        height: 100%;
        background-color: white;
        box-sizing: border-box;
        position: relative;
        flex: 1;
        border-bottom-right-radius: 10px;
    }

    .privacy-popup.show {
        left: calc(10px);
        height: calc(100dvh - 50px);
        width: calc(100% - 50px);
    }

    .privacy-popup {
        position: fixed;
        top: 0px;
        left: -500px;
        height: calc(100dvh - 60px);
        width: 70%;
        background-color: var(--color1);
        z-index: 1000;
        transition: left 0.5s ease-in-out;
        overflow-y: auto;
        margin: 10px 0px 10px 0px;
        display: flex;
        padding: 15px;
        border-top-right-radius: 10px;
        border-bottom-right-radius: 10px;
    }

    .member-bar {
        box-sizing: border-box;
        width: calc(100% - 0vh);
        height: calc(100% - 60px);
        top: calc(0% - 5px);
        background-color: var(--color1);
        border-top-right-radius: 50px;
        border-bottom-right-radius: 0px;
        position: relative;
        z-index: 1000;
        transition: background-color 0.3s ease;
    }

    .member-popup {
        display: none;
        position: fixed;
        bottom: calc(0vh + 65px);
        right: 0%;
        width: calc(100% - 20px);
        height: 55%;
        background-color: #1a1a1a;
        border-top-right-radius: 0px;
        border-bottom-right-radius: 0px;
        box-sizing: border-box;
        z-index: 1001;
        margin-bottom: 0px;
        padding: 20px;
        margin: 10px;
        overflow: visible;
    }

    .member-popup.show {
        display: block;
    }

    .member-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.7);
        z-index: 1000;
    }
    
    .member-overlay.show {
        display: block;
    }

    .member-close {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 0;
        cursor: pointer;
        transition: opacity 0.3s ease;
        width: auto;
        height: auto;
        position: absolute;
        top: 10px;
        right: 10px;
        z-index: 1002;
    }

    .member-close .close-button {
        background: none;
        border: none;
        color: white;
        font-size: 24px;
        cursor: pointer;
        padding: 0;
    }

    .member-close .close-text {
        color: white;
        font-size: 12px;
        margin-top: -5px;
    }

    .member-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        justify-items: center;
        width: 95%;
        height: 100%;
        padding: 0;
        z-index: 3;
        gap: 1rem;
        align-items: start;
        overflow-y: auto;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    .members-text {
        color: var(--color2);
        font-size: 2rem;
        font-weight: bold;
        text-align: left;
        position: absolute;
        top: 50%;
        left: 2rem;
        transform: translateY(-50%);
        z-index: 1;
        transition: color 0.3s ease;
        cursor: pointer;
    }

    .member-card {
        text-align: left;
        width: 95%;
        z-index: 3;
        min-width: 0;
    }

    .menu-items {
        display: flex;
        flex-direction: column;
        margin-bottom: 40px;
        gap: 15px;
    }

    .menu-nav {
        display: flex;
        flex-direction: column;
        padding-bottom: 20px;
    }

    .child {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch; /* iOS向けの滑らかスクロール */
        touch-action: pan-y;
      }

}


@media (max-width:376px) and (max-height:668px) {

    .service-title h2 {
        font-size: 2.3rem;
        color: var(--color-orange);
        margin: 0;
        white-space: nowrap;
    }

    .pronunciation {
        font-size: 1rem;
        color: var(--color-orange);
        margin-left: 0.5rem;
    }

    .top-container {
        top: 0;
        width: 100%;
        height: calc(0% + 170px)
    }

    .page-text {
        position: absolute;
        top: 80px;
        right: 0px;
        left: 0px;
        bottom: 0px;
        text-align: right;
        margin-right: 10px;
    }

    .page-subtitle {
        color: var(--color-orange);
        font-size: 17px;
        font-weight: bold;
    }

    .page-title {
        color: var(--color-orange);
        font-size: 43px;
        font-weight: bold;
        margin-top: -0.8rem;
        /* サブタイトルとの間隔を詰める */
    }

    .middle-container {
        top: calc(0% + 170px);
        height: calc(100dvh - 145px);
        right: 0px;
        width: 100%;
    }

}

@media (max-width:394px) {
    .footer-info {
        position: absolute;
        width: calc(100% - 20px);
        bottom: 0;
        background-color: rgba(255, 255, 255, 0.9);
        color: #333;
        padding: 15px 10px;
        margin-bottom: 0px;
        display: none;
        align-items: center;
        justify-content: center;
        gap: 40px;
        font-size: 10px;
        font-weight: 700;
        white-space: nowrap;
    }

    .logo3 {
        display: none;
        margin: 0px 0px 0px 20px;
    }

    .footer-info b {
        color: #333;
        text-decoration: none;
        font-weight: 700;
        cursor: pointer;
    }

    .service-card {
        position: relative;
        width: 100%;
        box-sizing: border-box;
        height: auto;
        border: 1px solid var(--color-orange);
        border-radius: 10px;
        padding: 15px 15px 15px 15px;
        color: white;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .service-logo {
        position: absolute;
        top: 35px;
        right: 15px;
        left: auto;
        bottom: auto;
        width: auto;
        height: 250px;
        opacity: 0.4;
        z-index: -1;
        mix-blend-mode: normal;
    }

    .service-content p {
        font-size: 0.9rem;
        line-height: 1.4;
        margin: 0;  /* 上部マージンを削除 */
    }

    .pronunciation {
        font-size: 1rem;
        color: var(--color-orange);
        margin-left: 0.8rem;
    }

    .service-title h2 {
        font-size: 2.3rem;
        color: var(--color-orange);
        margin: 0;
        white-space: nowrap;
    }
}

@media (max-width:376px) { 

    .main-content {
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        position: relative;
        padding: 7px;
        box-sizing: border-box;
        z-index: 3;
        margin-right: auto;
    }

    .left-container {
        width: 100%;
        height: calc(0% + 45px);
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        z-index: 2;
        box-sizing: border-box;
    }

    .footer-info {
        position: absolute;
        width: calc(100% - 20px);
        bottom: 0;
        background-color: rgba(255, 255, 255, 0.9);
        color: #333;
        padding: 10px 10px;
        margin-bottom: 0px;
        display: none;
        align-items: center;
        justify-content: center;
        gap: 20px;
        font-size: 10px;
        font-weight: 700;
        white-space: nowrap;
    }

    .sidebar {
        width: 60px;
        height: 100%;
        flex: 1;
        background-color: #ffffff;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin: 0px 0px 0px 0px;
        transition: background-color 0.3s ease-in-out;
    }

    .logo {
        width: 40px;
        padding: 10px 3px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .logo-image {
        width: 30px;
        height: auto;
        object-fit: contain;
        margin-top: 7px;
    }

    .bottom-container {
        position: fixed;
        top: calc(100% - 57px);
        height: calc(0vh + 50px);
        right: 7px;
        width: calc(100% - 14px);
        margin: 0px 0px 0px 0px;
        display: none;
    }

    .middle-bottom-container {
        top: 83%;
        height: 7%;
        display: none;
        justify-content: space-between;
        align-items: center;
        z-index: 0;
    }

    .page-text {
        position: absolute;
        top: 69px;
        right: 0px;
        left: 0px;
        bottom: 0px;
        text-align: right;
        margin-right: 10px;
    }

    .page-subtitle {
        color: var(--color-orange);
        font-size: 15px;
        font-weight: bold;
    }

    .page-title {
        color: var(--color-orange);
        font-size: 35px;
        font-weight: bold;
        margin-top: -0.8rem;
    }

    .middle-container {
        top: calc(0% + 120px);
        height: calc(100dvh - 145px);
        overflow-y: scroll;
        display: flex;
        align-items: center;
        overflow-x: hidden;
        right: 0;
        width: 100%;
        padding: 0rem;
        margin-top: 15px;
    }

    .company-popup-body2 {
        display: block;
        top: calc(0% + 120px);
        height: calc(100dvh - 200px);
        padding: 0rem 1rem;
        flex: 1;
        background-color: #1b1b1b;
        border-bottom-right-radius: 10px;
    }

    .company-popup-body2 h2 {
        display: none;
        color: var(--color-orange);
        margin: 0;
        margin-bottom: 1.5rem;
        font-size: 1.5rem;
    }

    .company-info-label {
        width: 120px;
        color: #ffffff;
        font-weight: bold;
        margin-right: 20px;
        font-size: 14px;
    }

    .company-info-value {
        flex: 1;
        color: #ffffff;
        font-size: 14px;
    }

    .company-info-row {
        display: flex;
        margin-bottom: 0.4rem;
        border-bottom: 1px solid #D7D5CA;
        padding: 0.5rem 0.5rem;
    }

    .menu-popup.show {
        top: calc(42px);
        left: calc(7px);
    }

    .menu-popup-content {
        padding: 15px 15px;
        height: 100%;
        width: 100%;
        box-sizing: border-box;
        position: relative;
    }

    .menu-popup-content::after {
        content: '';
        position: absolute;
        top: 25px;
        left: 25px;
        height: 1px;
        width: 0;
        background-color: #1b1b1b;
        transform-origin: left center;
        transition: width 0s;
    }

    .menu-popup-copyright {
        position: absolute;
        top: 30px;
        right: 25px;
        font-size: 0.6em;
        color: #1b1b1b;
        opacity: 0.7;
    }

    .menu-item-text {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 10px;
        margin: 0px 13px;
    }

    .menu-item-arrow {
        color: #1a1a1a;
        font-size: 1.3em;
        margin-left: 0px;
    }

    .menu-items {
        display: flex;
        flex-direction: column;
        margin-bottom: 40px;
        gap: 10px;
    }

    .menu-item-logo {
        width: 31px;
        height: 31px;
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
    }

    .services-scroll {
        flex-direction: column;
        overflow-x: hidden;
        overflow-y: scroll;
        gap: 0.5rem;
        padding: 0px 10px;
        scroll-snap-type: y mandatory;
        height: 100%;
    }

    .service-card {
        position: relative;
        width: 100%;
        box-sizing: border-box;
        height: auto;
        border: 1px solid var(--color-orange);
        border-radius: 10px;
        padding: 13px;
        color: white;
        display: flex;
        flex-direction: column;
        gap: 0px;
    }

    .service-logo {
        position: absolute;
        top: 35px;
        right: 15px;
        left: auto;
        bottom: auto;
        width: auto;
        height: 190px;
        opacity: 0.4;
        z-index: -1;
        mix-blend-mode: normal;
    }

    .service-content h3 {
        font-size: 1.1rem;
        margin: 1rem 0 0.5rem 0;
        color: var(--color-orange);
    }

    .service-content li {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
        line-height: 1.4;
    }

    .service-title h2 {
        font-size: 2rem;
        color: var(--color-orange);
        margin: 0;
        white-space: nowrap;
    }

    .more-info {
        background-color: var(--color-orange);
        color: white;
        width: 100%;
        border: none;
        padding: 6px 48px;
        border-radius: 50px;
        font-size: 0.7rem;
        cursor: pointer;
        transition: opacity 0.3s ease;
        flex: 1;
        /* 同じ大きさになるよう追加 */
        max-width: 100%;
        /* 最大幅を設定 */
        white-space: nowrap;
        /* テキスト折り返しなし */
        text-align: center;
        /* テキストを中央揃え */
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .official-web {
        background-color: white;
        color: var(--color-orange);
        border: none;
        padding: 6px 48px;
        border-radius: 50px;
        font-size: 0.7rem;
        cursor: pointer;
        transition: opacity 0.3s ease;
        flex: 1;
        /* 同じ大きさになるよう追加 */
        max-width: 100%;
        /* 最大幅を設定 */
        white-space: nowrap;
        /* テキスト折り返しなし */
        text-align: center;
        /* テキストを中央揃え */
        display: flex;
        justify-content: center;
        align-items: center;
        margin-bottom: 0.2rem;
    }

    .renewing {
        border: none;
        padding: 8px 48px;
        border-radius: 50px;
        font-size: 0.7rem;
        cursor: pointer;
        transition: opacity 0.3s ease;
        flex: 1;
        /* 同じ大きさになるよう追加 */
        max-width: 100%;
        /* 最大幅を設定 */
        white-space: nowrap;
        /* テキスト折り返しなし */
        text-align: center;
        /* テキストを中央揃え */
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .contact-slideout {
        position: fixed;
        top: 0;
        right: -100%;
        width: calc(100% - 14px);
        height: calc(100dvh - 14px);
        background-color: var(--color-orange);
        z-index: 6;
        transition: right 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
        margin: 7px;
    }

    .privacy-popup.show {
        left: calc(7px);
        height: calc(100dvh - 44px);
        width: calc(100% - 44px);
    }

    .privacy-popup {
        position: fixed;
        top: -4px;
        left: -500px;
        height: calc(100dvh - 60px);
        width: 70%;
        background-color: var(--color1);
        z-index: 1000;
        transition: left 0.5s ease-in-out;
        overflow-y: auto;
        margin: 10px 0px 10px 0px;
        display: flex;
        padding: 15px;
        border-top-right-radius: 10px;
        border-bottom-right-radius: 10px;
    }


}

.card-arrow-narrow {
    width: 0;
    height: 0;
    border-top: 18px solid transparent;
    border-bottom: 18px solid transparent;
    border-left: 15px solid #fff;
    margin: 0 10px;
    display: inline-block;
    align-self: center;
}

/* モバイルだけ下向きに回転 */
@media (max-width: 768px) {
    .card-arrow-narrow {
        transform: rotate(90deg);
    }
}