/* ========================================
   기본 설정
======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        "Noto Sans KR",
        Arial,
        sans-serif;

    background: #f5f6f8;
    color: #222;
    line-height: 1.6;
}


/* ========================================
   전체 컨테이너
======================================== */

.container {
    width: 100%;
    max-width: 850px;
    margin: 0 auto;
    padding: 50px 20px 100px;
}


/* ========================================
   헤더
======================================== */

.header {
    text-align: center;
    margin-bottom: 40px;
}

.header h1 {
    font-size: 34px;
    font-weight: 800;
    margin-bottom: 8px;
    color: #181818;
}

.header p {
    font-size: 16px;
    color: #777;
}


/* ========================================
   공통 섹션
======================================== */

.calculator-section {
    background: #ffffff;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 22px;

    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.05);
}

.calculator-section h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 22px;
    color: #222;
}


/* ========================================
   여행 스타일 버튼
======================================== */

.style-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.style-btn {
    position: relative;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-height: 145px;
    padding: 20px 10px;

    background: #ffffff;

    border: 2px solid #eeeeee;
    border-radius: 16px;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}


/* 마우스를 올렸을 때 */

.style-btn:hover {
    transform: translateY(-4px);

    border-color: #e84c4c;

    box-shadow:
        0 8px 20px rgba(232, 76, 76, 0.12);
}


/* 선택된 여행 스타일 */

.style-btn.active {
    background: #fff5f5;
    border-color: #e84c4c;

    box-shadow:
        0 6px 18px rgba(232, 76, 76, 0.15);
}


.style-icon {
    font-size: 34px;
    margin-bottom: 8px;
}

.style-btn strong {
    font-size: 18px;
    margin-bottom: 4px;
    color: #222;
}

.style-btn small {
    font-size: 13px;
    color: #888;
}


/* ========================================
   여행 정보
======================================== */

.travel-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}


.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 14px;
    font-weight: 600;
    color: #555;
}


.input-group select {
    width: 100%;
    height: 52px;

    padding: 0 16px;

    font-size: 16px;
    color: #222;

    background: #fafafa;

    border: 1px solid #dddddd;
    border-radius: 12px;

    outline: none;
    cursor: pointer;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}


.input-group select:hover {
    background: #ffffff;
    border-color: #bbbbbb;
}


.input-group select:focus {
    background: #ffffff;
    border-color: #e84c4c;

    box-shadow:
        0 0 0 3px rgba(232, 76, 76, 0.1);
}


/* ========================================
   상세 경비 제목
======================================== */

.section-title {
    margin-bottom: 20px;
}

.section-title h2 {
    margin-bottom: 5px;
}

.section-title p {
    font-size: 14px;
    color: #888;
}


/* ========================================
   상세 경비 리스트
======================================== */

.expense-list {
    display: flex;
    flex-direction: column;
}


.expense-item {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 20px 0;

    border-bottom: 1px solid #eeeeee;
}


/* 마지막 항목의 밑줄 제거 */

.expense-item:last-child {
    border-bottom: none;
}


.expense-info {
    display: flex;
    align-items: center;
    gap: 14px;

    min-width: 170px;
}


.expense-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 46px;
    height: 46px;

    font-size: 24px;

    background: #f7f7f7;
    border-radius: 12px;
}


.expense-info div {
    display: flex;
    flex-direction: column;
}


.expense-info label {
    font-size: 16px;
    font-weight: 700;
    color: #222;
}


.expense-info small {
    margin-top: 2px;

    font-size: 12px;
    color: #999;
}


/* ========================================
   가격 입력창
======================================== */

.price-input {
    display: flex;
    align-items: center;
    gap: 8px;
}


.price-input input {
    width: 180px;
    height: 48px;

    padding: 0 14px;

    text-align: right;

    font-size: 17px;
    font-weight: 600;

    color: #222;
    background: #fafafa;

    border: 1px solid #dddddd;
    border-radius: 10px;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}


.price-input input:hover {
    background: #ffffff;
    border-color: #bbbbbb;
}


.price-input input:focus {
    background: #ffffff;
    border-color: #e84c4c;

    box-shadow:
        0 0 0 3px rgba(232, 76, 76, 0.1);
}


.price-input span {
    min-width: 18px;

    font-size: 14px;
    color: #777;
}


/* 숫자 입력창 화살표 제거 */

/* Chrome, Safari, Edge */
.price-input input::-webkit-outer-spin-button,
.price-input input::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}


/* ========================================
   계산 버튼
======================================== */

.calculate-btn {
    width: 100%;
    height: 64px;

    margin-top: 10px;
    margin-bottom: 25px;

    font-size: 19px;
    font-weight: 700;

    color: #ffffff;
    background: #e84c4c;

    border: none;
    border-radius: 16px;

    cursor: pointer;

    box-shadow:
        0 8px 22px rgba(232, 76, 76, 0.25);

    transition:
        transform 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}


.calculate-btn:hover {
    background: #d94040;

    transform: translateY(-2px);

    box-shadow:
        0 10px 28px rgba(232, 76, 76, 0.3);
}


.calculate-btn:active {
    transform: translateY(0);

    box-shadow:
        0 5px 15px rgba(232, 76, 76, 0.2);
}


/* ========================================
   결과 영역
======================================== */

.result-section {
    background: #ffffff;

    border-radius: 20px;

    padding: 35px;

    box-shadow:
        0 5px 25px rgba(0, 0, 0, 0.06);
}


.result-section h2 {
    text-align: center;

    font-size: 22px;
    margin-bottom: 8px;
}


.trip-summary {
    display: flex;
    justify-content: center;
    align-items: center;

    gap: 8px;

    margin-bottom: 30px;

    font-size: 14px;
    color: #888;
}


/* ========================================
   총 예상 금액
======================================== */

.total-price {
    display: flex;
    flex-direction: column;
    align-items: center;

    padding: 30px 20px;

    margin-bottom: 15px;

    background:
        linear-gradient(
            135deg,
            #fff4f4,
            #fffafa
        );

    border: 1px solid #ffe2e2;
    border-radius: 18px;
}


.total-price span {
    margin-bottom: 5px;

    font-size: 14px;
    color: #777;
}


.total-price strong {
    font-size: 38px;
    font-weight: 800;

    color: #e84c4c;
}


/* ========================================
   1인당 예상 금액
======================================== */

.per-person-price {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 18px 20px;

    margin-bottom: 25px;

    background: #f8f8f8;

    border-radius: 12px;
}


.per-person-price span {
    font-size: 14px;
    color: #666;
}


.per-person-price strong {
    font-size: 18px;
    color: #222;
}


/* ========================================
   결과 상세 내역
======================================== */

.result-details {
    border-top: 1px solid #eeeeee;
}


.result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 17px 5px;

    border-bottom: 1px solid #eeeeee;
}


.result-item span {
    font-size: 15px;
    color: #555;
}


.result-item strong {
    font-size: 15px;
    color: #222;
}


/* ========================================
   태블릿 / 작은 화면
======================================== */

@media (max-width: 700px) {

    .container {
        padding:
            30px 15px
            70px;
    }


    .header {
        margin-bottom: 30px;
    }


    .header h1 {
        font-size: 27px;
    }


    .header p {
        font-size: 14px;
    }


    .calculator-section {
        padding: 22px 18px;

        border-radius: 16px;
    }


    /* 여행 스타일 버튼 */

    .style-buttons {
        gap: 8px;
    }


    .style-btn {
        min-height: 125px;

        padding:
            15px 5px;
    }


    .style-icon {
        font-size: 28px;
    }


    .style-btn strong {
        font-size: 15px;
    }


    .style-btn small {
        font-size: 11px;
    }


    /* 여행 정보 */

    .travel-options {
        grid-template-columns: 1fr;
        gap: 15px;
    }


    /* 경비 입력 */

    .expense-item {
        gap: 10px;
    }


    .expense-info {
        min-width: 140px;
        gap: 10px;
    }


    .expense-icon {
        width: 40px;
        height: 40px;

        font-size: 20px;
    }


    .expense-info label {
        font-size: 14px;
    }


    .expense-info small {
        font-size: 11px;
    }


    .price-input input {
        width: 130px;

        font-size: 15px;
    }


    /* 결과 */

    .result-section {
        padding: 25px 18px;
    }


    .total-price strong {
        font-size: 32px;
    }
}


/* ========================================
   아주 작은 모바일 화면
======================================== */

@media (max-width: 450px) {

    .style-buttons {
        grid-template-columns: 1fr;
    }


    .style-btn {
        min-height: auto;

        flex-direction: row;
        justify-content: flex-start;

        gap: 12px;

        padding: 15px 18px;
    }


    .style-icon {
        margin-bottom: 0;
    }


    .style-btn strong {
        min-width: 55px;

        text-align: left;
    }


    .style-btn small {
        text-align: left;
    }


    .expense-item {
        align-items: flex-start;
        flex-direction: column;
    }


    .price-input {
        width: 100%;
    }


    .price-input input {
        width: 100%;
    }


    .total-price strong {
        font-size: 29px;
    }

   
    
}

/* ========================================
   PC용 따라다니는 쿠팡 광고 4개
======================================== */

#floatingAd {
    position: fixed;

    /* 숫자가 커질수록 왼쪽으로 이동 */
    right: 50px;

    top: 50%;
    transform: translateY(-50%);

    /* 광고 4개를 2 × 2로 배치 */
    display: grid;
    grid-template-columns: repeat(2, 120px);
    grid-template-rows: repeat(2, 240px);

    gap: 8px;

    width: 248px;
    height: 488px;

    z-index: 9999;
}

#floatingAd iframe {
    display: block;
    width: 120px;
    height: 240px;
    border: 0;
}

.checklist {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.checklist label {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 14px 16px;

    background: #f8f8f8;
    border-radius: 10px;

    cursor: pointer;
}

.checklist input {
    width: 18px;
    height: 18px;
}

@media (max-width: 600px) {
    .checklist {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   화면이 좁으면 PC용 광고 숨김
======================================== */

@media (max-width: 1400px) {
    #floatingAd {
        display: none;
    }
}


/* ========================================
   모바일용 하단 광고
   PC에서는 숨김
======================================== */

#mobileAd {
    display: none;
}


/* ========================================
   모바일 화면
======================================== */

@media (max-width: 768px) {

    #mobileAd {
        display: grid;

        /* 2개씩 2줄 */
        grid-template-columns: repeat(2, 120px);

        justify-content: center;

        gap: 8px;

        width: 100%;
        padding: 30px 0 40px;
    }

    #mobileAd iframe {
        display: block;
        width: 120px;
        height: 240px;
    }
}

    /* 페이지 맨 아래 광고 표시 */
    #mobileAd {
        display: flex;
        justify-content: center;
        align-items: center;

        width: 100%;

        padding: 30px 0 40px;
    }

    #mobileAd iframe {
        display: block;
    }

    


.footer {
    margin-top: 40px;
    padding: 20px;
    text-align: center;
    font-size: 12px;
    color: #777;
    line-height: 1.6;
}

.checklist-section {
    margin-top: 25px;
}

