/* 신뢰감 팔레트: 딥 네이비(의료·공공기관) + 검증 그린 + 따뜻한 오프화이트 */
:root {
  --hero: #102a4c;
  --hero2: #183a66;
  --bg: #f4f3ee;
  --panel: #f4f3ee;
  --card: #ffffff;
  --soft: #edece6;
  --soft2: #f9f8f5;
  --line: #e0ded6;
  --text: #15202e;
  --sub: #4a5565;
  --muted: #8a919c;
  --blue: #1d4f91;
  --blue-soft: #e7eef8;
  --red: #c4372f;
  --red-soft: #fbeceb;
  --orange: #b86b00;
  --orange-soft: #fbf1e1;
  --green: #0b7a5e;
  --green-soft: #e1f1eb;
  --gold: #b88a1b;
  --radius: 14px;
  --panel-w: 460px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); }
body {
  font-family: "IBM Plex Sans KR", "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--blue); }

.app { display: flex; height: 100vh; height: 100dvh; }

/* ---------- panel ---------- */
.panel { width: var(--panel-w); flex: none; overflow-y: auto; padding: 0 0 40px; border-right: 1px solid var(--line); background: var(--panel); }
.panel > *:not(.hero) { margin-left: 20px; margin-right: 20px; }

.hero {
  background: linear-gradient(160deg, var(--hero) 0%, var(--hero2) 100%);
  color: #fff; padding: 18px 22px 20px; position: relative; overflow: hidden;
}
.hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.08), transparent 70%); pointer-events: none; }
.top { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 15px; }
.brand .logo { color: #7fd1b5; }
.brand em { font-style: normal; color: #7fd1b5; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--soft); display: grid; place-items: center; color: var(--sub); }
.icon-btn:hover { background: var(--line); }
.icon-btn.ghost { background: rgba(255,255,255,.1); color: #fff; position: relative; z-index: 1; }
.icon-btn.ghost:hover { background: rgba(255,255,255,.18); }
.title { font-size: 25px; font-weight: 700; margin: 18px 0 8px; line-height: 1.32; letter-spacing: -0.02em; }
.hero .meta { margin: 0; color: rgba(255,255,255,.78); font-size: 13.5px; }
.hero .meta.sub { color: rgba(255,255,255,.55); font-size: 12px; margin-top: 10px; }
.trust { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 6px; }
.trust li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: rgba(255,255,255,.92); }
.trust span { width: 18px; height: 18px; border-radius: 50%; background: #2fa483; color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; }

.guide-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-top: 14px; }
.guide-btn {
  text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 12px; font-size: 12px; color: var(--sub); line-height: 1.4;
  display: grid; grid-template-columns: 30px 1fr; column-gap: 8px; align-items: center;
}
.guide-btn i { grid-row: 1 / span 2; width: 30px; height: 30px; border-radius: 8px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: 14px; }
.guide-btn:nth-child(2) i { background: var(--green-soft); color: var(--green); }
.guide-btn b { font-size: 13.5px; color: var(--text); }
.guide-btn:hover { border-color: var(--blue); }

.controls { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: grid; gap: 14px; margin-top: 12px; box-shadow: 0 1px 2px rgba(16,42,76,.04); }
.ctl { display: grid; gap: 7px; }
.ctl-label { font-size: 12px; font-weight: 600; color: var(--sub); }
.ctl-label small { font-weight: 400; color: var(--muted); margin-left: 6px; }

.search { display: flex; align-items: center; gap: 8px; background: var(--soft2); border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; height: 44px; color: var(--muted); }
.search:focus-within { border-color: var(--blue); background: #fff; }
.search input { border: 0; outline: 0; flex: 1; font-size: 14.5px; background: transparent; color: var(--text); min-width: 0; }

.tabs { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.tab { border: 0; background: #fff; padding: 10px 4px; font-size: 13.5px; font-weight: 600; color: var(--sub); border-right: 1px solid var(--line); }
.tab:last-child { border-right: 0; }
.tab small { color: var(--muted); font-weight: 400; margin-left: 4px; }
.tab.on { background: var(--hero); color: #fff; }
.tab.on small { color: rgba(255,255,255,.7); }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { flex: none; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 7px 11px; font-size: 13px; font-weight: 500; white-space: nowrap; color: var(--sub); }
.chip.on { background: var(--green-soft); border-color: var(--green); color: var(--green); font-weight: 600; }
.chip.on::before { content: "✓ "; }

.seg { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; }
.seg button { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 9px 0; font-size: 14px; font-weight: 600; color: var(--sub); }
.seg button small { font-size: 10.5px; font-weight: 400; color: var(--muted); margin-left: 1px; }
.seg button.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.seg button.on small { color: rgba(255,255,255,.75); }

.qty { display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: 10px; padding: 5px; }
.qty button { width: 38px; height: 34px; border-radius: 7px; border: 0; background: var(--soft); font-size: 19px; color: var(--text); }
.qty button:disabled { opacity: .35; cursor: default; }
.qty span { font-weight: 700; font-size: 15px; }

.list-head { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; margin-bottom: 8px; }
.list-head span { font-weight: 700; font-size: 16px; }
.list-head select { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 6px 8px; font-weight: 500; color: var(--sub); font-size: 13px; }

.list { list-style: none; margin-top: 0; margin-bottom: 0; padding: 0; display: grid; gap: 8px; }
.item {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 15px 16px; background: var(--card);
  border: 1px solid var(--line); border-radius: 14px; cursor: pointer; transition: border-color .12s, box-shadow .12s;
}
.item:hover, .item.hl { border-color: var(--blue); box-shadow: 0 2px 10px rgba(16,42,76,.08); }
.item.best { border-color: var(--green); box-shadow: inset 4px 0 0 var(--green); }
.item .loc { color: var(--muted); font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.rank { width: 20px; height: 20px; border-radius: 6px; background: var(--hero); color: #fff; font-size: 11.5px; font-weight: 700; display: inline-grid; place-items: center; flex: none; }
.item.best .rank { background: var(--green); }
.item .name { font-weight: 700; font-size: 16.5px; margin-top: 3px; }
.item .right { text-align: right; grid-row: 1 / span 2; grid-column: 2; align-self: center; }
.item .yen { font-weight: 700; font-size: 19px; color: var(--hero); }
.item.best .yen { color: var(--green); }
.item .krw { color: var(--sub); font-size: 12.5px; }
.item .breakdown { color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.item .tags { grid-column: 1 / -1; margin-top: 8px; }
.item.na { opacity: .5; }
.fav { border: 0; background: none; font-size: 15px; padding: 0 0 0 4px; color: #cfd3d8; vertical-align: 1px; }
.fav.on { color: var(--gold); }

.tag { font-size: 11.5px; padding: 3px 8px; border-radius: 6px; background: var(--soft); color: var(--sub); font-weight: 500; }
.tag.blue { background: var(--blue-soft); color: var(--blue); }
.tag.red { background: var(--orange-soft); color: var(--orange); }
.tag.orange { background: var(--orange-soft); color: var(--orange); }
.tag.green { background: var(--green-soft); color: var(--green); }

.empty { padding: 40px 0; text-align: center; color: var(--muted); background: var(--card); border-radius: 14px; }
.foot { margin-top: 28px; font-size: 12px; color: var(--muted); line-height: 1.6; }
.foot b { color: var(--sub); font-weight: 500; }

/* ---------- map ---------- */
.map-wrap { position: relative; flex: 1; min-width: 0; }
#map { position: absolute; inset: 0; background: #eef1f4; }
.map-overlay-top { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 5; }
.pill-btn {
  border: 0; background: #fff; border-radius: 999px; padding: 10px 16px; font-weight: 700; font-size: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,.12); color: var(--text); white-space: nowrap;
}
.pill-btn:hover { color: var(--blue); }
.map-fallback { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--sub); padding: 24px; z-index: 4; }
.map-fallback b { font-size: 17px; color: var(--text); }
.map-fallback[hidden] { display: none; }
.mobile-toggle { display: none; }

/* price markers (OverlayView) */
.pm {
  position: absolute; transform: translate(-50%, -100%); white-space: nowrap;
  background: #fff; color: var(--text); font-weight: 700; font-size: 14px;
  padding: 6px 11px; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.18); cursor: pointer;
  border: 1.5px solid transparent; transition: transform .12s;
}
.pm::after {
  content: ""; position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: #fff; border-bottom: 0;
}
.pm:hover, .pm.hl { z-index: 10; transform: translate(-50%, -100%) scale(1.08); border-color: var(--blue); color: var(--blue); }
.pm.best { background: var(--green); color: #fff; }
.pm.best::after { border-top-color: var(--green); }
.pm.best:hover, .pm.best.hl { color: #fff; border-color: #075a45; }
.pm.unk { color: var(--muted); }
.st-marker {
  position: absolute; transform: translate(-50%, -50%); background: var(--hero); color: #fff;
  font-weight: 800; font-size: 13px; padding: 6px 10px; border-radius: 999px; white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,.25); pointer-events: none;
}

/* ---------- modal / sheet ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; }
.modal[hidden] { display: none; }
.modal-bg { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.sheet {
  position: relative; background: #fff; border-radius: 22px; width: min(520px, calc(100% - 32px));
  max-height: 88vh; overflow-y: auto; padding: 26px 24px 24px;
}
.sheet h2 { margin: 0 0 6px; font-size: 21px; }
.sheet-close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--soft); }
.muted { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.muted.small { font-size: 12px; margin-top: 14px; }

/* ---------- 상세: 왼쪽 병원정보 / 오른쪽 후기·예약문구 ---------- */
.sheet.wide { width: min(1080px, calc(100% - 32px)); padding: 0; display: flex; flex-direction: column; overflow: hidden; height: min(860px, 92vh); max-height: none; }
.sheet.wide .sheet-close { z-index: 3; }
#detailBody { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.detail { display: grid; grid-template-columns: 1fr 1fr; min-height: 0; flex: 1; }
.d-left, .d-right { overflow-y: auto; padding: 26px 26px 24px; min-height: 0; }
.d-right { background: var(--soft2); border-left: 1px solid var(--line); }
.d-head { display: flex; justify-content: space-between; gap: 12px; padding-right: 36px; }
.d-icons { display: flex; gap: 8px; flex: none; }
.d-icons .icon-btn { font-size: 17px; }
.d-icons .fav-on { color: #ffb800; }
.d-loc { color: var(--muted); font-size: 13px; }
.d-name { font-size: 24px; font-weight: 800; margin: 4px 0 2px; letter-spacing: -0.03em; }
.d-ja { color: var(--sub); font-size: 14px; }
.d-box { background: var(--soft2); border: 1px solid var(--line); border-radius: 18px; padding: 18px; margin: 18px 0 12px; }
.d-cap { color: var(--sub); font-size: 13px; font-weight: 500; }
.warn-inline { color: #e57a00; }
.d-big { font-size: 30px; font-weight: 800; margin-top: 4px; letter-spacing: -0.03em; }
.d-big.small { font-size: 18px; }
.d-krw { color: var(--sub); font-size: 14px; }
.d-rows { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 8px; }
.d-row { display: flex; justify-content: space-between; font-size: 15px; padding: 6px 0; color: var(--sub); }
.d-row b { color: var(--text); }
b.red { color: #e57a00 !important; }
b.green, .green { color: var(--green); }
.d-note { color: var(--muted); font-size: 12.5px; line-height: 1.6; margin: 8px 0 0; }
.d-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.d-btns .btn { flex: 1 1 auto; padding: 12px 14px; font-size: 14px; }
.btn.line { background: #06c755; color: #fff; }
.btn.sm { padding: 10px 18px; font-size: 14px; }
.d-dl { display: grid; grid-template-columns: 76px 1fr; margin: 18px 0 0; border-top: 1px solid var(--soft); }
.d-dl dt, .d-dl dd { padding: 12px 0; border-bottom: 1px solid var(--soft); margin: 0; font-size: 14px; line-height: 1.55; }
.d-dl dt { color: var(--muted); }
.d-dl small { color: var(--sub); font-size: 12.5px; }
.mini { margin-top: 6px; border: 0; background: var(--soft); border-radius: 8px; padding: 6px 10px; font-size: 12.5px; color: var(--sub); }
.d-left h3, .d-right h3 { font-size: 16px; margin: 24px 0 8px; }
.d-right h3 { margin-top: 0; }
.d-right h3 small { color: var(--muted); font-weight: 400; font-size: 13px; }
.d-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.d-table td { padding: 10px 0; border-bottom: 1px solid var(--soft); }
.d-table td:nth-child(2) { font-weight: 700; }
.d-table td:last-child { text-align: right; color: var(--sub); font-size: 13px; }
.d-table tr.cur td { color: var(--blue); }

.r-block { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px; margin-bottom: 14px; }
.paid-box { background: var(--blue-soft); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; }
.paid-row { display: flex; gap: 10px; align-items: baseline; padding: 3px 0; }
.paid-row b { font-size: 17px; }
.paid-row span { color: var(--sub); font-size: 13px; }
.rev-list { max-height: 260px; overflow-y: auto; }
.rev { background: var(--soft2); border-radius: 12px; padding: 12px; margin-bottom: 8px; }
.rev-h { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.rev-h span { color: var(--muted); }
.rev p { margin: 6px 0 0; font-size: 14px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.rev-form { display: grid; gap: 8px; margin-top: 10px; }
.rev-form textarea, .rev-form input, .rev-form select, .book input, .book select, .book textarea {
  width: 100%; border: 1px solid var(--line); background: var(--soft2); border-radius: 10px; padding: 11px 12px; font-size: 14px; outline: 0; min-width: 0;
}
.rev-form textarea:focus, .rev-form input:focus, .book input:focus, .book select:focus { border-color: var(--blue); background: #fff; }
.rev-paid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 8px; }
.rev-foot { display: grid; grid-template-columns: 1fr auto; gap: 8px; }

.book { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.book label { display: grid; gap: 6px; font-size: 13px; color: var(--sub); font-weight: 500; }
.book .f-full { grid-column: 1 / -1; }
.book .radios { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.f-label { width: 100%; font-size: 13px; color: var(--sub); font-weight: 500; }
.book label.opt { display: flex; align-items: center; gap: 8px; background: var(--soft2); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; font-size: 14px; color: var(--text); cursor: pointer; }
.book label.opt input { width: auto; accent-color: var(--blue); margin: 0; }
.book [hidden] { display: none !important; }
.lang-seg { display: inline-flex; background: var(--soft); border-radius: 10px; padding: 3px; justify-self: start; }
.lang-seg button { border: 0; background: transparent; padding: 8px 16px; border-radius: 8px; font-weight: 700; font-size: 14px; color: var(--sub); }
.lang-seg button.on { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.book-out { font-size: 14px !important; line-height: 1.65; resize: vertical; background: var(--soft2) !important; }

.d-bar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; flex: none; }
.bar-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; border: 0; border-radius: 14px; background: var(--soft); padding: 10px 0; font-weight: 700; font-size: 14px; color: var(--text); text-decoration: none; }
.bar-btn span { font-size: 17px; }
.bar-btn.primary { background: var(--blue); color: #fff; }

.phrase { display: block; width: 100%; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 14px; margin-bottom: 8px; }
.phrase:hover { border-color: var(--blue); }
.phrase .ja { font-size: 17px; font-weight: 700; }
.phrase .ko { color: var(--sub); font-size: 13px; margin-top: 4px; }

.big { position: absolute; inset: 0; background: #fff; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 32px; text-align: center; cursor: pointer; }
.big-ja { font-size: clamp(28px, 7vw, 56px); font-weight: 800; line-height: 1.4; word-break: keep-all; }
.big-ko { margin-top: 20px; font-size: 18px; color: var(--sub); }
.big-hint { position: absolute; bottom: 28px; color: var(--muted); font-size: 13px; }

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--soft); font-size: 15px; line-height: 1.5; }
.checklist input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--blue); }
.checklist small { display: block; color: var(--muted); font-size: 13px; }

.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%); background: rgba(25,31,40,.92); color: #fff;
  padding: 12px 18px; border-radius: 12px; font-size: 14px; z-index: 200;
}
.toast[hidden] { display: none; }

/* ---------- mobile ---------- */
@media (max-width: 860px) {
  .app { flex-direction: column-reverse; height: auto; }
  .panel { width: 100%; border-right: 0; padding: 0 0 40px; overflow: visible; }
  .panel > *:not(.hero) { margin-left: 14px; margin-right: 14px; }
  .map-wrap { position: sticky; top: 0; height: 42vh; flex: none; z-index: 10; }
  .title { font-size: 22px; margin-top: 14px; }
  .seg button { font-size: 14px; }
  .seg button small { display: none; }
  .seg { gap: 4px; }
  .map-overlay-top { top: 10px; }
  .pill-btn { padding: 8px 12px; font-size: 13px; }
  .sheet { position: absolute; bottom: 0; width: 100%; border-radius: 22px 22px 0 0; max-height: 90vh; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  body.map-full .map-wrap { height: 100dvh; }
  .sheet.wide { height: 94dvh; width: 100%; padding: 0; border-radius: 22px 22px 0 0; padding-bottom: 0; }
  .detail { display: block; overflow-y: auto; }
  .d-left, .d-right { overflow: visible; padding: 22px 18px; }
  .d-right { border-left: 0; border-top: 1px solid var(--line); }
  .rev-list { max-height: none; }

  .mobile-toggle {
    display: block; position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); z-index: 6;
    border: 0; background: var(--text); color: #fff; border-radius: 999px; padding: 10px 18px; font-weight: 700; font-size: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,.2);
  }
}

/* ---------- 공통 버튼·태그 ---------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none;
  border: 0; border-radius: 12px; padding: 14px 10px; font-weight: 700; font-size: 15px;
  background: var(--soft); color: var(--text);
}
.btn:hover { filter: brightness(0.97); }
.btn.primary { background: var(--blue); color: #fff; }
.btn:disabled { opacity: .5; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.sheet.wide .d-right { padding-top: 60px; }
@media (max-width: 860px) { .sheet.wide .d-right { padding-top: 22px; } }

.sort-hint { font-size: 11.5px; color: var(--muted); margin-top: -2px; margin-bottom: 10px; }

/* ---------- 레이아웃 v3: 한 줄 제목 · 환율 칩 · 지도 위 가이드 · 너비 조절 ---------- */
.title { white-space: nowrap; font-size: 24px; margin: 16px 0 6px; }
.brand { min-width: 0; flex-wrap: nowrap; }
.brand-name { white-space: nowrap; }
.fx {
  margin-left: 6px; font-size: 12px; font-weight: 500; white-space: nowrap;
  color: rgba(255,255,255,.82); background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14);
  padding: 3px 9px; border-radius: 999px;
}
.trust { display: flex; flex-wrap: nowrap; gap: 14px; margin-top: 12px; }
.trust li { white-space: nowrap; font-size: 13px; }

/* 지도: 역 버튼은 왼쪽 위, 가이드는 오른쪽 위 */
.map-overlay-top { left: 14px; transform: none; }
.map-guides { position: absolute; top: 14px; right: 14px; z-index: 5; display: flex; gap: 8px; }
.map-guides .guide-btn { box-shadow: 0 2px 10px rgba(16,42,76,.16); border-color: transparent; padding: 9px 12px; min-width: 0; white-space: nowrap; }
.map-guides .guide-btn:hover { border-color: var(--blue); }

/* 너비 조절 손잡이 */
.resizer { flex: none; width: 8px; margin-left: -4px; margin-right: -4px; cursor: col-resize; position: relative; z-index: 20; touch-action: none; }
.resizer::after { content: ""; position: absolute; top: 0; bottom: 0; left: 3px; width: 2px; background: transparent; transition: background .15s; }
.resizer:hover::after, .resizer:focus-visible::after, body.resizing .resizer::after { background: var(--blue); }
.resizer:focus { outline: none; }
body.resizing { cursor: col-resize; user-select: none; }
body.resizing #map { pointer-events: none; }

@media (max-width: 860px) {
  .resizer { display: none; }
  .title { font-size: 21px; white-space: normal; }
  .trust { gap: 10px; }
  .trust li { font-size: 12px; }
  .fx { font-size: 11px; padding: 2px 7px; }
  .map-overlay-top { left: 10px; gap: 6px; }
  .map-guides { top: 10px; right: 10px; gap: 6px; }
  .map-guides .guide-btn { padding: 0; width: 38px; height: 38px; display: grid; place-items: center; grid-template-columns: 1fr; border-radius: 50%; }
  .map-guides .guide-btn b, .map-guides .guide-btn span { display: none; }
  .map-guides .guide-btn i { grid-row: auto; width: 38px; height: 38px; border-radius: 50%; }
}
.brand .logo { flex: none; }

/* ---------- 별점 ---------- */
/* 별 5개를 점수 비율만큼 금색으로 채움 (--pct) */
.stars {
  display: inline-block; letter-spacing: 1px; font-size: 14px; line-height: 1;
  background: linear-gradient(90deg, #f2a91b var(--pct, 0%), #d9d6ce var(--pct, 0%));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stars.sm { font-size: 12px; }
.rating { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.rating b { font-size: 14px; font-weight: 700; color: var(--text); }
.rating .cnt { font-size: 12.5px; color: var(--sub); }
.rating.none b { color: var(--muted); font-weight: 500; }
.rate-row { margin-top: 3px; }
.item .right { grid-row: 1 / span 3; }
.item .tags { grid-column: 1 / -1; }
.d-rating { margin-top: 8px; }
.d-rating .rating b { font-size: 16px; }
.d-rating .stars { font-size: 16px; }
.d-right h3 small .rating b { font-size: 13px; }
.rev-h .stars { margin-right: 2px; }

/* 즐겨찾기 하트 */
.fav { font-size: 14px; }
.fav.on { color: #e5484d; }
.d-icons .fav-on { color: #e5484d; }

/* 리뷰 별점 선택 (오른쪽→왼쪽 배치로 hover/선택 시 앞쪽 별까지 채움) */
.pick-row { display: flex; align-items: center; gap: 10px; }
.star-pick { display: inline-flex; flex-direction: row-reverse; }
.star-pick input { position: absolute; opacity: 0; width: 0; height: 0; }
.star-pick label { font-size: 28px; line-height: 1; color: #d9d6ce; cursor: pointer; padding: 0 2px; transition: color .1s; }
.star-pick label:hover, .star-pick label:hover ~ label,
.star-pick input:checked ~ label { color: #f2a91b; }
.star-pick input:focus-visible + label { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
.pick-hint { font-size: 13px; color: var(--sub); }

/* 지도 영역이 좁아지면(왼쪽 칸을 넓힌 경우) 가이드 버튼을 아이콘만 */
.map-wrap { container-type: inline-size; container-name: mapwrap; }
@container mapwrap (max-width: 700px) {
  .map-guides .guide-btn { padding: 0; width: 40px; height: 40px; display: grid; place-items: center; grid-template-columns: 1fr; border-radius: 50%; }
  .map-guides .guide-btn b, .map-guides .guide-btn span { display: none; }
  .map-guides .guide-btn i { grid-row: auto; width: 40px; height: 40px; border-radius: 50%; }
}

/* 가져갈 양: 1·2·3개월 3칸 */
.seg.qty-seg { grid-template-columns: repeat(3, 1fr); }
.seg.qty-seg button { font-size: 14.5px; }
.seg.qty-seg button small { display: inline !important; margin-left: 5px; font-size: 12px; }

/* 목록: 순위 번호 바로 오른쪽에 병원 이름 (주소 줄 없음) */
.item .name { display: flex; align-items: flex-start; gap: 8px; margin-top: 0; line-height: 1.35; }
.item .name .rank { margin-top: 2px; }
.item .name .fav { flex: none; margin-top: 1px; }
.item .rate-row { margin-top: 5px; }
.item .right { grid-row: 1 / span 2; }
.item:has(.rank) .rate-row { padding-left: 28px; }

/* 지도: 지역별 1~4위만 가격 말풍선, 나머지는 점 (선택·가리키면 말풍선) */
#map .pm:not(.hl):not(.top) {
  width: 12px; height: 12px; padding: 0; border-radius: 50%; font-size: 0; color: transparent;
  background: var(--hero); border: 2px solid #fff; transform: translate(-50%, -50%);
}
#map .pm:not(.hl):not(.top)::after { display: none; }
#map .pm.hl, #map .pm.top { z-index: 20; }

/* 목록 하단 가이드 링크 */
.guide-links { margin-top: 26px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.guide-links h2 { font-size: 15px; margin: 0 0 10px; }
.gl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gl-grid a { display: block; text-decoration: none; color: var(--text); background: var(--soft2); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; }
.gl-grid a:hover { border-color: var(--blue); }
.gl-grid b { display: block; font-size: 13.5px; }
.gl-grid span { color: var(--muted); font-size: 12px; }
a.guide-btn { text-decoration: none; }
.map-guides .guide-btn:nth-child(3) i { background: var(--orange-soft); color: var(--orange); }
