/* 어디가? — 교통·길찾기 사인 시스템 장르
 * 지하철 노선도의 굵은 단색 노선, 역명판, 발차 안내판.
 * UI는 공통 역할 토큰과 컴포넌트를 쓰고, 노선색 같은 장식 색은 --art-* 로만 쓴다.
 */
:root {
  --brand: #00853f;
  --brand-pressed: #006b33;
  --brand-soft: #e2f3e8;
  --brand-on: #ffffff;

  --font-display: "Gothic A1", "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --font-num: "Archivo", "Gothic A1", "Pretendard Variable", Pretendard, -apple-system, sans-serif;

  /* 서울 지하철 노선색 (장식·분류 배지 전용) */
  --art-l1: #0052a4;
  --art-l2: #00a84d;
  --art-l3: #ef7c1c;
  --art-l4: #00a5de;
  --art-l6: #cd7c2f;
  --art-l7: #747f00;
  --art-l8: #e6186c;
  --art-l9: #a08b4f;
  --art-sb: #d4003b;
  --art-river: #dcecf2;
  --art-board: #16191e;
  --art-board-line: #2a2f37;
  --art-led: #ffc21a;
  --art-paper: #fbfaf6;

  --pc-0: var(--art-l2);
  --pc-1: var(--art-l3);
  --pc-2: var(--art-l4);
  --pc-3: var(--art-sb);
  --pc-4: var(--art-l1);
  --pc-5: var(--art-l7);

  --ease-spring: linear(0, 0.161, 0.362, 0.577, 0.781, 0.959, 1.1, 1.199, 1.258, 1.279, 1.269, 1.237, 1.19, 1.136, 1.082, 1.033, 0.992, 0.961, 0.941, 0.931, 0.929, 0.935, 0.945, 0.958, 0.972, 0.985, 0.997, 1.006, 1.013, 1.017, 1.018, 1.018, 1.015, 1.012, 1.009, 1.006, 1.002, 1, 0.998, 0.996, 1);
  --ease-back: cubic-bezier(0.34, 1.56, 0.64, 1);
}

body { background: var(--color-bg); }

.display { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.03em; }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }

/* ---------- 노선 배지 (분류) ---------- */
.lb {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: var(--r-full);
  background: var(--l, var(--color-text-secondary));
  color: var(--brand-on);
  font: var(--label-03);
  font-family: var(--font-display);
  font-weight: 800;
}
.lb--lg { width: 36px; height: 36px; font: var(--label-01); font-family: var(--font-display); font-weight: 800; }
.lb--ring { background: var(--color-surface); color: var(--color-text); box-shadow: inset 0 0 0 3px var(--l, var(--color-text)); }

/* ---------- 상단바 ---------- */
.topbar__brand { color: var(--color-text); font-family: var(--font-display); font-weight: 800; font-size: var(--sp-20); letter-spacing: -0.03em; }
.brand-mark {
  position: relative;
  width: 22px;
  height: 22px;
  border-radius: var(--r-full);
  background: var(--color-surface);
  box-shadow: inset 0 0 0 5px var(--color-primary);
}
.brand-mark::after {
  content: "";
  position: absolute;
  left: 100%;
  top: 50%;
  width: 8px;
  height: 5px;
  margin-top: -2.5px;
  background: var(--color-primary);
}
.topbar .btn--ghost { color: var(--color-text); }

.view {
  padding: var(--sp-8) 0 var(--sp-32);
  animation: wtg-slide var(--dur-slow) var(--ease-standard) both;
}
@keyframes wtg-slide { from { opacity: 0; transform: translateX(16px); } }

.view-head { margin: var(--sp-12) 0 var(--sp-16); }
.view-head h2 { margin: 0 0 var(--sp-4); font-family: var(--font-display); font-weight: 800; letter-spacing: -0.03em; }
.view-head p { margin: 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-6);
  margin-bottom: var(--sp-6);
  font: var(--label-03);
  color: var(--color-text-secondary);
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 4px;
  border-radius: var(--r-full);
  background: var(--color-primary);
}

/* ---------- 인트로 ---------- */
.intro { min-height: calc(100dvh - 56px); padding-top: var(--sp-8); }
/* 무대는 남는 세로 공간을 모두 차지하고, 카드는 JS가 그 크기에 맞춰 확대·축소한다 */
.intro__stage { flex: 1 1 0; min-height: 280px; }
.intro__caption { text-align: left; min-height: 96px; }
.intro__caption .t-title-02 {
  font: var(--title-01);
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -0.04em;
}
/* 단어는 통째로 줄바꿈, 글자는 제자리에서 튀어나옴 (마스크로 자르지 않음) */
.intro__caption .kw { display: inline-block; vertical-align: top; }
.intro__caption .kc { display: inline-block; transform-origin: 50% 100%; }
.intro__caption p { word-break: keep-all; }
.intro__steps { justify-content: flex-start; position: relative; gap: var(--sp-16); margin: var(--sp-12) 0 var(--sp-10) var(--sp-2); }
.intro__steps::before {
  content: "";
  position: absolute;
  left: 4px;
  right: calc(100% - 4px - 3 * (10px + var(--sp-16)));
  top: 50%;
  height: 4px;
  margin-top: -2px;
  background: var(--color-border-strong);
  border-radius: var(--r-full);
}
.intro__steps span {
  position: relative;
  width: 10px;
  height: 10px;
  background: var(--color-surface);
  box-shadow: inset 0 0 0 2.5px var(--color-border-strong);
}
.intro__steps span.is-on {
  width: 10px;
  background: var(--color-surface);
  box-shadow: inset 0 0 0 3px var(--color-primary);
  transform: scale(1.5);
  transition: transform var(--dur-slow) var(--ease-back);
}
.intro__extra { display: flex; flex-direction: column; gap: var(--sp-8); }
.intro__extra:empty { display: none; }

.wi {
  position: relative;
  flex: none;
  width: 340px;
  height: 500px;
  border-radius: var(--r-24);
  overflow: hidden;
  isolation: isolate;
  background: var(--art-paper);
  transform-origin: center;
}
/* 카드 테두리를 그림 위에 그려서 노선이 카드 밖으로 나가 보이지 않게 */
.wi::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 10;
  border-radius: inherit;
  box-shadow: inset 0 0 0 2px var(--color-border-strong);
  pointer-events: none;
}
.wi-svg { position: absolute; left: 0; top: 0; width: 340px; height: 456px; }
.wi-led {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: var(--sp-10);
  height: 44px;
  padding: 0 var(--sp-16);
  background: var(--art-board);
  overflow: hidden;
}
.wi-led__dot { flex: none; width: 8px; height: 8px; border-radius: var(--r-full); background: var(--color-danger); }
.wi-led__txt { font: var(--label-02); font-family: var(--font-display); font-weight: 800; color: var(--art-led); white-space: nowrap; letter-spacing: 0.02em; }
.wi-go {
  position: absolute;
  left: 170px;
  top: 352px;
  z-index: 3;
  padding: var(--sp-8) var(--sp-16);
  border-radius: var(--r-full);
  background: var(--color-primary);
  color: var(--color-on-primary);
  font: var(--label-01);
  white-space: nowrap;
  box-shadow: var(--shadow-m);
}
.wi-bg { fill: var(--art-paper); }
.wi-river { fill: var(--art-river); }
.wi-river__t { font: var(--label-02); fill: var(--art-l4); }
.wi-ln { fill: none; stroke: var(--l); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.wi-ln--main { stroke-width: 9; }
.wi-term { fill: none; stroke: var(--art-board); stroke-width: 4; stroke-linecap: round; }
.wi-stations circle { fill: var(--color-surface); stroke: var(--art-board); stroke-width: 3; }
.wi-stations .wi-stop { stroke-width: 2.5; }
.wi-stl text { font: var(--label-03); fill: var(--color-text-secondary); paint-order: stroke; stroke: var(--art-paper); stroke-width: 3px; stroke-linejoin: round; }
.wi-linebadge { fill: var(--l); stroke: var(--art-paper); stroke-width: 2; }
.wi-linelabel { font: var(--label-03); font-family: var(--font-num); font-weight: 800; fill: var(--brand-on); }

.wi-legs,
.wi-kms,
.wi-xfer,
.wi-board,
.wi-strip,
.wi-sign,
.wi-duel,
.wi-vs,
.wi-crown,
.wi-spark,
.wi-go { visibility: hidden; }
.wi[data-scene="2"] .wi-legs,
.wi[data-scene="2"] .wi-kms,
.wi[data-scene="2"] .wi-xfer,
.wi[data-scene="2"] .wi-sign,
.wi[data-scene="3"] .wi-board,
.wi[data-scene="4"] .wi-strip,
.wi[data-scene="4"] .wi-duel,
.wi[data-scene="4"] .wi-vs,
.wi[data-scene="4"] .wi-crown,
.wi[data-scene="4"] .wi-spark,
.wi[data-scene="4"] .wi-go { visibility: visible; }
.wi[data-scene="3"] .wi-pin,
.wi[data-scene="4"] .wi-pin { visibility: hidden; }
.wi[data-scene="4"] .wi-map { opacity: 0.18; }

.wi-leg,
.wi-leg-case { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.wi-leg { stroke: var(--l); stroke-width: 6; }
.wi-leg-case { stroke: var(--art-paper); stroke-width: 12; }
.wi-km { transform-box: fill-box; transform-origin: center; }
.wi-km rect { fill: var(--art-board); }
.wi-km text { font: var(--label-03); font-family: var(--font-num); fill: var(--brand-on); }
.wi-xfer { transform-box: fill-box; transform-origin: center; }
.wi-xfer circle { fill: var(--color-surface); stroke: var(--art-board); stroke-width: 4; }
.wi-xfer .wi-xfer__in { fill: var(--art-board); stroke: none; }

.wi-sign {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  padding: var(--sp-4) var(--sp-10) var(--sp-4) var(--sp-4);
  border-radius: var(--r-6);
  background: var(--color-surface);
  box-shadow: inset 0 0 0 2px var(--art-board), var(--shadow-m);
  transform: translateX(-50%);
  white-space: nowrap;
}
.wi-sign__lb { display: grid; place-items: center; width: 22px; height: 22px; border-radius: var(--r-full); background: var(--art-l6); color: var(--brand-on); font: var(--label-03); font-family: var(--font-num); }
.wi-sign b { font: var(--title-04); font-family: var(--font-display); font-weight: 900; letter-spacing: -0.02em; }
.wi-sign__sub { font: var(--label-03); color: var(--color-text-secondary); }

.wi-pin { position: absolute; z-index: 1; width: 0; height: 0; }
.wi-pin__body { position: absolute; left: -16px; bottom: 2px; width: 32px; height: 42px; transform-origin: 50% 100%; }
.wi-pin__head {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--r-full);
  background: var(--l);
  border: 3px solid var(--color-surface);
  color: var(--brand-on);
  font: var(--label-02);
  font-family: var(--font-display);
  font-weight: 800;
}
.wi-pin__body::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 22px;
  width: 13px;
  height: 13px;
  background: var(--l);
  transform: translateX(-50%) rotate(45deg);
  border-radius: 0 0 var(--r-4) 0;
}
.wi-pin__shadow {
  position: absolute;
  left: 0;
  top: -3px;
  width: 20px;
  height: 6px;
  border-radius: var(--r-full);
  background: var(--art-board);
  opacity: 0.25;
  transform: translateX(-50%);
}
.wi-tag {
  position: absolute;
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-2) var(--sp-8) var(--sp-2) var(--sp-2);
  border-radius: var(--r-4);
  background: var(--art-board);
  color: var(--brand-on);
  font: var(--label-03);
  white-space: nowrap;
}
.wi-tag b { padding: 0 var(--sp-6); border-radius: var(--r-4); background: var(--l); font-weight: 800; }
.wi-tag--left { left: -26px; top: 10px; }
.wi-tag--right { right: -24px; top: 10px; }
.wi-tag--below { left: 14px; top: -14px; }

.wi-board__bg { fill: var(--art-board); }
.wi-board__rule { stroke: var(--art-board-line); stroke-width: 1; }
.wi-board__h { font: var(--label-02); fill: var(--art-led); }
.wi-board__h--r { fill: var(--color-text-tertiary); }
.wi-row { transform-box: fill-box; transform-origin: center; }
.wi-row__g { font: var(--label-03); font-family: var(--font-display); font-weight: 800; fill: var(--brand-on); }
.wi-row__n { font: var(--title-04); font-family: var(--font-display); font-weight: 800; fill: var(--brand-on); letter-spacing: -0.02em; }
.wi-row__t { font: var(--label-03); fill: var(--art-led); }
.wi-br path { fill: none; stroke: var(--l); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.wi-br__dot,
.wi-br__fin { fill: var(--color-surface); stroke: var(--art-board); stroke-width: 2; transform-box: fill-box; transform-origin: center; }
.wi-br__fin { fill: var(--art-led); stroke-width: 3; }

/* 장면 4: 대진 진행 노선 */
.wi-strip__track { stroke: var(--color-border-strong); stroke-width: 6; stroke-linecap: round; }
.wi-strip__done,
.wi-strip__win { fill: none; stroke: var(--art-l2); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.wi-strip__st { transform-box: fill-box; transform-origin: center; fill: var(--color-surface); stroke: var(--art-board); stroke-width: 3; }
.wi-strip__st--done { fill: var(--art-l2); stroke: var(--art-paper); }
.wi-strip__st--now { stroke-width: 4; }
.wi-strip__st--goal { fill: var(--color-surface); stroke: var(--art-led); stroke-width: 4; }
.wi.is-won .wi-strip__st--goal { fill: var(--art-led); stroke: var(--art-board); }
.wi-strip__t { font: var(--label-03); fill: var(--color-text); }

.wi-duel {
  position: absolute;
  left: 24px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  width: 292px;
  border-radius: var(--r-12);
  background: var(--color-surface);
  box-shadow: inset 0 0 0 3px var(--art-board), var(--shadow-l);
  overflow: visible;
  transform-origin: 50% 50%;
}
.wi-duel--a { top: 108px; z-index: 3; }
.wi-duel--b { top: 272px; }
.wi-duel__top { display: flex; align-items: center; gap: var(--sp-8); padding: var(--sp-12) var(--sp-16) 0; font: var(--label-03); color: var(--color-text-secondary); }
.wi-duel__lb { display: grid; place-items: center; width: 24px; height: 24px; border-radius: var(--r-full); background: var(--l); color: var(--brand-on); font: var(--label-03); font-family: var(--font-display); font-weight: 800; }
.wi-duel b { padding: var(--sp-4) var(--sp-16) var(--sp-10); font: var(--display-02); font-family: var(--font-display); font-weight: 900; letter-spacing: -0.05em; }
.wi-duel__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-8) var(--sp-12) var(--sp-8) var(--sp-16);
  border-radius: 0 0 var(--r-12) var(--r-12);
  background: var(--l);
  color: var(--brand-on);
  font: var(--label-02);
}
.wi-tally { display: inline-block; padding: var(--sp-2) var(--sp-10); border-radius: var(--r-4); background: var(--art-board); color: var(--art-led); font: var(--label-01); font-family: var(--font-num); font-weight: 800; font-variant-numeric: tabular-nums; }
.wi-vote { position: absolute; top: -8px; padding: var(--sp-2) var(--sp-6); border-radius: var(--r-4); background: var(--art-board); color: var(--art-led); font: var(--label-02); font-family: var(--font-num); opacity: 0; }
.wi-vs {
  position: absolute;
  left: 260px;
  top: 254px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: var(--r-full);
  background: var(--color-surface);
  box-shadow: inset 0 0 0 4px var(--art-board);
  font: var(--label-02);
  font-family: var(--font-num);
  font-weight: 800;
  transform: translate(-50%, -50%);
}
.wi-crown { position: absolute; left: 170px; top: 146px; font-size: var(--sp-48); line-height: 1; z-index: 5; transform-origin: 50% 100%; }
.wi-spark { position: absolute; left: 170px; top: 172px; z-index: 4; }
.wi-spark i { position: absolute; left: -2px; top: -8px; width: 4px; height: 16px; border-radius: var(--r-full); background: var(--art-led); opacity: 0; }
.wi-spark i:nth-child(odd) { background: var(--art-l2); }

/* ---------- 설정 ---------- */
.mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: var(--sp-8) 0 var(--sp-16);
  border-bottom: 2px solid var(--color-border);
}
.mode-tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-6);
  min-height: 72px;
  padding: var(--sp-8) var(--sp-8) var(--sp-12) 0;
  border: 0;
  background: transparent;
  color: var(--color-text-tertiary);
  font: var(--label-01);
  font-family: var(--font-display);
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}
.mode-tab::after {
  content: "";
  position: absolute;
  left: 0;
  right: var(--sp-8);
  bottom: -2px;
  height: 5px;
  border-radius: var(--r-full);
  background: var(--l);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-slow) var(--ease-back);
}
.mode-tab .lb { background: var(--color-border-strong); transition: background var(--dur-fast); }
.mode-tab[aria-pressed="true"] { color: var(--color-text); }
.mode-tab[aria-pressed="true"] .lb { background: var(--l); }
.mode-tab[aria-pressed="true"]::after { transform: scaleX(1); }
.mode-tab:active { transform: scale(0.96); }

/* 설정 블록을 노선 위의 역처럼 */
.blocks { position: relative; display: flex; flex-direction: column; gap: var(--sp-12); padding-left: var(--sp-24); }
.blocks::before {
  content: "";
  position: absolute;
  left: 7px;
  top: var(--sp-24);
  bottom: var(--sp-24);
  width: 5px;
  border-radius: var(--r-full);
  background: var(--l, var(--color-primary));
}
.block { position: relative; padding: var(--sp-16); }
.blocks > .block::before {
  content: "";
  position: absolute;
  left: calc(var(--sp-24) * -1 + 1px);
  top: var(--sp-20);
  width: 17px;
  height: 17px;
  border-radius: var(--r-full);
  background: var(--color-surface);
  box-shadow: inset 0 0 0 4px var(--color-text);
}
.block__title { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-8); margin: 0 0 var(--sp-12); }
.block__title h3 { margin: 0; font: var(--title-04); font-family: var(--font-display); font-weight: 800; letter-spacing: -0.03em; }
.block__hint { margin: var(--sp-8) 0 0; font: var(--caption-01); color: var(--color-text-tertiary); }
.block__sub { margin: var(--sp-16) 0 var(--sp-8); font: var(--label-03); color: var(--color-text-secondary); }

.btn-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-8); }
.btn-row .btn { padding: 0 var(--sp-8); }

.loc-pill {
  display: flex;
  align-items: center;
  gap: var(--sp-12);
  min-height: 56px;
  padding: var(--sp-6) var(--sp-6) var(--sp-6) var(--sp-8);
  border-radius: var(--r-8);
  background: var(--color-surface);
  box-shadow: inset 0 0 0 2px var(--color-text);
}
.loc-pill__txt { flex: 1 1 auto; min-width: 0; }
.loc-pill__name { font: var(--title-04); font-family: var(--font-display); font-weight: 900; letter-spacing: -0.03em; }
.loc-pill__sub { font: var(--caption-01); color: var(--color-text-secondary); }

.weather-note {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  margin-top: var(--sp-10);
  padding: var(--sp-8) var(--sp-12);
  border-radius: var(--r-6);
  background: var(--art-board);
  color: var(--art-led);
  font: var(--label-03);
}

.chips { display: flex; flex-wrap: wrap; gap: var(--sp-8); }
.chip--name { color: var(--color-text); padding-right: var(--sp-4); }
.chip__x {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: 0;
  border: 0;
  border-radius: var(--r-full);
  background: transparent;
  color: var(--color-text-tertiary);
  cursor: pointer;
}
.add-row { display: flex; gap: var(--sp-8); margin-top: var(--sp-12); }
.add-row .input { min-height: var(--tap-min); }
.add-row .btn { flex: none; }

.seg {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: var(--sp-4);
  padding: var(--sp-4);
  border-radius: var(--r-12);
  background: var(--color-surface-sunken);
}
.seg button {
  min-height: 44px;
  padding: 0 var(--sp-6);
  border: 0;
  border-radius: var(--r-8);
  background: transparent;
  color: var(--color-text-secondary);
  font: var(--label-02);
  cursor: pointer;
  transition: background var(--dur-fast), color var(--dur-fast), transform var(--dur-fast);
}
.seg button:active { transform: scale(0.95); }
.seg button[aria-pressed="true"] { background: var(--color-text); color: var(--color-surface); }
.seg button:disabled { color: var(--color-text-disabled); cursor: not-allowed; }

.opts { display: flex; flex-direction: column; gap: var(--sp-8); }
.opt {
  display: flex;
  align-items: center;
  gap: var(--sp-12);
  width: 100%;
  min-height: 64px;
  padding: var(--sp-12);
  border: 0;
  border-radius: var(--r-8);
  background: var(--color-surface-sunken);
  text-align: left;
  cursor: pointer;
  transition: transform var(--dur-fast), background var(--dur-fast);
}
.opt:active { transform: scale(0.98); }
.opt[aria-pressed="true"] { background: var(--color-surface); box-shadow: inset 0 0 0 2px var(--color-text); }
.opt[aria-pressed="true"] .lb { background: var(--color-primary); }
.opt:disabled { opacity: 0.45; cursor: not-allowed; }
.opt .lb { background: var(--color-border-strong); }
.opt__t { display: block; font: var(--label-01); color: var(--color-text); }
.opt__d { display: block; margin-top: var(--sp-2); font: var(--caption-01); color: var(--color-text-secondary); }

.people { display: flex; flex-direction: column; gap: var(--sp-6); }
.person {
  display: flex;
  align-items: center;
  gap: var(--sp-10);
  min-height: 56px;
  padding: var(--sp-4) var(--sp-4) var(--sp-4) var(--sp-10);
  border-radius: var(--r-8);
  background: var(--color-surface-sunken);
}
.person__dot {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: var(--r-full);
  background: var(--c);
  color: var(--brand-on);
  font: var(--label-02);
  font-family: var(--font-display);
  font-weight: 800;
}
.person__main { flex: 1 1 auto; min-width: 0; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; min-height: var(--tap-min); }
.person__name { display: block; font: var(--body-03-strong); }
.person__loc { display: block; font: var(--caption-01); color: var(--color-text-secondary); }
.person__loc--empty { color: var(--color-primary); font-weight: 600; }

.minimap-wrap { margin-top: var(--sp-12); }
.minimap { width: 100%; height: auto; }
.mm-bg { fill: var(--art-paper); stroke: var(--color-border); }
.mm-grid line { stroke: var(--color-border); stroke-width: 1; opacity: 0.6; }
.mm-case { stroke: var(--art-paper); stroke-width: 10; stroke-linecap: round; }
.mm-leg { stroke: var(--c); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 1; animation: wtg-draw 700ms cubic-bezier(0.65, 0, 0.35, 1) var(--d, 0ms) both; }
.mm-dist rect { fill: var(--art-board); }
.mm-dist text { font: var(--label-03); font-family: var(--font-num); fill: var(--brand-on); }
.mm-pin { transform-box: fill-box; transform-origin: 50% 100%; animation: wtg-squash 900ms ease var(--d) both; }
.mm-pin circle { fill: var(--c); stroke: var(--color-surface); stroke-width: 3; }
.mm-pin text { font: var(--label-03); fill: var(--brand-on); }
.mm-center { fill: none; stroke: var(--color-text-tertiary); stroke-width: 1.5; stroke-dasharray: 2 2; }
.mm-glow { fill: none; stroke: var(--art-board); stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: wtg-ping 1.6s cubic-bezier(0, 0, 0.2, 1) infinite; }
.mm-mid { fill: var(--color-surface); stroke: var(--art-board); stroke-width: 4; }
.mm-mid-in { fill: var(--art-board); }
.mm-scale line { stroke: var(--color-text-secondary); stroke-width: 2; }
.mm-scale text { font: var(--caption-01); fill: var(--color-text-secondary); }
.mm-n { font: var(--label-03); fill: var(--color-text-tertiary); }
.mm-label rect { fill: var(--color-surface); stroke: var(--art-board); stroke-width: 2; }
.mm-label text { font: var(--label-02); font-family: var(--font-display); font-weight: 800; fill: var(--color-text); }

@keyframes wtg-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes wtg-squash {
  0% { transform: translateY(-40px) scale(0.9, 1.15); opacity: 0; }
  40% { transform: translateY(0) scale(0.9, 1.15); opacity: 1; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
  52% { transform: translateY(0) scale(1.3, 0.7); }
  70% { transform: translateY(-8px) scale(0.95, 1.06); }
  85% { transform: translateY(0) scale(1.05, 0.96); }
  100% { transform: none; opacity: 1; }
}
@keyframes wtg-ping { 0% { transform: scale(0.7); opacity: 0.8; } 100% { transform: scale(2); opacity: 0; } }

.mid-card {
  display: flex;
  align-items: center;
  gap: var(--sp-12);
  margin-top: var(--sp-12);
  padding: var(--sp-10) var(--sp-10) var(--sp-10) var(--sp-12);
  border-radius: var(--r-8);
  background: var(--color-surface);
  box-shadow: inset 0 0 0 2px var(--color-text);
}
.mid-card__k { font: var(--label-03); color: var(--color-text-secondary); }
.mid-card__n { font: var(--title-03); font-family: var(--font-display); font-weight: 900; letter-spacing: -0.03em; }
.legs { margin: var(--sp-10) 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--sp-6); }
.legs li { display: flex; align-items: center; gap: var(--sp-8); font: var(--body-03); }
.legs i { width: 16px; height: 5px; border-radius: var(--r-full); background: var(--c); flex: none; }
.legs b { margin-left: auto; font-family: var(--font-num); font-weight: 700; font-variant-numeric: tabular-nums; }

.sticky-cta {
  position: sticky;
  bottom: 0;
  z-index: 10;
  margin: var(--sp-16) calc(var(--gutter) * -1) 0;
  padding: var(--sp-12) var(--gutter) calc(var(--sp-12) + var(--safe-bottom));
  background: linear-gradient(to bottom, transparent, var(--color-bg) 28%);
}
.sticky-cta .btn--primary { font-family: var(--font-display); font-weight: 800; }
.sticky-cta .btn + .btn { margin-top: var(--sp-8); }
.sticky-cta__row { display: flex; gap: var(--sp-8); }

/* 누르면 눌리고 놓으면 튀는 버튼 */
.btn--primary:not(:disabled):not(.is-loading):active { transform: scale(0.94); }
.btn--primary { transition: background var(--dur-fast), transform var(--dur-slow) var(--ease-back); }

/* ---------- 알림 ---------- */
.notice {
  display: flex;
  gap: var(--sp-8);
  padding: var(--sp-10) var(--sp-12);
  border-radius: var(--r-6);
  background: var(--color-surface-sunken);
  font: var(--caption-01);
  color: var(--color-text-secondary);
}
.notice + .notice { margin-top: var(--sp-6); }
.notice--warn { background: var(--art-board); color: var(--art-led); }
.notices { margin-bottom: var(--sp-12); }

/* ---------- 시트 (역 고르기) ---------- */
.sheet h3 { margin: 0 0 var(--sp-12); font: var(--title-03); font-family: var(--font-display); font-weight: 800; }
.sheet__search { position: sticky; top: calc(var(--sp-12) * -1); z-index: 1; padding: var(--sp-4) 0 var(--sp-8); background: var(--color-surface); display: flex; flex-direction: column; gap: var(--sp-8); }
.st-group { display: flex; align-items: center; gap: var(--sp-6); margin: var(--sp-16) 0 var(--sp-6); font: var(--label-03); color: var(--color-text-secondary); }
.st-group::before { content: ""; width: 14px; height: 4px; border-radius: var(--r-full); background: var(--color-primary); }
.st-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-6); }
.st-item {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  min-height: var(--tap-min);
  padding: 0 var(--sp-10);
  border: 0;
  border-radius: var(--r-6);
  background: var(--color-surface-sunken);
  font: var(--label-02);
  text-align: left;
  cursor: pointer;
}
.st-item::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: var(--r-full); box-shadow: inset 0 0 0 2.5px var(--color-text); }
.st-item:active { background: var(--color-border); }
.st-empty { padding: var(--sp-24) 0; text-align: center; font: var(--body-03); color: var(--color-text-tertiary); }

/* ---------- 거부권: 발차 안내판 ---------- */
.board {
  border-radius: var(--r-12);
  background: var(--art-board);
  color: var(--brand-on);
  overflow: hidden;
}
.board__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-8);
  padding: var(--sp-12) var(--sp-16);
  border-bottom: 1px solid var(--art-board-line);
  font: var(--label-03);
  color: var(--art-led);
}
.board__head span:last-child { color: var(--color-text-tertiary); }

.veto-turn {
  display: flex;
  align-items: center;
  gap: var(--sp-12);
  padding: var(--sp-12) var(--sp-12) var(--sp-12) var(--sp-16);
  border-radius: var(--r-8);
  background: var(--color-surface);
  box-shadow: inset 0 0 0 2px var(--color-text);
  margin-bottom: var(--sp-12);
}
.veto-turn--done { box-shadow: inset 0 0 0 2px var(--color-primary); }
.veto-turn__x { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: var(--r-full); background: var(--color-danger); color: var(--brand-on); font: var(--title-04); }
.veto-turn--done .veto-turn__x { background: var(--color-primary); }
.veto-turn__t { flex: 1 1 auto; min-width: 0; }
.veto-turn__t b { display: block; font: var(--title-04); font-family: var(--font-display); font-weight: 800; letter-spacing: -0.03em; }
.veto-turn__t span { font: var(--caption-01); color: var(--color-text-secondary); }
.veto-turn .btn { flex: none; }
.veto-turn__t b.is-swap { animation: wtg-flap 420ms var(--ease-back) both; }

.veto-people { display: flex; flex-wrap: wrap; gap: var(--sp-6); margin-bottom: var(--sp-12); }
.veto-person { display: inline-flex; align-items: center; gap: var(--sp-4); padding: var(--sp-4) var(--sp-10); border-radius: var(--r-4); background: var(--color-surface-sunken); font: var(--label-03); color: var(--color-text-secondary); }
.veto-person.is-now { background: var(--color-text); color: var(--color-surface); }
.veto-person.is-done { background: var(--color-primary-soft); color: var(--color-primary); text-decoration: line-through; }

.cand-list { display: flex; flex-direction: column; }
.cand {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--sp-12);
  width: 100%;
  min-height: 56px;
  padding: var(--sp-8) var(--sp-16);
  border: 0;
  border-bottom: 1px solid var(--art-board-line);
  background: transparent;
  color: var(--brand-on);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transform-origin: 50% 50%;
}
.cand:last-child { border-bottom: 0; }
.cand:active { background: var(--art-board-line); }
.cand:disabled { cursor: default; }
.cand__no { flex: none; width: 20px; font: var(--label-03); font-family: var(--font-num); color: var(--color-text-tertiary); }
.cand__txt { flex: 1 1 auto; min-width: 0; }
.cand__n { display: block; font: var(--label-01); font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cand__s { flex: none; font: var(--label-03); color: var(--art-led); max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cand.is-new { animation: wtg-flap 520ms var(--ease-back) both; }
.cand.is-new .cand__n { color: var(--art-led); }
.cand.is-out { pointer-events: none; animation: wtg-out 560ms cubic-bezier(0.55, 0, 1, 0.45) both; }
.cand.is-out .cand__n { text-decoration: line-through; text-decoration-color: var(--color-danger); text-decoration-thickness: 3px; }
.cand.is-out::after {
  content: "거부";
  position: absolute;
  right: var(--sp-16);
  top: 50%;
  padding: var(--sp-2) var(--sp-8);
  border: 2px solid var(--color-danger);
  border-radius: var(--r-4);
  color: var(--color-danger);
  font: var(--label-02);
  transform: translateY(-50%) rotate(-8deg);
  animation: wtg-stamp 260ms var(--ease-back) both;
}
.veto-log { display: flex; flex-wrap: wrap; gap: var(--sp-6); margin-top: var(--sp-12); }
.veto-log span { padding: var(--sp-4) var(--sp-10); border-radius: var(--r-4); background: var(--color-surface); box-shadow: inset 0 0 0 1.5px var(--color-danger); color: var(--color-danger); font: var(--label-03); }

@keyframes wtg-flap {
  0% { transform: perspective(400px) rotateX(-90deg); opacity: 0; }
  60% { transform: perspective(400px) rotateX(14deg); opacity: 1; }
  100% { transform: none; }
}
@keyframes wtg-out {
  0%, 45% { transform: none; opacity: 1; }
  100% { transform: translateX(40%) skewX(-12deg); opacity: 0; }
}
@keyframes wtg-stamp { from { transform: translateY(-50%) rotate(-8deg) scale(2.2); opacity: 0; } }

/* ---------- 대결: 역명판 두 장 ---------- */
.match-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-8); margin: var(--sp-8) 0 var(--sp-10); }
.match-head__t { font: var(--title-02); font-family: var(--font-display); font-weight: 900; letter-spacing: -0.04em; }
.match-head__s { font: var(--label-02); font-family: var(--font-num); color: var(--color-text-tertiary); font-variant-numeric: tabular-nums; }
.stage-steps { position: relative; display: flex; justify-content: space-between; margin: var(--sp-8) 0 var(--sp-12); }
.stage-steps::before { content: ""; position: absolute; left: 12px; right: 12px; top: 11px; height: 5px; border-radius: var(--r-full); background: var(--color-border); }
.stage-steps span { position: relative; display: flex; flex-direction: column; align-items: center; gap: var(--sp-4); font: var(--label-03); color: var(--color-text-tertiary); }
.stage-steps span::before { content: ""; width: 22px; height: 22px; border-radius: var(--r-full); background: var(--color-surface); box-shadow: inset 0 0 0 4px var(--color-border-strong); }
.stage-steps span.is-on { color: var(--color-text); }
.stage-steps span.is-on::before { box-shadow: inset 0 0 0 4px var(--color-text); }
.stage-steps span.is-done { color: var(--color-primary); }
.stage-steps span.is-done::before { background: var(--color-primary); box-shadow: none; }

/* 다음 라운드 진출 = 노선 진행 표시 */
.strip { position: relative; display: flex; justify-content: space-between; align-items: center; padding: var(--sp-4) 0; margin-bottom: var(--sp-16); }
.strip::before { content: ""; position: absolute; left: 6px; right: 6px; top: 50%; height: 5px; margin-top: -2.5px; border-radius: var(--r-full); background: var(--color-border); }
.strip__slot {
  position: relative;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: var(--r-full);
  background: var(--color-surface);
  box-shadow: inset 0 0 0 3px var(--color-border-strong);
  font: var(--label-03);
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--brand-on);
}
.strip__slot.is-filled { background: var(--l); box-shadow: none; animation: wtg-pop 500ms var(--ease-spring) both; }
.strip__slot.is-now { box-shadow: inset 0 0 0 4px var(--color-text); }
.strip__slot.is-final { width: 36px; height: 36px; background: var(--art-led); box-shadow: inset 0 0 0 3px var(--art-board); color: var(--art-board); }
@keyframes wtg-pop { from { transform: scale(0); } }

.arena { position: relative; display: flex; flex-direction: column; gap: var(--sp-16); }
.mcard {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  min-height: 196px;
  padding: 0;
  border: 0;
  border-radius: var(--r-12);
  background: var(--color-surface);
  box-shadow: inset 0 0 0 3px var(--color-text), var(--shadow-m);
  cursor: pointer;
  touch-action: manipulation;
  text-align: left;
  overflow: hidden;
  transition: transform var(--dur-slow) var(--ease-back);
}
.mcard:active { transform: scale(0.97) rotate(-0.5deg); }
.mcard.is-lead { box-shadow: inset 0 0 0 4px var(--l), var(--shadow-l); }
.mcard__top { display: flex; align-items: center; gap: var(--sp-8); padding: var(--sp-12) var(--sp-16) 0; }
.mcard__cat { flex: 1 1 auto; font: var(--label-03); color: var(--color-text-secondary); }
.mcard__e { font-size: var(--sp-32); line-height: 1; }
.mcard__n {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  padding: var(--sp-8) var(--sp-16);
  font: var(--display-02);
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -0.05em;
  word-break: keep-all;
}
.mcard__n.is-long { font: var(--title-01); font-family: var(--font-display); font-weight: 900; letter-spacing: -0.04em; }
.mcard__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-8);
  min-height: 40px;
  padding: var(--sp-6) var(--sp-16);
  background: var(--l);
  color: var(--brand-on);
  font: var(--label-02);
}
.tally { display: flex; align-items: center; gap: var(--sp-6); }
.tally__n { padding: var(--sp-2) var(--sp-8); border-radius: var(--r-4); background: var(--art-board); color: var(--art-led); font: var(--label-02); font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.tally__dots { display: flex; gap: var(--sp-4); }
.tally__dots i { width: 8px; height: 8px; border-radius: var(--r-full); background: color-mix(in srgb, var(--brand-on) 35%, transparent); }
.tally__dots i.is-on { background: var(--brand-on); }
.plus1 { position: absolute; padding: var(--sp-2) var(--sp-8); border-radius: var(--r-4); background: var(--art-board); color: var(--art-led); font: var(--title-04); font-family: var(--font-num); pointer-events: none; animation: wtg-plus 700ms var(--ease-standard) both; }

.vs {
  position: absolute;
  right: var(--sp-48);
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: var(--r-full);
  background: var(--color-surface);
  box-shadow: inset 0 0 0 5px var(--color-text);
  font: var(--label-01);
  font-family: var(--font-num);
  font-weight: 800;
  transform: translate(0, -50%);
  pointer-events: none;
}
.vote-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-8); margin-top: var(--sp-12); font: var(--label-02); color: var(--color-text-secondary); }
.match-hint { margin: var(--sp-12) 0 0; font: var(--caption-01); color: var(--color-text-tertiary); }

@keyframes wtg-plus {
  from { transform: translateY(0) scale(0.4); opacity: 0; }
  30% { opacity: 1; transform: translateY(-14px) scale(1.15); }
  to { transform: translateY(-50px) scale(1); opacity: 0; }
}

/* 동전 던지기 */
.coin-layer {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  align-content: center;
  gap: var(--sp-64);
  background: var(--color-scrim);
  perspective: 800px;
}
.coin { position: relative; width: 140px; height: 140px; transform-style: preserve-3d; }
.coin__f {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: var(--r-full);
  background: var(--art-led);
  box-shadow: inset 0 0 0 8px var(--art-board);
  font-size: var(--sp-64);
  backface-visibility: hidden;
}
.coin__f--b { transform: rotateY(180deg); background: var(--color-surface); }
.coin-layer p { margin: 0; color: var(--brand-on); font: var(--title-03); font-family: var(--font-display); font-weight: 800; text-align: center; }

/* ---------- 결과: 역명판 ---------- */
.sign {
  position: relative;
  margin-top: var(--sp-48);
  border-radius: var(--r-12);
  background: var(--color-surface);
  box-shadow: inset 0 0 0 4px var(--color-text), var(--shadow-l);
  overflow: visible;
  animation: wtg-signin 700ms var(--ease-spring) both;
}
.sign__crown { position: absolute; right: var(--sp-20); top: calc(var(--sp-48) * -1 + var(--sp-4)); font-size: var(--sp-48); line-height: 1; transform-origin: 50% 100%; animation: wtg-crown 1000ms ease 350ms both; }
.sign__top { display: flex; align-items: center; gap: var(--sp-8); padding: var(--sp-16) var(--sp-20) 0; }
.sign__k { font: var(--label-03); color: var(--color-text-secondary); }
.sign__body { display: flex; align-items: center; gap: var(--sp-12); padding: var(--sp-12) var(--sp-20) var(--sp-16); }
.sign__e { font-size: var(--sp-48); line-height: 1; }
.sign__n { margin: 0; font: var(--display-01); font-family: var(--font-display); font-weight: 900; letter-spacing: -0.06em; word-break: keep-all; }
.sign__n.is-long { font: var(--title-01); font-family: var(--font-display); font-weight: 900; letter-spacing: -0.04em; }
.sign__bar {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-8);
  padding: var(--sp-10) var(--sp-20);
  border-radius: 0 0 var(--r-12) var(--r-12);
  background: var(--l);
  color: var(--brand-on);
  font: var(--label-02);
}
.sign__bar span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sign-sub { margin: var(--sp-12) 0 0; font: var(--body-03); color: var(--color-text-secondary); }
.sign-sub .badge { margin-right: var(--sp-4); }

@keyframes wtg-signin { from { transform: translateY(40px) scale(0.92); opacity: 0; } }
@keyframes wtg-crown {
  0% { transform: translateY(-140px) scale(0.9, 1.15) rotate(-18deg); opacity: 0; }
  10% { opacity: 1; animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  50% { transform: translateY(0) scale(0.9, 1.15) rotate(6deg); animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
  60% { transform: translateY(4px) scale(1.35, 0.7) rotate(0); }
  78% { transform: translateY(-12px) scale(0.95, 1.08); }
  100% { transform: none; opacity: 1; }
}

.actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-8); margin-top: var(--sp-16); }
.actions .btn--wide { grid-column: 1 / -1; }
.section-t { display: flex; align-items: baseline; gap: var(--sp-8); margin: var(--sp-32) 0 var(--sp-12); font: var(--title-04); font-family: var(--font-display); font-weight: 800; letter-spacing: -0.03em; }
.section-t small { font: var(--caption-01); color: var(--color-text-tertiary); }

.rank-list { margin: 0; padding: 0; list-style: none; border-radius: var(--r-12); background: var(--art-board); overflow: hidden; }
.rank-list li { display: flex; align-items: center; gap: var(--sp-10); min-height: 48px; padding: var(--sp-8) var(--sp-16); border-bottom: 1px solid var(--art-board-line); color: var(--brand-on); }
.rank-list li:last-child { border-bottom: 0; }
.rank-list .r { flex: none; width: 52px; font: var(--label-03); color: var(--art-led); }
.rank-list .n { flex: 1 1 auto; min-width: 0; font: var(--label-01); font-family: var(--font-display); font-weight: 800; }
.rank-list .x { font: var(--caption-01); font-family: var(--font-num); color: var(--color-text-tertiary); }

.place-list { display: flex; flex-direction: column; gap: var(--sp-6); }
.place { display: flex; align-items: center; gap: var(--sp-10); min-height: 56px; padding: var(--sp-8) var(--sp-12); border-radius: var(--r-8); background: var(--color-surface); box-shadow: inset 0 0 0 1px var(--color-border); text-decoration: none; }
.place__t { flex: 1 1 auto; min-width: 0; }
.place__n { display: block; font: var(--label-02); }
.place__s { display: block; font: var(--caption-01); color: var(--color-text-tertiary); }
.place__go { font: var(--label-03); color: var(--color-primary); }

.log-box { margin-top: var(--sp-16); padding: var(--sp-16); }
.log-box.is-done { background: var(--color-primary-soft); border-color: transparent; }

/* 데이트 코스 = 노선도 */
.course { position: relative; margin: 0; padding: var(--sp-20); list-style: none; }
.course li { position: relative; display: flex; gap: var(--sp-16); padding-bottom: var(--sp-20); }
.course li:last-child { padding-bottom: 0; }
.course li::before { content: ""; position: absolute; left: 15px; top: 30px; bottom: -4px; width: 6px; background: var(--l); }
.course li:last-child::before { display: none; }
.course__dot { position: relative; z-index: 1; flex: none; width: 36px; height: 36px; border-radius: var(--r-full); background: var(--color-surface); box-shadow: inset 0 0 0 5px var(--l); }
.course__body { flex: 1 1 auto; min-width: 0; text-align: left; }
.course__k { font: var(--label-03); color: var(--color-text-secondary); }
.course__n { font: var(--title-02); font-family: var(--font-display); font-weight: 900; letter-spacing: -0.04em; }
.course__links { display: flex; gap: var(--sp-6); margin-top: var(--sp-8); }

/* ---------- 방 (링크로 각자) ---------- */
.how { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--sp-10); counter-reset: how; }
.how li { display: flex; gap: var(--sp-10); font: var(--body-03); color: var(--color-text-secondary); counter-increment: how; }
.how li::before { content: counter(how); display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: var(--r-4); background: var(--color-text); color: var(--color-surface); font: var(--label-03); font-family: var(--font-num); }
.reply { display: flex; align-items: center; gap: var(--sp-10); min-height: 48px; padding: var(--sp-8) var(--sp-12); border-radius: var(--r-8); background: var(--color-surface); box-shadow: inset 0 0 0 1px var(--color-border); }
.reply b { font: var(--label-02); }
.reply span { margin-left: auto; font: var(--body-03); color: var(--color-text-secondary); }

.bars { display: flex; flex-direction: column; gap: var(--sp-12); }
.bar__top { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-8); font: var(--label-02); }
.bar__top small { font: var(--caption-01); font-family: var(--font-num); color: var(--color-text-tertiary); font-variant-numeric: tabular-nums; }
.bar__track { height: 8px; margin-top: var(--sp-6); border-radius: var(--r-full); background: var(--color-surface-sunken); overflow: hidden; }
.bar__fill { height: 100%; border-radius: inherit; background: var(--l, var(--color-primary)); transform-origin: left; animation: wtg-grow 800ms var(--ease-spring) both; }
.bar__who { margin-top: var(--sp-4); font: var(--caption-01); color: var(--color-text-secondary); }
@keyframes wtg-grow { from { transform: scaleX(0); } }

/* ---------- 리포트 ---------- */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-radius: var(--r-12); background: var(--art-board); overflow: hidden; }
.stat { padding: var(--sp-12) var(--sp-12) var(--sp-16); border-right: 1px solid var(--art-board-line); }
.stat:last-child { border-right: 0; }
.stat__k { font: var(--caption-01); color: var(--color-text-tertiary); }
.stat__v { margin-top: var(--sp-4); font: var(--title-02); font-family: var(--font-num); font-weight: 800; color: var(--art-led); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat__v small { font: var(--label-03); color: var(--brand-on); }

.gauge { position: relative; height: 8px; margin: var(--sp-16) 0 var(--sp-6); border-radius: var(--r-full); background: var(--color-surface-sunken); }
.gauge::before { content: ""; position: absolute; inset: 0; width: var(--v); border-radius: inherit; background: var(--color-text); }
.gauge i { position: absolute; top: 50%; width: 20px; height: 20px; border-radius: var(--r-full); background: var(--color-surface); box-shadow: inset 0 0 0 4px var(--color-text); transform: translate(-50%, -50%); }
.gauge-legend { display: flex; justify-content: space-between; font: var(--caption-01); color: var(--color-text-tertiary); }

.stamps { display: flex; flex-direction: column; gap: var(--sp-8); }
.stamp-card { padding: var(--sp-16); }
.stamp-card__top { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-8); margin-bottom: var(--sp-10); }
.stamp-card__top b { font: var(--label-01); font-family: var(--font-display); font-weight: 800; }
.stamp-grid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: var(--sp-4); }
.stamp-grid span { display: grid; place-items: center; aspect-ratio: 1; border-radius: var(--r-full); box-shadow: inset 0 0 0 2px var(--color-border); font: var(--label-03); }
.stamp-grid span.is-on { background: var(--color-primary); box-shadow: none; color: var(--brand-on); font-family: var(--font-num); }
.stamp-grid span.is-on:nth-child(3) { background: var(--art-led); color: var(--art-board); }

.log-list { display: flex; flex-direction: column; border-radius: var(--r-12); background: var(--color-surface); box-shadow: inset 0 0 0 1px var(--color-border); overflow: hidden; }
.log-row { display: flex; align-items: center; gap: var(--sp-10); min-height: 52px; padding: var(--sp-4) var(--sp-4) var(--sp-4) var(--sp-12); border-bottom: 1px solid var(--color-border); }
.log-row:last-child { border-bottom: 0; }
.log-row__d { flex: none; width: 40px; font: var(--label-03); font-family: var(--font-num); color: var(--color-text-tertiary); font-variant-numeric: tabular-nums; }
.log-row__n { flex: 1 1 auto; min-width: 0; font: var(--label-02); }
.log-row__n small { display: block; font: var(--caption-01); color: var(--color-text-tertiary); }

.empty { padding: var(--sp-32) var(--sp-16); text-align: center; color: var(--color-text-secondary); }
.empty__k { margin: 0 auto var(--sp-12); width: 48px; height: 48px; border-radius: var(--r-full); box-shadow: inset 0 0 0 6px var(--color-border-strong); }

.team-card { display: flex; align-items: center; gap: var(--sp-8); }
.team-card__t { flex: 1 1 auto; min-width: 0; }

/* ---------- 게스트 ---------- */
.guest-card { padding: var(--sp-20); }
.guest-card h2 { font-family: var(--font-display); font-weight: 900; letter-spacing: -0.04em; }
.mini-cands { display: flex; flex-wrap: wrap; gap: var(--sp-6); margin: var(--sp-16) 0; }
.mini-cands > span { display: inline-flex; align-items: center; gap: var(--sp-6); padding: var(--sp-4) var(--sp-10) var(--sp-4) var(--sp-4); border-radius: var(--r-full); background: var(--color-surface-sunken); font: var(--label-03); color: var(--color-text); }
.mini-cands .lb { width: 20px; height: 20px; }

.fly { position: fixed; z-index: 80; pointer-events: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--r-full); background: var(--l); color: var(--brand-on); font: var(--label-03); font-family: var(--font-display); font-weight: 800; }

/* 닫힌 시트는 화면·탭 순서에서 완전히 숨김 */
.sheet { visibility: hidden; transition: transform var(--dur-slow) var(--ease-standard), visibility 0s linear var(--dur-slow); }
.sheet.is-open { visibility: visible; transition: transform var(--dur-slow) var(--ease-standard); }
.wi[data-scene="4"] .wi-stl,
.wi[data-scene="4"] .wi-linebadge,
.wi[data-scene="4"] .wi-linelabel { visibility: hidden; }

/* ==========================================================
 * 2차 개편: 승차권 시작 버튼 · 노선 안내도 SEO 본문
 * ========================================================== */

/* 캡션 아랫줄: 회색 부제 대신 안내방송 자막 */
.intro__caption p {
  display: flex;
  align-items: baseline;
  gap: var(--sp-8);
  color: var(--color-text);
  font: var(--label-01);
}
.intro__caption p::before {
  content: "안내";
  flex: none;
  padding: var(--sp-2) var(--sp-6);
  border-radius: var(--r-4);
  background: var(--art-board);
  color: var(--art-led);
  font: var(--label-03);
  font-family: var(--font-display);
  font-weight: 800;
}

/* ---------- 시작 버튼: 2호선 승차권 ---------- */
.ticket {
  --notch: 56px;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 48px;
  align-items: stretch;
  width: 100%;
  min-height: 80px;
  padding: 0;
  border: 0;
  border-radius: var(--r-8);
  background: var(--brand);
  color: var(--brand-on);
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-mask:
    radial-gradient(circle 8px at var(--notch) 0, transparent 97%, #000) top / 100% 51% no-repeat,
    radial-gradient(circle 8px at var(--notch) 100%, transparent 97%, #000) bottom / 100% 51% no-repeat;
  mask:
    radial-gradient(circle 8px at var(--notch) 0, transparent 97%, #000) top / 100% 51% no-repeat,
    radial-gradient(circle 8px at var(--notch) 100%, transparent 97%, #000) bottom / 100% 51% no-repeat;
  transition: transform var(--dur-fast) var(--ease-back);
}
.ticket:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--art-led); }
.ticket__stub {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  background: var(--brand-pressed);
  border-right: 2px dashed color-mix(in srgb, var(--brand-on) 45%, transparent);
}
.ticket__line {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--r-full);
  background: var(--brand-on);
  color: var(--brand);
  font: var(--title-04);
  font-family: var(--font-num);
  font-weight: 800;
}
.ticket__stub small { font: var(--caption-01); font-weight: 700; }
.ticket__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-10) var(--sp-12) var(--sp-10) var(--sp-16);
  min-width: 0;
}
.ticket__meta { font: var(--caption-01); color: color-mix(in srgb, var(--brand-on) 80%, transparent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticket__go {
  font: var(--title-04);
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -0.03em;
  word-break: keep-all;
}
.ticket__gate {
  display: grid;
  place-items: center;
  background: var(--art-board);
  color: var(--art-led);
  font: var(--title-02);
  font-family: var(--font-num);
  font-weight: 800;
  overflow: hidden;
}
.ticket__gate i { font-style: normal; animation: wtg-gate 2.6s var(--ease-back) 1.2s infinite; }
.ticket:active { transform: translateX(6px) scale(0.985, 0.97); }
.ticket:active .ticket__gate i { animation: none; transform: translateX(10px); }
@keyframes wtg-gate {
  0%, 60%, 100% { transform: none; }
  68% { transform: translateX(-5px); }
  80% { transform: translateX(9px); }
  90% { transform: translateX(-2px); }
}

/* ---------- SEO 본문: 노선 안내도 ---------- */
.seo.guide { color: var(--color-text); }
.guide__head { padding-bottom: var(--sp-16); border-bottom: 6px solid var(--art-board); }
.guide__sign { display: flex; gap: var(--sp-4); }
.seo.guide h2 {
  margin: var(--sp-10) 0 var(--sp-6);
  font: var(--title-01);
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -0.04em;
}
.seo.guide .guide__sub { margin: 0; font: var(--label-02); color: var(--color-text); }

.route { margin-top: var(--sp-24); }
.seo.guide .route__name {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  margin: 0 0 var(--sp-8);
  font: var(--title-04);
  font-family: var(--font-display);
  font-weight: 800;
}
.route__name .lb { background: var(--l); }
.route__stops {
  position: relative;
  margin: 0;
  padding: 0 0 0 var(--sp-32);
  list-style: none;
}
.route__stops::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 14px;
  bottom: 14px;
  width: 8px;
  border-radius: var(--r-full);
  background: var(--l);
}
.seo.guide .route__stops li {
  position: relative;
  min-height: 36px;
  padding: var(--sp-6) 0;
  font: var(--body-03);
  color: var(--color-text);
}
.route__stops li::before {
  content: "";
  position: absolute;
  left: calc(var(--sp-32) * -1 + 5px);
  top: 10px;
  width: 16px;
  height: 16px;
  border-radius: var(--r-full);
  background: var(--color-surface);
  box-shadow: inset 0 0 0 3.5px var(--art-board);
}
.route__stops li.is-end::before { background: var(--l); box-shadow: inset 0 0 0 3.5px var(--art-board); }
.route__stops b { font-weight: 800; }

.seo.guide h3.guide__title {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  margin: var(--sp-32) 0 var(--sp-10);
  font: var(--title-04);
  font-family: var(--font-display);
  font-weight: 800;
}
.guide__title::before { content: ""; width: 18px; height: 6px; border-radius: var(--r-full); background: var(--color-primary); }
.guide__table-wrap { border-radius: var(--r-12); background: var(--color-surface); box-shadow: inset 0 0 0 1px var(--color-border); overflow: hidden; }
.guide__table { width: 100%; border-collapse: collapse; font: var(--body-03); }
.guide__table th,
.guide__table td { padding: var(--sp-10) var(--sp-12); border-bottom: 1px solid var(--color-border); text-align: left; vertical-align: middle; }
.guide__table tr:last-child th,
.guide__table tr:last-child td { border-bottom: 0; }
.guide__table thead th { background: var(--art-board); color: var(--art-led); font: var(--label-03); font-family: var(--font-display); font-weight: 800; border-bottom: 0; }
.guide__table tbody th { font: var(--label-02); white-space: nowrap; }
.guide__table tbody th .lb { width: 20px; height: 20px; margin-right: var(--sp-6); vertical-align: -4px; font-size: 11px; }
.guide__table .num { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.guide__table tr.is-win th,
.guide__table tr.is-win td { background: var(--brand-soft); }
.guide__mid { font: var(--title-04); font-family: var(--font-display); font-weight: 900; border-left: 1px solid var(--color-border); border-right: 1px solid var(--color-border); white-space: nowrap; }
.guide__mid .lb { width: 24px; height: 24px; margin-right: var(--sp-6); vertical-align: -4px; }
.seo.guide .guide__note { margin: var(--sp-8) 0 0; font: var(--body-03); color: var(--color-text); }

@media (prefers-reduced-motion: reduce) {
  .ticket__gate i { animation: none; }
  .exit[open] .exit__a, .exit[open] .exit__no, .xfer .more-sites__item, .xfer__badge, .xfer__go::before { animation: none !important; }
}

/* ==========================================================
 * 3차 개편 (§9): 출구 안내판 FAQ · 갈아타는 곳 환승 안내판
 * ========================================================== */

/* ---------- 나가는 곳 (FAQ): 노란 출구 번호판 ---------- */
.exits { margin-top: var(--sp-40); }
.seo.guide .exits__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 var(--sp-8);
  padding: var(--sp-12) var(--sp-16);
  border-radius: var(--r-8) var(--r-8) 0 0;
  background: var(--art-board);
  color: var(--brand-on);
  font: var(--title-04);
  font-family: var(--font-display);
  font-weight: 800;
}
.exits__en { font: var(--label-02); font-family: var(--font-num); font-weight: 700; color: var(--art-led); letter-spacing: 0.04em; }
.seo.guide .exit { margin: 0 0 var(--sp-6); padding: 0; border: 0; }
.seo.guide .exit summary {
  display: grid;
  grid-template-columns: 44px 1fr 32px;
  align-items: center;
  gap: var(--sp-12);
  min-height: 56px;
  padding: var(--sp-6) var(--sp-12) var(--sp-6) var(--sp-6);
  border-radius: var(--r-4);
  background: var(--art-led);
  color: var(--art-board);
  font: var(--label-01);
  font-family: var(--font-display);
  font-weight: 800;
  list-style: none;
  cursor: pointer;
  transition: transform 300ms var(--ease-back);
}
.exit summary::-webkit-details-marker { display: none; }
.seo.guide .exit summary:active { transform: scale(0.97, 0.93); transition-duration: 60ms; }
/* 출구 번호: 검은 네모에 노란 숫자 */
.exit__no {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-4);
  background: var(--art-board);
  color: var(--art-led);
  font: 800 26px/1 var(--font-num);
}
.exit[open] .exit__no { animation: exit-pop 460ms var(--ease-back); }
@keyframes exit-pop { 0% { transform: scale(1); } 30% { transform: scale(1.18, 0.82); } 60% { transform: scale(0.94, 1.08); } 100% { transform: none; } }
/* 화살표: 닫힘은 →, 열림은 ↓ 로 꺾인다 */
.exit__arrow { position: relative; width: 28px; height: 28px; transition: transform 380ms var(--ease-spring); }
.exit__arrow::before { content: ""; position: absolute; left: 3px; right: 9px; top: 12px; height: 4px; background: var(--art-board); }
.exit__arrow::after { content: ""; position: absolute; right: 4px; top: 6px; width: 12px; height: 12px; border: solid var(--art-board); border-width: 4px 4px 0 0; transform: rotate(45deg); }
.exit[open] .exit__arrow { transform: rotate(90deg); }
.exit__a {
  margin: 0 0 var(--sp-6) 25px;
  padding: var(--sp-12) var(--sp-16) var(--sp-12) var(--sp-20);
  border-left: 4px solid var(--art-board);
  background: var(--art-paper);
}
.exit[open] .exit__a { animation: exit-down 420ms var(--ease-back) both; }
@keyframes exit-down { from { clip-path: inset(0 0 100% 0); transform: translateY(-8px); } to { clip-path: inset(0 0 0 0); transform: none; } }
.exit__to { display: block; margin-bottom: var(--sp-4); font: var(--label-03); font-weight: 800; color: var(--color-primary); }
.seo.guide .exit__a p { margin: 0; font: var(--body-03); color: var(--color-text); }

/* ---------- 갈아타는 곳 (다른 도구 링크): 환승 안내판 ---------- */
.more-sites.xfer {
  margin-top: var(--sp-40);
  padding: 0;
  border-radius: var(--r-12);
  background: var(--color-surface);
  box-shadow: inset 0 0 0 1px var(--color-border), var(--shadow-s);
  overflow: hidden;
}
.xfer .more-sites__title {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  margin: 0;
  padding: var(--sp-12) var(--sp-16);
  background: var(--art-board);
  color: var(--brand-on);
  opacity: 1;
}
.xfer__icon { position: relative; width: 28px; height: 20px; }
.xfer__icon::before,
.xfer__icon::after { content: ""; position: absolute; left: 0; right: 0; height: 4px; border-radius: var(--r-full); }
.xfer__icon::before { top: 3px; background: var(--art-l3); }
.xfer__icon::after { bottom: 3px; background: var(--art-l4); }
.xfer__ko { font: var(--title-04); font-family: var(--font-display); font-weight: 900; }
.xfer__en { margin-left: auto; font: var(--label-02); font-family: var(--font-num); font-weight: 700; color: var(--art-led); }
.xfer .more-sites__item {
  --line: var(--art-l3);
  position: relative;
  display: grid;
  grid-template-columns: 40px 1fr 44px;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: var(--sp-12);
  min-height: 72px;
  padding: var(--sp-12) var(--sp-16);
  border-top: 1px solid var(--color-border);
  color: var(--color-text);
  transition: background var(--dur-fast);
}
.xfer .more-sites__item:first-of-type { border-top: 0; }
.xfer .more-sites__item:nth-child(2) { --line: var(--art-l4); }
.xfer .more-sites__item:nth-child(3) { --line: var(--art-l8); }
.xfer .more-sites__item:active { background: var(--color-surface-sunken); }
.xfer__badge {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-full);
  background: var(--line);
  color: var(--brand-on);
  font: 800 17px/1 var(--font-display);
  transition: transform 360ms var(--ease-back);
}
.xfer .more-sites__item:active .xfer__badge { transform: scale(1.15, 0.85); transition-duration: 60ms; }
.xfer .more-sites__name { grid-column: 2; font: var(--body-02-strong); font-family: var(--font-display); font-weight: 800; }
.xfer .more-sites__desc { grid-column: 2; font: var(--caption-01); color: var(--color-text-secondary); opacity: 1; }
/* 노선색 화살표: 굵은 선 + 꺾쇠 */
.xfer__go { grid-column: 3; grid-row: 1 / 3; position: relative; height: 24px; }
.xfer__go::before { content: ""; position: absolute; left: 0; right: 8px; top: 9px; height: 6px; border-radius: var(--r-full); background: var(--line); transform-origin: left; }
.xfer__go::after { content: ""; position: absolute; right: 2px; top: 3px; width: 13px; height: 13px; border: solid var(--line); border-width: 6px 6px 0 0; transform: rotate(45deg); }
/* 화면에 들어오면 노선이 그어지고 배지가 핀처럼 튄다 */
.xfer:not(.is-in) .xfer__badge { transform: scale(0); }
.xfer:not(.is-in) .xfer__go::before { transform: scaleX(0); }
.xfer.is-in .xfer__badge { animation: xfer-pin 560ms var(--ease-back) calc(var(--i) * 120ms) backwards; }
.xfer.is-in .xfer__go::before { animation: xfer-line 520ms cubic-bezier(0.7, 0, 0.2, 1) calc(var(--i) * 120ms + 160ms) backwards; }
@keyframes xfer-pin { 0% { transform: translateY(-14px) scale(0.2); } 55% { transform: translateY(2px) scale(1.15, 0.85); } 80% { transform: scale(0.96, 1.05); } 100% { transform: none; } }
@keyframes xfer-line { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.xfer + .site-footer { padding-top: var(--sp-16); }
