/* 구역 사이를 걸어가는 길(F44). 실습실 지도 네 변의 이웃 구역 길과 표지, 내 위치 점. 색은 tokens.css 변수만 쓴다. */
.ways { display: grid; gap: 6px; }
.ways-mid { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 6px; }
.way { display: flex; align-items: center; justify-content: center; gap: 4px; min-width: 0; }
.way-up { flex-direction: column-reverse; }
.way-down { flex-direction: column; }
.way-left { flex-direction: row-reverse; }
.way-up.way-none, .way-down.way-none { display: none; }
.ways-mid .way-none { visibility: hidden; }  /* 빈 쪽도 칸 차례를 지켜 지도가 늘 가운데 칸에 있게 */
.ways { flex: 1 1 auto; }
.ways-place > .map-frame { height: 100%; }
.ways-center {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  padding: 0 16px;
  border-radius: var(--radius-inner);
  background: var(--stage-deep);
  color: var(--stage-text);
  font-size: var(--size-sub);
}

.way-road { flex: 0 0 auto; background: var(--map-route); border-radius: var(--radius-pill); }
.way-up .way-road, .way-down .way-road { width: 3px; height: 14px; }
.way-left .way-road, .way-right .way-road { width: 14px; height: 3px; }

.way-sign {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch);
  padding: 0 12px;
  border: 1px solid var(--purple-on-stage-line);
  border-radius: var(--radius-pill);
  background: var(--stage-card);
  color: var(--stage-text);
  font-size: var(--size-tag);
  text-decoration: none;
  white-space: nowrap;
}
a.way-sign:hover { border-color: var(--purple-light); }
a.way-sign:focus-visible { outline: 2px solid var(--purple-light); outline-offset: 2px; }
.way-sign.soon { color: var(--stage-text-dim); border-style: dashed; border-color: var(--stage-line-strong); cursor: not-allowed; }

.ways-place { position: relative; min-width: 0; }
.way-me {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 12px;
  border: 2px solid var(--white);
  border-radius: var(--radius-pill);
  background: var(--purple-light);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.way-me[data-at="up"] { top: 0; }
.way-me[data-at="down"] { top: 100%; }
.way-me[data-at="left"] { left: 0; }
.way-me[data-at="right"] { left: 100%; }
.way-me.walking { transition: left 600ms ease-in, top 600ms ease-in; }
@media (prefers-reduced-motion: reduce) { .way-me.walking { transition: none; } }
/* 보안 센터 띠: 가운데 글(「보안 센터 · 지금 여기」) 위에 점이 겹치지 않게 글 아래에 둔다(F44 판정에서 넘어옴) */
.jwt-ways .way-me[data-at=""] { top: calc(100% - 12px); }

/* 좁은 화면: 왼쪽 · 오른쪽 표지를 지도 아래 한 줄로 */
@media (max-width: 560px) {
  .ways-mid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ways-mid .ways-place { grid-column: 1 / -1; grid-row: 1; }
  .ways-mid .way-left, .ways-mid .way-right { grid-row: 2; }
  .ways-mid .way-left { grid-column: 1; }
  .ways-mid .way-right { grid-column: 2; }
  /* 표지가 지도 아래로 내려가므로 점도 표지가 있는 쪽(아래 왼쪽 · 아래 오른쪽)으로 걷는다 */
  .way-me[data-at="left"] { left: 25%; top: 100%; }
  .way-me[data-at="right"] { left: 75%; top: 100%; }
  /* 아래쪽 길 토막이 왼쪽 · 오른쪽 표지 줄에 붙어 보이지 않게 띄운다 */
  .ways > .way-down { margin-top: 10px; }
  .ways-mid .way-none { display: none; }
  .way-left .way-road, .way-right .way-road { display: none; }
  .way-sign { white-space: normal; }
}
