* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #f4f6f9;
  color: #333;
  line-height: 1.6;
}

/* 헤더 */
header {
  background: linear-gradient(135deg, #1a3a6b 0%, #2563b0 100%);
  color: white;
  padding: 0 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-icon { font-size: 2rem; }
.logo h1 { font-size: 1.4rem; font-weight: 700; }
.logo p { font-size: 0.78rem; opacity: 0.85; margin-top: 2px; }
nav { display: flex; gap: 8px; }
nav a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  transition: all 0.2s;
}
nav a:hover, nav a.active {
  background: rgba(255,255,255,0.2);
  color: white;
}

/* 히어로 */
.hero {
  background: linear-gradient(135deg, #2563b0 0%, #1e50a0 100%);
  color: white;
  padding: 50px 20px;
  text-align: center;
}
.hero-inner { max-width: 700px; margin: 0 auto; }
.hero h2 { font-size: 1.8rem; margin-bottom: 14px; }
.hero p { font-size: 1rem; opacity: 0.9; }
.hero-cta-btn {
  display: inline-block; margin-top: 22px;
  padding: 13px 32px; border-radius: 30px;
  background: white; color: #2563b0;
  font-size: 1rem; font-weight: 800; font-family: inherit;
  border: none; cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  transition: transform 0.15s, box-shadow 0.15s;
}
.hero-cta-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.22); }
.hero-cta-btn:active { transform: translateY(0); }

/* 컨테이너 */
.container { max-width: 800px; margin: 0 auto; padding: 0 20px; }

/* 폼 섹션 */
.form-section { padding: 40px 20px; }

/* 폼 + 오늘의 현황 2단 레이아웃 */
.form-with-today {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.form-with-today .voice-form,
.form-with-today #resultMsg { flex: 1; min-width: 0; }
.form-with-today #resultMsg { flex: unset; }

.today-stat-panel {
  width: 240px;
  flex-shrink: 0;
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.today-stat-panel .hsp-card { background: white; border-radius: 16px; padding: 22px 18px; box-shadow: 0 2px 12px rgba(0,0,0,0.08); }
.today-stat-panel .hsp-stat-num { font-size: 2.2rem; }


/* 개인정보 안내 */
.privacy-notice {
  background: #e8f0fe;
  border: 1px solid #c5d7f7;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 30px;
}
.privacy-notice h3 { font-size: 1rem; color: #1a3a6b; margin-bottom: 12px; }
.privacy-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.privacy-table th, .privacy-table td { padding: 7px 10px; border-bottom: 1px solid #c5d7f7; text-align: left; }
.privacy-table th { color: #1a3a6b; font-weight: 600; width: 120px; background: rgba(255,255,255,0.5); }
.privacy-law { font-size: 0.8rem; color: #666; margin-top: 10px; }

/* 폼 */
.voice-form {
  background: white;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}
.form-group { margin-bottom: 24px; }
label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #1a3a6b;
  font-size: 0.95rem;
}
.required { color: #e53935; }
select, textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #d0d8e8;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  color: #333;
  transition: border-color 0.2s;
  background: white;
}
select:focus, textarea:focus {
  outline: none;
  border-color: #2563b0;
  box-shadow: 0 0 0 3px rgba(37,99,176,0.1);
}
textarea { resize: vertical; min-height: 140px; }
.char-count { text-align: right; font-size: 0.8rem; color: #888; margin-top: 5px; }

/* 카테고리 버튼 */
.category-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.cat-btn {
  padding: 9px 16px;
  border: 1.5px solid #d0d8e8;
  border-radius: 24px;
  background: white;
  cursor: pointer;
  font-size: 0.88rem;
  font-family: inherit;
  transition: all 0.2s;
  color: #444;
}
.cat-btn:hover { border-color: #2563b0; color: #2563b0; background: #e8f0fe; }
.cat-btn.selected { background: #2563b0; color: white; border-color: #2563b0; }

/* 동의 체크박스 */
.consent-box {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 24px;
}
.consent-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  cursor: pointer;
}
.consent-label input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; accent-color: #2563b0; }

/* 제출 버튼 */
.submit-btn {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #1a3a6b, #2563b0);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1.05rem;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.5px;
}
.submit-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(37,99,176,0.4); }
.submit-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* 결과 메시지 */
.result-msg {
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: 8px;
  font-weight: 600;
  text-align: center;
  font-size: 0.95rem;
}
.result-msg.success { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.result-msg.error { background: #ffebee; color: #c62828; border: 1px solid #ef9a9a; }
.result-msg.hidden { display: none; }

/* FAQ 섹션 */
.info-section { padding: 40px 20px; }
.info-section h3 { font-size: 1.1rem; color: #1a3a6b; margin-bottom: 16px; font-weight: 700; }
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: white;
  border-radius: 10px;
  padding: 16px 20px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.07);
}
.faq-item strong { display: block; color: #1a3a6b; margin-bottom: 6px; font-size: 0.92rem; }
.faq-item p { font-size: 0.88rem; color: #555; }

/* 푸터 */
footer {
  background: #1a3a6b;
  color: rgba(255,255,255,0.7);
  text-align: center;
  padding: 20px;
  font-size: 0.82rem;
}

/* 관리자 페이지 공통 */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 32px; }
.stat-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.stat-card .stat-num { font-size: 2.2rem; font-weight: 700; color: #2563b0; }
.stat-card .stat-label { font-size: 0.85rem; color: #666; margin-top: 4px; }
.chart-section { background: white; border-radius: 12px; padding: 24px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); margin-bottom: 20px; }
.chart-section h4 { color: #1a3a6b; margin-bottom: 16px; font-size: 0.95rem; }
.bar-item { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 0.88rem; }
.bar-label { width: 90px; text-align: right; color: #444; flex-shrink: 0; }
.bar-track { flex: 1; background: #e8eef6; border-radius: 4px; height: 20px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, #2563b0, #4a90e2); border-radius: 4px; transition: width 0.6s; }
.bar-count { width: 30px; color: #888; flex-shrink: 0; }
.voices-list { background: white; border-radius: 12px; padding: 24px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.voices-list h4 { color: #1a3a6b; margin-bottom: 16px; }
.voice-item { border-bottom: 1px solid #eee; padding: 14px 0; }
.voice-item:last-child { border-bottom: none; }
.voice-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}
.tag-age { background: #e3f2fd; color: #1565c0; }
.tag-loc { background: #e8f5e9; color: #2e7d32; }
.tag-cat { background: #fff3e0; color: #e65100; }
.voice-content { font-size: 0.9rem; color: #444; }
.voice-time { font-size: 0.75rem; color: #999; margin-top: 4px; }

/* ── 지도 프리뷰 섹션 ─────────────────────────────────────────────────────── */
.map-preview-section {
  background: #f0f4f9;
  border-top: 1px solid #dde6f0;
  border-bottom: 1px solid #dde6f0;
}
.map-preview-header {
  padding: 22px 20px 10px;
}
.map-preview-header .container {
  max-width: 1280px;
}
.map-preview-header h3 {
  font-size: 1.05rem;
  color: #1a3a6b;
  font-weight: 700;
  margin-bottom: 4px;
}
.map-preview-header p {
  font-size: 0.82rem;
  color: #666;
}

/* 분류 필터 바 */
.map-cat-filter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px 20px;
  background: white;
  border-top: 1px solid #e8eef6;
  border-bottom: 1px solid #e8eef6;
  position: relative;
}
.tb-label { font-size: 0.78rem; font-weight: 700; color: #1a3a6b; flex-shrink: 0; }
.mf-btn {
  padding: 4px 11px;
  border-radius: 14px;
  border: 1.5px solid #d0d8e8;
  background: white;
  font-size: 0.76rem;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  color: #555;
}
.mf-btn:hover { border-color: #2563b0; color: #2563b0; }
.mf-btn.active { color: white; border-color: transparent; background: #444; }
.mf-btn[data-cat="교통/도로"].active { background: #e53935; }
.mf-btn[data-cat="환경/청소"].active { background: #43a047; }
.mf-btn[data-cat="안전/방범"].active { background: #1e88e5; }
.mf-btn[data-cat="복지/보건"].active { background: #8e24aa; }
.mf-btn[data-cat="공원/문화"].active { background: #fb8c00; }
.mf-btn[data-cat="소음/진동"].active { background: #00838f; }
.mf-btn[data-cat="기타"].active      { background: #757575; }
.mf-count { position: absolute; right: 20px; font-size: 0.78rem; color: #888; white-space: nowrap; }

/* 지도 컨테이너 */
.map-preview-wrap {
  position: relative;
  overflow: hidden;
  height: 520px;
}
#homeMap {
  width: 100%;
  height: 100%;
  background: #f0f4fa;
}

/* 지도 로딩 오버레이 */
.map-loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(220,228,236,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 2000;
  font-size: 0.88rem;
  color: #1a3a6b;
  font-weight: 700;
}
.map-spinner {
  width: 26px;
  height: 26px;
  border: 3px solid #dde8f8;
  border-top-color: #2563b0;
  border-radius: 50%;
  animation: mapSpin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes mapSpin { to { transform: rotate(360deg); } }

/* 동 사이드 패널 */
.dong-side-panel {
  position: absolute;
  top: 0;
  right: -310px;
  width: 290px;
  height: 100%;
  background: white;
  box-shadow: -4px 0 24px rgba(0,0,0,0.18);
  z-index: 1500;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 14px 24px;
  box-sizing: border-box;
}
.dong-side-panel.active { right: 0; }

.panel-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: 1px solid #e0e0e0;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: 0.75rem;
  color: #888;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.panel-close:hover { background: #f5f5f5; color: #333; }

/* 패널 내용 */
.sp-header { margin-bottom: 10px; padding-right: 36px; }
.sp-gu   { font-size: 0.74rem; color: #888; margin-bottom: 2px; }
.sp-dong { font-size: 1.25rem; font-weight: 800; color: #1a3a6b; }

.sp-count-row { display: flex; align-items: baseline; gap: 5px; margin-bottom: 10px; }
.sp-big-num   { font-size: 2rem; font-weight: 800; color: #2563b0; line-height: 1; }
.sp-big-lbl   { font-size: 0.8rem; color: #888; }

.sp-top-badge {
  padding: 7px 10px;
  border-radius: 8px;
  color: white;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 14px;
  line-height: 1.4;
}

.sp-bars { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.sp-bar-row { display: flex; align-items: center; gap: 5px; min-width: 0; }
.sp-bar-top .sp-bar-lbl { font-weight: 700; color: #222; }
.sp-bar-lbl   { font-size: 0.7rem; color: #666; width: 62px; min-width: 62px; text-align: right; flex-shrink: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-bar-track { flex: 1; min-width: 0; background: #eef2f8; border-radius: 3px; height: 10px; overflow: hidden; }
.sp-bar-fill  { height: 100%; border-radius: 3px; min-width: 3px; }
.sp-bar-cnt   { font-size: 0.7rem; color: #999; width: 18px; min-width: 18px; flex-shrink: 0; }
.sp-empty     { font-size: 0.82rem; color: #bbb; margin-top: 8px; }

/* 지도 확대/축소 컨트롤 */
.map-zoom-controls {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mzc-btn {
  width: 30px;
  height: 30px;
  background: white;
  border: 1px solid #d0d8e8;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  color: #1a3a6b;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  transition: background 0.15s;
  line-height: 1;
  padding: 0;
  font-family: inherit;
}
.mzc-btn:hover { background: #e8f0fe; }
.mzc-btn:active { background: #d0e2fa; }

/* 홈 지도 범례 위치 */
.home-map-legend {
  position: absolute;
  bottom: 30px;
  right: 10px;
  z-index: 100;
}

/* 지도 범례 */
.map-legend {
  background: white;
  padding: 12px 14px;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.14);
  font-size: 0.75rem;
  line-height: 1;
}
.legend-title { font-weight: 700; color: #1a3a6b; margin-bottom: 8px; font-size: 0.8rem; }
.legend-row { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; color: #444; }
.legend-dot {
  width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid white; box-shadow: 0 0 0 1px rgba(0,0,0,0.2);
}

/* 개인정보 하단 섹션 */
.privacy-bottom {
  background: #eef2fb;
  border-top: 1px solid #d4e0f5;
  padding: 28px 20px;
}

/* ── 홈 통계 사이드 패널 ─────────────────────────────────────────────────── */
.map-with-stats {
  display: flex;
  align-items: stretch;
  max-width: 1280px;
  margin: 0 auto;
}
.map-with-stats .map-preview-wrap { flex: 1; min-width: 0; }

.home-stats-panel {
  width: 300px;
  flex-shrink: 0;
  background: #f7f9fd;
  border-left: 1px solid #dde6f4;
  overflow-y: auto;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 520px;
}

/* 고정 플로팅 민원 제출 버튼 */
.floating-submit-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 500;
  padding: 14px 24px;
  background: linear-gradient(135deg, #1a3a6b, #2563b0);
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(37,99,176,0.45);
  transition: transform 0.15s, box-shadow 0.15s;
}
.floating-submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(37,99,176,0.5);
}
.hsp-card {
  background: white;
  border-radius: 12px;
  padding: 18px 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.hsp-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: #1a3a6b;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}
.hsp-donut-wrap { display: flex; justify-content: center; margin-bottom: 7px; }
.hsp-legend { display: flex; flex-direction: column; gap: 4px; }
.hsp-leg-row { display: flex; align-items: center; gap: 6px; font-size: 0.67rem; color: #444; }
.hsp-leg-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.hsp-leg-cnt { margin-left: auto; color: #888; font-weight: 700; }
.hsp-stat-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; border-bottom: 1px solid #f0f4fa;
}
.hsp-stat-row:last-child { border-bottom: none; }
.hsp-stat-label { font-size: 0.78rem; color: #555; font-weight: 500; }
.hsp-stat-num { font-size: 2.2rem; font-weight: 800; color: #2563b0; line-height: 1; }
.hsp-stat-unit { font-size: 0.68rem; color: #aaa; }
.hsp-refresh { font-size: 0.65rem; color: #bbb; text-align: right; margin-top: 6px; }

/* ── 홈 오른쪽 패널이 left-panel 클래스도 공유 ──────────────────────────── */
.home-stats-panel.home-left-panel {
  /* home-left-panel 스타일 덮어쓰기 방지용 */
  background: #f7f9fd;
  border-right: none;
  border-left: 1px solid #dde6f4;
  overflow-y: auto;
  padding: 16px 14px;
  height: 520px;
}
.hlp-card {
  background: white;
  border-radius: 12px;
  padding: 13px 11px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.hlp-title {
  font-size: 0.72rem;
  font-weight: 800;
  color: #1a3a6b;
  letter-spacing: 0.04em;
  margin-bottom: 9px;
}
.hlp-dong-hdr {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px;
}
.hlp-dong-name { font-size: 0.9rem; font-weight: 800; color: #1a3a6b; line-height: 1.3; }
.hlp-dong-cnt  { font-size: 0.7rem; color: #888; margin-top: 2px; }
.hlp-close-btn {
  background: none;
  border: 1px solid #e0e0e0;
  border-radius: 50%;
  width: 22px; height: 22px;
  cursor: pointer; font-size: 0.65rem; color: #888;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; padding: 0; margin-left: 6px;
}
.hlp-close-btn:hover { background: #f0f0f0; color: #333; }
.hlp-voice-item { padding: 8px 0; border-bottom: 1px solid #f0f4fa; }
.hlp-voice-item:last-child { border-bottom: none; }
.hlp-cat-badge {
  display: inline-block;
  padding: 2px 6px; border-radius: 7px;
  font-size: 0.62rem; font-weight: 700; color: white; margin-bottom: 3px;
}
.hlp-voice-content {
  font-size: 0.71rem; color: #333; margin: 3px 0;
  word-break: keep-all; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}
.hlp-voice-date { font-size: 0.62rem; color: #bbb; }
.hlp-more-btn {
  width: 100%; padding: 7px;
  background: #f0f4fa; border: 1px solid #e0e8f8; border-radius: 8px;
  font-size: 0.71rem; color: #2563b0; font-weight: 700;
  cursor: pointer; margin-top: 8px; font-family: inherit; transition: background 0.15s;
}
.hlp-more-btn:hover { background: #e0eaf8; }
.hlp-empty { font-size: 0.73rem; color: #bbb; padding: 6px 0; }
.hsp-top-cat { font-size: 0.82rem; font-weight: 700; color: #2563b0; }

/* 왼쪽 패널 바 차트 (민원 랭킹) */
.hlp-top-badge {
  padding: 5px 9px; border-radius: 7px; color: white;
  font-size: 0.7rem; font-weight: 700; margin-bottom: 9px; line-height: 1.4;
}
.hlp-bars { display: flex; flex-direction: column; gap: 5px; }
.hlp-bar-row { display: flex; align-items: center; gap: 4px; }
.hlp-bar-top .hlp-bar-lbl { font-weight: 700; color: #222; }
.hlp-bar-lbl {
  font-size: 0.65rem; color: #666; width: 72px; min-width: 72px;
  text-align: right; flex-shrink: 0; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.hlp-bar-track { flex: 1; min-width: 0; background: #eef2f8; border-radius: 3px; height: 8px; overflow: hidden; }
.hlp-bar-fill  { height: 100%; border-radius: 3px; min-width: 3px; }
.hlp-bar-cnt   { font-size: 0.65rem; color: #999; width: 16px; min-width: 16px; flex-shrink: 0; text-align: right; }
.hlp-section-title {
  font-size: 0.68rem; font-weight: 700; color: #888; letter-spacing: 0.03em;
  margin: 11px 0 6px; padding-top: 11px; border-top: 1px solid #f0f4fa;
}

/* ── 모바일 바텀 시트 ─────────────────────────────────────────────────────── */
.mobile-sheet-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.35); z-index: 1999;
}
.mobile-sheet-overlay.active { display: block; }
.mobile-bottom-sheet {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  background: white; border-radius: 18px 18px 0 0;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.18); z-index: 2000;
  max-height: 75vh; overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-bottom-sheet.active { transform: translateY(0); }
.mbs-handle {
  width: 38px; height: 4px; background: #ddd; border-radius: 2px;
  margin: 12px auto 4px;
}
.mbs-inner { padding: 4px 18px 32px; }
.mbs-dong-name { font-size: 1.1rem; font-weight: 800; color: #1a3a6b; margin-bottom: 2px; }
.mbs-dong-cnt  { font-size: 0.78rem; color: #888; margin-bottom: 10px; }
.mbs-top-badge {
  padding: 6px 10px; border-radius: 8px; color: white;
  font-size: 0.76rem; font-weight: 700; margin-bottom: 12px; line-height: 1.4;
}
.mbs-bars { display: flex; flex-direction: column; gap: 7px; margin-bottom: 4px; }
.mbs-bar-row { display: flex; align-items: center; gap: 6px; }
.mbs-bar-top .mbs-bar-lbl { font-weight: 700; color: #222; }
.mbs-bar-lbl { font-size: 0.72rem; color: #666; width: 66px; min-width: 66px; text-align: right; flex-shrink: 0; }
.mbs-bar-track { flex: 1; background: #eef2f8; border-radius: 4px; height: 10px; overflow: hidden; }
.mbs-bar-fill  { height: 100%; border-radius: 4px; min-width: 3px; }
.mbs-bar-cnt   { font-size: 0.72rem; color: #999; width: 20px; flex-shrink: 0; text-align: right; }
.mbs-section-title {
  font-size: 0.75rem; font-weight: 700; color: #888;
  padding-top: 13px; border-top: 1px solid #f0f4fa; margin: 2px 0 8px;
}
.mbs-voice-item { padding: 10px 0; border-bottom: 1px solid #f0f4fa; }
.mbs-voice-item:last-child { border-bottom: none; }
.mbs-cat-badge {
  display: inline-block; padding: 2px 8px; border-radius: 8px;
  font-size: 0.68rem; font-weight: 700; color: white; margin-bottom: 4px;
}
.mbs-voice-content {
  font-size: 0.82rem; color: #333; margin: 3px 0; word-break: keep-all; line-height: 1.5;
}
.mbs-voice-date { font-size: 0.68rem; color: #bbb; }
.mbs-more-btn {
  width: 100%; padding: 11px; background: #f0f4fa; border: 1px solid #e0e8f8;
  border-radius: 10px; font-size: 0.8rem; color: #2563b0; font-weight: 700;
  cursor: pointer; margin-top: 12px; font-family: inherit;
}
.mbs-empty { font-size: 0.8rem; color: #bbb; padding: 8px 0; }

/* ── 모바일 통계 ──────────────────────────────────────────────────────────── */
.mobile-stats { display: none; background: #f0f4f9; padding: 14px 12px 8px; }
.ms-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.ms-card {
  background: white; border-radius: 12px; padding: 14px 13px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.ms-card-full { grid-column: 1 / -1; }
.ms-title { font-size: 0.74rem; font-weight: 800; color: #1a3a6b; letter-spacing: 0.04em; margin-bottom: 10px; }
.ms-stat-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid #f0f4fa; }
.ms-stat-row:last-child { border-bottom: none; }
.ms-stat-label { font-size: 0.76rem; color: #555; }
.ms-num  { font-size: 1.8rem; font-weight: 800; color: #2563b0; line-height: 1; }
.ms-unit { font-size: 0.65rem; color: #aaa; }
.ms-top-cat { font-size: 0.8rem; font-weight: 700; color: #2563b0; }
.ms-refresh { font-size: 0.62rem; color: #bbb; text-align: right; margin-top: 6px; }

/* 반응형 */
@media (max-width: 900px) {
  .mobile-bottom-sheet { display: block; }
  .home-stats-panel { display: none; }
  .map-preview-wrap { height: 400px; }
  .floating-submit-btn { bottom: 16px; right: 16px; padding: 12px 20px; font-size: 0.9rem; }
}

@media (max-width: 860px) {
  .form-with-today { flex-direction: column; }
  .today-stat-panel {
    width: 100%;
    position: static;
    flex-direction: row;
  }
  .today-stat-panel .hsp-card { flex: 1; }
  .today-stat-panel .hsp-stat-num { font-size: 2rem; }
}

@media (max-width: 600px) {
  /* 헤더 */
  .header-inner { padding: 10px 0; }
  .logo-icon { font-size: 1.5rem; }
  .logo h1 { font-size: 1.1rem; }
  .logo p { font-size: 0.7rem; }

  /* 히어로 */
  .hero { padding: 30px 16px; }
  .hero h2 { font-size: 1.2rem; }
  .hero p { font-size: 0.88rem; }
  .hero-cta-btn { padding: 11px 24px; font-size: 0.9rem; }

  /* 지도 섹션 */
  .map-preview-wrap { height: 300px; }
  .map-preview-header { padding: 14px 14px 6px; }
  .map-preview-header h3 { font-size: 0.92rem; }
  .map-preview-header p { display: none; }
  .home-map-legend { display: none; }

  /* 분류 필터 — 가로 스크롤 */
  .map-cat-filter {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
    padding: 7px 12px;
    gap: 5px;
  }
  .map-cat-filter::-webkit-scrollbar { display: none; }
  .mf-count { display: none; }
  .mf-btn { font-size: 0.72rem; padding: 4px 9px; white-space: nowrap; flex-shrink: 0; }

  /* 동 사이드 패널 (지도 안) */
  .dong-side-panel { width: 88%; right: -90%; }

  /* 폼 섹션 */
  .form-section { padding: 24px 14px; }
  .voice-form { padding: 20px 16px; }
  .form-row { grid-template-columns: 1fr; }

  /* 오늘/누적 현황 — 모바일에서 세로 스택 */
  .today-stat-panel { flex-direction: column; }
  .today-stat-panel .hsp-stat-num { font-size: 2.2rem; }

  /* FAQ / 개인정보 */
  .info-section { padding: 28px 14px; }
  .privacy-bottom { padding: 20px 14px; }
  .privacy-table th, .privacy-table td { font-size: 0.8rem; padding: 6px 8px; }
}
