/* style-pages.css - Landing, phone, modal, community, internet page styles */
/* Version: 9.9.3 (Latest Update) */

/* ================================== */
/* ======== index.html (?�딩) ======== */
/* ================================== */
.landing-container { 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    width: 100%; 
    min-height: 100vh; 
    background: linear-gradient(135deg, #f8faff 0%, #e8f0fe 100%); 
    text-align: center;
    padding: 30px 20px;
    box-sizing: border-box;
}
.landing-content { max-width: 800px; width: 100%; }
.hero-section { margin-bottom: 35px; }
.landing-logo { 
    max-width: 350px; 
    width: 90%; 
    margin-bottom: 20px; 
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.08)); 
    cursor: default;
}
.landing-logo:hover {
    transform: none;
}
.hero-title { 
    font-size: 2rem; 
    font-weight: 800; 
    color: #1e293b; 
    line-height: 1.2; 
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}
.hero-subtitle { 
    font-size: 1rem; 
    color: #64748b; 
    line-height: 1.5;
    margin-bottom: 0;
}
.hero-subtitle__tail { display: inline; }
.hero-title__tail { display: inline; } /* 모바일에선 block — 쉼표 뒤에서 정확히 줄바꿈 (2026-08-05) */

.landing-grid { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 16px; 
    margin-bottom: 30px;
}

.menu-card {
    display: flex;
    flex-direction: column; /* 가로에서 세로 배치로 변경하여 중앙 정렬 강조 */
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    background: white;
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
    border: 1px solid rgba(226, 232, 240, 0.8);
    text-align: center; /* 텍스트 중앙 정렬 */
    height: 100%;
    box-sizing: border-box;
}

.menu-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 20px -5px rgba(0,0,0,0.08);
    border-color: #1a73e8;
}

.card-icon {
    width: 56px; /* 아이콘 크기 약간 확대 */
    height: 56px;
    background: #f0f7ff;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px; /* 세로 배치이므로 아래쪽 여백 */
    margin-right: 0; /* 기존 가로 배치 여백 제거 */
    color: #1a73e8;
    font-size: 1.6rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.card-icon i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.menu-card:hover .card-icon {
    background: #1a73e8;
    color: white;
}

.card-info {
    display: flex;
    flex-direction: column;
    align-items: center; /* 내부 요소 가로 중앙 정렬 */
    justify-content: center;
}

.card-info h3 { 
    font-size: 1.1rem; 
    font-weight: 700; 
    color: #1e293b; 
    margin: 0 0 8px 0; 
    line-height: 1.3;
}
.card-info p { 
    font-size: 0.85rem; 
    color: #64748b; 
    margin: 0; 
    line-height: 1.5;
    word-break: keep-all; /* 한글 줄바꿈 최적화 */
}

.landing-footer {
    color: #94a3b8;
    font-size: 0.8rem;
}
/* 폴드 펼침 세로(폭 600~768px): 첫 화면이 스크롤 없이 꽉 차면서 푸터 링크가
   화면 최하단 0px에 붙어, 실기기에선 제스처 바·브라우저 툴바가 터치를 가로채
   "클릭이 안 되는" 문제(2026-08-11 사장님 제보 — 바형 86px·가로는 스크롤이라 무증상,
   헤드리스는 브라우저 UI가 없어 재현 불가였음). 하단 여유를 강제로 확보한다. */
@media screen and (min-width: 600px) and (max-width: 768px) {
    .landing-footer {
        padding-bottom: calc(44px + env(safe-area-inset-bottom, 0px));
    }
}

/* 모바일 대응 */
@media screen and (max-width: 640px) {
    .hero-title { font-size: 1.8rem; }
    .landing-grid { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 12px; 
    }
    .hero-section { margin-bottom: 30px; }
    .menu-card { 
        padding: 20px 10px; 
    }
    .card-icon {
        width: 48px;
        height: 48px;
        font-size: 1.3rem;
        margin-bottom: 10px;
    }
    .card-info h3 {
        font-size: 0.95rem;
    }
    .card-info p {
        font-size: 0.75rem;
    }
}

/* 폰82 랜딩 페이지 다크모드 적용 */
body.dark-mode .landing-container {
    background: radial-gradient(circle at top, #1e293b 0%, #0f172a 100%) !important;
}
body.dark-mode .hero-title { color: #f8fafc; }
body.dark-mode .hero-subtitle { color: #94a3b8; }
body.dark-mode .menu-card {
    background: #1e293b;
    border-color: #334155;
}
body.dark-mode .menu-card:hover {
    border-color: #3b82f6;
    background: #232f45;
}
body.dark-mode .card-info h3 { color: #f1f5f9; }
body.dark-mode .card-info p { color: #94a3b8; }
body.dark-mode .card-icon { background: #0f172a; color: #3b82f6; }
body.dark-mode .menu-card:hover .card-icon { background: #3b82f6; color: white; }
body.dark-mode .landing-logo {
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.1));
}

/* ================================== */
/* == index.html 랜딩 벤토 개편 (2026-07, 참고용.png 시안 기준) == */
/* 흰 카드 + 보라(#9750F9)→파랑(#4D8DFF) 그라디언트 포인트.            */
/* 계산기 일러스트는 고해상도 투명 PNG, 차트는 선명한 코드 기반 그래픽 사용. */
/* 기존 .menu-card/.landing-grid는 사용 중단(마크업에서 제거됨).       */
/* .card-icon 계열은 phone.html 선택 화면(.choice-card)이 쓰므로 유지. */
/* ================================== */
.landing-container {
    /* 라벤더빛 회색 바탕 + 로고 뒤 은은한 글로우 */
    background: radial-gradient(ellipse 640px 380px at 50% 140px, #ffffff 0%, #f4f3f6 72%);
}
.landing-content { max-width: 1040px; }
.landing-logo { max-width: 260px; margin-bottom: 14px; }
.hero-section { margin-bottom: 26px; }
.hero-title { font-size: 1.55rem; }
.hero-subtitle { font-size: 0.95rem; }

/* 다크모드 토글: 2026-07-21 개편으로 전 페이지 공통 슬라이딩 스위치 —
   랜딩 전용 흰 카드 버튼 오버라이드를 제거해 index도 동일한 스위치를 쓴다. */

.bento-grid {
    display: grid;
    gap: 16px;
    margin-bottom: 34px;
    grid-template-columns: repeat(4, 1fr);
    grid-template-areas:
        "feat feat live live"
        "feat feat net  notice";
    grid-template-rows: minmax(218px, auto) minmax(152px, auto);
    text-align: left;
}
.tile {
    border-radius: 22px;
    padding: 26px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(76, 60, 140, 0.12);
}
.tile h2, .tile h3 { margin: 0; letter-spacing: -0.01em; }
.tile p { margin: 0; }
/* 전역 h2/h3 가운데 정렬의 영향을 받지 않도록 타일 내부는 왼쪽 정렬로 고정 */
.tile h2, .tile h3, .tile p { text-align: left; }

/* ---- 큰 타일: 흰 카드 + 3D 계산기 일러스트 ---- */
.tile-feature {
    grid-area: feat;
    position: relative;
    background: #fff;
    border: 1px solid #ecebf2;
    box-shadow: 0 6px 24px rgba(60, 60, 90, 0.06);
    color: #171c28;
    justify-content: space-between;
    min-height: 386px;
    overflow: hidden;
}
.tile-kicker {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #9750f9;
}
.tile-kicker .spark { font-size: 0.85em; margin-right: 2px; }
.tile-feature h2 {
    margin: 12px 0 10px;
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.32;
    color: #171c28;
}
/* "유리한" 강조: 보라→파랑 그라디언트 텍스트 */
.grad-text {
    background: linear-gradient(90deg, #9750f9, #4d8dff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #7c5cfa; /* 미지원 브라우저 폴백 */
}
.tile-feature p { font-size: 0.98rem; font-weight: 500; color: #6b7280; }
.tile-feature-bottom {
    border-top: 1px solid #eef0f4;
    margin-top: 20px;
    padding-top: 18px;
    /* 오른쪽의 일러스트와 겹치지 않게 CTA 영역 확보 */
    padding-right: 210px;
}
.tile-cta {
    align-self: flex-start;
    width: fit-content;          /* 글자 길이만큼만 — 버튼이 넓게 퍼지지 않도록 고정 */
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
    background: linear-gradient(90deg, #8b5cf6, #4c8dff);
    color: #fff;
    padding: 11px 22px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: 0 6px 16px rgba(124, 92, 246, 0.35);
    transition: box-shadow 0.2s ease, filter 0.2s ease;
}
.tile-feature:hover .tile-cta { filter: brightness(1.06); box-shadow: 0 8px 20px rgba(124, 92, 246, 0.45); }
/* 폴드 펼침 화면에서는 일러스트가 CTA를 덮지 않도록 표시 순서만 조정한다. */
@media (min-width: 641px) and (max-width: 860px) {
    .tile-cta {
        position: relative;
        z-index: 2;
    }
}
.tile-calc-art {
    position: absolute;
    right: 12px;
    bottom: -18px;
    width: 220px;
    height: auto;
    pointer-events: none;
    filter: drop-shadow(0 20px 24px rgba(44, 35, 83, 0.18));
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.tile-feature:hover .tile-calc-art { transform: translateY(-5px) rotate(1deg); }

/* ---- LIVE 타일: 라이트=흰 카드 / 다크=네이비 + 코드 기반 상승형 차트 ---- */
.tile-live {
    grid-area: live;
    flex-direction: row;
    align-items: stretch;
    gap: 20px;
    background: #fff;
    border: 1px solid #ecebf2;
    box-shadow: 0 6px 24px rgba(60, 60, 90, 0.05);
    color: #171c28;
    overflow: hidden;
}
.tile-live-info { display: flex; flex: 0 0 41%; flex-direction: column; justify-content: center; gap: 6px; min-width: 0; }
.tile-live h3 { margin-top: 4px; font-size: 1.05rem; font-weight: 800; color: #171c28; }
.tile-live p { font-size: 0.8rem; color: #6b7280; }
.market-viz {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.market-chart { display: block; width: min(100%, 238px); height: auto; overflow: visible; }
.chart-grid path { fill: none; stroke: rgba(106, 122, 157, 0.15); stroke-width: 1; stroke-dasharray: 2 7; }
.chart-specks circle { fill: #7955d9; opacity: 0.42; }
.chart-bars rect { fill: url(#marketBar); filter: drop-shadow(0 0 8px rgba(92, 76, 255, 0.64)); }
.chart-area { fill: url(#marketShade); }
.chart-line-back { fill: none; stroke: rgba(143, 92, 255, 0.32); stroke-width: 12; stroke-linejoin: round; stroke-linecap: round; }
.chart-line { fill: none; stroke: url(#marketLine); stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; }
.chart-dot-current { fill: #b54dff; stroke: #e1b8ff; stroke-width: 3; filter: url(#marketGlow); }
.live-badge {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.68rem;
    font-weight: 700;
    color: #0a9150; /* 라이트 모드: 흰 카드 위에서 대비 확보용 진한 초록 */
    background: rgba(16, 157, 88, 0.12);
    padding: 3px 10px;
    border-radius: 999px;
}
.live-badge i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #0ca35a;
    animation: livePulse 1.6s ease-in-out infinite;
}
/* 게시 가능 시간(09~20시 KST) 외에는 회색 OFF 상태와 다음 시작 시간을 함께 표시한다. */
.live-badge.off {
    color: #6b7280;
    background: rgba(107, 114, 128, 0.14);
}
.live-badge.off i {
    background: #9aa4b6;
    animation: none;
}
@keyframes livePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}
@media (prefers-reduced-motion: reduce) {
    .live-badge i { animation: none; }
    .tile, .tile:hover { transition: none; transform: none; }
}

/* ---- 작은 타일: 흰 카드 + 연보라 아이콘 칩 + 원형 화살표 ---- */
.tile-small {
    position: relative;
    background: #fff;
    border: 1px solid #ecebf2;
    box-shadow: 0 6px 24px rgba(60, 60, 90, 0.05);
    color: #171c28;
    gap: 5px;
    padding-right: 44px; /* 원형 화살표 자리 (설명이 한 줄에 들어가도록 최소만) */
}
.tile-small h3 { font-size: 1rem; font-weight: 800; color: #171c28; }
.tile-small p { font-size: 0.74rem; color: #7c8598; white-space: nowrap; }
.tile-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: #efeafe;
    color: #7c5cfa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    margin-bottom: 12px;
}
.tile-icon.tile-icon-3d {
    position: relative;
    width: 76px;
    height: 68px;
    margin-bottom: 9px;
    overflow: visible;
    border-radius: 0;
    background: transparent;
    color: inherit;
    filter: drop-shadow(0 10px 12px rgba(45, 71, 125, 0.18));
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.tile-icon-3d::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('../images/landing-secondary-icons-v2.webp');
    background-repeat: no-repeat;
    background-size: 200% 100%;
}
.tile-icon-internet::before { background-position: 0 0; }
.tile-icon-notice::before { background-position: 100% 0; }
.tile-small:hover .tile-icon-3d { transform: translateY(-3px) rotate(-1deg); }
.tile-go {
    position: absolute;
    right: 18px;
    bottom: 26px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid #e5e5ee;
    background: #fff;
    color: #4b5563;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    transition: background 0.2s ease, color 0.2s ease;
}
.tile-small:hover .tile-go { background: #7c5cfa; border-color: #7c5cfa; color: #fff; }

/* ---- 푸터 장식 ---- */
.footer-ornament {
    color: #b9aef2;
    font-size: 0.8rem;
    margin-bottom: 12px;
    border-top: 1px solid #e9e7f0;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    height: 0;
}
.footer-ornament span {
    position: relative;
    top: -0.6em;
    background: #f4f3f6;
    padding: 0 12px;
}

/* 2026-08-11: 폴드 펼침 세로(641~768px 세로, CSS 폭 ~673px)를 모바일 레이아웃에 편입.
   이 구간은 PC 레이아웃이 적용되면서 첫 화면 내용(923px)이 뷰포트(835px)보다 길어져
   푸터 링크가 화면 최하단 0px에 걸림 — 실기기에선 제스처 바·브라우저 툴바가 터치를
   가로채 "이용약관 등이 안 눌리는" 문제(사장님 제보). 바형과 같은 모바일 레이아웃이면
   내용이 화면 안에 여유 있게 들어와 해결. 가로로 눕힌 폰(641~768px 가로)은 기존
   PC 레이아웃 유지를 위해 세로(portrait)일 때만 편입한다. */
@media screen and (max-width: 640px), screen and (min-width: 641px) and (max-width: 768px) and (orientation: portrait) {
    .landing-container {
        min-height: 100svh;
        align-items: center;
        padding: 16px 10px 22px;
        background: #f5f7fa;
    }
    .landing-content {
        max-width: 390px;
    }
    .hero-section {
        margin-bottom: 14px;
        padding: 0 8px;
    }
    .phone82-brand--landing {
        width: 210px;
    }
    .phone82-brand--landing .phone82-brand__bubble {
        font-size: 0.58rem;
    }
    .phone82-brand--landing .phone82-brand__wordmark {
        font-size: 1.55rem;
    }
    .phone82-brand--landing .phone82-brand__lockup {
        gap: 4px;
    }
    .phone82-brand--landing .phone82-brand__domains {
        font-size: 0.72rem;
    }
    .hero-title {
        max-width: 340px;
        margin: 14px auto 8px !important;
        font-size: 1.35rem;
        line-height: 1.24;
        letter-spacing: 0;
        word-break: keep-all;
        overflow-wrap: normal;
    }
    .hero-subtitle {
        max-width: 344px;
        margin: 0 auto;
        font-size: 0.75rem;
        line-height: 1.45;
    }
    .hero-subtitle__tail { display: block; }
    .hero-title__tail { display: block; }
    .bento-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-template-areas:
            "feat feat feat"
            "live net notice";
        grid-template-rows: 176px 112px;
        column-gap: 0;
        row-gap: 8px;
        margin-bottom: 10px;
    }
    .tile {
        padding: 10px 8px;
        border-radius: 8px;
    }
    .tile:hover {
        transform: none;
    }
    .tile-feature {
        min-height: 176px;
        height: 176px;
        padding: 14px 15px;
        border-color: #dce6f5;
        box-shadow: 0 5px 16px rgba(40, 62, 92, 0.08);
    }
    .tile-kicker {
        font-size: 0.58rem;
        color: #246fda;
    }
    .tile-feature h2 {
        width: 58%;
        margin: 6px 0 5px;
        font-size: 1.02rem;
        line-height: 1.3;
    }
    .tile-feature p {
        width: 56%;
        font-size: 0.62rem;
        line-height: 1.35;
        word-break: keep-all;
    }
    .tile-feature-bottom {
        width: 56%;
        margin-top: auto;
        padding: 7px 0 0;
        border-top: 0;
    }
    .tile-cta {
        gap: 5px;
        padding: 7px 10px;
        border-radius: 8px;
        background: #2f80ed;
        font-size: 0.64rem;
        box-shadow: 0 4px 9px rgba(47, 128, 237, 0.25);
    }
    .tile-calc-art {
        width: 142px;
        right: -2px;
        bottom: -8px;
        filter: drop-shadow(0 12px 14px rgba(44, 65, 96, 0.16));
    }

    .tile-live,
    .tile-small {
        min-width: 0;
        min-height: 112px;
        height: 112px;
        padding: 7px 5px;
        border: 1px solid #dfe5ed;
        border-radius: 0;
        background: #fff;
        box-shadow: 0 3px 10px rgba(40, 62, 92, 0.05);
        color: #171c28;
        align-items: center;
        text-align: center;
        overflow: hidden;
    }
    .tile-live {
        position: relative;
        flex-direction: column;
        gap: 2px;
        border-right: 0;
        border-radius: 8px 0 0 8px;
    }
    .tile-small[href="internet.html"] {
        border-right: 0;
    }
    .tile-small[href="noticeboard.html"] {
        border-radius: 0 8px 8px 0;
    }
    .tile-live-info {
        flex: none;
        width: 100%;
        align-items: center;
        justify-content: flex-start;
        gap: 5px;
    }
    .tile-live h3,
    .tile-small h3 {
        margin: 0;
        color: #171c28;
        font-size: 0.7rem;
        line-height: 1.22;
        text-align: center;
        word-break: keep-all;
    }
    .tile-live p,
    .tile-small p {
        margin: 0;
        padding: 0;
        color: #7c8598;
        width: 100%;
        overflow: hidden;
        font-size: 0.47rem;
        line-height: 1.25;
        text-align: center;
        white-space: nowrap;
        text-overflow: ellipsis;
    }
    .market-viz {
        order: -1;
        flex: 0 0 48px;
        width: 76px;
        min-height: 48px;
        margin: 5px auto 8px;
    }
    .market-chart {
        width: 76px;
    }
    .live-badge {
        position: absolute;
        top: 6px;
        left: 6px;
        gap: 3px;
        padding: 2px 5px;
        font-size: 0.44rem;
    }
    .live-badge i {
        width: 4px;
        height: 4px;
    }
    .tile-icon.tile-icon-3d {
        width: 56px;
        height: 50px;
        margin: 5px auto 3px;
        filter: drop-shadow(0 7px 8px rgba(45, 71, 125, 0.15));
    }
    .tile-go {
        display: none;
    }
    .landing-footer {
        margin-top: 0;
        font-size: 0.68rem;
    }
    .landing-footer p {
        margin: 4px 0;
    }
    .landing-footer .footer-ornament {
        margin-bottom: 9px;
    }

    body:has(.landing-container) #popup-notice-reopen-btn {
        position: static;
        inset: auto;
        z-index: auto;
        align-items: center;
        justify-content: center;
        gap: 6px;
        width: fit-content;
        min-height: 34px;
        margin: 0 auto 12px;
        padding: 7px 12px;
        border: 1px solid #d8e2f0;
        border-radius: 8px;
        background: #fff;
        color: #276fc9;
        font-size: 0.68rem;
        box-shadow: 0 3px 8px rgba(40, 62, 92, 0.1);
    }
    body:has(.landing-container) #popup-notice-reopen-btn.show {
        display: inline-flex;
    }
    body.dark-mode:has(.landing-container) #popup-notice-reopen-btn {
        border-color: #3b475a;
        background: #202938;
        color: #8ec5ff;
    }

    body.dark-mode .tile-live h3 { color: #f1f5f9; }
    body.dark-mode .tile-live p { color: #94a3b8; }

    body:has(.landing-container) .top-right-buttons {
        top: 8px !important;
        right: 8px !important;
        transform: none !important;
    }
    /* 다크모드 토글: 2026-07-21 개편으로 전 페이지 공통 슬라이딩 스위치 —
       예전 42px 사각(☾/☀) 강제 블록을 제거해 모바일 index도 동일한 스위치를 쓴다. */
}

/* ---- 벤토 다크모드 ---- */
body.dark-mode .tile-feature {
    background: #1e2434;
    border-color: #2b3242;
    box-shadow: none;
}
body.dark-mode .tile-feature h2 { color: #f1f5f9; }
body.dark-mode .tile-feature p { color: #94a3b8; }
body.dark-mode .tile-feature-bottom { border-top-color: #2b3242; }
body.dark-mode .tile-calc-art { filter: drop-shadow(0 22px 28px rgba(0, 0, 0, 0.48)); }
body.dark-mode .tile-small {
    background: #1e293b;
    border-color: #334155;
    box-shadow: none;
}
body.dark-mode .tile-small h3 { color: #f1f5f9; }
body.dark-mode .tile-small p { color: #94a3b8; }
body.dark-mode .tile-icon { background: #2a2d4a; color: #a78bfa; }
body.dark-mode .tile-icon.tile-icon-3d { background: transparent; filter: drop-shadow(0 12px 14px rgba(0, 0, 0, 0.38)); }
body.dark-mode .tile-go { background: #1e293b; border-color: #334155; color: #cbd5e1; }
body.dark-mode .tile-small:hover .tile-go { background: #7c5cfa; border-color: #7c5cfa; color: #fff; }
body.dark-mode .tile-live { background: #141b2a; border: 1px solid #232a44; box-shadow: none; }
body.dark-mode .tile-live h3 { color: #fff; }
body.dark-mode .tile-live p { color: #99a2b5; }
body.dark-mode .live-badge { color: #3ddc84; background: rgba(61, 220, 132, 0.12); }
body.dark-mode .live-badge i { background: #3ddc84; }
body.dark-mode .live-badge.off { color: #9aa4b6; background: rgba(154, 164, 182, 0.16); }
body.dark-mode .live-badge.off i { background: #9aa4b6; }
body.dark-mode .tile:hover { box-shadow: 0 16px 32px rgba(0, 0, 0, 0.45); }
body.dark-mode .footer-ornament { border-top-color: #2b3242; color: #6d5fb0; }
body.dark-mode .footer-ornament span { background: #0f172a; }


/* ================================== */
/* ======== phone.html 개편 ======== */
/* ================================== */
.page-header {
    text-align: center;
    padding: 40px 0 20px 0;
    margin-bottom: 30px;
}
.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}
.page-logo {
    max-width: 350px; /* 로고 크기 적정 수준으로 조정 */
    width: 90%; /* 모바일 대응 */
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.08)); 
    cursor: default; /* 클릭 불가 표시 */
}
.page-logo:hover {
    transform: none;
}
/* [2026-07-27] line-height를 숫자로 고정한 이유 — 새로고침 때 화면이 튀던 문제.
   line-height: normal은 "폰트가 스스로 정한 줄 높이"를 쓴다. 그래서 웹폰트(Pretendard)가
   도착하기 전에는 대체 폰트(맑은고딕 등) 기준으로 h1이 47px, 도착한 뒤에는 42px이 되어
   헤더가 7px 줄고 그 아래 선택 카드 전체가 위로 튀었다(새로고침마다 반복 = "들쭉날쭉").
   숫자 line-height는 글자 크기 × 배수로 계산되어 어떤 폰트가 렌더되든 박스 높이가 같다.
   1.2는 Pretendard 적용 상태의 실측 비율(42/35.2 = 1.193)에 맞춘 값이라 최종 모양은 그대로다.
   폰트 크기에 비례하므로 반응형에도 안전하다. */
.header-info h1 {
    font-size: 2.2rem; /* 제목 크기도 로고에 맞춰 확대 */
    font-weight: 800;
    line-height: 1.2;
    color: #1e293b;
    margin: 10px 0 5px 0;
}
.header-info p {
    font-size: 1rem;
    line-height: 1.2;
    color: #64748b;
    margin: 0;
}

.content-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.choice-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3열 고정 (3x3x3용) */
    gap: 16px;
    margin: 0 auto 40px auto;
    max-width: 1000px;
}

/* 인터넷 등 버튼이 적을 때 중앙 정렬을 위한 특수 클래스 */
.choice-grid.centered {
    grid-template-columns: repeat(2, 320px); /* 2개 버튼 크기 고정 */
    justify-content: center;
    max-width: 100%;
}

.choice-card {
    background: white;
    border-radius: 16px;
    padding: 24px 16px; /* 패딩 대폭 확대 */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.choice-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 30px -10px rgba(0,0,0,0.12);
    border-color: #1a73e8;
}

.choice-card .card-icon {
    width: 52px; /* 아이콘 크기 확대 */
    height: 52px;
    background: #f0f7ff;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a73e8;
    font-size: 1.4rem; /* 아이콘 폰트 확대 */
    flex-shrink: 0;
    line-height: 1;
}

.choice-card .card-icon i {
    display: flex;
    align-items: center;
    justify-content: center;
}

.choice-card .card-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

.choice-card .card-info strong {
    font-size: 1.05rem; /* 제목 크기 시원하게 확대 */
    color: #1e293b;
    line-height: 1.3;
    word-break: keep-all;
    font-weight: 700;
}

.choice-card .card-info span {
    font-size: 0.85rem; /* 설명 크기 확대 */
    color: #64748b;
    line-height: 1.4;
    word-break: keep-all;
}

/* 위약금 계산기 강조 스타일 */
.choice-card.highlight-card {
    border-color: #f59e0b;
    background-color: #fffbeb;
}
.choice-card.highlight-card .card-icon {
    background-color: #fef3c7;
    color: #d97706;
}
.choice-card.highlight-card .card-info strong {
    color: #92400e;
}

/* 모바일 전용 3열 그리드 배치 및 크기 조정 */
@media screen and (max-width: 640px) {
    .choice-grid {
        grid-template-columns: repeat(3, 1fr) !important; /* 기본 3열 (phone.html용) */
        gap: 8px;
    }
    
    /* 인터넷 페이지 등 중앙 정렬용 모바일 대응 */
    .choice-grid.centered {
        grid-template-columns: repeat(2, 1fr) !important; /* 모바일에서 2열로 정렬 */
        justify-content: center;
        max-width: 100%;
    }

    .choice-card {
        padding: 15px 4px; 
        gap: 6px;
        border-radius: 10px;
    }
    .choice-card .card-icon {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
    }
    .choice-card .card-info strong {
        font-size: 0.75rem; /* 3열에 맞춰 제목 축소 */
        letter-spacing: -0.02em;
    }
    .choice-card .card-info span {
        font-size: 0.6rem; /* 3열에 맞춰 설명 축소 */
        display: block;
        /* 접근성: opacity 0.8이 색을 연하게 만들어 4.5:1 대비 미달 -> 제거 */
    }
}

/* 다크모드 강조 카드 대응 */
body.dark-mode .choice-card.highlight-card {
    background: #451a03;
    border-color: #b45309;
}
body.dark-mode .choice-card.highlight-card .card-icon {
    background: #78350f;
    color: #fbbf24;
}
body.dark-mode .choice-card.highlight-card .card-info strong {
    color: #fef3c7;
}

/* 다크모드 대응 */
body.dark-mode .header-info h1 { color: #f8fafc; }
body.dark-mode .header-info p { color: #94a3b8; }
body.dark-mode .choice-card {
    background: #1e293b;
    border-color: #334155;
}
body.dark-mode .choice-card .card-info strong { color: #f1f5f9; }
body.dark-mode .choice-card .card-info span { color: #94a3b8; }
body.dark-mode .choice-card .card-icon { background: #0f172a; }

.page-footer { 
    margin-top: 50px;
    padding: 30px 20px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
    color: #94a3b8;
    font-size: 0.85rem;
}

.footer-contact {
    margin-top: 8px;
}

.footer-contact a {
    color: #1a73e8;
    text-decoration: none;
    font-weight: 500;
}

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

/* 푸터 이용약관·개인정보처리방침 링크 — 연한 색으로 본문과 구분 */
.footer-legal {
    margin-top: 6px;
    font-size: 0.78rem;
}
.footer-legal a {
    color: #8a94a6;
    text-decoration: none;
    /* 모바일 탭 표적 확대(15px→39px) — 패딩만큼 음수 마진으로 상쇄해 겉모습은 그대로 */
    display: inline-block;
    padding: 12px 5px;
    margin: -12px -3px;
}
.footer-legal a:hover {
    color: #1a73e8;
    text-decoration: underline;
}
body.dark-mode .footer-legal a {
    color: #7b8598;
}
body.dark-mode .footer-legal a:hover {
    color: #8ec5ff;
}

/* 다크모드 대응 */
body.dark-mode .page-footer {
    border-top-color: #334155;
    color: #64748b;
}

/* ================================== */
/* ======== phone.html ????======== */
/* ================================== */
/* 계산기 활성화 시 메뉴 카드만 숨기고 상단은 유지 */
.calculator-active #calculator-choice-wrapper {
    display: none; /* 메뉴 카드만 완전 숨김 */
}

.calculator-active .page-header {
    padding: 20px 0 10px 0; /* 여백만 살짝 최적화 */
}

/* 계산기 다시 선택하기 버튼 스타일 */
.btn-back-to-menu {
    display: none; /* 기본적으로는 숨김 */
    margin-top: 15px;
    padding: 10px 20px;
    background-color: var(--primary-light, #e8f0fe);
    color: var(--primary, #1a73e8);
    border: 1px solid var(--primary, #1a73e8);
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-back-to-menu:hover {
    background-color: var(--primary, #1a73e8);
    color: white;
}

.btn-back-to-menu i {
    margin-right: 6px;
}

/* 계산기 활성화 시에만 버튼 표시 */
.calculator-active .btn-back-to-menu {
    display: inline-flex;
    align-items: center;
}

/* 헤더 내 액션 버튼 묶음 (계산기 다시 선택하기 + 일할 계산 토글) */
.header-action-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}

/* 묶음 안에서는 개별 margin-top 제거 (wrapper의 margin-top 사용) */
.header-action-buttons .btn-back-to-menu {
    margin-top: 0;
}

.header-action-buttons #prorate-option-group {
    margin: 0 !important;
}

/* 결과 섹션 위치 조정 */
#result {
    margin-top: 20px;
}

.hidden-column { display: none !important; }

/* 단독 계산 모드일 때 테이블의 4, 5번째 열 숨김 */
.single-mode-table th:nth-child(4),
.single-mode-table th:nth-child(5),
.single-mode-table td:nth-child(4),
.single-mode-table td:nth-child(5) {
    display: none !important;
}

.top-right-buttons {
    position: absolute; 
    top: 20px; 
    right: 20px; 
    z-index: 10;
    display: flex; /* Flexbox ?�이?�웃 ?�용 */
    align-items: flex-start; /* 버튼?�을 ?�쪽 기�??�로 ?�렬 */
    gap: 16px; /* 버튼 ?�이??간격 (?�하??만큼 조절) */
}
.top-left-buttons {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
    display: flex; /* 가�?배치�??�해 추�? */
    gap: 10px; /* 버튼 ?�이 간격 추�? */
}
.top-left-buttons .icon-button {
    color: #6c757d; /* 기존 ?�른�??�이콘과 ?�일???�상 */
}

.top-left-buttons .icon-button:hover {
    color: #1a73e8; /* ?�버 ???�상 변�?*/
}
.icon-button {
    display: flex;
    flex-direction: column; /* ?�이콘과 ?�스?��? ?�로�?배치 */
    align-items: center;   /* 가�?중앙 ?�렬 */
    justify-content: center; /* ?�로 중앙 ?�렬 */
    padding: 5px; /* ?�딩 추�? */
    border: none;
    background: none;
    cursor: pointer;
    width: 60px; /* 버튼???�비�??�간 ?�림 */
    color: #6c757d;
    transition: all 0.2s ease; /* 부?�러???�환 ?�과 */
    border-radius: 8px; /* ?�근 모서�?*/
}
.icon-button:hover { 
    background-color: rgba(0,0,0,0.05); /* ?�버 ???�한 배경 */
    transform: translateY(-2px); /* ?�짝 ?�오르는 ?�과 */
}

/* 메뉴 버튼 강조 ?��???(강력 추천) */
.icon-button.btn-menu {
    background-color: #1a73e8; /* 브랜???��???배경 */
    color: #ffffff; /* ?�색 글??*/
    width: 70px; /* ?�기 ?�간 ?��? */
    height: 70px;
    border-radius: 15px; /* ???�근 ?�각??*/
    box-shadow: 0 4px 15px rgba(26, 115, 232, 0.3); /* ?�른�?그림??*/
    margin-right: -5px; /* ?�측 배치�??�해 마진 조정 */
    position: relative;
    overflow: hidden;
}

.icon-button.btn-menu .hamburger-icon .bar {
    background-color: #ffffff; /* ?�색 ?�버�?�?*/
    height: 4px; /* �??�께 보강 */
}

.icon-button.btn-menu span {
    color: #ffffff;
    font-weight: bold;
    font-size: 13px;
    margin-top: 6px;
}

.icon-button.btn-menu:hover {
    background-color: #155ab6; /* ?�버 ????진한 ?�랑 */
    transform: scale(1.08); /* 마우???�리�??�짝 커짐 */
    box-shadow: 0 6px 20px rgba(26, 115, 232, 0.4);
}

/* ?�선???�는 부?�러???�림 ?�니메이??*/
@keyframes pulse-blue {
    0% { box-shadow: 0 0 0 0 rgba(26, 115, 232, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(26, 115, 232, 0); }
    100% { box-shadow: 0 0 0 0 rgba(26, 115, 232, 0); }
}

.icon-button.btn-menu {
    animation: pulse-blue 2s infinite; /* 2초마???�?�?�게 빛나???�과 */
}

/* 메뉴 ?��? ?�이�??�상 보강 */
.icon-button.btn-menu:hover .hamburger-icon .bar {
    background-color: #ffffff;
}

/* 초기??버튼 - 메뉴?� ?�일�??�는 ?�브 ?��???*/
.icon-button.btn-reset {
    background-color: #ffffff; /* 차분???�색 배경 */
    border: 1px solid #dee2e6; /* 깔끔???�두�?*/
    color: #d93025;
    width: 70px;
    height: 70px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.icon-button.btn-reset i {
    color: #d93025;
    font-size: 1.2em;
    margin-bottom: 2px;
}

.icon-button.btn-reset span {
    color: #6c757d;
    font-size: 12px;
    font-weight: 500;
}

.icon-button.btn-reset:hover {
    background-color: #fff5f5;
    border-color: #f5c6cb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.icon-button span { 
    font-size: 11px; /* 글???�기 ?�간 조정 */
    margin-top: 4px; 
    white-space: nowrap; 
    font-weight: 500; /* 글???�께 ?�간 추�? */
}
.icon-button > .fas, /* 초기???�이�?*/
.icon-button > .hamburger-icon { /* 메뉴 ?�이�?*/
    height: 24px;   /* ?�이�??�역???�이�?강제�?맞춤 */
    width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px; /* ?�이콘과 ?�스???�이 간격 */
}
.hamburger-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.hamburger-icon .bar {
    display: block;
    width: 100%;
    height: 3px; /* ?�버�?�??�께 */
    background-color: currentColor; /* ?�재 ?�스???�상???�라�?*/
    border-radius: 1px;
}
.action-buttons { position: absolute; top: 20px; left: 20px; display: flex; gap: 10px; z-index: 10; }
.action-buttons button { padding: 8px 15px; font-size: 0.9em; border-radius: 5px; border: 1px solid #1a73e8; background-color: #1a73e8; color: #fff; cursor: pointer; }
.view-mode-buttons { text-align: center; margin-bottom: 20px; }
.view-mode-buttons button { padding: 10px 20px; margin: 0 5px; border: 1px solid #1a73e8; border-radius: 5px; background-color: #fff; color: #1a73e8; font-size: 1em; cursor: pointer;}
.view-mode-buttons button.active { background-color: #1a73e8; color: #fff; }
.comparison-toggle { text-align: center; margin-bottom: 20px; }
.monthly-table { width: 100%; border-collapse: collapse; margin-top: 20px; }
.monthly-table th, .monthly-table td { border: 1px solid #ddd; padding: 8px; text-align: center; }
.monthly-table th { background: #f2f2f2; }
.monthly-table-wrapper { width: 100%; overflow-x: hidden; } /* 모바??가�??�크롤을 ?�해 추�? */

/* 월별 청구 상세내역 토글 버튼 */
.monthly-detail-toggle-wrapper {
    text-align: center;
    margin-top: 16px;
}

.monthly-detail-toggle-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background-color: var(--primary-light, #e8f0fe);
    color: var(--primary, #1a73e8);
    border: 1px solid var(--primary, #1a73e8);
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.1s ease;
}

.monthly-detail-toggle-button:hover {
    background-color: var(--primary, #1a73e8);
    color: #fff;
}

.monthly-detail-toggle-button.active {
    background-color: var(--primary, #1a73e8);
    color: #fff;
}

.monthly-detail-toggle-button .monthly-detail-toggle-chevron {
    transition: transform 0.2s ease;
}

.monthly-detail-toggle-button.active .monthly-detail-toggle-chevron {
    transform: rotate(180deg);
}

body.dark-mode .monthly-detail-toggle-button {
    background-color: #1f2937;
    color: #93c5fd;
    border-color: #3b82f6;
}

body.dark-mode .monthly-detail-toggle-button:hover,
body.dark-mode .monthly-detail-toggle-button.active {
    background-color: #3b82f6;
    color: #fff;
}
.winner { font-size: 1.2em; font-weight: bold; color: #1e8e3e; margin-bottom: 15px; text-align: center;}
#discount-breakdown { display: flex; gap: 15px; margin-top: 20px; flex-wrap: wrap; justify-content: center; align-items: flex-start; }
.carrier-breakdown-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex: 1;
    min-width: 320px;
}
.tooltip-icon { cursor: help; margin-left: 5px; color: #666; position: relative; display: inline-block; }
.tooltip-text {
    visibility: hidden;
    width: 250px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -125px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.75em !important; /* ?�팁 글�?축소 */
    word-break: keep-all; /* 한국어 단어 단위 줄바꿈 (단어 중간에서 끊지 않음) */
    overflow-wrap: break-word; /* 너무 긴 단어/URL은 강제로 끊어 컨테이너 밖으로 안 나가게 */
    line-height: 1.5; /* 자동 줄바꿈된 텍스트 가독성 향상 */
}
.tooltip-icon:hover .tooltip-text { visibility: visible; opacity: 1; }

/* 2026-07-21 개편: 빨간 강조 뱃지 → 연한 중립톤 (모든 입력란이 경고처럼 보이는 문제 해소) */
.tooltip-icon.icon-highlight {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
    vertical-align: middle;
    top: -1px; /* 한글 라벨의 시각적 중심이 x-height 중앙보다 높아 1px 보정 */
    border-radius: 50%;
    background: #eef1f6;
    border: 1px solid #a9b6c9; /* 라이트모드: 살짝 더 진하게 (2026-07-21 대비 보강) */
    /* 글자 ?는 폰트 기준선 탓에 원 중앙에서 흔들려서 숨기고, ::before의 SVG 글리프로 대체 */
    color: transparent;
    font-size: 0.72em;
    font-weight: 800;
    line-height: 1;
    margin-left: 5px;
    box-sizing: border-box;
}

.tooltip-icon.icon-highlight::before {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 7px;
    height: 7px;
    background: #64748b;
    -webkit-mask: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Ccircle cx='6' cy='2.4' r='1.5'/%3E%3Crect x='4.9' y='5' width='2.2' height='6' rx='1.1'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Ccircle cx='6' cy='2.4' r='1.5'/%3E%3Crect x='4.9' y='5' width='2.2' height='6' rx='1.1'/%3E%3C/svg%3E") center / contain no-repeat;
}

body.dark-mode .tooltip-icon.icon-highlight {
    background: #333d4d;
    border-color: #64748c; /* 다크모드: 살짝 더 밝게 (2026-07-21 대비 보강) */
}
body.dark-mode .tooltip-icon.icon-highlight::before { background: #aab4c4; }

/* 정말 중요한 경고 항목에만 라벨의 뱃지에 icon-warn을 추가해서 쓴다 (기본은 전부 중립톤) */
.tooltip-icon.icon-highlight.icon-warn {
    background: rgba(217, 48, 37, 0.85);
    border-color: transparent;
}
.tooltip-icon.icon-highlight.icon-warn::before { background: #fff; }

.tooltip-text.highlight {
    background-color: #3a4354; /* 짙은 남색 — 경고가 아닌 안내 톤 */
    color: #fff;
    font-weight: 400;
    border: none;
    box-shadow: 0 4px 10px rgba(20, 28, 45, 0.3);
    width: 280px;
    margin-left: -140px; /* 중앙 정렬 보정 */
    z-index: 100;
}

/* ================================== */
/* ======== Modal 공통 ?��???======== */
/* ================================== */
.modal {
    display: none; /* 기본?�으�??��? */
    position: fixed; /* ?�면??고정 */
    z-index: 1000; /* ?�른 ?�소???�에 ?�도�??�정 */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* ?�용??�?경우 ?�크�?*/
    background-color: rgba(0,0,0,0.6); /* 반투�?검?�??배경 */
}

.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 1000; }
.modal-content { 
    position: relative; /* ?�정: fixed -> relative */
    background: #fff; 
    margin: 10% auto; /* ?�단 ?�백 �?가�?중앙 ?�렬 */
    padding: 30px; 
    border-radius: 10px; 
    z-index: 1001; 
    width: 90%; 
    max-width: 800px; /* ?�비 조정: 600px -> 800px */
    max-height: 80vh; 
    overflow-y: auto; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.3); /* 그림???�과 추�? */
}
.modal-close-button { position: absolute; top: 15px; right: 15px; font-size: 1.8em; cursor: pointer; }
/* ?��? 계산�?모달???�기 버튼 ?��???*/
.close-button {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.8em;
    cursor: pointer;
}
.modal-footer { margin-top: 25px; padding-top: 15px; border-top: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; }
.date-calculator { 
    display: flex; 
    gap: 20px; 
    flex-wrap: nowrap; /* 좌우 ?�렬 ?��? */
    align-items: stretch;
}
.date-calculator-section { 
    flex: 1; 
    padding: 20px; 
    background: #f8f9fa; 
    border: 1px solid #eee; 
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}
/* 메뉴 버튼이 좌측 상단으로 이동하면서 서랍도 왼쪽에서 열리도록 통일 */
.sidebar-menu { position: fixed; top: 0; left: -280px; width: 280px; height: 100%; background: #fff; z-index: 2000; transition: left 0.3s ease-in-out; box-shadow: 2px 0 5px rgba(0,0,0,0.1); }
.sidebar-menu.active { left: 0; }
.sidebar-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 10px 15px 10px 20px; 
    border-bottom: 1px solid #eee; 
}
.sidebar-header h2, .sidebar-header h3 { margin: 0; font-size: 1.2em; }
.close-menu-btn {
    background: none;
    border: none;
    font-size: 1.5em;
    color: #6c757d;
    cursor: pointer;
    padding: 5px;
    margin-right: -5px; /* ?�측 ?�에 ??밀착시?�기 ?�해 마진 조정 */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}
.close-menu-btn:hover {
    color: #1a73e8;
}
body.dark-mode .close-menu-btn {
    color: #d1d5db;
}
body.dark-mode .close-menu-btn:hover {
    color: #60a5fa;
}
.sidebar-menu nav ul { list-style: none; padding: 0; margin: 0; }
.sidebar-menu nav a { display: block; padding: 15px 20px; color: #333; text-decoration: none; }
.sidebar-menu nav a i { margin-right: 10px; }
.footer-container { text-align: center; margin-top: 30px; padding-top: 20px; border-top: 1px solid #eee; font-size: 0.85em; color: #888; }

/* ================ ?�개글 ?��????�작 (최종 ?�정�? ================ */
.intro-text {
  max-width: 700px;
  margin: 0 auto 20px auto;
  padding: 0 20px;
  text-align: center;
}
.intro-text h2 {
  font-size: 1.1em;
  font-weight: bold;
  margin-bottom: 15px;
}

.intro-text > *:not(:first-child) {
  text-align: left;
  line-height: 1.6;
  margin-bottom: 10px;
}
/* =================================== */
/* ======== internet.html ?��???======== */
/* =================================== */
.result-breakdown { display: flex; gap: 15px; text-align: center; justify-content: space-between; padding: 10px; flex-wrap: wrap; }
.result-card { flex: 1; min-width: 200px; padding: 15px 10px; border: 1px solid #e0e0e0; border-radius: 8px; background-color: #fff; }
.result-card h4 { margin-top: 0; margin-bottom: 10px; color: #1a73e8; font-size: 1.1em; border-bottom: 1px solid #eee; padding-bottom: 8px; }
.result-card p { margin: 8px 0; font-size: 0.95em; min-height: 20px; }
.result-card hr { border: 0; border-top: 1px dashed #ccc; margin: 10px 0; }
.result-summary { text-align: right; margin-top: 20px; padding: 15px; }
.result-summary hr { margin: 10px 0 10px 50%; border: 0; border-top: 1px solid #ccc; }
.result-summary .summary-total { font-size: 1.5em; color: #1a73e8; }
.result-summary .summary-support, .result-summary .summary-contract-total { font-size: 1.1em; }
.result-table-container { max-height: 400px; overflow-y: auto; border: 1px solid #ddd; border-radius: 8px; margin-bottom: 15px; }
.result-table { width: 100%; border-collapse: collapse; text-align: center; }
.result-table thead { background-color: #f2f2f2; }
.result-table th, .result-table td { padding: 10px 8px; border-bottom: 1px solid #e0e0e0; font-size: 0.9em; }
.result-table th { font-weight: bold; }
.result-table tbody tr:last-child td { border-bottom: none; }
.result-table .plan-change-row { background-color: #fffbdd !important; font-weight: bold; }
.result-table .plan-change-row td { color: #b45309; }
.fieldset-grid-container { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.selection-fieldset { border: 1px solid #ddd; border-radius: 8px; padding: 10px 15px 5px 15px; margin-bottom: 15px; background-color: #fcfcfc; }
.selection-fieldset legend { font-weight: bold; color: #1a73e8; padding: 0 10px; font-size: 1.0em; }
.checkbox-align-group { display: flex; align-items: center; padding: 25px 0; }
.checkbox-align-group input[type="checkbox"] { margin: 0 8px 0 0; width: auto; }
.checkbox-align-group label { margin: 0; font-weight: bold; cursor: pointer; }
.fee-total { font-size: 1.1em; color: #1a73e8; text-align: right; }
.fee-note { font-size: 0.85em; color: #666; text-align: right; }
.result-subtitle { text-align: center; color: #0d47a1; font-size: 1.2em; font-weight: bold; margin-top: 25px; margin-bottom: -15px; padding: 8px; background-color: #e3f2fd; border-radius: 8px; border: 1px dashed #90caf9; }
.breakdown-card.compact { padding: 15px; display: flex; flex-direction: column; min-width: 300px; }
.breakdown-card.compact h4 { font-size: 1.1em; padding-bottom: 8px; margin-bottom: 8px; text-align: center; }
.compact-summary-list { list-style: none; padding: 0; margin: 0; font-size: 0.9em; line-height: 1.6; }
.compact-summary-list li { display: flex; justify-content: space-between; padding: 3px 0; border-bottom: 1px solid #f0f0f0; }
.compact-summary-list li:last-child { border-bottom: none; }
.compact-summary-list li span:first-child { padding-right: 10px; color: #555; word-break: keep-all; }
.compact-summary-list li span:last-child { font-weight: 500; white-space: nowrap; }
.compact-summary-list li.discount span { color: #1a73e8; }
.compact-summary-total { margin-top: auto; padding-top: 10px; }
.compact-summary-total hr { border: 0; border-top: 1px solid #ccc; margin: 8px 0; }
.compact-summary-total p { margin: 8px 0; }
.compact-summary-total .summary-total { display: flex; justify-content: space-between; align-items: center; font-size: 1.1em; font-weight: bold; color: #1a73e8; }
.compact-summary-total .summary-total strong { font-size: 1.2em; color: #d93025; }
.compact-summary-total .mobile-discount { text-align: right; font-size: 0.85em; color: #1e8e3e; font-weight: bold; }

 @media (max-width: 992px) { .fieldset-grid-container { grid-template-columns: 1fr; gap: 0; } }

/* ================================== */
/* 추�????�소 ?��???(Navbar ??       */
/* ================================== */
.navbar {
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.navbar-brand a { font-size: 1.5rem; font-weight: bold; color: #333; text-decoration: none; }
.navbar-nav { list-style: none; display: flex; margin: 0; padding: 0; }
.navbar-nav li a { display: block; padding: 1.5rem 1rem; text-decoration: none; color: #555; font-weight: 500; transition: color 0.3s, background-color 0.3s; }
.navbar-nav li a:hover { color: #007bff; background-color: #f8f9fa; }
.info-section { max-width: 1200px; margin: 2rem auto; padding: 2rem; background-color: #fff; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
.info-section h2 { margin-top: 0; border-bottom: 2px solid #eee; padding-bottom: 1rem; margin-bottom: 1rem; font-size: 1.4rem; }
.info-section ul { list-style: none; padding: 0; margin: 0; }
.info-section ul li { padding: 0.75rem 0.5rem; border-bottom: 1px solid #f0f0f0; display: flex; justify-content: space-between; align-items: center; }
.info-section ul li:last-child { border-bottom: none; }
.info-section ul li span:first-child { font-weight: bold; color: #007bff; margin-right: 1rem; }
.info-section ul li .date { color: #888; font-size: 0.9em; white-space: nowrap; }
.guide-section p { line-height: 1.7; color: #444; }

/* ================================== */
/* ?�▼??공�??�항 & 로그??추�? ?��????�▼??*/
/* ================================== */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* 반투�?배경?�로 변�?*/
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}
.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}
.side-menu {
    position: fixed; top: 0; right: -280px; width: 280px; height: 100%;
    background-color: #fff; box-shadow: -2px 0 5px rgba(0,0,0,0.1);
    transform: translateX(100%); transition: transform 0.3s ease-in-out;
    z-index: 1002; padding-top: 20px; box-sizing: border-box;
}
.side-menu.show { transform: translateX(0); }
.side-menu a { display: block; padding: 15px 20px; color: #333; text-decoration: none; font-size: 16px; }
.side-menu a:hover { background-color: #f1f1f1; }

.modal-content {
    max-height: 85vh;
}
#notice-list { margin-top: 20px; }
.notice-item { border-bottom: 1px solid #eee; }
.notice-title {
    padding: 15px 10px; font-weight: bold; cursor: pointer;
    display: flex; justify-content: space-between; align-items: center;
}
.notice-title:hover { background-color: #f8f9fa; }
.notice-content {
    padding: 15px 20px; background-color: #f8f9fa;
    border-top: 1px solid #eee;
}
.notice-content p { margin: 0 0 10px; }
.new-badge {
    background-color: #d93025; color: white;
    font-size: 0.7em; font-weight: bold;
    padding: 3px 6px; border-radius: 4px;
    margin-left: 8px;
}
.delete-btn {
    background: #f1f1f1; border: 1px solid #ddd;
    padding: 4px 8px; font-size: 0.8em;
    border-radius: 4px; cursor: pointer;
}
.delete-btn:hover { background: #e0e0e0; }
#write-notice-btn {
    padding: 10px 15px; background-color: #1a73e8; color: white;
    border: none; border-radius: 5px; cursor: pointer; float: right;
}
#write-modal #notice-title {
    width: calc(100% - 20px); padding: 10px;
    font-size: 1.2em; margin-bottom: 15px;
}
#editor-container { height: 300px; margin-bottom: 15px; }
#save-notice-btn {
    padding: 12px 25px; background-color: #1a73e8; color: white;
    border: none; border-radius: 5px; cursor: pointer; font-size: 1em;
}
#login-modal .modal-content { max-width: 400px; }
.login-form { display: flex; flex-direction: column; gap: 15px; margin-top: 20px;}
.login-form input {
    width: 100%; padding: 12px; box-sizing: border-box;
    border: 1px solid #ccc; border-radius: 5px;
}
.login-form button {
    width: 100%; padding: 12px; background-color: #1a73e8; color: white;
    border: none; border-radius: 5px; cursor: pointer; font-size: 1em;
}
.login-form button:hover { background-color: #155ab6; }


/* ================================================================ */
/* == phone/internet 선택 카드: 랜딩(참고용 시안) 톤으로 통일 (2026-07) == */
/* 흰 카드 + 연보라 아이콘 칩 + 보라 포인트. onclick/구조는 그대로,   */
/* 색·모서리·그림자만 변경. 위약금(highlight-card)의 앰버 강조는 유지. */
/* ================================================================ */
.choice-card {
    border-radius: 22px;
    border-color: #ecebf2;
    box-shadow: 0 6px 24px rgba(60, 60, 90, 0.05);
}
.choice-card:hover {
    border-color: #9750f9;
    box-shadow: 0 16px 32px rgba(76, 60, 140, 0.14);
}
.choice-card .card-icon {
    background: #efeafe;
    color: #7c5cfa;
    border-radius: 14px;
    transition: background 0.25s ease, color 0.25s ease;
}
.choice-card:hover .card-icon {
    background: linear-gradient(135deg, #8b5cf6, #4c8dff);
    color: #fff;
}
.choice-card .card-info strong { color: #171c28; }
.choice-card .card-info span { color: #64748b; } /* 접근성: 4.5:1 대비 확보 (구 #7c8598) */

/* 위약금 카드: 앰버 강조 유지하되 새 톤과 어울리게 모서리·그림자만 공유 */
.choice-card.highlight-card:hover { border-color: #f59e0b; }
.choice-card.highlight-card:hover .card-icon {
    background: #f59e0b;
    color: #fff;
}

/* 다크모드 */
body.dark-mode .choice-card {
    background: #1e293b;
    border-color: #334155;
    box-shadow: none;
}
body.dark-mode .choice-card:hover { border-color: #a78bfa; }
body.dark-mode .choice-card .card-icon { background: #2a2d4a; color: #a78bfa; }
body.dark-mode .choice-card:hover .card-icon {
    background: linear-gradient(135deg, #8b5cf6, #4c8dff);
    color: #fff;
}

/* phone.html approved compact 3D icon sprite. */
.choice-card .card-icon.choice-icon {
    position: relative;
    width: 60px;
    height: 60px;
    overflow: hidden;
    border-radius: 15px;
    background: #f2f7fc;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.choice-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('../images/phone-choice-icons-v2.webp');
    background-repeat: no-repeat;
    background-size: 300% 300%;
}
.choice-icon--subsidy::before { background-position: 0 0; }
.choice-icon--contract::before { background-position: 50% 0; }
.choice-icon--compare::before { background-position: 100% 0; }
.choice-icon--store::before { background-position: 0 50%; }
.choice-icon--carrier::before { background-position: 50% 50%; }
.choice-icon--family::before { background-position: 100% 50%; }
.choice-icon--cost::before { background-position: 0 100%; }
.choice-icon--plans::before { background-position: 50% 100%; }
.choice-icon--penalty::before { background-position: 100% 100%; }
body.dark-mode .choice-card .card-icon.choice-icon {
    background: #263449;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
@media screen and (max-width: 640px) {
    .choice-card .card-icon.choice-icon {
        width: 42px;
        height: 42px;
        border-radius: 10px;
    }
}

/* internet.html compact 3D icon sprite. */
.choice-card .card-icon.internet-choice-icon {
    position: relative;
    width: 68px;
    height: 68px;
    overflow: hidden;
    border-radius: 16px;
    background: #f2f7fc;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.internet-choice-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('../images/internet-choice-icons-v2.webp');
    background-repeat: no-repeat;
    background-size: 200% 100%;
}
.internet-choice-icon--single::before { background-position: 0 0; }
.internet-choice-icon--compare::before { background-position: 100% 0; }
body.dark-mode .choice-card .card-icon.internet-choice-icon {
    background: #263449;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
@media screen and (max-width: 640px) {
    .choice-card .card-icon.internet-choice-icon {
        width: 52px;
        height: 52px;
        border-radius: 12px;
    }
}

/* ================================================================ */
/* == 2026-07-21 UI 개편: 다크모드 슬라이딩 스위치 (A안)          == */
/* theme-toast.js의 클릭 로직은 그대로 두고 CSS만으로 스위치 형태를 */
/* 그린다. 내부 아이콘·텍스트(밝게/어둡게)는 스크린리더용으로 숨김. */
/* ================================================================ */
.icon-button.btn-dark-mode-toggle {
    position: relative;
    width: 64px;
    height: 36px;
    min-width: 64px;
    padding: 0;
    border: 1px solid #a9b6c9; /* 라이트모드: 살짝 더 진하게 (2026-07-21 대비 보강) */
    border-radius: 99px;
    background: #dfe7f2;
    cursor: pointer;
    box-shadow: inset 0 1px 3px rgba(30, 40, 70, 0.12);
    transition: background 0.25s ease, border-color 0.25s ease;
    overflow: visible;
}
.icon-button.btn-dark-mode-toggle:hover {
    background: #d4dfee;
    transform: none;
}
/* 손잡이(해/달) */
.icon-button.btn-dark-mode-toggle::before {
    content: '☀️';
    position: absolute;
    top: 50%;
    left: 3px;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 5px rgba(30, 40, 70, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    line-height: 1;
    transition: left 0.25s ease, background 0.25s ease;
}
/* 시각 크기는 36px이지만 터치 영역은 44px 이상 확보 */
.icon-button.btn-dark-mode-toggle::after {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 99px;
}
.icon-button.btn-dark-mode-toggle:focus-visible {
    outline: 3px solid rgba(36, 111, 218, 0.25);
    outline-offset: 2px;
}
/* 기존 아이콘·문구는 화면에서만 숨긴다 (theme-toast.js가 계속 갱신) */
.icon-button.btn-dark-mode-toggle > i,
.icon-button.btn-dark-mode-toggle > span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
body.dark-mode .icon-button.btn-dark-mode-toggle {
    background: #33415c;
    border-color: #5c6d93; /* 다크모드: 트랙과 같은 색이라 안 보이던 보더를 밝게 분리 */
}
body.dark-mode .icon-button.btn-dark-mode-toggle:hover { background: #3c4c6b; }
body.dark-mode .icon-button.btn-dark-mode-toggle::before {
    content: '🌙';
    left: 31px;
    background: #1f2937;
}

/* ================================================================ */
/* == 2026-07-21 UI 개편: 사이드바 섹션 구분 (전 페이지 공통)      == */
/* ================================================================ */
.sidebar-menu nav {
    overflow-y: auto;
    max-height: calc(100% - 57px);
    padding-bottom: 24px;
}
.sidebar-section-title {
    padding: 14px 20px 4px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #94a3b8;
}
.sidebar-menu nav a {
    display: flex;
    align-items: center;
    padding: 11px 20px;
    min-height: 44px;
    box-sizing: border-box;
}
.sidebar-menu nav a i {
    width: 20px;
    text-align: center;
    flex: 0 0 auto;
}
.sidebar-menu nav a.current {
    background: #eef4ff;
    color: #1a73e8;
    font-weight: 700;
    box-shadow: inset -3px 0 0 #1a73e8;
}
.sidebar-menu nav a.sub {
    color: #64748b;
    font-size: 0.92em;
}
.sidebar-menu nav hr {
    border: 0;
    border-top: 1px solid #eef1f6;
    margin: 8px 0;
}
body.dark-mode .sidebar-section-title { color: #7c8aa0; }
body.dark-mode .sidebar-menu nav a.current {
    background: #263447 !important;
    color: #7cb0f7 !important;
}
body.dark-mode .sidebar-menu nav a.sub { color: #9aa7b8 !important; }
body.dark-mode .sidebar-menu nav hr { border-top-color: #374151; }

/* ================================================================ */
/* == 2026-07-21 UI 개편: 서브페이지 헤더 크럼 + 그라디언트 포인트 == */
/* ================================================================ */
.header-crumb {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #94a3b8;
    margin-bottom: 2px;
}
body.dark-mode .header-crumb { color: #7c8aa0; }
.header-info h1 .grad-accent {
    font-style: normal;
    background: linear-gradient(90deg, #247cff, #9e4dff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
body.dark-mode .header-info h1 .grad-accent {
    background: linear-gradient(90deg, #7fb3ff, #c39bff);
    -webkit-background-clip: text;
    background-clip: text;
}

/* ================================================================ */
/* == [16] 사용방법 영상 배너·팝업 (D안, 2026-07-21)              == */
/* ================================================================ */
/* 계산기 선택 화면 상단 얇은 배너 */
.help-video-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin: 0 0 14px;
    padding: 10px 14px;
    background: linear-gradient(90deg, #eef4fe, #f3eefe);
    border: 1px solid #d8e6fb;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #1a2b5f;
    cursor: pointer;
    word-break: keep-all;
    transition: box-shadow 0.2s, transform 0.2s;
}
.help-video-banner:hover { box-shadow: 0 4px 12px rgba(26, 115, 232, 0.18); transform: translateY(-1px); }
.help-video-banner .hvb-yt {
    position: relative;
    width: 22px;
    height: 15px;
    border-radius: 4px;
    background: #ff0000;
    flex: 0 0 auto;
}
.help-video-banner .hvb-yt::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 3.5px;
    border-left: 7px solid #fff;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
}
.help-video-banner .hvb-go { color: #1a73e8; font-weight: 800; flex: 0 0 auto; }
body.dark-mode .help-video-banner {
    background: linear-gradient(90deg, #1e293b, #26203b);
    border-color: #334155;
    color: #dbe7ff;
}
body.dark-mode .help-video-banner .hvb-go { color: #93c5fd; }

/* 중앙 팝업 플레이어 */
.help-video-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1200;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.help-video-modal .hvm-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.6); }
.help-video-modal .hvm-card {
    position: relative;
    width: 100%;
    max-width: 720px;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}
.help-video-modal .hvm-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    font-size: 0.9rem;
}
.help-video-modal .hvm-x {
    border: none;
    background: none;
    font-size: 1.5rem;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 2px 6px;
}
.help-video-modal .hvm-player { position: relative; aspect-ratio: 16 / 9; background: #000; }
.help-video-modal .hvm-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.help-video-modal .hvm-tabs { display: flex; gap: 8px; padding: 10px 14px 14px; }
.help-video-modal .hvm-tab {
    flex: 1;
    padding: 9px 4px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background: #f8f9fa;
    font-size: 0.8rem;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    word-break: keep-all;
}
.help-video-modal .hvm-tab.active { background: #1a73e8; border-color: #1a73e8; color: #fff; font-weight: 700; }
body.dark-mode .help-video-modal .hvm-card { background: #1f2937; }
body.dark-mode .help-video-modal .hvm-head { color: #e5e7eb; }
body.dark-mode .help-video-modal .hvm-tab { background: #111827; border-color: #374151; color: #9ca3af; }
body.dark-mode .help-video-modal .hvm-tab.active { background: #3b82f6; border-color: #3b82f6; color: #fff; }
/* 모바일: 탭 4개는 2×2 배치 */
@media screen and (max-width: 768px) {
    .help-video-modal .hvm-tabs { flex-wrap: wrap; }
    .help-video-modal .hvm-tab { flex: 1 1 45%; }
}

/* [2026-07-29] 게시판 사용법 영상 선택 화면 — 팝업을 열면 바로 재생하지 않고 손님용/사장님용을 고르게 한다 */
.help-video-modal .hvm-picker { padding: 4px 14px 16px; }
.help-video-modal .hvm-picker-lead {
    margin: 0 0 10px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #666;
}
.help-video-modal .hvm-pick {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-bottom: 8px;
    padding: 14px 12px;
    border: 1px solid #ddd;
    border-radius: 12px;
    background: #f8f9fa;
    cursor: pointer;
    text-align: left;
    transition: border-color .15s, background .15s, transform .1s;
}
.help-video-modal .hvm-pick:last-child { margin-bottom: 0; }
.help-video-modal .hvm-pick:hover { border-color: #1a73e8; background: #f0f6ff; }
.help-video-modal .hvm-pick:active { transform: scale(0.99); }
.help-video-modal .hvm-pick-ico { font-size: 1.6rem; line-height: 1; flex-shrink: 0; }
.help-video-modal .hvm-pick-txt { flex: 1; min-width: 0; }
.help-video-modal .hvm-pick-txt b {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: #222;
    word-break: keep-all;
}
.help-video-modal .hvm-pick-txt em {
    display: block;
    margin-top: 3px;
    font-style: normal;
    font-size: 0.74rem;
    color: #777;
    word-break: keep-all;
    line-height: 1.35;
}
.help-video-modal .hvm-pick-go { font-size: 1.3rem; color: #1a73e8; flex-shrink: 0; }
.help-video-modal .hvm-backrow { padding: 10px 14px 14px; }
.help-video-modal .hvm-backrow .hvm-tab { flex: none; width: 100%; }

body.dark-mode .help-video-modal .hvm-picker-lead { color: #9ca3af; }
body.dark-mode .help-video-modal .hvm-pick { background: #111827; border-color: #374151; }
body.dark-mode .help-video-modal .hvm-pick:hover { background: #1e293b; border-color: #3b82f6; }
body.dark-mode .help-video-modal .hvm-pick-txt b { color: #f3f4f6; }
body.dark-mode .help-video-modal .hvm-pick-txt em { color: #9ca3af; }
body.dark-mode .help-video-modal .hvm-pick-go { color: #60a5fa; }

@media screen and (max-width: 420px) {
    .help-video-modal .hvm-pick { padding: 12px 10px; gap: 9px; }
    .help-video-modal .hvm-pick-ico { font-size: 1.35rem; }
    .help-video-modal .hvm-pick-txt b { font-size: 0.88rem; }
    .help-video-modal .hvm-pick-txt em { font-size: 0.7rem; }
}

@media screen and (max-width: 768px) {
    /* 한 줄 유지: 폰트·간격 축소 + 줄바꿈 금지 */
    .help-video-banner {
        font-size: 0.72rem;
        padding: 9px 8px;
        gap: 5px;
        letter-spacing: -0.3px;
        white-space: nowrap;
    }
    .help-video-banner .hvb-yt { width: 19px; height: 13px; }
    .help-video-banner .hvb-yt::before { left: 7px; top: 3px; border-left-width: 6px; border-top-width: 3.5px; border-bottom-width: 3.5px; }
}
/* 아주 좁은 화면: "처음이신가요?" 생략해 한 줄 보장 */
@media screen and (max-width: 400px) {
    .help-video-banner .hvb-lead { display: none; }
}

/* ================================================================ */
/* == 2026-07-21 비포/애프터: 모바일 선택화면 푸터 당겨붙이기      == */
/* 카드 그리드 아래 여백(40px)과 푸터 상단 여백(50px+30px)이 겹쳐  */
/* 선택 화면에서 푸터가 한참 아래로 밀리던 문제 — 모바일만 압축.   */
/* ================================================================ */
@media screen and (max-width: 768px) {
    .choice-grid { margin-bottom: 8px; }
    .page-footer {
        margin-top: 18px;
        padding: 16px 16px 20px;
    }
}

/* ================================================================ */
/* == 2026-07-23 유틸 계산기 3종 개편 (할부·날짜·만나이)          == */
/* ================================================================ */
/* 요약 스탯 카드 (할부 결과 상단) */
.inst-stats { display: flex; gap: 7px; margin: 14px 0 10px; }
.inst-stat {
    flex: 1;
    background: #f4f8ff;
    border: 1px solid #d9e5f8;
    border-radius: 10px;
    padding: 9px 6px;
    text-align: center;
    min-width: 0;
}
.inst-stat span { display: block; font-size: 0.66rem; color: #64748b; font-weight: 700; }
.inst-stat b { font-size: 0.8rem; color: #111827; white-space: nowrap; font-variant-numeric: tabular-nums; }
.inst-stat.hl { background: linear-gradient(135deg, #f4f8ff, #faf6ff); border-color: #d9c8ff; }
.inst-stat.hl b { color: #7c3aed; }
body.dark-mode .inst-stat { background: #1c2740; border-color: #33415c; }
body.dark-mode .inst-stat span { color: #9aa7b8; }
body.dark-mode .inst-stat b { color: #f1f5f9; }
body.dark-mode .inst-stat.hl { background: linear-gradient(135deg, #1c2740, #292040); border-color: #4b3a78; }
body.dark-mode .inst-stat.hl b { color: #b794f6; }

.inst-unit { text-align: right; font-size: 0.66rem; color: #94a3b8; margin-bottom: 4px; }

/* 월별 표: 셀에 '원'을 붙이지 않아 5열이 모바일 화면에 다 들어온다 */
.inst-table-wrap {
    max-height: 260px;
    overflow-y: auto;
    overflow-x: auto; /* 만약을 위한 안전장치 — 아래 컴팩트 규격으로 보통은 한 화면에 다 들어옴 */
    border: 1px solid #e5e9f2;
    border-radius: 10px;
}
body.dark-mode .inst-table-wrap { border-color: #374151; }
table.inst-table { width: 100%; border-collapse: collapse; font-size: 0.7rem; }
.inst-table th {
    position: sticky;
    top: 0;
    background: #f4f8ff;
    font-size: 0.66rem;
    padding: 7px 3px;
    border-bottom: 1px solid #d9e5f8;
    z-index: 1;
    white-space: nowrap;
}
.inst-table td {
    padding: 6px 4px;
    border-bottom: 1px solid #f1f4f9;
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.inst-table td:first-child { text-align: center; color: #94a3b8; }
.inst-table tr:nth-child(even) td { background: #fafbfd; }
.inst-table td.cum { font-weight: 700; color: #1a73e8; }
body.dark-mode .inst-table th { background: #1c2740; border-bottom-color: #33415c; }
body.dark-mode .inst-table td { border-bottom-color: #2b3547; }
body.dark-mode .inst-table tr:nth-child(even) td { background: #1b2433; }
body.dark-mode .inst-table td.cum { color: #7cb0f7; }

/* 이자율·개월수 나란히 */
.inst-row2 { display: flex; gap: 10px; }
.inst-row2 .input-group { flex: 1; min-width: 0; }

/* 날짜 계산기 탭 */
.dc-tabs { display: flex; border: 1.5px solid #d7dce6; border-radius: 10px; overflow: hidden; margin-bottom: 14px; }
.dc-tab {
    flex: 1;
    text-align: center;
    padding: 11px 0;
    font-size: 0.84rem;
    font-weight: 800;
    color: #64748b;
    background: #f8fafc;
    border: none;
    cursor: pointer;
    min-height: 44px;
}
.dc-tab.active { background: #1a73e8; color: #fff; }
body.dark-mode .dc-tabs { border-color: #4a5668; }
body.dark-mode .dc-tab { background: #1f2937; color: #9aa7b8; }
body.dark-mode .dc-tab.active { background: #2563eb; color: #fff; }

/* [오늘] 버튼 */
.today-btn {
    margin-left: auto;
    font-size: 0.7rem;
    font-weight: 800;
    color: #1a73e8;
    background: #eef4ff;
    border: 1px solid #c9dcf6;
    border-radius: 8px;
    padding: 4px 10px;
    cursor: pointer;
    min-height: 26px;
}
.today-btn:hover { background: #dfecff; }
body.dark-mode .today-btn { background: #1c2f4a; border-color: #2f4a74; color: #7cb0f7; }
.label-row { display: flex; align-items: center; gap: 6px; }

/* 자주 쓰는 값 칩 */
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.dc-chip {
    border: 1px solid #d7dce6;
    background: #f8fafc;
    color: #475569;
    border-radius: 99px;
    padding: 6px 12px;
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
    min-height: 30px;
}
.dc-chip.on { border-color: #1a73e8; background: #eef4ff; color: #1a73e8; }
body.dark-mode .dc-chip { background: #1f2937; border-color: #4a5668; color: #9aa7b8; }
body.dark-mode .dc-chip.on { background: #1c2f4a; border-color: #2f4a74; color: #7cb0f7; }

/* 결과 박스 (날짜·만나이 공용) */
.calc-res-box {
    margin-top: 14px;
    background: linear-gradient(135deg, #f4f8ff, #faf6ff);
    border: 1.5px solid #d9c8ff;
    border-radius: 12px;
    padding: 14px;
    text-align: center;
    word-break: keep-all;
}
.calc-res-box:empty { display: none; }
.calc-res-box .rb-cap { display: block; font-size: 0.72rem; color: #7c3aed; font-weight: 800; margin-bottom: 2px; }
.calc-res-box .rb-main { font-size: 1.3rem; font-weight: 800; color: #111827; }
.calc-res-box .rb-sub { display: block; font-size: 0.74rem; color: #64748b; margin-top: 4px; font-weight: 500; }
body.dark-mode .calc-res-box { background: linear-gradient(135deg, #1c2740, #292040); border-color: #4b3a78; }
body.dark-mode .calc-res-box .rb-cap { color: #b794f6; }
body.dark-mode .calc-res-box .rb-main { color: #f1f5f9; }
body.dark-mode .calc-res-box .rb-sub { color: #9aa7b8; }

/* 만나이 혜택 뱃지 */
.age-badges { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.age-badges:empty { display: none; }
.abadge {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    border-radius: 10px;
    padding: 7px 12px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
}
.abadge span { overflow: hidden; text-overflow: ellipsis; }
.abadge i { font-style: normal; font-weight: 600; font-size: 0.66rem; opacity: 0.75; flex: 0 0 auto; }
.abadge.ok { background: #ecfdf5; border: 1px solid #a7f3d0; color: #047857; }
.abadge.no { background: #f8fafc; border: 1px solid #e5e9f2; color: #94a3b8; }
body.dark-mode .abadge.ok { background: #0b2e22; border-color: #14532d; color: #6ee7b7; }
body.dark-mode .abadge.no { background: #1f2937; border-color: #374151; color: #7c8aa0; }

/* 할부 계산기 선택 버튼: 시안의 세그먼트 스타일 (2026-07-23) */
#installmentCalcModal .payment-method-options { display: flex; gap: 8px; }
#installmentCalcModal .payment-method-options .payment-button {
    flex: 1;
    min-width: 0;
    min-height: 46px;
    padding: 10px 6px;
    border: 1.5px solid #d7dce6;
    border-radius: 10px;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.35;
    word-break: keep-all;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
#installmentCalcModal .payment-method-options .payment-button:hover { border-color: #9ec1f0; }
#installmentCalcModal .payment-method-options .payment-button.active {
    background: #1a73e8;
    border-color: #1a73e8;
    color: #fff;
}
body.dark-mode #installmentCalcModal .payment-method-options .payment-button {
    background: #1f2937;
    border-color: #4a5668;
    color: #9aa7b8;
}
body.dark-mode #installmentCalcModal .payment-method-options .payment-button.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

/* 만나이 → 가입 가능 전용 요금제 목록 (2026-07-23) */
.age-plans-toggle {
    width: 100%;
    margin-top: 10px;
    min-height: 44px;
    border: 1.5px solid #d9c8ff;
    border-radius: 12px;
    background: linear-gradient(135deg, #f4f8ff, #faf6ff);
    color: #7c3aed;
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}
.age-intro { font-size: 0.8em; color: #6b7280; white-space: nowrap; }
body.dark-mode .age-intro { color: #9aa7b8; }
.age-plans-toggle b { color: #1a73e8; }
.age-plans-toggle .apt-arrow { display: inline-block; transition: transform 0.2s; }
.age-plans-toggle.open .apt-arrow { transform: rotate(180deg); }
body.dark-mode .age-plans-toggle { background: linear-gradient(135deg, #1c2740, #292040); border-color: #4b3a78; color: #b794f6; }
body.dark-mode .age-plans-toggle b { color: #7cb0f7; }

.age-plans-list {
    display: none;
    margin-top: 8px;
    border: 1px solid #e5e9f2;
    border-radius: 12px;
    max-height: 250px;
    overflow-y: auto;
}
.age-plans-list.show { display: block; }
body.dark-mode .age-plans-list { border-color: #374151; }
.ap-carrier {
    position: sticky;
    top: 0;
    background: #f4f8ff;
    padding: 7px 14px;
    font-size: 0.72rem;
    font-weight: 800;
    color: #1a73e8;
    border-bottom: 1px solid #e5e9f2;
}
body.dark-mode .ap-carrier { background: #1c2740; color: #7cb0f7; border-bottom-color: #374151; }
.ap-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-bottom: 1px solid #f1f4f9;
    font-size: 0.8rem;
}
.ap-row:last-of-type { border-bottom: none; }
body.dark-mode .ap-row { border-bottom-color: #2b3547; }
.ap-name { color: #374151; word-break: keep-all; }
body.dark-mode .ap-name { color: #cbd5e1; }
.ap-price { color: #111827; font-variant-numeric: tabular-nums; white-space: nowrap; }
body.dark-mode .ap-price { color: #f1f5f9; }
.ap-note { padding: 9px 14px; font-size: 0.68rem; color: #94a3b8; word-break: keep-all; background: #fafbfd; }
body.dark-mode .ap-note { background: #1b2433; }
.age-plans-empty {
    margin-top: 10px;
    padding: 11px 14px;
    border: 1px dashed #d5dbe7;
    border-radius: 10px;
    font-size: 0.76rem;
    color: #6b7280;
    word-break: keep-all;
}
body.dark-mode .age-plans-empty { border-color: #4a5668; color: #9aa7b8; }

/* 만나이 요금제 옆 확장 (2026-07-23): "보기"를 누르면 모달이 옆으로 스윽 넓어지며
   오른쪽 칸에 통신사 로고 탭 + 요금제 목록이 나타난다. 좁은 화면에서는 아래로 이어짐. */
/* 배경(body)은 잠그고 모달 자체가 스크롤을 담당 — 뒤 화면으로 스크롤이 번지지 않게 */
/* z-index: 요금제 목록 시트(10000) 위에서도 열리도록 */
#ageCalcModal { overflow-y: auto; overscroll-behavior: contain; z-index: 10001; }
/* 팝업 공통 규칙 (2026-07-23): 팝업이 화면보다 길면 팝업 자체가 스크롤되고(반응형),
   팝업 안 스크롤이 끝에 닿아도 뒤 화면으로 번지지 않는다. 배경 잠금은 modal-scroll-lock.js가 일괄 처리. */
.modal, .modal-overlay, .bottom-sheet-modal, .help-video-modal { overscroll-behavior: contain; }
.modal-overlay { overflow-y: auto; }
.modal-content { overscroll-behavior: contain; }
/* 자급제 안내문 안의 "카드 할부 계산기" 바로가기 링크 */
.inline-calc-link {
    color: #1a73e8;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
body.dark-mode .inline-calc-link { color: #7cb0f7; }
/* 할부 계산기 모달: 스크롤이 뒤 화면으로 번지지 않게 */
#installmentCalcModal { overscroll-behavior: contain; }
#installmentCalcModal .modal-content { overscroll-behavior: contain; }
/* 만나이 계산기가 위에 떠 있는 동안 요금제 목록 시트의 내부 스크롤 잠금 */
#planPickerModal.pp-frozen .plan-picker-list { overflow-y: hidden; }
/* 요금제 목록 자체도 끝에서 뒤 화면으로 스크롤이 번지지 않게 */
.plan-picker-list { overscroll-behavior: contain; }
/* 요금제 목록 연령 필터의 "내 나이로 찾기" 버튼 */
.pp-age-calc-btn {
    border-color: #d9c8ff !important;
    background: linear-gradient(135deg, #f4f8ff, #faf6ff) !important;
    color: #7c3aed !important;
    font-weight: 800;
}
body.dark-mode .pp-age-calc-btn {
    border-color: #4b3a78 !important;
    background: linear-gradient(135deg, #1c2740, #292040) !important;
    color: #b794f6 !important;
}
.age-modal-content {
    max-width: 400px;
    transition: max-width 0.35s cubic-bezier(0.22, 0.8, 0.3, 1);
    overscroll-behavior: contain; /* 내용 끝에서 스크롤이 뒤로 안 번지게 */
}
.age-modal-content.plans-open { max-width: 860px; }
.age-flex { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.age-main { flex: 1 1 320px; min-width: 290px; }
.age-side {
    flex: 1 1 320px;
    min-width: 280px;
    display: none;
    opacity: 0;
    transform: translateX(-10px);
}
.plans-open .age-side {
    display: flex;
    flex-direction: column;
    animation: ageSideIn 0.3s 0.12s ease-out forwards;
}
@keyframes ageSideIn {
    to { opacity: 1; transform: translateX(0); }
}
.app-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.app-head b { font-size: 0.9rem; word-break: keep-all; }
.app-back {
    width: 32px; height: 32px; flex: 0 0 auto;
    border: 1px solid #d8dee8; border-radius: 9px; background: #f8fafc;
    font-size: 1.15rem; line-height: 1; color: #64748b; cursor: pointer;
}
body.dark-mode .app-back { background: #29313e; border-color: #4a5668; color: #cbd5e1; }
/* 통신사 로고 탭 */
.app-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.app-tab {
    flex: 1; min-height: 42px; padding: 6px 4px;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    border: 1.5px solid #d7dce6; border-radius: 10px; background: #fff;
    cursor: pointer;
}
.app-tab img { height: 16px; max-width: 56px; object-fit: contain; }
.app-tab i {
    font-style: normal; font-size: 0.68rem; font-weight: 800; color: #94a3b8;
    background: #f1f4f9; border-radius: 99px; padding: 1px 7px;
}
.app-tab.active { border-color: #1a73e8; background: #eef4ff; box-shadow: inset 0 0 0 1px #1a73e8; }
.app-tab.active i { background: #1a73e8; color: #fff; }
body.dark-mode .app-tab { background: #1f2937; border-color: #4a5668; }
body.dark-mode .app-tab img { filter: brightness(1.15); }
body.dark-mode .app-tab.active { background: #1c2f4a; border-color: #2f6fd4; box-shadow: inset 0 0 0 1px #2f6fd4; }
body.dark-mode .app-tab i { background: #29313e; color: #9aa7b8; }
body.dark-mode .app-tab.active i { background: #2563eb; color: #fff; }
/* 목록: 한 줄 고정 (이름 말줄임 + 가격 우측) */
.app-list {
    max-height: 340px; overflow-y: auto;
    overscroll-behavior: contain; /* 목록 끝에 닿아도 뒤 화면으로 스크롤이 안 번지게 */
    border: 1px solid #e5e9f2; border-radius: 12px;
}
body.dark-mode .app-list { border-color: #374151; }
.apr {
    border-bottom: 1px solid #f1f4f9;
    font-size: 0.74rem; cursor: pointer;
}
.apr:last-child { border-bottom: none; }
.apr:nth-child(even) { background: #fafbfd; }
body.dark-mode .apr { border-bottom-color: #2b3547; }
body.dark-mode .apr:nth-child(even) { background: #1b2433; }
.apr-row {
    display: flex; justify-content: space-between; align-items: center; gap: 8px;
    padding: 8px 12px; white-space: nowrap;
}
.apr-name { overflow: hidden; text-overflow: ellipsis; color: #374151; min-width: 0; }
body.dark-mode .apr-name { color: #cbd5e1; }
.apr-price { flex: 0 0 auto; color: #1a73e8; font-variant-numeric: tabular-nums; }
body.dark-mode .apr-price { color: #7cb0f7; }
.apr-sel {
    flex: 0 0 auto; margin-left: auto;
    font-size: 0.62rem; font-weight: 700; color: #059669;
    background: #ecfdf5; border-radius: 6px; padding: 1px 5px;
    font-variant-numeric: tabular-nums;
}
body.dark-mode .apr-sel { color: #6ee7b7; background: #0b2e22; }
/* 온라인 전용(무약정) — 선약가 자리에 보라 배지 (2026-08-11) */
.apr-sel.apr-sel-olp { color: #6d28d9; background: #ede9fe; }
body.dark-mode .apr-sel.apr-sel-olp { color: #d8b4fe; background: #3b0764; }
.apr-sel-line { color: #047857; font-weight: 700; }
.apr-sel-line b { color: #047857; }
body.dark-mode .apr-sel-line, body.dark-mode .apr-sel-line b { color: #6ee7b7; }
.apr-arr { flex: 0 0 auto; font-size: 0.6rem; color: #b6c0cf; transition: transform 0.25s ease; }
.apr.open .apr-arr { transform: rotate(180deg); color: #1a73e8; }
body.dark-mode .apr-arr { color: #64748b; }
body.dark-mode .apr.open .apr-arr { color: #7cb0f7; }
/* 행 클릭 시 혜택 상세가 스르륵 펼쳐짐 (grid 0fr→1fr) */
.apr-detail {
    display: grid; grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease;
}
.apr.open .apr-detail { grid-template-rows: 1fr; }
.apr-detail-in {
    overflow: hidden; min-height: 0;
    font-size: 0.68rem; line-height: 1.6; color: #64748b;
    white-space: normal; word-break: keep-all; overflow-wrap: break-word;
    transition: padding 0.3s ease;
}
.apr-detail-in p { margin: 0 0 7px; }
.apr-detail-in p:last-child { margin-bottom: 0; }
.apr.open .apr-detail-in { padding: 0 12px 10px; }
.apr.open { background: #f5f9ff !important; }
body.dark-mode .apr.open { background: #1c2942 !important; }
body.dark-mode .apr-detail-in { color: #9aa7b8; }
.app-note { margin-top: 8px; font-size: 0.66rem; color: #94a3b8; word-break: keep-all; }

/* ================================================================ */
/* == 2026-07-31 공통지원금 진입점: 상단 배너 1:1 + 입력칸 칩       == */
/* == 팝업 자체 스타일은 js/subsidy-modal.js가 주입한다             == */
/* ================================================================ */
/* 상단 배너 2종을 한 줄에 반반 배치 (영상 배너 + 공통지원금 배너) */
.top-banner-row { display: flex; gap: 10px; margin: 0 0 14px; }
.top-banner-row .help-video-banner,
.top-banner-row .subsidy-banner { flex: 1 1 0; min-width: 0; margin: 0; white-space: nowrap; padding: 10px 8px; }

.subsidy-banner {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    background: linear-gradient(90deg, #e7f0ff, #efe9ff);
    border: 1px solid #c3d8fa; border-radius: 10px;
    font-size: 13px; color: #1e3a66; font-weight: 600;
    cursor: pointer; font-family: inherit;
    transition: box-shadow 0.15s, transform 0.15s;
}
.subsidy-banner:hover { box-shadow: 0 4px 12px rgba(26, 115, 232, 0.18); transform: translateY(-1px); }
.subsidy-banner .sbn-emoji { font-size: 15px; flex: 0 0 auto; }
.subsidy-banner .subsidy-date { color: #1a73e8; }
.subsidy-banner .sbn-go { color: #1a73e8; font-weight: 800; flex: 0 0 auto; }
body.dark-mode .subsidy-banner {
    background: linear-gradient(90deg, #1e293b, #26203b);
    border-color: #334155; color: #dbe7ff;
}
body.dark-mode .subsidy-banner .subsidy-date,
body.dark-mode .subsidy-banner .sbn-go { color: #93c5fd; }

/* 좁은 화면: 배지·화살표를 생략해 두 배너 모두 한 줄 보장 */
@media screen and (max-width: 720px) {
    .top-banner-row { gap: 6px; }
    .top-banner-row .help-video-banner,
    .top-banner-row .subsidy-banner { font-size: 11px; gap: 5px; padding: 9px 4px; letter-spacing: -0.3px; }
    .top-banner-row .hvb-go,
    .top-banner-row .sbn-go { display: none; }
}

/* 입력칸 아래 진입 칩 (위약금·유지비=골라 넣기 / 일반 계산기=열람)
   연한 톤은 특히 다크모드에서 카드 배경에 묻혀 "색 없는 버튼"처럼 보임(2026-07-31 피드백)
   → 라이트·다크 모두 확실한 파랑 채움 버튼으로 */
.subsidy-chip {
    display: inline-flex; align-items: center; gap: 5px; margin-top: 7px;
    background: #1a73e8; color: #fff; border: none;
    font-size: 12px; font-weight: 700; border-radius: 99px; padding: 6px 13px;
    cursor: pointer; font-family: inherit; transition: background 0.15s, box-shadow 0.15s;
    box-shadow: 0 1px 3px rgba(26, 115, 232, 0.35);
}
.subsidy-chip:hover { background: #1765cc; box-shadow: 0 2px 6px rgba(26, 115, 232, 0.4); }
.subsidy-chip .subsidy-date { color: inherit; }
body.dark-mode .subsidy-chip { background: #3b82f6; color: #fff; }
body.dark-mode .subsidy-chip:hover { background: #2f6fd8; }

/* 라벨 옆 인라인 변형 (일반 계산기 "기기 구매가" 줄) — 라벨 고정 높이 20px에 맞춤 */
.subsidy-chip--inline {
    margin-top: 0;
    height: 20px;
    padding: 0 10px;
    font-size: 11px;
    gap: 4px;
    white-space: nowrap;
}
/* 비교 모드에서도 각 「기기 구매가」 옆에서 바로 열 수 있게 한다
   (2026-08-15 사장님 요청 — "사용자가 일일이 눌러서 확인 가능하게". 2026-07-31의 숨김 결정을 뒤집음)
   칸이 반폭(PC 260px대·모바일 155px대)이라 문구는 「지원금 ›」로 압축하고 높이는 라벨 줄(16px)에 맞춘다. */
.comparison-mode .subsidy-chip--inline {
    height: 16px;
    padding: 0 7px;
    font-size: 9.5px;
    gap: 2px;
}
.comparison-mode .subsidy-chip--inline .sc-emoji,
.comparison-mode .subsidy-chip--inline .subsidy-date,
.comparison-mode .subsidy-chip--inline .sc-fac { display: none; }
/* ≤768px 비교모드: 라벨 줄 높이가 16px로 고정(좌우 열 높이 맞춤, style-responsive)이라
   칩을 그 줄에 두면 넘쳐 잘린다 → 흐름에서 빼서 입력칸 오른쪽 안쪽에 붙인다.
   (입력칸에는 오른쪽 패딩을 줘서 금액과 겹치지 않게) */
@media screen and (max-width: 768px) {
    .comparison-mode .device-price-group { position: relative; }
    /* style-responsive의 `.comparison-mode .section .input-group input.number-input{padding:4px 10px!important}`를
       이겨야 입력 글자가 칩 밑으로 들어가지 않는다 — 같은 특이도 + !important */
    .comparison-mode .section .input-group.device-price-group input.number-input { padding-right: 56px !important; }
    .comparison-mode .device-price-label-row .subsidy-chip--inline {
        position: absolute;
        right: 7px;
        bottom: 9px; /* 비교모드 입력칸 34px 안에서 세로 중앙 ((34-16)/2) */
        z-index: 2;
    }
}
@media screen and (max-width: 768px) {
    .subsidy-chip--inline { height: 16px; padding: 0 6px; font-size: 9.5px; gap: 3px; }
    /* 모바일은 단독 계산기도 좁으므로 "지원금 ›"까지 압축 + 간격 조임 (360px에서 3px 차이로 감기던 것) */
    .subsidy-chip--inline .subsidy-date,
    .subsidy-chip--inline .sc-fac,
    .subsidy-chip--inline .sc-emoji { display: none; }
    /* style-components(더 나중에 로드)의 column-gap:8px를 이기도록 특이도 확보 */
    .device-payment-row .device-price-label-row { column-gap: 5px; }
}

/* SKT 온가족할인 신규 종료 안내 (26.08.01~ modals.js가 자동 주입)
   팝업 폭 360px 기준 딱 2줄에 들어가도록 문구·크기 조율 (3줄로 감기던 문제 2026-07-31) */
.onfamily-close-note {
    margin: 10px 0 0;
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    font-size: 12px;
    line-height: 1.5;
    border-radius: 10px;
    padding: 8px 11px;
    word-break: keep-all;
    text-align: center;
}
body.dark-mode .onfamily-close-note {
    background: #451a03;
    border-color: #b45309;
    color: #fde68a;
}
