/* 회원 활동 통계 모달 (2026-07-23 Stage 3, 개발자 내부) */
.mas { display: flex; flex-direction: column; gap: 14px; padding: 14px 16px; }

/* 모드 탭 */
.mas-tabs { display: inline-flex; gap: 4px; background: #f3f4f6; border-radius: 10px; padding: 4px; align-self: flex-start; }
.mas-tab { border: 0; background: transparent; padding: 7px 16px; border-radius: 7px; font-size: 13px; font-weight: 600; color: #6b7280; cursor: pointer; }
.mas-tab.is-active { background: #fff; color: #1f2937; box-shadow: 0 1px 2px rgba(0,0,0,.08); }

/* 스코프 선택 */
.mas-scope { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.mas-scope-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #6b7280; }
.mas-select { min-width: 200px; height: 36px; padding: 0 10px; border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; font-size: 13px; }
.mas-scope-locked { display: inline-flex; align-items: center; height: 36px; padding: 0 12px; background: #eef2ff; color: #4338ca; border-radius: 8px; font-size: 13px; font-weight: 600; }

/* 지표 토글(체류시간/횟수) */
.mas-metric { display: inline-flex; gap: 4px; background: #eef2ff; border-radius: 8px; padding: 3px; align-self: flex-start; }
.mas-metric-btn { border: 0; background: transparent; padding: 6px 16px; border-radius: 6px; font-size: 12px; font-weight: 600; color: #6366f1; cursor: pointer; }
.mas-metric-btn.is-active { background: #4f46e5; color: #fff; }

/* 툴바(프리셋/범위) */
.mas-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.mas-presets { display: inline-flex; gap: 4px; }
.mas-preset { border: 1px solid #e5e7eb; background: #fff; padding: 6px 14px; border-radius: 7px; font-size: 12px; color: #374151; cursor: pointer; }
.mas-preset.is-active { background: #3e6187; border-color: #3e6187; color: #fff; }
.mas-range { display: inline-flex; align-items: center; gap: 6px; }
.mas-date { height: 34px; padding: 0 8px; border: 1px solid #e5e7eb; border-radius: 7px; font-size: 12px; background: #fff; }
.mas-tilde { color: #9ca3af; }

/* KPI */
.mas-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.mas-kpi { background: #f9fafb; border: 1px solid #eef0f3; border-radius: 10px; padding: 12px 14px; }
.mas-kpi-label { font-size: 12px; color: #6b7280; margin-bottom: 4px; }
.mas-kpi-value { font-size: 18px; font-weight: 700; color: #1f2937; }

/* 카드 */
.mas-card { background: #fff; border: 1px solid #eef0f3; border-radius: 12px; padding: 14px 16px; }
.mas-card-title { margin: 0 0 10px; font-size: 13px; font-weight: 700; color: #374151; }
.mas-card-hint { font-weight: 500; color: #9ca3af; font-size: 11px; }
.mas-canvas-wrap { position: relative; height: 180px; }
.mas-canvas-tall { height: 220px; }

/* 랭킹 */
.mas-rankings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.mas-rank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.mas-rank-item { display: grid; grid-template-columns: minmax(0,1fr) 70px auto; align-items: center; gap: 8px; font-size: 12px; }
.mas-rank-item.is-drill { cursor: pointer; border-radius: 6px; padding: 2px 4px; margin: -2px -4px; }
.mas-rank-item.is-drill:hover { background: #f3f4f6; }
.mas-rank-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #374151; }
.mas-rank-bar { height: 6px; background: #eef0f3; border-radius: 3px; overflow: hidden; }
.mas-rank-bar-fill { display: block; height: 100%; background: #3e6187; }
.mas-rank-val { color: #6b7280; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mas-rank-empty { color: #9ca3af; font-size: 12px; }

.mas-note { font-size: 11px; color: #9ca3af; line-height: 1.5; margin: 0; }

@media (max-width: 720px) {
  .mas-kpis { grid-template-columns: repeat(2, 1fr); }
  .mas-rankings { grid-template-columns: 1fr; }
}
