body {
    margin: 0;
    padding: 0;
    font-family: sans-serif;
    background: #fff;
    text-align: center;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}
div.wrapper{
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 4vw 5vw;
    box-sizing: border-box; /* 追加 */
}

h1{
    margin:0;
}

/* PDFポップアップ用スタイル */
.pdf-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.pdf-popup.show {
    display: flex;
}

.pdf-popup-content {
    position: relative;
    width: 90vw;
    height: 90vh;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.pdf-controls {
    background: #333;
    color: #fff;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.pdf-controls button {
    background: #555;
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.pdf-controls button:hover {
    background: #777;
}

.pdf-controls button:disabled {
    background: #333;
    cursor: not-allowed;
}

.pdf-controls span {
    font-size: 14px;
    margin: 0 5px;
}

.pdf-container {
    flex: 1;
    overflow: auto;
    padding: 20px;
    background: #f0f0f0;
    text-align: center;
}

.pdf-container canvas {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 10px auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    background: #fff;
}

.pdf-popup-close {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #fff;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1;
}

.pdf-popup-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

.footer {
    margin-bottom: 5vw;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
}
.footer input{
    width: 34vw;
    height: 9vw;
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: contain;
    border: none;
    background-color: rgba(0, 0, 0, 0);
    text-indent: -9999px;
}

.footer input.material_requests{
    background-image: url("/img/questionnaire/button_01.png");
}
.footer input.personal_contacts{
    background-image: url("/img/questionnaire/button_02.png");
}
.footer input.questionnaires{
    background-image: url("/img/material_request/button_03.png");
}

.fixed-bottom-bg {
    max-width: 95%;
}

button.back2top {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 300px;
    height: 100px;
    background: url(/img/button_top.png) no-repeat center center;
    background-size: contain;
    border: none;
    cursor: pointer;
    z-index: 1000;
}


/* TOP */
body.top {

    background: bottom right url(/img/top/bg.png) no-repeat;
    background-size: contain;

    .title {
        margin: 0 0 20px;
        font-size: 2vw;
        font-weight: bold;
        line-height: 12vw;
    }

    .menu-row {
        display: flex;
        justify-content: space-between;
        gap: 30px;
        flex-wrap: nowrap;
        max-width: 90vw;
        margin: 0 auto 40px;
    }

    .menu-item {
        max-width: 28vw;
    }

    .navigator {
        max-width: 90vw;
        margin: 0 auto 40px;
    }

    .wave-footer {
        width: 100%;
        height: auto;
        display: block;
    }

    img {
        max-width: 100%;
        height: auto;
        display: block;
    }
}


body.questionnaire_select {

    background: top left url(/img/questionnaire/bg_select.png) no-repeat;
    background-size: contain;

    h1{
        text-indent: -9999px;
        text-align: left;
        background: url(/img/questionnaire/title.png) no-repeat;
        background-size: contain;
        width: 60vw;
        height: 7vw;
    }

    div.select{
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        margin: 160px 0 0;
        gap: 8vw;

        a
        {
            text-indent: -9999px;
            width: 70vw;
            height: 18vw;
            border: none;
        }
        a:nth-child(1)
        {
            background: url(/img/questionnaire/asset_16.png) no-repeat;
            background-size: contain;
        }
        a:nth-child(2)
        {
            background: url(/img/questionnaire/asset_17.png) no-repeat;
            background-size: contain;
        }

    }
}

body.questionnaire_create {

    overflow: auto;

    div.wrapper{
        height: auto;
    }

    h1{
        font-size: 3.5vw;
        font-weight: bold;
        text-align: center;
        padding: 2vw 0;
        border-bottom: 5px solid #f26522;
        color: #f26522;
    }
    
    div.question {
        display: flex;
        flex-direction: column;
        gap: 3vw;
        margin: 6vw auto;
        font-family: sans-serif;
        width: 80%;

        dl {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 2vw;
            font-size: 1.8vw;
            text-align: left;
            width: 100%;
        }

        dl dt {
            font-weight: bold;
            min-width: 3vw;
            text-align: left;
            width: 100%;
        }
        dl dt span {
            color: #f26522;
            padding-right: 2em;
        }

        dl dd {
            margin: 0;
            padding: 0;
            width: 100%;
        }

        .radio-group {
            display: flex;
            flex-wrap: wrap;
            gap: 1vw;
            margin-top: 1vw;
        }

        .radio-group input[type="radio"] {
            display: none;
        }

        .radio-label {
            display: inline-block;
            padding: 1vw 3vw;
            border: 2px solid #f26522;
            border-radius: 50px;
            cursor: pointer;
            font-size: 1.5vw;
            font-weight: bold;
            color: #000;
            transition: all 0.2s ease-in-out;
            user-select: none;
        }

        .custom-radio {
            width: 30px;
            height: 30px;
            position: absolute;
            top: 0;
            left: 0;
            background-size: 30px;
            background-repeat: no-repeat;
            background-position: top left;
        }

        .radio-group.full-width .radio-label{
            width: 100%;
        }
        .width-60 .radio-label{
            width: 60%;
        }
        .photo-consent{
            display: flex;
            justify-content: center;
            align-items: flex-start;
            gap: 2vw;
            color: #E76E3C;
            font-size: 1.5vw;
        }
        .photo-consent .radio-group{
            width: 60%;
        }

        input[type="radio"]:checked + .radio-label {
            background-color: #f26522;
            color: #fff;
        }

        /* テーブル全体 */
        .table {
            border-collapse: separate;
            border-spacing: 30px;
            width: 100%;
            font-family: sans-serif;
            margin-top: 1.5vw;
        }

        /* テーブルの見出し */
        .table thead th {
            background-color: #fff;
            text-align: center;
            font-size: 2vw;
            font-weight: bold;
            border: 1px solid #ccc;
            padding: 1vw;
        }
        .table thead th:first-child {
            border: none;
        }

        /* 行タイトル（G1〜G3） */
        .table tbody td:first-child {
            font-weight: bold;
            text-align: center;
            background-color: #fff;
            border: 1px solid #ccc;
            width: 10%;
            font-size: 2vw;
            padding: 1vw;
        }

        /* セレクトボックスを含むセル */
        .table tbody td:not(:first-child) {
            background-color: #ffe5dc;
            text-align: center;
            border: 1px solid #ccc;
            padding: 0.5vw;
        }

        /* セレクトボックス共通 */
        .table select {
            width: 100%;
            background-color: #ffe5dc;
            border: none;
            padding: 0.6vw 2vw 0.6vw 1vw;
            border-radius: 4px;
            font-size: 2vw;
            appearance: none;
            background-image: url("/img/questionnaire/selectbox.png");
            background-repeat: no-repeat;
            background-position: right 10px center;
            background-size: 2vw;
            cursor: pointer;
        }

        textarea {
            width: 100%;
            height: 10vw;
            padding: 1vw;
            border: 2px solid #f26522;
            border-radius: 20px;
            font-size: 1.5vw;
            resize: none;
        }   

    }

    .sample img{
        width: 350px;
    }

    .company-section {
        position: absolute;
        width: 100%;
        left: 0;
        background-color: #1a1a1a;
        color: #fff;
        padding: 20px;
        font-family: sans-serif;
        margin-bottom: 5vw;

        .label {
            margin-bottom: 10px;
            font-size: 1.5vw;
        }

        .input-group {
            display: flex;
            gap: 20px;
            align-items: flex-end;
            flex-wrap: wrap;
            justify-content: center;
        }

        .input-block {
            display: flex;
            flex-direction: column;
        }

        .input-white {
            background: #fff;
            color: #000;
            border-radius: 4px;
            font-size: 1.5vw;
            font-weight: bold;
            text-align: center;
            min-width: 120px;
            height: 3vw;
            line-height: 3vw;
            padding: 0 20px;
        }
        .input-block label {
            font-size: 1.5vw;
            margin-bottom: 5px;
        }

        .input-block select {
            background: #ffe5dc;
            border: none;
            border-radius: 4px;
            appearance: none;
            font-size: 1.5vw;
            background-image: url("/img/questionnaire/selectbox.png");
            background-repeat: no-repeat;
            background-position: right 10px center;
            background-size: 2vw;
            min-width: 26vw;
            height: 3vw;
            line-height: 3vw;
            text-align: center;
        }
    }

    .footer{
        margin-top: 20vw;
    }

}

body.material_requests{

    background-color: #fff;
    overflow: auto;

    div.wrapper{
        height: 100%;
        padding: 4vw 0;
        background-color: #ffe5dc;
        margin-bottom: 5vw;
    }
    div.inner{
        padding: 0 5vw;
    }

    .header {
        position: relative;
        text-align: center;
        background-color: #ffe5dc;
        overflow: hidden;
        padding: 3vw 1vw 6vw;
        margin-top: -4vw;
    }

    .header::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 200%;
        background: #fff;
        border-radius: 0 0 50% 50% / 0 0 100% 100%;
        z-index: 0;
        transform: translateY(-60%);
    }

    .header h1 {
        position: relative;
        font-size: 3vw;
        font-weight: normal;
        color: #E76E3C;
        z-index: 1;
    }

    h2{
        background-color: #FF7239;
        font-size: 2.5vw;
        font-weight: normal;
        color: #fff;
        padding: 0.8vw 0;
        width: 100%;
        margin: 0 auto 2vw;
    }

    div.video{
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-direction: row;
        gap: 2vw;
        margin-bottom: 2vw;
    }

    div.video img{
        width: 100%;
        height: auto;
        max-width: 40vw;
        border-radius: 10px;
    }

    .materials {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        background-color: #ffe5dc;
        width: 100%;
    }

    .material {
        width: 33%;
        text-align: center;
        font-family: sans-serif;
        margin-bottom: 2vw;
    }

    .material img {
        width: 100%;
        height: auto;
    }

    .material-title {
        margin-top: 1vw;
        font-size: 1.1vw;
        color: #333;
        line-height: 1.4;
    }

    .material-title h4 {
        font-weight: bold;
        margin: 0 0 0.3vw;
        color: #f26522;
    }

    .quantity {
        margin-top: 1vw;
        font-size: 2vw;
        color: #333;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 0.5vw;
    }

    .quantity input[type="number"] {
        width: 4vw;
        padding: 0.3vw;
        font-size: 2vw;
        border: 1px solid #ccc;
        border-radius: 4px;
        text-align: right;
    }

    /* 動画ポップアップ用スタイル */
    .video-popup {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.8);
        z-index: 1000;
        justify-content: center;
        align-items: center;
    }

    .video-popup.show {
        display: flex;
    }

    .video-popup-content {
        position: relative;
        max-width: 80vw;
        max-height: 80vh;
        background: #000;
        border-radius: 10px;
        overflow: hidden;
    }

    .video-popup video {
        width: 100%;
        height: auto;
        max-height: 80vh;
        display: block;
    }

    .video-popup-close {
        position: absolute;
        top: 10px;
        right: 15px;
        color: #fff;
        font-size: 30px;
        font-weight: bold;
        cursor: pointer;
        z-index: 1001;
        background: rgba(0, 0, 0, 0.5);
        border-radius: 50%;
        width: 40px;
        height: 40px;
        display: flex;
        justify-content: center;
        align-items: center;
        line-height: 1;
    }

    .video-popup-close:hover {
        background: rgba(0, 0, 0, 0.8);
    }

    /* iPad Safari対応の追加スタイル */
    @media screen and (max-width: 1024px) {
        .video-popup-content {
            max-width: 95vw;
            max-height: 85vh;
        }
        
        .video-popup video {
            max-height: 85vh;
        }
    }

    /* iOS Safari特有の問題対応 */
    .video-popup video {
        -webkit-playsinline: true;
        -webkit-appearance: none;
    }

}

body.slide_select {

    background: top left url(/img/questionnaire/bg_select.png) no-repeat;
    background-size: contain;

    h1{
        font-size: 2.5vw;
        font-weight: bold;
        text-align: left;
    }

    div.select{
        display: flex;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap;
        margin: 2vw 0 0;
        gap: 2vw;

        a {
            display: inline-block;
            width: 45%;
        }

        a img
        {
            border: none;
            width: 100%;
        }
    }
}
