/* ============================================================
   Beacon — 공통 컴포넌트 (명세서 §4)
   ============================================================ */

/* ---------- 앱 셸 ---------- */
.app { display: flex; height: 100dvh; }
#rail { display: none; }
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; height: 100dvh; }

#screen {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
/* 글자 크기 조절(설정) — 콘텐츠 화면만 확대(지도 .map-screen 제외) */
.screen-pad { padding: 14px var(--pad-screen) 24px; zoom: var(--fs, 1); }

/* ============================================================
   §4.1 상단 상태 스트립
   ============================================================ */
.status-strip {
  height: var(--strip-h);
  flex-shrink: 0;
  display: flex; align-items: center; gap: 10px;
  padding: 0 var(--pad-screen);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.status-strip .wordmark {
  font-family: var(--font-mono); font-weight: 600;
  font-size: 13px; letter-spacing: 3px;
  color: var(--text-primary);
  display: flex; align-items: center; gap: 8px;
  white-space: nowrap;
}
.status-strip .spacer { flex: 1; }
.status-pills { display: flex; gap: 6px; overflow: hidden; }
.status-pill {
  font-family: var(--font-mono); font-size: 9px; font-weight: 500;
  letter-spacing: 0.5px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  padding: 3px 7px;
  white-space: nowrap;
  color: var(--text-secondary);
}
.status-pill.is-offline { color: var(--yellow-text); }
.status-pill.is-online  { color: var(--green-text); }
.status-pill.is-gps-ok  { color: var(--green-text); }
.status-pill.is-gps-bad { color: var(--red-text); }
.status-pill.is-powersave { color: var(--yellow-text); }

/* §4.2 비상 모드 버튼 */
.emergency-btn {
  background: var(--red-fill);
  color: var(--red-on);
  font-size: 12px; font-weight: 700;
  border-radius: var(--radius-btn);
  padding: 8px 11px;
  white-space: nowrap;
  flex-shrink: 0;
  min-height: 34px;
}
.emergency-btn:hover { background: var(--red-hover); }

/* ============================================================
   §4.3 하단 탭바 (모바일)
   ============================================================ */
.tabbar {
  height: var(--tabbar-h);
  flex-shrink: 0;
  display: flex;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.tab-item {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
  color: var(--text-tertiary);
  position: relative;
  font-size: 10.5px;
  min-width: 0;
}
.tab-item svg { width: 22px; height: 22px; }
.tab-item span { white-space: nowrap; }
.tab-item.active { color: var(--text-primary); }
.tab-item.active::before {
  content: '';
  position: absolute; top: 0; left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 3px;
  background: var(--red-fill);
  border-radius: 0 0 2px 2px;
}

/* ============================================================
   §4.4 카드 / 패널
   ============================================================ */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 14px;
}
.panel + .panel, .stack > * + * { margin-top: 12px; }
.panel-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 8px; margin-bottom: 10px;
}
.panel-head .meta {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--text-tertiary); white-space: nowrap;
}

/* ============================================================
   §4.5 칩
   ============================================================ */
.chip-row { display: flex; gap: 7px; flex-wrap: wrap; }
.chip {
  border-radius: var(--radius-chip);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  font-size: 12px;
  padding: 6px 13px;
  white-space: nowrap;
  min-height: 32px;
}
.chip:hover { border-color: var(--border-hover); }
.chip.selected {
  color: var(--text-primary);
  border-color: var(--text-primary);
}
/* 레이어 토글 칩 (지도) */
.layer-chip {
  display: flex; align-items: center; gap: 7px;
  border-radius: var(--radius-chip);
  font-size: 12px; padding: 7px 12px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text-tertiary);
  white-space: nowrap;
  min-height: 34px;
}
.layer-chip .swatch { width: 7px; height: 7px; border-radius: 1.5px; flex-shrink: 0; }
.layer-chip.on-green  { background: var(--green-tint); border-color: var(--green-fill); color: var(--green-text); }
.layer-chip.on-yellow { background: var(--yellow-chip-tint); border-color: var(--yellow-fill); color: var(--yellow-text); }
.layer-chip.on-pink   { background: #2a1622; border-color: #F472B6; color: #F9A8D4; }
.layer-chip.on-violet { background: #1e1b33; border-color: #A78BFA; color: #C4B5FD; }
/* 상태 칩 */
.state-chip {
  border-radius: 5px; font-size: 11px;
  padding: 4px 9px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  white-space: nowrap;
}
.state-chip.green { color: var(--green-text); border-color: var(--green-fill); }
.state-chip.yellow { color: var(--yellow-text); border-color: var(--yellow-tint-border); }

/* ============================================================
   §4.6 세그먼티드 프리셋 버튼
   ============================================================ */
.preset-group { display: flex; gap: 7px; }
.preset-btn {
  flex: 1;
  border-radius: 8px;
  padding: 12px 6px;
  font-size: 14px; font-weight: 700;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  min-height: var(--touch-min);
  min-width: 0;
}
.preset-btn small {
  display: block; font-weight: 400; font-size: 11px;
  margin-top: 2px; color: var(--text-tertiary);
}
.preset-btn:hover { border-color: var(--border-hover); }
.preset-btn.selected {
  background: var(--text-primary);
  border-color: var(--text-primary);
  color: var(--bg);
}
.preset-btn.selected small { color: var(--bg); opacity: 0.66; }

/* ============================================================
   §4.7 리스트 행
   ============================================================ */
.list-row {
  display: flex; align-items: center; gap: 11px;
  min-height: var(--touch-min);
  padding: 8px 2px;
  width: 100%;
  text-align: left;
}
.list-row + .list-row { border-top: 1px solid var(--border); }
.type-badge {
  font-family: var(--font-mono); font-size: 8.5px; font-weight: 500;
  letter-spacing: 0.8px;
  border: 1px solid;
  border-radius: 4px;
  padding: 3px 6px;
  flex-shrink: 0;
}
.type-badge.t-map     { color: var(--accent-info); border-color: var(--accent-info); }
.type-badge.t-wiki    { color: var(--text-body); border-color: var(--border-strong); }
.type-badge.t-guide   { color: var(--green-text); border-color: var(--green-fill); }
.type-badge.t-shelter { color: var(--green-text); border-color: var(--green-fill); }
/* 한글이 들어가는 배지(대피소 유형·경보 종류)는 모노 8.5px가 너무 작아 안 보임 → 본문 글꼴·확대 */
.type-badge.ko {
  font-family: inherit; font-size: 12px; font-weight: 700;
  letter-spacing: normal; white-space: normal; word-break: keep-all;
  max-width: 10em; line-height: 1.25; padding: 3px 7px;
}
/* 가이드 컬러 레전드 — 색으로 구분되는 정보(정화통 등급·게이지 등)를 색 박스로 */
.color-legend {
  display: flex; flex-direction: column; gap: 6px;
  margin: 8px 0 2px;
  padding: 9px 11px;
  background: var(--surface-2, rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border, #30363d);
  border-radius: 8px;
}
.color-legend .cl-item { display: flex; align-items: center; gap: 9px; }
.color-legend .cl-sw {
  width: 18px; height: 18px; border-radius: 4px; flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
}
.color-legend .cl-txt { font-size: 12.5px; color: var(--text-body, #C9D1D9); line-height: 1.35; }
.color-legend .cl-txt b { font-weight: 700; }

.list-row .row-main { flex: 1; min-width: 0; }
.list-row .row-title {
  display: block;
  font-size: 14px; font-weight: 500; color: var(--text-body);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.list-row .row-meta {
  display: block;
  font-size: 11.5px;
  color: var(--text-secondary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.list-row .row-val {
  font-family: var(--font-mono); font-size: 11.5px;
  color: var(--text-secondary); white-space: nowrap; flex-shrink: 0;
}

/* 저장공간 게이지 (5dp 바) */
.gauge { margin-top: 12px; }
.gauge-bar {
  height: 5px; border-radius: 3px;
  background: var(--surface2);
  border: 1px solid var(--border);
  overflow: hidden;
}
.gauge-fill { height: 100%; background: var(--green-text); }
.gauge-label {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--text-tertiary); margin-top: 6px;
}

/* ============================================================
   §4.8 레벨 카드
   ============================================================ */
.level-card {
  display: flex; align-items: center; gap: 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 13px;
  width: 100%;
  text-align: left;
  min-height: 78px;
}
.level-card:hover { border-color: var(--border-hover); background: var(--surface2); }
.level-card .block {
  width: 52px; height: 52px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 22px; font-weight: 600;
  flex-shrink: 0;
}
.level-card .lv-main { flex: 1; min-width: 0; }
.level-card .lv-name { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.level-card .lv-key {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 1.2px;
  color: var(--text-secondary); margin: 1px 0 2px;
}
.level-card .lv-desc { font-size: 12.5px; color: var(--text-secondary); }
.level-card .lv-count {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--text-tertiary); white-space: nowrap; flex-shrink: 0;
}

/* ============================================================
   §4.9 FM 문서 렌더러
   ============================================================ */
.fm-doc { max-width: 660px; }
.fm-header { display: flex; align-items: center; gap: 11px; margin-bottom: 16px; }
.btn-back {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-body);
  flex-shrink: 0;
}
.btn-back:hover { border-color: var(--border-hover); }
.btn-back svg { width: 18px; height: 18px; }
.doc-code-badge {
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  letter-spacing: 1px;
  border-radius: 4px;
  padding: 4px 8px;
}
.fm-header .fm-meta {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--text-tertiary); margin-left: auto; white-space: nowrap;
}
.fm-title { font-size: 24px; font-weight: 700; color: var(--text-primary); line-height: 1.3; }
.fm-subtitle {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 1.5px;
  color: var(--text-secondary); margin: 4px 0 16px;
}
.fm-situation {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 13px 14px;
  margin-bottom: 18px;
}
.fm-situation .section-label { display: block; margin-bottom: 6px; }
.fm-situation p { font-size: 15.5px; color: var(--text-body); }

.fm-section-label { display: block; margin: 20px 0 10px; }
.fm-section-label.red { color: var(--red-text); }

.fm-step { display: flex; gap: 0; margin-bottom: 16px; }
.fm-step .num {
  font-family: var(--font-mono); font-size: 26px; font-weight: 600;
  width: 34px; flex-shrink: 0; line-height: 1.2;
}
.fm-step .step-body { flex: 1; min-width: 0; }
.fm-step .step-title { font-size: 16px; font-weight: 700; color: var(--text-primary); margin-bottom: 3px; }
.fm-step .step-text { font-size: 15px; line-height: 1.65; color: var(--text-body); }

/* 도판 + 한글 라벨 오버레이 (영문 도판 위에 한글) */
.figwrap { position: relative; display: block; width: 100%; max-width: 360px; margin: 0 auto; }
.figwrap img { display: block; width: 100%; height: auto; }
.figwrap .figlbl {
  position: absolute; transform: translate(-50%, -50%);
  background: rgba(13, 17, 23, 0.92);
  color: var(--text-body);
  font-size: 9.5px; line-height: 1.25; font-weight: 500;
  padding: 1px 4px; border-radius: 3px;
  white-space: nowrap; pointer-events: none; text-align: center;
  box-shadow: 0 0 0 1px rgba(13, 17, 23, 0.92);
}
.figwrap .figlbl.wrap { white-space: normal; word-break: keep-all; max-width: 42%; }
.fmfig.figwrap { max-width: 340px; }

/* FM 도판 이미지 삽화 (단계 내) */
.fm-illo-img {
  border: 1px solid var(--border) !important;
  background: rgba(255, 255, 255, 0.02);
  padding: 8px;
  flex-direction: column;
  min-height: 0 !important;
}
.fm-illo-img img { width: 100%; max-width: 300px; height: auto; display: block; margin: 0 auto; }

/* FM 도해 갤러리 (단계 뒤 참고 도판) */
.fm-figgallery { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 4px 0 18px; }
.fm-figitem {
  margin: 0; background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border); border-radius: 10px; padding: 10px;
}
.fm-figitem img { width: 100%; max-width: 360px; height: auto; display: block; margin: 0 auto 7px; }
.fm-figitem figcaption { font-size: 12px; color: var(--text-secondary); text-align: center; line-height: 1.5; }
@media (min-width: 560px) { .fm-figgallery { grid-template-columns: 1fr 1fr; } }

/* 삽화 placeholder — 들여쓰기 = 번호 폭 */
.fm-illo {
  margin: 10px 0 4px 34px;
  border: 1.5px dashed var(--border-strong);
  border-radius: 8px;
  min-height: 110px;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 6px;
}
.fm-illo svg { width: 84px; height: 64px; }
.fm-illo .illo-label {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 1px;
  color: var(--text-tertiary);
}

/* 핵심 수치 강조 박스 — 3열 */
.fm-figures {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin: 18px 0;
}
.fm-figure {
  border-radius: 8px;
  padding: 11px 8px;
  text-align: center;
  border: 1px solid;
  min-width: 0;
}
.fm-figure .fig-val {
  font-family: var(--font-mono); font-size: 19px; font-weight: 600;
  white-space: nowrap;
}
.fm-figure .fig-cap { font-size: 10.5px; color: var(--text-secondary); margin-top: 3px; }

/* 즉시 실행 위젯 버튼 */
.fm-widget-btn {
  width: 100%;
  min-height: 52px;
  border-radius: 10px;
  background: var(--surface);
  border: 1.5px solid;
  font-size: 15px; font-weight: 700;
  color: var(--text-primary);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: 14px 0;
  padding: 12px;
}
.fm-widget-btn:hover { background: var(--surface2); }
.fm-widget-btn .pulse-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--red-fill);
  display: none;
}
.fm-widget-btn.running .pulse-dot {
  display: block;
  animation: metro-pulse 0.545s infinite;
}
@keyframes metro-pulse {
  0%, 40% { opacity: 1; transform: scale(1.15); }
  60%, 100% { opacity: 0.25; transform: scale(0.9); }
}

/* DO / DON'T 박스 */
.fm-dodont {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  margin: 18px 0;
}
.dodont-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  min-width: 0;
}
.dodont-box h4 {
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  letter-spacing: 1.5px; margin-bottom: 8px;
}
.dodont-box.do h4 { color: var(--green-text); }
.dodont-box.dont h4 { color: var(--red-text); }
.dodont-box li {
  font-size: 13px; line-height: 1.55;
  padding: 4px 0 4px 14px;
  position: relative;
  color: var(--text-body);
}
.dodont-box li::before {
  content: '·'; position: absolute; left: 2px;
  color: var(--text-tertiary);
}

/* 푸터 */
.fm-footer {
  border-top: 1px solid var(--border);
  margin-top: 22px; padding-top: 12px;
  font-family: var(--font-mono); font-size: 9px; line-height: 1.8;
  color: var(--text-tertiary);
}

/* ============================================================
   §4.10 경고 배너
   ============================================================ */
.warning-banner {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  font-size: 12.5px; font-weight: 700;
  width: 100%;
}
.warning-banner svg { width: 18px; height: 18px; flex-shrink: 0; }
.warning-banner.yellow { background: var(--yellow-fill); color: var(--yellow-on); }
.warning-banner.red    { background: var(--red-fill); color: var(--red-on); }

/* 재해위험지구 목록 (좌표 없는 DSSP-IF-00058 데이터를 지도 대신 텍스트로) */
.hazard-districts {
  background: rgba(13, 17, 23, 0.62);
  border: 1px solid var(--border, #30363d);
  border-radius: 8px;
  max-width: 320px;
  margin: 6px 8px 0;
  overflow: hidden;
  backdrop-filter: blur(3px);
}
.hazard-districts .hz-head {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  font-size: 11.5px; font-weight: 700;
  color: var(--yellow-on, #ffbb27);
  border-bottom: 1px solid var(--border, #6988aa);
}
.hazard-districts .hz-head svg { width: 15px; height: 15px; flex-shrink: 0; }
.hazard-districts .hz-note {
  padding: 5px 12px 7px; font-size: 10.5px; line-height: 1.35;
  color: var(--text-dim, #8B949E); border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.hazard-districts .hz-tag {
  font-size: 9.5px; font-weight: 600; color: var(--text-dim, #8B949E);
  border: 1px solid var(--border, #30363d); border-radius: 3px; padding: 0 4px; margin-left: 3px;
}
.hazard-districts .hz-list { max-height: 150px; overflow-y: auto; }
.hazard-districts .hz-row {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 7px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.hazard-districts .hz-row:last-child { border-bottom: none; }
.hazard-districts .hz-badge {
  flex-shrink: 0; font-size: 10px; font-weight: 700;
  padding: 2px 6px; border-radius: 4px; white-space: nowrap;
}
.hazard-districts .hz-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.hazard-districts .hz-title { font-size: 12px; font-weight: 600; color: var(--text, #C9D1D9); }
.hazard-districts .hz-sub {
  font-size: 10.5px; color: var(--text-dim, #8B949E);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ============================================================
   §4.11 빈 상태
   ============================================================ */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  padding: 48px 24px;
  gap: 8px;
}
.empty-state svg { width: 48px; height: 48px; color: var(--text-tertiary); margin-bottom: 6px; }
.empty-state h3 { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.empty-state p { font-size: 13.5px; color: var(--text-secondary); max-width: 300px; }
.btn-primary {
  background: var(--text-primary);
  color: var(--bg);
  font-size: 14px; font-weight: 700;
  border-radius: 8px;
  padding: 12px 22px;
  min-height: var(--touch-min);
  margin-top: 10px;
}
.btn-primary:hover { opacity: 0.88; }
.btn-link-secondary { font-size: 12.5px; color: var(--text-secondary); text-decoration: underline; min-height: 36px; }

/* ============================================================
   §4.12 계산기 결과 패널
   ============================================================ */
.calc-result {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px 14px;
}
.calc-result .result-value {
  font-size: 36px; font-weight: 700; color: var(--text-primary);
  font-family: var(--font-mono);
  line-height: 1.2; margin: 8px 0 4px;
  white-space: nowrap;
}
.calc-result .result-alt {
  font-family: var(--font-mono); font-size: 13px;
  color: var(--green-text);
}
.calc-result .result-cond { font-size: 12px; color: var(--text-secondary); margin-top: 6px; }

/* 안전 고지 패널 (YELLOW 틴트) */
.notice-panel {
  background: var(--yellow-tint);
  border: 1px solid var(--yellow-tint-border);
  border-radius: 10px;
  padding: 12px 14px;
}
.notice-panel.red-tint {
  background: var(--red-tint);
  border-color: var(--red-fill);
}
.notice-panel .section-label { display: block; margin-bottom: 6px; }
.notice-panel.red-tint .section-label { color: var(--red-text); }
.notice-panel li {
  font-size: 13px; line-height: 1.6; color: var(--text-body);
  padding-left: 14px; position: relative;
}
.notice-panel li::before { content: '·'; position: absolute; left: 2px; color: var(--text-tertiary); }

/* ============================================================
   비상 모드 오버레이 (§5.6) — 타일
   ============================================================ */
.emergency-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: var(--bg-emergency);
  display: none;
  flex-direction: column;
  padding: 14px;
}
.emergency-overlay.open { display: flex; }
.em-header { display: flex; align-items: center; gap: 10px; padding: 4px 2px 2px; }
.em-header .beacon-dot { animation-duration: 1s; }
.em-header .em-title {
  font-family: var(--font-mono); font-size: 13px; font-weight: 600;
  letter-spacing: 2px;
  color: var(--red-text);
}
.em-header .em-time {
  margin-left: auto;
  font-family: var(--font-mono); font-size: 13px; color: var(--text-secondary);
}
.em-notice {
  font-family: var(--font-mono); font-size: 9px;
  color: var(--text-tertiary);
  padding: 4px 2px 12px;
}
.em-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(3, 1fr);
  gap: 10px;
  min-height: 0;
}
.em-tile {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-tile);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px;
  padding: 10px;
  min-height: var(--touch-emergency);
  text-align: center;
  min-width: 0;
  color: var(--text-body);
}
.em-tile:hover { background: var(--surface2); }
.em-tile svg { width: 30px; height: 30px; }
.em-tile .em-label { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.em-tile .em-sub { font-size: 11.5px; color: var(--text-secondary); }
.em-tile .em-mono { font-family: var(--font-mono); font-size: 14px; color: var(--text-primary); line-height: 1.5; }
.em-tile.red-tile {
  background: var(--red-tint);
  border: 1.5px solid var(--red-fill);
}
.em-tile.red-tile .em-label { color: var(--red-text); }
.em-tile.sos-on {
  background: var(--red-tint);
  border: 1.5px solid var(--red-fill);
}
.em-tile.sos-on .em-sub {
  color: var(--red-text);
  font-family: var(--font-mono);
}
.em-tile.info-tile { cursor: default; }
.em-exit {
  margin-top: 12px;
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 14px; font-weight: 500;
  letter-spacing: 0.5px;
}
.em-exit:hover { border-color: var(--border-hover); color: var(--text-body); }

/* SOS 화면 점멸 오버레이 */
.flash-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: #FFFFFF;
  display: none;
}
.flash-overlay.lit { display: block; }

/* ============================================================
   공통 검색 필드
   ============================================================ */
.search-field {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 0 13px;
  min-height: var(--touch-min);
}
.search-field:focus-within { border-color: var(--border-hover); }
.search-field svg { width: 18px; height: 18px; color: var(--text-tertiary); flex-shrink: 0; }
.search-field input {
  flex: 1; background: none; border: none; outline: none;
  font-size: 14.5px; min-width: 0;
}
.search-field input::placeholder { color: var(--text-tertiary); }
.search-field .key-hint {
  font-family: var(--font-mono); font-size: 9.5px;
  border: 1px solid var(--border-strong); border-radius: 4px;
  padding: 2px 6px; color: var(--text-tertiary);
  white-space: nowrap;
  display: none;
}

/* 검색 결과 드롭 패널 */
.search-results { margin-top: 10px; }
.search-results .list-row { padding-left: 6px; padding-right: 6px; }
