* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: 'Kiwi Maru', serif;
    background-image: url('assets/main-bg.jpg');
    background-size: 100% auto;
    background-repeat: repeat-y;
    background-position: center top;
    background-attachment: scroll;
    min-height: 100vh;
}

/* PC画面のみでpc-site-bgを表示 */
@media screen and (min-width: 768px) {
    body {
        background-image: url('assets/main-bg.jpg'), url('assets/pc-site-bg.png');
        background-size: 470px auto, cover;
        background-repeat: repeat-y, no-repeat;
        background-position: center top, center;
        background-attachment: scroll, fixed;
        background-color: #f5e6dc;
    }
    
    .main-visual {
        width: 100%;
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .powered-by {
        width: 470px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        max-width: none !important;
    }
}

/* SP版のみ：サイト背景の横幅に合わせる */
@media screen and (max-width: 767px) {
    .main-visual {
        width: 100vw !important;
        margin-left: calc(-50vw + 50%) !important;
        margin-right: calc(-50vw + 50%) !important;
        max-width: none !important;
    }
    
    .instruction-text {
        font-size: 18px;
        margin: 35px 0;
    }
    
    .sub-instruction-text {
        font-size: 16px;
        margin: 0 0 35px 0;
    }
    
    .dress-selection {
        max-width: 320px;
        gap: 10px;
        margin-bottom: 20px;
    }
    
    .dress-item {
        aspect-ratio: 1.5;
        min-height: 110px;
        padding: 10px;
    }
    
    .dress-image-container {
        width: calc(95% - 20px);
        height: calc(100% - 20px);
        min-width: 170px;
        min-height: 75px;
    }
    
    .next-button {
        margin: 20px auto;
        text-align: center;
    }
    
    .next-button img {
        max-width: 200px;
    }
    
    .info-title {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .info-content {
        font-size: 12px;
        line-height: 1.5;
    }
    
    .info-box {
        padding: 15px;
        margin-bottom: 10px;
    }
    
    .info-section {
        margin-top: 30px;
    }
    
    .footer {
        margin-top: 30px;
    }
    
    .footer-links a {
        font-size: 12px;
        margin: 0 8px;
    }
    
    .powered-by {
        font-size: 10px;
    }
}

.container {
    max-width: 500px;
    margin: 0 auto;
    padding: 0 15px 20px 15px;
}

/* ヘッダー部分 */
.header {
    text-align: center;
    margin-bottom: 0;
    margin-top: 0;
}

.main-visual {
    width: 100%;
    height: auto;
    margin-top: 0;
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
    display: block;
}

.main-visual-under-frame {
    width: 100%;
    max-width: 600px;
    height: auto;
    margin-bottom: 30px;
}

/* テキスト部分 */
.instruction-text {
    font-family: 'Kiwi Maru', serif;
    font-weight: 500;
    font-size: 24px;
    color: #ff6b35;
    text-align: center;
    margin: 50px 0 50px 0;
    text-shadow: 2px 2px 0px #ffffff;
}

.sub-instruction-text {
    font-family: 'Kiwi Maru', serif;
    font-weight: 500;
    font-size: 20px;
    color: #000000;
    text-align: center;
    margin: 0 0 50px 0;
}

/* ドレス選択部分 */
.dress-selection {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 40px;
    max-width: 350px;
    margin-left: auto;
    margin-right: auto;
}

.dress-item {
    background: white;
    border-radius: 15px;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    aspect-ratio: 1.1;
    min-height: 150px;
}

.dress-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.dress-item.selected {
    border: 3px solid #4a90e2;
    box-shadow: 0 6px 16px rgba(74, 144, 226, 0.3);
}

/* タッチデバイス向けの調整 */
@media (hover: none) and (pointer: coarse) {
    .dress-item:hover {
        transform: none;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }
    
    .dress-item:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
}

.dress-image-container {
    width: 70%;
    height: calc(100% - 20px);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-width: 280px;
    min-height: 120px;
    flex-shrink: 0;
}

.dress-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.dress-radio {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    background-color: transparent;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 15px;
}

.dress-radio:checked {
    background-color: #4a90e2;
}

/* 次へボタン */
.next-button {
    display: block;
    margin: 30px auto;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.3s ease;
}

.next-button img {
    width: auto;
    height: auto;
    max-width: 250px;
    display: block;
    margin: 0 auto;
}

.next-button:hover {
    transform: translateY(-2px);
}

/* タッチデバイス向けボタン調整 */
@media (hover: none) and (pointer: coarse) {
    .next-button:hover {
        transform: none;
    }
    
    .next-button:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
}

/* 情報ボックス */
.info-section {
    margin-top: 60px;
    max-width: 370px;
    margin-left: auto;
    margin-right: auto;
}

.info-box {
    background-color: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0e0d6;
}

.info-title {
    font-family: 'Kiwi Maru', serif;
    font-weight: 500;
    font-size: 24px;
    color: #ff6b35;
    text-align: center;
    margin-bottom: 15px;
}

.wave-separator {
    width: calc(100% + 40px);
    height: 8px;
    margin-left: -20px;
    margin-right: -20px;
    margin-bottom: 15px;
    background-image: url("data:image/svg+xml,%3csvg width='40' height='8' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M0 4 Q2.5 1 5 4 Q7.5 7 10 4 Q12.5 1 15 4 Q17.5 7 20 4 Q22.5 1 25 4 Q27.5 7 30 4 Q32.5 1 35 4 Q37.5 7 40 4' stroke='%23ff6b35' stroke-width='2' fill='none'/%3e%3c/svg%3e");
    background-repeat: repeat-x;
    background-size: 40px 8px;
}

.info-content {
    font-family: 'Kiwi Maru', serif;
    font-weight: 400;
    font-size: 14px;
    color: #000000;
    line-height: 1.6;
}

.center-text {
    text-align: center;
}

.with-padding {
    padding-left: 10px;
    padding-right: 10px;
}

.bullet-item {
    text-indent: -1.2em;
    padding-left: 1.2em;
    margin-bottom: 8px;
}


/* 利用規約リンク */
.footer-links {
    margin-top: 40px;
    margin-bottom: 20px;
    text-align: center;
}

/* フッター */
.footer {
    margin-top: 0px;
    text-align: center;
}

.footer-links a {
    color: #000000;
    text-decoration: none;
    margin: 0 10px;
    font-size: 14px;
}

.footer-links a:hover {
    text-decoration: underline;
}

.powered-by {
    color: #000000;
    font-size: 10px;
    margin-top: 0px;
    background-color: white;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    padding: 10px 0;
    text-align: center;
}

.powered-by a {
    color: inherit;
    text-decoration: none;
}

.powered-by a:hover {
    color: inherit;
    text-decoration: none;
}