/* 캠퍼스 지도 보기 (map.js) */
#campus-board[hidden], .cm[hidden] { display: none !important; }
.cm-switch { display: flex; gap: .25em; width: 90%; max-width: 1440px; margin: 0 auto 1.5em; padding: .3em; box-sizing: border-box;
  background: #191c800f; border-radius: 2em; }
.cm-tab { flex: 1; height: 2.6em; border: 0; border-radius: 2em; background: none; color: var(--maintxt); font: inherit; font-size: 1.05em; font-weight: 600; cursor: pointer;
  transition: background-color .2s ease-out, color .2s ease-out; }
.cm-tab.on { background: var(--primary); color: #fff; }
.cm-tab:hover:not(.on) { background: #191c801f; }
@media (min-width: 768px) { .cm-switch { max-width: 420px; } }

.cm { width: 90%; max-width: 1440px; margin: 0 auto; }
.cm-lead { margin: 0 0 .8em; color: var(--subtxt); font-size: 1em; }
.cm-grid { display: grid; gap: 1.25em; }
@media (min-width: 992px) { .cm-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; }
  .cm-card { position: sticky; top: 100px; } }

.cm-map { position: relative; border-radius: 12px; overflow: hidden; background: #e7e9ef; }
.cm-map img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.cm-pin { position: absolute; transform: translate(-50%, -50%); border: 0; background: none; padding: 0; cursor: pointer; min-width: 44px; min-height: 44px;
  display: grid; place-items: center; -webkit-tap-highlight-color: transparent; }
.cm-pin i, .cm-pin span { font-style: normal; font-weight: 700; color: #fff; background: var(--primary); border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.35); transition: transform .15s ease-out, background-color .15s ease-out; }
.cm-pin i { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-size: 13px; }
.cm-pin span { display: none; }
.cm-pin[aria-pressed="true"] i, .cm-pin[aria-pressed="true"] span { background: var(--sub); transform: scale(1.12); }
.cm-pin:focus-visible { outline: none; }
.cm-pin:focus-visible i, .cm-pin:focus-visible span { outline: 3px solid var(--primary); outline-offset: 2px; }
@media (min-width: 768px) {
  .cm-pin i { display: none; }
  .cm-pin span { display: block; padding: .4em .85em; border-radius: 2em; font-size: .95em; white-space: nowrap; }
  .cm-pin:hover span { transform: scale(1.06); }
}

.cm-chips { display: flex; flex-wrap: wrap; gap: .5em; margin-top: .75em; }
.cm-chip { min-height: 40px; padding: 0 .9em; border: 1px solid var(--line1); border-radius: 2em; background: #fff; color: var(--maintxt); font: inherit; font-size: .95em; cursor: pointer; }
.cm-chip[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.cm-chip:focus-visible, .cm-floor:focus-visible, .cm-tab:focus-visible, .cm-link:focus-visible, .cm-nav:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
@media (min-width: 768px) { .cm-chips { display: none; } }

.cm-card { background: #fff; border: 1px solid var(--line1); border-radius: 12px; padding: 1.1em; scroll-margin-top: 90px; }
.cm-head { display: flex; align-items: center; gap: .5em; }
.cm-num { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 700; font-size: 13px; }
.cm-title { margin: 0; font-size: 1.35em; line-height: 1.3; color: var(--maintxt); }
.cm-desc { margin: .4em 0 .9em; color: var(--subtxt); line-height: 1.6; word-break: keep-all; }
.cm-floors { display: grid; grid-template-columns: 1fr 1fr; gap: .5em; margin-bottom: .6em; }
.cm-floor { display: flex; flex-direction: column; align-items: flex-start; gap: .2em; padding: .7em .85em; border: 1px solid var(--line1); border-radius: 10px;
  background: #fff; color: var(--maintxt); font: inherit; text-align: left; cursor: pointer; transition: background-color .2s ease-out, border-color .2s ease-out; }
.cm-floor b { font-size: 1.1em; }
.cm-floor small span { white-space: nowrap; }
.cm-floor small { font-size: .82em; line-height: 1.45; color: var(--subtxt); word-break: keep-all; }
.cm-floor.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.cm-floor.on small { color: #dfe0f5; }
.cm-hint { margin: .2em 0 .6em; font-size: .9em; color: var(--subtxt); }
.cm-hint:empty { display: none; }

.cm-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: .6em; }
.cm-tile { position: relative; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: #e7e9ef; cursor: pointer; text-align: left; }
.cm-tile img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .25s ease-out; }
.cm-tile-t { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; padding: 1.6em .6em .5em;
  background: linear-gradient(transparent, rgba(0,0,0,.72)); color: #fff; }
.cm-tile-t b { font-size: .98em; line-height: 1.3; word-break: keep-all; }
.cm-tile-t small { font-size: .78em; opacity: .9; }
.cm-tile:hover img { transform: scale(1.04); }
.cm-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4em; }
.cm-thumbs.one { grid-template-columns: 1fr; }
.cm-thumb { padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: #e7e9ef; cursor: zoom-in; }
.cm-thumb img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .25s ease-out; }
.cm-thumbs.one .cm-thumb img { aspect-ratio: 16 / 9; }
.cm-thumb:first-child { grid-column: 1 / -1; }
.cm-thumb:first-child img { aspect-ratio: 16 / 9; }
.cm-thumb:hover img { transform: scale(1.04); }
.cm-tile:focus-visible, .cm-thumb:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.cm-lb-x:focus { outline: none; } .cm-lb-x:focus-visible { box-shadow: 0 0 0 3px #fff; }

/* 크게 보기 */
html.cm-lock, html.cm-lock body { overflow: hidden; }
.cm-lb { position: fixed; inset: 0; z-index: 2147483000; background: rgba(10,12,30,.96); display: flex; flex-direction: column; }
.cm-lb[hidden] { display: none; }
.cm-lb-top { display: flex; align-items: center; gap: .8em; padding: max(.6em, env(safe-area-inset-top)) .8em .6em 1em; color: #fff; }
.cm-lb-name { flex: 1; min-width: 0; font-weight: 700; font-size: 1.05em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-lb-cnt { font-size: .9em; opacity: .85; }
.cm-lb-x { position: relative; flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); cursor: pointer; }
.cm-lb-x::before, .cm-lb-x::after { content: ""; position: absolute; left: 50%; top: 50%; width: 18px; height: 2px; background: #fff; }
.cm-lb-x::before { transform: translate(-50%,-50%) rotate(45deg); } .cm-lb-x::after { transform: translate(-50%,-50%) rotate(-45deg); }
.cm-lb-rail { direction: ltr; flex: 1; min-height: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior: contain; }
.cm-lb-rail::-webkit-scrollbar { display: none; }
.cm-lb-rail figure { flex: 0 0 100%; margin: 0; display: grid; place-items: center; scroll-snap-align: start; padding: 0 0 max(1em, env(safe-area-inset-bottom)); box-sizing: border-box; }
.cm-lb-rail img { max-width: 100%; max-height: 100%; object-fit: contain; }
.cm-lb .cm-nav { top: 50%; }
.cm-lb .cm-nav:disabled { opacity: .3; cursor: default; }
.cm-lb .cm-nav[hidden] { display: none; }
@media (min-width: 768px) { .cm-lb .cm-prev { left: 1.2em; } .cm-lb .cm-next { right: 1.2em; } .cm-lb-rail figure { padding: 0 5em 2em; } }
@media (prefers-reduced-motion: reduce) { .cm-tab, .cm-pin i, .cm-pin span, .cm-tile img, .cm-thumb img, .cm-floor { transition: none; } }
.cm-nav { position: absolute; z-index: 2; transform: translateY(-50%); width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.92); cursor: pointer;
  box-shadow: 0 1px 6px rgba(0,0,0,.25); }
.cm-nav::before { content: ""; display: block; width: 10px; height: 10px; margin: auto; border: solid var(--maintxt); border-width: 0 2px 2px 0; }
.cm-prev { left: .5em; } .cm-prev::before { transform: translateX(2px) rotate(135deg); }
.cm-next { right: .5em; } .cm-next::before { transform: translateX(-2px) rotate(-45deg); }
@media (min-width: 600px) and (max-width: 991px) { .cm-tiles { grid-template-columns: repeat(4, 1fr); } .cm-thumbs { grid-template-columns: repeat(5, 1fr); } }
.cm-lb-x, .cm-lb-x:focus, .cm-lb-x:focus-visible { outline: none !important; }
@media (max-width: 599px), (min-width: 992px) { .cm-thumb:last-child:nth-child(3n+2) { grid-column: 1 / -1; } .cm-thumb:last-child:nth-child(3n+2) img { aspect-ratio: 16 / 9; } }
