/* machim 공통 스타일
   원칙: 보통 크기 + 위계(굵기·색·여백), 강조색 하나, 얇은 선과 옅은 그림자, 밝게·어둡게·시스템.
   서비스마다 색 톤(data-brand: 메인 인디고, 응급실 빨강, 약국 초록, 파일 변환 하늘색. 아래 "서비스별 색 톤")에 더해 모양도 조금씩 다르다
   (맨 아래 "서비스별 모양", 2026-10-19). 공통 모양은 이 파일 위쪽, 서비스별 덮어쓰기는 맨 아래.
   맨 위 청록은 테마가 없는 화면용 기본값 */

/* ---------- 색 (밝게: 기본) ---------- */
:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f1f3f6;
  --text: #121417;
  --text-2: #4d5562;
  --text-3: #8d94a0;
  --line: #e9ecf0;
  --line-strong: #d9dde4;
  --accent: #0e7c70;
  --accent-strong: #0a6a5f;
  --accent-soft: #e9f6f3;
  --accent-line: #bfe5de;
  --on-accent: #ffffff;
  --critical: #c23b2e;
  --critical-soft: #fdeeec;
  --caution: #a15c00;
  --caution-soft: #fff4e2;
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.04);
  --shadow: 0 1px 2px rgba(17, 24, 39, 0.04), 0 4px 14px rgba(17, 24, 39, 0.05);
  --shadow-pop: 0 10px 30px rgba(17, 24, 39, 0.12), 0 2px 6px rgba(17, 24, 39, 0.06);
  --header-bg: rgba(255, 255, 255, 0.82);
}

/* ---------- 색 (어둡게): 시스템이 다크이고 밝게를 고르지 않았을 때 + 어둡게를 골랐을 때 ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0e1013;
    --surface: #16191e;
    --surface-2: #1c2026;
    --text: #eceef1;
    --text-2: #a8aeb9;
    --text-3: #707784;
    --line: #23272e;
    --line-strong: #30353e;
    --accent: #3ec6b4;
    --accent-strong: #66d4c6;
    --accent-soft: rgba(62, 198, 180, 0.12);
    --accent-line: rgba(62, 198, 180, 0.32);
    --on-accent: #06211d;
    --critical: #f2877b;
    --critical-soft: rgba(242, 135, 123, 0.12);
    --caution: #f0b35a;
    --caution-soft: rgba(240, 179, 90, 0.13);
    --shadow-sm: none;
    --shadow: 0 0 0 1px rgba(255, 255, 255, 0.02);
    --shadow-pop: 0 12px 32px rgba(0, 0, 0, 0.5);
    --header-bg: rgba(14, 16, 19, 0.78);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1013;
  --surface: #16191e;
  --surface-2: #1c2026;
  --text: #eceef1;
  --text-2: #a8aeb9;
  --text-3: #707784;
  --line: #23272e;
  --line-strong: #30353e;
  --accent: #3ec6b4;
  --accent-strong: #66d4c6;
  --accent-soft: rgba(62, 198, 180, 0.12);
  --accent-line: rgba(62, 198, 180, 0.32);
  --on-accent: #06211d;
  --critical: #f2877b;
  --critical-soft: rgba(242, 135, 123, 0.12);
  --caution: #f0b35a;
  --caution-soft: rgba(240, 179, 90, 0.13);
  --shadow-sm: none;
  --shadow: 0 0 0 1px rgba(255, 255, 255, 0.02);
  --shadow-pop: 0 12px 32px rgba(0, 0, 0, 0.5);
  --header-bg: rgba(14, 16, 19, 0.78);
}

/* ---------- 폰트: Pretendard v1.3.9 (SIL OFL 1.1, static/fonts/LICENSE-Pretendard.txt) ---------- */
/* KS X 1001 한글 2,350자 subset. 글자를 먼저 기본 글꼴로 보이고 받으면 바꾼다 (swap). 파일 이름에 버전이 없어 ?v= 로 캐시를 고정한다 */
@font-face { font-family: "Pretendard"; font-weight: 400; font-display: swap; src: url("fonts/Pretendard-Regular.subset.woff2?v=1.3.9") format("woff2"); }
@font-face { font-family: "Pretendard"; font-weight: 600; font-display: swap; src: url("fonts/Pretendard-SemiBold.subset.woff2?v=1.3.9") format("woff2"); }
@font-face { font-family: "Pretendard"; font-weight: 700; font-display: swap; src: url("fonts/Pretendard-Bold.subset.woff2?v=1.3.9") format("woff2"); }
@font-face { font-family: "Pretendard"; font-weight: 800; font-display: swap; src: url("fonts/Pretendard-ExtraBold.subset.woff2?v=1.3.9") format("woff2"); }

/* ---------- 기본 ---------- */
:root {
  --radius: 14px;
  --radius-sm: 10px;
  --wrap: 680px;
  --font: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.012em;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
main.wrap { padding-top: 28px; padding-bottom: 56px; }
/* 넓은 화면 공통 (2026-11-17): 핸들러가 Meta.Wide 를 켠 화면(<html data-wide>)만 960px 이상에서 틀을 1120px 로.
   옆 칸을 어떻게 쓸지는 서비스 덩어리에서 정한다 (공공주택 .hs-side·.hs-main, 등기부 .dc-cols). 글 칸은 680px 안팎으로 둔다 */
@media screen and (min-width: 960px) {
  :root[data-wide] { --wrap: 1120px; }
  [data-wide] .wrap { padding: 0 32px; }
  [data-wide] main.wrap { padding-top: 36px; padding-bottom: 80px; }
  [data-wide] .page-title { font-size: 32px; }
}

/* ---------- 헤더 · 로고 · 테마 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
/* 서비스 화면 맨 위 "마침" 메인으로 가는 한 줄 띠 (Site.MainURL). 고정하지 않아 스크롤하면 사라진다. "마침"은 메인 인디고 */
.hub-bar { display: block; background: var(--surface-2); border-bottom: 1px solid var(--line); color: var(--text-2); font-size: 12.5px; --hub: #3a37ff; }
:root[data-theme="dark"] .hub-bar { --hub: #8f8dff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hub-bar { --hub: #8f8dff; } }
.hub-inner { height: 32px; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.hub-name { font-weight: 800; color: var(--hub); letter-spacing: -0.03em; }
.hub-text { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.hub-go { margin-left: auto; display: inline-flex; align-items: center; gap: 2px; font-weight: 600; color: var(--text); }
.hub-bar:hover .hub-go { color: var(--hub); }
.brand { display: inline-flex; align-items: center; gap: 9px; }
.brand-mark { color: var(--accent); flex: none; }
.brand-text { display: inline-flex; align-items: baseline; gap: 6px; font-size: 17px; letter-spacing: -0.03em; }
.brand-name { font-weight: 800; color: var(--accent); }
.brand-service { font-weight: 700; color: var(--text); }

.theme-toggle {
  display: none; /* 자바스크립트가 있을 때만 */
  padding: 3px; gap: 2px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px;
}
.js .theme-toggle { display: inline-flex; }
.theme-toggle button {
  width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 999px; background: transparent; color: var(--text-3); cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.theme-toggle button:hover { color: var(--text); }
.theme-toggle button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }

/* ---------- 홈 상단 ---------- */
.hero { padding: 8px 0 20px; }
.hero-title { font-size: 26px; line-height: 1.3; font-weight: 800; letter-spacing: -0.04em; }
.hero-lead { margin-top: 10px; color: var(--text-2); font-size: 15px; line-height: 1.65; }
.hero-meta { display: block; margin-top: 4px; color: var(--text-3); font-size: 13px; }

/* ---------- 검색 ---------- */
.search-section { margin-bottom: 32px; }
.search-section .section-title { margin-bottom: 10px; }
.search { position: relative; }
.search-field {
  display: flex; align-items: center; gap: 12px;
  height: 58px; padding: 0 18px;
  background: var(--surface); border: 2px solid var(--accent-line); border-radius: 16px;
  box-shadow: var(--shadow); color: var(--accent);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.search-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); color: var(--accent); }
.search-field:hover { border-color: var(--accent); }
.search-field input {
  flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent;
  font-size: 17px; font-weight: 500; color: var(--text);
}
.search-field input::placeholder { color: var(--text-3); font-weight: 400; }
.search-field svg { width: 20px; height: 20px; }
.search-field input::-webkit-search-cancel-button { cursor: pointer; }
.search-suggest:empty { display: none; }
.search-suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 20;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-pop); max-height: min(70vh, 520px); overflow-y: auto;
}
.suggest { padding: 6px 0; }
.suggest-empty { padding: 14px 16px; font-size: 14px; color: var(--text-2); }
.suggest-more { display: block; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--accent); }
.suggest-more:hover { background: var(--surface-2); }
.result-label { padding: 10px 16px 4px; font-size: 12px; font-weight: 600; color: var(--text-3); letter-spacing: 0; }
.result-list { list-style: none; margin: 0; padding: 0; }
.result { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 16px; transition: background 0.12s var(--ease); }
.result:hover, .result:focus-visible { background: var(--surface-2); outline-offset: -2px; }
.result-name { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-sub { flex: none; font-size: 13px; color: var(--text-3); }
/* 두 줄: 이름 아래에 긴 설명 (예: 약국 "지역 · 영업 상태"). 한 줄이면 이름이 밀려 잘린다 */
.result.stack { flex-direction: column; align-items: stretch; gap: 2px; }
.result.stack .result-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel { margin-top: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px 0; }
.muted-text { margin-top: 16px; color: var(--text-2); font-size: 14px; }

/* 내 위치 */
.locate { display: none; margin-top: 10px; }
.js .locate { display: block; }
.locate-btn {
  width: 100%; height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface); color: var(--text);
  font-size: 15px; font-weight: 600; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease), background 0.15s var(--ease);
}
.locate-btn svg { color: var(--accent); }
.locate-btn:hover { border-color: var(--accent); color: var(--accent); }
.locate-btn:disabled { cursor: progress; opacity: 0.7; }
.locate-btn[aria-busy="true"] { opacity: 1; }
.locate-btn[aria-busy="true"] svg { animation: locate-pulse 1.2s var(--ease) infinite; }
@keyframes locate-pulse { 50% { opacity: 0.35; transform: scale(0.85); } }
/* 기다리는 동안 버튼 아래쪽 막대가 GPS 대기 시간(약 12초)에 걸쳐 차오른다 (끝까지 차지 않음) */
.locate-btn { position: relative; overflow: hidden; }
.locate-btn[aria-busy="true"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: currentColor; opacity: 0.45; transform-origin: left;
  animation: locate-fill 12s cubic-bezier(0.15, 0.6, 0.3, 1) forwards;
}
@keyframes locate-fill { from { transform: scaleX(0.04); } to { transform: scaleX(0.92); } }
.locate-msg.wait { color: var(--text-2); }
/* 상단 진행 막대 (app.js progress): 위치 확인 → 다음 페이지 로딩 동안 천천히 차오른다 */
.progress {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: 3px;
  background: var(--accent); box-shadow: 0 0 8px var(--accent-line);
  transform: scaleX(0); transform-origin: left; opacity: 0; pointer-events: none;
  transition: transform 0.2s linear, opacity 0.3s var(--ease);
}
.progress.on { opacity: 1; }
.progress.done { opacity: 0; transition: transform 0.15s var(--ease), opacity 0.3s 0.15s var(--ease); }
.locate-msg:empty { display: none; }
/* 홈: 내 주변 응급실 (위치 기능은 JS 필요 → JS 없으면 섹션째 숨김) */
.near-section { display: none; margin-bottom: 32px; }
.js .near-section { display: block; }
.near-section > .locate:not(.dept-locate) { margin-top: 0; }
.near-section > .locate:not(.dept-locate) .locate-btn {
  height: 58px; border: 0; border-radius: 16px; font-size: 17px; font-weight: 700;
  background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow);
}
.near-section > .locate:not(.dept-locate) .locate-btn svg { color: var(--on-accent); }
.near-section > .locate:not(.dept-locate) .locate-btn:hover { background: var(--accent-strong); color: var(--on-accent); }
.near-section .locate-btn.dept-card { border-color: var(--accent-line); }
/* 진료과목별 내 주변 카드 (홈) */
.js .dept-locate { margin-top: 16px; }
.dept-locate-title { margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.dept-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.locate-btn.dept-card {
  height: auto; padding: 14px; gap: 12px;
  justify-content: flex-start; text-align: left; border-radius: var(--radius);
  border-color: var(--line); box-shadow: var(--shadow);
}
.locate-btn.dept-card:hover { border-color: var(--accent-line); background: var(--accent-soft); color: var(--text); }
.dept-card-icon {
  flex: none; width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px; background: var(--accent-soft); color: var(--accent);
}
.dept-card-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.dept-card-text strong { font-size: 15px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.dept-card-text .locate-label { margin-top: 2px; font-size: 13px; font-weight: 500; color: var(--text-2); }
/* 좁은 화면: 아이콘을 글자 위로 */
@media (max-width: 480px) {
  .locate-btn.dept-card { flex-direction: column; align-items: flex-start; gap: 10px; }
  .dept-card-icon { width: 38px; height: 38px; border-radius: 11px; }
}

/* 진료과목 필터 */
.filter { margin: 0 0 16px; }
.filter-label { font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.filter-chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.filter-chips::-webkit-scrollbar { display: none; }
.fchip {
  flex: none; display: inline-flex; align-items: baseline; gap: 5px;
  padding: 7px 12px; border-radius: 999px; white-space: nowrap;
  background: var(--surface); border: 1px solid var(--line); font-size: 13px; color: var(--text-2);
  transition: border-color 0.12s var(--ease), color 0.12s var(--ease), background 0.12s var(--ease);
}
.fchip:hover { border-color: var(--accent); color: var(--accent); }
.fchip.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.fchip.zero:not(.on) { color: var(--text-3); } /* 기관 0곳. ".empty" 는 에러 화면용이라 다른 이름 */
.fchip .n { font-size: 11px; opacity: 0.75; font-variant-numeric: tabular-nums; }
.filter-note { margin-top: 8px; font-size: 12px; color: var(--text-3); line-height: 1.55; }
.locate-msg { margin-top: 8px; font-size: 13px; color: var(--critical); }
.near-note { margin: -12px 0 14px; font-size: 13px; color: var(--text-3); }
.empty-panel { padding: 20px; }
.empty-panel p { color: var(--text-2); font-size: 14px; }
.empty-panel .locate { margin-top: 14px; }
.empty-links { margin-top: 12px; }
.empty-links a { color: var(--accent); font-weight: 600; }
.row-sub .dist { color: var(--accent); font-weight: 700; }
.badge.small { margin-left: 6px; padding: 1px 7px; font-size: 11px; vertical-align: 2px; }

/* ---------- 안내 (방문 전 전화) ---------- */
.callout {
  margin: 4px 0 28px; padding: 16px;
  background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: var(--radius);
}
.callout-main { display: flex; align-items: flex-start; gap: 12px; }
.callout-icon {
  flex: none; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; background: var(--accent); color: var(--on-accent);
}
.callout-icon svg { width: 17px; height: 17px; }
.callout-body { flex: 1; min-width: 0; }
.callout-title { font-weight: 700; font-size: 15px; line-height: 1.45; color: var(--text); }
.callout-text { margin-top: 2px; font-size: 13px; color: var(--text-2); }
.callout-119row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--accent-line);
  font-size: 13px; color: var(--text-2); line-height: 1.5;
}
.callout-119row strong { color: var(--text); font-weight: 600; }
.callout-119 {
  flex: none; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap;
  height: 34px; padding: 0 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--critical-soft);
  color: var(--critical); font-weight: 800; font-size: 14px; letter-spacing: 0;
  box-shadow: var(--shadow-sm);
  transition: background 0.15s var(--ease);
}
.callout-119:hover { background: var(--critical-soft); }

/* ---------- 페이지 머리 ---------- */
.page-head { margin-bottom: 20px; }
.crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--text-3); margin-bottom: 8px; }
.crumb a { transition: color 0.12s var(--ease); }
.crumb a:hover { color: var(--accent); }
.crumb .sep { color: var(--text-3); opacity: 0.6; }
.page-title { font-size: 26px; font-weight: 800; letter-spacing: -0.04em; line-height: 1.3; }
.page-meta { margin-top: 6px; font-size: 13px; color: var(--text-2); }
.page-meta .dot { margin-right: 4px; color: var(--text-3); }
.section-title { margin: 0 0 12px; font-size: 17px; font-weight: 700; letter-spacing: -0.03em; }

/* ---------- 지역 목록 ---------- */
.group {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; margin-bottom: 14px;
}
.group-title {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 12px 18px; font-size: 13px; color: var(--text-2); font-weight: 600;
  background: var(--surface-2); border-bottom: 1px solid var(--line);
}
.group-title .count { font-weight: 500; color: var(--text-3); }
.group-title.critical { color: var(--critical); }
.row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-top: 1px solid var(--line); transition: background 0.12s var(--ease); }
.group-title + .row { border-top: 0; }
.row:hover { background: var(--surface-2); }
.row-main { flex: 1; min-width: 0; }
.row-name { display: block; font-weight: 600; line-height: 1.4; letter-spacing: -0.02em; }
.row-main:hover .row-name { color: var(--accent); }
.row-sub { display: block; margin-top: 3px; font-size: 13px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 전화 대신 지도 서비스에서 확인하는 링크 두 개 (원본 데이터가 기본값뿐인 곳) */
.check-links { flex: none; display: flex; gap: 6px; }
.callout .check-links { margin-top: 10px; }
.check-links .call, .check-links .btn { flex: 1; justify-content: center; }
.call {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 13px; border-radius: 999px;
  border: 1px solid var(--accent-line); background: var(--accent-soft);
  color: var(--accent); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: 0;
  white-space: nowrap; transition: background 0.15s var(--ease), color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.call:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* ---------- 홈: 지역 ---------- */
.sido-list {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden;
}
.sido { border-top: 1px solid var(--line); scroll-margin-top: 76px; }
.sido:first-child { border-top: 0; }
.sido-title {
  display: flex; align-items: center; gap: 10px; padding: 15px 18px;
  font-size: 16px; font-weight: 700; letter-spacing: -0.03em;
  cursor: pointer; list-style: none; transition: background 0.12s var(--ease);
}
.sido-title::-webkit-details-marker { display: none; }
.sido-title:hover { background: var(--surface-2); }
.sido-title .count { margin-left: auto; font-size: 13px; font-weight: 500; color: var(--text-3); }
.sido-title::after {
  content: ""; flex: none; width: 8px; height: 8px; margin: -4px 2px 0 4px;
  border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3);
  transform: rotate(45deg); transition: transform 0.15s var(--ease);
}
.sido[open] > .sido-title::after { transform: rotate(-135deg); margin-top: 4px; }
.sido[open] > .sido-title { color: var(--accent); }
.sido > .chips { padding: 2px 18px 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; list-style: none; }
.chip {
  display: inline-flex; align-items: baseline; gap: 5px;
  padding: 7px 12px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid transparent; font-size: 14px;
  transition: border-color 0.12s var(--ease), background 0.12s var(--ease), color 0.12s var(--ease);
}
.chip:hover { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent); }
.chip .n { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }

/* ---------- 상세 ---------- */
.badge {
  display: inline-block; padding: 3px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: 0;
  background: var(--surface-2); color: var(--text-2);
}
.badge.critical { background: var(--critical-soft); color: var(--critical); }
.badge.feature { background: var(--accent-soft); color: var(--accent); }
.page-meta.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.page-meta.badges .badge { padding: 4px 11px; font-size: 13px; }
.badge.notice { background: var(--caution-soft); color: var(--caution); text-decoration: none; }
.row-name .badge.notice { margin-left: 6px; padding: 1px 7px; font-size: 11px; vertical-align: 2px; }
/* 목록 줄 아래 병원 공지 (본문 두 줄까지, "외 N건"은 늘 보이게) */
.row:has(> .row-notice) { flex-wrap: wrap; row-gap: 8px; }
.row-notice { flex: 1 0 100%; display: flex; align-items: flex-start; gap: 6px; font-size: 13px; color: var(--text-2); line-height: 1.5; }
.row-notice-label { flex: none; margin-top: 1px; padding: 0 6px; border-radius: 999px; background: var(--caution-soft); color: var(--caution); font-size: 11px; font-weight: 700; line-height: 18px; }
.row-notice-text { flex: 1; min-width: 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; word-break: keep-all; }
.row-notice-more { flex: none; color: var(--text-3); white-space: nowrap; }

/* 병원이 올린 안내 (진료 제한 공지) */
.notices .notice-intro { margin-top: 4px; font-size: 13px; color: var(--text-2); line-height: 1.55; }
.notice-list { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.notice-list li { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); }
.notice-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; line-height: 1.45; }
.notice-tag { flex: none; padding: 1px 7px; border-radius: 999px; background: var(--caution-soft); color: var(--caution); font-size: 11px; font-weight: 700; }
.notice-label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.notice-targets { margin-top: 2px; font-size: 12px; color: var(--text-2); }
.notice-targets summary { cursor: pointer; font-weight: 600; }
.notice-targets p { margin-top: 2px; line-height: 1.55; }
.notice-msg { margin-top: 6px; font-size: 15px; color: var(--text); line-height: 1.65; letter-spacing: -0.01em; white-space: pre-line; overflow-wrap: anywhere; word-break: keep-all; }
.notice-until { margin-top: 6px; font-size: 12px; color: var(--text-3); }
.notice-more { margin-top: 8px; }
.notice-more summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-2); padding: 6px 0; }
.info-source.stale { color: var(--caution); font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 24px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 18px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; white-space: nowrap;
  box-shadow: var(--shadow-sm);
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease);
}
.btn:hover { border-color: var(--text-3); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.info {
  margin: 0; padding: 4px 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.info div { display: grid; grid-template-columns: 92px 1fr; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.info div:first-child { border-top: 0; }
.info dt { color: var(--text-3); font-size: 14px; }
.info dd { margin: 0; }
.info dd a { color: var(--accent); font-weight: 700; }
.info .links { display: flex; gap: 14px; margin-top: 6px; font-size: 13px; }

/* 상세 카드: 행마다 값 + 버튼 */
.detail-card {
  margin-bottom: 14px; padding: 4px 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.detail-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); }
.detail-row:first-child { border-top: 0; }
.detail-row.stack { flex-direction: column; align-items: stretch; }
.detail-main { min-width: 0; }
.detail-label { font-size: 13px; color: var(--text-3); }
.detail-value { margin-top: 2px; line-height: 1.5; }
.detail-value.tel { font-size: 18px; font-weight: 700; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.detail-row .btn { flex: none; height: 42px; padding: 0 16px; font-size: 14px; }
.detail-actions .btn { flex: 1 1 0; min-width: 0; padding: 0 12px; }
/* 길찾기: 카드 바탕(--surface)과 같은 흰 버튼은 묻혀서 전화 버튼처럼 강조색 옅은 바탕 */
.detail-actions .btn { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); box-shadow: none; }
.detail-actions .btn:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* 진료 정보 */
.info-card { padding: 18px; }
.depts { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.depts li { padding: 4px 10px; border-radius: 8px; background: var(--surface-2); font-size: 13px; color: var(--text-2); }
.info-note { margin-top: 10px; font-size: 12px; color: var(--text-3); line-height: 1.55; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin: 16px 0 0; }
.stats div { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); }
.stats dt { font-size: 12px; color: var(--text-3); }
.stats dd { margin: 2px 0 0; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.info-block { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; color: var(--text-2); }
.info-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.hours-not-er { font-weight: 500; color: var(--text-3); }
.hours-note { margin-top: 0; }
.hours ul { margin: 8px 0 0; padding: 0; list-style: none; }
.hours li { display: flex; gap: 12px; padding: 3px 0; font-variant-numeric: tabular-nums; }
.hours li span { min-width: 64px; color: var(--text-3); }
.info-source { margin-top: 14px; font-size: 12px; color: var(--text-3); }

/* 지도 */
.map { margin-top: 12px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); aspect-ratio: 16 / 10; }
.map { position: relative; display: flex; align-items: center; justify-content: center; }
.map > .map-canvas { position: absolute; inset: 0; }
.map-fallback { font-size: 14px; color: var(--text-2); }
.map.ready .map-fallback { display: none; }

/* 기관 분류: 네 가지 중 이 병원 표시 */
.tier-intro { margin-top: 4px; font-size: 14px; color: var(--text-2); line-height: 1.6; }
.tier-list { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.tier-list li { padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.tier-list li.current { border: 1.5px solid var(--accent); background: var(--accent-soft); }
.tier-list li.current.critical { border-color: var(--critical); background: var(--critical-soft); }
.tier-item-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tier-item-name { font-size: 14px; font-weight: 600; color: var(--text-2); }
.tier-list li.current .tier-item-name { color: var(--text); font-weight: 700; }
.tier-item-desc { margin-top: 2px; font-size: 12px; color: var(--text-3); }
.tier-here { flex: none; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 700; letter-spacing: 0; }
.tier-list li.current.critical .tier-here { background: var(--critical); color: #fff; }
.tier-note { margin-top: 12px; font-size: 13px; color: var(--text-3); }
/* 2026-11-23: 이 병원 등급 한 줄 + 네 등급은 접음 (docs/design/2026-11-23-er-detail) */
.tier-one { margin-top: 6px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 15px; }
.tier-rank { font-size: 12px; font-weight: 700; color: var(--accent); }
.tier-one.critical .tier-rank { color: var(--critical); }
.tier-more { margin-top: 10px; font-size: 13px; }
.tier-more summary { cursor: pointer; color: var(--text-2); font-weight: 600; min-height: 44px; display: flex; align-items: center; }
/* 상세 "가까운 응급실" */
.detail-near-note { margin: 2px 0 8px; }
.detail-near-more { margin-top: 8px; font-size: 13.5px; }
.detail-near-more a { display: inline-flex; align-items: center; min-height: 44px; }

.tier { padding: 18px; }

/* ---------- 빈 화면 / 에러 ---------- */
.empty { padding: 56px 0; text-align: center; }
.empty-code { font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; letter-spacing: 0.08em; }
.empty h1 { margin: 8px 0 24px; font-size: 22px; letter-spacing: -0.03em; }

/* ---------- 파일 변환: 이미지 → PDF (static/image-pdf.js) ---------- */
.conv-drop {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 32px 20px; text-align: center; cursor: pointer;
  background: var(--surface); border: 2px dashed var(--accent-line); border-radius: var(--radius); color: var(--accent);
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.conv-drop:hover, .conv-drop.is-over { border-color: var(--accent); background: var(--accent-soft); }
.conv-drop:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.conv-drop-title { font-size: 17px; font-weight: 700; color: var(--text); }
.conv-drop-sub { font-size: 13px; color: var(--text-2); }
.conv-body { margin-top: 24px; }
.conv-list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.conv-count { margin-left: 4px; color: var(--accent); font-variant-numeric: tabular-nums; }
.conv-link { padding: 6px 0; border: 0; background: none; font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer; }
.conv-link:hover { color: var(--critical); }
.conv-list { margin: 0 0 24px; padding: 0; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.conv-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.conv-item + .conv-item { border-top: 1px solid var(--line); }
.conv-thumb { flex: none; width: 52px; height: 52px; object-fit: cover; border-radius: 8px; background: var(--surface-2); }
.conv-item-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.conv-item-name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-item-meta { font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.conv-item-tools { flex: none; display: flex; gap: 4px; }
.conv-btn {
  width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface);
  font-size: 16px; font-weight: 700; color: var(--text-2); cursor: pointer;
}
.conv-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.conv-btn:disabled { opacity: 0.35; cursor: default; }
.conv-opts { margin: 0 0 12px; padding: 0; border: 0; }
.conv-opt { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; font-size: 14px; color: var(--text-2); cursor: pointer; }
.conv-opt input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); }
.conv-opt b { margin-right: 6px; color: var(--text); font-weight: 700; }
.conv-shrink { margin-bottom: 16px; }
.conv-go { position: relative; overflow: hidden; width: 100%; height: 56px; font-size: 16px; font-variant-numeric: tabular-nums; }
.conv-go > * { position: relative; } /* 채움 막(::before) 위에 */
.conv-go:disabled { opacity: 0.6; cursor: progress; }
/* 만드는 동안: 버튼 전체가 끝난 장 수만큼 왼쪽부터 짙게 차고(image-pdf.js progress 가 --p 를 0~1 로),
   글자 앞 표시가 돈다 (한 장이 오래 걸려 채움이 멈춰도 일하는 중임을 보인다) */
.conv-go[aria-busy="true"] { opacity: 1; }
.conv-go::before {
  content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.3);
  transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease);
}
.conv-go[aria-busy="true"]::before { transform: scaleX(var(--p, 0)); }
.conv-spin { display: none; flex: none; }
.conv-go[aria-busy="true"] .conv-spin { display: block; animation: conv-spin 0.8s linear infinite; }
@keyframes conv-spin { to { transform: rotate(360deg); } }
/* 만드는 동안 목록·선택은 잠근다 (바꿔도 이번 결과에 안 들어가므로) */
.conv[aria-busy="true"] :is(.conv-drop, .conv-list-head, .conv-list, .conv-opts, .conv-shrink, .conv-files, .conv-pages, .conv-hint) { opacity: 0.45; pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  .conv-go::before { transition: none; }
  .conv-go[aria-busy="true"] .conv-spin { animation: none; }
}
.conv-msg { margin-top: 12px; font-size: 14px; color: var(--text-2); }
.conv-msg:empty { display: none; }
.conv-msg.ok { color: var(--accent); font-weight: 600; }
.conv-msg.ok a { text-decoration: underline; text-underline-offset: 2px; }
.conv-msg.error { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--critical-soft); color: var(--critical); }
/* 파일 변환 목록 화면: 파일 고르기 칸 + 파일 종류별 도구 카드. 파일을 고르면 쓸 수 있는 카드만 강조 (convert.js) */
.conv-drop-sm { padding: 22px 20px; border-style: solid; border-color: var(--accent-line); background: var(--accent-soft); }
.conv-drop-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-bottom: 2px;
  border-radius: 999px; background: var(--accent); color: var(--on-accent);
}
.conv-drop-sm .conv-drop-title { font-size: 18px; }
.conv-drop-sm .conv-drop-sub { color: var(--text-2); }
.conv-pick { margin-bottom: 8px; }
.conv-group { margin-top: 32px; }
.conv-group .section-title { font-size: 19px; }
.conv-tools { display: grid; gap: 10px; } /* 한 줄에 하나: 페이지 폭(680px)에서 두 칸이면 설명이 서너 줄로 꺾인다 */
.conv-tool {
  display: flex; align-items: center; gap: 14px; padding: 18px 16px 18px 18px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s var(--ease), opacity 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.conv-tool:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.conv-tool-icon {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 76px; height: 64px;
  border-radius: 14px; background: var(--accent-soft); color: var(--accent);
}
.conv-tool-icon svg { width: 52px; height: 36px; }
.conv-tool-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.conv-tool-title { font-size: 18px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.35; }
.conv-tool-desc { font-size: 14px; color: var(--text); line-height: 1.5; }
.conv-tool-when { margin-top: 4px; font-size: 13px; color: var(--text-2); line-height: 1.5; }
.conv-tool-when b { margin-right: 4px; font-weight: 700; color: var(--accent); }
.conv-tool-go { flex: none; color: var(--text-3); transition: transform 0.15s var(--ease), color 0.15s var(--ease); }
.conv-tool:hover .conv-tool-go { color: var(--accent); transform: translateX(2px); }
.conv-tool.is-match { border: 2px solid var(--accent); padding: 17px 15px 17px 17px; box-shadow: 0 0 0 4px var(--accent-soft); }
.conv-tool.is-match .conv-tool-title { color: var(--accent); }
.conv-tool.is-match .conv-tool-icon { background: var(--accent); color: var(--on-accent); }
.conv-tool.is-dim { opacity: 0.45; }
@media (max-width: 400px) {
  .conv-tool { gap: 12px; padding: 16px 12px 16px 14px; }
  .conv-tool.is-match { padding: 15px 11px 15px 13px; }
  .conv-tool-icon { width: 60px; height: 54px; }
  .conv-tool-icon svg { width: 42px; height: 29px; }
}
.conv-note { display: block; margin-top: 6px; font-weight: 400; color: var(--text-2); }
.conv-msg.error .conv-note { color: inherit; }
/* 이미지 변환: 선택지 세 줄 (형식·크기·용량) */
.conv-selects { display: grid; gap: 10px; margin-bottom: 20px; }
.conv-select { display: grid; grid-template-columns: 56px 1fr; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; }
.conv-select select {
  height: 46px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--surface); color: var(--text); font: inherit; font-weight: 500;
}
.conv-select select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.conv-hint { font-size: 13px; color: var(--text-2); line-height: 1.55; }
.conv-get { display: inline-flex; align-items: center; justify-content: center; width: auto; padding: 0 12px; white-space: nowrap; flex: none; font-size: 14px; color: var(--accent); border-color: var(--accent-line); }
/* PDF 합치기·정리: 파일 목록(암호 넣기) + 결과 쪽 미리보기 격자 */
.conv-files { margin: 0 0 20px; padding: 0; list-style: none; display: grid; gap: 8px; }
.conv-file {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.conv-file.is-locked, .conv-file.is-wrong { border-color: var(--caution); background: var(--caution-soft); }
.conv-file.is-broken { border-color: var(--critical); background: var(--critical-soft); }
.conv-file.is-wrong .conv-item-meta, .conv-file.is-broken .conv-item-meta { color: var(--critical); font-weight: 600; }
.conv-unlock { display: flex; gap: 6px; flex: 1 1 200px; }
.conv-unlock input {
  flex: 1; min-width: 0; height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--surface); color: var(--text); font: inherit;
}
/* PDF → 이미지: 파일 줄 안의 "바꿀 쪽" 칸 (이름 + 칸 + 바로 아래 안내, 적는 대로 결과를 읽어 줌) */
.conv-range { flex: 1 1 100%; order: 3; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 6px 10px; }
.conv-range-label { font-size: 14px; font-weight: 700; }
.conv-range input {
  min-width: 0; height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--surface); color: var(--text); font: inherit; font-variant-numeric: tabular-nums;
}
.conv-range input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.conv-range-help { grid-column: 1 / -1; font-size: 13px; color: var(--text-2); line-height: 1.5; }
.conv-range-help.is-error { color: var(--critical); font-weight: 600; }
.conv-pages { margin: 12px 0 24px; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.conv-page { display: flex; flex-direction: column; gap: 4px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.conv-page-thumb {
  display: flex; align-items: center; justify-content: center; aspect-ratio: 1; overflow: hidden;
  background: var(--surface-2); border-radius: 6px;
}
.conv-page-thumb img { max-width: 100%; max-height: 100%; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18); transition: transform 0.15s var(--ease); }
.conv-page-thumb img:not([src]) { display: none; }
.conv-page-no { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.conv-page-src { font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-page-tools { display: flex; gap: 4px; }
.conv-page-tools .conv-btn { flex: 1; width: auto; min-width: 0; height: 40px; font-size: 15px; }
/* 좁은 화면: 버튼 셋이 이름을 밀어내지 않게 조금 작게 (터치 크기는 40px 이상) */
@media (max-width: 400px) {
  .conv-thumb { width: 44px; height: 44px; }
  .conv-btn { width: 40px; height: 40px; }
}

/* ---------- 안내 문서 (개인정보처리방침) ---------- */
.legal { max-width: 720px; padding: 32px 0 48px; line-height: 1.7; }
.legal h1 { font-size: 26px; font-weight: 800; }
.legal h2 { font-size: 17px; font-weight: 700; margin-top: 28px; }
.legal p, .legal ul { margin-top: 8px; }
.legal ul { padding-left: 20px; list-style: disc; }
.legal li + li { margin-top: 6px; }
.legal a { text-decoration: underline; text-underline-offset: 2px; }
.legal code { font-size: 0.92em; }
.legal-date { color: var(--text-3); font-size: 14px; }

/* ---------- 하단 ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 24px 0 40px; font-size: 13px; color: var(--text-2); }
.site-footer p + p { margin-top: 4px; }
.site-footer .muted { color: var(--text-3); }
.site-footer .contact a { color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; }
.site-footer .contact a:hover { color: var(--accent); }

/* ---------- 마침 메인 (data-brand="home"): 응급실과 다른 자체 색 ---------- */
:root[data-brand="home"] {
  --wrap: 1120px; /* 2026-11-22: 다른 서비스 넓은 틀과 같은 폭 (반응형 기준 통일) */
  --bg: #f3f4f7;
  --surface: #ffffff;
  --surface-2: #eceef3;
  --text: #0b0c10;
  --text-2: #33363e;
  --text-3: #5f636d;
  --line: #d9dce3;
  --line-strong: #b9bec9;
  --accent: #3a37ff;
  --accent-strong: #2a27e0;
  --accent-soft: #e8e8ff;
  --accent-line: #b9b8ff;
  --on-accent: #ffffff;
  --header-bg: rgba(255, 255, 255, 0.86);
}
@media (prefers-color-scheme: dark) {
  :root[data-brand="home"]:not([data-theme="light"]) {
    --bg: #090a0e; --surface: #15171e; --surface-2: #1e2129;
    --text: #f4f5f7; --text-2: #c9ccd4; --text-3: #959aa5;
    --line: #2b2e38; --line-strong: #444958;
    --accent: #8f8dff; --accent-strong: #aaa8ff; --accent-soft: rgba(143, 141, 255, 0.16); --accent-line: rgba(143, 141, 255, 0.45);
    --on-accent: #0b0a33; --header-bg: rgba(9, 10, 14, 0.82);
  }
}
:root[data-brand="home"][data-theme="dark"] {
  --bg: #090a0e; --surface: #15171e; --surface-2: #1e2129;
  --text: #f4f5f7; --text-2: #c9ccd4; --text-3: #959aa5;
  --line: #2b2e38; --line-strong: #444958;
  --accent: #8f8dff; --accent-strong: #aaa8ff; --accent-soft: rgba(143, 141, 255, 0.16); --accent-line: rgba(143, 141, 255, 0.45);
  --on-accent: #0b0a33; --header-bg: rgba(9, 10, 14, 0.82);
}

/* ---------- 서비스별 색 톤 (2026-10-18. 모양은 2026-10-19 부터 맨 아래 "서비스별 모양"에서 따로) ----------
   메인 "home" 인디고(위), 응급실 "er" 따뜻한 빨강, 약국 "pharmacy" 차분한 초록. */
:root[data-brand="er"] {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --text: #15171c;
  --text-2: #4a505c;
  --text-3: #8b919c;
  --line: #e7e9ed;
  --line-strong: #d6d9df;
  --accent: #d9473a;
  --accent-strong: #bf3a2e;
  --accent-soft: #fdefed;
  --accent-line: #f5c7c1;
  --on-accent: #ffffff;
  --critical: #a8231a;
  --critical-soft: #fbe7e5;
}
@media (prefers-color-scheme: dark) {
  :root[data-brand="er"]:not([data-theme="light"]) {
    --bg: #0f1012; --surface: #17181c; --surface-2: #1e2025; --text: #eeeff2; --text-2: #aaafb8; --text-3: #737985;
    --line: #25272d; --line-strong: #32353d;
    --accent: #ff6f61; --accent-strong: #ff8b80; --accent-soft: rgba(255, 111, 97, 0.12); --accent-line: rgba(255, 111, 97, 0.34);
    --on-accent: #2a0703; --critical: #ff9389; --critical-soft: rgba(255, 147, 137, 0.13);
    --header-bg: rgba(15, 16, 18, 0.8);
  }
}
:root[data-brand="er"][data-theme="dark"] {
  --bg: #0f1012; --surface: #17181c; --surface-2: #1e2025; --text: #eeeff2; --text-2: #aaafb8; --text-3: #737985;
  --line: #25272d; --line-strong: #32353d;
  --accent: #ff6f61; --accent-strong: #ff8b80; --accent-soft: rgba(255, 111, 97, 0.12); --accent-line: rgba(255, 111, 97, 0.34);
  --on-accent: #2a0703; --critical: #ff9389; --critical-soft: rgba(255, 147, 137, 0.13);
  --header-bg: rgba(15, 16, 18, 0.8);
}

:root[data-brand="pharmacy"] {
  --bg: #f3f7f3;
  --surface: #ffffff;
  --surface-2: #edf3ee;
  --text: #141a16;
  --text-2: #47524b;
  --text-3: #87928b;
  --line: #e3ebe5;
  --line-strong: #d0dbd3;
  --accent: #1d8a57;
  --accent-strong: #17744a;
  --accent-soft: #e6f4ec;
  --accent-line: #bfe2cd;
  --on-accent: #ffffff;
  --header-bg: rgba(255, 255, 255, 0.84);
}
@media (prefers-color-scheme: dark) {
  :root[data-brand="pharmacy"]:not([data-theme="light"]) {
    --bg: #0c110e; --surface: #141a16; --surface-2: #1a221d; --text: #ecf1ed; --text-2: #a5b1a9; --text-3: #6f7b73;
    --line: #222b25; --line-strong: #2e3932;
    --accent: #52cf92; --accent-strong: #79dcab; --accent-soft: rgba(82, 207, 146, 0.12); --accent-line: rgba(82, 207, 146, 0.32);
    --on-accent: #06200f; --header-bg: rgba(12, 17, 14, 0.8);
  }
}
:root[data-brand="pharmacy"][data-theme="dark"] {
  --bg: #0c110e; --surface: #141a16; --surface-2: #1a221d; --text: #ecf1ed; --text-2: #a5b1a9; --text-3: #6f7b73;
  --line: #222b25; --line-strong: #2e3932;
  --accent: #52cf92; --accent-strong: #79dcab; --accent-soft: rgba(82, 207, 146, 0.12); --accent-line: rgba(82, 207, 146, 0.32);
  --on-accent: #06200f; --header-bg: rgba(12, 17, 14, 0.8);
}

:root[data-brand="convert"] {
  --bg: #f3f7fb;
  --surface: #ffffff;
  --surface-2: #ecf2f8;
  --text: #131820;
  --text-2: #46505d;
  --text-3: #87909c;
  --line: #e2e9f0;
  --line-strong: #cfdae5;
  --accent: #0a74b8;
  --accent-strong: #08629c;
  --accent-soft: #e7f3fb;
  --accent-line: #bcdff3;
  --on-accent: #ffffff;
  --header-bg: rgba(255, 255, 255, 0.84);
}
@media (prefers-color-scheme: dark) {
  :root[data-brand="convert"]:not([data-theme="light"]) {
    --bg: #0d1116; --surface: #151a21; --surface-2: #1b222b; --text: #ebeff4; --text-2: #a6afbb; --text-3: #6f7986;
    --line: #222a34; --line-strong: #2e3843;
    --accent: #4fc3f7; --accent-strong: #7dd3fa; --accent-soft: rgba(79, 195, 247, 0.13); --accent-line: rgba(79, 195, 247, 0.34);
    --on-accent: #03202f; --header-bg: rgba(13, 17, 22, 0.8);
  }
}
:root[data-brand="convert"][data-theme="dark"] {
  --bg: #0d1116; --surface: #151a21; --surface-2: #1b222b; --text: #ebeff4; --text-2: #a6afbb; --text-3: #6f7986;
  --line: #222a34; --line-strong: #2e3843;
  --accent: #4fc3f7; --accent-strong: #7dd3fa; --accent-soft: rgba(79, 195, 247, 0.13); --accent-line: rgba(79, 195, 247, 0.34);
  --on-accent: #03202f; --header-bg: rgba(13, 17, 22, 0.8);
}

/* AI 등기부 분석: 보라 (2026-11-11, 시안 docs/design/2026-11-11-deed). 결과의 상태 색(양호·주의·위험)과 겹치지 않게 고름.
   --good 은 "양호" 색으로 AI 등기부 분석만 쓴다 (공통에는 위험 --critical·주의 --caution 만 있다) */
:root[data-brand="deed"] {
  --bg: #f6f5fa;
  --surface: #ffffff;
  --surface-2: #f0eef7;
  --text: #16141c;
  --text-2: #4f4b5c;
  --text-3: #8d8999;
  --line: #e8e5f0;
  --line-strong: #d8d3e5;
  --accent: #6c47d1;
  --accent-strong: #5835b8;
  --accent-soft: #f1ecfc;
  --accent-line: #d5c7f6;
  --on-accent: #ffffff;
  --header-bg: rgba(255, 255, 255, 0.84);
  --good: #1f7a4d;
  --good-soft: #e8f5ee;
}
@media (prefers-color-scheme: dark) {
  :root[data-brand="deed"]:not([data-theme="light"]) {
    --bg: #100e15; --surface: #18161f; --surface-2: #1f1c28; --text: #eeecf3; --text-2: #aca7b9; --text-3: #747086;
    --line: #27232f; --line-strong: #34303e;
    --accent: #b39cf7; --accent-strong: #c9b8fa; --accent-soft: rgba(179, 156, 247, 0.13); --accent-line: rgba(179, 156, 247, 0.34);
    --on-accent: #1a0f38; --header-bg: rgba(16, 14, 21, 0.8);
    --good: #5cc98f; --good-soft: rgba(92, 201, 143, 0.12);
  }
}
:root[data-brand="deed"][data-theme="dark"] {
  --bg: #100e15; --surface: #18161f; --surface-2: #1f1c28; --text: #eeecf3; --text-2: #aca7b9; --text-3: #747086;
  --line: #27232f; --line-strong: #34303e;
  --accent: #b39cf7; --accent-strong: #c9b8fa; --accent-soft: rgba(179, 156, 247, 0.13); --accent-line: rgba(179, 156, 247, 0.34);
  --on-accent: #1a0f38; --header-bg: rgba(16, 14, 21, 0.8);
  --good: #5cc98f; --good-soft: rgba(92, 201, 143, 0.12);
}

/* 공공주택 공고: 남색 + 연두 (2026-11-24 사용자 결정, 그 전 주황 2026-11-13). 기획 이미지(docs/design/2026-11-23-housing-redesign) 색.
   연두(--accent)는 강조·버튼, 남색(--hs-navy)은 로고·검색 버튼처럼 바탕을 잡는 곳. 약국(진한 초록 한 가지)과는 남색 바탕으로 구별한다.
   흰 글자 대비: 연두 #2f7d1f 5.2, 남색 #172b4d 14 */
:root[data-brand="housing"] {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #eef2f6;
  --text: #111827;
  --text-2: #4b5563;
  --text-3: #8b95a5;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --accent: #2f7d1f;
  --accent-strong: #256418;
  --accent-soft: #ebf6e7;
  --accent-line: #c5e6bb;
  --on-accent: #ffffff;
  --header-bg: rgba(255, 255, 255, 0.86);
  --hs-navy: #172b4d;
  --hs-navy-on: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root[data-brand="housing"]:not([data-theme="light"]) {
    --bg: #0b1220; --surface: #111827; --surface-2: #1a2333; --text: #f3f5f8; --text-2: #b4bcc8; --text-3: #7c8799;
    --line: #263043; --line-strong: #334155;
    --accent: #4ade80; --accent-strong: #86efac; --accent-soft: rgba(74, 222, 128, 0.12); --accent-line: rgba(74, 222, 128, 0.3);
    --on-accent: #052e13; --header-bg: rgba(11, 18, 32, 0.82); --hs-navy: #e8eef7; --hs-navy-on: #0b1220;
  }
}
:root[data-brand="housing"][data-theme="dark"] {
  --bg: #0b1220; --surface: #111827; --surface-2: #1a2333; --text: #f3f5f8; --text-2: #b4bcc8; --text-3: #7c8799;
  --line: #263043; --line-strong: #334155;
  --accent: #4ade80; --accent-strong: #86efac; --accent-soft: rgba(74, 222, 128, 0.12); --accent-line: rgba(74, 222, 128, 0.3);
  --on-accent: #052e13; --header-bg: rgba(11, 18, 32, 0.82); --hs-navy: #e8eef7; --hs-navy-on: #0b1220;
}

/* 워드마크 "마침." */
.mk-logo { display: inline-flex; align-items: baseline; font-size: 22px; font-weight: 800; letter-spacing: -0.065em; line-height: 1; color: var(--text); }
.mk-logo-dot { display: inline-block; width: 0.3em; height: 0.3em; margin-left: 0.12em; border-radius: 999px; background: var(--accent); }

.mk-hero { display: grid; gap: 36px; padding: 44px 0 40px; }
.mk-slogan { font-size: 29px; line-height: 1.42; font-weight: 800; letter-spacing: -0.05em; color: var(--text); }
.mk-slogan-key { color: var(--accent); }
.mk-sub { margin-top: 12px; font-size: 15.5px; font-weight: 500; line-height: 1.6; color: var(--text-2); }
.mk-slogan-dot { color: var(--accent); }
.mk-facts { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 22px 0 0; padding: 0; list-style: none; }
.mk-facts li { display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.mk-facts svg { color: var(--accent); flex: none; width: 14px; height: 14px; }

.mk-services { margin-bottom: 8px; }
.mk-section-head h2 { margin: 0 0 12px; font-size: 14px; font-weight: 800; color: var(--text); letter-spacing: -0.02em; }
/* 서비스 화면 미리보기 슬라이드 (휴대폰 모양, HTML 로 그림). 장은 같은 칸에 겹쳐 두고 보이는 장만 바꾼다 */
/* 옆에서 대기하는 장(translateX)은 숨겨도 페이지 가로 폭에 들어가 휴대폰에서 화면이 좌우로 밀린다 → 가로만 자른다 (clip 을 모르는 옛 브라우저는 hidden) */
.mk-show { overflow-x: hidden; overflow-x: clip; }
.mk-slides { display: grid; }
.mk-preview { position: relative; display: flex; justify-content: center; padding: 8px 0 20px; }
.mk-slide { grid-area: 1 / 1; }
.js .mk-slide { opacity: 0; visibility: hidden; transform: translateX(28px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), visibility 0s linear 0.5s; }
.js .mk-slide.is-leaving { transform: translateX(-28px); }
.js .mk-slide.is-active { opacity: 1; visibility: visible; transform: none; transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
html:not(.js) .mk-slide:not(:first-child), html:not(.js) .mk-tabs { display: none; }
/* 고르는 버튼: 지금 장은 강조, 자동 넘김 중이면 밑줄이 차오른다 (멈추면 밑줄도 멈춤) */
.mk-tabs { display: flex; justify-content: center; gap: 6px; margin-top: 2px; }
.mk-tab {
  position: relative; overflow: hidden; height: 34px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--text-3); font: inherit; font-size: 13px; font-weight: 700; letter-spacing: -0.02em; cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.mk-tab:hover { color: var(--text); }
.mk-tab.is-active { color: var(--text); border-color: var(--line-strong); background: var(--surface); }
.mk-tab::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.mk-show.is-playing .mk-tab.is-active::after { animation: mk-tab-fill var(--slide-ms, 5000ms) linear forwards; }
.mk-show.is-paused .mk-tab.is-active::after { animation-play-state: paused; }
@keyframes mk-tab-fill { to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) {
  .js .mk-slide, .js .mk-slide.is-active { transition: none; transform: none; }
}
/* 약국 화면: 약국 색 (초록) */
.mk-slide.pharmacy .mk-phone-mark, .mk-slide.pharmacy .mk-row-call { background: #1d8a57; }
.mk-slide.pharmacy .mk-phone-brand b { color: #1d8a57; }
.mk-slide.pharmacy .mk-row-kind.critical { color: #1d8a57; }
:root[data-theme="dark"] .mk-slide.pharmacy .mk-row-kind.critical { color: #52cf92; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mk-slide.pharmacy .mk-row-kind.critical { color: #52cf92; } }
/* 파일 변환 슬라이드: 사진 3장 → PDF 만드는 중 (파일 변환 색 = 공통 청록, 색 톤 미정) */
.mk-slide.convert .mk-phone-mark { background: #0a74b8; }
.mk-slide.convert .mk-phone-brand b { color: #0a74b8; }
.mk-file-thumb { flex: none; width: 34px; height: 34px; border-radius: 7px; opacity: 0.85; }
.mk-make {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center;
  height: 40px; margin-top: 12px; border-radius: 11px; background: #0a74b8; color: #fff; font-size: 12.5px; font-weight: 700;
}
.mk-make-fill { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.3); transform: scaleX(0.66); transform-origin: left; }
.mk-make-label { position: relative; }
.mk-phone {
  display: flex; flex-direction: column; width: 272px; padding: 14px 14px 70px;
  background: var(--surface); border: 7px solid var(--text); border-radius: 38px;
  box-shadow: 0 30px 60px -24px rgba(11, 12, 16, 0.35), 0 8px 18px -8px rgba(11, 12, 16, 0.18);
  transition: transform 0.3s var(--ease);
}
.mk-preview:hover .mk-phone { transform: translateY(-4px) rotate(-1deg); }
.mk-phone-bar { display: flex; align-items: center; gap: 7px; padding: 4px 4px 12px; border-bottom: 1px solid var(--line); }
.mk-phone-mark { width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; background: #d9473a; color: #fff; }
.mk-phone-mark svg { width: 15px; height: 15px; }
.mk-phone-brand { font-size: 12px; font-weight: 700; color: var(--text); letter-spacing: -0.03em; }
.mk-phone-brand b { color: #d9473a; font-weight: 800; }
.mk-phone-title { margin: 14px 4px 0; font-size: 17px; font-weight: 800; letter-spacing: -0.04em; color: var(--text); }
.mk-phone-meta { margin: 2px 4px 10px; font-size: 11px; color: var(--text-3); }
.mk-row { display: flex; align-items: center; gap: 8px; padding: 10px 6px; border-top: 1px solid var(--line); }
.mk-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mk-row-name { font-size: 13px; font-weight: 700; color: var(--text); letter-spacing: -0.03em; }
.mk-row-kind { font-size: 10.5px; color: var(--text-3); }
.mk-row-kind.critical { color: var(--critical); font-weight: 600; }
.mk-row-call { flex: none; padding: 5px 10px; border-radius: 999px; background: #d9473a; color: #fff; font-size: 11px; font-weight: 700; }
.mk-float {
  position: absolute; left: 50%; bottom: 36px; transform: translateX(-160px);
  display: flex; align-items: center; gap: 9px; padding: 10px 14px 10px 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 14px 30px -12px rgba(11, 12, 16, 0.3);
  font-size: 11.5px; line-height: 1.4; color: var(--text-2);
}
.mk-float b { font-size: 12.5px; color: var(--text); }
.mk-float-icon { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; background: var(--accent); color: var(--on-accent); }
.mk-float-icon svg { width: 18px; height: 18px; }
.mk-float-icon.er { background: #d9473a; color: #fff; } /* 서비스 카드 아이콘과 같은 색 */
.mk-float-icon.pharmacy { background: #1d8a57; color: #fff; }
.mk-float-icon.convert { background: #0a74b8; color: #fff; }
@media (max-width: 380px) { .mk-float { transform: translateX(-140px); } .mk-phone { width: 248px; } }

/* 서비스 카드: 두 칸 격자 (서비스가 늘면 카드가 차례로 채워진다) */
.mk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mk-card {
  position: relative; display: flex; flex-direction: column; gap: 14px; min-height: 196px; padding: 18px;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 20px;
  box-shadow: 0 1px 2px rgba(11, 12, 16, 0.06), 0 12px 30px -12px rgba(11, 12, 16, 0.22);
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
a.mk-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 2px 4px rgba(18, 19, 24, 0.04), 0 18px 36px -14px rgba(18, 19, 24, 0.2); }
a.mk-card:focus-visible { outline-offset: 3px; border-radius: 20px; }
.mk-card-top { display: flex; align-items: flex-start; justify-content: space-between; }
.mk-card-icon { flex: none; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; }
.mk-card-icon.er { background: #d9473a; color: #ffffff; box-shadow: 0 6px 14px -6px rgba(217, 71, 58, 0.6); } /* 응급실 찾기 색 */
.mk-card-icon.pharmacy { background: #1d8a57; color: #ffffff; box-shadow: 0 6px 14px -6px rgba(29, 138, 87, 0.6); } /* 여는 약국 찾기 색 */
.mk-card-icon.convert { background: #0a74b8; color: #ffffff; box-shadow: 0 6px 14px -6px rgba(10, 116, 184, 0.6); } /* 파일 변환 색 (하늘색, 2026-10-29) */
.mk-card-icon.deed { background: #6c47d1; color: #ffffff; box-shadow: 0 6px 14px -6px rgba(108, 71, 209, 0.6); } /* AI 등기부 분석 색 (보라, 2026-11-11) */
.mk-card-icon.housing { background: #172b4d; color: #ffffff; box-shadow: 0 6px 14px -6px rgba(23, 43, 77, 0.6); } /* 공공주택 공고 색 (남색 + 연두, 2026-11-24. 메인 카드는 남색: 약국 초록 카드와 나란히 놓여서) */
.mk-card-go {
  width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; background: var(--accent); color: var(--on-accent);
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}
.mk-card-go svg { width: 16px; height: 16px; }
a.mk-card:hover .mk-card-go { background: var(--accent-strong); transform: translateX(2px); }
.mk-card-body { display: flex; flex-direction: column; margin-top: auto; }
.mk-card-status { display: inline-flex; align-items: center; gap: 5px; margin-bottom: 6px; font-size: 12px; font-weight: 700; color: #0b9a87; }
.mk-card-status::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: currentColor; box-shadow: 0 0 0 3px rgba(23, 162, 145, 0.15); }
.mk-card-status.down { color: var(--text-2); }
.mk-card-status.down::before { box-shadow: none; }
.mk-status-note { margin: 10px 2px 0; font-size: 12.5px; line-height: 1.55; color: var(--text-2); }
.mk-card-name { font-size: 18px; font-weight: 800; letter-spacing: -0.04em; line-height: 1.3; color: var(--text); }
.mk-card-desc { margin-top: 3px; font-size: 13.5px; font-weight: 500; line-height: 1.5; color: var(--text-2); }
.mk-card-soon { justify-content: flex-end; background: transparent; border-style: dashed; border-color: var(--line-strong); box-shadow: none; }
.mk-card-soon .mk-card-name { color: var(--text-2); }
@media (max-width: 340px) { .mk-grid { grid-template-columns: 1fr; } }
@media (min-width: 900px) {
  .mk-hero { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: center; gap: 48px; padding: 88px 0 72px; }
  .mk-slogan { font-size: 54px; line-height: 1.28; }
  .mk-sub { font-size: 18px; margin-top: 18px; }
  .mk-facts { margin-top: 28px; }
  .mk-phone { width: 300px; }
  .mk-float { transform: translateX(-200px); bottom: 38px; }
}


@media (min-width: 640px) {
  .mk-hero { padding: 72px 0 56px; }
  .mk-slogan { font-size: 44px; }
  .mk-card { min-height: 216px; padding: 22px; }
  .mk-card-name { font-size: 19px; }
}

@media (min-width: 640px) {
  .hero { padding-top: 20px; }
  .hero-title { font-size: 32px; }
  .page-title { font-size: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .locate-btn[aria-busy="true"] svg { animation: none; }
  .locate-btn[aria-busy="true"]::after { animation: none; transform: scaleX(0.5); }
}

/* 영업 상태 (약국 등 영업시간이 있는 장소) */
.status { font-weight: 600; }
.status::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: currentColor; vertical-align: 1px; }
.status.open { color: var(--accent); }
.status.maybe { color: var(--caution); }
.status.closed, .status.unknown { color: var(--text-3); font-weight: 500; }
.page-meta .status { margin-right: 6px; }
.row-sub.row-status { white-space: normal; }
.group-title.open { color: var(--accent); }
.group-hint { margin: 0; padding: 10px 18px; font-size: 13px; color: var(--text-2); line-height: 1.55; border-bottom: 1px solid var(--line); }
.page-hint { margin: -14px 0 16px; font-size: 13px; color: var(--text-2); line-height: 1.55; }
details.group.collapsible > summary { cursor: pointer; list-style: none; }
details.group.collapsible > summary::-webkit-details-marker { display: none; }
details.group.collapsible > summary .count { margin-left: auto; }
details.group.collapsible > summary::after { content: "펼치기"; margin-left: 10px; font-size: 12px; font-weight: 600; color: var(--accent); }
details.group.collapsible[open] > summary::after { content: "접기"; }
details.group.collapsible:not([open]) > summary { border-bottom: 0; }
.callout.caution { background: var(--caution-soft); border-color: transparent; }
.callout.caution .callout-title { color: var(--caution); margin: 0; }
.detail-sub { margin-top: 4px; font-size: 13px; color: var(--text-3); }
.note-label { margin-top: 16px; }
.detail-value.pre { white-space: pre-line; font-size: 14px; color: var(--text-2); }
.timetable { margin: 10px 0 0; padding: 0; list-style: none; }
.timetable li { display: flex; align-items: baseline; gap: 14px; padding: 7px 0; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.timetable li:first-child { border-top: 0; }
.timetable .day { min-width: 48px; color: var(--text-3); }
.timetable .time { flex: 1; font-weight: 600; }
.timetable li.empty .time { font-weight: 400; color: var(--text-3); }
.timetable li.today .day, .timetable li.today .time { color: var(--accent); font-weight: 700; }
.timetable .today-mark { font-size: 11px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 1px 8px; }

/* ==========================================================================
   서비스별 모양 (2026-10-19 결정: 성격에 맞게 조금씩 다르게, 장식은 쓰지 않음. 시안 docs/design/2026-10-19)
   위 공통 모양을 [data-brand] 로 덮어쓴다. 클래스 이름은 서비스 공통 그대로다.
   ========================================================================== */

/* ---------- 응급실: 차분하고 단호하게 ----------
   참고: NHS 111·GOV.UK(꾸밈 없는 위계), Apple 긴급 SOS(큰 행동 하나), 토스 목록(촘촘한 줄).
   그림자 없음, 1px 선, 모서리 작게, 목록은 상자가 아니라 진한 윗선 아래의 줄. 빨강은 누르는 것에만 */
:root[data-brand="er"] {
  --radius: 12px; --radius-sm: 8px;
  --bg: #ffffff; --surface: #ffffff; --surface-2: #f4f5f7;
  --line: #e6e8ec; --line-strong: #cfd3da;
  --ink: #111316;
  --shadow-sm: none; --shadow: none;
  --header-bg: rgba(255, 255, 255, 0.92);
}
@media (prefers-color-scheme: dark) {
  :root[data-brand="er"]:not([data-theme="light"]) {
    --bg: #0e0f11; --surface: #0e0f11; --surface-2: #181a1d; --line: #24272c; --line-strong: #363a41;
    --ink: #f1f2f4; --shadow-sm: none; --shadow: none; --header-bg: rgba(14, 15, 17, 0.92);
  }
}
:root[data-brand="er"][data-theme="dark"] {
  --bg: #0e0f11; --surface: #0e0f11; --surface-2: #181a1d; --line: #24272c; --line-strong: #363a41;
  --ink: #f1f2f4; --shadow-sm: none; --shadow: none; --header-bg: rgba(14, 15, 17, 0.92);
}
[data-brand="er"] .hero-title, [data-brand="er"] .page-title { letter-spacing: -0.045em; }
[data-brand="er"] .section-title { font-size: 18px; font-weight: 800; }
/* 큰 행동 하나: 꽉 찬 빨강, 모서리 12px */
[data-brand="er"] .near-section > .locate:not(.dept-locate) .locate-btn { border-radius: 12px; }
[data-brand="er"] .locate-btn { border-radius: 10px; }
[data-brand="er"] .locate-btn.dept-card { border-color: var(--line-strong); }
[data-brand="er"] .locate-btn.dept-card:hover { background: var(--surface-2); border-color: var(--ink); }
[data-brand="er"] .dept-card-icon { border-radius: 8px; }
/* 안내: 색 상자 대신 회색 판 */
[data-brand="er"] .callout { background: var(--surface-2); border-color: transparent; }
[data-brand="er"] .callout-icon { background: var(--ink); color: var(--bg); }
[data-brand="er"] .callout-119row { border-top: 1px solid var(--line-strong); }
[data-brand="er"] .callout-119 { border-radius: 8px; background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
[data-brand="er"] .callout-119:hover { background: var(--accent-strong); }
/* 검색: 굵은 색 테두리 대신 선 하나 */
[data-brand="er"] .search-field { height: 54px; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--text-3); }
[data-brand="er"] .search-field:hover { border-color: var(--text-3); }
[data-brand="er"] .search-field:focus-within { border-color: var(--ink); box-shadow: none; color: var(--text); }
/* 목록: 진한 윗선 + 줄 */
[data-brand="er"] .group, [data-brand="er"] .sido-list {
  background: transparent; border: 0; border-top: 1.5px solid var(--ink); border-radius: 0; overflow: visible;
}
[data-brand="er"] .group { margin-bottom: 28px; }
[data-brand="er"] .group-title {
  padding: 12px 2px 10px; background: transparent; border-bottom: 1px solid var(--line);
  font-size: 14px; font-weight: 800; color: var(--text);
}
[data-brand="er"] .group-title.critical { color: var(--accent); }
[data-brand="er"] .row { padding: 16px 2px; border-top: 0; border-bottom: 1px solid var(--line); }
[data-brand="er"] .row:hover { background: transparent; }
[data-brand="er"] .row-name { font-size: 17px; font-weight: 700; }
/* 전화: 알약 대신 넓은 사각 버튼 (번호는 그대로 보임) */
[data-brand="er"] .call { height: 44px; padding: 0 14px; border-radius: 10px; border: 0; font-size: 14px; }
[data-brand="er"] .sido { border-top: 0; border-bottom: 1px solid var(--line); }
[data-brand="er"] .sido-title { padding: 15px 2px; }
[data-brand="er"] .sido-title:hover { background: transparent; color: var(--accent); }
[data-brand="er"] .sido > .chips { padding: 0 2px 16px; }
[data-brand="er"] .chip { border-radius: 6px; }
[data-brand="er"] .fchip { border-radius: 8px; }
[data-brand="er"] .fchip.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
[data-brand="er"] .panel, [data-brand="er"] .detail-card, [data-brand="er"] .info { border-color: var(--line-strong); }
[data-brand="er"] .btn { border-radius: 10px; }
[data-brand="er"] .badge { border-radius: 5px; }
[data-brand="er"] .badge.critical { background: var(--ink); color: var(--bg); }

/* ---------- 약국: 편안한 동네 생활 ----------
   참고: 당근(따뜻한 바탕), 카카오맵 장소 카드(영업 상태가 먼저), Airbnb(둥근 카드·여유).
   따뜻한 미색 바탕, 큰 모서리, 옅은 그림자, 버튼·칩은 알약형. 약국마다 한 장의 카드, 맨 위가 영업 상태 */
:root[data-brand="pharmacy"] {
  --radius: 22px; --radius-sm: 14px;
  --bg: #f6f4ee; --surface: #ffffff; --surface-2: #efece4;
  --text: #1b1d1a; --text-2: #50554e; --text-3: #8a8f86;
  --line: #e6e2d8; --line-strong: #d6d1c4;
  --shadow-sm: 0 1px 2px rgba(40, 35, 20, 0.05);
  --shadow: 0 1px 2px rgba(40, 35, 20, 0.04), 0 8px 24px -12px rgba(40, 35, 20, 0.18);
  --header-bg: rgba(246, 244, 238, 0.86);
}
@media (prefers-color-scheme: dark) {
  :root[data-brand="pharmacy"]:not([data-theme="light"]) {
    --bg: #121411; --surface: #1b1e1a; --surface-2: #232720; --text: #eef0ea; --text-2: #b6bbb0; --text-3: #80867b;
    --line: #2b3029; --line-strong: #383e35;
    --shadow-sm: none; --shadow: 0 0 0 1px rgba(255, 255, 255, 0.03); --header-bg: rgba(18, 20, 17, 0.86);
  }
}
:root[data-brand="pharmacy"][data-theme="dark"] {
  --bg: #121411; --surface: #1b1e1a; --surface-2: #232720; --text: #eef0ea; --text-2: #b6bbb0; --text-3: #80867b;
  --line: #2b3029; --line-strong: #383e35;
  --shadow-sm: none; --shadow: 0 0 0 1px rgba(255, 255, 255, 0.03); --header-bg: rgba(18, 20, 17, 0.86);
}
[data-brand="pharmacy"] .site-header { border-bottom-color: transparent; }
[data-brand="pharmacy"] .hero-title { font-weight: 700; letter-spacing: -0.03em; }
[data-brand="pharmacy"] .section-title { margin-left: 4px; }
/* 홈: 제목·위치 버튼·검색을 한 장의 큰 카드에 */
[data-brand="pharmacy"] .home-card { margin-bottom: 32px; padding: 24px 20px 20px; background: var(--surface); border-radius: 28px; box-shadow: var(--shadow); }
[data-brand="pharmacy"] .home-card .hero { padding: 0 0 20px; }
[data-brand="pharmacy"] .home-card .near-section, [data-brand="pharmacy"] .home-card .search-section { margin-bottom: 0; }
[data-brand="pharmacy"] .home-card .near-section { margin-bottom: 18px; }
[data-brand="pharmacy"] .home-card .section-title { margin-left: 0; font-size: 14px; color: var(--text-2); }
[data-brand="pharmacy"] .locate-btn, [data-brand="pharmacy"] .near-section > .locate:not(.dept-locate) .locate-btn { border-radius: 999px; }
[data-brand="pharmacy"] .search-field { border: 0; border-radius: 999px; background: var(--surface-2); box-shadow: none; color: var(--text-3); }
[data-brand="pharmacy"] .search-field:hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
[data-brand="pharmacy"] .search-field:focus-within { background: var(--surface); box-shadow: 0 0 0 2px var(--accent); color: var(--accent); }
/* 지역: 둥근 카드 목록, 칩은 알약 */
[data-brand="pharmacy"] .sido-list { border: 0; border-radius: var(--radius); }
[data-brand="pharmacy"] .sido { border-top-color: var(--line); }
[data-brand="pharmacy"] .chip { border-radius: 999px; padding: 7px 13px; }
[data-brand="pharmacy"] .fchip { padding: 8px 14px; border-color: transparent; box-shadow: var(--shadow-sm); }
/* 목록: 묶음 상자를 없애고 약국마다 카드 */
[data-brand="pharmacy"] .group { background: transparent; border: 0; box-shadow: none; border-radius: 0; overflow: visible; margin-bottom: 24px; }
[data-brand="pharmacy"] .group-title { padding: 4px 6px 10px; background: transparent; border-bottom: 0; font-size: 15px; font-weight: 700; color: var(--text); }
[data-brand="pharmacy"] .group-hint { padding: 0 6px 10px; border-bottom: 0; }
[data-brand="pharmacy"] details.group.collapsible > summary { padding: 14px 18px; margin-bottom: 10px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-sm); }
[data-brand="pharmacy"] .row {
  align-items: flex-end; margin-bottom: 10px; padding: 16px 16px 16px 18px;
  background: var(--surface); border: 0; border-radius: var(--radius); box-shadow: var(--shadow);
}
[data-brand="pharmacy"] .row:hover { background: var(--surface); box-shadow: var(--shadow), 0 0 0 1.5px var(--accent-line); }
[data-brand="pharmacy"] .row-main { display: flex; flex-direction: column; }
[data-brand="pharmacy"] .row-name { order: 1; margin-top: 10px; font-size: 17px; font-weight: 700; }
[data-brand="pharmacy"] .row-sub { order: 2; }
[data-brand="pharmacy"] .row-sub.row-status { order: 0; margin-top: 0; }
[data-brand="pharmacy"] .row-name .badge.small { margin: 0 0 0 4px; }
/* 영업 상태: 알약 표지 */
[data-brand="pharmacy"] .row-status .status { display: inline-flex; align-items: center; padding: 4px 11px; border-radius: 999px; font-size: 13px; background: var(--surface-2); }
[data-brand="pharmacy"] .row-status .status::before { vertical-align: 0; }
[data-brand="pharmacy"] .row-status .status.open { background: var(--accent-soft); }
[data-brand="pharmacy"] .row-status .status.maybe { background: var(--caution-soft); }
[data-brand="pharmacy"] .call { height: 42px; padding: 0 14px; border: 0; }
[data-brand="pharmacy"] .panel, [data-brand="pharmacy"] .detail-card, [data-brand="pharmacy"] .info { border: 0; }
[data-brand="pharmacy"] .callout { border: 0; border-radius: 20px; }
[data-brand="pharmacy"] .btn { border-radius: 999px; }
[data-brand="pharmacy"] .badge.feature { background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--text-2); }
/* 지금 영업 중이 없을 때 대안 (곧 여는 약국 · 편의점 · 응급실) */
[data-brand="pharmacy"] .none-open-note,
[data-brand="pharmacy"] .none-open-er { margin-top: 10px; padding: 14px 16px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-sm); font-size: 14px; line-height: 1.55; color: var(--text-2); }
[data-brand="pharmacy"] .none-open-note strong { color: var(--text); }
[data-brand="pharmacy"] .none-open-er { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--critical-soft); box-shadow: none; }
[data-brand="pharmacy"] .none-open-er + .group-hint, [data-brand="pharmacy"] .group-title + .none-open-er { margin-top: 0; }
[data-brand="pharmacy"] .none-open-er + .group-hint { padding-top: 16px; }
[data-brand="pharmacy"] .none-open-er .btn { flex: none; }
[data-brand="pharmacy"] .none-open-119 { color: var(--critical); font-weight: 800; }
@media (max-width: 420px) {
  [data-brand="pharmacy"] .row { flex-direction: column; align-items: stretch; gap: 12px; }
  [data-brand="pharmacy"] .row .call { justify-content: center; }
}

/* ---------- 메인: 마침 브랜드 소개 ----------
   참고: 토스·Linear·Apple 서비스 소개. 큰 글자와 넓은 여백, 서비스 카드는 단정하게, 약속은 번호 매긴 세 칸 */
:root[data-brand="home"] { --bg: #f4f4f1; --surface-2: #ebebe6; --line: #e1e1db; }
[data-brand="home"] .mk-eyebrow { margin-bottom: 14px; font-size: 14px; font-weight: 700; color: var(--text-3); letter-spacing: -0.01em; }
[data-brand="home"] .mk-slogan { font-size: 34px; line-height: 1.22; letter-spacing: -0.055em; }
[data-brand="home"] .mk-sub { margin-top: 18px; max-width: 30em; }
[data-brand="home"] .mk-card { min-height: 220px; padding: 22px; border-radius: 24px; border-width: 1px; box-shadow: none; }
[data-brand="home"] a.mk-card:hover { border-color: var(--line-strong); box-shadow: 0 18px 40px -20px rgba(11, 12, 16, 0.28); }
[data-brand="home"] .mk-card-go { width: 40px; height: 40px; background: var(--text); color: var(--bg); }
[data-brand="home"] a.mk-card:hover .mk-card-go { background: var(--accent); color: var(--on-accent); }
[data-brand="home"] .mk-card-name { font-size: 20px; }
[data-brand="home"] .mk-card-soon { min-height: 0; padding-top: 22px; padding-bottom: 22px; border-radius: 24px; }
.mk-principles { display: grid; gap: 24px; margin-top: 48px; padding: 40px 0 8px; border-top: 1px solid var(--line); }
.mk-principle-no { font-size: 13px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.mk-principles h2 { margin: 8px 0 6px; font-size: 18px; font-weight: 800; letter-spacing: -0.03em; }
.mk-principles p { font-size: 14px; line-height: 1.6; color: var(--text-2); }
@media (min-width: 640px) {
  [data-brand="home"] .mk-slogan { font-size: 50px; }
  [data-brand="home"] .mk-card { min-height: 240px; padding: 26px; }
  [data-brand="home"] .mk-card-name { font-size: 22px; }
  .mk-principles { grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 72px; padding-top: 56px; }
}
@media (min-width: 900px) {
  [data-brand="home"] .mk-slogan { font-size: 64px; line-height: 1.12; }
}

/* ---------- 파일 변환 (data-brand="convert", 2026-10-29): 색 톤 하늘색만, 모양은 공통 ---------- */
/* 로고 마크의 문서 선: 어둡게에서는 밝은 하늘색 바탕 위라 흰 선 대신 진한 색 (파비콘 SVG 와 같은 규칙) */
[data-brand="convert"] .brand-mark path { stroke: var(--on-accent); }

/* ---------- AI 등기부 분석 (data-brand="deed", 2026-11-11): 모양 "검사 보고서" ----------
   결과를 한 장짜리 보고서처럼 위에서 아래로 읽는다 (등급 → 집 정보 → 11개 항목 줄 목록 → 할 일 → 근거). 모서리는 조금 작게.
   dc-* 는 AI 등기부 분석에만 있는 부분이다. 시안 docs/design/2026-11-11-deed */
:root[data-brand="deed"] { --radius: 12px; --radius-sm: 8px; }
[data-brand="deed"] .brand-mark path { stroke: var(--on-accent); }

.dc-lead { margin-top: 8px; font-size: 15px; color: var(--text-2); line-height: 1.6; word-break: keep-all; }
.dc-box { margin-top: 20px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.dc-box > h2 { margin: 0 0 12px; font-size: 15px; font-weight: 700; letter-spacing: -0.02em; }
.dc-step {
  display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-right: 6px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 800; vertical-align: 1px;
}

/* 계약 종류 */
.dc-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.dc-seg label { position: relative; }
.dc-seg input { position: absolute; opacity: 0; }
.dc-seg span {
  display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 52px; padding: 6px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font-size: 15px; font-weight: 700; text-align: center; cursor: pointer;
}
.dc-seg small { font-size: 11.5px; font-weight: 400; color: var(--text-3); }
.dc-seg input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.dc-seg input:checked + span small { color: var(--accent); }
.dc-seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* PDF 고르기 */
.dc-drop {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 16px;
  border: 1.5px dashed var(--accent-line); border-radius: var(--radius); background: var(--accent-soft); text-align: center; cursor: pointer;
}
.dc-drop:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.dc-drop-icon { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 999px; background: var(--accent); color: var(--on-accent); }
.dc-drop b { font-size: 16px; }
.dc-drop small { font-size: 12.5px; color: var(--text-2); }
.dc-go {
  display: flex; width: 100%; height: 54px; margin-top: 14px; align-items: center; justify-content: center; border: 0; border-radius: var(--radius-sm);
  background: var(--accent); color: var(--on-accent); font-family: inherit; font-size: 16.5px; font-weight: 700; cursor: pointer;
}
.dc-go:hover { background: var(--accent-strong); }
.dc-go:disabled { background: var(--line-strong); color: var(--text-3); cursor: not-allowed; }

.dc-privacy { margin-top: 14px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: 13px; line-height: 1.6; color: var(--text-2); word-break: keep-all; }
.dc-privacy b { color: var(--text); }
.dc-how { margin-top: 12px; font-size: 14px; }
.dc-how summary { padding: 6px 0; font-weight: 600; color: var(--text-2); cursor: pointer; }
.dc-how ol { margin: 6px 0 0 18px; padding: 0; font-size: 13.5px; line-height: 1.7; color: var(--text-2); }
.dc-items { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin: 0; padding: 0; list-style: none; font-size: 13.5px; color: var(--text-2); }
.dc-items li::before { content: "✓"; margin-right: 6px; color: var(--accent); font-weight: 800; }
.dc-legal { margin-top: 18px; font-size: 12px; line-height: 1.6; color: var(--text-3); word-break: keep-all; }

/* 안내 (준비 중·오류·한도) */
.dc-msg { margin-top: 14px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.dc-msg h2 { font-size: 17px; font-weight: 800; letter-spacing: -0.03em; word-break: keep-all; }
.dc-msg p { margin-top: 6px; font-size: 14px; line-height: 1.6; color: var(--text-2); word-break: keep-all; }
.dc-msg.warn { border-color: var(--caution-soft); background: var(--caution-soft); }
.dc-msg-tag { font-size: 11.5px; font-weight: 700; color: var(--text-3); }
.dc-msg .dc-go { height: 46px; font-size: 15px; text-decoration: none; }
.dc-open { margin: 14px 0 4px; font-size: 26px; font-weight: 800; letter-spacing: -0.04em; color: var(--accent); }
.dc-check { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.dc-check li { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: 14px; line-height: 1.55; word-break: keep-all; }
.dc-check li b { display: block; color: var(--text); }
.dc-check li span { font-size: 13px; color: var(--text-2); }

/* 고른 파일 · 남은 횟수 */
.dc-file { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 12px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: 14px; }
.dc-file[hidden] { display: none; }
.dc-file b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-file span { font-size: 12.5px; color: var(--text-3); }
.dc-quota { margin-top: 8px; text-align: center; font-size: 12.5px; color: var(--text-3); }

/* 기다림 */
.dc-wait-head { padding: 18px 0 8px; text-align: center; }
.dc-spin { width: 46px; height: 46px; margin: 0 auto 14px; border: 4px solid var(--accent-soft); border-top-color: var(--accent); border-radius: 999px; animation: dc-spin 1s linear infinite; }
@keyframes dc-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .dc-spin { animation-duration: 3s; } }
.dc-wait-head h1 { font-size: 22px; font-weight: 800; letter-spacing: -0.04em; }
.dc-wait-head p { margin-top: 6px; font-size: 14px; color: var(--text-2); }
.dc-bar { height: 8px; margin: 18px 0 6px; overflow: hidden; border-radius: 999px; background: var(--surface-2); }
.dc-bar i { display: block; height: 100%; border-radius: 999px; background: var(--accent); transition: width 0.4s var(--ease); }
.dc-bar-meta { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--text-3); }
.dc-steps { display: grid; gap: 2px; margin: 18px 0 0; padding: 0; list-style: none; }
.dc-steps li { display: flex; align-items: center; gap: 12px; padding: 12px 4px; font-size: 15px; color: var(--text-3); }
.dc-steps li + li { border-top: 1px solid var(--line); }
.dc-steps .mark {
  flex: none; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--line-strong); border-radius: 999px; font-size: 12px; font-weight: 800;
}
.dc-steps .done { color: var(--text-2); }
.dc-steps .done .mark { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.dc-steps .now { color: var(--text); font-weight: 700; }
.dc-steps .now .mark { border-color: var(--accent); color: var(--accent); }
.dc-steps small { margin-left: auto; font-size: 12.5px; font-weight: 400; color: var(--text-3); }
.dc-calm { margin-top: 18px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--accent-soft); font-size: 13.5px; line-height: 1.6; color: var(--text); word-break: keep-all; }

/* 결과: 등급 상자는 강조색이 아니라 상태 색으로 칠한다 (강조색이 바뀌어도 등급 뜻은 같게) */
.dc-grade { margin-top: 4px; padding: 20px 18px; border: 1px solid transparent; border-radius: var(--radius); }
.dc-grade.safe { background: var(--good-soft); border-color: color-mix(in srgb, var(--good) 30%, transparent); }
.dc-grade.caution { background: var(--caution-soft); border-color: color-mix(in srgb, var(--caution) 30%, transparent); }
.dc-grade.danger { background: var(--critical-soft); border-color: color-mix(in srgb, var(--critical) 30%, transparent); }
.dc-grade-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.dc-grade-label { font-size: 13px; font-weight: 700; color: var(--text-2); }
.dc-grade-value { font-size: 30px; font-weight: 800; letter-spacing: -0.04em; line-height: 1.1; }
.safe .dc-grade-value { color: var(--good); }
.caution .dc-grade-value { color: var(--caution); }
.danger .dc-grade-value { color: var(--critical); }
.dc-grade-count { display: flex; gap: 6px; margin-left: auto; font-size: 12.5px; font-weight: 700; }
.dc-grade p { margin-top: 12px; font-size: 15px; line-height: 1.65; word-break: keep-all; }
.dc-grade small { display: block; margin-top: 10px; font-size: 12px; color: var(--text-2); }

.dc-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.dc-pill::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.dc-pill.good { background: var(--good-soft); color: var(--good); }
.dc-pill.caution { background: var(--caution-soft); color: var(--caution); }
.dc-pill.danger { background: var(--critical-soft); color: var(--critical); }

.dc-kv { display: grid; grid-template-columns: 76px 1fr; gap: 8px 12px; margin: 0; font-size: 14px; }
.dc-kv dt { color: var(--text-3); }
.dc-kv dd { margin: 0; word-break: keep-all; }
.dc-owner summary { cursor: pointer; list-style: none; }
.dc-owner summary::-webkit-details-marker { display: none; }
.dc-owner summary span { margin-left: 4px; padding: 1px 8px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 12px; color: var(--text-2); }
.dc-owner[open] summary { display: none; }

.dc-cat { margin-top: 6px; }
.dc-cat + .dc-cat { margin-top: 14px; }
.dc-cat h3 { margin: 0 0 4px; font-size: 12.5px; font-weight: 700; color: var(--text-3); }
.dc-row { border-top: 1px solid var(--line); }
.dc-row:last-child { border-bottom: 1px solid var(--line); }
.dc-row summary { display: flex; align-items: center; gap: 10px; padding: 12px 2px; font-size: 14.5px; font-weight: 600; list-style: none; cursor: pointer; }
.dc-row summary::-webkit-details-marker { display: none; }
.dc-row summary .t { flex: 1; min-width: 0; word-break: keep-all; }
.dc-row summary .chev { flex: none; color: var(--text-3); transition: transform 0.15s var(--ease); }
.dc-row[open] summary .chev { transform: rotate(180deg); }
.dc-row .body { padding: 0 2px 14px; font-size: 14px; line-height: 1.65; color: var(--text-2); word-break: keep-all; }
.dc-row .body p + p { margin-top: 6px; }
.dc-row .body b { color: var(--text); }
.dc-row .dc-long { font-size: 12.5px; color: var(--text-3); }

.dc-todo { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.dc-todo li { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: start; }
.dc-todo .p { margin-top: 1px; padding: 2px 7px; border-radius: 6px; font-size: 11.5px; font-weight: 800; }
.dc-todo .p.must { background: var(--accent); color: var(--on-accent); }
.dc-todo .p.should { background: var(--accent-soft); color: var(--accent); }
.dc-todo .p.note { background: var(--surface-2); color: var(--text-2); }
.dc-todo b { font-size: 14.5px; }
.dc-todo p { grid-column: 2; font-size: 13.5px; line-height: 1.6; color: var(--text-2); word-break: keep-all; }

.dc-ref summary { padding: 4px 0; font-size: 14px; font-weight: 600; cursor: pointer; }
.dc-ref ul { margin: 0; padding: 0; list-style: none; }
.dc-ref li { margin-top: 10px; font-size: 13.5px; line-height: 1.6; color: var(--text-2); word-break: keep-all; }
.dc-ref li b { color: var(--text); }

.dc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 20px; }
.dc-actions a, .dc-actions button {
  display: flex; height: 48px; align-items: center; justify-content: center; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font-family: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
}
.dc-actions a.primary { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }

/* 인쇄: 결과만 (머리글·띠·버튼 빼고) */
@media print {
  [data-brand="deed"] .hub-bar, [data-brand="deed"] .site-header, [data-brand="deed"] .dc-actions, [data-brand="deed"] .site-footer { display: none; }
}

/* 응급실·약국 넓은 화면 (2026-11-22, 시안 docs/design/2026-11-17-wide/medical-region.html·medical-detail.html): 두 서비스 같은 틀.
   지역 목록: 왼쪽 고정 칸(.md-side: 내 위치·119/안내·거르기 세로 목록) + 오른쪽 카드 2칸(.md-body). 묶음에 1곳뿐이면 카드를 넓게 가로로.
   상세: 왼쪽 연락처·안내 + 오른쪽 큰 지도(.md-map, 고정). 지도는 카카오 정적 지도라 끌거나 확대할 수 없다.
   지도는 HTML 에서 연락처 카드 바로 다음에 있어 휴대폰에선 카드 아래에 붙어 보인다 (그 전엔 카드 안 주소 아래). 그 밖의 휴대폰 화면은 그대로 */
@media screen and (min-width: 960px) {
  .md-cols { display: grid; grid-template-columns: 300px minmax(0, 1fr); column-gap: 40px; align-items: start; }
  .md-side { position: sticky; top: 84px; display: grid; gap: 16px; }
  .md-side > * { margin: 0; }
  .md-side .callout-119row { flex-direction: column; align-items: stretch; gap: 10px; }
  .md-side .callout-119 { justify-content: center; }
  .md-side .filter-chips { flex-direction: column; gap: 1px; overflow: visible; padding: 0; }
  .md-side .fchip { justify-content: space-between; align-items: center; width: 100%; padding: 8px 10px; border: 0; border-radius: var(--radius-sm); background: transparent; font-size: 14.5px; color: var(--text); }
  .md-side .fchip:hover { background: var(--surface-2); color: var(--text); }
  .md-side .fchip.on { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
  .md-side .fchip.zero:not(.on) { color: var(--text-3); }
  .md-side .fchip .n { color: var(--text-3); opacity: 1; }

  .md-body section.group { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 28px; }
  .md-body section.group > :not(.row) { grid-column: 1 / -1; margin-bottom: 0; }
  .md-body section.group > .row { flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 12px; margin: 0; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
  .md-body section.group > .row .call { justify-content: center; height: 46px; font-size: 15px; }
  /* 묶음에 1곳뿐이면 두 칸을 다 써서 가로로 (예: 권역응급의료센터 1곳) */
  .md-body section.group > .row:only-of-type { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .md-body section.group > .row:only-of-type .call { min-width: 200px; }
  /* 검색 화면: 왼쪽에 검색 칸, 오른쪽 결과. 결과 목록(지역·병원/약국 이름)은 두 칸 */
  .md-side .search { margin: 0; }
  .md-body > .muted-text:first-child { margin-top: 0; }
  .md-body .panel .result-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; }
  .md-body .near-note { margin: 0 0 12px; }
  .md-body > .locate { margin-top: 16px; }

  .md-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 440px); column-gap: 40px; align-items: start; }
  .md-detail > * { grid-column: 1; min-width: 0; }
  .md-detail > .md-map { grid-column: 2; grid-row: 1 / span 30; position: sticky; top: 84px; width: 100%; aspect-ratio: auto; height: calc(100vh - 160px); min-height: 420px; max-height: 640px; margin: 0; border-radius: var(--radius); }
}
/* 첫 화면 (2026-11-22, 시안 medical-home.html·pharmacy-home.html): 왼쪽 고정 칸(.mh-side: 안내·내 위치·진료과·검색, 약국은 그것이 든 카드)
   + 오른쪽 시도 두 칸(.mh-main). 시도 펼치기는 그대로(한 칸이 펼쳐지면 그 줄만 길어짐) */
@media screen and (min-width: 960px) {
  .mh-cols { display: grid; grid-template-columns: 380px minmax(0, 1fr); column-gap: 40px; align-items: start; }
  .mh-side { position: sticky; top: 84px; display: grid; gap: 20px; }
  .mh-side > * { margin: 0; }
  .mh-side .callout-119row { flex-direction: column; align-items: stretch; gap: 10px; }
  .mh-side .callout-119 { justify-content: center; }
  .mh-side .dept-cards { grid-template-columns: 1fr 1fr; }
  .mh-main > .section-title { margin-top: 0; }
  .mh-main .sido-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; align-items: start; border: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: visible; }
  .mh-main .sido { border-top: 1px solid var(--line); }
  .mh-main .sido:nth-child(2) { border-top: 0; }
  [data-brand="er"] .mh-main .sido-list { border-top: 1.5px solid var(--ink); }
  [data-brand="pharmacy"] .mh-side .home-card { margin: 0; }
}
.md-detail > .md-map { margin: -2px 0 14px; } /* 휴대폰: 연락처 카드 바로 아래 */
@media screen and (min-width: 960px) { .md-detail > .md-map { margin: 0; } }

.conv-kinds, .conv-at-wide { display: none; }
/* 파일 변환 넓은 화면 (2026-11-18, 시안 docs/design/2026-11-17-wide/convert-home.html·convert-tool.html): 960px 이상에서
   첫 화면: 왼쪽 도구 목록(작은 카드) 1 : 오른쪽 "파일 고르기"(.conv-hub-side, 고정) 2 — 도구가 늘 예정이라 2026-11-18 사용자 결정.
   왼쪽 분류 바로 가기 사이드(같은 날)는 "글자만 딸랑"이라 이것으로 바꿈. HTML 은 고르기 칸이 먼저라 휴대폰 순서는 그대로.
   도구 화면: 파일을 고른 뒤(.conv-body) 왼쪽 작업(.conv-main: 목록·쪽) + 오른쪽 옵션·만들기 단추(.conv-side, 따라옴).
   고르기 칸(.conv-drop)은 두 칸 위에 틀 폭 전체. 휴대폰은 지금 그대로 */
@media screen and (min-width: 960px) {
  .conv-hub { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(0, 2fr); grid-template-areas: "main side"; column-gap: 32px; align-items: start; }
  .conv-hub-side { grid-area: side; position: sticky; top: 84px; }
  .conv-hub > .conv-groups { grid-area: main; }
  .conv-hub-side .conv-pick { margin: 0; }
  .conv-hub-side .conv-drop { min-height: 320px; justify-content: center; gap: 14px; padding: 36px 40px; border-width: 2px; }
  .conv-hub-side .conv-drop:hover { border-color: var(--accent); }
  .conv-hub-side .conv-drop-icon { width: 64px; height: 64px; }
  .conv-hub-side .conv-drop-icon svg { width: 28px; height: 28px; }
  .conv-hub-side .conv-drop-title { font-size: 24px; }
  .conv-hub-side .conv-drop-sub { max-width: 30em; font-size: 15.5px; line-height: 1.6; }
  .conv-at-wide { display: inline; }
  .conv-at-narrow { display: none; }
  .conv-kinds { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 14px 2px 0; padding: 0; list-style: none; font-size: 13.5px; color: var(--text-2); }
  .conv-kinds b { margin-right: 6px; color: var(--text); }

  /* 작은 도구 카드: 아이콘·이름·한 줄 설명. "이럴 때" 줄은 넓은 화면에서 숨김 (좁은 칸에서 서너 줄로 꺾여서) */
  .conv-hub .conv-group { margin-top: 24px; }
  .conv-hub .conv-group:first-child { margin-top: 0; }
  .conv-hub .conv-group .section-title { margin-bottom: 8px; font-size: 15px; color: var(--text-2); }
  .conv-hub .conv-tools { gap: 8px; }
  .conv-hub .conv-tool { gap: 12px; padding: 12px; }
  .conv-hub .conv-tool.is-match { padding: 11px; }
  .conv-hub .conv-tool-icon { width: 48px; height: 40px; border-radius: 10px; }
  .conv-hub .conv-tool-icon svg { width: 34px; height: 24px; }
  .conv-hub .conv-tool-title { font-size: 15.5px; }
  .conv-hub .conv-tool-desc { font-size: 13px; color: var(--text-2); }
  .conv-hub .conv-tool-when { display: none; }

  .conv-body:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1fr) 340px; column-gap: 40px; align-items: start; }
  .conv-side { position: sticky; top: 84px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
  .conv-side > :first-child { margin-top: 0; }
  .conv-side .conv-go { width: 100%; }
  .conv-main .conv-list { margin-bottom: 0; }
}

/* 등기부 올리기 넓은 화면 (2026-11-18, 시안 docs/design/2026-11-17-wide/deed-upload.html): 960px 이상에서
   왼쪽 올리기 640px(제목 크게, 끌어다 놓는 칸 크게) + 오른쪽 360px(결과 예시 · 살펴보는 11가지 · 받는 법).
   외부 전송 안내(.dc-privacy)는 2026-11-11 결정대로 버튼 바로 아래. 오른쪽 칸은 화면보다 길어 고정하지 않는다.
   .dc-up-wide 는 넓은 화면에만, .dc-up-narrow 는 휴대폰에만 (span·section 모두 쓰므로 display 는 revert) */
.dc-up-wide, .dc-up-kicker { display: none; }
@media screen and (min-width: 960px) {
  .dc-up { display: grid; grid-template-columns: minmax(0, 1fr) 360px; column-gap: 56px; align-items: start; }
  .dc-up-main { max-width: 640px; }
  .dc-up-side > :first-child { margin-top: 0; }
  .dc-up-wide { display: revert; }
  .dc-up-narrow { display: none; }
  .dc-up + .dc-legal { max-width: 640px; }

  .dc-up .page-head { margin: 8px 0 28px; }
  .dc-up-kicker { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 700; color: var(--accent); }
  [data-brand="deed"] .dc-up .page-title { font-size: 38px; line-height: 1.25; letter-spacing: -0.045em; }
  .dc-up .page-head .dc-lead { margin-top: 12px; font-size: 17px; }

  .dc-up .dc-box { padding: 24px; }
  .dc-up .dc-seg span { min-height: 56px; font-size: 15.5px; }
  .dc-up .dc-drop { gap: 10px; padding: 52px 24px; border-width: 2px; transition: background 0.15s var(--ease), border-color 0.15s var(--ease); }
  .dc-up .dc-drop:hover, .dc-up .dc-drop.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
  .dc-up .dc-drop-icon { width: 56px; height: 56px; }
  .dc-up .dc-drop b { font-size: 17px; }
  .dc-up .dc-go { height: 58px; font-size: 17px; }

  /* 결과 예시: 실제 등급 카드 모양 그대로 + 오른쪽 위 "예시" 띠 (내 결과로 오해하지 않게) */
  .dc-up-sample { margin-bottom: 20px; }
  .dc-up-tag { margin: 0 2px 8px; font-size: 12.5px; font-weight: 700; color: var(--text-3); }
  .dc-up-sample .dc-grade { position: relative; margin: 0; }
  .dc-up-ex { position: absolute; top: 12px; right: 12px; padding: 2px 9px; border-radius: 999px; background: var(--surface); color: var(--text-2); font-size: 12px; font-weight: 800; box-shadow: 0 0 0 1px var(--line); }
  .dc-up-sample .dc-grade-value { font-size: 28px; }
  .dc-up-sample .dc-grade-count { margin-left: 0; width: 100%; }
  .dc-up-sample .dc-grade p { font-size: 14px; }

  .dc-up-side .dc-items { grid-template-columns: 1fr; gap: 7px; }
  .dc-up-how { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 14px; line-height: 1.6; color: var(--text-2); }
  .dc-up-how b { color: var(--text); }
}

/* 등기부 넓은 화면 (2026-11-17, 시안 docs/design/2026-11-17-wide/deed-result.html): 결과 화면만 960px 이상에서
   왼쪽 결론(.dc-cols-side: 등급·이 집·바로 가기·버튼) + 오른쪽 항목(.dc-cols-body, 680px).
   왼쪽 칸 전체를 고정하면 화면보다 길어 아래가 안 보이므로, 칸은 본문 높이로 늘이고 아래 묶음(.dc-stick)만 따라오게.
   버튼은 넓은 화면용·휴대폰용 한 벌씩(.dc-only-wide / .dc-only-narrow). 인쇄는 screen 이 아니라서 가로 용지로 뽑아도 휴대폰 배치로 나온다 */
.dc-toc { display: none; }
@media not screen, (max-width: 959px) { .dc-only-wide { display: none; } }
@media screen and (min-width: 960px) {
  .dc-only-narrow { display: none; }
  .dc-cols { display: grid; grid-template-columns: 360px minmax(0, 1fr); column-gap: 56px; align-items: start; }
  .dc-cols-side { align-self: stretch; }
  .dc-cols-body { max-width: 680px; }
  .dc-cols-body > .dc-box:first-child { margin-top: 0; }
  .dc-stick { position: sticky; top: 84px; }
  .dc-cols .page-head { margin-bottom: 16px; }
  .dc-cols .page-title { font-size: 28px; }
  .dc-cols-side .dc-grade { padding: 22px 20px; }
  .dc-cols-side .dc-grade-value { font-size: 40px; }
  .dc-cols-side .dc-grade-count { margin-left: 0; width: 100%; }
  .dc-cols-side .dc-grade p { font-size: 14.5px; }
  .dc-cols-side .dc-actions { margin-top: 16px; }

  /* 항목 묶음 바로 가기: 묶음 이름 + 항목마다 결과 색 점 */
  .dc-toc { display: block; margin-top: 16px; padding: 6px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
  .dc-toc a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; }
  .dc-toc a:hover { background: var(--surface-2); }
  .dc-toc .dots { margin-left: auto; display: inline-flex; gap: 3px; }
  .dc-toc .dots i { width: 8px; height: 8px; border-radius: 999px; background: var(--good); }
  .dc-toc .dots i.caution { background: var(--caution); }
  .dc-toc .dots i.danger { background: var(--critical); }

  .dc-cols .dc-cat, .dc-cols #dc-todo { scroll-margin-top: 84px; }
  .dc-cols .dc-row summary { padding: 14px 4px; font-size: 15px; }
  .dc-cols .dc-todo { grid-template-columns: 1fr 1fr; gap: 12px; }
  .dc-cols .dc-todo li { padding: 14px; border-radius: var(--radius-sm); background: var(--surface-2); }
}

/* ---------- 공공주택 공고 (data-brand="housing", 2026-11-13): 모양 "게시판" ----------
   공고 줄을 촘촘하게(왼쪽 D-day 칸 + 제목 두 줄까지), 모서리는 조금 작게. 휴대폰 한 손: 탭·칩은 위, 저장 버튼은 줄 오른쪽 끝.
   hs-* 는 공공주택 공고에만 있는 부분이다 */
:root[data-brand="housing"] { --radius: 12px; --radius-sm: 8px; }
[data-brand="housing"] .brand-mark { color: var(--hs-navy); }
[data-brand="housing"] .brand-mark path { stroke: var(--hs-navy-on); }
[data-brand="housing"] .hs-find .btn.primary { background: var(--hs-navy); border-color: var(--hs-navy); color: var(--hs-navy-on); } /* 검색 버튼은 남색 (기획) */
.hs-lead { margin-top: 8px; color: var(--text-2); font-size: 15px; }
.hs-tabs { display: flex; gap: 4px; margin: 0 0 16px; padding: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; }
.hs-tabs a { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 40px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.hs-tabs a[aria-current="page"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.hs-saved-n { min-width: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 11px; line-height: 18px; text-align: center; }
.hs-filters { margin-bottom: 8px; }
.hs-filter { margin-bottom: 12px; }
.hs-filter .filter-label { margin-bottom: 6px; }
.hs-filter.first .fchip { padding: 9px 14px; font-size: 14px; }
.hs-count { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 4px 2px 10px; font-size: 14px; color: var(--text-2); }
.hs-count b { color: var(--text); font-size: 16px; }
.hs-count a { color: var(--accent); font-weight: 600; }
.hs-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.hs-item { display: flex; align-items: stretch; border-top: 1px solid var(--line); }
.hs-item:first-child { border-top: 0; }
.hs-item-link { flex: 1; min-width: 0; display: flex; gap: 14px; padding: 14px 4px 14px 14px; }
.hs-item-link:hover { background: var(--surface-2); }
.hs-item-link:hover .hs-item-name { color: var(--accent); }
.hs-dday { flex: none; align-self: flex-start; width: 56px; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px 0; border-radius: var(--radius-sm); background: var(--surface-2); text-align: center; }
.hs-dday b { font-size: 16px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.hs-dday small { font-size: 11px; color: var(--text-3); line-height: 1.2; }
.hs-item.open .hs-dday { background: var(--accent-soft); color: var(--accent); }
.hs-item.soon .hs-dday { background: var(--critical-soft); color: var(--critical); }
.hs-item.upcoming .hs-dday b { color: var(--text-2); }
.hs-item.closed { opacity: 0.6; }
.hs-item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.hs-item-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.hs-tag { padding: 1px 7px; border-radius: 6px; background: var(--surface-2); color: var(--text-2); font-size: 11.5px; font-weight: 600; line-height: 18px; }
.hs-tag.type { background: var(--accent-soft); color: var(--accent); }
.hs-tag.fix { background: var(--caution-soft); color: var(--caution); }
.hs-item-name { font-weight: 700; line-height: 1.4; letter-spacing: -0.02em; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.hs-item-sub { font-size: 13px; color: var(--text-2); line-height: 1.45; }
.hs-item-money { font-size: 13px; color: var(--text-3); }
.hs-save { flex: none; width: 48px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; color: var(--text-3); cursor: pointer; }
.hs-save[hidden] { display: none; }
.hs-save:hover { color: var(--accent); }
.hs-save[aria-pressed="true"] { color: var(--accent); }
.hs-save[aria-pressed="true"] svg path { fill: currentColor; }
/* 캘린더: 7칸이 휴대폰 폭에 들어가게 (가로 스크롤 없음) */
.hs-cal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 10px 10px; }
.hs-cal-head { display: flex; align-items: center; justify-content: space-between; }
.hs-cal-head h2 { font-size: 17px; font-weight: 800; letter-spacing: -0.03em; }
.hs-cal-head a { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; color: var(--text-2); }
.hs-cal-head a:hover { background: var(--surface-2); color: var(--text); }
.hs-cal-legend { margin: 2px 4px 8px; font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.hs-cal-legend .dot { width: 8px; height: 8px; border-radius: 999px; display: inline-block; }
.hs-cal-legend .dot.end { margin-left: 8px; }
.dot.start, .cnt.start { background: var(--accent); color: var(--on-accent); }
.dot.end, .cnt.end { background: var(--text-2); color: var(--surface); }
.hs-cal-grid { width: 100%; table-layout: fixed; border-collapse: collapse; }
.hs-cal-grid th { padding: 4px 0; font-size: 12px; font-weight: 600; color: var(--text-3); }
.hs-cal-grid th.sun, .hs-cal-grid td.sun .num { color: var(--critical); }
.hs-cal-grid td { padding: 2px; vertical-align: top; }
.hs-cal-grid td a { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 56px; padding: 4px 0; border-radius: var(--radius-sm); }
.hs-cal-grid td a:hover { background: var(--surface-2); }
.hs-cal-grid td.out a { opacity: 0.4; }
.hs-cal-grid td.today .num { background: var(--text); color: var(--surface); border-radius: 999px; }
.hs-cal-grid td.sel a { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); }
.hs-cal-grid .num { min-width: 24px; line-height: 24px; text-align: center; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.hs-cal-grid .cnt { min-width: 20px; padding: 0 4px; border-radius: 999px; font-size: 11px; font-weight: 700; line-height: 16px; text-align: center; }
.hs-day { margin-top: 24px; scroll-margin-top: 72px; }
.hs-day-title { margin: 16px 2px 8px; font-size: 14px; font-weight: 700; color: var(--text-2); }
.hs-day-title .n { color: var(--accent); }
/* 상세 */
.hs-msg { margin-bottom: 16px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--caution-soft); color: var(--text); font-size: 14px; }
.hs-msg a { color: var(--accent); font-weight: 700; }
.hs-detail-title { margin-top: 10px; font-size: 22px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.35; }
.hs-raw { margin-top: 6px; font-size: 13px; color: var(--text-3); }
.hs-detail-actions { margin-top: 6px; display: flex; justify-content: flex-end; }
.hs-detail-actions .hs-save { width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
.hs-links { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 24px; }
.hs-links .btn { justify-content: center; text-align: center; }
.hs-links .btn:only-child { grid-column: 1 / -1; }
.hs-houses { margin-top: 28px; }
.hs-house-addr { font-size: 14px; color: var(--text-2); }
.hs-house-sub { font-size: 13px; color: var(--text-3); }
.hs-house-sub:empty { display: none; }
.hs-map { align-self: flex-start; margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--accent); }
.hs-chain { margin-top: 28px; }
.hs-chain ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; }
.hs-chain li .muted { margin-right: 6px; font-size: 13px; color: var(--text-3); }
.hs-chain li.cur { font-weight: 700; }
.hs-chain a { color: var(--accent); }
.hs-contact { margin-top: 20px; font-size: 14px; color: var(--text-2); }

/* 상세 화면 개편 (2026-11-24, 시안 docs/design/2026-11-23-housing-redesign/detail.html): 상태 이름표, 핵심 숫자 줄, 신청 전 확인, 일정 단계, 공급 주택 표, 유의사항 */
.hs-tag.st { background: var(--accent); color: var(--on-accent); }
.hs-tag.st.soon { background: var(--critical); color: #fff; }
.hs-tag.st.upcoming { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
.hs-tag.st.closed, .hs-tag.st.unknown { background: var(--surface-2); color: var(--text-2); }
.hs-dsub { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 6px; font-size: 14px; color: var(--text-2); }
.hs-dsub span + span::before { content: "|"; margin-right: 12px; color: var(--line-strong); }
.hs-keybar { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 14px; padding: 6px 16px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); align-items: center; }
.hs-kv { min-width: 0; padding: 12px 0 0; }
.hs-kv:nth-child(n + 3) { border-top: 1px solid var(--line); margin-top: 10px; }
.hs-kv small { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-3); }
.hs-kv small em { font-style: normal; font-weight: 500; }
.hs-kv b { display: block; margin-top: 2px; font-size: 18px; font-weight: 800; letter-spacing: -0.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.hs-kv b.na { font-size: 14.5px; font-weight: 600; color: var(--text-3); }
.hs-kv.dl span { display: block; font-size: 13px; font-weight: 700; color: var(--accent); }
.hs-keybar.soon .hs-kv.dl b, .hs-keybar.soon .hs-kv.dl span { color: var(--critical); }
.hs-keybar.upcoming .hs-kv.dl span { color: var(--text-2); }
.hs-keybar.closed .hs-kv.dl span { color: var(--text-3); }
.hs-kb-cta { grid-column: 1 / -1; margin-top: 16px; justify-content: center; }
.hs-alert { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; align-items: start; margin-top: 20px; padding: 14px 16px; border-radius: var(--radius); background: var(--critical-soft); }
.hs-alert-ic { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--critical); color: #fff; font-weight: 800; font-size: 17px; }
.hs-alert b { display: block; font-size: 16px; color: var(--critical); }
.hs-alert ul { margin: 4px 0 0; padding-left: 18px; font-size: 14px; color: var(--text-2); display: grid; gap: 2px; }
.hs-sched { margin-top: 28px; }
.hs-steps { list-style: none; margin: 0; padding: 18px 16px; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.hs-steps li { position: relative; text-align: center; font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.hs-steps li::before { content: ""; position: absolute; top: 11px; left: -50%; width: 100%; height: 2px; background: var(--line-strong); }
.hs-steps li:first-child::before { display: none; }
.hs-steps li.done::before, .hs-steps li.cur::before { background: var(--accent); }
.hs-steps i { position: relative; display: block; width: 24px; height: 24px; margin: 0 auto 8px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-strong); }
.hs-steps li.done i { background: var(--accent); border-color: var(--accent); }
.hs-steps li.done i::after { content: ""; position: absolute; left: 7px; top: 3px; width: 6px; height: 11px; border: solid var(--on-accent); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.hs-steps li.cur i { border: 3px solid var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hs-steps b { display: block; font-size: 14px; color: var(--text); }
.hs-steps li.cur b { color: var(--accent); }
.hs-steps li span { display: block; margin-top: 2px; padding: 0 4px; }
.hs-sched .muted-text { margin-top: 8px; }
.hs-houses .section-title small { margin-left: 6px; font-size: 13px; font-weight: 500; color: var(--text-3); }
.hs-htable-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.hs-htable { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.hs-htable th, .hs-htable td { padding: 10px 8px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); white-space: nowrap; }
.hs-htable th:first-child, .hs-htable td:first-child { padding-left: 12px; white-space: normal; min-width: 110px; }
@media (min-width: 960px) { .hs-htable th, .hs-htable td { padding: 11px 14px; } .hs-htable td:first-child { min-width: 200px; } }
.hs-htable thead th { border-top: 0; font-size: 12.5px; font-weight: 600; color: var(--text-3); background: var(--surface-2); }
.hs-htable td b { display: block; }
.hs-htable .hs-house-addr { display: block; font-size: 13px; }
.hs-htable .hs-map { display: inline-block; margin-top: 2px; }
.hs-htable .muted { color: var(--text-3); }
.hs-tip { margin-top: 16px; padding: 16px 18px; border-radius: var(--radius); background: var(--accent-soft); border: 1px solid var(--accent-line); }
.hs-tip b { color: var(--accent); font-size: 14.5px; }
.hs-tip ul { margin: 6px 0 0; padding-left: 18px; font-size: 13.5px; color: var(--text-2); display: grid; gap: 3px; }

/* 메인(목록 첫 화면) 개편 (2026-11-24, 시안 docs/design/2026-11-23-housing-redesign/home.html): 큰 머리(제목 + 숫자 칸) → 검색 카드(큰 검색 + 빠른 찾기 칩).
   거르기·검색을 하면 머리를 접는다(.compact). 시안의 건물 그림 자리는 숫자 칸 */
.hs-hero { display: grid; gap: 16px; margin: 4px 0 16px; padding: 22px 18px; border-radius: var(--radius); background: linear-gradient(160deg, var(--accent-soft), var(--surface-2)); border: 1px solid var(--accent-line); }
.hs-hero .page-title { font-size: 27px; line-height: 1.28; letter-spacing: -0.045em; }
.hs-hero .page-title em { font-style: normal; background: linear-gradient(transparent 62%, var(--accent-line) 62%); }
.hs-hero .hs-lead { margin-top: 10px; }
.hs-hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.hs-hero-stats div { padding: 10px 14px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); }
.hs-hero-stats dt { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.hs-hero-stats dd { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.3; }
.hs-hero-stats dd small { margin-left: 2px; font-size: 13px; font-weight: 500; color: var(--text-3); }
.hs-hero-stats .red { background: var(--critical-soft); border-color: transparent; }
.hs-hero-stats .red dd { color: var(--critical); }
@media (max-width: 959px) { /* 휴대폰: 숫자 칸 4개를 한 줄로 (머리가 첫 화면을 다 차지하지 않게) */
  .hs-hero { gap: 14px; padding: 18px 16px; }
  .hs-hero .page-title { font-size: 24px; }
  .hs-hero .hs-lead { margin-top: 8px; font-size: 14px; }
  .hs-hero-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .hs-hero-stats div { padding: 8px 6px; text-align: center; }
  .hs-hero-stats dt { font-size: 11px; line-height: 1.3; }
  .hs-hero-stats dd { font-size: 19px; }
  .hs-hero-stats dd small { font-size: 11px; }
}
.hs-search-card { margin-bottom: 16px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.hs-search-card .hs-find { margin: 0; }
.hs-search-card.compact { padding: 0; background: none; border: 0; box-shadow: none; }
.hs-search-card.compact .hs-find { margin: 2px 0 16px; }
.hs-quick { display: flex; gap: 8px; margin: 12px -14px 0; padding: 0 14px 2px; overflow-x: auto; scrollbar-width: none; }
.hs-quick::-webkit-scrollbar { display: none; }
.hs-quick .fchip { flex: none; }
.hs-who-note { margin: 0 0 12px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--caution-soft); color: var(--text); font-size: 13.5px; line-height: 1.55; } /* 가구 칩 = 이름 검색 안내 */
.hs-quick-sep { flex: none; width: 1px; margin: 6px 2px; background: var(--line-strong); }
@media (min-width: 960px) {
  .hs-hero { grid-template-columns: minmax(0, 1fr) 380px; align-items: center; gap: 40px; margin-top: 8px; padding: 40px 40px 76px; border-radius: 20px; }
  .hs-hero .page-title { font-size: 40px; }
  .hs-hero .hs-lead { font-size: 16.5px; }
  .hs-hero-stats div { padding: 14px 18px; }
  .hs-hero-stats dd { font-size: 30px; }
  .hs-search-card:not(.compact) { position: relative; margin: -56px 28px 28px; padding: 20px 22px; border-radius: 18px; box-shadow: var(--shadow-pop); }
  .hs-search-card:not(.compact) .hs-find input, .hs-search-card:not(.compact) .hs-find .btn { height: 54px; }
  .hs-search-card:not(.compact) .hs-find input { font-size: 17px; }
  .hs-quick { flex-wrap: wrap; margin: 14px 0 0; padding: 0; overflow: visible; }
}

/* 맞춤 찾기 (2026-11-24, 시안 docs/design/2026-11-23-housing-redesign/find.html): 1~4 고르기 + 요약(htmx 로 숫자만 바뀜).
   라디오는 숨기고 label 모양으로 고른 상태를 보인다(:has). 휴대폰은 요약이 아래에 붙어 따라온다 */
.hs-quick-more { color: var(--accent); border-color: var(--accent-line); }
.hs-find-cols { display: grid; gap: 14px; }
.hs-findform { display: grid; gap: 12px; }
.hs-fq { padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.hs-fq h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -0.03em; }
.hs-fq-n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-size: 13.5px; font-weight: 800; }
.hs-fq-sub { margin: 6px 0 0; font-size: 13px; color: var(--text-3); }
.hs-fq-h3 { margin: 14px 0 8px; font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.hs-fopts.who { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.hs-fopt { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; }
.hs-fopt b { font-size: 15.5px; }
.hs-fopt small { font-size: 12.5px; color: var(--text-3); }
.hs-fopt input, .hs-fchip input { position: absolute; opacity: 0; pointer-events: none; }
.hs-fopt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.hs-fopt:has(input:checked) b { color: var(--accent); }
.hs-fopt:has(input:focus-visible), .hs-fchip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.hs-fopts.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.hs-fq-h3 + .hs-fopts.chips { margin-top: 0; }
.hs-fchip { position: relative; cursor: pointer; }
.hs-fchip span { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); font-size: 14px; font-weight: 600; }
.hs-fchip small { font-size: 12px; font-weight: 500; color: var(--text-3); }
.hs-fchip input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.hs-fsel { width: 100%; height: 48px; margin-top: 12px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; font-size: 15px; }
.hs-fsum { padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.hs-fsum-k { margin: 0; font-size: 14px; font-weight: 600; color: var(--text-2); }
.hs-fsum-n { margin: 2px 0 12px; font-size: 15px; }
.hs-fsum-n b { font-size: 44px; font-weight: 800; letter-spacing: -0.04em; color: var(--accent); font-variant-numeric: tabular-nums; }
.hs-fsum-n small { font-size: 13px; color: var(--text-3); }
.hs-fsum-list { display: grid; gap: 4px; margin: 0 0 14px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: 13.5px; }
.hs-fsum-list div { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 6px; }
.hs-fsum-list dt { color: var(--text-3); }
.hs-fsum-list dd { margin: 0; font-weight: 600; }
.hs-fsum-note { margin: 0 0 12px; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--caution-soft); font-size: 12.5px; }
.hs-fsum-go { width: 100%; height: 52px; }
.hs-fsum-zero { margin: 0; font-size: 14px; color: var(--text-2); }
@media (max-width: 959px) {
  .hs-fsum { position: sticky; bottom: 0; z-index: 5; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; margin: 0 -4px; padding: 12px 16px; border-radius: var(--radius) var(--radius) 0 0; box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.12); }
  .hs-fsum-k, .hs-fsum-list, .hs-fsum-note { display: none; }
  .hs-fsum-n { margin: 0; }
  .hs-fsum-n b { font-size: 28px; }
  .hs-fsum-go { width: auto; height: 46px; padding: 0 16px; }
  .hs-fsum-zero { grid-column: 1 / -1; font-size: 12.5px; }
}
@media (min-width: 960px) {
  .hs-find-cols { grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
  .hs-findform { max-width: 720px; }
  .hs-fsum { position: sticky; top: 84px; }
  .hs-fopts.who { grid-template-columns: repeat(4, 1fr); }
}

/* 기획 반영 1차 (2026-11-23, 시안 docs/design/2026-11-23-housing-plan/): 목록 검색창, 금액 거르기(접힘), 저장 비교표, 달력 파일(.ics) */
.hs-find { display: flex; gap: 8px; margin: 2px 0 16px; }
.hs-find input { flex: 1; min-width: 0; height: 46px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; font-size: 16px; }
.hs-find input::placeholder { color: var(--text-3); }
.hs-find input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.hs-find .btn { flex: none; height: 46px; padding: 0 18px; border-radius: var(--radius-sm); }
.hs-money-more { margin: 0 0 12px; }
.hs-money-more > summary { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 999px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--text); list-style: none; }
.hs-money-more > summary::-webkit-details-marker { display: none; }
.hs-money-more > summary small { font-size: 12.5px; font-weight: 500; color: var(--text-3); }
.hs-money-more[open] > summary { margin-bottom: 12px; border-color: var(--accent-line); background: var(--accent-soft); }
.hs-filter .filter-note { margin: -2px 0 8px; }
.hs-count-links { display: inline-flex; gap: 12px; flex: none; }
.hs-savedbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 12px; }
.hs-viewsw { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--surface-2); }
.hs-viewsw a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.hs-viewsw a[aria-current="page"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.hs-icsbtn { height: 40px; padding: 0 14px; font-size: 14px; border-radius: var(--radius-sm); }
.hs-links .hs-ics, .hs-ics-note { grid-column: 1 / -1; }
.hs-ics-note { margin: 0; font-size: 12.5px; color: var(--text-3); line-height: 1.5; }
.hs-cmp-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.hs-cmp { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
.hs-cmp th, .hs-cmp td { padding: 11px 14px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
.hs-cmp thead th, .hs-cmp thead td { border-top: 0; vertical-align: bottom; }
.hs-cmp th[scope="row"], .hs-cmp thead td { position: sticky; left: 0; z-index: 1; width: 96px; min-width: 96px; background: var(--surface-2); color: var(--text-2); font-weight: 600; font-size: 13px; white-space: nowrap; }
.hs-cmp thead th[scope="col"] { min-width: 170px; font-weight: 400; }
.hs-cmp-name { display: block; margin-top: 4px; font-size: 15px; font-weight: 700; line-height: 1.4; color: var(--text); }
.hs-cmp-dday { display: inline-block; padding: 2px 8px; border-radius: 6px; font-weight: 700; font-size: 13px; background: var(--surface-2); color: var(--text); white-space: nowrap; }
.hs-cmp-dday.soon { background: var(--critical-soft); color: var(--critical); }
.hs-cmp-dday.closed { color: var(--text-3); }
.hs-cmp-low { font-weight: 700; color: var(--accent); }
.hs-cmp-low-tag { margin-left: 4px; font-size: 11.5px; font-weight: 600; }
.hs-cmp .muted { color: var(--text-3); }
.hs-cmp + .muted-text, .hs-cmp-wrap + .muted-text { margin-top: 10px; }
@media (min-width: 960px) {
  .hs-side aside .hs-money-more { margin: 0; padding: 16px 0; border-top: 1px solid var(--line); }
  .hs-side aside .hs-money-more > summary { min-height: 0; margin: 0 10px; padding: 0; border: 0; border-radius: 0; background: none; font-size: 14.5px; }
  .hs-side aside .hs-money-more[open] > summary { margin-bottom: 4px; }
  .hs-side aside .hs-money-more .hs-filter { border-top: 0; padding: 10px 0 0; }
  .hs-side aside .hs-filter .filter-note { margin: -2px 10px 6px; }
}

/* 공공주택 넓은 화면 (2026-11-17, 시안 docs/design/2026-11-17-wide/): 960px 이상에서만 바뀐다. 휴대폰·태블릿 세로는 위 규칙 그대로.
   - 틀 넓히기는 "넓은 화면 공통"([data-wide], 핸들러의 Meta.Wide). 목록·저장·상세·캘린더(2026-11-22)
   - 글 칸은 680px 안팎 그대로, 늘어난 폭은 옆 칸에: 목록은 왼쪽 거르기(.hs-side), 상세는 오른쪽 일정(.hs-main)
   - 휴대폰의 모양을 바꾼다: 가로 칩 → 세로 목록, 알약 탭 → 밑줄 탭, 쌓인 공고 줄 → 열을 맞춘 표 */
.hs-cal-hint { display: none; }
.hs-list-head { display: none; }
.hs-list-head + .hs-item { border-top: 0; }
.hs-item-where + .hs-item-period::before { content: " · "; }
@media (min-width: 960px) {

  .hs-tabs { gap: 4px; margin-bottom: 28px; padding: 0; background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
  .hs-tabs a { flex: none; position: relative; min-height: 44px; padding: 0 14px; border-radius: 0; font-size: 15px; }
  .hs-tabs a:hover { color: var(--text); }
  .hs-tabs a[aria-current="page"] { background: none; box-shadow: none; color: var(--text); }
  .hs-tabs a[aria-current="page"]::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); }

  /* 목록: 왼쪽 거르기 칸. 4묶음이 화면보다 길 수 있어 고정하지 않는다 (안쪽 스크롤 막대가 생김) */
  .hs-side { display: grid; grid-template-columns: 208px minmax(0, 1fr); gap: 40px; align-items: start; }
  .hs-side aside .hs-filters { margin: 0; }
  .hs-side aside .hs-filter { margin: 0; padding: 16px 0; border-top: 1px solid var(--line); }
  .hs-side aside .hs-filter:first-child { border-top: 0; padding-top: 0; }
  .hs-side aside .filter-label { margin: 0 10px 6px; font-size: 12.5px; color: var(--text-3); }
  .hs-side aside .filter-chips { flex-direction: column; gap: 1px; overflow: visible; padding: 0; }
  .hs-side aside .fchip,
  .hs-side aside .hs-filter.first .fchip { justify-content: space-between; align-items: center; width: 100%; padding: 7px 10px; border: 0; border-radius: var(--radius-sm); background: transparent; font-size: 14.5px; color: var(--text); }
  .hs-side aside .fchip:hover { background: var(--surface-2); color: var(--text); }
  .hs-side aside .fchip.on { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
  .hs-side aside .fchip.zero:not(.on) { color: var(--text-3); }
  .hs-side aside .fchip .n { font-size: 12.5px; opacity: 1; color: var(--text-3); }
  .hs-side aside .fchip.on .n { color: var(--accent); }
  .hs-side .hs-count { align-items: center; margin: 0 0 12px; }

  /* 공고 줄 → 표. 열: D-day | 공고(유형·이름·지역) | 접수 기간 | 금액 | 저장(48px).
     지역을 따로 열로 두면 이름 칸이 120px 안팎으로 좁아져 이름 아래 줄에 둔다 */
  .hs-wide .hs-list-head { display: grid; grid-template-columns: 64px minmax(0, 1fr) 196px 164px; column-gap: 20px; padding: 12px 48px 10px 16px; background: var(--surface-2); border-radius: var(--radius) var(--radius) 0 0; font-size: 12.5px; font-weight: 600; color: var(--text-3); }
  .hs-wide .hs-list-head + .hs-item { border-top: 1px solid var(--line); }
  .hs-wide .hs-item { position: relative; display: block; }
  .hs-wide .hs-item-link { display: grid; grid-template-columns: 64px minmax(0, 1fr) 196px 164px; grid-template-areas: "d t p m" "d n p m" "d w p m"; column-gap: 20px; row-gap: 2px; align-items: center; margin-right: 48px; padding: 14px 0 14px 16px; }
  .hs-wide .hs-item .hs-save { position: absolute; top: 0; right: 0; bottom: 0; }
  .hs-wide .hs-item-main, .hs-wide .hs-item-sub { display: contents; }
  .hs-wide .hs-dday { grid-area: d; align-self: center; width: 64px; }
  .hs-wide .hs-item-tags { grid-area: t; }
  .hs-wide .hs-item-name { grid-area: n; font-size: 15.5px; }
  .hs-wide .hs-item-where { grid-area: w; font-size: 13px; color: var(--text-2); }
  .hs-wide .hs-item-period { grid-area: p; font-size: 14px; color: var(--text); font-variant-numeric: tabular-nums; }
  .hs-wide .hs-item-period::before { content: none; }
  .hs-wide .hs-item-money { grid-area: m; font-size: 14px; color: var(--text-2); line-height: 1.45; }
  /* 1200px 아래(태블릿 가로·작은 노트북)는 이름 칸이 좁아져 금액을 이름 아래로 */
}
@media (min-width: 960px) and (max-width: 1199px) {
  .hs-wide .hs-list-head { grid-template-columns: 64px minmax(0, 1fr) 196px; }
  .hs-wide .hs-list-head span:last-child { display: none; }
  .hs-wide .hs-item-link { grid-template-columns: 64px minmax(0, 1fr) 196px; grid-template-areas: "d t p" "d n p" "d w p" "d m p"; }
  .hs-wide .hs-item-money { font-size: 13px; color: var(--text-3); }
}
@media (min-width: 960px) {

  /* 캘린더 (2026-11-22, 시안 housing-calendar.html): 왼쪽 큰 달력(칸 92px, 날짜 왼쪽 위·수는 아래) + 오른쪽 고른 날 공고(400px, 따라옴, 길면 칸 안 스크롤) */
  .hs-cal-cols { display: grid; grid-template-columns: minmax(0, 1fr) 400px; column-gap: 40px; align-items: start; }
  .hs-cal-main .hs-cal { padding: 20px 20px 16px; }
  .hs-cal-main .hs-cal-head h2 { font-size: 20px; }
  .hs-cal-main .hs-cal-grid th { padding: 8px 0; font-size: 13px; }
  .hs-cal-main .hs-cal-grid td { padding: 3px; }
  .hs-cal-main .hs-cal-grid td a { min-height: 92px; align-items: flex-start; justify-content: flex-start; gap: 6px; padding: 8px 10px; border: 1px solid var(--line); }
  .hs-cal-main .hs-cal-grid td.out a { border-color: transparent; }
  .hs-cal-main .hs-cal-grid .num { font-size: 15px; }
  .hs-cal-main .hs-cal-grid .cnt { font-size: 12px; line-height: 20px; padding: 0 8px; }
  .hs-cal-side { position: sticky; top: 84px; max-height: calc(100vh - 104px); overflow-y: auto; padding-right: 4px; }
  .hs-cal-side .hs-day { margin-top: 0; }
  .hs-cal-side .hs-day > .section-title { margin-top: 0; font-size: 18px; }
  .hs-cal-hint { display: block; padding: 24px 20px; border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--text-2); font-size: 14.5px; line-height: 1.6; }

  /* 상세: 왼쪽 제목·본문(680px), 오른쪽 일정·원문 버튼(340px, 따라옴) */
  .hs-main { display: grid; grid-template-columns: minmax(0, 1fr) 320px; grid-template-areas: "head head" "kb kb" "body side"; column-gap: 48px; align-items: start; }
  .hs-main .hs-keybar { grid-area: kb; grid-template-columns: 1.3fr repeat(3, minmax(0, 1fr)) 210px; padding: 20px 24px; margin-top: 20px; }
  .hs-main .hs-kv { padding: 0 20px; border-left: 1px solid var(--line); border-top: 0; }
  .hs-main .hs-kv:first-child { padding-left: 0; border-left: 0; }
  .hs-main .hs-kv b { font-size: 21px; }
  .hs-main .hs-kb-cta { grid-column: auto; margin-top: 0; height: 54px; font-size: 16px; }
  .hs-main-side .hs-links { margin-top: 24px; }
  .hs-main .hs-detail-actions { position: absolute; top: 0; right: 0; margin: 0; }
  .hs-main .hs-main-head { position: relative; padding-right: 60px; }
  .hs-main-head { grid-area: head; }
  .hs-main-body { grid-area: body; max-width: 680px; }
  .hs-main-side { grid-area: side; position: sticky; top: 84px; }
  .hs-main .hs-detail-title { font-size: 30px; }
  .hs-main-side .hs-links { grid-template-columns: 1fr; }
  .hs-main-body > :first-child { margin-top: 24px; }
}
