/* 업종 지도: 화면 틀은 ../city3d/css/app.css (강릉 디오라마와 같은 도엽 디자인)를 그대로 쓰고,
   여기에는 이 페이지에만 있는 것(이 지도 이름, 단지 단추의 짧은 이름, 범례 행의 업종·찾기 표시, 찾기 결과, 필지 목록, 불러오는 표시)만 둔다. */

/* ── 위 여백: 강릉 디오라마(위 단계)로 가는 표지 | 이 지도 이름 ── */
.zpage .logo span { font-weight: 600; color: var(--graphite); }
.zpage .logo:hover span { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.pagename { margin: 0 0 0 -6px; padding-left: 14px; border-left: 1px solid var(--rule); font-weight: 700; line-height: 24px; white-space: nowrap; }
.seg .s { display: none; }

/* ── 범례 판 ── */
/* 위 띠는 판 맨 위 한 줄을 늘 차지한다 (제목과 겹치지 않게). 내리면 단지 이름으로 바뀐다 */
.zpage .info-bar { margin-bottom: 0; background: var(--sheet); border-bottom-color: var(--rule); }
.zpage .info-bar b { opacity: 1; }
/* 위 띠: '업종 지도 | 단지 이름' (휴대폰에서 판을 접어도, 아래로 내려도 무엇을 보는지 남는다) */
.zpage .info-bar .t1 { font-size: var(--fs-s); font-weight: 600; color: var(--graphite); }
.zpage .info-bar .t2 { margin-left: 10px; padding-left: 10px; border-left: 1px solid var(--rule); font-weight: 700; }
#sheet-toggle { display: none; }
#sheet-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s var(--ease); }
.zpage .info-body { padding-top: 14px; }
.zpage .desc { margin-bottom: 12px; }

/* 이 지도가 무엇인지 한 줄, 참고용임을 한 줄 */
.notice { margin: 0; padding: 10px 12px; border-left: 3px solid var(--ink); background: var(--wash); line-height: 1.65; }
.notice small { display: block; margin-top: 4px; font-size: var(--fs-s); color: var(--graphite); }
.notice .m { display: none; }
.notice .golink { margin: 0; padding: 0; font-size: inherit; }

/* 찾기 결과 */
.hint-box { margin: 14px 0 0; padding: 10px 12px; border: 1px solid var(--ink); border-radius: var(--r-ctl); background: var(--sheet); line-height: 1.6; }
.hint-box:focus { outline: none; }
.hint-box:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.hint-box p { margin: 0; }
.hint-box p + p { margin-top: 4px; }
.hint-box .hq { font-size: var(--fs-s); font-weight: 600; color: var(--graphite); }
.hint-box .also { font-size: var(--fs-s); color: var(--graphite); }
.hint-box .golink { margin: 0 10px 0 4px; padding: 2px 0; font-size: var(--fs-s); }
.hint-box .hl { box-shadow: inset 0 -4px 0 #e8590c99; }
/* 모든 단지 한눈에 */
.xall { margin-top: 10px; font-size: var(--fs-s); }
.xall td small { display: block; color: var(--graphite); }
.xall tr.on td { font-weight: 600; }
.xall .golink { font-size: var(--fs-s); }

/* 범례 행: 이름 아래 작은 줄에 필지 수와 업종 이름, 찾을 때는 되는지 */
.zpage .zl li button { align-items: flex-start; padding: 8px 6px; }
.zpage .zl i { width: 18px; height: 12px; margin-top: 5px; }
.zpage .zl li button > span { flex: 1; min-width: 0; }
.zl .ks { display: block; margin-top: 2px; font-size: var(--fs-s); font-weight: 400; color: var(--graphite); line-height: 1.5; }
.zl .ks span::before { content: ""; display: inline-block; width: 1px; height: .9em; margin: 0 8px; background: var(--rule); vertical-align: -1px; }
.zl .twin { display: block; font-size: var(--fs-s); font-weight: 400; color: var(--graphite); }
.zl .m { display: inline-block; margin-top: 4px; padding: 1px 6px; border-radius: var(--r-mark); font-size: var(--fs-s); font-weight: 600; line-height: 1.5; }
.zl .m:empty, .zl .m.no { display: none; }
/* 찾기 표시는 지도와 같은 주황 (들어갈 수 있는 땅), 일부만은 테두리 */
.zl .m.ok { background: #e8590c; color: #fff; }
.zl .m.part { box-shadow: inset 0 0 0 1.5px #e8590c; color: var(--ink); }
.zpage .zl li.other > span { flex-wrap: wrap; }
.zpage .zl li.other .ks { display: inline; margin: 0 0 0 2px; }
/* 걸러 볼 때 나머지 행은 색 견본만 흐리게 (글자는 읽히게) */
.zpage .zl ul.filtering li button:not([aria-pressed="true"]), .zpage .zl ul.filtering li.other { opacity: 1; }
.zpage .zl ul.filtering li button:not([aria-pressed="true"]) > span, .zpage .zl ul.filtering li.other { color: var(--graphite); }
.zpage .zl ul.filtering li button:not([aria-pressed="true"]) i, .zpage .zl ul.filtering li.other i { opacity: .3; }
.zl li.total small { font-weight: 400; color: var(--graphite); }

/* 고른 행 아래로 펼침: 업종 코드와 이름, 근거 고시 */
.zd { padding: 8px 8px 12px 34px; background: var(--wash); border-bottom: 1px solid var(--rule); box-shadow: inset 3px 0 0 var(--ink);
  font-size: var(--fs-s); color: var(--graphite); line-height: 1.55; }
.zd p { margin: 6px 0 0; }
.zd .src { overflow-wrap: anywhere; }
.zd .golink { margin: 6px 0 0; padding: 2px 0; font-size: var(--fs-s); }
.ksic { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 0; color: var(--ink); }
.ksic dt { font-weight: 600; font-variant-numeric: tabular-nums; }
.ksic dd { margin: 0; }
.ksic dd small { display: block; color: var(--graphite); }
.ksic .inf { color: var(--graphite); font-weight: 400; }
.zd mark { padding: 0 3px; border-radius: var(--r-mark); background: var(--ink); color: var(--sheet); }
/* 지도에서 누른 필지의 범례 행을 잠깐 짚는다 */
@keyframes ping { from { box-shadow: inset 0 0 0 2px var(--ink); } to { box-shadow: inset 0 0 0 2px transparent; } }
@keyframes ping-on { from { box-shadow: inset 0 0 0 2px var(--ink); } to { box-shadow: inset 3px 0 0 var(--ink); } }
.zl li button.ping { animation: ping 1.4s var(--ease); }
.zl li button.ping[aria-pressed="true"] { animation-name: ping-on; }

/* 고른 구역의 필지 목록 */
.plist { margin-top: 18px; }
.plist h3 { margin: 0 0 6px; font-size: var(--fs-m); font-weight: 700; }
.plist h3 small { display: block; font-size: var(--fs-s); font-weight: 400; color: var(--graphite); }
.plist td small { display: block; font-size: var(--fs-s); color: var(--graphite); }
.plist td:first-child { white-space: nowrap; }
.ptab td:first-child .golink small { display: block; font-weight: 400; color: var(--graphite); text-decoration: none; }
.ptab td:last-child { white-space: nowrap; }
.ptab tr.on td { background: var(--wash); }
.ptab tr.on td:first-child { box-shadow: inset 3px 0 0 var(--ink); }
.ptab tr.note td { padding: 6px 8px 8px; background: var(--wash); font-size: var(--fs-s); color: var(--ink); text-align: left; }
.ptab tr.note small { display: block; margin-top: 2px; color: var(--graphite); overflow-wrap: anywhere; }
.tagb { display: inline-block; margin: 2px 0 0 6px; padding: 0 5px; border: 1px solid var(--rule); border-radius: var(--r-mark); background: var(--sheet);
  font: 600 var(--fs-s)/1.5 var(--sans); color: var(--graphite); vertical-align: 1px; }
button.tagb { cursor: pointer; border-color: var(--field); color: var(--ink); }
button.tagb[aria-expanded="true"] { background: var(--ink); color: var(--sheet); border-color: var(--ink); }
.plist i { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 1px; box-shadow: inset 0 0 0 1px #00000033; vertical-align: 0; }
.plist > .golink { margin: 8px 0 0; padding: 2px 0; }

/* 단지 정보(표제란)·낱말 풀이 */
.spec-sec { margin-top: 24px; }
.spec-sec h3 { margin-bottom: 8px; }
.spec-sec .desc { margin: 0 0 12px; }
.spec small.cite { display: block; margin: 2px 0 0; font-weight: 400; }
.spec small.plain { margin: 0; font-size: var(--fs-s); }
.gloss { margin-top: 16px; padding-top: 4px; border-top: 1px solid var(--rule); }
.gloss summary { display: flex; align-items: center; min-height: 40px; font-weight: 600; cursor: pointer; }
.gloss dl { margin: 0 0 6px; font-size: var(--fs-s); line-height: 1.6; }
.gloss dl div { display: grid; grid-template-columns: 5.5em 1fr; gap: 10px; padding: 4px 0; border-top: 1px solid var(--wash); }
.gloss dt { font-weight: 600; }
.gloss dd { margin: 0; color: var(--graphite); }

/* 업종 자료가 없는 단지 */
.empty-zone { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--ink); }
.empty-zone h3 { margin: 0; font-size: var(--fs-m); font-weight: 700; }
.empty-zone p { margin: 6px 0 0; color: var(--graphite); line-height: 1.7; }

/* 말풍선: 찾는 업종이 되는지, 필지 참고 */
#tip .v { font-weight: 600; }
#tip .v.ok::before { content: "✓ "; }
#tip .v.part::before { content: "△ "; }
#tip .v.no { color: var(--graphite); }
#tip .v.no::before { content: "✕ "; }
#tip .note { font-size: var(--fs-s); color: var(--graphite); }
/* 고정한 말풍선은 누를 수 있다 (이 필지로 가기, 닫기). 휴대폰은 지도 위쪽에 붙는 카드 */
#tip.pinned { pointer-events: auto; padding-right: 10px; }
.tip-acts { display: flex; gap: 6px; margin-top: 8px; }
.tip-acts button { height: 32px; padding: 0 10px; border: 1px solid var(--field); border-radius: var(--r-ctl); background: var(--sheet);
  font: 600 var(--fs-s) var(--sans); color: var(--ink); cursor: pointer; }
.tip-acts button:first-child { background: var(--ink); color: var(--sheet); border-color: var(--ink); }
.tip-acts button[data-act="x"] { margin-left: auto; width: 32px; padding: 0; }
#tip.docked { left: 12px !important; right: 12px; max-width: none; }

/* 단지를 바꿀 때 불러오는 표시 (비어 있는 곳 위쪽 가운데) */
#busy { position: absolute; z-index: 6; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; padding: 8px 14px;
  font-size: var(--fs-s); font-weight: 600; white-space: nowrap; }
#busy .bar { width: 80px; margin: 0; }
#toast .lb { display: flex; flex-direction: column; gap: 4px; flex: 1; }
#toast .lb small { font-size: var(--fs-s); color: var(--graphite); }

.mcred { display: none; }

@media (max-width: 1100px) {
  .zpage .logo span { display: none; }
  .pagename { margin-left: -8px; }
}
@media (max-width: 960px) {
  .seg .l { display: none; } .seg .s { display: inline; }
}
@media (max-width: 760px) {
  .pagename { display: none; }
  .zpage .info { max-height: 50%; }
  .zpage .info-bar { padding-left: 16px; gap: 8px; }
  #sheet-toggle { display: grid; }
  .zpage.sheet-min .info-body { display: none; }
  .zpage.sheet-min #sheet-toggle svg { transform: rotate(180deg); }
  .notice .d { display: none; } .notice .m { display: inline; }
  /* 휴대폰에서도 방위표·확대·단지 전체 보기와 축척은 판 바로 위에 둔다 (자료 출처는 판 맨 아래) */
  .zpage.info-open .navctl, .zpage.info-open .collar-foot { opacity: 1; visibility: visible; pointer-events: auto; }
  .zpage.info-open .navctl { right: 12px; top: calc(var(--sheet-top, 60%) - 10px); bottom: auto; transform: translateY(-100%); }
  .zpage .collar-foot { top: calc(var(--sheet-top, 60%) - 10px); bottom: auto; transform: translateY(-100%); }
  .zpage #cred-btn { display: none; }
  /* 휴대폰 글자: 본문 15px, 작은 글자 13px. 누르는 것은 44px 넘게 */
  .zpage .info { font-size: 15px; }
  .zpage .zl .ks, .zpage .zl .twin, .zpage .zl .m, .zpage .zl-note, .hint-box .also, .hint-box .hq, .zd, .plist td small, .notice small,
  .zpage .zl em, .xall, .tagb, .zpage .spec dt, .zpage .mini, #tip { font-size: 13px; }
  .zpage .mini { min-height: 44px; }
  .hint-box .golink, .plist .golink, .zd .golink, .xall .golink { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; }
  .notice .golink { min-height: 0; }
  .zpage .btn, .zpage .chip { height: 44px; }
  .tip-acts button { height: 40px; }
  .tip-acts button[data-act="x"] { width: 40px; }
  #results li { min-height: 44px; }
  .mcred { display: block; margin-top: 20px; padding-top: 6px; border-top: 1px solid var(--rule); font-size: 13px; color: var(--graphite); }
  .mcred summary { display: flex; align-items: center; min-height: 44px; font-weight: 600; cursor: pointer; }
  .mcred ul { margin: 0; padding: 0; list-style: none; line-height: 1.6; }
  .mcred li + li { border-top: 1px solid var(--wash); }
  .gloss summary { min-height: 44px; }
}

/* ── 4차 다듬기 ── */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.zpage .info { overflow-x: hidden; }
.gloss { scroll-margin-top: 60px; }
.gloss > .golink { margin: 4px 0 8px; padding: 2px 0; font-size: var(--fs-s); }
#print-shot { display: block; width: 100%; margin-top: 16px; border: 1px solid var(--rule); }
/* 찾기 목록은 좁은 화면에서도 글자가 잘리지 않게 넓게, 찾기 칸 오른쪽 끝에 맞춘다 */
#results { left: auto; min-width: min(360px, calc(100vw - 24px)); }
#results li small { white-space: normal; text-align: right; }
.hint-box .links { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.hint-box .links .golink { margin: 0; }
.hint-box .hl.part { box-shadow: inset 0 -4px 0 #f4a46f; }
.hint-box .hl { box-shadow: inset 0 -4px 0 #c2410c99; }
.zl .m.ok { background: #c2410c; }
.zl .m.part { box-shadow: inset 0 0 0 1.5px #c2410c; }
/* 필지 표: 첫 칸은 줄바꿈 (꼬리표는 지번 아래 줄), 넓이 칸은 늘 다 보이게 */
.ptab { table-layout: fixed; }
.ptab th:last-child, .ptab td:last-child { width: 8.2em; }
.ptab td:first-child { white-space: normal; overflow-wrap: anywhere; }
.ptab .tags { display: block; margin-top: 2px; }
.ptab .tagb { margin-left: 0; margin-right: 6px; }
.ptab tr.note td { white-space: normal; }
#tip .raw { color: var(--graphite); }
/* 터치 화면에서는 누른 뒤 남는 가리킴(hover) 색을 지운다 */
@media (hover: none) {
  .zl li button:hover { background: none; }
  .zl li button[aria-pressed="true"]:hover { background: var(--wash); }
  .zl ul.filtering li button:hover { opacity: 1; }
}
@media (max-width: 760px) {
  .zpage .info { font-size: 15px; }
  .zpage .zl .ks, .zpage .zl .twin, .zpage .zl .m, .zpage .zl-note, .hint-box .also, .hint-box .hq, .zd, .plist td small, .notice small,
  .zpage .zl em, .xall, .zpage .spec dt, .zpage .mini, .tagb, .zpage .info-bar .t1, .zpage .chip, .gloss dl { font-size: 14px; }
  #tip { font-size: 14px; }
  .ptab td, .xall td { color: var(--ink); }
  .tip-acts button { height: 44px; font-size: 14px; }
  .tip-acts button[data-act="x"] { width: 44px; }
  button.tagb { min-height: 32px; }
  #results { min-width: 0; left: -1px; }
}
@media print {
  html, body, #app { position: static; height: auto; overflow: visible; background: #fff; }
  #gl, #topbar, .navctl, .collar-foot, #tip, #toast, #busy, #splash, .info-bar, .actions, .gloss, .mcred, .hint-box .links { display: none !important; }
  .zpage .info { position: static; width: auto; max-height: none; overflow: visible; border: 0; box-shadow: none; animation: none; }
  .zpage .info-body { padding: 0; }
  .zd .more, [data-more] { display: none; }
}
.plist .golink { gap: 6px; }
/* ── 5차 다듬기 ── */
.zl .m.no.show { display: inline-block; box-shadow: inset 0 0 0 1px var(--field); color: var(--graphite); }
.zl h3 .hd-search { display: none; }
.zpage.in-search .zl h3 .hd-browse { display: none; }
.zpage.in-search .zl h3 .hd-search { display: block; }
.zl .twin { display: none; }
.zpage.pal-gosi .zl .twin { display: block; }
#tip .nw { white-space: nowrap; }
.hint-box p small { display: block; margin-top: 2px; font-size: var(--fs-s); color: var(--graphite); }
/* 아이폰은 16px 보다 작은 입력 칸을 누르면 화면을 키우므로, 손가락 화면에선 입력 글자를 16px 로 */
@media (pointer: coarse) { .search input, .linkbox { font-size: 16px; } }
