/* 좋은얼굴신종연치과의원 — 오시는 길 (location.html only; linked from tools/pages/location.html).
   Loads after site.css and page.css. The maps are inline SVG from tools/map/build_map.py; their own <style> is scoped to .lm-*. */

/* ---------- 오시는 길: four numbered steps ---------- */
.find { list-style: none; counter-reset: find; margin: 22px 0 0; padding: 0; }
.find li { counter-increment: find; position: relative; padding: 13px 0 13px 52px; border-top: 1px solid var(--rule); line-height: 1.7; }
.find li:first-child { border-top: 0; padding-top: 4px; }
.find li::before { content: counter(find); position: absolute; left: 0; top: 11px; display: grid; place-items: center; width: 38px; height: 38px;
  border-radius: 50%; font: 600 19px/1 var(--display); color: var(--timber-ink); background: rgba(255, 255, 255, .5);
  box-shadow: inset 0 0 0 1.5px rgba(132, 66, 31, .55); }
.find li:first-child::before { top: 2px; }

/* bus numbers, as on the bus itself: a plain plate with the number */
.bus-chips { display: inline-flex; flex-wrap: wrap; gap: 6px; margin: 0 2px; vertical-align: baseline; }
.bus { display: inline-block; min-width: 2.7em; padding: 0 9px; border-radius: 7px; font-weight: 800; line-height: 1.6; text-align: center;
  font-variant-numeric: tabular-nums; color: var(--ink); background: #FFFDF8; box-shadow: inset 0 0 0 1.5px rgba(43, 38, 34, .5); }

/* stop numerals: the same pine discs as on the maps */
.pin { display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; margin-right: 10px; border-radius: 50%;
  font: 800 17px/1 var(--font); color: #F7F0E2; background: var(--pine); vertical-align: -7px; }

.sub .loc-top { align-items: start; }
/* phone: address, then the photos of the building and the 3F door, then hours and parking.
   desk (two columns): address | hours + parking, the photos full width below them */
@media (min-width: 960px) {
  .sub .loc-top { grid-template-areas: "address side" "photos photos"; }
  .loc-top #address { grid-area: address; }
  .loc-top .loc-side { grid-area: side; }
  .loc-top #entrance { grid-area: photos; }
}
/* map buttons: directions first and full width, the two place pages beside each other */
.loc-top .maps-row .btn { flex: 1 1 0; justify-content: center; white-space: nowrap; }
.loc-top .maps-row .btn.gam { flex-basis: 100%; }
.sub .dd-note { display: block; margin-top: 6px; color: var(--ink-2); }
.sub .hours-src { margin: 0 0 6px; }   /* the source chip above the hours, as on the home page */

/* ---------- photos: the building from the street, the 3F door ---------- */
.shots { display: grid; gap: 24px; margin-top: 20px; }
@media (min-width: 760px) { .shots { grid-template-columns: minmax(0, 1.667fr) minmax(0, 1fr); align-items: start; } }  /* 4:3 + 4:5 at one height */
.shot { margin: 0; }
.shot .frame { position: relative; overflow: hidden; border-radius: 10px; background: var(--hanji-2);
  box-shadow: 0 12px 26px -16px rgba(40, 28, 16, .6), 0 0 0 1px rgba(43, 38, 34, .14); }
.shot img { width: 100%; height: auto; }
.sub .shot figcaption { margin-top: 10px; font-size: 17px; font-weight: 700; }
/* overlay marks: HTML over the photo, never drawn into the pixels */
.shot .hl { position: absolute; border: 3px solid var(--gam); border-radius: 10px; pointer-events: none;
  box-shadow: 0 0 0 2px rgba(255, 250, 240, .85), inset 0 0 0 2px rgba(255, 250, 240, .55); }
.shot .tag { position: absolute; padding: 5px 12px 6px; border-radius: 8px; font-size: 16px; font-weight: 800; line-height: 1.35; white-space: nowrap;
  color: #fff; background: var(--tbc-ink); box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .55); }
.shot .tag::before { content: ""; position: absolute; left: 20px; top: -7px; border: 7px solid transparent; border-top: 0; border-bottom-color: var(--tbc-ink); }
.shot-facade .hl { left: 12.5%; top: 36.5%; width: 43.5%; height: 13.5%; }
.shot-facade .tag { left: 12.5%; top: 52.5%; }
.shot-door .hl { left: 9%; top: 14.5%; width: 71.5%; height: 64.5%; }
.shot-door .tag { left: 50%; top: 63%; transform: translateX(-50%); }
.shot-door .tag::before { display: none; }
.sub .loc-photos .credit { margin: 16px 0 0; font-size: 16px; color: var(--ink-2); }

/* ---------- bus ---------- */
.transit-cols { display: grid; gap: 28px; }   /* phone: the stop in front, its close-up map, then the other buses */
@media (min-width: 1000px) {
  .transit-cols { grid-template-columns: minmax(0, 1fr) minmax(360px, 430px); grid-template-areas: "front map" "other map"; align-items: start; }
  .stop-front { grid-area: front; }
  .map-near { grid-area: map; }
  .bus-other { grid-area: other; }
}
.stop-front { padding: 18px 20px 6px; border-radius: 12px; background: rgba(255, 255, 255, .42); box-shadow: inset 0 0 0 1.5px rgba(63, 90, 58, .5); }
.sub .stop-eyebrow { margin: 0 0 6px; font-size: 16px; font-weight: 800; letter-spacing: .02em; color: var(--pine); }
.sub .stop-name { display: flex; align-items: center; margin: 0 0 10px; font: 600 clamp(21px, 2.1vw, 25px)/1.35 var(--display); }
.sub .stop-buses { margin: 0 0 6px; font-weight: 700; }
.stop-front .dots li { padding-top: 12px; padding-bottom: 12px; }
.sub .bus-h { margin: 30px 0 8px; font-size: 20px; }
.bus-table { width: 100%; border-collapse: collapse; }
.bus-table th, .bus-table td { padding: 14px 14px 14px 0; text-align: left; vertical-align: top; border-top: 1px solid var(--rule); }
.bus-table thead th { padding-top: 2px; border-top: 0; font-size: 16px; font-weight: 600; color: var(--ink-2); }
.bus-table tbody th { width: 42%; font-weight: 400; }
.bus-table tbody th .bus-chips { margin: 0; }
.bus-table td:first-of-type { font-weight: 700; }
.bus-table td:last-child { padding-right: 0; white-space: nowrap; }
.bus-table .st { display: flex; align-items: flex-start; }
.bus-table .st .pin { margin-top: -1px; }
.bus-table .road { display: block; margin-top: 2px; font-size: 16px; font-weight: 400; color: var(--ink-2); }
/* the two sides of the road, by where the bus is going (방면) */
.bus-table .side { display: block; margin-top: 6px; font-size: 16px; font-weight: 400; line-height: 1.55; color: var(--ink-2); }
.bus-table .side b { margin-right: 4px; font-weight: 800; color: var(--ink); }
.sub .bus-sides { margin: 0 0 6px; }
@media (max-width: 640px) {  /* phone: one stacked card per bus group */
  .bus-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .bus-table tbody tr { display: block; padding: 14px 0; border-top: 1px solid var(--rule); }
  .bus-table tbody tr:first-child { border-top: 0; padding-top: 4px; }
  .bus-table tbody th, .bus-table tbody td { display: block; width: auto; padding: 0; border: 0; }
  .bus-table tbody td:first-of-type { margin-top: 10px; }
  .bus-table td:last-child { margin: 4px 0 0 40px; white-space: normal; color: var(--ink-2); }
}

/* ---------- maps ---------- */
.lm { display: block; width: 100%; height: auto; }
.map-near { margin: 0; width: 100%; max-width: 460px; justify-self: center; }
.map-area { margin: 16px 0 0; }
.map-wide { display: none; }
.map-tall { max-width: 520px; margin: 0 auto; }
@media (min-width: 900px) { .map-wide { display: block; } .map-tall { display: none; } }
.sub .map-near figcaption, .sub .map-area figcaption { margin-top: 10px; font-size: 16px; color: var(--ink-2); }
.sub .map-credit a { display: inline-block; padding: 9px 0; color: inherit; }
/* each map opens on its own (the SVG file) to zoom in: a phone pinches it, a desk gets the window width */
.sub .map-big { display: inline-block; padding: 11px 0; font-weight: 700; color: var(--ink); text-underline-offset: 3px; }
.sub .map-big .ext { margin-left: 3px; opacity: .7; }
.sub .map-big-row { margin: 4px 0 0; text-align: right; }
.legend { display: grid; gap: 10px 30px; margin: 16px 0 0; padding: 0; list-style: none; }
@media (min-width: 900px) { .legend { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.legend li { display: flex; align-items: center; font-size: 17px; color: var(--ink); }
.legend .lg { display: flex; flex-direction: column; line-height: 1.5; }
.legend .lg span { font-size: 16px; color: var(--ink-2); }
.legend .walk { flex: none; width: 30px; height: 30px; margin-right: 10px;
  background: radial-gradient(circle, var(--gam) 0 2.6px, transparent 3.1px) 0 50% / 10px 10px repeat-x; }
.sub .map-credit { margin: 8px 0 0; }
.sub .map-credit .ext { margin-left: 2px; }

@media (max-width: 760px) {
  .find li { padding-left: 48px; }
  .find li::before { width: 36px; height: 36px; font-size: 18px; }
  .sub #transit.sheet, .sub #map.sheet { padding-left: 16px; padding-right: 16px; }  /* the maps get the width */
  .stop-front { padding: 16px 16px 4px; }
  .loc-top .maps-row .btn { flex-basis: 100%; }   /* phone: one big button per row */
}

@media print {
  .map-wide { display: block !important; }
  .map-tall { display: none !important; }
  .shot .frame { box-shadow: none; }
  .sub h2, .sub h3 { break-after: avoid; }            /* a heading never ends a printed page */
  .shot, .map-near, .map-area, .stop-front, .bus-table tr { break-inside: avoid; }
  .loc-photos > p:first-of-type, #map > p { break-after: avoid; }   /* the intro line goes with its photos or map */
  .map-big-row, .map-big { display: none; }           /* the 크게 보기 links do nothing on paper */
}
