/* 동별 경쟁·입지 리포트 공개 (/dong_report.php) */
/* 좌측 intro(실시간 랭킹 플랫폼) 제거, 본문 단일 컬럼 확장 */
body.dong-report-page #main_intro {
    display: none !important;
}

body.dong-report-page #main_content {
    width: 100%;
    max-width: 1000px;
}

.bh-dong-report {
    max-width: 1000px;
    margin: 0 auto 48px;
    padding: 0 0px 24px;
    box-sizing: border-box;
    color: #1f2937;
    font-size: 15px;
    line-height: 1.55;
}

.bh-dong-report__hero {
    margin: 16px 0 18px;
    padding: 24px 20px 28px;
    border-radius: 18px;
    background:
        radial-gradient(100% 80% at 100% 0%, rgba(56, 189, 248, 0.2) 0%, rgba(56, 189, 248, 0) 55%),
        linear-gradient(165deg, #f0f9ff 0%, #e0f2fe 45%, #f8fafc 100%);
    color: #0f172a;
}

.bh-dong-report__eyebrow {
    display: inline-block;
    margin: 0 0 10px;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(14, 165, 233, 0.25);
    background: rgba(255, 255, 255, 0.75);
    font-size: 14px;
    font-weight: 700;
    color: #0284c7;
}

.bh-dong-report__title {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.bh-dong-report__lead {
    margin: 0;
    font-size: 14px;
    color: #475569;
    line-height: 1.65;
}

.bh-dong-report__filter {
    margin: 0 0 20px;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
}

.bh-dong-report__label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #334155;
}

.bh-dong-report__filter-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.bh-dong-report__filter-row--selects {
    gap: 10px;
}

.bh-dong-report__select-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1 1 140px;
    min-width: 120px;
}

.bh-dong-report__select-label {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
}

.bh-dong-report__select {
    width: 100%;
    min-height: 42px;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    font-size: 15px;
    color: #0f172a;
    box-sizing: border-box;
}

.bh-dong-report__input {
    flex: 1 1 200px;
    min-height: 42px;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 15px;
    box-sizing: border-box;
}

.bh-dong-report__btn {
    min-height: 42px;
    padding: 0 18px;
    border: 0;
    border-radius: 8px;
    background: #0ea5e9;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.bh-dong-report__btn:hover {
    background: #0284c7;
}

.bh-dong-report__guide {
    margin: 0 0 22px;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    box-sizing: border-box;
}

.bh-dong-report__guide-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.bh-dong-report__guide-title {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.bh-dong-report__guide-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    min-height: 36px;
    padding: 6px 12px;
    border: 1px solid #bae6fd;
    border-radius: 999px;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    cursor: pointer;
}

.bh-dong-report__guide-toggle:hover {
    background: #bae6fd;
}

.bh-dong-report__guide-toggle--open {
    background: #e0f2fe;
    border-color: #7dd3fc;
}

.bh-dong-report__guide-toggle-icon {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid currentColor;
    transition: transform 0.2s ease;
}

.bh-dong-report__guide-toggle--open .bh-dong-report__guide-toggle-icon {
    transform: rotate(180deg);
}

.bh-dong-report__guide-body {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.bh-dong-report__guide-lead {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.6;
    color: #64748b;
}

.bh-dong-report__guide-lead strong {
    color: #334155;
    font-weight: 700;
}

.bh-dong-report__guide-lead em {
    font-style: normal;
    font-weight: 700;
    color: #b91c1c;
}

.bh-dong-report__guide-levels {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.bh-dong-report__guide-levels > li {
    display: grid;
    grid-template-columns: 88px 92px 1fr;
    gap: 8px 10px;
    align-items: center;
    padding: 8px 10px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #f1f5f9;
    box-sizing: border-box;
}

.bh-dong-report__guide-levels .bh-dong-report__level {
    justify-self: start;
    text-align: center;
    min-width: 72px;
}

.bh-dong-report__guide-range {
    font-size: 14px;
    font-weight: 700;
    color: #475569;
    font-variant-numeric: tabular-nums;
}

.bh-dong-report__guide-desc {
    font-size: 14px;
    color: #64748b;
    line-height: 1.45;
}

@media (max-width: 640px) {
    .bh-dong-report__guide-levels > li {
        grid-template-columns: auto 1fr;
        gap: 6px 10px; /* 세로 간격 6px, 가로 간격 10px */
    }

    /* 2. 3번째 요소(설명문)를 1열부터 끝열까지 전체 차지하도록 설정 */
  .bh-dong-report__guide-levels > li > .bh-dong-report__guide-desc {
    grid-column: 1 / -1; /* 1열부터 마지막 열까지 전체 사용 (강제 줄바꿈) */
  }

    .bh-dong-report__guide-range {
        color: #0f172a;
    }
}

.bh-dong-report__guide-score {
    margin-top: 12px;
    padding: 12px 12px 10px;
    border-radius: 10px;
    border: 1px solid #e0f2fe;
    background: #f0f9ff;
}

.bh-dong-report__guide-score-title {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 800;
    color: #0c4a6e;
}

.bh-dong-report__guide-score-lead {
    margin: 0 0 8px;
    font-size: 14px;
    line-height: 1.55;
    color: #475569;
}

.bh-dong-report__guide-score-lead strong {
    color: #0369a1;
    font-weight: 700;
}

.bh-dong-report__guide-score-lead em {
    font-style: normal;
    font-weight: 700;
    color: #b91c1c;
}

.bh-dong-report__guide-score-formula {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: #64748b;
}

.bh-dong-report__guide-score-formula code {
    display: inline-block;
    margin: 0 2px;
    padding: 2px 8px;
    border-radius: 6px;
    background: #fff;
    border: 1px solid #bae6fd;
    color: #0f172a;
    font-size: 14px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.bh-dong-report__guide-score-ex {
    display: block;
    margin-top: 6px;
    color: #64748b;
}

.bh-dong-report__list-title {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 800;
}

.bh-dong-report__cards {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.bh-dr-card {
    padding: 16px 16px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
}

.bh-dr-card--region {
    background: #f5f3ff;
    border-color: #c7d2fe;
}

.bh-dr-card--summary {
    border-color: #cbd5e1;
}

.bh-dr-card--child {
    margin-left: 12px;
    background: #f8fafc;
    border-color: #e2e8f0;
    border-left: 4px solid #94a3b8;
}

.bh-dr-stem-child[hidden] {
    display: none !important;
}

.bh-dr-card__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.bh-dr-card__title-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex: 1 1 200px;
    min-width: 0;
}

.bh-dr-card__title {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.4;
    color: #0f172a;
}

.bh-dr-badge-sub,
.bh-dr-badge-region {
    display: inline-block;
    margin-right: 6px;
    padding: 1px 8px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 700;
    vertical-align: middle;
}

.bh-dr-badge-sub {
    background: #e2e8f0;
    color: #475569;
}

.bh-dr-badge-region {
    background: #4338ca;
    color: #fff;
}

.bh-dr-stem-toggle {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 4px;
    margin: 2px 0 0;
    padding: 4px 10px;
    border: 1px solid #bae6fd;
    border-radius: 999px;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    cursor: pointer;
}

.bh-dr-stem-toggle:hover {
    background: #bae6fd;
}

.bh-dr-stem-toggle--open {
    background: #e0f2fe;
    border-color: #bae6fd;
    color: #0369a1;
}

.bh-dr-stem-toggle__icon {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid currentColor;
    transition: transform 0.2s ease;
}

.bh-dr-stem-toggle--open .bh-dr-stem-toggle__icon {
    transform: rotate(180deg);
}

.bh-dr-card__summary {
    margin: 0 0 12px;
    font-size: 14px;
    color: #475569;
    line-height: 1.55;
}

.bh-dong-report__level {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
    background: #f1f5f9;
    color: #334155;
    white-space: nowrap;
}

.bh-dong-report__level--매우치열 {
    background: #fef2f2;
    color: #b91c1c;
}

.bh-dong-report__level--치열 {
    background: #fff7ed;
    color: #c2410c;
}

.bh-dong-report__level--보통 {
    background: #f1f5f9;
    color: #475569;
}

.bh-dong-report__level--여유 {
    background: #ecfdf5;
    color: #047857;
}

.bh-dong-report__level--매우여유 {
    background: #eff6ff;
    color: #1d4ed8;
}

.bh-dong-report__level--데이터부족 {
    background: #f8fafc;
    color: #94a3b8;
}

.bh-dong-report__stats {
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.bh-dong-report__stats li {
    padding: 10px 12px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.bh-dr-card--region .bh-dong-report__stats li {
    background: #fff;
}

.bh-dong-report__stat-label {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    color: #64748b;
}

.bh-dong-report__stats strong {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
}

.bh-dr-card__age {
    margin-top: 4px;
}

/* 연령분포 패널 (관리자 공통 HTML 클래스) */
.dr-age-panel {
    padding: 10px 12px 12px;
    border-radius: 8px;
    background: linear-gradient(180deg, #e0f2fe 0%, #f8fafc 100%);
    border: 1px solid #bae6fd;
    border-left: 4px solid #0ea5e9;
}

.bh-dr-card--region .dr-age-panel {
    background: linear-gradient(180deg, #e0e7ff 0%, #f8fafc 100%);
    border-color: #c7d2fe;
    border-left-color: #6366f1;
}

.dr-age-panel__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.dr-age-panel__tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    background: #0284c7;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

.bh-dr-card--region .dr-age-panel__tag {
    background: #4338ca;
}

.dr-age-panel__hint {
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
}

.dr-age-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.dr-age-card {
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #fff;
}

.dr-age-card--empty {
    opacity: 0.72;
}

.dr-age-card--peak {
    border-color: #fca5a5;
    box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.12);
}

.dr-age-card__head {
    padding: 6px 8px;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 14px;
    font-weight: 800;
    text-align: center;
}

.bh-dr-card--region .dr-age-card__head {
    background: #e0e7ff;
    color: #3730a3;
}

.dr-age-card__body {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
}

.dr-age-card__col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 4px;
    border-right: 1px solid #f1f5f9;
}

.dr-age-card__col:last-child {
    border-right: none;
    background: #f8fafc;
}

.dr-age-card__key {
    color: #94a3b8;
    font-size: 14px;
    font-weight: 600;
}

.dr-age-card__val {
    font-size: 14px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #0f172a;
}

.dr-age-card__val--m {
    color: #1d4ed8;
}

.dr-age-card__val--f {
    color: #be185d;
}

.dr-age-card__val--t {
    color: #0f172a;
    font-weight: 800;
}

.dr-age-card__pct {
    display: block;
    margin-top: 2px;
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.dr-age-peak {
    display: inline-block;
    margin-right: 2px;
    color: #dc2626;
    font-size: 12px;
    line-height: 1;
    vertical-align: middle;
}

.dr-age-peak-hint {
    margin-left: 6px;
    color: #dc2626;
    font-weight: 700;
}

.bh-dong-report__empty {
    margin: 12px 0 0;
    padding: 18px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
}

@media (max-width: 720px) {
    .bh-dong-report__stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dr-age-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    /* 통계 카드는 좁은 화면에서도 2열 유지 (1열 반응형 제외) */

    .bh-dong-report__title {
        font-size: 22px;
    }

    .bh-dr-card--child {
        margin-left: 0;
    }

    .dr-age-grid {
        grid-template-columns: 1fr;
    }
}
