:root {
  --brand: #0050c8;
  --brand-dark: #01215c;
  --brand-light: #eef3ff;
  --text: #14213d;
  --muted: #4b5563;
  --line: #dbe3f3;
  --fs-h1: 26px; --fs-h2: 22px; --fs-h3: 17px; --fs-body: 16px; --fs-small: 14px;
  --sec-pad: 48px;
  --bar-h: 56px;
}
@media (min-width: 760px) {
  :root { --fs-h1: 34px; --fs-h2: 26px; --fs-h3: 18px; --sec-pad: 72px; }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom));
  font-family: "Pretendard", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  font-size: var(--fs-body);
  background: #fff;
  color: var(--text);
  line-height: 1.6;
  word-break: keep-all;
}
.hero-banner { display: block; width: 100%; height: auto; }
@media (min-width: 760px) {
  .hero-banner { max-width: 960px; margin: 24px auto 0; border-radius: 16px; }
}
/* 칸 */
header, section, footer { padding: var(--sec-pad) max(20px, calc((100% - 960px) / 2)); }
body > section { background: #fff; }
body > section:nth-of-type(even) { background: var(--brand-light); }
h1 { margin: 0 0 16px; color: var(--brand-dark); font-size: var(--fs-h1); font-weight: 800; line-height: 1.3; }
h2 { margin: 0 0 24px; padding-left: 14px; position: relative; color: var(--brand-dark); font-size: var(--fs-h2); font-weight: 700; line-height: 1.35; text-align: left; }
h2::before { content: ""; position: absolute; left: 0; top: .2em; width: 4px; height: 20px; border-radius: 2px; background: var(--brand); }
h2.sub-h2 { margin-top: 48px; }
h3 { margin: 0 0 8px; color: var(--brand-dark); font-size: var(--fs-h3); font-weight: 700; }
p { margin: 0 0 8px; font-size: var(--fs-body); color: var(--muted); }
/* 첫 화면 */
header { background: var(--brand-light); padding: 0 max(20px, calc((100% - 960px) / 2)) var(--sec-pad); }
header .intro {
  position: relative; z-index: 1;
  max-width: 960px; margin: 12px auto 0;
  padding: 32px 20px 24px;
  text-align: center;
  background: #fff;
  border-radius: 20px 20px 16px 16px;
  box-shadow: 0 4px 24px rgba(1, 33, 92, .08);
}
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: nowrap; gap: 6px; justify-content: center; }
.chips li { padding: 6px 10px; font-size: var(--fs-small); white-space: nowrap; color: var(--brand-dark); background: #fff; border: 1px solid #c7d6ff; border-radius: 999px; }
.chips li::before { content: "✓ "; color: var(--brand); font-weight: bold; }
.lead { margin: 24px 0 0; }
.lead strong { display: block; margin-bottom: 8px; color: var(--brand-dark); font-size: 17px; }
.lead span { display: block; font-size: 15px; font-weight: normal; color: var(--muted); }
.m-br { display: inline; }
@media (min-width: 760px) { .m-br { display: none; } }
/* 카드 */
.grid, .cases { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 760px) { .grid { grid-template-columns: 1fr 1fr; } .cases { grid-template-columns: repeat(3, 1fr); } }
.card, details, .price-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(1, 33, 92, .06);
  padding: 20px;
  margin: 0;
}
.card { display: flex; flex-direction: column; }
.card > img { display: block; max-width: 100%; flex: none; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: center; border-radius: 12px; background: #e5e7eb; margin-bottom: 16px; }
.symptoms { margin: 0 0 8px; padding-left: 20px; font-size: var(--fs-small); color: var(--muted); }
.fix { margin: 0; font-size: var(--fs-small); color: var(--brand-dark); }
.note { margin-top: 24px; text-align: center; font-weight: bold; color: var(--brand-dark); }
.note a { color: var(--brand); }
.cases .tag { font-size: var(--fs-small); color: var(--brand); font-weight: bold; margin-bottom: 8px; }
.cases dl { margin: 0; font-size: var(--fs-small); }
.cases dt { font-weight: bold; color: var(--brand-dark); margin-top: 8px; }
.cases dd { margin: 0; color: var(--muted); }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { flex: 1 1 140px; padding: 16px; font: inherit; font-weight: bold; text-align: center; text-decoration: none; color: #fff; background: var(--brand); border: 0; border-radius: 12px; cursor: pointer; }
/* 후기 갤러리 */
.rv { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); gap: 8px; height: 65vh; max-height: 640px; min-height: 360px; margin: 0 0 24px; }
@media (min-width: 760px) { .rv { grid-template-columns: minmax(0, 1fr) 180px; gap: 16px; height: 640px; } }
.rv-view { position: relative; min-height: 0; display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 2px 12px rgba(1, 33, 92, .06); overflow: hidden; touch-action: pan-y; }
.rv-view img { display: block; width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.rv-count { position: absolute; top: 8px; left: 8px; z-index: 1; padding: 4px 12px; font-size: var(--fs-small); font-weight: 700; color: #fff; background: rgba(1, 33, 92, .72); border-radius: 999px; }
.rv-arrow { position: absolute; top: 50%; z-index: 1; width: 32px; height: 32px; margin-top: -16px; padding: 0; display: flex; align-items: center; justify-content: center; font: inherit; font-size: 20px; line-height: 1; color: #fff; background: rgba(1, 33, 92, .6); border: 0; border-radius: 50%; cursor: pointer; }
.rv-prev { left: 6px; }
.rv-next { right: 6px; }
.rv-list { position: relative; display: flex; flex-direction: column; gap: 8px; min-height: 0; padding: 0; overflow-y: auto; overscroll-behavior: contain; }
.rv-list button { flex: none; display: block; width: 100%; padding: 0; border: 3px solid transparent; border-radius: 12px; overflow: hidden; background: #fff; cursor: pointer; box-shadow: 0 0 0 1px var(--line); }
.rv-list button.cur { border-color: var(--brand); }
.rv-list img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; }
/* 가격표 */
.price-card { padding: 0; overflow: hidden; margin: 16px 0; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 16px; text-align: left; font-size: var(--fs-small); border-bottom: 1px solid #edf1fa; }
tbody tr:last-child td { border-bottom: 0; }
th { background: #dfe8ff; color: var(--brand-dark); }
th:last-child, td:last-child { text-align: right; }
td:last-child { white-space: nowrap; font-weight: bold; color: var(--brand-dark); }
/* 진행 순서 */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 0 0 0 56px; font-size: var(--fs-small); color: var(--muted); }
.steps li strong { display: block; margin-bottom: 4px; font-size: var(--fs-body); color: var(--brand-dark); }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; z-index: 1; }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 19px; top: 40px; bottom: -16px; width: 2px; background: #c7d6ff; }
@media (min-width: 760px) {
  .steps { grid-template-columns: repeat(5, 1fr); gap: 16px; }
  .steps li { padding: 56px 0 0; }
  .steps li:not(:last-child)::after { left: 40px; right: -16px; top: 19px; bottom: auto; width: auto; height: 2px; }
}
/* 출장 지역 */
.area { margin: 0 auto; }
.area dt { font-weight: 700; color: var(--brand-dark); margin-top: 16px; }
.area dt:first-child { margin-top: 0; }
.area dd { margin: 8px 0 0; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px; }
.area dd span { padding: 4px 12px; font-size: var(--fs-small); color: var(--brand-dark); background: var(--brand-light); border: 1px solid #c7d6ff; border-radius: 999px; }
.area dd.plain { display: block; }
.area-note { margin-top: 24px; }
/* FAQ */
details { padding: 0; margin-bottom: 8px; }
summary { cursor: pointer; list-style: none; position: relative; padding: 16px 48px 16px 20px; font-weight: 700; color: var(--brand-dark); }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 24px; font-weight: 400; color: var(--brand); line-height: 1; }
details[open] summary::after { content: "−"; }
details p { margin: 0; padding: 0 20px 16px; }
details { interpolate-size: allow-keywords; }
details::details-content { block-size: 0; overflow: hidden; transition: block-size .3s, content-visibility .3s allow-discrete; }
details[open]::details-content { block-size: auto; }
/* 마지막 문의 */
body > section.closing { background: linear-gradient(135deg, var(--brand), var(--brand-dark)); }
.closing h2, .closing p, .closing strong { color: #fff; }
.closing h2::before { background: #fff; }
.closing p { color: rgba(255, 255, 255, .88); }
/* 푸터 */
footer { background: var(--brand-dark); padding: 32px max(20px, calc((100% - 960px) / 2)); font-size: var(--fs-small); }
footer p { margin: 0 0 4px; font-size: var(--fs-small); color: rgba(255, 255, 255, .75); }
footer strong { color: #fff; }
footer a { color: #fff; }
footer .tel a { font-size: 18px; font-weight: 700; text-decoration: none; }
/* 고정 바 */
.callbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; padding-bottom: env(safe-area-inset-bottom); background: var(--brand); font-size: 17px; font-weight: bold; }
.callbar a { flex: 1; height: var(--bar-h); display: flex; align-items: center; justify-content: center; color: #fff; text-decoration: none; }
.callbar a + a { background: var(--brand-dark); }
/* 지역 페이지 (/mapo/) */
.crumb { margin: 0 0 12px; font-size: var(--fs-small); color: var(--muted); }
.crumb a { color: var(--brand); text-decoration: none; }
.sub { margin: 0 0 16px; font-size: var(--fs-h3); font-weight: 700; color: var(--brand-dark); }
.badge { align-self: flex-start; margin-bottom: 8px; padding: 4px 12px; font-size: var(--fs-small); font-weight: 700; color: #fff; background: var(--brand); border-radius: 999px; }
.cases .card.pick { border-color: var(--brand); box-shadow: 0 2px 12px rgba(0, 80, 200, .18); }
.fault-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
@media (min-width: 760px) { .fault-list { grid-template-columns: 1fr 1fr; } }
.fault-list li { padding: 16px 20px; font-weight: 700; color: var(--brand-dark); background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 2px 12px rgba(1, 33, 92, .06); }
.fault-list li::before { content: "🔧 "; }
.fault-note a { color: var(--brand); font-weight: 700; }
.chip-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip-list li { padding: 4px 12px; font-size: var(--fs-small); color: var(--brand-dark); background: var(--brand-light); border: 1px solid #c7d6ff; border-radius: 999px; }
body > section:nth-of-type(even) .chip-list li { background: #fff; }
.area-link { margin: 16px 0 0; }
.area-link a { color: var(--brand); font-weight: 700; text-decoration: none; }
.btns.single .btn { flex: 0 1 280px; }
/* 첫 화면 우리 동네 버튼 줄 */
.town { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.town-title { margin: 0 0 14px; font-size: 16px; font-weight: 700; text-align: center; color: var(--brand-dark); }
.town-btns { display: flex; gap: 10px; }
.town-btns a { flex: 1 1 0; min-width: 0; min-height: 56px; padding: 8px 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-decoration: none; background: #fff; border: 1.5px solid var(--brand); border-radius: 14px; }
.town-btns b { font-size: 16px; font-weight: 700; color: var(--brand-dark); white-space: nowrap; }
.town-btns small { font-size: 12px; color: var(--muted); white-space: nowrap; }
.town-btns a:active { background: var(--brand); }
.town-btns a:active b, .town-btns a:active small { color: #fff; }
