html, body {
    max-width: 100%;
    overflow-x: hidden;
    touch-action: manipulation;
}

:root {
    --page-gutter: 24px;
    --nav-h: 51px;
}
@media (max-width: 767px) {
    :root {
        --page-gutter: 16px;
    }
}
.scene {
    padding-left: var(--page-gutter);
    padding-right: var(--page-gutter);
}
.scene .row {
    margin-left: -5px;
    margin-right: -5px;
}
#navBar > .container-fluid {
    padding-left: var(--page-gutter);
    padding-right: var(--page-gutter);
}

td {
    padding: 7px;
    font-size: 13px;
}
.row-h1 {
    font-size: 20px;
}
.row-h2 {
    font-size: 18px;
}
.ratio-hint {
    font-size: 8px;
    color: #a1a1aa;
}
div.date-sales-table table > tbody > tr > td {
    vertical-align: middle;   /* bootstrap .table 의 top 정렬보다 우선 */
    font-variant-numeric: tabular-nums;
}
div.date-sales-table .ratio-hint,
div.country-table .ratio-hint {
    font-size: inherit;
    color: #71717a;
    display: inline-block;
    width: 3.6em;
    text-align: right;
    margin-left: 6px;
}
div.date-sales-table td:nth-child(n+2),
div.date-sales-table th:nth-child(n+2) {
    border-left: 1px solid #e4e4e7;
}
div.date-sales-table td:nth-child(n+2) {
    padding-left: 16px;
}

/* 기간별 매출 하단 날짜별 표 — 데스크탑 4열(Total/Google/Codashop/1D3) 한 줄 배치용 컴팩트 */
div.country-table .table > tbody > tr > td,
div.country-table .table > tbody > tr > th {
    font-size: 12px;
    padding: 4px 5px;
    vertical-align: middle;
    font-variant-numeric: tabular-nums;
}
div.country-table .table > tbody > tr > td {
    font-size: 13px;
}
div.country-table .table > tbody > tr > td:first-child,
div.country-table .table > tbody > tr > th:first-child {
    width: 1%;
}
div.country-table {
    overflow-x: auto;
}
.country-tables-flex {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -5px;
}
.country-tables-flex > .col-lg-3 {
    flex: 1 1 100%;
    width: auto;
    min-width: 0;
}
@media (min-width: 1200px) {
    .country-tables-flex {
        flex-wrap: nowrap;
    }
    .country-tables-flex > .col-lg-3 {
        flex: 1 1 auto;
    }
}

div[class^="col-"] {
    padding-right: 5px;
    padding-left: 5px;
}

.items-table td, .items-table th {
    font-size: 12px;
}

div.topic-title {
    padding-top: 10px;
    padding-bottom: 10px;
    margin-top: 10px;
    margin-bottom: 10px;
}

div.topic-title>h3 {
    padding: 0px;
    margin: 0px;
}

div.topic-title>h3>small {
    margin-left: 10px;
    font-size: 15px;
    color: #52525b;
}

#controlSection>div {
    margin-bottom: 20px;
}

.vary-status-increase {
    color: #dc2626;
}
.vary-status-decrease {
    color: #2563eb;
}
#revenueDetails {
    margin: 1em 0;
}
#revenueDetails h3 {
    margin-bottom: 20px;
}
.revenue-table table>tbody>tr>td,table>thead>tr>th {
    padding: 8px 4px !important;
}
.revenue-table th {
    text-align: right;
    position: sticky;
    top: 0;
    background-color: #fff;
    box-shadow: 0 1px 0 #e4e4e7;
}
.revenue-table th:first-child,
.revenue-table td:first-child {
    text-align: left;
}
#revenueDailyTable, #netProfitDailyTable {
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}
#revenueDailyTable:hover, #netProfitDailyTable:hover {
    scrollbar-color: #d4d4d8 transparent;
}
#revenueDailyTable::-webkit-scrollbar, #netProfitDailyTable::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
#revenueDailyTable::-webkit-scrollbar-thumb, #netProfitDailyTable::-webkit-scrollbar-thumb {
    background-color: transparent;
    background-clip: padding-box;
    border: 2px solid transparent;
    border-radius: 999px;
}
#revenueDailyTable:hover::-webkit-scrollbar-thumb, #netProfitDailyTable:hover::-webkit-scrollbar-thumb {
    background-color: #d4d4d8;
}
#revenueDailyTable::-webkit-scrollbar-track, #netProfitDailyTable::-webkit-scrollbar-track {
    background: transparent;
}
#revenueDailyTable::-webkit-scrollbar-corner, #netProfitDailyTable::-webkit-scrollbar-corner {
    background: transparent;
}
.revenue-table tr.row-year-basis > td {
    background-color: #f5f3ff;
    font-weight: 600;
    border-bottom: 2px solid #ddd6fe;
}
.revenue-table tr.row-year-basis > td:first-child {
    color: #6d28d9;
}
.revenue-table tr.row-average {
    cursor: pointer;
}
.revenue-table tr.row-average > td {
    background-color: #fafafa;
    transition: background-color 0.15s ease;
}
.revenue-table tr.row-average:hover:not(:has(.basis-chip.active)) > td {
    background-color: #f4f4f5;
}
.basis-chip {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid #e4e4e7;
    background-color: #fff;
    color: #52525b;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.revenue-table tr.row-average:hover .basis-chip:not(.active) {
    border-color: #a1a1aa;
    color: #18181b;
}
.basis-chip.active {
    background-color: #7c3aed;
    border-color: #7c3aed;
    color: #fff;
}
.revenue-table tr.row-average + tr:not(.row-average) > td {
    border-top: 2px solid #e4e4e7;
}
@media (min-width: 992px) {
    .revenue-table {
        display: flex;
    }
    .revenue-table::before,
    .revenue-table::after {
        content: none;
    }
    .revenue-table > div[class^="col-"]:first-child {
        padding-right: 32px;
    }
    .revenue-table > div[class^="col-"] + div[class^="col-"] {
        padding-left: 32px;
        border-left: 1px solid #e4e4e7;
    }
}
@media only screen and (max-width: 570px) {
    .revenue-table table>tbody>tr>td,
    .revenue-table table>tbody>tr>th {
        padding: 6px 2px !important;
    }
    .revenue-table .basis-chip {
        padding: 2px 8px;
        font-size: 11px;
    }
}

/* Bootstrap 스타일 설정 */
.navbar-header::before,.navbar-header::after {
    content: unset;
}

/* toastr 옵션 설정 */
#toast-container.toast-top-center>div {
    width: 350px;
    max-width: calc(100vw - 16px);
}
#toast-container.toast-top-center {
    top: 40px; /* 원하는 만큼만 내려서 여백 확보 */
}

/* 버뮤다 커스텀 스타일 */
#todaySalesContainer {
    padding-bottom: var(--page-gutter);
}

/* 오늘 매출 헤더 */
.bmd-today-header {
    display: flex;
    justify-content: flex-end;
    align-items: baseline;
    gap: 10px;
    margin: 12px 0;
}
#nowDate {
    font-size: 16px;
    color: #777;
    font-variant-numeric: tabular-nums;
}
#totalCoinsToday {
    font-size: 36px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}
#totalUnitLabel {
    font-size: 18px;
    font-weight: 600;
    margin-left: 3px;
}

/* 환율 고정 — 합계 옆에 두어 "이 숫자의 기준" 임을 드러낸다 */
.bmd-fx-lock {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: auto;      /* 헤더는 우측 정렬이라 이 버튼만 왼쪽으로 민다 */
    align-self: center;
}
.bmd-fx-lock-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid #e4e4e7;
    color: #52525b;
    padding: 4px 11px;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    line-height: 1.3;
    border-radius: 999px;
    cursor: pointer;
    transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
.bmd-fx-lock-btn:hover:not(:disabled) {
    border-color: #d4d4d8;
    color: #18181b;
}
.bmd-fx-lock-btn.is-active {
    background: #fff7ed;
    border-color: #fb923c;
    color: #c2410c;
}
.bmd-fx-lock-btn:disabled {
    color: #a1a1aa;
    background: #fafafa;
    cursor: not-allowed;
}
.bmd-fx-lock-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #d4d4d8;
    transition: background 0.18s ease, box-shadow 0.18s ease;
}
.bmd-fx-lock-btn.is-active .bmd-fx-lock-dot {
    background: #fb923c;
    box-shadow: 0 0 0 3px rgba(251,146,60,0.22);
}

/* 고정 환율의 기준(30일 평균/최고/최저). 고정 중일 때만 나타난다 */
.bmd-fx-basis {
    position: relative;
    display: inline-flex;
}
.bmd-fx-basis-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #ffffff;
    border: 1px solid #e4e4e7;
    color: #52525b;
    padding: 4px 9px 4px 11px;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    line-height: 1.3;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.18s ease, border-color 0.18s ease;
}
.bmd-fx-basis-btn:hover {
    border-color: #d4d4d8;
    color: #18181b;
}
.bmd-fx-basis-caret {
    color: #a1a1aa;
    flex: none;
}
.bmd-fx-basis-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 70;
    min-width: 232px;
    padding: 4px;
    background: #ffffff;
    border: 1px solid #e4e4e7;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
    text-align: left;
    white-space: normal;
}
.bmd-fx-basis-item {
    display: grid;
    grid-template-columns: 1fr auto 14px;
    align-items: baseline;
    gap: 8px;
    width: 100%;
    background: none;
    border: 0;
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-family: inherit;
    color: #52525b;
    cursor: pointer;
    text-align: left;
}
.bmd-fx-basis-item:hover {
    background: #fafafa;
}
.bmd-fx-basis-item.is-selected {
    color: #c2410c;
    font-weight: 600;
}
.bmd-fx-basis-item-name {
    white-space: nowrap;
}
.bmd-fx-basis-item-rate {
    color: #a1a1aa;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}
.bmd-fx-basis-check {
    visibility: hidden;
    color: #fb923c;
}
.bmd-fx-basis-item.is-selected .bmd-fx-basis-check {
    visibility: visible;
}
/* 기준을 고르는 동안에는 환율표가 겹쳐 뜨지 않게 한다 */
.bmd-fx-lock.is-picking .bmd-fx-rate-panel {
    display: none;
}

.bmd-fx-rate-panel {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 60;
    width: 300px;
    max-width: calc(100vw - 32px);
    background: #ffffff;
    border: 1px solid #e4e4e7;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
    overflow: hidden;
    cursor: default;
    white-space: normal;
    text-align: left;
}
.bmd-fx-lock:hover .bmd-fx-rate-panel,
.bmd-fx-lock:focus-within .bmd-fx-rate-panel {
    display: block;
}
.bmd-fx-panel-head {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 14px 8px;
    border-bottom: 1px solid #f4f4f5;
}
.bmd-fx-panel-title {
    font-size: 12px;
    font-weight: 700;
    color: #18181b;
}
.bmd-fx-panel-base {
    font-size: 11px;
    font-weight: 500;
    color: #a1a1aa;
    font-variant-numeric: tabular-nums;
}
.bmd-fx-panel-list {
    max-height: 320px;
    overflow-y: auto;
    padding: 4px 0;
}
.bmd-fx-panel-row {
    display: grid;
    grid-template-columns: 46px 1fr 56px;
    align-items: baseline;
    gap: 8px;
    padding: 3px 14px;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}
.bmd-fx-panel-row:hover {
    background: #fafafa;
}
.bmd-fx-panel-code {
    font-weight: 600;
    color: #52525b;
}
.bmd-fx-panel-rate {
    text-align: right;
    color: #18181b;
}
.bmd-fx-panel-share {
    text-align: right;
    color: #a1a1aa;
    font-size: 11px;
}
.bmd-fx-panel-foot {
    padding: 8px 14px 10px;
    border-top: 1px solid #f4f4f5;
    font-size: 11px;
    line-height: 1.5;
    color: #71717a;
}

#todaySalesTable, #dailySalesTable, #weeklySalesTable, #monthlySalesTable {
    margin-top: 7px;
}

/* 테이블이 가로로 스크롤 되도록 설정 */
#todaySalesTable, #dailySalesTable, #weeklySalesTable, #monthlySalesTable, #revenueDailyTable, #netProfitDailyTable,
.purchase-count-and-users-table, .items-table, .country-table {
    overflow-x: scroll;
    white-space: nowrap;
}

.bmd-nav-toggle {
    width: 42px;
    height: 42px;
    margin: 4px 8px 4px 0;
    padding: 13px 12px;
    border: none;
    border-radius: 10px;
    background-color: transparent;
    -webkit-tap-highlight-color: transparent;
}
.navbar-default .bmd-nav-toggle:hover {
    background-color: transparent;
}
@media (hover: hover) {
    .navbar-default .bmd-nav-toggle:hover {
        background-color: #f4f4f5;
    }
}
.navbar-default .bmd-nav-toggle:focus {
    background-color: transparent;
    outline: none;
}
.navbar-default .bmd-nav-toggle:focus-visible {
    outline: 2px solid #71717a;
    outline-offset: 2px;
}
.navbar-default .bmd-nav-toggle .icon-bar {
    width: 18px;
    height: 2px;
    margin: 0 auto;
    border-radius: 999px;
    background-color: #18181b;
}
.navbar-default .bmd-nav-toggle .icon-bar + .icon-bar {
    margin-top: 5px;
}
.navbar-default .bmd-nav-toggle:not(.collapsed) .icon-bar:nth-child(2) {
    transform: translateY(7px) rotate(45deg);
}
.navbar-default .bmd-nav-toggle:not(.collapsed) .icon-bar:nth-child(3) {
    opacity: 0;
}
.navbar-default .bmd-nav-toggle:not(.collapsed) .icon-bar:nth-child(4) {
    transform: translateY(-7px) rotate(-45deg);
}

.navbar.navbar-default {
    background-color: #fff;
    background-image: none;
    border: none;
    border-bottom: 1px solid #e4e4e7;
    border-radius: 0;
}
.navbar-default .navbar-nav > li > a {
    position: relative;
    color: #71717a;
    font-size: 13.5px;
    font-weight: 400;
}
.navbar-default .navbar-nav > li > a:focus {
    outline: none;
}
.navbar-default .navbar-nav > li > a:focus-visible {
    outline: 2px solid #71717a;
    outline-offset: -2px;
}
.navbar-default .navbar-nav > li > a:hover,
.navbar-default .navbar-nav > li > a:focus {
    color: #18181b;
    background-color: transparent;
}
.navbar-default .navbar-nav > .active > a,
.navbar-default .navbar-nav > .active > a:hover,
.navbar-default .navbar-nav > .active > a:focus {
    color: #18181b;
    font-weight: 600;
    background-color: transparent;
}
@media (min-width: 768px) {
    .navbar-nav > .navbar-item:not(.nb-logout) > a > .glyphicon {
        display: none;
    }
    .navbar-default .navbar-nav > .active > a::after {
        content: "";
        position: absolute;
        left: 13px;
        right: 13px;
        bottom: 0;
        height: 2px;
        border-radius: 999px;
        background-color: #18181b;
    }
}
@media (max-width: 767px) {
    .navbar-nav > .navbar-item > a > .glyphicon {
        width: 1.2em;
        text-align: center;
        margin-right: 4px;
    }
    #navbar-collapse .navbar-nav:not(:last-child) {
        margin-bottom: 0;
    }
    #navbar-collapse .navbar-nav + .navbar-nav {
        margin-top: 0;
    }
    .navbar-default .navbar-nav > li > a {
        border-radius: 8px;
    }
    .navbar-default .navbar-nav > .active > a,
    .navbar-default .navbar-nav > .active > a:hover,
    .navbar-default .navbar-nav > .active > a:focus {
        background-color: #f4f4f5;
    }
}

.bmd-loading-overlay {
    position: fixed;
    top: 51px;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.6);
    z-index: 1050;
    pointer-events: none;
}
.bmd-loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e4e4e7;
    border-top-color: #7c3aed;
    border-radius: 50%;
    animation: bmd-spin 0.8s linear infinite;
}
@keyframes bmd-spin {
    to { transform: rotate(360deg); }
}

.scene {
    animation: bmd-scene-in 0.15s ease-out;
}
@keyframes bmd-scene-in {
    from { opacity: 0.5; }
    to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .bmd-loading-spinner,
    .scene {
        animation: none;
    }
}

.bmd-nav-toggle-container {
    --bmd-check-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M3 8.5l3.2 3.2L13 5'/%3E%3C/svg%3E");
    display: flex;
    flex-direction: row;
    align-items: center;
    padding-left: 0;
    margin-left: -3px;
}
@media (max-width: 767px) {
    .bmd-nav-toggle-container {
        padding-left: var(--page-gutter);
        margin-left: 0;
    }
}

.bmd-dropdown-toggle {
    padding: 0;
    margin: 4px 6px 4px 0;
    border: none;
    border-radius: 10px;
    background-color: transparent;
    overflow: hidden;
    transition: background-color 0.15s ease;
}
.bmd-dropdown-toggle:hover {
    background-color: #f4f4f5;
}
.open > .bmd-dropdown-toggle {
    background-color: #ede9fe;
}

.bmd-nav-toggle-container .dropdown-menu {
    min-width: 200px;
    margin-top: 6px;
    padding: 6px;
    border: 1px solid #e4e4e7;
    border-radius: 12px;
    background: #fefefe;
    box-shadow: 0 1px 2px rgba(24, 24, 27, 0.05), 0 12px 32px -8px rgba(24, 24, 27, 0.18);
    animation: bmdMenuIn 0.14s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes bmdMenuIn {
    from { opacity: 0; transform: translateY(-4px) scale(0.98); }
    to { opacity: 1; transform: none; }
}
.bmd-nav-toggle-container .dropdown-item,
.bmd-codashop-filter-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 14px;
    color: #27272a;
    cursor: pointer;
}
.bmd-nav-toggle-container .dropdown-item:hover,
.bmd-nav-toggle-container .dropdown-item:focus,
.bmd-codashop-filter-row:hover {
    background: #f4f4f5;
    color: #18181b;
    text-decoration: none;
}
.bmd-nav-toggle-container .dropdown-item img {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    object-fit: contain;
    flex: none;
}
.bmd-nav-toggle-container .dropdown-item.is-active {
    font-weight: 600;
}
.bmd-nav-toggle-container .dropdown-item.is-active::after {
    content: '';
    width: 16px;
    height: 16px;
    margin-left: auto;
    flex: none;
    background-color: #7c3aed;
    -webkit-mask: var(--bmd-check-icon) center / contain no-repeat;
    mask: var(--bmd-check-icon) center / contain no-repeat;
}

#hAppsDropdown .bmd-dropdown-toggle,
#hUnitDropdown .bmd-dropdown-toggle,
#hCodashopFilterDropdown .bmd-dropdown-toggle {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
#hAppsDropdown #appLogo {
    display: block;
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 9px;
}
#hUnitDropdown #unitLogo {
    display: block;
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.bmd-codashop-filter-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
}
.bmd-codashop-filter-trigger img {
    display: block;
    width: 32px;
    height: 32px;
    object-fit: contain;
}
.bmd-codashop-filter-row {
    margin: 0;
    font-weight: 400;
    color: #a1a1aa;
}
.bmd-codashop-filter-row input[type="checkbox"] {
    display: none;   /* 라벨 클릭 토글·change 이벤트는 그대로 동작 */
}
.bmd-codashop-filter-row:hover {
    color: #71717a;
}
.bmd-codashop-filter-row:has(input:checked) {
    color: #18181b;
    font-weight: 500;
}
.bmd-codashop-filter-row:has(input:checked)::after {
    content: '';
    width: 16px;
    height: 16px;
    margin-left: auto;
    flex: none;
    background-color: #7c3aed;
    -webkit-mask: var(--bmd-check-icon) center / contain no-repeat;
    mask: var(--bmd-check-icon) center / contain no-repeat;
}

#todayChartArea {
    position: relative;
    height: 65vh;
}

@media (min-width: 992px) {
    #todaySalesTable .date-sales-table,
    #todaySalesTable .date-sales-table > table {
        height: 100%;
    }
}

/* ============================================================
   오늘 매출 — 서비스 토글 (Google / Apple / Codashop)
   ============================================================ */
.bmd-service-toggle {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 4px 0 10px;
}
.bmd-toggle-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f4f4f5;
    border: 1px solid transparent;
    color: #a1a1aa;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 999px;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
    font-family: inherit;
    line-height: 1.3;
    opacity: 0.55;
}
.bmd-toggle-pill:hover {
    color: #27272a;
    background: #e4e4e7;
    opacity: 0.9;
}
.bmd-toggle-pill.active {
    background: #ffffff;
    border-color: #d4d4d8;
    color: #18181b;
    opacity: 1;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.bmd-toggle-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    display: inline-block;
    opacity: 0.45;
    transition: opacity 0.15s ease;
}
.bmd-toggle-pill.active .bmd-toggle-dot {
    opacity: 1;
}
.bmd-chart-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #ffffff;
    border: 1px solid #d4d4d8;
    color: #52525b;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 999px;
    cursor: pointer;
    transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    font-family: inherit;
    line-height: 1.3;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.bmd-chart-action-btn:hover {
    color: #18181b;
    border-color: #a1a1aa;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}
.bmd-chart-action-btn:active {
    transform: translateY(1px);
}
.bmd-chart-action-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231,76,60,0.18);
    transition: box-shadow 0.18s ease;
}
.bmd-chart-action-btn.is-active {
    background: #fdecea;
    border-color: #e74c3c;
    color: #c0392b;
    box-shadow: 0 1px 3px rgba(231,76,60,0.2);
}
.bmd-chart-action-btn.is-active .bmd-chart-action-dot {
    box-shadow: 0 0 0 3px rgba(231,76,60,0.28);
}

.bmd-tooltip-close-btn {
    position: absolute;
    display: none;
    width: 34px;
    height: 34px;
    transform: translate(-50%, -50%);
    border: 2px solid #ffffff;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.85);
    color: #ffffff;
    font-size: 18px;
    line-height: 1;
    padding: 0;
    text-align: center;
    cursor: pointer;
    z-index: 2;
    touch-action: manipulation;
}

.bmd-week-legend {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 100px));
    justify-content: center;
    gap: 3px 6px;
    margin: 10px 0 0;
    padding: 10px 8px 0;
}
.bmd-week-legend-head {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #71717a;
    padding: 0 0 5px;
    margin-bottom: 2px;
    position: relative;
    border: none;
    background: none;
    font-family: inherit;
    cursor: pointer;
    transition: color 0.15s ease;
}
.bmd-week-legend-head:hover,
.bmd-week-legend-head.is-active {
    color: #18181b;
}
.bmd-week-legend-head.is-active::before {
    content: '';
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 0;
    height: 2px;
    border-radius: 999px;
    background: #18181b;
}
.bmd-week-legend-head::after {
    content: '';
    position: absolute;
    left: -3px;
    right: -3px;
    bottom: 0;
    height: 1px;
    background: #e4e4e7;
}
.bmd-week-legend-head:first-child::after {
    left: 0;
}
.bmd-week-legend-head:nth-child(7)::after {
    right: 0;
}
.bmd-week-legend-cell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    background: none;
    padding: 4px 8px;
    font-size: 13px;
    color: #27272a;
    cursor: pointer;
    font-family: inherit;
    border-radius: 8px;
    transition: color 0.15s ease, background 0.15s ease;
}
.bmd-week-legend-cell:hover {
    background: #f4f4f5;
}
.bmd-week-legend-cell.is-today {
    font-weight: 700;
}
.bmd-week-legend-cell.is-hidden {
    background: transparent;
    color: #a1a1aa;
}
.bmd-week-legend-cell.is-hidden .bmd-week-legend-swatch {
    background: #d4d4d8 !important;
}
.bmd-week-legend-swatch {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    flex: none;
}

@media only screen and (max-width: 767px) {
    .bmd-week-legend {
        position: relative;
        z-index: 2;
        grid-template-columns: repeat(7, minmax(0, 1fr));
        gap: 2px 2px;
        margin-top: 6px;
        margin-bottom: 16px;
        padding: 8px 4px 0;
    }
    .bmd-week-legend.is-under-tooltip {
        z-index: 0;
    }
    .bmd-week-legend-head {
        font-size: 12px;
    }
    .bmd-week-legend-cell {
        font-size: 12px;
        gap: 3px;
        padding: 3px 2px;
    }
    .bmd-week-legend-swatch {
        width: 7px;
        height: 7px;
    }
}

/* 모바일 스타일 */
@media only screen
and (min-device-width: 320px)
and (max-device-width: 570px)
and (-webkit-min-device-pixel-ratio: 2) {
    .items-table td, .items-table th {
        font-size: 11px;
    }

    div.date-sales-table td, div.date-sales-table th {
        padding: 5px 3px;
        font-size: 13px;
    }
    div.date-sales-table .ratio-hint {
        display: block;
        width: auto;
        margin-left: 0;
    }
    div.date-sales-table td:nth-child(n+2) {
        padding-left: 5px;
    }

    .bmd-today-header {
        justify-content: space-between;
        flex-wrap: nowrap;
        white-space: nowrap;
        margin: 12px 0;
    }
    .bmd-fx-lock-btn {
        padding: 4px 9px;
        font-size: 11px;
    }
    .bmd-fx-basis-btn {
        padding: 4px 7px 4px 9px;
        font-size: 11px;
    }
    .bmd-fx-panel-list {
        max-height: 50vh;
    }
    #nowDate {
        font-size: 15px;
        color: #52525b;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .bmd-today-header a {
        flex-shrink: 0;
    }
    #totalCoinsToday {
        font-size: clamp(20px, 7vw, 30px);
        font-weight: 700;
        letter-spacing: -0.5px;
        line-height: 1.15;
    }
    #totalUnitLabel {
        font-size: 15px;
    }
    .bmd-service-toggle {
        padding-top: 0;
    }

    #todayChartArea {
        height: calc(65vh + 120px);
        margin-bottom: -120px;
        z-index: 1;
    }

    #netProfitDailyTitle {
        margin-top: 48px;
    }
}

/* ============================================================
   국가별 매출 — 모던 컨트롤 스타일 (2025-2026 dashboard trend)
   ============================================================ */
.bmd-cm-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 10px;
    margin: 16px 0 14px;
}
.bmd-cm-control-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 10px;
}

/* Segmented control (Vercel/iOS 스타일) */
.bmd-segment {
    display: inline-flex;
    background: #f4f4f5;
    padding: 3px;
    border-radius: 9px;
    gap: 2px;
}
.bmd-segment-btn {
    background: transparent;
    border: none;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    color: #71717a;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
    white-space: nowrap;
    line-height: 1.3;
    font-family: inherit;
}
.bmd-segment-btn:hover:not(.active) {
    color: #27272a;
    background: rgba(255,255,255,0.5);
}
.bmd-segment-btn.active {
    background: #ffffff;
    color: #18181b;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.04);
}
.bmd-segment-btn .glyphicon {
    margin-right: 4px;
    font-size: 11px;
}

#salesControls .bmd-sales-side {
    flex: 1 1 0;
    display: flex;
    min-width: 0;
}
.bmd-sales-header {
    margin: 0;
}
@media only screen and (max-width: 768px) {
    #salesControls .bmd-sales-side {
        flex: 1 1 100%;
    }
    #salesControls .bmd-sales-side:last-child {
        display: none;
    }
    .bmd-sales-header {
        margin-left: auto;
    }
}

.items-table .pwa-group-row td {
    background: #fff;
    color: #71717a;
    font-weight: 600;
    font-size: 12px;
    padding-top: 14px;
}

#salesContainer .sales-section {
    border-top: 1px solid #e4e4e7;
    margin-top: 44px;
    padding-top: 26px;
}
#salesContainer .sales-section:last-of-type {
    padding-bottom: 20px;
}
#salesSectionSegment {
    margin-top: 44px;
}
#salesContainer .sales-pane .sales-section:first-child {
    margin-top: 16px;
}
@media only screen and (max-width: 768px) {
    #salesContainer .sales-section {
        margin-top: 32px;
        padding-top: 20px;
    }
    #salesSectionSegment {
        margin-top: 32px;
    }
}

#countryRankingList::-webkit-scrollbar {
    width: 8px;
}
#countryRankingList::-webkit-scrollbar-thumb {
    background: #e4e4e7;
    border-radius: 4px;
    border: 2px solid #ffffff;
}
#countryRankingList::-webkit-scrollbar-track {
    background: transparent;
}
.country-ranking-row {
    padding: 8px 12px;
    border-bottom: 1px solid #f4f4f5;
    position: relative;
}
.country-ranking-row:last-child {
    border-bottom: 0;
}
.country-ranking-row:hover {
    background: #fafafa;
}
.country-ranking-bar {
    position: absolute;
    left: 0;
    top: 5px;
    bottom: 5px;
    border-radius: 0 6px 6px 0;
    background: rgba(249, 115, 22, 0.12);
}
.country-ranking-main {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    position: relative;
}
.country-ranking-ident {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.country-ranking-rank {
    display: inline-block;
    width: 18px;
    margin-right: 8px;
    text-align: right;
    font-size: 11px;
    color: #a1a1aa;
    font-variant-numeric: tabular-nums;
}
.country-ranking-name {
    font-weight: 500;
    color: #18181b;
}
.country-ranking-code {
    margin-left: 5px;
    font-size: 13px;
    color: #52525b;
}
.country-ranking-sales {
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 600;
    color: #18181b;
    font-variant-numeric: tabular-nums;
}
.country-ranking-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    margin-top: 1px;
    padding-left: 26px;
    position: relative;
}
.country-ranking-sub {
    font-size: 12px;
    color: #52525b;
    font-variant-numeric: tabular-nums;
}
.country-ranking-pct {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 600;
    color: #c2410c;
    font-variant-numeric: tabular-nums;
}
.country-ranking-nomap {
    color: #a1a1aa;
    margin-left: 5px;
    vertical-align: -1px;
}

/* 기간 선택 드롭다운 */
.bmd-period-picker {
    position: relative;
}
.bmd-period-picker-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #ffffff;
    border: 1px solid #e4e4e7;
    border-radius: 9px;
    padding: 6px 10px 6px 12px;
    font-size: 13px;
    font-weight: 500;
    color: #18181b;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.3;
    min-width: 140px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.bmd-period-picker-btn:hover {
    border-color: #d4d4d8;
}
.bmd-period-picker-btn[aria-expanded='true'] {
    border-color: #fb923c;
    box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.15);
}
.bmd-period-picker-icon {
    color: #a1a1aa;
    font-size: 12px;
}
.bmd-period-picker-label {
    flex: 1;
    text-align: left;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.bmd-period-picker-caret {
    color: #a1a1aa;
    flex: none;
    transition: transform 0.15s ease;
}
.bmd-period-picker-btn[aria-expanded='true'] .bmd-period-picker-caret {
    transform: rotate(180deg);
}
.bmd-period-picker-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 40;
    width: 290px;
    max-width: calc(100vw - 40px);
    background: #ffffff;
    border: 1px solid #e4e4e7;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
    overflow: hidden;
    animation: bmd-fade-in 0.15s ease-out;
}
.bmd-period-picker-list {
    padding: 6px;
}
.bmd-period-picker-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    background: transparent;
    border: none;
    border-radius: 7px;
    padding: 7px 9px;
    font-size: 13px;
    color: #27272a;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    line-height: 1.3;
}
.bmd-period-picker-item:hover {
    background: #f4f4f5;
}
.bmd-period-picker-item.selected {
    background: #fff7ed;
    font-weight: 600;
}
.bmd-period-picker-check {
    visibility: hidden;
    color: #f97316;
    font-weight: 700;
    margin-left: auto;
}
.bmd-period-picker-item.selected .bmd-period-picker-check {
    visibility: visible;
}
.bmd-period-picker-custom {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid #f4f4f5;
}
.bmd-period-picker-range {
    display: flex;
    align-items: center;
    gap: 6px;
}
.bmd-period-picker-range .bmd-cm-date-input {
    flex: 1;
    min-width: 0;
    cursor: pointer;
}
.bmd-cm-date-input {
    background: #ffffff;
    border: 1px solid #e4e4e7;
    border-radius: 7px;
    padding: 6px 10px;
    font-size: 13px;
    color: #18181b;
    font-family: inherit;
    font-variant-numeric: tabular-nums;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.bmd-cm-date-input:focus {
    outline: none;
    border-color: #fb923c;
    box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.15);
}
.bmd-cm-dash {
    color: #a1a1aa;
    font-size: 13px;
}
#trendPeriodPickerPanel {
    width: 330px;
}
.bmd-period-picker-range-label {
    flex: none;
    width: 26px;
    font-size: 12px;
    color: #71717a;
}
.flatpickr-calendar {
    font-family: inherit;
    border: 1px solid #e4e4e7;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
}
.flatpickr-day.selected,
.flatpickr-day.selected:hover,
.flatpickr-day.selected:focus,
.flatpickr-day.startRange,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange,
.flatpickr-day.endRange:hover {
    background: #f97316;
    border-color: #f97316;
}
.flatpickr-day.selected.startRange + .endRange:not(:nth-child(7n+1)),
.flatpickr-day.startRange.startRange + .endRange:not(:nth-child(7n+1)),
.flatpickr-day.endRange.startRange + .endRange:not(:nth-child(7n+1)) {
    box-shadow: -10px 0 0 #f97316;
}
.flatpickr-day.inRange {
    background: #ffedd5;
    border-color: #ffedd5;
    box-shadow: -5px 0 0 #ffedd5, 5px 0 0 #ffedd5;
}
.flatpickr-day.today {
    border-color: #f97316;
}
.flatpickr-day.today:hover,
.flatpickr-day.today:focus {
    background: #ffedd5;
    border-color: #f97316;
    color: #18181b;
}
.bmd-cm-apply-btn {
    background: #18181b;
    color: white;
    border: none;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 7px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s ease;
}
.bmd-cm-apply-btn:hover {
    background: #3f3f46;
}
.bmd-cm-apply-btn:disabled {
    background: #d4d4d8;
    cursor: not-allowed;
}

/* 국가 선택 드롭다운 */
.bmd-country-picker {
    position: relative;
}
.bmd-country-picker-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #ffffff;
    border: 1px solid #e4e4e7;
    border-radius: 9px;
    padding: 6px 10px 6px 12px;
    font-size: 13px;
    font-weight: 500;
    color: #18181b;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.3;
    min-width: 150px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.bmd-country-picker-btn:hover {
    border-color: #d4d4d8;
}
.bmd-country-picker-btn[aria-expanded='true'] {
    border-color: #fb923c;
    box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.15);
}
.bmd-country-picker-label {
    flex: 1;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bmd-country-picker-caret {
    color: #a1a1aa;
    flex: none;
    transition: transform 0.15s ease;
}
.bmd-country-picker-btn[aria-expanded='true'] .bmd-country-picker-caret {
    transform: rotate(180deg);
}
.bmd-country-picker-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 40;
    width: 300px;
    max-width: calc(100vw - 40px);
    background: #ffffff;
    border: 1px solid #e4e4e7;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
    overflow: hidden;
    animation: bmd-fade-in 0.15s ease-out;
}
.bmd-country-picker-search-wrap {
    padding: 8px;
    border-bottom: 1px solid #f4f4f5;
}
.bmd-country-picker-search {
    width: 100%;
    background: #f4f4f5;
    border: 1px solid transparent;
    border-radius: 7px;
    padding: 6px 10px;
    font-size: 13px;
    color: #18181b;
    font-family: inherit;
}
.bmd-country-picker-search:focus {
    outline: none;
    background: #ffffff;
    border-color: #fb923c;
    box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.12);
}
.bmd-country-picker-list {
    max-height: 320px;
    overflow-y: auto;
    padding: 6px;
}
.bmd-country-picker-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    background: transparent;
    border: none;
    border-radius: 7px;
    padding: 7px 9px;
    font-size: 13px;
    color: #27272a;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    line-height: 1.3;
}
.bmd-country-picker-item:hover {
    background: #f4f4f5;
}
.bmd-country-picker-item.selected {
    background: #fff7ed;
    font-weight: 600;
}
.bmd-country-picker-flag {
    font-size: 15px;
    line-height: 1;
    flex: none;
}
.bmd-country-picker-name {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bmd-country-picker-sales {
    color: #71717a;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    flex: none;
}
.bmd-country-picker-check {
    visibility: hidden;
    color: #f97316;
    font-weight: 700;
    flex: none;
}
.bmd-country-picker-item.selected .bmd-country-picker-check {
    visibility: visible;
}
.bmd-country-picker-divider {
    height: 1px;
    background: #f4f4f5;
    margin: 5px 3px;
}
.bmd-country-picker-empty {
    padding: 18px 0;
    text-align: center;
    color: #a1a1aa;
    font-size: 12px;
}

@keyframes bmd-fade-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 국가별 매출 — 서비스 비교 탭 */
.bmd-compare-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    padding: 0 2px;
    margin-bottom: 12px;
    font-size: 12px;
    color: #3f3f46;
}
.bmd-compare-legend-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f4f4f5;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 500;
    color: #a1a1aa;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.4;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.bmd-compare-legend-pill:hover:not(.active) {
    background: #e4e4e7;
    color: #27272a;
}
.bmd-compare-legend-pill.active {
    background: #ffffff;
    border-color: #d4d4d8;
    color: #18181b;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.bmd-compare-legend-combine {
    position: relative;
}
@media (hover: hover) {
    .bmd-compare-legend-combine::after {
        content: attr(data-tip);
        position: absolute;
        bottom: calc(100% + 8px);
        left: 50%;
        transform: translateX(-50%) translateY(2px);
        background: #18181b;
        color: #fff;
        font-size: 11px;
        font-weight: 400;
        padding: 6px 10px;
        border-radius: 7px;
        white-space: nowrap;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.15s ease, transform 0.15s ease;
        z-index: 30;
    }
    .bmd-compare-legend-combine::before {
        content: '';
        position: absolute;
        bottom: calc(100% + 3px);
        left: 50%;
        transform: translateX(-50%) translateY(2px);
        border: 5px solid transparent;
        border-top-color: #18181b;
        border-bottom: none;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.15s ease, transform 0.15s ease;
        z-index: 30;
    }
    .bmd-compare-legend-combine:hover::after,
    .bmd-compare-legend-combine:hover::before {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}
.bmd-compare-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    flex: none;
    opacity: 0.45;
    transition: opacity 0.15s ease;
}
.bmd-compare-legend-pill.active .bmd-compare-dot {
    opacity: 1;
}
.bmd-compare-chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 12px;
}
.bmd-compare-chart-card {
    background: #fafafa;
    border-radius: 12px;
    padding: 12px 14px;
}
.bmd-compare-chart-head {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #3f3f46;
    margin-bottom: 8px;
}
.bmd-compare-chart-total {
    margin-left: auto;
    font-variant-numeric: tabular-nums;
}
.bmd-compare-chart-body {
    position: relative;
    height: 460px;
}
#countryCompareEmpty {
    padding: 40px 0;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* Mobile (≤768px) — 모바일 전체 최적화 */
@media only screen and (max-width: 768px) {
    /* 컨트롤 카드 */
    .bmd-cm-controls {
        margin: 4px 0 12px;
    }
    .bmd-cm-control-row {
        width: 100%;
        gap: 6px;
    }

    /* Segmented control — 터치 hit target 키우기 */
    .bmd-segment {
        flex-wrap: wrap;
        width: 100%;
    }
    .bmd-segment-btn {
        flex: 1 1 auto;
        min-height: 38px;
        padding: 8px 12px;
        font-size: 13px;
        text-align: center;
    }

    /* 국가 선택 드롭다운 — 풀폭 */
    .bmd-country-picker {
        width: 100%;
    }
    .bmd-country-picker-btn {
        width: 100%;
        min-height: 38px;
    }
    .bmd-country-picker-panel {
        width: 100%;
        max-width: none;
    }
    .bmd-country-picker-list {
        max-height: 260px;
    }

    /* 기간 선택 드롭다운 — 풀폭 */
    .bmd-period-picker {
        width: 100%;
    }
    .bmd-period-picker-btn {
        width: 100%;
        min-height: 38px;
    }
    .bmd-period-picker-panel {
        width: 100%;
        max-width: none;
    }
    .bmd-shift-btn {
        min-height: 34px;
    }
    .bmd-cm-date-input {
        flex: 1 1 calc(50% - 16px);
        min-height: 38px;
        padding: 8px 10px;
        font-size: 14px;       /* iOS 16px 이상이면 자동 확대 방지, 14는 의도적 */
    }
    .bmd-cm-dash {
        flex: 0 0 auto;
    }
    .bmd-cm-apply-btn {
        min-height: 40px;
        padding: 10px 14px;
    }

    /* 지도 — 모바일은 aspect-ratio 무시하고 vh 사용 */
    #countryMapArea {
        aspect-ratio: auto !important;
        height: 52vh !important;
        min-height: 320px !important;
        max-height: none !important;
    }
    #countryMapTooltip {
        font-size: 11px;
        padding: 6px 8px;
        min-width: 150px;
        max-width: calc(100vw - 32px);
    }
    #countryMapLegend {
        font-size: 10px;
        padding: 4px 8px;
    }

    /* 랭킹 — stack 후 위 여백 + 무한 스크롤 대신 자연스러운 흐름 */
    #countryContainer .col-md-3 {
        margin-top: 18px;
    }
    #countryRankingList {
        max-height: none !important;   /* 페이지 자체 스크롤로 */
    }
    #countryRankingTotal {
        font-size: 11px;
    }

    /* 그래프 탭 — 모바일 축소 */
    .bmd-compare-legend {
        gap: 6px 8px;
        padding: 6px 10px;
    }
    .bmd-compare-legend-pill {
        min-height: 34px;
        padding: 6px 12px;
    }
    .bmd-compare-chart-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .bmd-compare-chart-body {
        height: 300px;
    }
}

/* 작은 모바일 (≤480px) — 더 컴팩트 */
@media only screen and (max-width: 480px) {
    #countryMapArea {
        aspect-ratio: auto !important;
        height: 48vh !important;
        min-height: 280px !important;
        max-height: none !important;
    }
    .bmd-segment-btn {
        padding: 8px 10px;
        font-size: 12px;
    }
}


/* ============================================================
   매출 트렌드
   ============================================================ */
.bmd-segment-btn:disabled {
    color: #a1a1aa;
    cursor: not-allowed;
}
.bmd-period-picker-btn:disabled {
    color: #a1a1aa;
    background: #fafafa;
    cursor: not-allowed;
}
.bmd-period-picker-btn:disabled:hover {
    border-color: #e4e4e7;
}

#trendPickerRow {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
#trendPickerRow .bmd-period-picker {
    flex: 1 1 130px;
    min-width: 0;
}
#trendPickerRow .bmd-period-picker-btn {
    width: 100%;
    min-width: 0;
}
/* 기간 이동 바 — 선택한 구간을 ±1/7/14/28일 이동 */
.bmd-shift-row {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
}
.bmd-shift-btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 5px 0;
    background: #ffffff;
    border: 1px solid #e4e4e7;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    color: #52525b;
    font-family: inherit;
    font-variant-numeric: tabular-nums;
    line-height: 1.3;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.bmd-shift-btn:hover:not(:disabled) {
    border-color: #fb923c;
    color: #c2410c;
    background: #fff7ed;
}
.bmd-shift-btn:disabled {
    color: #d4d4d8;
    background: #fafafa;
    cursor: not-allowed;
}
.bmd-shift-sep {
    flex: 0 0 1px;
    align-self: stretch;
    background: #e4e4e7;
    margin: 2px 3px;
}

#trendPeriodPickerPanel,
#trendServicePickerPanel {
    left: auto;
    right: 0;
}
#trendServicePickerPanel {
    width: 190px;
}

@media (min-width: 992px) {
    #trendContainer {
        height: calc(100vh - var(--nav-h));
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
    #trendContainer > .row {
        display: flex;
        align-items: stretch;
        flex: 1 1 auto;
        min-height: 0;
    }
    #lineChartView {
        flex: 1 1 auto;
        min-height: 0;
    }
    #lineChartView .bmd-trend-chart-grid {
        height: 100%;
        grid-template-rows: repeat(2, minmax(0, 1fr));
    }
    #lineChartView .bmd-trend-chart-block {
        display: flex;
        flex-direction: column;
        min-height: 0;
    }
    #lineChartView .bmd-trend-chart-body {
        flex: 1 1 auto;
        height: auto;
        min-height: 0;
    }
    #trendChartSection {
        display: flex;
        flex-direction: column;
        min-width: 0;
        min-height: 0;
    }
    #trendControlSection {
        position: relative;
        border-left: 1px solid #e4e4e7;
    }
    #controlSection {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        display: flex;
        flex-direction: column;
        padding: 16px 15px 0;
    }
    #countryOptionBlock {
        flex: 1 1 auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
        margin-bottom: 0;
    }
    .bmd-trend-country-list {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        margin: 12px -15px 0;
        padding: 6px 15px 28px;
        mask-image: linear-gradient(to bottom, #000 calc(100% - 24px), transparent);
        -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 24px), transparent);
        scrollbar-width: thin;
        scrollbar-color: transparent transparent;
    }
    .bmd-trend-country-list:hover {
        scrollbar-color: #d4d4d8 transparent;
    }
    .bmd-trend-country-list::-webkit-scrollbar {
        width: 6px;
    }
    .bmd-trend-country-list::-webkit-scrollbar-thumb {
        background: transparent;
        border-radius: 3px;
    }
    .bmd-trend-country-list:hover::-webkit-scrollbar-thumb {
        background: #d4d4d8;
    }
    .bmd-trend-country-list::-webkit-scrollbar-track {
        background: transparent;
    }
}

.bmd-trend-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 24px;
}
.bmd-trend-chart-block {
    min-width: 0;
    padding: 16px 0;
}
.bmd-trend-chart-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e4e4e7;
}
.bmd-trend-chart-title {
    font-size: 15px;
    font-weight: 600;
    color: #18181b;
}
.bmd-trend-chart-summary {
    margin-left: auto;
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    font-size: 12px;
    color: #71717a;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.bmd-trend-summary-prev {
    color: #a1a1aa;
}
#trendContainer .bmd-trend-summary-prev {
    color: #18181b;
    font-weight: 600;
    font-size: 13px;
}
#trendContainer .bmd-trend-chart-summary {
    gap: 14px;
}
.bmd-trend-summary-group {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
}
.bmd-trend-summary-label {
    font-size: 11px;
    font-weight: 500;
    color: #52525b;
}
.bmd-trend-summary-sep {
    width: 1px;
    height: 11px;
    background: #e4e4e7;
    align-self: center;
    flex: none;
}
.bmd-trend-summary-arrow {
    color: #d4d4d8;
}
.bmd-trend-summary-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    align-self: center;
    flex: none;
}
.bmd-trend-summary-dot-curr {
    background: #7c3aed;
}
.bmd-trend-summary-dot-prev {
    background: #a1a1aa;
}
.bmd-trend-summary-dot-prev + .bmd-trend-summary-prev {
    margin-right: 2px;
}
.bmd-trend-summary-dot-curr + .bmd-trend-summary-curr {
    margin-right: 2px;
}
.bmd-trend-summary-curr {
    color: #18181b;
    font-weight: 600;
    font-size: 13px;
}
.bmd-trend-summary-diff {
    font-weight: 600;
}
.bmd-trend-chart-body {
    position: relative;
    height: 340px;
    margin-top: 12px;
}

#timeTrendContainer.container {
    width: auto;
    max-width: 1760px;
    padding-bottom: calc(var(--page-gutter) * 2);
}
@media (min-width: 768px) {
    #timeTrendContainer.container {
        padding-left: calc(var(--page-gutter) * 2);
        padding-right: calc(var(--page-gutter) * 2);
    }
}

#timeTrendContainer .bmd-trend-chart-head {
    flex-wrap: wrap;
}
#timeTrendContainer .bmd-tt-summary-label {
    font-size: 12px;
    color: #71717a;
}
#timeTrendContainer .bmd-trend-chart-summary .bmd-trend-summary-prev {
    color: #52525b;
    font-size: 14px;
}
#timeTrendContainer .bmd-trend-chart-summary .bmd-trend-summary-arrow {
    color: #a1a1aa;
}
#timeTrendContainer .bmd-trend-chart-summary .bmd-trend-summary-curr {
    font-size: 15px;
}
#timeTrendContainer .bmd-trend-chart-summary .bmd-trend-summary-diff {
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 13px;
    background: #f4f4f5;
    color: #71717a;
}
#timeTrendContainer .bmd-trend-chart-summary .bmd-trend-summary-diff.vary-status-increase {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.08);
}
#timeTrendContainer .bmd-trend-chart-summary .bmd-trend-summary-diff.vary-status-decrease {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.08);
}

.bmd-tt-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 16px;
    padding: 14px 0 2px;
    font-size: 12px;
    color: #71717a;
}
.bmd-tt-legend:empty {
    display: none;
}
.bmd-tt-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.bmd-tt-key {
    display: inline-block;
    width: 18px;
    height: 0;
    border-top: 2px solid;
    border-radius: 1px;
}
.bmd-tt-key-today {
    border-top-width: 3px;
    border-top-color: #7c3aed;
}
.bmd-tt-key-yesterday {
    border-top-color: #71717a;
}
.bmd-tt-key-median {
    border-top-style: dashed;
    border-top-color: #a1a1aa;
}
.bmd-tt-key-band {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    background: rgba(113, 113, 122, 0.18);
}

.bmd-trend-country-head {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 8px;
}
.bmd-trend-country-reset {
    border: none;
    background: none;
    padding: 0;
    font-size: 12px;
    color: #71717a;
    font-family: inherit;
    cursor: pointer;
    transition: color 0.15s ease;
}
.bmd-trend-country-reset:hover {
    color: #18181b;
}
.bmd-trend-country-search {
    display: block;
    width: 100%;
    padding: 7px 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: #f4f4f5;
    font-size: 13px;
    color: #18181b;
    font-family: inherit;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.bmd-trend-country-search:focus {
    outline: none;
    background: #ffffff;
    border-color: #fb923c;
    box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.12);
}
.bmd-trend-country-list {
    display: flex;
    flex-direction: column;
    border-top: 1px solid #e4e4e7;
    margin-top: 12px;
    padding-top: 6px;
}
.bmd-trend-country-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 9px 10px;
    border: none;
    background: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    color: #3f3f46;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease;
}
.bmd-trend-country-item:hover {
    background: #f4f4f5;
}
.bmd-trend-country-item.selected {
    color: #18181b;
    font-weight: 500;
}
.bmd-trend-country-check {
    width: 14px;
    flex: 0 0 auto;
    color: #f97316;
    font-weight: 700;
    visibility: hidden;
}
.bmd-trend-country-item.selected .bmd-trend-country-check {
    visibility: visible;
}
.bmd-trend-country-name {
    flex: 1 1 auto;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bmd-trend-country-amt {
    margin-left: auto;
    flex: 0 0 auto;
    font-size: 13px;
    color: #3f3f46;
    font-variant-numeric: tabular-nums;
}
.bmd-trend-country-pct {
    flex: 0 0 auto;
    min-width: 62px;
    padding: 2px 8px;
    border-radius: 999px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    background: #f4f4f5;
    color: #71717a;
    font-variant-numeric: tabular-nums;
}
.bmd-trend-country-pct.vary-status-increase {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.08);
}
.bmd-trend-country-pct.vary-status-decrease {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.08);
}
.bmd-trend-country-empty {
    padding: 14px 0;
    text-align: center;
    color: #a1a1aa;
    font-size: 12px;
}

@media (max-width: 991px) {
    #trendControlSection {
        border-top: 1px solid #e4e4e7;
        margin-top: 8px;
    }
    #controlSection {
        padding-top: 16px;
    }
}

@media only screen and (max-width: 768px) {
    .bmd-trend-chart-grid {
        grid-template-columns: 1fr;
        gap: 4px;
    }
    .bmd-trend-chart-body {
        height: 260px;
    }
    .bmd-trend-country-item {
        min-height: 38px;
    }
}

/* 시간대별 트렌드 */
#ttToolbar {
    margin-top: 16px;
}
.bmd-tt-detail {
    border-top: 1px solid #e4e4e7;
    margin-top: 4px;
    padding-top: 12px;
}
.bmd-tt-table-wrap {
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}
.bmd-tt-table-wrap:hover {
    scrollbar-color: #d4d4d8 transparent;
}
.bmd-tt-table-wrap::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
.bmd-tt-table-wrap::-webkit-scrollbar-thumb {
    background-color: transparent;
    background-clip: padding-box;
    border: 2px solid transparent;
    border-radius: 999px;
}
.bmd-tt-table-wrap:hover::-webkit-scrollbar-thumb {
    background-color: #d4d4d8;
}
.bmd-tt-table-wrap::-webkit-scrollbar-track {
    background: transparent;
}
.bmd-tt-table-wrap::-webkit-scrollbar-corner {
    background: transparent;
}
.bmd-tt-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.bmd-tt-table th,
.bmd-tt-table td {
    padding: 5px 10px;
    text-align: right;
    border-bottom: 1px solid #f4f4f5;
    color: #52525b;
}
.bmd-tt-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #ffffff;
    border-bottom: 1px solid #e4e4e7;
    font-weight: 600;
    color: #3f3f46;
    font-size: 12px;
}
.bmd-tt-table th:first-child,
.bmd-tt-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: #ffffff;
    text-align: left;
    color: #a1a1aa;
    font-size: 12px;
    border-right: 1px solid #f4f4f5;
}
.bmd-tt-table thead th:first-child {
    z-index: 3;
    color: #a1a1aa;
    font-weight: 500;
}
.bmd-tt-table tbody tr:hover td {
    background: #fafafa;
}
.bmd-tt-table .bmd-tt-today {
    color: #18181b;
    font-weight: 600;
}
.bmd-tt-table td.cell-toggle {
    cursor: pointer;
}
.bmd-tt-table td.cell-toggle.active {
    box-shadow: inset 0 0 0 1.5px #7c3aed;
    background: rgba(124, 58, 237, 0.06);
    border-radius: 4px;
}
.bmd-tt-compare {
    font-variant-numeric: tabular-nums;
}
.bmd-tt-compare-summary {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
    padding: 12px 0 8px;
    border-top: 1px solid #e4e4e7;
    margin-top: 12px;
    font-size: 12px;
    color: #71717a;
}
.bmd-tt-compare-when {
    color: #a1a1aa;
}
.bmd-tt-compare-summary .bmd-trend-summary-diff {
    margin-left: 4px;
}
.bmd-tt-compare .table {
    font-size: 12px;
    margin-bottom: 8px;
}
.bmd-tt-compare .table-striped > tbody > tr:nth-of-type(odd) {
    background: transparent;
}
.bmd-tt-compare .table th,
.bmd-tt-compare .table > tbody > tr > td {
    border-top: none;
    border-bottom: 1px solid #f4f4f5;
    padding: 6px 10px;
}
.bmd-tt-compare .table th {
    border-bottom: 1px solid #e4e4e7;
}
.bmd-tt-compare .table .table-sort {
    color: #71717a;
    text-decoration: none;
}
.bmd-tt-compare .pagination > li > a,
.bmd-tt-compare .pagination > li > span {
    color: #52525b;
    border-color: #e4e4e7;
}
.bmd-tt-compare .pagination > .active > a,
.bmd-tt-compare .pagination > .active > a:hover,
.bmd-tt-compare .pagination > .active > a:focus {
    background: #18181b;
    border-color: #18181b;
    color: #ffffff;
}
@media only screen and (max-width: 768px) {
    .bmd-tt-table {
        font-size: 12px;
    }
    .bmd-tt-table-wrap {
        max-height: 360px;
    }
}
