@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.css');

:root {
  --radius: 8px;
  --radius-sm: 8px;

  /* 4px 기반 간격 스케일 (shadcn/Tailwind 관례) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --title-card-gap: var(--space-3);
  --section-gap: 44px;

  --neutral-50: #fafafa;
  --neutral-100: #f5f5f5;
  --neutral-200: #e5e5e5;
  --neutral-300: #d4d4d4;
  --neutral-400: #a3a3a3;
  --neutral-500: #737373;
  --neutral-600: #525252;
  --neutral-700: #404040;
  --neutral-800: #262626;
  --neutral-900: #171717;
  --neutral-950: #0a0a0a;

  --background: 0 0% 100%;
  --foreground: 0 0% 9%;
  --card: 0 0% 100%;
  --border: 0 0% 90%;
  --muted: 0 0% 96%;
  --muted-foreground: 0 0% 32%;

  --green-bg: 143 55% 94%;
  --green-fg: 143 55% 26%;
  --yellow-bg: 45 95% 93%;
  --yellow-fg: 32 75% 34%;
  --red-bg: 0 80% 95%;
  --red-fg: #dc2626;
  --red-solid: #dc2626;
  --red-solid-fg: 0 0% 100%;
  --tier-mild: oklch(0.446 0.043 257.281);
  --tier-caution: oklch(0.769 0.188 70.08);
  --tier-severe: oklch(0.705 0.213 47.604);
  --tier-danger: #dc2626;
  --tier-mild-fg: var(--tier-light-fg);
  --tier-caution-fg: var(--tier-light-fg);
  --tier-dark-fg: hsl(var(--foreground));
  --tier-light-fg: #fff;
  --green-solid: var(--tier-mild);
  --blue-solid: var(--tier-mild);
  --orange-solid: var(--tier-severe);
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: 0 0% 9%;
    --foreground: 0 0% 98%;
    --card: 0 0% 15%;
    --border: 0 0% 25%;
    --muted: 0 0% 20%;
    --muted-foreground: 0 0% 64%;

    --green-bg: 143 35% 14%;
    --green-fg: 143 55% 62%;
    --yellow-bg: 40 45% 14%;
    --yellow-fg: 40 85% 65%;
    --red-bg: 0 45% 15%;
    --red-fg: #dc2626;
    --red-solid: #dc2626;
    --red-solid-fg: 0 0% 100%;
    --tier-mild: oklch(0.446 0.043 257.281);
    --tier-caution: oklch(0.769 0.188 70.08);
    --tier-severe: oklch(0.705 0.213 47.604);
    --tier-danger: #dc2626;
    --tier-mild-fg: var(--tier-light-fg);
    --tier-caution-fg: var(--tier-light-fg);
    --tier-dark-fg: var(--neutral-900);
    --tier-light-fg: #fff;
    --green-solid: var(--tier-mild);
    --blue-solid: var(--tier-mild);
    --orange-solid: var(--tier-severe);
  }
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 0;
}

.pull-refresh-indicator {
  position: fixed;
  top: calc(env(safe-area-inset-top) - 48px);
  left: 50%;
  z-index: 1400;
  display: none;
  align-items: center;
  gap: var(--space-2);
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid hsl(var(--border));
  border-radius: 1000px;
  background: hsl(0 0% 100%);
  color: hsl(var(--foreground));
  box-shadow: 0 8px 20px hsl(0 0% 0% / 0.14);
  font-size: 12px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(-50%, 0, 0);
  transition: transform 160ms ease, opacity 160ms ease;
}
.pull-refresh-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid hsl(var(--border));
  border-top-color: hsl(var(--foreground));
  border-radius: 50%;
}
.pull-refresh-indicator.is-ready .pull-refresh-spinner,
.pull-refresh-indicator.is-refreshing .pull-refresh-spinner {
  animation: pull-refresh-spin 780ms linear infinite;
}

@keyframes pull-refresh-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 860px) {
  .pull-refresh-indicator {
    display: inline-flex;
  }
}

a { color: inherit; }
strong,
b {
  font-weight: 600;
}
button,
input,
textarea,
select {
  font: inherit;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid hsl(var(--foreground));
  outline-offset: 2px;
}

.page-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: var(--space-3) var(--space-4) var(--space-8);
  /* flex column: 평시엔 소스 순서 그대로, 긴급 카드만 order로 최상단으로 끌어올림 */
  display: flex;
  flex-direction: column;
}
.page-inner > * { order: 0; }
.page-inner > .data-error-banner { order: -3; }
.page-inner > .tsunami-banner { order: -2; }
.page-inner > .deploy-note { order: -1; }
.page-inner > .highlight-card.is-breaking { order: -1; }

#section-map,
#section-timeline,
#section-trend,
#section-news,
#section-safety {
  scroll-margin-top: 116px;
}

.section-jump-nav {
  position: relative;
  top: auto;
  z-index: auto;
  display: flex;
  gap: 10px;
  margin-top: var(--space-8);
  margin-right: calc(var(--space-4) * -1);
  margin-left: calc(var(--space-4) * -1);
  padding: 10px var(--space-4) var(--space-2);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  border: none;
  border-radius: 0;
  background: hsl(var(--background));
  box-shadow: none;
}
@media (min-width: 861px) {
  .section-jump-nav {
    position: sticky;
    top: 48px;
    z-index: 1100;
  }
}
.section-jump-nav::-webkit-scrollbar {
  display: none;
}
.section-jump-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 18px;
  border-radius: 1000px;
  background: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.section-jump-link:hover {
  background: hsl(var(--muted) / 0.72);
  color: hsl(var(--foreground));
}
.section-jump-link.is-active {
  background: hsl(var(--foreground));
  color: hsl(var(--background));
}
.section-jump-nav + .map-timeline-layout {
  margin-top: var(--space-2);
}
.map-timeline-layout > .section-title-outside:first-child {
  margin-top: var(--space-2);
}

@media (max-width: 860px) {
  .section-jump-nav {
    position: relative;
    top: auto;
    z-index: auto;
    justify-content: flex-start;
    gap: 28px;
    width: calc(100% + (var(--space-4) * 2));
    height: 48px;
    min-height: 48px;
    max-height: 48px;
    margin-top: var(--space-4);
    margin-right: calc(var(--space-4) * -1);
    margin-left: calc(var(--space-4) * -1);
    padding: 9px var(--space-4) 0;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    overscroll-behavior-y: none;
    -webkit-overflow-scrolling: touch;
    touch-action: auto;
    border-bottom: 1px solid hsl(var(--border));
  }
  .section-jump-nav.has-scroll-left,
  .section-jump-nav.has-scroll-right {
    background: hsl(var(--background));
  }
  .section-jump-nav.has-scroll-left {
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 100%);
  }
  .section-jump-nav.has-scroll-right {
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 24px), transparent 100%);
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 24px), transparent 100%);
  }
  .section-jump-nav.has-scroll-left.has-scroll-right {
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
  }
  .section-jump-link {
    position: relative;
    flex: 0 0 auto;
    min-height: 36px;
    padding: 0 0 4px;
    border-radius: 0;
    background: transparent;
    color: hsl(var(--muted-foreground));
    font-size: 15px;
    font-weight: 700;
  }
  @media (max-width: 360px) {
    .section-jump-nav {
      gap: 14px;
    }
    .section-jump-link {
      font-size: 14px;
    }
  }
  .section-jump-link:hover {
    background: transparent;
    color: hsl(var(--foreground));
  }
  .section-jump-link.is-active {
    background: transparent;
    color: hsl(var(--foreground));
  }
  .section-jump-link.is-active::after {
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 3px;
    border-radius: 999px;
    background: currentColor;
    content: "";
  }
  .section-jump-nav + .map-timeline-layout {
    margin-top: 0;
  }
  #section-map > .section-title-outside:first-child {
    display: none;
  }
  #section-map > .map-card {
    width: calc(100% + (var(--space-4) * 2));
    margin-top: 0;
    margin-right: calc(var(--space-4) * -1);
    margin-left: calc(var(--space-4) * -1);
    border-top: 0;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }
  #section-timeline {
    height: min(560px, 66vh);
    max-height: min(560px, 66vh);
    margin-top: var(--space-2);
    padding: var(--space-3) 0 0;
    overflow-y: auto;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: inset 0 -18px 18px -18px hsl(var(--foreground) / 0.16);
    -webkit-overflow-scrolling: touch;
  }
  #section-timeline::after {
    position: sticky;
    right: 0;
    bottom: 0;
    left: 0;
    display: block;
    height: 52px;
    margin-top: -52px;
    background: linear-gradient(to bottom, hsl(var(--background) / 0), hsl(var(--background)) 88%);
    content: "";
    pointer-events: none;
  }
  #section-timeline .timeline-day {
    padding-right: 4px;
  }
  #section-timeline .timeline-group {
    margin-left: 4px;
    padding-left: 14px;
    padding-right: 4px;
  }
  #section-timeline .timeline-group::before {
    left: 3.5px;
  }
  body.mobile-section-panel-mode #section-trend,
  body.mobile-section-panel-mode #section-news,
  body.mobile-section-panel-mode #section-safety {
    margin-top: var(--space-5);
  }
  body.mobile-section-panel-mode .mobile-panel-hidden {
    display: none !important;
  }
}

.page-lede {
  color: hsl(var(--muted-foreground));
  font-size: 14px;
  margin: 0 0 var(--space-5);
}
.ai-caveat {
  display: block;
  margin-top: var(--space-2);
  font-size: 12px;
  color: hsl(var(--muted-foreground));
}

.map-timeline-layout {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 0;
  margin-top: var(--section-gap);
}
.map-timeline-layout .map-card {
  margin-top: 0;
  overflow: hidden;
}
.map-timeline-layout .map-card #quakeMap {
  height: 520px;
  min-height: 200px;
}
.map-card-timeline {
  max-height: 520px;
  margin-top: var(--space-4);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
@media (min-width: 861px) {
  .map-timeline-layout {
    grid-template-columns: minmax(0, 1.28fr) minmax(340px, 0.72fr);
    align-items: stretch;
    column-gap: var(--space-5);
  }
  .map-timeline-layout > .section-title-outside {
    grid-column: 1 / -1;
  }
  .map-timeline-layout .map-card {
    grid-column: 1;
  }
  #section-timeline.map-card-timeline {
    grid-column: 2;
    height: calc(520px + 56px);
    max-height: calc(520px + 56px);
    margin-top: var(--title-card-gap);
    padding-right: 10px;
    padding-left: 10px;
  }
  #section-timeline.map-card-timeline.is-heat-searching {
    height: auto;
    max-height: calc(520px + 56px);
  }
  #section-timeline .timeline-group {
    padding-right: 0;
  }
}
@media (max-width: 860px) {
  .highlight-card.is-breaking {
    padding-top: 16px;
    padding-right: 10px;
    padding-bottom: 16px;
    padding-left: 10px;
  }
  .highlight-card.is-breaking .breaking-tag {
    margin-bottom: var(--space-2);
  }
  .highlight-card.is-breaking .highlight-quake,
  .highlight-card.is-breaking .highlight-mag-col {
    gap: var(--space-2);
  }
  .highlight-card.is-breaking .highlight-place {
    line-height: 1.25;
  }
  .highlight-card.is-breaking .highlight-datetime {
    margin-top: 2px;
    line-height: 1.25;
  }
  .highlight-card.is-breaking .highlight-impact {
    margin-top: var(--space-2);
    padding-top: 0;
  }
  .map-timeline-layout .map-card #quakeMap {
    height: 400px;
    min-height: 180px;
  }
  .map-card-timeline {
    height: 480px;
    max-height: 480px;
  }
  #section-map,
  #section-timeline,
  #section-trend,
  #section-news,
  #section-safety {
    scroll-margin-top: 124px;
  }
}

/* 상태 배너 */
.status-banner {
  position: sticky;
  top: 0;
  z-index: 1200;
  padding: var(--space-3) var(--space-4);
  background: hsl(var(--card) / 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid hsl(var(--border));
}
.status-banner-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: var(--space-2) var(--space-4);
}

/* 종합 위험도 문구는 지진/쓰나미를 뭉뚱그려 애매한 정보를 줘서 제거됨.
   실제 위험 신호는 최상단 breaking 카드와 타임라인의 개별 지진 태그로 충분히 전달됨 */
.status-main {
  display: none;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.status-banner[data-level="danger"] .status-dot {
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .3; }
}

.status-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1 1 auto;
  min-width: 0;
  gap: var(--space-3);
  font-size: 12px;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  white-space: nowrap;
}
.conn-label {
  display: none;
}
.language-switcher {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: var(--radius-sm);
  background: hsl(var(--muted));
}
.language-btn {
  appearance: none;
  min-width: 30px;
  height: 24px;
  padding: 0 7px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 600;
}
.language-btn.is-active {
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  box-shadow: 0 1px 2px rgb(23 23 23 / 0.08);
}

.refresh-btn {
  display: inline-flex;
  align-items: center;
  padding: 3px var(--space-2);
  border-radius: var(--radius-sm);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background-color .15s, border-color .15s;
}
.refresh-btn:hover { border-color: hsl(var(--foreground) / 0.2); }
.refresh-btn:hover { background: hsl(var(--muted)); }
.refresh-btn:active { transform: scale(0.96); }

@media (max-width: 520px) {
  .status-banner-inner {
    gap: var(--space-2);
  }
  .status-meta {
    margin-left: auto;
    gap: var(--space-2);
    font-size: 11px;
  }
  .language-btn {
    min-width: 28px;
    padding: 0 6px;
  }
}

.deploy-note {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  margin-top: var(--space-1);
  padding: var(--space-2) var(--space-3);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  background: hsl(var(--card));
  box-shadow: 0 1px 2px rgb(23 23 23 / 0.04);
}
.deploy-note[hidden] {
  display: none;
}
.deploy-note-copy {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  flex: 1;
}
.deploy-note-label {
  flex: none;
  color: #008cff;
  font-size: 13px;
  font-weight: 600;
}
.deploy-note-copy strong {
  min-width: 0;
  overflow: hidden;
  color: hsl(var(--foreground));
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.deploy-note-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  font-family: inherit;
}
.deploy-note-close svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.deploy-note-close:hover {
  background: hsl(var(--muted));
  color: hsl(var(--foreground));
}

@media (max-width: 560px) {
  .deploy-note {
    align-items: center;
    padding: var(--space-2) var(--space-3);
  }
  .deploy-note-copy {
    display: flex;
    align-items: center;
    gap: var(--space-2);
  }
  .deploy-note-label {
    display: inline;
    margin-bottom: 0;
    font-size: 12px;
  }
  .deploy-note-copy strong {
    display: block;
    overflow: hidden;
    white-space: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

.floating-actions {
  position: fixed;
  right: max(var(--space-4), env(safe-area-inset-right));
  bottom: calc(var(--space-4) + env(safe-area-inset-bottom));
  z-index: 1200;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.refresh-fab,
.share-fab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid hsl(0 0% 100% / 0.12);
  border-radius: 1000px;
  background: hsl(var(--foreground));
  color: hsl(var(--background));
  box-shadow: 0 10px 24px rgb(23 23 23 / 0.18);
  cursor: pointer;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0;
}
.refresh-fab {
  width: 44px;
  height: 44px;
  padding: 0;
}
.refresh-fab svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform-origin: center;
}
.refresh-fab.is-loading svg {
  animation: refresh-spin 0.8s linear infinite;
}
.share-fab {
  padding: 0 var(--space-5);
}
.refresh-fab:hover,
.share-fab:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgb(23 23 23 / 0.22);
}
.refresh-fab:active,
.share-fab:active {
  transform: translateY(0) scale(0.98);
}

@keyframes refresh-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .refresh-fab.is-loading svg {
    animation: none;
  }
}
.share-toast {
  position: fixed;
  right: max(var(--space-4), env(safe-area-inset-right));
  bottom: calc(68px + env(safe-area-inset-bottom));
  z-index: 31;
  max-width: min(320px, calc(100vw - 32px));
  padding: 8px var(--space-3);
  border-radius: var(--radius-sm);
  background: hsl(var(--foreground));
  color: hsl(var(--background));
  box-shadow: 0 10px 24px rgb(23 23 23 / 0.18);
  font-size: 12px;
  font-weight: 600;
}
.share-toast[hidden] {
  display: none;
}

@media (max-width: 560px) {
  .floating-actions {
    right: max(var(--space-4), env(safe-area-inset-right));
    left: auto;
    bottom: calc(var(--space-4) + env(safe-area-inset-bottom));
    max-width: calc(100vw - 32px);
    transform: none;
  }
  .share-fab {
    width: max-content;
    padding: 0 var(--space-5);
  }
  .share-toast {
    right: var(--space-4);
    left: var(--space-4);
    bottom: calc(68px + env(safe-area-inset-bottom));
    max-width: none;
    text-align: center;
  }
}

/* 섹션 카드 공통 (shadcn Card 톤) */
.section-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-1);
}
.section-sub {
  font-size: 12.5px;
  color: hsl(var(--muted-foreground));
  margin: 0 0 var(--space-4);
}

/* 카드 바깥에 위치하는 타이틀 (레퍼런스 이미지 참고) */
.section-title-outside {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: var(--section-gap) 0 0;
  padding: 0 2px;
}
.section-sub-outside {
  max-width: 720px;
  margin: 2px 0 0;
  padding: 0 2px;
}
.page-inner > .section-title-outside:first-of-type {
  margin-top: var(--section-gap);
}
.section-title-outside + .section-sub-outside + .trend-card,
.section-title-outside + .section-sub-outside + .news-card,
.section-title-outside + .section-sub-outside + .timeline,
.section-title-outside + .help-card,
.section-title-outside + .map-card {
  margin-top: var(--title-card-gap);
}

.highlight-card,
.tsunami-banner,
.data-error-banner,
.timeline,
.news-card,
.map-card,
.help-card,
.tips-card,
.trend-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: var(--space-5);
  margin-top: var(--space-4);
  box-shadow: 0 1px 2px rgb(23 23 23 / 0.04);
}

.highlight-card {
  position: relative;
  overflow: visible;
}

.trend-card {
  position: relative;
  overflow: visible;
}

.loading-text {
  color: hsl(var(--muted-foreground));
  font-size: 13.5px;
}

/* 하이라이트 카드 */
.highlight-card .section-title {
  display: none;
}
.highlight-body .empty-text {
  color: hsl(var(--muted-foreground));
  font-size: 13.5px;
}
@media (max-width: 860px) {
  .deploy-note[hidden] + .highlight-card {
    margin-top: 10px;
  }
  .highlight-card {
    padding-top: var(--space-4);
    padding-right: 18px;
    padding-bottom: var(--space-4);
    padding-left: 18px;
  }
}

/* 최근 1시간 이내 발생 시: 네이버 안전지도 스타일의 솔리드 레드 긴급 배너로 전환 + 최상단 이동 (컴팩트) */
.highlight-card.is-breaking {
  padding: 16px 18px;
}
.highlight-card[data-tier="danger"] {
  background: var(--tier-danger);
  border-color: var(--tier-danger);
  color: var(--tier-light-fg);
}
.highlight-card[data-tier="severe"] {
  background: var(--tier-severe);
  border-color: var(--tier-severe);
  color: var(--tier-light-fg);
}
.highlight-card[data-tier="caution"] {
  background: var(--tier-caution);
  border-color: var(--tier-caution);
  color: var(--tier-caution-fg);
}
.highlight-card[data-tier="mild"] {
  background: var(--tier-mild);
  border-color: var(--tier-mild);
  color: var(--tier-mild-fg);
}
.highlight-card[data-tier="none"] {
  background: var(--tier-mild);
  border-color: var(--tier-mild);
  color: var(--tier-mild-fg);
}
.highlight-card[data-tier] .section-title {
  display: none;
}
.highlight-card[data-tier] .highlight-place,
.highlight-card[data-tier] .highlight-magnitude,
.highlight-card[data-tier] .highlight-scale-text {
  color: currentColor;
}
.highlight-card.is-breaking .highlight-magnitude,
.highlight-card.is-breaking .highlight-scale-text {
  font-size: 26px;
}
.highlight-card.is-breaking .highlight-place {
  font-size: 14.5px;
}
.highlight-card.is-breaking .highlight-quake {
  gap: var(--space-3);
}
.highlight-card[data-tier] .highlight-sub {
  color: currentColor;
  font-size: 12.5px;
  line-height: 1.6;
  opacity: 0.78;
}
.highlight-card[data-tier="danger"] .scale-badge {
  background: hsl(0 0% 100% / 0.18);
  color: var(--tier-light-fg);
}
.highlight-card[data-tier="severe"] .scale-badge {
  background: hsl(0 0% 100% / 0.18);
  color: var(--tier-light-fg);
}
.highlight-card[data-tier="caution"] .scale-badge {
  background: hsl(0 0% 100% / 0.18);
  color: var(--tier-caution-fg);
}
.highlight-card[data-tier="mild"] .scale-badge {
  background: hsl(0 0% 100% / 0.18);
  color: var(--tier-mild-fg);
}
.highlight-card[data-tier="none"] .scale-badge {
  background: hsl(0 0% 100% / 0.18);
  color: var(--tier-mild-fg);
}
.breaking-tag {
  display: inline-flex;
  align-items: center;
  padding: 1.5px var(--space-2);
  margin-bottom: var(--space-3);
  border-radius: 4px;
  background: hsl(0 0% 100% / 0.92);
  color: currentColor;
  font-size: 11px;
  font-weight: 600;
}
.highlight-time-tag {
  background: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
}
.highlight-card[data-tier] .highlight-time-tag {
  background: hsl(0 0% 100% / 0.18);
  color: var(--tier-light-fg);
}
.highlight-card[data-tier="danger"] .breaking-tag {
  color: var(--tier-light-fg);
}
.highlight-card[data-tier="severe"] .breaking-tag {
  color: var(--tier-light-fg);
}
.highlight-card[data-tier="caution"] .breaking-tag {
  color: var(--tier-light-fg);
}
.highlight-card[data-tier="mild"] .breaking-tag {
  color: var(--tier-light-fg);
}
.highlight-card[data-tier="none"] .breaking-tag {
  color: var(--tier-light-fg);
}
.highlight-card[data-tier] .empty-text {
  color: currentColor;
  opacity: 0.9;
}

.highlight-quake {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
}

.highlight-mag-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
}

.highlight-metrics {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
}

.highlight-magnitude,
.highlight-scale-text {
  font-size: 36px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
}
.highlight-scale-wrap {
  position: relative;
  display: inline-flex;
  align-items: baseline;
}
.highlight-scale-trigger {
  appearance: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}
.highlight-scale-tooltip {
  display: none;
}
.highlight-scale-tooltip:not([hidden]) {
  position: fixed;
  top: 0;
  left: 16px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 240px;
  max-width: calc(100vw - 32px);
  padding: 8px 10px;
  border-radius: 6px;
  background: hsl(0 0% 100%);
  color: hsl(var(--foreground));
  box-shadow: 0 8px 20px hsl(0 0% 0% / 0.16);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  transform: none;
}
.highlight-scale-tooltip-title,
.highlight-scale-tooltip-desc {
  display: block;
}
.highlight-scale-tooltip-desc {
  font-weight: 500;
}
@media (max-width: 860px) {
  .highlight-magnitude,
  .highlight-scale-text {
    font-size: 27px;
  }
  .highlight-card[data-tier] .highlight-impact {
    display: none;
  }
  .highlight-card.is-breaking .highlight-place {
    font-size: 14px;
  }
  .highlight-card.is-breaking .highlight-datetime {
    font-size: 13px;
  }
}

.highlight-details {
  min-width: 0;
}

.highlight-place {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.42;
}

.highlight-datetime {
  margin-top: 2px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.42;
}

.highlight-sub {
  margin-top: var(--space-1);
  font-size: 13px;
  color: hsl(var(--muted-foreground));
}

.highlight-impact {
  margin: var(--space-3) 0 0;
  padding-top: var(--space-1);
  border-top: 0;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.6;
  color: hsl(var(--muted-foreground));
}
.highlight-impact strong { color: hsl(var(--foreground)); }
.highlight-card[data-tier] .highlight-impact {
  display: none;
  color: currentColor;
  opacity: 0.6;
}

/* 배지 */
.scale-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px var(--space-2);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.scale-badge[data-tier="danger"]  { background: var(--tier-danger); color: var(--tier-light-fg); }
.scale-badge[data-tier="severe"]  { background: var(--tier-severe); color: var(--tier-light-fg); }
.scale-badge[data-tier="caution"] { background: var(--tier-caution); color: var(--tier-light-fg); }
.scale-badge[data-tier="mild"],
.scale-badge[data-tier="none"]    { background: var(--tier-mild); color: var(--tier-light-fg); }

/* 쓰나미 배너 (shadcn Alert destructive) */
.tsunami-banner {
  background: hsl(var(--red-bg));
  color: var(--red-fg);
  border-color: rgba(255, 0, 66, 0.25);
  font-size: 14px;
}

/* 데이터 API 오류 배너 (실제 위험이 아닌 기술적 오류이므로 경고색 사용) */
.data-error-banner {
  background: hsl(var(--yellow-bg));
  color: hsl(var(--yellow-fg));
  border-color: hsl(var(--yellow-fg) / 0.3);
  font-size: 14px;
}
html:has(body.is-data-error),
body.is-data-error {
  height: 100%;
  overflow: hidden;
}
body.is-data-error {
  background: hsl(var(--background));
}
body.is-data-error .status-banner,
body.is-data-error .page-footer,
body.is-data-error .floating-actions,
body.is-data-error .page-inner > :not(.data-error-banner) {
  display: none !important;
}
body.is-data-error main {
  height: 100dvh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
body.is-data-error .page-inner {
  width: 100%;
  height: 100%;
  max-width: 540px;
  padding: 0 var(--space-5);
}
body.is-data-error .data-error-banner {
  display: flex;
  justify-content: center;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: var(--space-6) var(--space-5);
  border: 0;
  background: transparent;
  box-shadow: none;
  color: hsl(var(--foreground));
}
.data-error-state {
  width: 100%;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.data-error-state h1 {
  margin: 0;
  color: hsl(var(--foreground));
  font-size: 25px;
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: 0;
}
.data-error-state p {
  margin: var(--space-2) 0 0;
  color: hsl(var(--muted-foreground));
  font-size: 14px;
  line-height: 1.5;
}
.data-error-retry {
  width: auto;
  min-width: 108px;
  margin-top: var(--space-6);
  min-height: 42px;
  padding: 0 var(--space-5);
  border: 1px solid hsl(var(--border));
  border-radius: 999px;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: none;
}
.data-error-retry:active {
  background: hsl(var(--muted));
}
@media (max-width: 860px) {
  body.is-data-error .page-inner {
    max-width: none;
    padding: 0 var(--space-5);
  }
  body.is-data-error .data-error-banner {
    min-height: 0;
    padding: var(--space-5) 0;
  }
  .data-error-state h1 {
    font-size: 24px;
  }
  .data-error-state p {
    font-size: 13.5px;
  }
}

/* 뉴스 / 도움정보: 다른 리스트 카드처럼 내부 스크롤 적용 */
.news-card,
.help-card {
  max-height: 640px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
@media (min-width: 861px) {
  .news-card.is-news-height-locked {
    display: flex;
    height: var(--news-card-height);
    max-height: var(--news-card-height);
    flex-direction: column;
    overflow: hidden;
  }
  .news-card.is-news-height-locked .news-tabs {
    align-self: flex-start;
  }
  .news-card.is-news-height-locked .news-panel:not([hidden]) {
    display: flex;
    min-height: 0;
    flex: 1 1 auto;
    flex-direction: column;
  }
  .news-card.is-news-height-locked .news-panel-scroll {
    display: block;
    min-height: 0;
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}
@media (max-width: 860px) {
  .news-card,
  .help-card {
    max-height: 420px;
  }
}
.news-tabs {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--radius-sm);
  background: hsl(var(--muted));
  gap: 2px;
}
.news-tabs[hidden] {
  display: none;
}
.news-tab-btn {
  min-width: 72px;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: hsl(var(--muted-foreground));
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 6px var(--space-3);
  cursor: pointer;
}
.news-tab-btn.is-active {
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  box-shadow: 0 1px 2px rgb(23 23 23 / 0.08);
}
.news-panel {
  margin-top: var(--space-3);
}
.news-panel-heading {
  display: none;
}
.news-panel-scroll {
  display: contents;
}
.news-card.is-local-only .news-panel {
  margin-top: 0;
}
.news-panel[hidden] {
  display: none;
}
.news-group { margin-top: var(--space-4); }
.news-group:first-of-type { margin-top: 0; }
.news-source-title {
  font-size: 12px;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0 0 var(--space-2);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid hsl(var(--border));
}
.news-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.news-item {
  display: flex;
  min-height: 92px;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-3) 0;
  border-bottom: 1px dashed hsl(var(--border));
}
.news-item:last-child { border-bottom: none; }
.news-item a {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
}
.news-item a:hover { text-decoration: underline; }
.news-item .news-original {
  font-size: 12px;
  color: hsl(var(--muted-foreground));
  margin-top: 2px;
}
.news-item .news-time {
  font-size: 11.5px;
  color: hsl(var(--muted-foreground));
  margin-top: 2px;
}
.news-item.is-disaster a { color: var(--red-fg); }

.korea-news-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--space-8);
}
.korea-news-item {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: var(--space-3);
  align-items: start;
  min-height: 92px;
  padding: var(--space-3) 0;
  border-bottom: 1px solid hsl(var(--border));
  color: inherit;
  text-decoration: none;
}
.korea-news-item:hover .korea-news-title {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.korea-news-thumb {
  display: grid;
  place-items: center;
  width: 110px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  background: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
  font-size: 12px;
  font-weight: 600;
}
.korea-news-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.korea-news-thumb.is-fallback {
  border: 1px solid hsl(var(--border));
  background: hsl(var(--muted) / 0.72);
  color: var(--neutral-600);
}
.korea-news-thumb.is-fallback span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 24px;
  border-radius: 999px;
  background: hsl(var(--background));
  color: var(--neutral-700);
  font-size: 11.5px;
  font-weight: 700;
}
.korea-news-copy {
  min-width: 0;
  padding-top: 1px;
}
.korea-news-title {
  display: -webkit-box;
  overflow: hidden;
  color: hsl(var(--foreground));
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.korea-news-meta {
  display: block;
  margin-top: var(--space-1);
  color: hsl(var(--muted-foreground));
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}
.korea-news-empty {
  margin: 0;
  color: hsl(var(--muted-foreground));
  font-size: 13.5px;
}
.korea-news-more {
  display: flex;
  width: fit-content;
  margin: var(--space-5) auto 0;
  align-items: center;
  justify-content: center;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 9px 22px;
  color: hsl(var(--foreground));
  background: hsl(var(--background));
  box-shadow: 0 1px 1px rgb(23 23 23 / 0.03);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.korea-news-more:hover {
  border-color: hsl(var(--muted-foreground) / 0.35);
}
@media (max-width: 700px) {
  .korea-news-list {
    grid-template-columns: 1fr;
  }
  .korea-news-item {
    grid-template-columns: 96px minmax(0, 1fr);
    min-height: 92px;
    gap: var(--space-2);
    padding: var(--space-3) 0;
  }
  .korea-news-thumb {
    width: 96px;
    border-radius: var(--radius);
  }
  .korea-news-title {
    font-size: 14px;
  }
  .korea-news-meta {
    font-size: 12.5px;
  }
}
@media (max-width: 390px) {
  .korea-news-item {
    grid-template-columns: 82px minmax(0, 1fr);
  }
  .korea-news-thumb {
    width: 82px;
  }
}

@media (max-width: 860px) {
  body.mobile-section-panel-mode #section-news,
  body.mobile-section-panel-mode #section-news + .section-sub-outside {
    display: none;
  }
  body.mobile-section-panel-mode .news-card {
    max-height: none;
    margin-top: var(--space-5);
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  body.mobile-section-panel-mode #section-news + .section-sub-outside + .news-card {
    margin-top: var(--space-5);
  }
  body.mobile-section-panel-mode .news-tabs {
    display: none;
  }
  body.mobile-section-panel-mode .news-panel,
  body.mobile-section-panel-mode .news-panel[hidden] {
    display: block !important;
    margin-top: 0;
    max-height: none;
    overflow: visible;
  }
  body.mobile-section-panel-mode .news-panel + .news-panel {
    margin-top: var(--space-6);
    padding-top: 0;
    border-top: 0;
  }
  body.mobile-section-panel-mode .news-panel + .news-panel .news-panel-heading {
    padding-top: var(--space-2);
  }
  body.mobile-section-panel-mode .news-panel-heading {
    display: block;
    margin: 0 0 var(--space-3);
    padding: 0;
  }
  body.mobile-section-panel-mode .news-panel-heading h3 {
    margin: 0;
    color: var(--neutral-900);
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.01em;
  }
  body.mobile-section-panel-mode .news-panel-heading p {
    margin: 2px 0 0;
    color: var(--neutral-600);
    font-size: 12.5px;
  }
  body.mobile-section-panel-mode .korea-news-title,
  body.mobile-section-panel-mode .news-item a {
    color: var(--neutral-900);
  }
  body.mobile-section-panel-mode .korea-news-meta,
  body.mobile-section-panel-mode .news-source-title,
  body.mobile-section-panel-mode .news-item .news-original,
  body.mobile-section-panel-mode .news-item .news-time {
    color: var(--neutral-600);
  }
  body.mobile-section-panel-mode .news-item.is-disaster a {
    color: var(--red-fg);
  }
  body.mobile-section-panel-mode .news-item,
  body.mobile-section-panel-mode .korea-news-item {
    min-height: 92px;
  }
  body.mobile-section-panel-mode .news-panel-scroll {
    position: relative;
    display: block;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: inset 0 -18px 18px -18px hsl(var(--foreground) / 0.16);
    -webkit-overflow-scrolling: touch;
  }
  body.mobile-section-panel-mode .news-panel-scroll::after {
    position: sticky;
    right: 0;
    bottom: 0;
    left: 0;
    display: block;
    height: 52px;
    margin-top: -52px;
    background: linear-gradient(to bottom, hsl(var(--background) / 0), hsl(var(--background)) 88%);
    content: "";
    pointer-events: none;
  }
}

/* 지도 */
.map-card {
  position: relative;
  padding: 0;
  overflow: hidden;
}
.map-layer-toggle {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 650;
  display: inline-flex;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.88);
  box-shadow: 0 6px 16px rgb(23 23 23 / 0.14);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.map-layer-toggle-btn {
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: hsl(var(--muted-foreground));
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.map-layer-toggle-btn.is-active {
  background: var(--neutral-900);
  color: var(--neutral-50);
}
#quakeMap {
  width: 100%;
  height: 480px;
  background: #dbeafe;
}
#quakeMap .leaflet-container,
#quakeMap .leaflet-tile-pane {
  background: #dbeafe;
}
#quakeMap .leaflet-tile {
  filter: saturate(0.78) contrast(0.96) brightness(1.04);
}
#quakeMap .leaflet-control-zoom {
  overflow: hidden;
  border: 1px solid rgb(23 23 23 / 0.14);
  border-radius: 8px;
  box-shadow: 0 3px 10px rgb(23 23 23 / 0.18);
}
#quakeMap .leaflet-control-zoom a {
  border: none;
  color: var(--neutral-900);
  background: rgba(255, 255, 255, 0.92);
  font-family: inherit;
  font-weight: 600;
}
#quakeMap .leaflet-control-zoom a + a {
  border-top: 1px solid rgb(23 23 23 / 0.12);
}
#quakeMap .leaflet-control-attribution {
  max-width: 150px;
  overflow: hidden;
  border-radius: var(--radius) 0 0 0;
  background: rgba(255, 255, 255, 0.68);
  color: rgb(82 82 82 / 0.72);
  font-size: 10px;
  white-space: nowrap;
}
#quakeMap .leaflet-popup-content-wrapper {
  border-radius: var(--radius);
  background: var(--neutral-900);
  color: var(--neutral-50);
  box-shadow: 0 8px 18px rgb(23 23 23 / 0.2);
}
#quakeMap .leaflet-popup-content {
  margin: 10px 12px;
  color: var(--neutral-50);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}
#quakeMap .leaflet-popup-content strong {
  color: var(--neutral-50);
  font-weight: 600;
}
#quakeMap .leaflet-popup-tip {
  background: var(--neutral-900);
  box-shadow: 0 2px 8px rgb(23 23 23 / 0.16);
}
#quakeMap .leaflet-popup-close-button {
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  color: var(--neutral-100);
  font-size: 18px;
  line-height: 22px;
  opacity: 0.72;
}
#quakeMap .leaflet-popup-close-button:hover {
  color: var(--neutral-50);
  opacity: 1;
}
.map-summary-panel {
  min-width: 128px;
  padding: 8px 10px;
  border: 1px solid rgb(23 23 23 / 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 18px rgb(23 23 23 / 0.18);
  color: hsl(var(--foreground));
  font-family: inherit;
  line-height: 1.2;
}
.map-summary-panel span,
.map-summary-panel small {
  display: block;
  color: hsl(var(--muted-foreground));
  font-size: 10.5px;
  font-weight: 600;
}
.map-summary-panel strong {
  display: block;
  margin: 2px 0;
  color: var(--neutral-900);
  font-size: 20px;
  font-weight: 600;
}
.map-ko-label {
  pointer-events: none;
}
.map-ko-label span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  color: rgb(23 23 23 / 0.58);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  text-shadow:
    0 1px 0 rgba(255,255,255,0.9),
    0 -1px 0 rgba(255,255,255,0.75),
    1px 0 0 rgba(255,255,255,0.75),
    -1px 0 0 rgba(255,255,255,0.75);
}
.map-ko-label-primary span {
  color: rgb(23 23 23 / 0.78);
  font-size: 13.5px;
  font-weight: 600;
}
.map-ko-label-area span {
  color: rgb(23 23 23 / 0.5);
  font-size: 11px;
}
.map-ko-label-far span {
  color: rgb(23 23 23 / 0.38);
  font-size: 11px;
}
.map-pref-label {
  pointer-events: auto;
}
.map-pref-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  transform: translate(-50%, -50%);
  padding: 6px 8px 7px;
  border: 1px solid rgba(255,255,255,0.52);
  border-radius: 8px;
  box-shadow: 0 7px 16px rgb(23 23 23 / 0.22);
  color: var(--neutral-50);
  font-family: inherit;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
}
.map-pref-badge[data-tier="danger"] { background: var(--tier-danger); color: var(--tier-light-fg); }
.map-pref-badge[data-tier="severe"] { background: var(--tier-severe); color: var(--tier-light-fg); }
.map-pref-badge[data-tier="caution"] { background: var(--tier-caution); color: var(--tier-light-fg); }
.map-pref-badge[data-tier="mild"],
.map-pref-badge[data-tier="none"] { background: var(--tier-mild); color: var(--tier-light-fg); }
.map-pref-badge[data-heat-tier="danger"] { background: #dc2626; color: var(--neutral-50); }
.map-pref-badge[data-heat-tier="severe"] { background: #f97316; color: var(--neutral-50); }
.map-pref-badge[data-heat-tier="caution"] { background: #f59e0b; color: var(--neutral-50); }
.map-pref-badge[data-heat-tier="mild"] { background: var(--neutral-600); color: var(--neutral-50); }
.map-pref-badge strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
}
.map-pref-badge small {
  display: block;
  margin-top: 2px;
  color: currentColor;
  opacity: 0.82;
  font-size: 10px;
  font-weight: 600;
}
.map-scale-dot {
  pointer-events: auto;
}
.map-scale-dot-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  transform: translate(-50%, -50%);
  border: 1px solid hsl(var(--background) / 0.78);
  border-radius: 50%;
  box-shadow: 0 4px 10px rgb(23 23 23 / 0.22);
  color: var(--neutral-50);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}
.map-scale-dot-badge[data-tier="danger"] { background: var(--tier-danger); }
.map-scale-dot-badge[data-tier="severe"] { background: var(--tier-severe); }
.map-scale-dot-badge[data-tier="caution"] { background: var(--tier-caution); }
.map-scale-dot-badge[data-tier="mild"],
.map-scale-dot-badge[data-tier="none"] { background: var(--tier-mild); }
.map-heat-dot {
  pointer-events: auto;
}
.map-heat-dot-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 28px;
  transform: translate(-50%, -50%);
  padding: 0 7px;
  border: 1px solid hsl(var(--background) / 0.84);
  border-radius: 999px;
  box-shadow: 0 5px 12px rgb(23 23 23 / 0.2);
  color: var(--neutral-50);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}
.map-heat-dot-badge[data-heat-tier="danger"] { background: #dc2626; }
.map-heat-dot-badge[data-heat-tier="severe"] { background: #f97316; }
.map-heat-dot-badge[data-heat-tier="caution"] { background: #f59e0b; }
.map-heat-dot-badge[data-heat-tier="mild"] { background: var(--neutral-600); }
.map-focus-marker {
  pointer-events: auto;
}
.map-focus-marker span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  transform: translate(-50%, -50%);
  border: 3px solid hsl(var(--background));
  border-radius: 50%;
  box-shadow: 0 8px 18px rgb(23 23 23 / 0.24);
  color: var(--neutral-50);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
}
.map-focus-marker span[data-tier="danger"] { background: var(--tier-danger); }
.map-focus-marker span[data-tier="severe"] { background: var(--tier-severe); }
.map-focus-marker span[data-tier="caution"] { background: var(--tier-caution); }
.map-focus-marker span[data-tier="mild"],
.map-focus-marker span[data-tier="none"] { background: var(--tier-mild); }
.map-quake-tooltip {
  border: none;
  border-radius: var(--radius);
  background: rgba(17, 24, 39, 0.88);
  color: var(--neutral-50);
  box-shadow: 0 4px 12px rgb(23 23 23 / 0.2);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
}
.map-quake-tooltip::before {
  border-top-color: rgba(17, 24, 39, 0.88);
}
@media (max-width: 860px) {
  #quakeMap { height: 340px; }
  .map-layer-toggle {
    top: 10px;
    right: 10px;
  }
  .map-layer-toggle-btn {
    height: 28px;
    padding: 0 10px;
    font-size: 11.5px;
  }
  .map-ko-label span {
    font-size: 10px;
  }
  .map-pref-badge {
    min-width: 84px;
    padding: 5px 7px 6px;
  }
  .map-pref-badge strong {
    font-size: 11px;
  }
  .map-pref-badge small {
    font-size: 9px;
  }
  .map-scale-dot-badge {
    width: 26px;
    height: 26px;
    font-size: 12px;
  }
  .map-heat-dot-badge {
    min-width: 30px;
    height: 26px;
    font-size: 11px;
  }
  .map-summary-panel {
    min-width: 112px;
    padding: 7px 9px;
  }
  .map-summary-panel strong {
    font-size: 17px;
  }
}
.map-fallback {
  padding: 0 var(--space-5) var(--space-5);
  font-size: 13px;
  color: hsl(var(--muted-foreground));
}
.map-legend {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  padding: var(--space-4) var(--space-5);
  font-size: 13px;
  line-height: 1;
  color: hsl(var(--muted-foreground));
}
.map-legend span { display: inline-flex; align-items: center; gap: var(--space-1); line-height: 1; white-space: nowrap; }
.map-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.map-legend .korea-quake-legend-dot { background: oklch(0.623 0.214 259.815); }
@media (max-width: 860px) {
  .map-legend {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 14px;
    padding: 8px var(--space-5);
    font-size: 12px;
    line-height: 1.2;
    scrollbar-width: none;
  }
  .map-legend::-webkit-scrollbar { display: none; }
  .map-legend i { width: 9px; height: 9px; }
}
.map-glossary {
  margin: 0;
  padding: 0 var(--space-5) var(--space-5);
  font-size: 11.5px;
  line-height: 1.6;
  color: hsl(var(--muted-foreground));
}
.map-glossary strong { color: hsl(var(--foreground)); font-weight: 600; }

/* 브리핑 타임라인 */
.timeline-caveat {
  display: block;
  margin-bottom: var(--space-4);
  font-size: 12px;
  color: hsl(var(--muted-foreground));
}

.timeline-hint {
  margin: 0 0 0 auto;
  color: hsl(var(--muted-foreground));
  opacity: 0.62;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.25;
  text-align: right;
}

.quake-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline-day {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 13.5px;
  font-weight: 600;
  margin: var(--space-4) 0 var(--space-2);
  padding-left: 2px;
}
.timeline-day-main {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.timeline-day:first-child { margin-top: 0; }
.timeline-day-dot {
  position: relative;
  width: 13px;
  height: 13px;
  margin-right: -4px;
  border-radius: 50%;
  background: transparent;
  flex: none;
}
.timeline-day-dot::before {
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background: hsl(var(--muted-foreground));
  content: "";
}
.timeline-day.is-today .timeline-day-dot::before {
  background: var(--red-fg);
  box-shadow: 0 0 0 2px hsl(var(--red-bg));
}
.timeline-day.is-today .timeline-day-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid var(--red-fg);
  opacity: 0.45;
  animation: live-dot-pulse 1.6s ease-out infinite;
}
@keyframes live-dot-pulse {
  0% {
    transform: scale(0.72);
    opacity: 0.6;
  }
  70%,
  100% {
    transform: scale(1);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .timeline-day.is-today .timeline-day-dot::after {
    animation: none;
  }
}

.timeline-group {
  position: relative;
  padding-left: var(--space-3);
  margin-left: 4px;
  border-left: 0;
}
.timeline-group::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 3.5px;
  width: 2px;
  background: hsl(var(--border));
}

.heat-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin: 0 0 var(--space-2);
  font-size: 13.5px;
  font-weight: 600;
}

.heat-search-row {
  display: block;
  margin: 0 0 var(--space-2);
}

.heat-search {
  display: block;
  margin: 0;
}

.heat-search-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.heat-search-input {
  width: 100%;
  height: 38px;
  padding: 0 13px;
  border: 1px solid hsl(var(--border));
  border-radius: 8px;
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  outline: 0;
}

.heat-search-input::placeholder {
  color: hsl(var(--muted-foreground));
  opacity: 0.72;
}

.heat-search-input:focus {
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 2px hsl(var(--ring) / 0.12);
}

.heat-search-empty {
  margin: var(--space-3) 0 0;
  color: hsl(var(--muted-foreground));
  font-size: 13px;
  font-weight: 500;
  text-align: center;
}

.heat-card {
  display: block;
  padding: 16px 18px 15px 16px;
  margin: 0 0 var(--space-3);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  background: hsl(var(--card));
  cursor: pointer;
}
@media (max-width: 860px) {
  body.mobile-section-panel-mode .heat-card {
    padding-left: 14px;
  }
}

.heat-card:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

.heat-card-title {
  display: block;
  color: hsl(var(--foreground));
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  margin-top: 8px;
}

.heat-card-tag {
  display: inline-flex;
  width: fit-content;
}

.heat-card-advice {
  display: block;
  color: hsl(var(--foreground));
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
  margin-top: 3px;
}

.heat-card-metric {
  display: block;
  color: hsl(var(--muted-foreground));
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
  margin-top: 8px;
}

.heat-card-sub,
.heat-card-source {
  display: block;
  color: hsl(var(--muted-foreground));
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.35;
}

.heat-card-source {
  margin-top: 4px;
}

.quake-row {
  display: block;
  padding: var(--space-3);
  margin: 0 0 var(--space-2);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  background: hsl(var(--card));
  cursor: pointer;
  font-size: 13.5px;
}
.quake-row:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}
/* 위험(진도 6약 이상) 항목은 빨간 테두리로 눈에 띄게 강조 */
.quake-row.is-severe {
  border: 1.5px solid var(--tier-danger);
}
.quake-row.is-new {
  animation: flash-in .9s ease-out;
}
@keyframes flash-in {
  0%   { background-color: hsl(var(--yellow-bg)); }
  100% { background-color: transparent; }
}

.quake-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}
.quake-time {
  font-size: 13px;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
  font-variant-numeric: tabular-nums;
  opacity: 0.82;
}
.quake-tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 var(--space-2);
  border-radius: 1000px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
}
.quake-tag[data-tier="danger"]  { background: var(--tier-danger); color: var(--tier-light-fg); border: 1px solid var(--tier-danger); }
.quake-tag[data-tier="severe"]  { background: var(--tier-severe); color: var(--tier-light-fg); border: 1px solid var(--tier-severe); }
.quake-tag[data-tier="caution"] { background: var(--tier-caution); color: var(--tier-light-fg); border: 1px solid var(--tier-caution); }
.quake-tag[data-tier="mild"],
.quake-tag[data-tier="none"]    { background: var(--tier-mild); color: var(--tier-light-fg); border: 1px solid var(--tier-mild); }
.quake-tag.region-tag { background: hsl(var(--muted)); color: hsl(var(--muted-foreground)); }

.quake-place {
  display: block;
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 1px;
}

.quake-nearby {
  display: block;
  color: hsl(var(--muted-foreground));
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  margin-top: 0;
}

.quake-desc {
  display: block;
  color: hsl(var(--foreground));
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  margin-top: var(--space-1);
  opacity: 1;
}

/* 도움 정보 */
.help-card {
  padding: var(--space-6) var(--space-4);
}
.help-card > .section-title {
  font-size: 16px;
  margin-bottom: var(--space-3);
}
.contact-row {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  padding: var(--space-4);
  border-radius: 8px;
  border: 1px solid rgba(255, 0, 66, 0.16);
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  text-decoration: none;
  margin-bottom: 0;
  box-shadow: 0 1px 2px rgb(23 23 23 / 0.03);
}
.contact-row:hover {
  border-color: rgba(255, 0, 66, 0.3);
  background: hsl(var(--red-bg) / 0.42);
}
.contact-row-extra {
  display: none;
}
.contact-name {
  font-weight: 600;
  font-size: 14.5px;
}
.contact-num {
  color: var(--red-fg);
  font-weight: 600;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.action-title {
  margin-top: var(--space-6);
  padding-top: 0;
  border-top: none;
}

/* 지진 추이 차트 */
.trend-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: var(--space-2) var(--space-3);
}
.trend-header-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1 1 auto;
  min-width: 0;
  gap: var(--space-1);
}
.trend-header .section-sub {
  margin: 0;
}
.trend-header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-left: auto;
}
@media (max-width: 480px) {
  .trend-header-right {
    justify-content: flex-end;
  }
}
.trend-badge {
  display: none;
  align-items: center;
  gap: 3px;
  padding: 3px var(--space-2);
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.trend-badge.is-visible { display: inline-flex; }
.trend-badge[data-tier="danger"] { background: var(--tier-danger); color: var(--tier-light-fg); }
.trend-badge[data-tier="severe"] { background: var(--tier-severe); color: var(--tier-light-fg); }
.trend-badge[data-tier="caution"] { background: var(--tier-caution); color: var(--tier-light-fg); }
.trend-badge[data-tier="mild"] { background: var(--tier-mild); color: var(--tier-light-fg); }
.trend-badge[data-tier="none"],
.trend-badge.flat { background: var(--tier-mild); color: var(--tier-light-fg); }

.trend-toggle {
  display: inline-flex;
  padding: 2px;
  border-radius: var(--radius-sm);
  background: hsl(var(--muted));
  gap: 2px;
}
.trend-toggle-btn {
  border: none;
  background: transparent;
  color: hsl(var(--muted-foreground));
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px var(--space-2);
  border-radius: var(--radius);
  cursor: pointer;
}
.trend-toggle-btn.is-active {
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  box-shadow: 0 1px 2px rgb(23 23 23 / 0.08);
}

.trend-chart-wrap { margin-top: var(--space-5); position: relative; }
.trend-chart-wrap svg { width: 100%; height: auto; display: block; overflow: visible; }
.trend-summary {
  display: none;
}
.trend-dot,
.trend-hit-dot {
  cursor: pointer;
}
.trend-tooltip {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  padding: 6px var(--space-2);
  border-radius: var(--radius-sm);
  background: hsl(var(--foreground));
  color: hsl(var(--background));
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  transform: translate(-50%, -110%);
  transition: opacity .1s;
  box-shadow: 0 4px 10px rgb(23 23 23 / 0.15);
}
.trend-tooltip[hidden] { display: none; }
.trend-grid-line { stroke: hsl(var(--border)); stroke-width: 1; }
.trend-axis-label {
  fill: hsl(var(--muted-foreground));
  font-size: 10px;
  font-family: inherit;
}
.trend-y-label {
  fill: hsl(var(--muted-foreground));
  font-size: 10px;
  font-family: inherit;
}
.trend-line-segment {
  stroke-width: 1.5;
  stroke-linecap: round;
}
.trend-line-segment[data-tier="danger"] { stroke: var(--tier-danger); }
.trend-line-segment[data-tier="severe"] { stroke: var(--tier-severe); }
.trend-line-segment[data-tier="caution"] { stroke: var(--tier-caution); }
.trend-line-segment[data-tier="mild"] { stroke: var(--tier-mild); }
.trend-line-segment[data-tier="none"] { stroke: var(--tier-mild); }
.trend-area-segment[data-tier="danger"] { fill: rgb(220 38 38 / 0.12); }
.trend-area-segment[data-tier="severe"] { fill: oklch(0.705 0.213 47.604 / 0.14); }
.trend-area-segment[data-tier="caution"] { fill: oklch(0.769 0.188 70.08 / 0.18); }
.trend-area-segment[data-tier="mild"] { fill: oklch(0.446 0.043 257.281 / 0.16); }
.trend-area-segment[data-tier="none"] { fill: oklch(0.446 0.043 257.281 / 0.12); }
.trend-dot { fill: hsl(var(--card)); stroke-width: 1.5; }
.trend-dot[data-tier="danger"] { stroke: var(--tier-danger); }
.trend-dot[data-tier="severe"] { stroke: var(--tier-severe); }
.trend-dot[data-tier="caution"] { stroke: var(--tier-caution); }
.trend-dot[data-tier="mild"] { stroke: var(--tier-mild); }
.trend-dot[data-tier="none"] { stroke: var(--tier-mild); }
.trend-dot.is-last[data-tier="danger"] { fill: var(--tier-danger); stroke: hsl(var(--card)); }
.trend-dot.is-last[data-tier="severe"] { fill: var(--tier-severe); stroke: hsl(var(--card)); }
.trend-dot.is-last[data-tier="caution"] { fill: var(--tier-caution); stroke: hsl(var(--card)); }
.trend-dot.is-last[data-tier="mild"] { fill: var(--tier-mild); stroke: hsl(var(--card)); }
.trend-dot.is-last[data-tier="none"] { fill: var(--tier-mild); stroke: hsl(var(--card)); }
.trend-hit-dot {
  fill: rgb(23 23 23 / 0.001);
  stroke: transparent;
  pointer-events: all;
}
@media (min-width: 861px) {
  .trend-line-segment {
    stroke-width: 1;
  }
}
@media (max-width: 560px) {
  .trend-card {
    padding: var(--space-4);
  }
  .trend-header {
    align-items: center;
    gap: var(--space-2);
  }
  .trend-badge {
    max-width: 100%;
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .trend-toggle {
    flex: none;
  }
  .trend-toggle-btn {
    min-width: 48px;
    padding: 5px var(--space-2);
    font-size: 12px;
  }
  .trend-chart-wrap {
    margin-top: var(--space-4);
    margin-right: calc(var(--space-4) * -1);
    margin-left: calc(var(--space-4) * -1);
    padding: 0 var(--space-4) var(--space-2);
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .trend-chart-wrap svg {
    width: 620px;
    max-width: none;
  }
  .trend-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-2);
    margin-top: var(--space-3);
  }
  .trend-summary-item {
    min-width: 0;
    padding: var(--space-2);
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius-sm);
    background: hsl(var(--muted) / 0.38);
  }
  .trend-summary-label {
    display: block;
    margin-bottom: 2px;
    color: hsl(var(--muted-foreground));
    font-size: 11px;
    font-weight: 600;
  }
  .trend-summary-value {
    display: block;
    color: hsl(var(--foreground));
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .trend-axis-label,
  .trend-y-label {
    font-size: 11px;
  }
}

/* 실전 팁 */
.tips-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}
.contact-row + .tips-list {
  margin-top: var(--space-4);
}
.safety-contact-group + .safety-action-group {
  margin-top: var(--space-4);
}
.safety-group-heading {
  display: none;
}
.tips-list li {
  min-height: 116px;
  padding: var(--space-4);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-sm);
  background: hsl(var(--card));
  font-size: 13px;
  color: hsl(var(--muted-foreground));
  line-height: 1.55;
}
.tips-list strong {
  display: block;
  margin-bottom: var(--space-2);
  font-size: 14px;
  font-weight: 600;
  color: hsl(var(--foreground));
  line-height: 1.35;
}
.tips-list a {
  display: inline-block;
  margin-top: var(--space-2);
  color: var(--green-solid);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.tips-list code {
  background: hsl(var(--border) / 0.6);
  padding: 1px 5px;
  border-radius: var(--radius);
  font-size: 12.5px;
}
@media (max-width: 560px) {
  .tips-list {
    grid-template-columns: 1fr;
  }
  .tips-list li {
    min-height: auto;
  }
}

@media (max-width: 860px) {
  body.mobile-section-panel-mode #section-safety {
    display: none;
  }
  body.mobile-section-panel-mode .help-card {
    max-height: none;
    margin-top: var(--space-5);
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  body.mobile-section-panel-mode #section-safety + .help-card {
    margin-top: var(--space-5);
  }
  body.mobile-section-panel-mode .safety-group + .safety-group {
    margin-top: 32px;
  }
  body.mobile-section-panel-mode .safety-group-heading {
    display: block;
    margin: 0 0 var(--space-3);
  }
  body.mobile-section-panel-mode .safety-group-heading h3 {
    margin: 0;
    color: var(--neutral-900);
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.55;
  }
  body.mobile-section-panel-mode .contact-list,
  body.mobile-section-panel-mode .tips-list {
    display: block;
    margin: 0;
    padding: 0;
  }
  body.mobile-section-panel-mode .contact-list,
  body.mobile-section-panel-mode .safety-action-group .tips-list {
    position: relative;
    max-height: 300px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  body.mobile-section-panel-mode .contact-list.has-scroll-content::after,
  body.mobile-section-panel-mode .safety-action-group .tips-list.has-scroll-content::after {
    position: sticky;
    right: 0;
    bottom: 0;
    left: 0;
    display: block;
    height: 52px;
    margin-top: -52px;
    background: linear-gradient(to bottom, hsl(var(--background) / 0), hsl(var(--background)) 88%);
    content: "";
    pointer-events: none;
  }
  body.mobile-section-panel-mode .contact-row,
  body.mobile-section-panel-mode .tips-list li {
    display: block;
    min-height: 0;
    margin: 0;
    padding: var(--space-4) 0;
    border: 0;
    border-bottom: 1px solid hsl(var(--border));
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  body.mobile-section-panel-mode .contact-row:first-child,
  body.mobile-section-panel-mode .tips-list li:first-child {
    padding-top: 0;
  }
  body.mobile-section-panel-mode .contact-row:last-child,
  body.mobile-section-panel-mode .tips-list li:last-child {
    padding-bottom: 0;
    border-bottom: 0;
  }
  body.mobile-section-panel-mode .contact-row:hover {
    background: transparent;
  }
  body.mobile-section-panel-mode .contact-name,
  body.mobile-section-panel-mode .tips-list strong {
    display: block;
    margin: 0 0 var(--space-1);
    color: var(--neutral-900);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
  }
  body.mobile-section-panel-mode .contact-num {
    display: block;
    color: var(--neutral-600);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
  }
  body.mobile-section-panel-mode .contact-row:first-child .contact-num {
    color: var(--red-fg);
    font-weight: 600;
  }
  body.mobile-section-panel-mode .tips-list li {
    color: var(--neutral-600);
    font-size: 13px;
    line-height: 1.55;
  }
}

/* 푸터: 카드가 아니라 좌우로 넓은 무채색 배경 밴드 */
.page-footer {
  margin-top: var(--space-8);
  width: 100%;
  background: hsl(var(--muted));
  font-size: 12px;
  color: hsl(var(--muted-foreground));
}
.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-4) calc(var(--space-6) + 72px + env(safe-area-inset-bottom));
}
.page-footer a { text-decoration: underline; text-underline-offset: 2px; }
.footer-glossary {
  margin: var(--space-3) 0 0;
  font-size: 11px;
  line-height: 1.6;
  color: hsl(var(--muted-foreground));
  overflow: visible;
  white-space: normal;
}
.footer-search-summary {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid hsl(var(--border));
}
.footer-search-summary h2 {
  margin: 0 0 var(--space-1);
  color: hsl(var(--foreground));
  font-size: 12px;
  font-weight: 600;
}
.footer-search-summary p {
  margin: 0;
  line-height: 1.7;
}
.footer-seo-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: var(--space-2);
}
.footer-seo-link {
  color: hsl(var(--muted-foreground));
  font-size: 12px;
}
.footer-meta {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid hsl(var(--border));
  line-height: 1.7;
}

@media (max-width: 420px) {
  .highlight-magnitude,
  .highlight-scale-text {
    font-size: 27px;
  }
  #quakeMap { height: 260px; }
}
