/* =========================================================
   면세점매니아 메인/가이드 페이지 (2026.11 리뉴얼)
   ========================================================= */
.dfm-home,
.dfm-home *,
.dfm-home *::before,
.dfm-home *::after {
    box-sizing: border-box;
}
.dfm-home {
    --brand: #0d9488;
    --brand-dark: #0f766e;
    --brand-soft: #e6f7f5;
    --ink: #0f172a;
    --ink-2: #334155;
    --muted: #64748b;
    --line: #e2e8f0;
    --bg: #f5f7fa;
    --up: #e11d48;
    --down: #2563eb;
    --radius: 16px;
    overflow-x: clip;
}

.dfm-home main.content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 760px;
    padding: 18px 14px 32px;
}
.dfm-home h2 { margin: 0; }

/* 공통 카드 */
.dfm-home .card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.dfm-home .card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.dfm-home .card-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.4px;
    margin: 0 0 6px;
    text-align: left;
}
.dfm-home .card-head .card-title { margin: 0; }
.dfm-home .card-desc {
    margin: 0 0 14px;
    font-size: 14px;
    color: var(--muted);
}

/* ① 히어로 환율 카드 */
.rate-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(140deg, #0f766e 0%, #0d9488 55%, #14b8a6 100%);
    color: #fff;
    border-radius: 20px;
    padding: 24px 22px 20px;
    box-shadow: 0 12px 30px rgba(13, 148, 136, 0.28);
}
.rate-hero::after {
    content: '';
    position: absolute;
    right: -60px;
    top: -60px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    pointer-events: none;
}
.rate-hero-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.rate-hero-head h2 {
    font-size: 16px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.92);
    letter-spacing: -0.3px;
}
.status-badge {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
}
.status-badge.ok::before { content: '● '; color: #a7f3d0; }
.status-badge.wait::before { content: '● '; color: #fde68a; }

.rate-big {
    margin-top: 10px;
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}
.rate-big strong {
    font-size: 52px;
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.05;
    font-variant-numeric: tabular-nums;
}
.rate-big.pending strong { font-size: 32px; }
.rate-big .unit {
    font-size: 16px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}
.rate-diff {
    display: inline-block;
    margin-top: 10px;
    font-size: 14px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--ink-2);
}
.rate-diff.up { color: var(--up); }
.rate-diff.down { color: var(--down); }

.rate-sub {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 18px;
}
.rate-sub-item {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.rate-sub-item .label { font-size: 12px; color: rgba(255, 255, 255, 0.8); }
.rate-sub-item .value { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.rate-answer {
    margin: 16px 0 0;
    font-size: 14.5px;
    line-height: 1.6;
    font-weight: 600;
}
.rate-meta {
    margin: 6px 0 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.5;
}

/* ② 통계 */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.stat-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
}
.stat-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.stat-value {
    font-size: 19px;
    font-weight: 800;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}
.stat-date { font-size: 11.5px; color: #94a3b8; }
.dfm-home .up { color: var(--up); }
.dfm-home .down { color: var(--down); }

/* ③ 계산기 */
.calc-input {
    display: flex;
    align-items: center;
    border: 2px solid var(--line);
    border-radius: 12px;
    padding: 0 14px;
    background: #f8fafc;
    transition: border-color .15s, background .15s;
}
.calc-input:focus-within { border-color: var(--brand); background: #fff; }
.calc-prefix { font-size: 22px; font-weight: 800; color: var(--muted); }
.calc-input input {
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    font: inherit;
    font-size: 24px;
    font-weight: 800;
    color: var(--ink);
    padding: 12px 8px;
    width: 100%;
    min-width: 0;
}
.calc-quick {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin: 10px 0 14px;
}
.calc-quick button,
.seg button {
    font: inherit;
    cursor: pointer;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink-2);
    font-size: 13px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 999px;
    transition: all .15s;
}
.calc-quick button:hover { border-color: var(--brand); color: var(--brand); }
.calc-result {
    background: var(--brand-soft);
    border-radius: 12px;
    padding: 12px 14px;
}
.calc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 14px;
    color: var(--ink-2);
}
.calc-row strong { font-size: 17px; color: var(--ink); font-variant-numeric: tabular-nums; }
.calc-verdict {
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px dashed #99d5cf;
    font-size: 14px;
    font-weight: 700;
    color: var(--brand-dark);
}
.calc-verdict:empty { display: none; }
.calc-verdict.down { color: var(--down); }
.calc-verdict.up { color: var(--up); }

/* ⑤ 그래프 */
.seg {
    display: inline-flex;
    background: #f1f5f9;
    border-radius: 999px;
    padding: 3px;
    gap: 2px;
}
.seg button {
    border: 0;
    background: transparent;
    padding: 6px 12px;
    font-size: 12.5px;
}
.seg button.active {
    background: #fff;
    color: var(--brand-dark);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}
.chart-box { width: 100%; max-width: 100%; height: 320px; overflow: hidden; }

/* ⑥ 표 */
.dfm-home table.dfm-table {
    width: 100%;
    margin: 4px 0 0;
    border-collapse: collapse;
    border-spacing: 0;
    font-size: 14px;
}
.dfm-home table.dfm-table th {
    width: auto;
    background: #f8fafc;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 700;
    padding: 10px 8px;
    border-bottom: 1px solid var(--line);
}
.dfm-home table.dfm-table td {
    width: auto;
    background: #fff;
    padding: 10px 8px;
    border-bottom: 1px solid #f1f5f9;
    color: var(--ink-2);
}
.dfm-home table.dfm-table td.num { font-variant-numeric: tabular-nums; font-weight: 600; }
.dfm-home table.dfm-table td.hl { color: var(--brand-dark); font-weight: 700; }
.dfm-home table.dfm-table tr.is-tomorrow td { background: #f0fdfa; font-weight: 700; }
.dfm-home table.dfm-table tr.is-today td { background: #f8fafc; }
.dfm-home .tag {
    font-style: normal;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: var(--brand);
    border-radius: 6px;
    padding: 1px 6px;
    margin-left: 4px;
    vertical-align: 1px;
}
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ⑦ FAQ */
.faq details {
    border-bottom: 1px solid #f1f5f9;
    padding: 12px 0;
}
.faq details:last-of-type { border-bottom: 0; }
.faq summary {
    cursor: pointer;
    list-style: none;
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
    display: flex;
    justify-content: space-between;
    gap: 10px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--brand); font-weight: 800; }
.faq details[open] summary::after { content: '−'; }
.faq details p {
    margin: 8px 0 0;
    font-size: 14px;
    line-height: 1.7;
    color: var(--ink-2);
}
.more-link {
    display: inline-block;
    margin-top: 12px;
    font-size: 14px;
    font-weight: 700;
    color: var(--brand-dark) !important;
}

/* ⑧ 공유 */
.share-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}
.share-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.share-btns { display: flex; gap: 8px; }
.share-btns a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .15s;
}
.share-btns a:hover { transform: translateY(-2px); }
.share-btns img { width: 22px; height: 22px; object-fit: contain; }

/* ⑨ 면세점 리스트 */
.store-list summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.store-list summary::-webkit-details-marker { display: none; }
.store-list summary .card-title { margin: 0; }
.store-list summary::after { content: '펼치기 ▾'; font-size: 13px; color: var(--brand-dark); font-weight: 700; flex-shrink: 0; }
.store-list details[open] summary::after { content: '접기 ▴'; }
.store-list details[open] summary { margin-bottom: 12px; }
.dfm-home table.dfsList { border-collapse: collapse; font-size: 13px; margin: 0; }
.dfm-home table.dfsList th { width: auto; background: #f8fafc; color: var(--muted); padding: 8px; border-bottom: 1px solid var(--line); }
.dfm-home table.dfsList td { width: auto; background: #fff; padding: 8px; border-bottom: 1px solid #f1f5f9; color: var(--ink-2); text-align: left; }

/* 혜택 배너 간격 보정 */
.dfm-home .dfs-unified-hero-wrap { margin: 0; }

/* ── 가이드 페이지 ── */
.breadcrumb { font-size: 13px; color: var(--muted); }
.breadcrumb a { color: var(--brand-dark); }
.guide {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px 22px;
    color: var(--ink-2);
    line-height: 1.75;
    font-size: 15px;
}
.guide h1 {
    text-align: left;
    font-size: 26px;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.6px;
    margin: 0 0 10px;
}
.guide .lead { font-size: 16px; color: var(--ink-2); margin: 0 0 18px; }
.guide section { margin-top: 30px; }
.guide h2 { font-size: 20px; font-weight: 800; color: var(--ink); letter-spacing: -0.4px; margin: 0 0 12px; }
.guide h3 { font-size: 16px; font-weight: 700; color: var(--ink); margin: 20px 0 8px; }
.guide p { margin: 10px 0; }
.guide .callout {
    background: var(--brand-soft);
    border-left: 4px solid var(--brand);
    border-radius: 0 12px 12px 0;
    padding: 12px 16px;
}
.guide .callout p { margin: 6px 0; }
.guide-now {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 12px;
    align-items: center;
    background: linear-gradient(140deg, #0f766e, #14b8a6);
    color: #fff !important;
    border-radius: 14px;
    padding: 14px 18px;
}
.guide-now .label { display: block; font-size: 12px; opacity: .85; }
.guide-now strong { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.guide-now .go { font-size: 13px; font-weight: 700; white-space: nowrap; }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--brand); }
.timeline li { position: relative; padding: 4px 0 14px 18px; margin: 0; display: flex; flex-direction: column; }
.timeline li::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 10px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--brand);
}
.timeline .when { font-size: 13px; font-weight: 700; color: var(--brand-dark); }
.timeline .what { font-size: 15px; color: var(--ink); }
.guide .facts { padding-left: 18px; margin: 12px 0; }
.guide .facts li { margin-bottom: 8px; }
.guide .stat-grid { margin: 14px 0; }
.guide .disclaimer { margin-top: 30px; font-size: 12.5px; color: #94a3b8; }

/* 반응형 */
@media (max-width: 600px) {
    .dfm-home .card { padding: 16px; }
    .rate-hero { padding: 20px 16px 16px; border-radius: 18px; }
    .rate-big strong { font-size: 42px; }
    .rate-sub-item .value { font-size: 16px; }
    .stat-value { font-size: 16px; }
    .stat-card { padding: 12px 6px; }
    .chart-box { height: 260px; }
    .card-head { align-items: flex-start; }
    .guide { padding: 20px 16px; }
    .guide h1 { font-size: 22px; }
    .guide-now { grid-template-columns: 1fr 1fr; }
    .guide-now .go { grid-column: 1 / -1; text-align: right; }
}
