:root {
  --accent: #0B57C2;
  --accent-deep: #08408f;
  --ink: #1d2433;
  --muted: #5c667a;
  --line: #e2e5ea;
  --panel: #ffffff;
  --bg: #efece4;
  --warn: #b45309;
  --shadow: 0 6px 24px rgba(20, 30, 60, .16);
  --radius: 14px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.app { position: relative; height: 100%; overflow: hidden; }
.map { position: absolute; inset: 0; }
.map .maplibregl-canvas { outline: none; }

/* ───── 상단 검색 ───── */
.topbar {
  position: absolute; top: 12px; left: 12px; right: 64px;
  display: flex; gap: 10px; align-items: center; z-index: 7; pointer-events: none; /* 7: 안내판(6) 위 — 안내판을 연 채 검색하면 후보 왼쪽이 안내판 뒤에 가려 눌리지 않았다(2026-09-29 검토 SEARCH-14). 토스트 8·로더 9 보다 낮다 */
}
.brand {
  pointer-events: auto; display: flex; align-items: center; gap: 8px; flex: none; height: 42px;
  background: #fff; color: var(--ink); font-weight: 700; font-size: 15px;
  padding: 0 10px 0 12px; border-radius: 12px; box-shadow: var(--shadow); white-space: nowrap;
}
.brand-home { display: flex; color: inherit; }
/* 상표 자리의 캠퍼스 드롭다운(신촌/국제, 사용자 결정 2026-09-11): 글자만 보이고 오른쪽에 화살표.
   너비는 select 의 고유 너비(브라우저가 옵션 글꼴로 재서 굵은 글씨가 잘려 「…」이 나왔다, 사용자 지적 2026-09-11)가 아니라
   같은 글꼴로 그린 보이지 않는 ::after(data-value = 선택된 글) 로 정해 어떤 글꼴에서도 잘리지 않는다 */
.brand-sel-wrap { display: inline-grid; grid-template-areas: "s"; align-items: center; max-width: 60vw; }
.brand-sel-wrap::after { content: attr(data-value) " "; grid-area: s; visibility: hidden; white-space: nowrap; padding: 4px 26px 4px 0; font: inherit; font-weight: 700; }
.brand-sel {
  grid-area: s; width: 100%; min-width: 0; appearance: none; -webkit-appearance: none; border: 0; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer;
  padding: 4px 20px 4px 0; text-overflow: clip; white-space: nowrap;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%236b7280' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") no-repeat right center / 18px 18px;
}
.brand-sel option { font-weight: 400; font-size: 14px; }
.brand-sel:focus-visible { outline: 2px solid var(--accent); border-radius: 6px; }
.search { pointer-events: auto; position: relative; flex: 0 1 460px; min-width: 0; }
.search input {
  width: 100%; padding: 11px 44px 11px 14px; border: 0; border-radius: 12px;
  font: inherit; font-size: 15px; color: var(--ink); background: #fff; box-shadow: var(--shadow);
}
.search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search .icon-btn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }
/* 건너뛰기 링크(2026-09-18, 키보드: 이름표 35개를 지나야 검색에 닿던 문제): 초점이 올 때만 보인다 */
.skip-link { position: absolute; top: 8px; left: -9999px; z-index: 30; background: #fff; color: var(--accent); font-weight: 700; padding: 8px 12px; border-radius: 8px; box-shadow: var(--shadow); text-decoration: none; }
.skip-link:focus { left: 8px; outline: 2px solid var(--accent); }
.icon-btn {
  width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.icon-btn:hover { background: #eef1f6; color: var(--ink); }
.suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none;
  background: #fff; border-radius: 12px; box-shadow: var(--shadow); max-height: min(52vh, 420px); overflow: auto;
}
.suggest li {
  display: flex; justify-content: space-between; gap: 12px; align-items: baseline;
  padding: 9px 10px; border-radius: 8px; cursor: pointer; font-size: 14px;
}
.suggest li[aria-selected="true"], .suggest li:hover { background: #eef3fc; }
.suggest li .sub { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest li .kind { font-size: 11px; color: var(--accent); margin-right: 6px; }
.suggest .empty { color: var(--muted); font-size: 13px; padding: 10px; cursor: default; }
.suggest .empty:hover { background: transparent; }
.suggest .empty { display: block; line-height: 1.45; } /* 목록 항목의 flex(양끝 정렬)가 안내 문구·단추를 한 줄에 욱여넣던 것을 세로로(2026-09-19) */
.suggest .empty small { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); }
.suggest .link-btn { display: inline-block; margin-top: 6px; padding: 0; border: 0; background: transparent; color: var(--accent); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; text-decoration: underline; }
/* 결과 줄(2026-09-29 검토 SEARCH-15): 이름 칸이 부제 칸보다 좁아 긴 의대 건물명이 세 줄로 꺾이던 것 — 이름이 먼저 자리를 갖고 어절 단위로만 꺾인다 */
.suggest li .nm { flex: 1 1 auto; min-width: 0; word-break: keep-all; }
.suggest li .sub { flex: 0 1 auto; }
/* 안내 줄: 방 번호 안내·「외 N곳」·오타 후보 머리글(2026-09-29 검토 SEARCH-13·10) */
.suggest li.hint, .suggest li.more { display: block; cursor: default; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.suggest li.hint:hover, .suggest li.more:hover { background: transparent; }
.suggest li.more .link-btn { margin-top: 0; font-size: 12.5px; }

/* ───── 위쪽 옵션(출발·세브란스) ───── */
.opts { pointer-events: auto; display: flex; gap: 8px; flex: none; }
.ico-sm { display: none; flex: none; color: var(--muted); } /* 작은 화면에서만 글자 대신 보이는 아이콘 */
.opt-toggle { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 10px 0 12px; border: 0; border-radius: 12px; background: #fff; box-shadow: var(--shadow); font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.opt-toggle[aria-checked="true"] span { color: var(--ink); }
.sw { width: 34px; height: 20px; border-radius: 10px; background: #cfd5de; position: relative; transition: background .2s; flex: none; }
.sw::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); transition: left .2s; }
.opt-toggle[aria-checked="true"] .sw { background: var(--accent); }
.opt-toggle[aria-checked="true"] .sw::after { left: 16px; }

/* ───── 출발 지점 선택 ───── */
.start { pointer-events: auto; flex: none; display: inline-flex; align-items: center; gap: 4px; background: #fff; border-radius: 12px; box-shadow: var(--shadow); padding: 0 6px 0 12px; height: 42px; font-size: 14px; font-weight: 600; color: var(--muted); }
.start-sel { border: 0; background: transparent; font: inherit; font-size: 14px; font-weight: 700; color: var(--accent); padding: 6px 4px; cursor: pointer; }
.start-sel { appearance: none; -webkit-appearance: none; padding-right: 20px; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%236b7280' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") no-repeat right 2px center / 16px 16px; } /* 펼침 화살표를 캠퍼스 드롭다운과 같은 그림으로(VISUAL-09) */
.start-sel:focus { outline: 2px solid var(--accent); border-radius: 6px; }
.lbl.is-start::before { content: '출발 · '; font-weight: 500; opacity: .85; }
.lang-en .lbl.is-start::before { content: 'Start · '; }
.lang-btn { height: 42px; padding: 0 12px; border: 0; border-radius: 12px; background: #fff; box-shadow: var(--shadow); font-size: 14px; font-weight: 700; color: var(--accent); cursor: pointer; white-space: nowrap; }

/* ───── 지하 보기: 층 선택과 범례 ───── */
/* 건물 내부 보기(2026-09-12): 층 선택 막대·방 번호·층 이름표 */
.floor-bar { position: absolute; top: 64px; right: 12px; z-index: 5; display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; max-width: min(60vw, calc(100vw - 24px)); /* 한 줄(2026-09-18: 층이 많으면 3줄 117px 로 자라던 문제) — 스크롤은 안의 .floor-scroll 만(2026-09-19) */ background: #fff; border-radius: 10px; box-shadow: var(--shadow); padding: 6px 8px; font-size: 12px; }
.floor-scroll { position: relative; display: flex; align-items: center; gap: 6px; min-width: 0; flex: 0 1 auto; overflow-x: auto; scrollbar-width: none; } /* relative: 칩 offsetLeft 가 이 상자 기준이어야 고른 층을 가운데로 스크롤한다(폰에서 화면 밖으로 밀던 것, 2026-09-29 검토 INTERIOR-05) */
.floor-scroll::-webkit-scrollbar { display: none; }
.floor-scroll.is-more { mask-image: linear-gradient(to right, #000 calc(100% - 22px), transparent); -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 22px), transparent); } /* 더 있음 단서 */
.floor-scroll.is-less { mask-image: linear-gradient(to right, transparent, #000 22px); -webkit-mask-image: linear-gradient(to right, transparent, #000 22px); }
.floor-scroll.is-less.is-more { mask-image: linear-gradient(to right, transparent, #000 22px, #000 calc(100% - 22px), transparent); -webkit-mask-image: linear-gradient(to right, transparent, #000 22px, #000 calc(100% - 22px), transparent); }
.floor-bar b { margin-right: 4px; color: var(--ink); white-space: nowrap; }
.floor-bar button { flex: none; }
.is-interior .event-bar { display: none; } /* 내부 보기 중에는 층 막대 자리와 겹치는 행사 배너를 숨긴다(2026-09-18) */
.floor-bar button { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 5px 9px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--muted); }
.floor-bar button.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.floor-bar button.close { margin-left: 4px; color: #b3261e; }
.lbl-room { background: rgba(255, 255, 255, .92); color: #1f2a44; font-size: 11px; font-weight: 600; padding: 1px 5px; }
.labels.is-near .lbl-room:not(.is-selected) .lbl-num { display: none; } /* 18.6 이상: 방 이름표는 번호만(INTERIOR-02) */
.lbl-room.is-selected { background: #ffc94d; color: #3a2a00; } /* 고른 방(INTERIOR-09) */
.fl-legend .fl-note { margin: 0; padding: 0 12px 8px; color: var(--muted); font-size: 11px; }
.floor-bar button.close { color: var(--ink); } /* 닫기 셋이 다 빨간 글자라 헷갈리던 것 — 층 막대 닫기는 잉크색(INTERIOR-11) */
/* 이 층의 방 목록(FEATUREGAP-09) */
.room-list { margin: 0 0 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.room-list > summary { padding: 8px 10px; font-size: 13px; font-weight: 700; cursor: pointer; }
.room-list .room-note { margin: 0; padding: 0 10px 6px; font-size: 12px; color: var(--muted); }
.room-list ul { list-style: none; margin: 0; padding: 0 6px 8px; max-height: 240px; overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 2px; }
.room-item { width: 100%; text-align: left; border: 0; background: transparent; border-radius: 6px; padding: 5px 6px; font: inherit; font-size: 13px; cursor: pointer; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room-item:hover, .room-item.is-on { background: #eef3fc; }
.room-item b { font-weight: 700; }
.hact.is-busy svg { animation: spin 1s linear infinite; } /* 층 자료 받는 중(INTERIOR-04) */
.lbl-floor { background: #3b4a6b; color: #fff; font-size: 11px; font-weight: 700; }
.is-interior .lbl-building { opacity: .55; }
.lbl-ug { background: #6a3fb5; color: #fff; font-weight: 600; }

/* ───── 행사 배너(행사 모드) ───── */
.event-bar { position: absolute; top: 64px; right: 12px; left: auto; z-index: 5; pointer-events: none; background: #fff7e0; border-left: 4px solid #b45309; border-radius: 10px; padding: 8px 12px; font-size: 13px; line-height: 1.5; box-shadow: var(--shadow); color: #3a2a00; max-width: 440px; }
.event-bar b { font-size: 14px; }
.event-toggle { pointer-events: auto; display: flex; align-items: center; gap: 6px; width: 100%; border: 0; background: transparent; font: inherit; padding: 0; color: inherit; text-align: left; cursor: pointer; }
.event-toggle .chev { margin-left: auto; color: #7c4a03; flex: none; }
.event-bar.is-collapsed .event-toggle b { display: block; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.event-bar.is-collapsed .date, .event-bar.is-collapsed .notice { display: none; }
.event-bar .date { margin-left: 8px; color: #7c4a03; }
.event-bar .notice { display: block; color: #7c4a03; }
.is-event .panel { top: 72px; }
.event-bar a { pointer-events: auto; color: #7c3a03; font-weight: 700; } /* 배너는 지도 조작을 막지 않게 pointer-events:none — 링크만 누를 수 있게(2026-09-29) */
.event-bar .ev-link { white-space: nowrap; }
.event-bar .notice.access { margin-top: 2px; }
.event-bar .ev-tel { white-space: nowrap; }
.event-bar.is-ended { background: #eef0f3; border-left-color: #6b7280; color: #374151; } /* 종료된 행사 안내(2026-09-29 검토 EVENT-02) */
.event-bar.is-ended .notice, .event-bar.is-ended .date { color: #374151; }
/* 일반 지도 첫 화면의 「진행 중」 행사 띠(2026-09-29 검토 EVENT-06) */
.event-strip { position: absolute; top: 64px; right: 12px; z-index: 5; display: flex; align-items: center; max-width: 440px; background: #fff7e0; border-left: 4px solid #b45309; border-radius: 10px; box-shadow: var(--shadow); font-size: 13px; }
.event-strip-link { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px 2px 8px 10px; color: #3a2a00; text-decoration: none; }
.event-strip-link .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.event-strip-link .tag { flex: none; font-size: 11px; font-weight: 700; color: #fff; background: #b45309; border-radius: 6px; padding: 1px 6px; }
.event-strip-x { flex: none; width: 36px; height: 36px; border: 0; background: transparent; color: #7c4a03; font-size: 18px; cursor: pointer; }
.is-interior .event-strip { display: none; }

/* ───── 우측 조작 단추 ───── */
.ctl { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 6px; z-index: 5; }
.ctl button {
  width: 40px; height: 40px; border: 0; border-radius: 10px; background: #fff; box-shadow: var(--shadow);
  cursor: pointer; font-weight: 700; font-size: 18px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink);
}
.ctl button:hover { background: #f3f5f9; }
.ctl button.is-on { background: var(--accent); color: #fff; }
.ctl #tilt.is-on { background: #fff; color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent), var(--shadow); } /* 가장 눈에 띄는 파란 단추가 3D 라 첫 조작이 엉뚱한 곳으로 가던 문제(2026-09-18) */
/* 세로가 낮은 화면(가로 폰·작은 노트북, 2026-09-18): 가운데 고정 기둥이 범례를 덮지 않게 위로 올리고, 아주 낮으면 +/− 를 숨긴다 */
@media (min-width: 721px) and (max-height: 640px) {
  .ctl { top: 76px; transform: none; }
  .legend { right: 64px; max-height: max(140px, calc(100vh - 430px)); overflow: auto; } /* 기둥 왼쪽·하한(2026-09-19: 463px 이하에서 0 이 되어 사라지던 문제) */
  .event-bar, .event-strip { right: 64px; } /* 위로 올린 기둥과 겹치지 않게(2026-09-19) */
  .floor-bar { left: 440px; right: 64px; max-width: none; } /* 안내판 오른쪽 ~ 기둥 왼쪽(2026-09-19: 844×390 에서 안내판·3D 단추에 덮이던 문제) */
}
@media (min-width: 721px) and (max-height: 480px) { .ctl #zoomIn, .ctl #zoomOut { display: none; } }
.ctl #hosp:not(.is-on) { color: #b0b6c3; }
.ctl #hosp:not(.is-on)::after { content: ''; position: absolute; width: 26px; height: 2px; background: #c1121f; transform: rotate(-45deg); border-radius: 1px; }
.ctl #hosp { position: relative; }
@media (min-width: 721px) { .ctl #hosp { display: none; } } /* 데스크톱은 위 옵션 줄 스위치만(2026-09-18: 같은 기능 토글이 둘이라 다른 기능으로 오해) */
.ctl #north svg { transition: transform .2s; }
.ctl #locate.is-busy svg { animation: spin 1s linear infinite; }

/* ───── 안내 패널 ───── */
.panel {
  position: absolute; left: 12px; top: 72px; bottom: 28px; width: 380px; max-width: calc(100% - 24px);
  background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); z-index: 6;
  display: flex; flex-direction: column; overflow: hidden;
}
.panel-head { padding: 16px 16px 12px; border-bottom: 1px solid var(--line); flex: none; }
.panel-title-row { display: flex; align-items: flex-start; gap: 8px; }
/* 제목 줄 오른쪽의 내부·외부 보기 단추(2026-09-18): 제목 첫 줄 높이(25px)에 맞춰 30px, 닫기(X)와 같은 줄. 폰에서는 아이콘만(아래 @media) */
.panel-acts { display: flex; gap: 6px; flex: none; margin: -3px 0 0; }
.panel-acts:empty { display: none; }
.hact {
  height: 30px; padding: 0 10px 0 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
  font: inherit; font-size: 12.5px; font-weight: 600; line-height: 1; display: inline-flex; align-items: center; gap: 5px; cursor: pointer; white-space: nowrap;
}
.hact svg { flex: none; color: var(--muted); }
.hact:hover { background: #f3f5f9; }
.hact.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.hact.is-on svg { color: #fff; }
.panel-title { margin: 0; font-size: 20px; line-height: 1.25; flex: 1; word-break: keep-all; }
.panel-title .num { color: var(--muted); font-weight: 500; font-size: 15px; margin-left: 6px; }
.panel-title:focus { outline: none; }
.panel-title:focus-visible { outline: 0; text-decoration: underline 3px var(--accent); text-underline-offset: 5px; } /* 검색 Enter 뒤 제목에 입력 칸 같은 초점 링이 붙던 것(PANEL-02) — 밑줄로 */
.panel-sub { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.panel-body { overflow: auto; padding: 12px 16px 18px; flex: 1; overscroll-behavior: contain; }
.panel-body::after { content: ''; position: sticky; bottom: -18px; display: block; height: 18px; margin-top: -18px; background: linear-gradient(transparent, #fff); pointer-events: none; } /* 아래에 더 있음 단서(단추가 바닥에 반쯤 걸치던 것, MOBILE-05) */

.summary { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; margin: 2px 0 10px; }
.summary .big { font-size: 22px; font-weight: 800; color: var(--accent-deep); }
.summary .meta { color: var(--muted); font-size: 13px; }
.summary .steps { color: var(--warn); font-size: 13px; }
.summary .steps.is-fallback { font-weight: 700; background: #fff1dc; border-radius: 6px; padding: 0 6px; } /* 계단 피하기 실패(ROUTE-07) */
.summary .big .buffer { font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 5px; } /* 여유 포함(1.5배, ROUTE-13) */
.summary .remain { color: var(--accent-deep); font-weight: 700; } /* 걷기: 남은 거리 */
.dir li.is-past .leg { opacity: .55; }
.dir li.is-current .leg { background: #eef3fc; box-shadow: inset 3px 0 0 var(--accent); }
.panel-next { display: none; margin: -4px 0 8px; font-size: 13px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* 접힌 시트에만: 다음 단계 한 줄(PANEL-01) */
.notice { background: #fff7e6; color: #7c4a03; border-radius: 8px; padding: 8px 10px; font-size: 13px; margin: 0 0 10px; }
/* 안내판 조작 요소(2026-09-18 통일, 사용자 지적 「높이가 일정하지 않고 통일성이 없다」): 경로 설정 두 칸(출발·계단 피하기) +
   동작 단추 격자(링크 복사·내부·외부·알리기). 전부 높이 40px·모서리 10px·같은 테두리·같은 글자. 예전 알약 칩은 select 가 든
   것만 키가 커서 줄마다 높이가 달랐고, 알리기 링크만 파란 글자였다. 단추는 두 칸씩 채우고 홀수면 마지막이 한 줄을 다 쓴다. */
.route-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 8px; }
.route-opts.is-single { grid-template-columns: 1fr; }
.opt, .act {
  box-sizing: border-box; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
  font: inherit; font-size: 13px; line-height: 1; display: flex; align-items: center; gap: 6px; min-width: 0; text-decoration: none; cursor: pointer;
}
.opt:hover, .act:hover { background: #f3f5f9; }
.opt svg, .act svg { flex: none; color: var(--muted); }
.opt { padding: 0 10px 0 12px; text-align: left; }
.opt-lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.opt-start { cursor: default; }
.opt-start .opt-lbl { color: var(--muted); flex: none; }
.opt-start .start-sel { flex: 1; min-width: 0; height: 38px; padding: 0 2px; font-size: 14px; color: var(--accent-deep); }
.opt-start .start-sel:focus { outline-offset: -2px; }
.opt-switch { justify-content: space-between; }
.opt-switch .opt-lbl { flex: 1; font-weight: 600; }
.opt-switch[aria-checked="true"] { border-color: var(--accent); }
.opt-switch[aria-checked="true"] svg { color: var(--accent); }
.opt-switch[aria-checked="true"] .sw { background: var(--accent); }
.opt-switch[aria-checked="true"] .sw::after { left: 16px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.act { flex: 1 1 calc(50% - 4px); justify-content: center; padding: 0 10px; font-weight: 600; white-space: nowrap; }

.dir { list-style: none; margin: 0; padding: 0; }
.dir li { padding: 0; }
.dir .leg { /* 단계는 진짜 단추(2026-09-18): 키보드로 닿고 Enter 로 그 구간을 지도에 비춘다 */
  display: flex; gap: 10px; align-items: flex-start; width: 100%; /* grid 였을 때 접힌 채 연 임베드 안내판을 펼치면 첫 단계 글 칸이 30px 로 남던 문제(2026-09-19) */
  padding: 9px 6px; border: 0; border-radius: 8px; background: transparent; font: inherit; font-size: 14px; line-height: 1.45; text-align: left; color: inherit; cursor: pointer;
}
.dir .leg .ico { flex: none; }
.dir .leg .txt { flex: 1 1 auto; min-width: 0; }
.dir .leg .dist { flex: none; }
.dir .leg:hover, .dir li.is-focus .leg { background: #f3f6fb; }
.dir li + li { border-top: 1px solid #f0f2f5; }
.dir .ico { width: 28px; height: 28px; border-radius: 50%; background: #eef3fc; color: var(--accent); display: inline-flex; align-items: center; justify-content: center; }
.dir .ico.steps { background: #fff1dc; color: var(--warn); }
.dir .ico.end { background: #fde2e2; color: #c1121f; }
.dir .ico.start { background: var(--accent); color: #fff; }
.dir .dist { color: var(--muted); font-size: 12px; white-space: nowrap; padding-top: 3px; }
.dir .txt b { font-weight: 700; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 0; }
.list .list-item { width: 100%; display: flex; justify-content: space-between; gap: 10px; padding: 9px 6px; border: 0; border-radius: 8px; background: transparent; font: inherit; font-size: 14px; text-align: left; color: inherit; cursor: pointer; }
.list .list-item:hover { background: #f3f6fb; }
.list li .sub { color: var(--muted); font-size: 12px; }
.list-group { margin: 12px 0 4px; font-size: 12px; color: var(--muted); font-weight: 700; letter-spacing: .02em; }

.start-note { color: var(--muted); font-size: 14px; line-height: 1.6; }

/* ───── 라벨 ───── */
.labels { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 2; }
.lbl {
  position: absolute; left: 0; top: 0; pointer-events: auto; cursor: pointer; will-change: transform;
  border: 0; border-radius: 6px; padding: 3px 6px; white-space: nowrap;
  background: rgba(255, 255, 255, .88); color: #1d2433; font-weight: 600; font-size: 12px; line-height: 1.2;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transform-origin: 50% 100%;
}
.lbl .lbl-num { color: var(--muted); font-weight: 500; margin-left: 4px; font-size: 11px; } /* 4.43:1 → 5.8:1 (2026-09-18) */
/* 건물 내부 보기 아이콘(이름표 옆, 2026-09-12): 파란 작은 집 모양, 누르면 바로 내부 보기 */
/* 이름표 옆 아이콘 둘(내부 보기·외부 보기): 같은 크기·색·세로 정렬(사용자 지적 2026-09-17 「정렬이 안 됐다, 색도 맞추자」) */
.lbl .lbl-int, .lbl .lbl-photo { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin: -3px 0 -3px 5px; border-radius: 5px; background: #fff; color: #5b6b83; border: 1px solid #c9d0db; box-sizing: border-box; cursor: pointer; vertical-align: middle; position: relative; z-index: 1; }
.lbl .lbl-int + .lbl-photo { margin-left: 3px; }
.lbl .lbl-int svg, .lbl .lbl-photo svg { width: 16px; height: 16px; display: block; }
@media (pointer: coarse) { .lbl .lbl-int, .lbl .lbl-photo { width: 28px; height: 28px; margin-top: -5px; margin-bottom: -5px; } }
.lbl .lbl-int:hover, .lbl .lbl-photo:hover { background: #eef3fc; color: var(--accent); border-color: var(--accent); }
/* 덜 확대했을 때(labels.js iconMinZoom 16.2 미만) 아이콘을 접어 이름표가 가볍게 — 선택한 건물과 마우스를 올린 이름표는 그대로(2026-09-18) */
.labels.is-far .lbl:not(.is-selected):not(:hover) .lbl-int, .labels.is-far .lbl:not(.is-selected):not(:hover) .lbl-photo { display: none; }
.is-interior .lbl .lbl-int, .is-interior .lbl .lbl-photo { display: none; }
.lbl:hover { background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .28); }
.lbl-gate { background: var(--accent); color: #fff; font-size: 12px; }
.lbl-landmark { background: rgba(255, 246, 219, .95); color: #6b4b00; font-weight: 500; }
/* 주차장 P 표식·진입구(2026-09-11): 표준 주차 표지처럼 파란 바탕 흰 P, 진입구는 파란 테 점(지하주차장 진입구는 속이 찬 점) */
/* 건물이 중심(사용자 요청 2026-09-11): 주차·정류장·체육시설 표식은 작고 옅게(채도 낮은 색, 반투명, 그림자 없음) */
.lbl-parking { background: rgba(93, 125, 178, .82); color: #fff; font-weight: 700; font-size: 10px; line-height: 14px; padding: 0; min-width: 16px; text-align: center; border-radius: 4px; box-shadow: none; }
.lbl-parking-entrance, .lbl-parking-entrance-ug { width: 10px; height: 10px; padding: 0; border-radius: 50%; background: rgba(255, 255, 255, .9); border: 2px solid rgba(93, 125, 178, .85); box-shadow: none; }
.lbl-parking-entrance-ug { background: rgba(93, 125, 178, .85); border-color: rgba(255, 255, 255, .9); box-shadow: 0 0 0 1px rgba(93, 125, 178, .85); }
.lbl-parking:hover, .lbl-parking-entrance:hover, .lbl-parking-entrance-ug:hover { box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.lbl-parking::before, .lbl-parking-entrance::before, .lbl-parking-entrance-ug::before, .lbl-bus::before, .lbl-venue::before, .lbl-sport::before { content: ''; position: absolute; inset: -6px; } /* 작은 표식의 누르는 영역만 24px 이상으로(2026-09-19) */
.lbl-parking-entrance::before, .lbl-parking-entrance-ug::before { inset: -8px; }
/* 버스 정류장·공연장·체육시설 표식(2026-09-11): 흰 알약에 색 아이콘 + 이름 */
.lbl-bus, .lbl-venue, .lbl-sport { display: inline-flex; align-items: center; gap: 3px; padding: 1px 6px 1px 4px; font-size: 11px; font-weight: 500; background: rgba(255, 255, 255, .85); box-shadow: none; opacity: 1; }
.lbl-bus.is-icon-only, .lbl-venue.is-icon-only, .lbl-sport.is-icon-only { padding: 2px; gap: 0; border-radius: 50%; }
.lbl.is-icon-only .lbl-text { display: none; }
.lbl .lbl-ico { width: 12px; height: 12px; flex: none; }
.lbl-bus { color: #3f6a69; } .lbl-venue { color: #75577d; } .lbl-sport { color: #4e6f4f; } /* 대비 4.5:1 이상(2026-09-18) */
.lbl-bus:hover, .lbl-venue:hover, .lbl-sport:hover { opacity: 1; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.legend i.lg-poi { background: transparent; border: 0; display: inline-flex; align-items: center; justify-content: center; }
.legend i.lg-poi svg { width: 14px; height: 14px; }
.legend i.lg-bus { color: #3f6a69; } .legend i.lg-venue { color: #75577d; } .legend i.lg-sport { color: #4e6f4f; }
.legend i.lg-p { background: rgba(93, 125, 178, .85); color: #fff; font-style: normal; font-weight: 700; font-size: 10px; line-height: 14px; text-align: center; border-color: transparent; }
.legend i.lg-pent { border-radius: 50%; background: #fff; border: 2px solid rgba(93, 125, 178, .85); width: 11px; height: 11px; }
.legend i.lg-pent-ug { background: rgba(93, 125, 178, .85); border-color: #fff; box-shadow: 0 0 0 1px rgba(93, 125, 178, .85); }
.lbl.is-selected { background: #ffc94d; color: #3a2a00; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
.lbl.is-selected .lbl-num { color: #3a2a00; } /* 노란 바탕의 번호 대비 3.77 → 11(VISUAL-02) */
.lbl-zone { background: transparent; box-shadow: none; color: #8a6d3b; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-shadow: 0 0 3px #fff, 0 0 6px #fff; pointer-events: none; } /* 세브란스 구역 이름(FIRSTUSE-04) */
.lbl.is-lifted::after {
  content: ''; position: absolute; left: 50%; top: 100%; width: 1px; height: var(--stem, 0px); background: rgba(29, 36, 51, .35);
}

/* ───── 마우스 풍선(이름표 없는 건물) ───── */
.tip { position: absolute; left: 0; top: 0; z-index: 4; pointer-events: none; background: rgba(29, 36, 51, .92); color: #fff; font-size: 12px; font-weight: 600; padding: 4px 8px; border-radius: 6px; white-space: nowrap; }
.tip .num { color: #c7d2e8; font-weight: 500; margin-left: 4px; }
.facts { color: var(--muted); font-size: 13px; margin: -2px 0 10px; }

/* ───── 범례 ───── */
.legend { position: absolute; right: 64px; bottom: 30px; z-index: 4; background: rgba(255, 255, 255, .93); border-radius: 10px; box-shadow: var(--shadow); font-size: 12px; max-width: 260px; }
.legend-toggle { border: 0; background: transparent; font-weight: 700; font-size: 12px; padding: 8px 12px; cursor: pointer; width: 100%; text-align: left; display: flex; justify-content: space-between; gap: 12px; color: var(--ink); }
.legend-toggle::after { content: '▾'; color: var(--muted); }
.legend.is-open .legend-toggle::after { content: '▴'; }
.legend-list { display: none; list-style: none; margin: 0; padding: 0 12px 10px; columns: 2; column-gap: 14px; }
.legend.is-open .legend-list { display: block; }
.legend li { display: flex; align-items: center; gap: 6px; padding: 2px 0; break-inside: avoid; white-space: nowrap; }
.legend-hosp { display: none; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px 10px; border-top: 1px solid var(--line); font-weight: 600; }
.legend.is-open .legend-hosp { display: none; }
.legend-sw { display: inline-flex; align-items: center; height: auto; padding: 0; border: 0; background: transparent; cursor: pointer; } /* inline-flex 여야 안의 .sw(span) 에 폭·높이가 먹는다 */
.lang-en .legend { max-width: min(380px, calc(100vw - 24px)); } /* 영문 범례: 「Underground parking entrance」까지 한 줄에 */
.legend i { width: 14px; height: 14px; border-radius: 3px; border: 1px solid rgba(0, 0, 0, .14); flex: none; }
.legend i.lg-hosp { border-color: rgba(0, 0, 0, .35); position: relative; } /* 흰 병원 견본이 바탕과 1.03:1 이라 빈 상자로 보이던 것 — 테두리·작은 십자(건물 색은 그대로, VISUAL-03) */
.legend i.lg-hosp::after { content: ''; position: absolute; inset: 3px 5px; background: linear-gradient(#c1121f, #c1121f) center / 100% 2px no-repeat, linear-gradient(#c1121f, #c1121f) center / 2px 100% no-repeat; }
.legend .legend-sub { display: none; margin: 0; padding: 2px 12px 2px; font-size: 11px; font-weight: 700; color: var(--muted); } /* 「표식」 소제목(VISUAL-10) */
.legend.is-open .legend-sub { display: block; }
.legend.is-open .legend-list:not(.legend-marks) { padding-bottom: 4px; }

/* ───── 기타 ───── */
/* 출처 표기: OpenStreetMap ODbL 요구 사항이라 없애지 않고 최소 크기로 둔다. 넓은 화면은 옅은 작은 글씨, 폰은 ⓘ 로 접는다 */
.attrib { position: absolute; right: 6px; bottom: 4px; font-size: 10px; line-height: 1.2; color: #4b5563; z-index: 3; display: flex; align-items: center; gap: 4px; }
.attrib-text { background: rgba(255, 255, 255, .85); border-radius: 4px; padding: 0 3px; } /* 이름표와 겹칠 때 읽히게(VISUAL-07) */
.attrib a { color: inherit; text-decoration: none; }
.attrib a.attrib-help { text-decoration: underline; } /* 도움말(링크·붙여 쓰기·행사 요청, 2026-09-29 CONTENT-01) */
.attrib-toggle { display: none; width: 18px; height: 18px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .8); color: #6b7280; font-size: 12px; line-height: 18px; padding: 0; cursor: pointer; }
.attrib.is-open .attrib-toggle { background: #fff; }
.toast-btn { margin-left: 10px; border: 0; border-radius: 6px; padding: 4px 10px; background: #fff; color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.toast-copy { display: block; width: 100%; margin-top: 8px; padding: 6px 8px; border: 0; border-radius: 6px; font: inherit; font-size: 13px; color: var(--ink); background: #fff; } /* 수동 복사 글상자(EMBEDSHARE-01) */
.toast:has(.toast-copy) { width: min(92vw, 520px); }
.toast-qr { background: #fff; border-radius: 8px; padding: 6px; width: 200px; height: 200px; margin: 0 auto 8px; } /* QR(FEATUREGAP-06) */
.toast-qr svg { width: 100%; height: 100%; display: block; }
.toast-qr-row { display: flex; justify-content: center; align-items: center; gap: 8px; }
.toast-qr-row .toast-btn { margin-left: 0; text-decoration: none; }
.toast:has(.toast-qr) { text-align: center; }
.toast-x { margin-left: 6px; border: 0; background: transparent; color: #fff; font-size: 18px; line-height: 1; width: 28px; height: 28px; cursor: pointer; vertical-align: middle; } /* 새 판 알림 닫기(ROBUSTNESS-12) */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.loader p { max-width: min(520px, calc(100vw - 32px)); margin: 0; text-align: center; overflow-wrap: anywhere; line-height: 1.5; } /* 폰 화면 밖으로 잘리던 긴 오류 문구(ROBUSTNESS-04) */
.loader a.loader-btn { text-decoration: none; }
.toast {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 8; width: max-content; /* max-content: left 50% 에서 폭이 화면 절반으로 눌려 폰 안내가 4~5줄로 꺾이던 것(2026-09-29 검토 VISUAL-05) */
  background: rgba(29, 36, 51, .92); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; max-width: calc(100% - 32px); line-height: 1.45; word-break: keep-all;
}
.loader {
  position: absolute; inset: 0; z-index: 9; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: var(--bg); color: var(--muted); font-size: 14px;
}
.loader-btn { border: 0; border-radius: 8px; padding: 8px 14px; background: var(--accent); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #d9dce3; border-top-color: var(--accent); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.noscript { position: absolute; inset: 0; z-index: 10; display: grid; place-items: center; background: var(--bg); padding: 24px; text-align: center; }
.maplibregl-ctrl-attrib, .maplibregl-ctrl-logo { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; }
}
.photo-view.is-loading .photo-box::after { content: ''; position: absolute; left: 50%; top: 40%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .3); border-top-color: #fff; animation: spin .9s linear infinite; } /* 사진 받는 중(PHOTOS-02) */
.photo-box img { width: auto; height: auto; }
/* 가로 iPhone 노치·홈 표시줄(MOBILE-08): viewport-fit=cover 라 안전 영역만큼 띄운다 */
@supports (padding: max(0px)) {
  .topbar { left: max(12px, env(safe-area-inset-left)); right: max(64px, env(safe-area-inset-right)); }
  .ctl { right: max(12px, env(safe-area-inset-right)); }
  .attrib { right: max(6px, env(safe-area-inset-right)); bottom: max(4px, env(safe-area-inset-bottom)); }
  .legend { right: max(64px, calc(env(safe-area-inset-right) + 52px)); } /* 조작 기둥(오른쪽 12~52px) 왼쪽 — 영문 범례가 세로로 길어 1366×768 에서 3D·북쪽·내 위치·전체 보기 단추 밑에 깔리던 것(2026-09-29 검토 MAINTAINABILITY-06) */
}

/* ───── 좁은 화면(폰) ───── */
@media (max-width: 720px) {
  .topbar { right: 12px; flex-wrap: wrap; }
  .brand-text { display: none; } /* 폰: 행사 안내판의 상표 글자는 숨기고(아이콘만), 캠퍼스 드롭다운은 짧은 이름(신촌/국제)으로 남는다 */
  .brand { gap: 6px; padding: 0 8px 0 10px; }
  .search { flex: 1 1 0; }  /* 폰: 로고 옆에 검색이 같은 줄에 남도록 기준 너비 0 */
  /* 폰: 옵션 줄이 화면을 벗어나지 않게(사용자 지적 2026-09-11) — 글자 대신 아이콘, 세브란스 스위치는 아래쪽 조작 단추(같은 기능)로만 */
  .opts { flex-basis: 100%; gap: 6px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .opts::-webkit-scrollbar { display: none; }
  .opt-toggle, .start, .lang-btn { height: 38px; font-size: 13px; }
  .ico-sm { display: inline-block; }
  .opt-toggle > span { display: none; }
  .start { gap: 4px; padding: 0 4px 0 10px; } /* 「출발」 글자는 폰에도 남긴다(2026-09-18: 아이콘만으로는 출발 선택인지 알기 어렵다) */
  .start > span { font-size: 12px; }
  .start-sel { padding: 6px 2px; height: 100%; }
  /* 터치 타깃(2026-09-18): 32px 아이콘 단추·18px 출처·22px 손잡이를 44px 급으로 — 보이는 크기는 두고 누르는 영역만 넓힌다 */
  .hact, #closePanel, .attrib-toggle, .brand-home { position: relative; } /* #listBtn 은 검색창 안 absolute 그대로(relative 로 바꾸면 검색 줄이 깨진다) */
  .hact::before, #closePanel::before, #listBtn::before, .attrib-toggle::before, .brand-home::before { content: ''; position: absolute; inset: -6px; }
  .brand-home::before { inset: -11px; }
  .attrib-toggle::before { inset: -8px; }
  /* 걸으며 보는 사람에겐 단계가 먼저(2026-09-18): 요약·사실 다음에 단계 목록, 출발·계단·공유·알리기는 그 아래로 */
  .panel-body { display: flex; flex-direction: column; }
  .panel-body > * { flex: none; }
  .panel-body .dir { order: 1; }
  .panel-body .route-opts { order: 0; margin: 0 0 8px; } /* 출발·계단 피하기는 요약 바로 아래 한 줄(2026-09-19: 단계 아래로 밀려 접힌 영역 밖이던 문제) */
  .panel-body .route-opts .opt, .panel-body .actions .act { height: 34px; } /* 폰은 조작 요소를 34px 로 통일(요약 아래 한 줄) */
  body.is-panel-open .toast { bottom: calc(46vh + 14px); } /* 토스트가 단계 목록을 덮지 않게 안내판 위로(2026-09-19) */
  body.is-panel-open.is-panel-collapsed .toast { bottom: 192px; }
  .panel-body .actions { order: 3; }
  .panel-body .start-note { order: 4; }
  .opt-toggle { gap: 6px; padding: 0 8px 0 10px; }
  .opt-toggle[aria-checked="true"] .ico-sm { color: var(--accent); }
  #hospTop { display: none; }
  /* 폰(2026-09-18): 손가락 확대가 기본이라 +/− 를 숨기고, 세브란스 스위치는 범례 안으로 — 오른쪽 단추 기둥이 이름표를 덜 가린다 */
  .ctl #zoomIn, .ctl #zoomOut, .ctl #hosp { display: none; }
  .legend.is-open .legend-hosp { display: flex; }
  .lang-btn { padding: 0 10px; }
  .search input { font-size: 16px; }
  .suggest li[role="option"] { flex-wrap: wrap; row-gap: 1px; } /* 폰: 부제는 둘째 줄로(이름 칸을 넓게) */
  .suggest li[role="option"] .sub { flex-basis: 100%; }
  .ctl { top: auto; bottom: 24px; transform: none; }
  .ctl.is-panel-open { bottom: calc(46vh + 12px); }
  .panel {
    left: 0; right: 0; top: auto; bottom: 0; width: auto; max-width: none; max-height: 46vh; max-height: 46svh; /* svh: iOS 도구 막대 접힘과 무관한 작은 뷰포트(MOBILE-09) */
    padding-bottom: env(safe-area-inset-bottom);
    border-radius: 16px 16px 0 0; box-shadow: 0 -6px 24px rgba(20, 30, 60, .18);
  }
  .panel-head { padding: 12px 14px 10px; }
  .panel-acts { margin-top: -4px; }
  .hact { width: 32px; height: 32px; padding: 0; justify-content: center; }
  .hact span { display: none; }
  .panel-title { font-size: 18px; }
  .panel-body { padding: 10px 14px 16px; }
  .attrib-toggle { display: inline-block; }
  .floor-bar { top: 112px; left: 12px; right: 12px; max-width: none; }
  .floor-bar b { display: none; } /* 폰: 건물 이름(폭 1/3)을 빼고 층 칩 자리를 늘린다 — 이름은 안내판 제목에 있다(MOBILE-02) */
  .floor-bar button { min-height: 40px; }
  body.is-hosp-hidden .ctl #hosp { display: inline-flex; } /* 세브란스를 숨긴 동안만 기둥에 되돌리기 단추(MOBILE-13) */
  .lang-en .legend-list { columns: 1; } /* 폰 영문 범례: 두 단으로는 「Underground parking entry」가 잘려 한 단으로(접힌 채 시작하므로 길어도 됨) */
  .attrib .attrib-text { display: none; background: rgba(255, 255, 255, .9); padding: 2px 6px; border-radius: 6px; font-size: 10px; }
  .attrib.is-open .attrib-text { display: inline; }
  .legend { left: 8px; right: auto; bottom: 30px; max-width: 200px; }
  .event-bar { top: 108px; right: 12px; left: 12px; max-width: none; padding: 6px 10px; font-size: 12px; line-height: 1.4; }
  .event-strip { top: 108px; right: 12px; left: 12px; max-width: none; font-size: 12px; }
  body.is-panel-open .event-strip { display: none; } /* 폰: 안내판이 열리면 띠는 비킨다 */
  .event-bar b { font-size: 13px; }
  .event-bar .date { display: inline; margin-left: 6px; }
  .is-event .panel { top: auto; }
  .legend.is-panel-open { display: none; }
  .attrib { left: 8px; right: auto; bottom: 8px; }
  .attrib.is-panel-open { bottom: calc(46vh + 8px); }
  .is-panel-collapsed .attrib.is-panel-open { bottom: 186px; } /* 접힌 안내판 위로(지도 한가운데 홀로 떠 있던 것, MOBILE-06) */
  body.is-legend-open .toast { bottom: calc(var(--legend-h, 0px) + 44px); } /* 범례를 펼친 동안 토스트가 범례를 덮지 않게(MOBILE-01) */
  .fl-legend { z-index: 7; } /* 내부 보기 범례가 안내판(z 6)에 덮여 못 누르던 것(INTERIOR-08) */
  .suggest { max-height: min(var(--vvh, 60vh), 420px); } /* 키보드가 올라온 높이에 맞춘다(MOBILE-15) */
}

/* 임베드 모드(?embed=1, 2026-09-12): 상표 줄을 접고 「큰 화면으로 열기」 링크만 오른쪽에 둔다. 범례는 JS 가 숨긴다 */
.open-full { display: inline-flex; align-items: center; height: 42px; padding: 0 12px; border-radius: 12px; background: #fff; box-shadow: var(--shadow); font-size: 14px; font-weight: 700; color: var(--accent); text-decoration: none; white-space: nowrap; }
.open-full[hidden] { display: none; }
.is-embed .brand { display: none; }
@media (max-width: 1000px) { .lang-en .brand-text { display: none; } }
@media (min-width: 721px) and (max-width: 900px) { .opt-toggle > span { display: none; } .opt-toggle { gap: 6px; padding: 0 10px; } .opt-toggle .ico-sm { display: inline-block; } } /* 글자를 숨기는 폭에서는 병원 아이콘을 보인다(아이콘 없는 54px 토글이던 것, EMBEDSHARE-08) */ /* 세브란스 스위치는 글자 없이(2026-09-19: 영문 844px 에서 검색창 121px) */ /* 영문 상표 글자는 1000px 이하에서 숨긴다(드롭다운은 JS 가 짧은 이름으로, 2026-09-19) */
@media (min-width: 721px) and (max-width: 1000px) { .event-bar { max-width: calc(100vw - 440px); } } /* 태블릿: 배너가 안내판 닫기 단추를 덮지 않게(2026-09-19) */
.lang-en .opt-switch .opt-lbl { font-size: 12px; letter-spacing: -.01em; } /* 「Avoid stairs」 87px 가 84px 칸에서 잘림(2026-09-19, 기본이 이미 13px) */
.lang-en .legend-list { columns: 1; } /* 영문 범례 380px → 한 단(2026-09-19) */
.is-embed .update-banner { display: none; }
/* 작은 임베드(2026-09-18): 높이 520 이하에서는 출발·세브란스·EN 을 숨기고 「큰 화면으로 열기」만 검색 줄 옆에 둔다(옵션 줄 한 줄을 지도에 돌려준다) */
@media (max-height: 520px) { .is-embed .opts { flex-basis: auto; overflow: visible; } .is-embed .start, .is-embed #hospTop { display: none; } .is-embed #langBtn { padding: 0 8px; } } /* EN 단추는 남긴다 — 한국어 브라우저의 외국인이 바꿀 길이 없었다(EMBEDSHARE-08) */
@media (max-width: 720px) { .open-full { height: 38px; font-size: 13px; padding: 0 10px; } }

/* 건물 사진 창(사용자 요청 2026-09-17 「건물 외부 보기」): 지도 위에 사진 한 장 + 이름·저작권 표시. 여러 장이면 ‹ › 로 넘긴다 */
.photo-view { position: fixed; inset: 0; z-index: 60; background: rgba(20, 24, 32, 0.78); display: flex; align-items: center; justify-content: center; padding: 16px; }
.photo-view[hidden] { display: none; }
.photo-box { position: relative; max-width: min(1100px, 96vw); max-height: 92vh; display: flex; flex-direction: column; background: #111; border-radius: 14px; overflow: hidden; box-shadow: 0 12px 40px rgba(0,0,0,.45); }
.photo-box img { display: block; max-width: 96vw; max-height: calc(92vh - 64px); height: auto; object-fit: contain; background: #000; }
.photo-cap { padding: 8px 56px 10px 14px; color: #fff; font-size: 14px; line-height: 1.4; }
.photo-cap small { color: #cfd6e4; font-size: 12px; }
.photo-cap a { color: #9ec1ff; }
.photo-btn { position: absolute; border: 0; border-radius: 50%; width: 40px; height: 40px; background: rgba(255,255,255,.9); color: #222; font-size: 26px; line-height: 40px; text-align: center; cursor: pointer; box-shadow: var(--shadow); }
.photo-close { top: 10px; right: 10px; font-size: 24px; }
.photo-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.photo-next { right: 10px; top: 50%; transform: translateY(-50%); }
.photo-btn[hidden] { display: none; }
.photo-view.is-broken img { min-width: 260px; min-height: 160px; color: #ddd; font-size: 14px; text-align: center; line-height: 160px; } /* 사진 파일 실패: 깨진 상자 대신 자리표시(2026-09-18) */
@media (max-width: 720px) { .photo-view { padding: 8px; } .photo-box { max-height: 96vh; } .photo-box img { max-height: calc(96vh - 70px); } }

/* 고대비(Windows forced-colors, 2026-09-29 검토 A11Y-02): 스위치 트랙·손잡이가 둘 다 흰색이 되고 범례 견본·선택 이름표 색이 사라졌다 → 시스템 색으로 켜짐/꺼짐을 가른다 */
@media (forced-colors: active) {
  .sw, .sw::after { forced-color-adjust: none; }
  .sw { background: Canvas; border: 1px solid ButtonText; }
  .sw::after { background: ButtonText; box-shadow: none; top: 1px; }
  .opt-switch[aria-checked="true"] .sw, .opt-toggle[aria-checked="true"] .sw, .legend-sw[aria-checked="true"] .sw { background: Highlight; border-color: Highlight; }
  .opt-switch[aria-checked="true"] .sw::after, .opt-toggle[aria-checked="true"] .sw::after, .legend-sw[aria-checked="true"] .sw::after { background: HighlightText; }
  .legend i, .fl-legend i, .lbl.is-selected, .lbl-gate { forced-color-adjust: none; }
  .lbl.is-selected { outline: 3px solid Highlight; outline-offset: 1px; }
  .ctl button.is-on, .hact.is-on, .floor-bar button.is-on, .ctl #tilt.is-on { outline: 3px solid Highlight; outline-offset: -3px; }
  .dir li.is-focus .leg { outline: 2px solid Highlight; }
}
/* 접근성(2026-09-17): 키보드 초점을 눈에 보이게 — 단추·링크·칩·이름표 공통 */
button:focus-visible, a:focus-visible, [tabindex]:focus-visible, .lbl:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* 폰 안내판 접기(2026-09-17): 위쪽 손잡이를 누르거나 아래로 쓸면 제목·요약만 남기고 접혀 지도가 보인다 */
.panel-handle { display: none; }
@media (max-width: 720px) {
  .panel-handle { display: block; width: 100%; height: 34px; margin: -12px 0 -4px; padding: 0; border: 0; background: transparent; cursor: pointer; touch-action: none; } /* 누르는 높이 22 → 34px(2026-09-18), 차지하는 자리는 그대로 */
  .panel-handle .bar { display: block; width: 44px; height: 5px; margin: 0 auto; border-radius: 3px; background: #c9ced8; }
  .panel.is-collapsed { max-height: 178px; } /* 150 → 178: 다음 단계 한 줄(PANEL-01) */
  .panel.is-collapsed .panel-next { display: block; }
  .panel.is-collapsed .panel-body { overflow: hidden; }
  .is-panel-collapsed .ctl.is-panel-open { bottom: 190px; }
}
/* 내부 보기 방 용도 범례(2026-09-24 「평면도 보기를 획기적으로」): 건물 범례 자리(내부 보기 중에는 건물 범례가 숨는다)에 같은 모양으로 */
.fl-legend { position: absolute; right: 64px; bottom: 30px; z-index: 4; background: rgba(255, 255, 255, .94); border-radius: 10px; box-shadow: var(--shadow); font-size: 12px; max-width: 240px; }
.fl-legend[hidden] { display: none; }
.fl-legend-toggle { border: 0; background: transparent; font-weight: 700; font-size: 12px; padding: 8px 12px; cursor: pointer; width: 100%; text-align: left; display: flex; justify-content: space-between; gap: 12px; color: var(--ink); }
.fl-legend-toggle::after { content: '▾'; color: var(--muted); }
.fl-legend.is-open .fl-legend-toggle::after { content: '▴'; }
.fl-legend ul { display: none; list-style: none; margin: 0; padding: 0 12px 10px; columns: 2; column-gap: 14px; }
.fl-legend.is-open ul { display: block; }
.fl-legend li { display: flex; align-items: center; gap: 6px; padding: 2px 0; break-inside: avoid; white-space: nowrap; }
.fl-legend i { width: 14px; height: 14px; border-radius: 3px; border: 1px solid rgba(0, 0, 0, .14); flex: none; }
.lbl-room .lbl-ico { width: 11px; height: 11px; margin-right: 2px; color: #3b4a6b; }
@media (max-width: 720px) { .fl-legend { left: 8px; right: auto; bottom: 30px; max-width: 200px; } }
.end-tag { pointer-events: none; font-size: 11px; font-weight: 700; line-height: 1.5; color: #fff; background: #d62828; padding: 0 6px; border-radius: 4px; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); white-space: nowrap; } /* 도착 출입구 이름표(ROUTE-05①) */
.panel-body .links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: -2px 0 10px; font-size: 13px; } /* 홈페이지·전화(FEATUREGAP-26) */
.panel-body .links a { color: var(--accent, #0B57C2); text-decoration: none; font-weight: 600; }
.panel-body .links a:hover, .panel-body .links a:focus-visible { text-decoration: underline; }
/* 인쇄(2026-09-29 검토 FEATUREGAP-05): 인쇄 동안 지도를 A4 폭(700×452px ≈ 186×120mm)으로 고정하고 캔버스 대신 그 순간의 그림을 찍는다 — 이름표(HTML)는 그 위에 그대로 맞는다.
   안내판은 지도 아래로 흘러 단계 전부, 조작 단추·검색줄·범례·토스트는 뺀다 */
.print-map, .print-link { display: none; }
.is-printing .map { position: fixed; left: 0; top: 0; right: auto; bottom: auto; width: 700px; height: 452px; }
@media print {
  @page { size: A4; margin: 12mm; }
  html, body { height: auto !important; overflow: visible !important; background: #fff !important; }
  .app { height: auto !important; overflow: visible !important; }
  .topbar, .opts, .ctl, .legend, .attrib, .toast, .loader, .suggest, .event-strip, .floor-bar, .photo-view, .tip, .skip-link, .panel-handle, #closePanel, .panel-acts, .panel .actions, .panel .route-opts, .panel-next { display: none !important; }
  .map, .is-printing .map { position: relative !important; inset: auto !important; width: 700px !important; height: 452px !important; border: 1px solid #d1d5db; break-inside: avoid; }
  .is-printing .maplibregl-canvas { visibility: hidden; }
  .is-printing .print-map[src] { display: block; position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
  .event-bar { position: static !important; box-shadow: none !important; margin: 0 0 6px; }
  .panel, .panel[hidden] { position: static !important; inset: auto !important; transform: none !important; width: auto !important; max-width: none !important; max-height: none !important; box-shadow: none !important; border: 0 !important; margin-top: 8px; overflow: visible !important; }
  .panel[hidden] { display: none !important; }
  .panel-body { overflow: visible !important; max-height: none !important; padding: 8px 0 0 !important; }
  .panel-body::after { display: none !important; }
  .panel .dir li { break-inside: avoid; }
  .print-link { display: block; margin: 10px 0 0; font-size: 11px; color: #374151; word-break: break-all; }
}
/* 범례 용도 강조(2026-09-29 검토 FEATUREGAP-19): 항목이 단추 — 누르면 그 용도만 제 색 */
.legend .lg-use { display: flex; align-items: center; gap: 6px; width: 100%; padding: 1px 4px; margin: 0 -4px; border: 0; border-radius: 5px; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; white-space: nowrap; }
.legend .lg-use:hover { background: rgba(11, 87, 194, .08); }
.legend .lg-use[aria-pressed="true"] { background: rgba(11, 87, 194, .14); font-weight: 700; }
.legend .lg-use .lg-n { color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
@media (forced-colors: active) { .legend .lg-use[aria-pressed="true"] { outline: 2px solid Highlight; } }
/* 가까운 정류장(2026-09-29 검토 FEATUREGAP-07): 이름이 링크처럼 — 누르면 그 정류장 안내판 */
.panel-body .near-stops { margin: -4px 0 10px; font-size: 13px; color: var(--muted); }
.panel-body .near-stops .link-btn { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: var(--accent); cursor: pointer; }
.panel-body .near-stops .link-btn:hover, .panel-body .near-stops .link-btn:focus-visible { text-decoration: underline; }
.lbl .lbl-alt { display: block; font-size: 10px; font-weight: 500; line-height: 1.2; opacity: .8; } /* 영문판 고른 이름표의 한글 이름(FEATUREGAP-17) */

