:root {
  --bg: #07090b;
  --card: #11161a;
  --card2: #161d22;
  --line: #232c33;
  --fg: #eef3f6;
  --dim: #8b979f;
  --cyan: #00e5ff;
  --lime: #c6ff00;
  --red: #ff5a5a;
  --safe: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--fg); }
body {
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  padding: 0 14px calc(28px + var(--safe));
  max-width: 560px;
  margin: 0 auto;
}
h1 { font-size: 20px; margin: 0; letter-spacing: -0.02em; }

.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 2px 12px;
  position: sticky; top: 0;
  background: linear-gradient(var(--bg) 80%, rgba(7,9,11,0));
  z-index: 5;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand p { margin: 2px 0 0; font-size: 11px; color: var(--dim); letter-spacing: 0.02em; }
.dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #47525a; box-shadow: 0 0 0 0 rgba(0,229,255,0.6);
  transition: background 0.2s;
}
.dot.live { background: var(--cyan); animation: pulse 2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(0,229,255,0.55); }
  70% { box-shadow: 0 0 0 10px rgba(0,229,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,229,255,0); }
}
.roomChip {
  font-family: inherit; font-size: 13px; font-weight: 800; letter-spacing: 0.16em;
  color: var(--cyan);
  background: #0d1418; border: 1px solid #214049; border-radius: 999px;
  padding: 8px 14px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  margin-bottom: 12px;
}
.card.hidden, .hidden { display: none !important; }
.label { font-size: 11px; font-weight: 700; color: var(--dim); letter-spacing: 0.08em; margin-bottom: 8px; }

.seg { display: flex; gap: 8px; }
.seg button {
  flex: 1; font-family: inherit; font-size: 14px; font-weight: 700;
  color: var(--dim); background: var(--card2);
  border: 1px solid var(--line); border-radius: 13px;
  padding: 14px 8px; transition: 0.15s;
}
.seg button.on { color: #071014; background: var(--cyan); border-color: var(--cyan); }

.search { display: flex; gap: 8px; }
.search input {
  flex: 1; min-width: 0;
  font-family: inherit; font-size: 16px; color: var(--fg);
  background: #0b1014; border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 14px;
}
.search input::placeholder { color: #5d6a72; }
.search input:focus { outline: none; border-color: #2a4a55; }
.search button, .row button, .ghost, .primary, .primary2, .danger {
  font-family: inherit; font-size: 14px; font-weight: 800;
  border-radius: 12px; padding: 14px 16px; border: 1px solid var(--line);
  background: var(--card2); color: var(--fg);
}
.search button { color: #061014; background: var(--cyan); border-color: var(--cyan); }

.results { list-style: none; margin: 10px 0 0; padding: 0; }
.results li {
  padding: 12px 10px; border-radius: 12px; border: 1px solid transparent;
  display: flex; justify-content: space-between; gap: 10px; align-items: center;
}
.results li:active { background: #0e1519; }
.results li + li { border-top: 1px solid #1a2228; }
.results .nm { font-size: 15px; font-weight: 700; }
.results .ad { font-size: 12px; color: var(--dim); margin-top: 3px; }
.results .ds { font-size: 12px; color: var(--cyan); white-space: nowrap; font-weight: 700; }

.navTop { display: flex; gap: 6px; align-items: center; margin-bottom: 12px; }
.pill {
  font-size: 11px; font-weight: 800; letter-spacing: 0.04em;
  border: 1px solid #2b3a42; border-radius: 999px; padding: 4px 10px; color: var(--dim);
}
.pill.on { color: var(--cyan); border-color: var(--cyan); }
.pill.demo { color: var(--lime); border-color: #3d4a00; }
.pill.muted { margin-left: auto; }
.destPill { color: #cfd8dd; border-color: #2b3a42; max-width: 44%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.nowRow { display: flex; gap: 14px; align-items: center; }
.ico { width: 76px; height: 70px; flex: 0 0 auto; color: var(--fg); }
.ico svg { width: 100%; height: 100%; }
.ico.arrive { color: var(--lime); }
.nowText { min-width: 0; }
.dist { font-size: 26px; font-weight: 800; color: var(--cyan); line-height: 1.1; }
.instr { font-size: 22px; font-weight: 800; line-height: 1.2; margin-top: 2px; word-break: keep-all; }
.detail { font-size: 13px; color: #c4ced4; margin-top: 4px; }

.totals { display: flex; margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.totals > div { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.totals b { font-size: 16px; font-variant-numeric: tabular-nums; }
.totals small { font-size: 10px; color: var(--dim); letter-spacing: 0.04em; }

.progressWrap { height: 4px; background: #1a2228; border-radius: 99px; margin: 12px 0 4px; overflow: hidden; }
.progress { height: 100%; width: 0%; background: var(--cyan); transition: width 0.4s; }

.steps { list-style: none; margin: 8px 0 14px; padding: 0; max-height: 220px; overflow: auto; }
.steps li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid #171f24; font-size: 14px; color: #b8c3c9; }
.steps li.on { color: #fff; }
.steps li.on b { color: var(--cyan); }
.steps .sdist { color: var(--dim); font-size: 12px; min-width: 54px; text-align: right; font-variant-numeric: tabular-nums; }
.steps .stext { flex: 1; min-width: 0; }
.steps .sdet { font-size: 11px; color: var(--dim); }

.row { display: flex; gap: 8px; margin-top: 4px; }
.row button { flex: 1; }
.primary { background: var(--cyan); color: #061014; border-color: var(--cyan); }
.primary2 { background: #1b2a05; color: var(--lime); border-color: #3d4a00; }
.danger { background: #2a1214; color: var(--red); border-color: #4a1f22; }
.ghost { background: var(--card2); color: var(--fg); }
.ghost.on { color: var(--lime); border-color: #3d4a00; }
.small { padding: 10px 14px; font-size: 13px; }

.dest .name { font-size: 18px; font-weight: 800; }
.dest .addr { font-size: 12px; color: var(--dim); margin: 4px 0 12px; }

.hint { font-size: 12px; color: var(--dim); line-height: 1.5; margin: 10px 0 0; }

.hudLink .codeRow { display: flex; align-items: center; gap: 10px; }
.bigCode { font-size: 22px; font-weight: 800; letter-spacing: 0.22em; color: var(--cyan); }
.url {
  font-size: 12px; color: #9fb0ba; margin-top: 10px; word-break: break-all;
  background: #0b1014; border: 1px solid var(--line); border-radius: 10px; padding: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.foot { font-size: 11px; color: #55626a; text-align: center; margin: 18px 0 0; line-height: 1.6; }

.toastBar {
  position: fixed; left: 50%; bottom: calc(18px + var(--safe)); transform: translateX(-50%);
  background: #1c262c; border: 1px solid #2f3d45; color: #fff;
  font-size: 13px; font-weight: 700; padding: 10px 16px; border-radius: 999px;
  opacity: 0; transition: opacity 0.2s; pointer-events: none; z-index: 20;
}
.toastBar.show { opacity: 1; }
