@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: 2;
        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;
    }

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

    .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: -0.8rem;
        /* サブタイトルとの間隔を詰める */
    }

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

        /* 会社情報のグリッドレイアウト */
    .company-info-grid {
        display: none;
        grid-auto-flow: column;
        grid-template-rows: repeat(1, 1fr);
        grid-auto-columns: minmax(170px, 300px);
        gap: 0rem;
        width: 100%;
        max-width: 100%;
        margin: 0px 0px 0px 10px;
        align-items: flex-end;
        overflow-x: scroll;
        padding: 0;
        height: 100%;
        scrollbar-width: thin;
        -ms-overflow-style: auto;
        -webkit-overflow-scrolling: touch; /* スムーズスクロール for iOS */
    }

    .image-stack {
        position: relative;
        width: 70%;
        height: 80%;
    }

    /* 各情報アイテム */
    .info-item {
        position: relative;
        min-width: 180px;
        width: 180px;
        height: 100%;
        /* 高さを100%に設定 */
        flex-shrink: 0;
        padding-left: 1.5rem;
    }

    /* スクロールバーのカスタマイズ */
    .company-info-grid::-webkit-scrollbar {
        height: 8px;
    }

    .company-info-grid::-webkit-scrollbar-track {
        background: #f1f1f1;
    }

    .company-info-grid::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 4px;
    }

    .company-info-grid::-webkit-scrollbar-thumb:hover {
        background: #555;
    }

    .middle-bottom-container {
        top: 83%;
        height: 7%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        z-index: 0;
    }
    
    .middle-bottom-left {
        display: none;
        color: #D7D5CA;
        font-size: 1.2rem;
        font-weight: bold;
        width: 50%;
        text-align: left;
        cursor: pointer;
    }
    
    .middle-bottom-right {
        display: none;
        color: #D7D5CA;
        margin-top: 80px;
        margin-left: 150px;
        font-size: 1rem;
        font-weight: bold;
        width: 50%;
        text-align: right;
        padding: 0 0rem;
    }
    
    .middle-bottom-right::after {
        display: none;
        content: "→";
        font-size: 1rem;
        margin-left: 5px;
    }

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

    .member-bar {
        display: none;
        box-sizing: border-box;
        width: calc(100% - 0vh);
        height: calc(100% - 65px);
        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: 999;
        margin-bottom: 0px;
        padding: 20px;
        margin: 10px;
        overflow: visible;
    }

    .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;
    }

    .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;
    }

    .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との間隔 */
    }

    .overlay.show {
        display: none;
    }

    .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;
    }

    .rotating-area {
        display: none;
    }

    .company-popup-content-main {
        display: none;
        background-color: var(--color1);
        width: auto;
        padding: 0px;
        border-top-right-radius: 10px;
        border-bottom-right-radius: 10px;
    }

    .company-popup-body2 {
        display: block;
        top: calc(0% + 170px);
        height: calc(100dvh - 265px);
        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;
    }
    
    .company-info-value {
        flex: 1;
        color: #ffffff;
    }

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

    .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: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;
    }
}

@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 {
        position: fixed;
        top: 0px;
        height: calc(100dvh - 67px);
        width: calc(100% - 14px);
        background-color: var(--color-orange);
        z-index: 5;
        transition: top 0.3s ease-in-out;
        overflow-y: auto;
        margin: 15px 0px 15px 0px;
    }

    .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;
    }

    .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;
    }


}