/* 생활 정보 만의 모양 (공통 모양은 base.css) */
:root { --accent: #2b63d9; }

.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.card-head h3 { margin: 0; }
h3 small { font-weight: 500; font-size: 0.8rem; }
div.field { margin-bottom: 14px; }
.field > .lbl { display: block; font-weight: 700; font-size: 0.95rem; margin-bottom: 8px; }

/* 환율·기름값 칸 */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.tiles.three { grid-template-columns: repeat(3, 1fr); }
.tile { background: var(--surface-2); border-radius: 14px; padding: 12px 12px 10px; min-width: 0; }
.tile .k { font-size: 0.88rem; color: var(--ink-2); font-weight: 600; }
.tile .v { font-size: 1.32rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.25; margin-top: 2px; font-variant-numeric: tabular-nums; }
.tile .v small { font-size: 0.75rem; font-weight: 600; color: var(--ink-2); margin-left: 1px; }
.tile .d { font-size: 0.8rem; font-weight: 700; margin-top: 2px; }
.tiles.three .v { font-size: 1.12rem; }
.up { color: var(--bad); }
.down { color: var(--good); }
.flat { color: var(--ink-3); }
.sido-pick { margin: 6px 0 10px; }

/* 계산기 */
#calc-dir { margin: 4px 0 12px; }
.calc-row { display: grid; grid-template-columns: 1fr 9.5em; gap: 10px; }
.calc-row .field { margin-bottom: 4px; }
.calc-out { font-size: 1.25rem; font-weight: 800; margin: 8px 0 0; min-height: 1.6em; font-variant-numeric: tabular-nums; }

/* 준비 중·오류 */
.callout strong { display: block; margin-bottom: 4px; }
.callout p:last-child { margin-bottom: 0; }
.callout details { margin-top: 8px; font-size: 0.9rem; }
.callout summary { cursor: pointer; font-weight: 700; color: var(--ink-2); min-height: 32px; }

/* 혜택 카드 */
.result-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 18px 2px 10px; }
.result-head h3 { margin: 0; }
.benefit h3 { font-size: 1.12rem; margin: 8px 0 4px; }
.benefit .purpose { color: var(--ink-2); margin-bottom: 10px; }
.facts { display: grid; grid-template-columns: 4.6em 1fr; gap: 6px 10px; margin: 0 0 14px; font-size: 0.95rem; }
.facts dt { color: var(--ink-3); font-weight: 700; }
.facts dd { margin: 0; min-width: 0; }
.facts a { font-weight: 700; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }

/* 병원·약국 */
.sos { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sos .note { color: var(--ink-2); margin: 0; }
.sos .btn { flex: none; }
#c-near { margin-top: 4px; }
details.area { margin-top: 12px; }
details.area > summary { cursor: pointer; min-height: 48px; display: flex; align-items: center; font-weight: 700; color: var(--accent-text); }
details.area[open] > summary { margin-bottom: 8px; }
.places { list-style: none; margin: 0; padding: 0; }
.place { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; box-shadow: var(--shadow); }
.place-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.place .name { font-size: 1.08rem; }
.place .dist { flex: none; color: var(--ink-2); font-weight: 700; font-variant-numeric: tabular-nums; }
.place .when { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0 4px; }
.place .hours { color: var(--ink-2); font-size: 0.92rem; }
.place .addr { margin: 0 0 10px; }
.place .btn-row > .btn { flex: 1 1 100px; white-space: nowrap; }
.place .btn-row > .btn.tel { flex: 2 1 160px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: currentColor; }

/* 다크 모드의 --bad 는 밝은 빨강이라 흰 글자가 잘 안 읽혀요 → 119 버튼은 진한 빨강 그대로 */
@media (prefers-color-scheme: dark) {
  .btn.danger { background: #c2352b; }
}

@media (max-width: 360px) {
  .tiles.three { grid-template-columns: 1fr 1fr; }
  .calc-row { grid-template-columns: 1fr; }
}
