/* 'PDF 저장' 인쇄용 페이지 (/p/...) — A4 한 장. 화면에서는 종이 미리보기로 줄여 보여 준다 */
@page { size: A4; margin: 0; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Noto Sans CJK KR", "Malgun Gothic", sans-serif; color: #111827; background: #fff; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.sheet { width: 210mm; height: 296mm; padding: 11mm 12mm 9mm; display: flex; flex-direction: column; gap: 4.5mm; overflow: hidden; background: #fff; }
.main { flex: 1; min-height: 0; overflow: hidden; }
.fit { display: flex; flex-direction: column; gap: 4.5mm; transform-origin: 0 0; }
.band { border-radius: 5mm; padding: 6mm 6mm 5.5mm 7mm; display: grid; grid-template-columns: 1fr auto; gap: 5mm; align-items: center; color: #fff; }
.b-route { background: #1B3A8C; } .b-stop { background: #0E6B6B; } .b-old { background: #E5E7EB; color: #1F2937; }
.tag { display: inline-block; font-size: 9pt; font-weight: 700; padding: 1mm 2.6mm; border-radius: 99px; background: rgba(0,0,0,.22); margin-bottom: 2.5mm; }
.b-old .tag { background: rgba(0,0,0,.08); }
.qr { background: #fff; border-radius: 3mm; padding: 2.6mm 2.6mm 1.8mm; }
.qr svg { width: 30mm; height: 30mm; display: block; }
.qr small { display: block; text-align: center; margin-top: 1.2mm; font-size: 6.4pt; color: #6B7280; }
.num { font-size: 46pt; font-weight: 900; line-height: .95; letter-spacing: -1.5pt; display: flex; align-items: center; gap: 4mm; }
.kind { display: inline-block; font-size: 10.5pt; font-weight: 800; padding: 1mm 3mm; border-radius: 2mm; color: #fff; letter-spacing: 0; }
.k-express { background: #C8102E; } .k-trunk { background: #C2560B; } .k-branch { background: #0F7B4F; } .k-village { background: #6B4FA3; } .k-direct { background: #2563EB; } .k-regional { background: #475569; }
.prev { display: inline-flex; gap: 2mm; letter-spacing: 0; }
.prev .ob { background: #CDD2D9; color: #374151; }
.ends { font-size: 15pt; font-weight: 800; margin-top: 3mm; }
.ends span { opacity: .65; font-weight: 400; margin: 0 2mm; }
.ob { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 2.4mm; background: #E5E7EB; color: #4B5563; font-weight: 900; line-height: 1.05; min-width: 13mm; height: 11mm; padding: 0 1.5mm; font-size: 13pt; }
.ob small { font-size: 6.5pt; font-weight: 800; }
.bd { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 2.4mm; color: #fff; font-weight: 900; line-height: 1.05; min-width: 13mm; height: 11mm; padding: 0 1.5mm; font-size: 14pt; letter-spacing: -.3pt; }
.bd small { font-size: 6.5pt; font-weight: 800; }
h2 { font-size: 11.5pt; margin: 0 0 2mm; font-weight: 800; }
h2 small { font-weight: 400; color: #6B7280; font-size: 8.5pt; margin-left: 1.5mm; }
.box { border: .3mm solid #D1D5DB; border-radius: 3mm; padding: 3.5mm 4mm; }
.map { text-align: center; }
.map img { max-width: 100%; max-height: 80mm; vertical-align: top; }
table.tt { width: 100%; border-collapse: collapse; font-size: 8.4pt; font-variant-numeric: tabular-nums; table-layout: fixed; }
.tt th, .tt td { border-bottom: .2mm solid #E5E7EB; padding: .45mm 1.2mm; text-align: left; vertical-align: top; }
.tt thead th { font-size: 7.6pt; color: #374151; font-weight: 800; border-bottom: .35mm solid #9CA3AF; }
.tt thead tr:first-child th { font-size: 8.6pt; color: #111827; border-bottom: none; padding-bottom: 0; }
.tt th.h { width: 8mm; text-align: right; font-weight: 800; color: #374151; }
.tt td { letter-spacing: .1pt; word-spacing: 1.1mm; }
.tt .gs { border-left: .35mm solid #9CA3AF; }
.sum { font-size: 9.5pt; margin: 0 0 2mm; }
.sum b, .bus b, .rc td b { font-weight: 800; }
.stops { font-size: 8pt; line-height: 1.55; columns: 2; column-gap: 6mm; }
.stops h3 { font-size: 8.8pt; margin: 0 0 .8mm; break-after: avoid; }
.stops p { margin: 0 0 2mm; color: #374151; }
.stops i { font-style: normal; color: #9CA3AF; margin: 0 .6mm; }
.note { font-size: 8pt; color: #4B5563; margin: 1.5mm 0 0; }
.foot { display: flex; gap: 3mm; align-items: baseline; font-size: 7pt; color: #6B7280; border-top: .2mm solid #E5E7EB; padding-top: 2mm; }
.foot b { font-size: 9pt; font-weight: 900; color: #111827; letter-spacing: .2pt; }
.foot span:last-child { margin-left: auto; white-space: nowrap; }
/* 개편 정보 */
.lab { display: flex; gap: 5mm; font-size: 8.5pt; color: #6B7280; margin-bottom: 1.5mm; }
.lab span:first-child { width: 24mm; } .lab span:nth-child(2) { width: 10mm; }
.swap { display: flex; align-items: center; gap: 5mm; flex-wrap: wrap; }
.swap .ob { min-width: 24mm; height: 21mm; font-size: 28pt; border-radius: 4mm; background: #CDD2D9; color: #374151; }
.swap .ob small { font-size: 9pt; }
.swap .bd { min-width: 24mm; height: 21mm; font-size: 30pt; border-radius: 4mm; }
.swap.many .bd { min-width: 17mm; height: 15mm; font-size: 19pt; }
.swap svg { width: 10mm; height: 10mm; fill: none; stroke: #6B7280; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.head { font-size: 22pt; font-weight: 900; margin: 4mm 0 0; letter-spacing: -.5pt; }
.head em { font-style: normal; color: #0F7B4F; }
.quote { font-size: 9.5pt; color: #374151; margin: 0; }
.rc { display: grid; grid-template-columns: auto 1fr; gap: 4mm; align-items: center; }
.rc + .rc { margin-top: 3mm; padding-top: 3mm; border-top: .2mm solid #E5E7EB; }
.rc > div > b { font-size: 12.5pt; }
.rc small { color: #6B7280; margin-left: 1.5mm; font-size: 8.5pt; }
.rc table { font-size: 8.8pt; border-collapse: collapse; margin-top: 1.2mm; font-variant-numeric: tabular-nums; }
.rc td { padding: .3mm 4mm .3mm 0; }
.rc td:first-child { color: #6B7280; }
.maps { display: grid; grid-template-columns: 1fr; gap: 4mm; }
.maps.many { grid-template-columns: 1fr 1fr; } .maps.many img { max-height: 58mm; }
.maps figure { margin: 0; border: .3mm solid #D1D5DB; border-radius: 3mm; padding: 2.5mm; text-align: center; }
.maps img { max-width: 100%; max-height: 64mm; vertical-align: top; }
.maps figcaption { font-size: 8.5pt; font-weight: 800; margin-top: 1.5mm; }
.src { font-size: 8.5pt; color: #374151; margin: 0; }
/* 정류장 */
.sname { font-size: 30pt; font-weight: 900; line-height: 1.05; letter-spacing: -.8pt; }
.sname small { font-size: 14pt; font-weight: 700; color: #CDE6E6; margin-left: 3mm; letter-spacing: 0; }
.dir { font-size: 13pt; font-weight: 700; margin-top: 2mm; opacity: .9; }
table.bus { width: 100%; border-collapse: collapse; font-size: 8.8pt; font-variant-numeric: tabular-nums; }
.bus th { text-align: left; font-size: 7.8pt; color: #374151; border-bottom: .35mm solid #9CA3AF; padding: 1mm 1.5mm; }
.bus td { border-bottom: .2mm solid #E5E7EB; padding: .7mm 1.5mm; vertical-align: middle; }
.bus .bd { min-width: 11.5mm; height: 6.6mm; font-size: 11pt; border-radius: 2mm; }
.bus .bd.long { font-size: 8.5pt; }
.bus .ob { min-width: 11.5mm; height: 6.6mm; font-size: 9.5pt; border-radius: 2mm; }
.bus .ob small { font-size: 5.6pt; }
.bus td .ob { display: flex; width: max-content; }  /* 표 칸 안의 inline-flex 는 PDF 그림(html2canvas)에서 글자가 빠진다 */
.bus .t { font-size: 7.6pt; color: #374151; word-spacing: .6mm; line-height: 1.35; }
.bus .same { color: #9CA3AF; font-size: 8pt; }

/* 화면에서만: 위 막대와 종이 미리보기 */
.pbar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .5rem 1rem; background: #1B3A8C; color: #fff; }
.pbar a { color: #fff; font-weight: 800; font-size: 1rem; text-decoration: none; min-height: 48px; display: inline-flex; align-items: center; }
.pbar button { min-height: 48px; padding: 0 1.3rem; border: 0; border-radius: 24px; background: #fff; color: #1B3A8C; font: inherit; font-weight: 900; font-size: 1.05rem; cursor: pointer; }
.phint { margin: .8rem 1rem 0; font-size: .95rem; color: #374151; text-align: center; }
@media screen {
  body { background: #E5E7EB; }
  .sheet { margin: 12px auto 24px; box-shadow: 0 2px 14px rgba(0,0,0,.18); }
}
@media print {
  body { background: #fff; }
  .pbar, .phint { display: none; }
  .sheet { zoom: 1 !important; margin: 0; box-shadow: none; }
}
