/* 길벗 앱의 야간 색(design-system Palette)을 그대로 쓴다. */
:root {
  --bg: #0b0c0e;
  --surface: #1a1d22;
  --raised: #23272e;
  --outline: #343a43;
  --text: #f6f3ec;
  --text2: #b9b4aa;
  --accent: #ffc857;
  --route: #8ab8ff;
  --positive: #5eddb0;
  --scrim: rgba(11, 12, 14, 0.88);
  --radius: 20px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard", -apple-system, "Apple SD Gothic Neo", sans-serif;
  line-height: 1.5;
}

a { color: var(--route); }

.intro {
  display: flex;
  gap: 20px;
  align-items: center;
  max-width: 1240px;
  margin: 0 auto;
  padding: 32px 16px 8px;
}
.intro-icon { width: 64px; height: 64px; border-radius: 16px; }
.intro h1 { margin: 0; font-size: 32px; }
.tagline { margin: 4px 0 0; color: var(--text2); }

.howto { max-width: 1240px; margin: 0 auto; padding: 8px 16px 16px; }
.howto p { margin: 6px 0; }
.howto .fine, .map-note, .links { color: var(--text2); font-size: 14px; }

.stage {
  display: grid;
  grid-template-columns: minmax(320px, 520px) 1fr;
  gap: 20px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 16px;
}

.car-frame {
  background: #000;
  border-radius: 28px;
  padding: 10px;
  border: 1px solid var(--outline);
}
.screen {
  background: var(--bg);
  border-radius: 20px;
  aspect-ratio: 841 / 1210;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 18px;
  gap: 14px;
  position: relative;
}

.controls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ctl {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--outline);
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.ctl:disabled { opacity: 0.4; cursor: default; }
.ctl select { background: transparent; color: var(--text); border: 0; font: inherit; }
.toggle input { accent-color: var(--accent); }

.map-wrap { display: flex; flex-direction: column; }
.map { flex: 1; min-height: 480px; border-radius: var(--radius); border: 1px solid var(--outline); }
.leaflet-container { background: #1d2025; }

/* 차량 화면 안의 요소들. 앱의 Compose 화면을 옮긴 것이다. */
.hdr { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text2); }
.hdr .trip { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip {
  border: 1px solid var(--outline);
  background: var(--surface);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  white-space: nowrap;
}
.chip.pos { color: var(--positive); }
.chip.acc { color: var(--accent); }
.chip.info { color: var(--route); }

.photo {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(180deg, #151b22 0%, #1e2731 55%, #26313d 100%);
  flex: 1;
  min-height: 120px;
}
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo .credit {
  position: absolute; top: 8px; right: 8px;
  background: rgba(11, 12, 14, 0.6);
  border-radius: 6px; padding: 2px 6px;
  font-size: 11px; color: var(--text);
}
.photo .beacon {
  position: absolute; top: 0; bottom: 0; width: 8px; background: var(--accent);
}
.photo .beacon.l { left: 0; } .photo .beacon.r { right: 0; }
.photo .arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: #0b0c0e;
  display: grid; place-items: center; font-size: 30px; font-weight: 700;
}
.photo .arrow.l { left: 18px; } .photo .arrow.r { right: 18px; }
.photo .caption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 16px;
  background: linear-gradient(180deg, transparent, var(--scrim));
}

.lead { color: var(--accent); font-weight: 700; font-size: 18px; }
.name { font-size: 40px; font-weight: 800; line-height: 1.15; }
.name.small { font-size: 32px; }
.body { color: var(--text2); font-size: 16px; }
.seat { color: var(--accent); font-size: 15px; }
.label { color: var(--text2); font-size: 14px; }
.title { font-size: 20px; font-weight: 700; }
.added { color: var(--route); font-size: 17px; }

.answer { display: flex; gap: 10px; }
.btn {
  border: 0; border-radius: 14px; padding: 14px 16px; font: inherit; font-size: 17px; font-weight: 700; cursor: pointer;
  background: var(--raised); color: var(--text);
}
.btn.route { background: var(--route); color: #0b0c0e; flex: 1.3; }
.btn.primary { background: var(--accent); color: #0b0c0e; width: 100%; }
.btn.secondary { flex: 1; }
.btn.wide { width: 100%; }
.countdown { height: 4px; background: var(--outline); border-radius: 2px; overflow: hidden; }
.countdown div { height: 100%; background: var(--route); transition: width 0.2s linear; }

.quiet { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.quiet .big { font-size: 40px; font-weight: 800; color: var(--text2); }

.rail { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text2); flex-wrap: nowrap; overflow: hidden; }
.rail .dot { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--outline); flex: none; }
.rail .dot.told { background: var(--accent); border-color: var(--accent); }
.rail .dot.visited { background: var(--positive); border-color: var(--positive); }
.rail .dot.wp { border-color: var(--route); }
.rail .seg { flex: 1; height: 2px; background: var(--outline); min-width: 6px; }
.rail .car { font-size: 14px; }
.rail .stop { white-space: nowrap; }

.card { background: var(--surface); border-radius: 16px; padding: 12px 14px; }
.stamps { display: flex; align-items: center; gap: 12px; }
.stamps .stamp {
  width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--outline);
  display: grid; place-items: center; color: var(--outline); font-size: 20px;
}
.stamps .stamp.on { background: var(--positive); border-color: var(--positive); color: #0b0c0e; }
.stamps .stamp-name { font-size: 11px; color: var(--text2); text-align: center; }
.list { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; min-height: 0; flex: 1; }
.place { display: flex; gap: 10px; align-items: center; }
.place .thumb { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; flex: none; background: linear-gradient(180deg, #151b22, #26313d); }
.place .thumb img { width: 100%; height: 100%; object-fit: cover; }
.place .info { flex: 1; min-width: 0; }
.place .guide { background: var(--route); color: #0b0c0e; border: 0; border-radius: 10px; padding: 6px 10px; font: inherit; font-weight: 700; cursor: pointer; }
.walk { display: flex; justify-content: space-between; gap: 8px; }

.markers .poi { background: var(--surface); color: var(--text); border: 1px solid var(--outline); border-radius: 999px; padding: 2px 8px; font-size: 12px; white-space: nowrap; }
.markers .poi.hot { background: var(--accent); color: #0b0c0e; border-color: var(--accent); }
.markers .poi.done { color: var(--positive); }
.markers .poi.wp { border-color: var(--route); color: var(--route); }
.carmark { width: 26px; height: 26px; border-radius: 50%; background: var(--route); border: 3px solid #fff; display: grid; place-items: center; }
.carmark span { display: block; width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 10px solid #0b0c0e; }

.about { max-width: 1240px; margin: 32px auto 48px; padding: 0 16px; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.cards article { background: var(--surface); border-radius: 16px; padding: 16px; }
.cards h3 { margin: 0 0 6px; font-size: 17px; }
.cards p { margin: 0; color: var(--text2); font-size: 14px; }

@media (max-width: 900px) {
  .stage { grid-template-columns: 1fr; }
  .map { min-height: 340px; }
  .cards { grid-template-columns: 1fr 1fr; }
  .name { font-size: 32px; }
}
@media (max-width: 480px) {
  .cards { grid-template-columns: 1fr; }
  .intro h1 { font-size: 26px; }
  .screen { padding: 12px; gap: 10px; }
}

/* 지도 타일을 앱의 야간 화면에 맞춰 어둡게 한다. 경로와 표시는 그대로 둔다. */
.map .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(0.85) contrast(0.9) saturate(0.6); }
