/* 原站样式保留；这里补充本地交互、无障碍焦点和清晰的线路弹窗。 */
button {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-align: start;
  cursor: pointer;
}

button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.swipe-warp .van-image__img {
  height: auto;
}

.action-message {
  position: fixed;
  z-index: 200;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: max-content;
  max-width: min(85vw, 420px);
  padding: 14px 20px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.88);
  color: #fff;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
  pointer-events: none;
}

.action-message[hidden] {
  display: none;
}

#welcome-dialog {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 24px 20px;
  border: 0;
  background: transparent;
  overflow: auto;
}

#welcome-dialog[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

#welcome-dialog::backdrop {
  background: rgba(0, 0, 0, 0.65);
}

.welcome-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: min(325px, 100%);
  transform: translateY(-6vh);
}

.welcome-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100vh - 160px);
  max-height: calc(100dvh - 160px);
  object-fit: contain;
  border-radius: 8px;
}

#close-welcome {
  min-width: 88px;
  min-height: 44px;
  padding: 10px 24px;
  border-radius: 8px;
  background: #cf1530;
  color: #fff;
  font-size: 16px;
  line-height: 24px;
  text-align: center;
}

#close-welcome:hover {
  background: #b41129;
}

#route-dialog {
  width: min(100%, 500px);
  height: 100%;
  max-height: none;
  padding: 0;
  border: 0;
  color: inherit;
  overflow: auto;
  background: rgba(0, 0, 0, 0.65);
}

#route-dialog::backdrop {
  background: transparent;
}

#route-dialog .modal-container {
  position: relative;
  height: auto;
  min-height: 100%;
  padding: 1.9rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#route-dialog .line-dialog {
  background: #211e19;
  border: 1px solid #76613e;
  border-radius: 0.32rem;
  box-shadow: 0 0.4rem 1.2rem rgba(0, 0, 0, 0.5);
}

.route-header {
  padding: 0.4rem 0.36rem 0.2rem;
}

.route-header h2 {
  color: #f4d399;
  font-size: 0.4rem;
  font-weight: 600;
  line-height: 1.5;
}

#route-dialog .line-warp {
  padding: 0 0.32rem 0.16rem;
  border: 0;
  border-radius: 0 0 0.32rem 0.32rem;
  background: #211e19;
}

#route-dialog .line-item + .line-item {
  border-top: 1px solid #40382c;
}

#route-dialog .route-name {
  color: #fff6e5;
  font-weight: 500;
}

#route-dialog .route-state {
  color: #8bd8a5;
}

#route-dialog .line-icon {
  background: #8bd8a5;
}

#route-dialog .go-play {
  background: #2464d9;
  color: #fff;
}

#route-dialog .go-play:hover {
  background: #1d53b8;
}

#route-dialog a:focus-visible {
  outline: 2px solid #f4d399;
  outline-offset: 3px;
}

#route-dialog .close {
  border-radius: 50%;
  background: #211e19;
}

#route-dialog .close .svg-icon {
  display: block;
  width: 100%;
  height: 100%;
}

.route-message {
  position: fixed;
  bottom: 0.2rem;
  left: 5%;
  width: 90%;
  padding: 0.2rem;
  border-radius: 0.15rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.85);
  text-align: center;
  font-size: 0.28rem;
}

.route-message:empty {
  display: none;
}
