:root {
  --brand: #0050c8;
  --brand-dark: #01215c;
  --brand-light: #eef3ff;
  --kakao: #fee500;
  --text: #14213d;
  --body: #2b3548;
  --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 16px 0 0; }
}
/* 칸 */
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 32px; position: relative; color: var(--brand-dark); font-size: var(--fs-h2); font-weight: 800; line-height: 1.35; letter-spacing: -.01em; text-align: left; }
h2::before { content: ""; display: block; width: 32px; height: 4px; margin-bottom: 14px; border-radius: 2px; background: var(--brand); }
h2.sub-h2 { margin-top: 56px; }
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(--body); }
/* 첫 화면 */
header { background: #fff; padding: 0 max(20px, calc((100% - 960px) / 2)); }
header::after { content: ""; display: block; border-top: 1px solid var(--line); }
header .intro {
  position: relative; z-index: 1;
  max-width: 960px; margin: 0 auto;
  padding: 28px 20px 32px;
  text-align: center;
  background: #fff;
}
/* 모바일: 사진과 이어지게 좌우 끝까지, 아래 구분선은 안쪽 20px */
@media (max-width: 759px) {
  header { padding-left: 0; padding-right: 0; }
  header::after { margin: 0 20px; }
}
.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: 20px 0 0; }
.lead strong { display: block; margin-bottom: 8px; color: var(--brand-dark); font-size: 18px; line-height: 1.45; }
.lead span { display: block; font-size: 15px; font-weight: normal; color: var(--body); }
.intro .chips { margin-top: 20px; }
.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 1px 8px rgba(1, 33, 92, .05);
  padding: 20px;
  margin: 0;
}
@media (hover: hover) {
  .card { transition: transform .2s, box-shadow .2s; }
  .card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(1, 33, 92, .10); }
}
.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: 700; text-align: center; text-decoration: none; color: #fff; background: var(--brand); border: 2px solid var(--brand); border-radius: 12px; box-shadow: 0 4px 14px rgba(0, 80, 200, .28); cursor: pointer; transition: transform .15s, box-shadow .15s; }
.btn:active { transform: translateY(1px); box-shadow: 0 1px 4px rgba(0, 80, 200, .28); }
.btn.ghost { color: var(--brand); background: #fff; box-shadow: none; }
.intro .btns { margin-top: 24px; }
/* 증상 구간 */
.sym-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
@media (min-width: 760px) { .sym-list { grid-template-columns: repeat(3, 1fr); gap: 12px; } }
.sym-list li { padding: 16px 20px; font-weight: 700; color: var(--brand-dark); background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 12px; }
body > section:nth-of-type(even) .sym-list li { background: #fff; }
/* 점검 비교 */
.compare { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 760px) { .compare { grid-template-columns: 1fr 1fr; } }
.compare ul { list-style: none; margin: 0; padding: 0; }
.compare li { position: relative; padding: 0 0 0 28px; margin-bottom: 12px; color: var(--body); }
.compare li:last-child { margin-bottom: 0; }
.compare li::before { position: absolute; left: 0; top: 0; font-weight: 700; }
.cmp-bad { border-top: 4px solid #9ca3af; }
.cmp-bad li::before { content: "✕"; color: var(--muted); }
.cmp-good { border-top: 4px solid var(--brand); }
.cmp-good li::before { content: "✓"; color: var(--brand); }
/* 후기 갤러리 */
.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: rgba(255, 255, 255, .85); }
.closing p { color: rgba(255, 255, 255, .88); }
.closing .btns { margin-top: 24px; }
.closing .btn { color: var(--brand-dark); background: #fff; border-color: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, .2); }
.closing .btn.ghost { color: #fff; background: transparent; border-color: rgba(255, 255, 255, .85); box-shadow: none; }
/* 푸터 */
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; box-shadow: 0 -6px 20px rgba(1, 33, 92, .18); }
.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); }
.callbar a.kakao { background: var(--kakao); color: 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: "✓ "; color: var(--brand); }
.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; flex-wrap: wrap; gap: 8px; }
.town-btns a { flex: 1 1 28%; 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; }
/* 사례 글 페이지 (/mapo/prestige-xi/) */
.card.photo { margin: 0 0 16px; }
.facts { display: grid; grid-template-columns: 6.5em minmax(0, 1fr); gap: 8px 16px; margin: 0; font-size: var(--fs-small); }
.facts dt { font-weight: 700; color: var(--brand-dark); }
.facts dd { margin: 0; color: var(--muted); }
.toc { padding: 16px 20px; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.toc b { display: block; margin-bottom: 8px; color: var(--brand-dark); }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin-bottom: 4px; }
.toc a { color: var(--brand); font-weight: 700; text-decoration: none; }
.proc { margin: 0 0 8px; padding-left: 24px; color: var(--body); }
.proc li { margin-bottom: 8px; }
.more { display: inline-block; margin-top: 12px; color: var(--brand); font-weight: 700; text-decoration: none; }
.fault-list a { color: var(--brand-dark); text-decoration: none; }
/* 파란몽키집수리 전용: 첫 화면 로고·증명 숫자, 수리 항목 카드, 칭찬 칩 */
.logo-hero { display: block; width: min(100%, 340px); height: auto; margin: 0 auto 12px; }
.proof { list-style: none; margin: 20px 0 0; padding: 0; display: flex; gap: 8px; }
.proof li { flex: 1; min-width: 0; padding: 12px 4px; font-size: var(--fs-small); line-height: 1.3; text-align: center; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.proof b { display: block; font-size: 20px; font-weight: 800; color: var(--brand); }
.proof-src { margin: 8px 0 0; font-size: 12px; text-align: center; color: var(--muted); }
.proof-src.left { text-align: left; }
.item-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 760px) { .item-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } }
a.card.item { padding: 16px; text-decoration: none; }
.item h3 { margin: 0 0 4px; }
.item p { margin: 0; font-size: var(--fs-small); color: var(--muted); }
.item.out { border-style: dashed; }
.praise { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.praise li { padding: 6px 12px; font-size: var(--fs-small); font-weight: 700; color: var(--brand-dark); background: #fff; border: 1px solid #c7d6ff; border-radius: 999px; }
.praise b { color: var(--brand); }
.praise + .proof-src { margin-bottom: 24px; }
