/* style-responsive.css - Mobile responsive layout */
/* Version: 5.7.0 (Latest Update) */

/* ======================================================= */
/* ======== 모바??반응???��???(?��? ?�이?�웃) ======== */
/* ======================================================= */
@media (max-width: 768px) {
    .lgu-special-discounts-row {
        flex-direction: row !important;
        gap: 2px !important;
        margin-bottom: 8px !important;
        padding: 0 !important;
    }
    .lgu-special-discounts-row .input-group {
        padding: 4px 1px !important;
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        align-items: center !important;
        min-width: 0 !important;
        margin-bottom: 0 !important;
        background-color: #fef2f2 !important; /* 아주 연한 배경 */
        border: 1px solid #fee2e2 !important;
        border-radius: 4px !important;
    }
    body.dark-mode .lgu-special-discounts-row .input-group {
        background-color: #2d1b24 !important;
        border-color: #4b2c3a !important;
    }
    .lgu-special-discounts-row .input-group label {
        font-size: 0.55rem !important;
        margin-bottom: 3px !important;
        text-align: center !important;
        line-height: 1.0 !important;
        height: 2.0em !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        letter-spacing: -0.8px !important;
        color: #c2185b !important;
    }
    body.dark-mode .lgu-special-discounts-row .input-group label {
        color: #f472b6 !important;
    }
    .lgu-special-discounts-row .payment-method-options {
        width: 100% !important;
        margin-top: 0 !important;
        display: flex !important;
        gap: 1px !important;
    }
    .lgu-special-discounts-row .payment-button {
        padding: 3px 0 !important;
        font-size: 0.65rem !important;
        min-height: 26px !important;
        width: 100% !important;
        margin: 0 !important;
        border-radius: 4px !important;
        white-space: nowrap !important;
    }
    .lgu-special-discounts-row .tooltip-icon {
        display: none !important;
    }
    #printButton { display: none !important; }
    html, body { width: 100% !important; margin: 0; padding: 0; overflow-x: hidden; }
    .container { width: 100% !important; padding: 10px !important; margin: 0 !important; border-radius: 0 !important; box-shadow: none !important; }

    /* 로고 �??�단 ?�더 축소 */
    h1 { margin-top: 40px !important; margin-bottom: 5px !important; }
    h1 img { max-width: 160px !important; }
    .intro-text { margin-bottom: 10px !important; padding: 0 10px !important; }
    .intro-text p { font-size: 0.75rem !important; }
    
    /* 좌우 ?�단 버튼 구석 밀�?배치 */
    .top-left-buttons { 
        top: 5px !important; 
        left: 5px !important; 
        display: flex !important;
        gap: 2px !important;
        transform: scale(0.75);
        transform-origin: top left;
    }
    .top-right-buttons { 
        top: 5px !important; 
        right: 5px !important; 
        transform: scale(0.75);
        transform-origin: top right;
    }
    .icon-button { width: 60px !important; height: 60px !important; }

    /* 6�?버튼 (2x2x2 배치) - 초기 ?�면??*/
    #calculator-choice-wrapper { 
        display: block; /* JS�??�어 가??*/
        padding: 10px 0; 
    }
    #choice-buttons-wrapper { display: block; }
    .grid-area { 
        display: grid !important; 
        grid-template-columns: 1fr 1fr !important; /* 메인 메뉴??2??2x2x2) ?��? */
        gap: 8px !important; 
        padding: 0 5px;
    }
    .choice-button { 
        min-height: 80px !important; /* ?�이 증�? */
        padding: 12px 8px !important; 
        border: 2px solid #1a73e8 !important;
        background-color: #f4f8ff !important;
        border-radius: 10px !important;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        max-width: none !important; /* 갤럭???�드 ???��? ?�면?�서 컬럼??가??채우?�록 ?�정 */
    }
    .choice-button strong { font-size: 0.9rem !important; margin-bottom: 5px !important; display: block; }
    .choice-button span { font-size: 0.7rem !important; line-height: 1.2; display: block; }

    /* 계산�?본문 ?�이?�웃 */
    .main-content { 
        display: none; 
        flex-direction: row; 
        flex-wrap: wrap; 
        gap: 8px; 
        padding: 5px 0;
    }
    /* 계산�??�성????(Phone �?Internet 공통 ?�?? */
    #main-calculator-content-wrapper[style*="display: flex"],
    #main-calculator-content-wrapper[style*="display: block"],
    #calculator-main-wrapper[style*="display: block"] .main-content {
        display: flex !important;
    }

    /* 기본 ?�션 (?�독 계산 ??: 가로로 ?�게 100% */
    .section { 
        flex: 0 0 100% !important; 
        width: 100% !important;
        padding: 10px !important;
        font-size: 0.75rem !important;
        margin-bottom: 15px !important;
        border-radius: 6px !important;
    }

    /* 비교 모드???�만 좌우 축소 배치 */
    .main-content.comparison-mode,
    #main-calculator-content-wrapper.comparison-mode { 
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    .main-content.comparison-mode .section,
    #main-calculator-content-wrapper.comparison-mode .section { 
        flex: 0 0 48% !important; 
        min-width: 160px !important;
        margin-bottom: 0 !important;
        padding: 8px 5px !important;
        font-size: 0.7rem !important;
    }

    /* ?�신??�?결합 ?�인 ?�형 버튼 (?�연??Flex 배치 �??�스??최적?? */
    .carrier-buttons, .discount-type-buttons, .payment-method-options { 
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 4px !important; 
    }

    /* 기기�??��? 방식 버튼?� ?�외?�으�???�??��? �??�이 조절 */
    .device-payment-row .payment-method-options {
        flex-wrap: nowrap !important;
    }
    .device-payment-row input.number-input,
    .device-payment-row .payment-button {
        height: 34px !important; /* 모바?�에?�는 ?�짝 ??�� */
        min-height: 34px !important;
        font-size: 0.75rem !important;
    }
    .device-payment-row .input-group label {
        font-size: 0.65rem !important;
        height: 16px !important;
    }

    /* 비교 모드????기기�??�을 ?�로�??�아 ?�역 ?�보 */
    .comparison-mode .device-payment-row {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 5px !important;
    }
    .comparison-mode .device-payment-row .input-group {
        flex: none !important;
        width: 100% !important;
    }
    .comparison-mode .device-payment-row .input-group:last-child {
        min-width: 0 !important;
    }
    .comparison-mode .device-payment-row .payment-method-options {
        width: 100% !important;
    }

    /* ?��? 개월??버튼 3??배치 (비교 모드 최적?? */
    .comparison-mode .installment-months-container {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 4px !important;
        padding: 6px !important;
    }
    .comparison-mode .installment-month-button {
        padding: 4px 2px !important;
        font-size: 0.65rem !important;
        min-height: 30px !important;
    }

    .carrier-button, .discount-button, .payment-button, .maintenance-month-button { 
        flex: 1 1 30% !important; /* 기본 3개씩, ?�으�??�게 채�? */
        min-width: 0 !important;
        min-height: 34px !important; /* ?�이 ?�간 조절 */
        padding: 4px 2px !important; 
        font-size: 0.62rem !important; 
        line-height: 1.2 !important;
        letter-spacing: -0.5px !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        text-align: center;
        white-space: normal !important; /* ?�동 줄바�??�용 */
        word-break: keep-all !important; /* ?�어 ?�위 줄바�?*/
    }
    .carrier-button img { max-height: 18px !important; max-width: 85% !important; }

    /* ?�력�?�?기�? UI 극소??*/
    .input-group label { font-size: 0.7rem !important; margin-bottom: 2px !important; }
    .input-group input, .input-group select { padding: 4px 6px !important; font-size: 14px !important; height: 30px !important; }
    .calc-button { padding: 10px !important; font-size: 0.9rem !important; border-radius: 6px !important; }
    
    /* ?�짜 계산�?모달 최적??(가�???줄이�?콤팩?�하�? */
    #dateCalcModal .modal-content {
        padding: 12px !important;
        width: 90% !important;
        max-width: 320px !important; /* ?�업 ?�체�??�게 고정 */
        max-height: 85vh !important;
        margin: 10% auto !important;
        overflow-y: auto !important;
    }
    #dateCalcModal h2 { font-size: 1rem; margin-bottom: 3px; }
    #dateCalcModal p { font-size: 0.65rem; margin-bottom: 8px; line-height: 1.2; }
    
    .date-calculator {
        display: flex !important;
        flex-direction: column !important; /* ?�로 배치�?공간 ?�약 */
        gap: 8px !important;
    }
    .date-calculator-section {
        padding: 8px !important;
        border-radius: 6px !important;
        background: #f8f9fa !important;
    }
    .date-calculator-section h3 { font-size: 0.8rem; margin-bottom: 5px; }
    .date-input-group { gap: 3px !important; }
    .date-input-group input { padding: 4px !important; font-size: 0.8rem !important; height: 28px !important; }
    .date-calculator-section .calc-button { padding: 6px !important; font-size: 0.8rem !important; margin-top: 5px !important; }
    .date-calculator-section .result { font-size: 0.8rem !important; margin-top: 5px !important; }
    .date-calculator-section .info-box { font-size: 0.65rem !important; padding: 5px !important; }
    
    /* 간편 계산�?모달 최적??*/
    #simple-calculator-content h1 { font-size: 1.2rem; margin-bottom: 10px; }
    #simple-calculator-content h2 { font-size: 0.9rem; margin-top: 15px; margin-bottom: 10px; }
    #simple-calculator-content .options-container { 
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 5px !important; 
    }
    #simple-calculator-content .option-button { 
        flex: 1 1 30% !important; 
        min-width: 0 !important;
        min-height: 35px !important; 
        padding: 5px 2px !important; 
        font-size: 0.65rem !important; 
        line-height: 1.2 !important;
        border-radius: 6px !important;
    }
    #simple-calculator-modal .simple-results-table { font-size: 0.7rem !important; }
    #simple-calculator-modal .simple-results-table th, 
    #simple-calculator-modal .simple-results-table td { padding: 6px 4px !important; }

    /* 모바???�치 즉각 반응???�한 최적??*/
    * { 
        -webkit-tap-highlight-color: transparent !important; /* ?�치 ??번쩍?�는 ?�색/?�색 ?�이?�이???�거 */
    }
    
    .choice-button { 
        transition: none !important; /* ?�니메이???�과 ?�거 */
        transform: none !important;
    }
    
    /* 모바???�치 ??버튼 ?�상 변??방�? */
    .choice-button:hover, .choice-button:active { 
        background-color: #f4f8ff !important; 
        color: #1a73e8 !important;
        transition: none !important;
    }
    
    /* ?�신??버튼: ?�택 ???�두리만 ?��???(기존 ?��???복구) */
    .carrier-button.active {
        background-color: #fff !important;
        border: 2px solid #1a73e8 !important;
        color: #333 !important;
        font-weight: bold !important;
    }
    
    /* 기�? 버튼?�의 ?�버 ?�과 ?�거 (?�치 지??방�?) */
    .payment-button:not(.active):hover, 
    .discount-button:not(.active):hover, 
    .option-button:not(.active):hover { 
        background-color: transparent !important; 
    }
    
    /* 계산 버튼?� ?�버 ?�에??배경???��? */
    .calc-button:hover {
        background-color: #1a73e8 !important; /* ?�래 ?�상 ?��? */
        color: #fff !important;
    }
    
    /* ?�치 ?�드백만 ?�짝 (?�르???�낌�??��?) */
    .choice-button:active, .carrier-button:active, .payment-button:active {
        opacity: 0.85;
        transform: scale(0.98);
    }

    /* 결합?�인 ?�세?�보 모달 ?�스??축소 */
    #combinationInfoModal .modal-content { width: 95% !important; padding: 0 !important; }
    .combination-table-wrapper h3 { font-size: 0.85rem !important; margin-bottom: 5px !important; padding-left: 8px !important; }
    .combination-table { font-size: 0.65rem !important; }
    .combination-table th, .combination-table td { padding: 5px 2px !important; line-height: 1.1 !important; }
    .combination-content { padding: 10px !important; max-height: 70vh !important; }

    /* ?별 ?금??(1~24개월) 모바??최적??*/
    .monthly-table {
        font-size: 0.65em !important; /* 글??기 ???축소 */
        width: 100% !important; /* 화면 너비에 꽉 맞춤 */
        max-width: 100% !important;
        margin: 0 auto !important;
        table-layout: fixed !important; /* 열 너비를 강제로 고정하여 5열 모두 표시 */
        border-collapse: collapse !important;
        box-sizing: border-box !important;
    }

    .monthly-table-wrapper {
        width: 100% !important;
        overflow-x: hidden !important; /* 가로 스크롤 강제 제거 */
        padding: 0 !important;
        margin: 15px 0 !important;
        box-sizing: border-box !important;
    }

    /* 단독 모드일 때만 콤팩트하게 축소 */
    .monthly-table.single-mode-table {
        width: auto !important;
        min-width: 260px !important;
        table-layout: auto !important;
    }

    .monthly-table th, .monthly-table td {
        padding: 4px 1px !important; /* 패딩을 극단적으로 줄여 공간 확보 */
        width: auto !important;
        white-space: nowrap !important;
        text-align: center !important;
        overflow: hidden;
        text-overflow: clip;
        box-sizing: border-box !important;
    }

    /* 개월?컬럼 ?비 고정 */
    .monthly-table th:first-child, .monthly-table td:first-child {
        width: 30px !important; 
        min-width: 30px !important;
    }

    /* 비교 모드에서 각 금액 열 너비 균등 배분 */
    .monthly-table:not(.single-mode-table) th, 
    .monthly-table:not(.single-mode-table) td {
        width: calc((100% - 30px) / 4) !important;
    }

    /* 통신사 선택 버튼은 항상 3열 고정 (SK, KT, LG) */
    .carrier-buttons {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 6px !important;
        width: 100% !important;
        margin-bottom: 8px !important;
    }

    .carrier-buttons button {
        width: 100% !important;
        flex: none !important; /* flex 무시하고 grid 전용 배치 */
        min-width: 0 !important;
        padding: 10px 2px !important;
        font-size: 0.8rem !important; /* 통신사 로고나 텍스트가 잘 보이게 */
    }

    /* 인터넷 계산기 전용 버튼 유연한 배치 (2x2 또는 3x1) - 타 페이지 간섭 방지 */
    #carrier-1-section .payment-method-options, 
    #carrier-2-section .payment-method-options,
    #carrier-1-section .discount-type-buttons,
    #carrier-2-section .discount-type-buttons,
    #plan-change-options-1 .payment-method-options,
    #plan-change-options-2 .payment-method-options {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
        width: 100% !important;
        margin-bottom: 5px;
    }

    #carrier-1-section .payment-method-options button, 
    #carrier-2-section .payment-method-options button,
    #carrier-1-section .discount-type-buttons button,
    #carrier-2-section .discount-type-buttons button,
    #plan-change-options-1 .payment-method-options button,
    #plan-change-options-2 .payment-method-options button {
        flex: 1 1 calc(33.33% - 10px) !important;
        min-width: 80px !important;
        padding: 6px 2px !important; 
        font-size: 0.68rem !important;
        margin: 0 !important;
        letter-spacing: -0.6px !important;
        line-height: 1.1 !important;
        word-break: break-all !important;
        white-space: normal !important;
        height: auto !important;
        min-height: 44px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        box-sizing: border-box !important;
    }

    /* 누적 금액 컬럼 강조 및 텍스트 정렬 */
    .monthly-table td:nth-child(even) {
        background-color: rgba(0,0,0,0.02); /* 가독성을 위한 미세한 배경색 */
    }

    /* 공�??�항 ?�이지 최적??*/
    .notice-link-item { padding: 0.8rem 1rem !important; }
    .notice-link-item h2 { font-size: 0.95rem !important; }
    .notice-link-item p { font-size: 0.75rem !important; }
    
    #notice-title { font-size: 1.25rem !important; margin-bottom: 0.5rem !important; }
    #notice-date { font-size: 0.75rem !important; margin-bottom: 1rem !important; padding-bottom: 1rem !important; }
    .ql-editor { font-size: 0.85rem !important; line-height: 1.5 !important; padding: 0 !important; }
    
    .bg-indigo-600 { padding: 6px 12px !important; font-size: 0.8rem !important; }
    h1.text-3xl { font-size: 1.5rem !important; }

    .footer-container { margin-top: 10px !important; padding-bottom: 20px !important; font-size: 0.7rem !important; }
}

/* 복�??�인 ?�내 모달 ?��???*/
.welfare-guide-section {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #eee;
    margin-bottom: 15px;
}
.welfare-step {
    font-size: 1.05em;
    margin: 10px 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.step-badge {
    background: #e8f0fe;
    color: #1a73e8;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
    border: 1px solid #1a73e8;
}
.welfare-desc {
    font-size: 0.9em;
    color: #666;
    margin: 5px 0 0 5px;
    line-height: 1.5;
}

/* 복�??�인 ?�터?�티�??��???*/
.welfare-step-title {
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 15px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}
.welfare-step-title span {
    background: #1a73e8;
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
}
.welfare-carrier-btn {
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: popIn 0.4s ease backwards;
}
.welfare-carrier-btn:nth-child(1) { animation-delay: 0.1s; }
.welfare-carrier-btn:nth-child(2) { animation-delay: 0.2s; }
.welfare-carrier-btn:nth-child(3) { animation-delay: 0.3s; }

.welfare-carrier-btn.active {
    border-color: #1a73e8;
    background-color: #e8f0fe;
    box-shadow: 0 0 0 2px #1a73e8;
    transform: scale(1.05);
}

/* 결합 ?�품 버튼 �?복�? ?�형 버튼 ?�니메이??*/
.welfare-combo-btn, .welfare-type-btn {
    animation: popIn 0.4s ease backwards;
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ?�계 컨테?�너가 ?��????�의 ?�니메이??*/
#welfare-combo-selection, #welfare-type-selection, #welfare-detail-result {
    animation: fadeInSlide 0.5s ease-out forwards;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.welfare-type-btn {
    padding: 12px 8px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95em;
    font-weight: 500;
    white-space: normal;
    word-break: keep-all;
    line-height: 1.3;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    text-align: center;
}
.welfare-type-btn:hover { background: #f8f9fa; }
.welfare-type-btn.active {
    background: #1a73e8;
    color: #fff;
    border-color: #1a73e8;
}

.welfare-result-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}
.welfare-example-card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    background: #fff;
    border: 1px solid #eee;
}
.welfare-example-card.high .card-header { background: #e3f2fd; color: #1a73e8; border-bottom: 1px solid #bbdefb; }
.welfare-example-card.low .card-header { background: #f1f8e9; color: #388e3c; border-bottom: 1px solid #dcedc8; }
.card-header { padding: 10px 15px; font-weight: bold; font-size: 0.9em; }
.card-body { padding: 20px; }
.card-body h5 { margin: 0 0 5px 0; font-size: 1.2em; color: #333; }
.base-fee { font-size: 0.95em; color: #666; margin-bottom: 15px; }

/* 복�??�인 ?�세 ?�술???��???*/
.narrative-container {
    background: #fdfdfd;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 12px;
    margin: 15px 0;
    font-size: 0.9em;
    word-break: keep-all;
    overflow-wrap: break-word;
}
.narrative-step {
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
    line-height: 1.5;
    color: #444;
    opacity: 0; /* 초기 ?�태: ?�명 */
    transform: translateY(10px); /* 초기 ?�태: ?�간 ?�래 */
    animation: fadeInUp 0.4s ease forwards;
}

/* 복�??�인 ?�레?�션 ?�크모드 */
body.dark-mode .narrative-container {
    background-color: #111827 !important;
    border-color: #374151 !important;
}

body.dark-mode .narrative-step {
    color: #e5e7eb !important;
    border-bottom-color: #374151 !important;
}

body.dark-mode .narrative-step strong {
    color: #ffffff !important;
}

body.dark-mode .narrative-step .step-num {
    background-color: #4b5563 !important;
    color: #ffffff !important;
}

body.dark-mode .narrative-step.final {
    border-top-color: #4b5563 !important;
    color: #ffffff !important;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.narrative-step:nth-child(1) { animation-delay: 0.1s; }
.narrative-step:nth-child(2) { animation-delay: 0.3s; }
.narrative-step:nth-child(3) { animation-delay: 0.5s; }
.narrative-step:nth-child(4) { animation-delay: 0.7s; }
.narrative-step:nth-child(5) { animation-delay: 0.9s; }
.narrative-step:nth-child(6) { animation-delay: 1.1s; }

.narrative-step:last-child { border-bottom: none; }
.narrative-step .step-num {
    display: inline-block;
    width: 18px;
    height: 18px;
    background: #777;
    color: #fff;
    border-radius: 50%;
    text-align: center;
    line-height: 18px;
    font-size: 0.75em;
    margin-right: 6px;
    vertical-align: middle;
}
.narrative-step.final .step-num { background: #d32f2f; }
.narrative-step.final {
    border-top: 1px solid #ddd;
    margin-top: 5px;
    padding-top: 10px;
    color: #000;
}
.minus-val { color: #d93025; font-weight: bold; }

.order-info { background: #f8f9fa; padding: 8px; border-radius: 4px; font-size: 0.85em; color: #555; margin-bottom: 15px; border-left: 3px solid #ddd; }
.card-body ul { list-style: none; padding: 0; margin: 0 0 20px 0; }
.card-body li { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 0.95em; }
.card-body li .label { color: #777; }
.card-body li .val { font-weight: bold; color: #d93025; }
.total-row { border-top: 2px solid #eee; padding-top: 15px; font-weight: bold; font-size: 1.1em; display: flex; justify-content: space-between; align-items: center; }
.total-row span { color: #1a73e8; font-size: 1.2em; }

/* 결합 ?�품 버튼 ?�용 ?��???*/
.welfare-combo-btn {
    border-color: #e0e0e0;
    background: #fafafa;
}
.welfare-combo-btn.active {
    background: #34a853; /* 결합 버튼?� 초록?�으�?구분 */
    color: #fff;
    border-color: #34a853;
}

@media (max-width: 600px) {
    .welfare-result-container { grid-template-columns: 1fr; }
}



/* 복�??�인 ???��???*/
.welfare-tab-content {
    display: none;
}
.welfare-tab-content.active {
    display: block;
}
.formula-box {
    background: #f1f3f4;
    padding: 10px;
    border-radius: 5px;
    font-family: inherit;
    font-size: 0.95em;
    margin: 15px 0;
    border-left: 4px solid #5f6368;
}
.example-box {
    background: #fff8e1;
    padding: 15px;
    border-radius: 8px;
    border: 1px dashed #ffc107;
    margin-top: 15px;
}
.example-box ul {
    margin: 10px 0 0 20px;
    padding: 0;
}
.example-box li {
    margin-bottom: 5px;
    font-size: 0.9em;
}

/* ======================================================= */
/* ?�▼??[?�정?? 모바??결과 ?�면 ?��???개선 ?�▼??*/
/* ======================================================= */

/* 결과 ?�약 ?�스??기본 ?��???(PC) */
.result-summary-text {
    font-size: 1.2em;
    font-weight: bold;
}

/* 모바???�면 (768px ?�하) ?�??*/
@media (max-width: 768px) {
    /* 결과 요약 섹션: 비교 시 2열, 단독 시 1열 자동 조정 */
    #result-summary-section {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
        gap: 8px !important;
        padding: 10px 5px !important;
        width: 100% !important;
    }

    .result-summary-text {
        font-size: 0.8em !important;
        margin: 0 !important;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 8px 4px !important;
        background-color: rgba(0,0,0,0.03);
        border-radius: 8px;
        min-width: 0 !important;
    }

    body.dark-mode .result-summary-text {
        background-color: rgba(255,255,255,0.05);
    }
    
    /* 요금제 이름 (strong 태그) */
    .result-summary-text strong {
        font-size: 0.75em !important; /* 레이블 크기 약간 더 축소 */
        margin-bottom: 5px;
        word-break: keep-all; /* 공백 기준 줄바꿈 */
        line-height: 1.2;
        display: block;
        width: 100%;
        text-align: center;
        white-space: normal !important;
    }

    /* 결과값(span 태그) 글자 축소 및 강조 */
    #storeTotal, #unlockedTotal, #carrier1-total, #carrier2-total {
        font-size: 1.05em !important; 
        font-weight: bold;
        color: #1a73e8;
        display: block;
        width: 100%;
        text-align: center;
        word-break: break-word;
    }

    /* 계산?�기 버튼 ?�라�?방�? (강력?�게 ?�용) */
    #mainCalcButton {
        /* display: block !important; ?�거??- JS ?�어 ?�름 */
        position: relative;
        z-index: 9999; /* ?�이??최상??*/
        margin-top: 20px;
        opacity: 1 !important;
        visibility: visible !important;
        width: 100% !important; /* 가�?�?차게 */
        background-color: #1a73e8 !important; /* 배경??강제 지??*/
        color: white !important; /* 글?�색 강제 지??*/
        padding: 15px !important; /* ?�딩 ?�보 */
    }

    /* 인터넷 결과 카드/표 전용 최적화 */
    .monthly-table-wrapper {
        overflow-x: auto !important; /* 가로 스크롤 명시 */
        -webkit-overflow-scrolling: touch;
        margin-bottom: 20px;
    }

    /* 인터넷 표 헤더 글자 크기 추가 축소 */
    .result-table th {
        font-size: 0.9em !important;
        white-space: nowrap !important;
    }

    #discount-breakdown {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
        gap: 8px !important;
        justify-content: center !important;
        align-items: stretch !important;
        overflow: visible !important;
        padding-top: 15px !important;
    }

    .breakdown-card {
        padding: 8px 4px !important;
        font-size: 0.62em !important;
        margin: 0 !important;
        border-radius: 6px !important;
        display: flex;
        flex-direction: column;
        min-width: 0 !important;
        height: 100%;
    }

    /* 카드 요소 축소 */
    .breakdown-card h5 {
        font-size: 0.85em !important;
        margin: 2px 0 !important;
    }

    .breakdown-card li {
        padding: 1px 0 !important;
        line-height: 1.1 !important;
        font-size: 0.95em !important;
    }

    .breakdown-card .total-cost-section strong {
        font-size: 1.05em !important; /* 총금액 글자 크기 더 축소 */
        margin-top: 2px !important;
        word-break: keep-all;
    }

    .breakdown-card .total-cost-section p {
        font-size: 0.8em !important; /* "총 비용" 라벨 축소 */
        margin: 0 !important;
    }

    .breakdown-card .device-price-section strong {
        font-size: 0.95em !important;
    }

    /* 인터넷/기타 요약 총액 영역 글자 축소 */
    .summary-total {
        font-size: 0.9em !important;
    }

    .summary-total strong {
        font-size: 1.05em !important;
        word-break: keep-all;
    }
    .winner-badge {
        padding: 2px 5px !important;
        font-size: 0.65em !important;
        top: -12px !important; /* ?�로 조금 ???�림 */
        right: 0 !important; /* ?�른�??�에 맞춤 */
        border-radius: 4px !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.2) !important;
    }

    /* ?�▼??복�??�인 모달 모바??최적??(?�규 추�?) ?�▼??*/
    
    /* 1. 버튼 3??배치 (??줄에 3개씩) */
    .welfare-type-buttons, #welfare-combo-buttons {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important; /* 3??강제 */
        gap: 5px !important;
    }

    /* 버튼 글???�기 축소 */
    .welfare-type-btn, .welfare-combo-btn {
        padding: 8px 2px !important;
        font-size: 0.7em !important; /* 글???�기 줄임 */
        min-height: 40px !important; /* ?�이 줄임 */
        line-height: 1.2 !important;
    }

    /* 2. 결과 카드 좌우 배치 (비교 상태 시 자동 대응) */
    .welfare-result-container {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
        gap: 8px !important;
        margin-top: 15px !important;
    }

    /* 결과 카드 ?��? ?��???축소 */
    .welfare-example-card {
        border-radius: 8px !important;
        font-size: 0.75em !important; /* ?�체 글�?축소 */
    }

    .card-header {
        padding: 8px 5px !important;
        font-size: 0.9em !important;
        text-align: center;
        white-space: nowrap;
    }

    .card-body {
        padding: 10px 5px !important;
    }

    .card-body h5 {
        font-size: 1.1em !important;
        margin-bottom: 5px !important;
        text-align: center;
    }

    .base-fee {
        font-size: 0.9em !important;
        margin-bottom: 8px !important;
        text-align: center;
    }

    .card-body ul {
        margin: 0 !important;
        padding: 0 !important;
    }

    .card-body li {
        font-size: 0.9em !important;
        margin-bottom: 4px !important;
    }

    .total-row {
        padding-top: 8px !important;
        font-size: 1em !important;
        flex-direction: column !important; /* 총액 부분�? 공간 부�????�아?�로 */
        align-items: flex-end !important;
    }
    
    .total-row span {
        font-size: 1.2em !important;
    }
}

/* PC 버전 ?�용 맨위�?버튼 ?��???*/
.pc-scroll-top-container.fixed {
    position: fixed;
    bottom: 50px;
    right: calc(50% - 600px); /* 중앙 컨테?�너 ?�에 ?�치?�도�?조정 (컨테?�너 ?�비???�라 조절 가?? */
    z-index: 1000;
    display: none; /* ?�크립트�??�어 */
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* ?�면???�아?�서 버튼??컨테?�너?� 겹칠 경우�??��?*/
@media (max-width: 1300px) {
    .pc-scroll-top-container.fixed {
        right: 20px;
    }
}

.pc-scroll-top-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    background-color: white; /* 가?�성???�해 배경??추�? */
    border: 2px solid #ff4d4f; /* 붉�????�모�?*/
    border-radius: 8px;
    color: #ff4d4f; /* 붉�? 글??*/
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    font-weight: bold;
    gap: 5px;
}

.pc-scroll-top-btn:hover {
    background-color: #fff1f0;
    transform: translateY(-5px);
}

.pc-scroll-top-btn i {
    font-size: 24px;
}

/* 모바?에?는 ?? */
@media (max-width: 768px) {
    .pc-scroll-top-container.fixed {
        display: none !important;
    }

    /* 각종 계산기 비교 결과 카드 모바일 좌우 배치 (비교 시 자동 대응) */
    .installation-fee-comparison {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
        gap: 8px !important;
        flex-wrap: nowrap !important;
    }

    .installation-fee-comparison > .result-card,
    .breakdown-card.compact,
    .carrier-breakdown-column,
    .result-card,
    .family-card-result {
        min-width: 0 !important;
        padding: 8px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    #discount-breakdown {
        flex-wrap: wrap !important; /* nowrap에서 wrap으로 변경하여 auto-fit이 작동하게 함 */
    }

    .result-breakdown {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
        gap: 8px !important;
    }
}

