:root {
  color-scheme: dark;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  font-size: 16px;
  color: #eff3ed;
  background: #050705;
  --green: #75eb2f;
  --muted: #a0afa2;
  --page-gutter: clamp(16px, 4vw, 26px);
}
*, *::before, *::after { box-sizing: border-box; }
html { min-height: 100%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; overflow-x: hidden; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { font: inherit; cursor: pointer; }
button, a { -webkit-user-select: none; user-select: none; }
button:focus-visible, a:focus-visible { outline: 2px solid #9cff64; outline-offset: 5px; }
a { color: inherit; text-decoration: none; cursor: pointer; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

.section {
  position: relative;
  isolation: isolate;
  width: min(100%, 540px);
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) max(20px, env(safe-area-inset-bottom, 0px)) env(safe-area-inset-left, 0px);
  background: #0b0e0b;
  display: flex;
  flex-direction: column;
}
.section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(180deg, rgba(5,9,6,.12), rgba(5,9,6,.18) 38%, #0b0e0b 83%), url("../img/BG.png");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: 100% 100%, 100% auto;
}
.header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: clamp(68px, 9vh, 90px);
  padding: 14px var(--page-gutter) 6px;
}
.brand-title { margin: 0; line-height: 1; min-width: 0; }
.logo { width: clamp(118px, 32vw, 162px); height: auto; }
.header-btn { display: flex; align-items: center; min-height: 44px; }
.header-btn:last-child { justify-content: flex-end; }
.header-btn img { width: clamp(62px, 17vw, 80px); height: auto; }
.header-btn:hover { filter: brightness(1.15); }
.header-btn[aria-disabled="true"], .entry[aria-disabled="true"] { cursor: default; }
main { width: 100%; min-width: 0; }
.hero { width: 100%; padding: 0 8px; margin: 0 auto 12px; }
.hero picture { display: block; }
.hero img {
  width: 100%;
  height: auto;
  max-height: clamp(176px, 37vh, 380px);
  max-height: clamp(176px, 37svh, 380px);
  object-fit: contain;
  object-position: center bottom;
}
/* 品牌入口恢复原版图片按钮；保留语义链接与现有业务绑定。 */
.entrances { --button-unit: min(3.8vw, 18px); padding: 0 calc(var(--button-unit) * 1.5); }
.entry {
  display: grid;
  grid-template-columns: 100%;
  align-items: center;
  justify-content: space-around;
  align-content: center;
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  height: min(calc(var(--button-unit) * 4.5), 75px);
  padding: 0;
  border: 0;
  border-radius: calc(var(--button-unit) * .6);
  background: url("../img/menuBox02.png") 50% 50% / 100% 100% no-repeat;
  box-shadow: none;
  transition: box-shadow .2s;
}
.entry-main {
  grid-template-columns: 50% 50%;
  margin-bottom: calc(var(--button-unit) * .5);
  background-image: url("../img/menuBox.png");
}
.entry-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 0;
  height: min(9vw, 70%);
}
.entry img { width: auto; height: 100%; max-width: 100%; object-fit: contain; }
.entry .enter { height: 85%; margin-bottom: -2%; }
.entry-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: calc(var(--button-unit) * .5); }
@media (hover: hover) {
  .entry:hover { box-shadow: 0 1px min(1.5vw, 3px) 1px rgba(47,166,0,.5); }
}
@media (min-width: 601px) and (max-height: 900px) {
  .entry { height: min(9vh, 70px); }
}
@media (max-width: 600px) {
  .header { min-height: 64px; padding-top: 10px; }
  .hero { margin-bottom: 8px; }
  .hero img { max-height: clamp(140px, 34vh, 340px); max-height: clamp(140px, 34svh, 340px); }
  .entry { height: clamp(48px, min(17.1vw, 8vh), 75px); height: clamp(48px, min(17.1vw, 8svh), 75px); }
  .entry-visual { height: min(9vw, 40px); max-height: 70%; }
  .footer { padding-top: 14px; }
}

.footer { width: 100%; margin-top: auto; padding: 25px var(--page-gutter) 0; }
.install-strip { width: fit-content; max-width: 100%; margin: 0 auto 12px; display: flex; align-items: center; background: #6de32c; color: #102108; border-radius: 10px; }
.install-btn { display: flex; align-items: center; justify-content: center; gap: 9px; border: 0; background: transparent; color: inherit; min-height: 46px; padding: 9px 17px; font-size: 14px; font-weight: 700; }
.install-btn img { width: 17px; height: 17px; }
.dismiss-install { border: 0; border-left: 1px solid rgba(16,33,8,.22); color: inherit; background: transparent; padding: 10px 14px; min-height: 44px; font-size: 12px; }
.footer-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0 12px; font-size: 11px; color: #a3b1a5; }
.text-btn { color: inherit; background: transparent; border: 0; padding: 10px 3px; min-height: 36px; font-size: 12px; }
.text-btn:hover { color: #d9f8cf; }
.network-note { margin: 0 var(--page-gutter) 12px; padding: 10px 12px; border: 1px solid #6d622f; border-radius: 8px; color: #efdc9b; background: #252211; font-size: 12px; line-height: 1.7; }

.routing-panel { margin: 14px var(--page-gutter) 0; padding: 10px 12px; border: 1px solid #293c27; border-radius: 10px; background: #111a12; font-size: 12px; line-height: 1.6; }
.routing-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.routing-toolbar p { margin: 0; color: #b7d9a7; min-width: 0; }
.routing-toolbar button { flex: 0 0 auto; color: #9be66b; min-height: 40px; padding: 7px 3px; }
.routing-toolbar button:disabled { opacity: .55; cursor: default; }
.routing-note { color: #aab7a9; font-size: 11px; margin: 5px 0 9px; overflow-wrap: anywhere; }
.route-details > summary { cursor: pointer; color: #b5c4b2; padding: 8px 0; min-height: 36px; }
.route-details > summary:focus-visible { outline: 2px solid #9cff64; outline-offset: 3px; }
.route-group + .route-group { margin-top: 16px; }
.route-group h3 { font-size: 12px; color: #e0eddb; margin: 8px 0; }
.route-options { list-style: none; margin: 0; padding: 0; }
.route-options li + li { border-top: 1px solid #263424; }
.route-options a { display: flex; align-items: center; gap: 8px; justify-content: space-between; min-height: 42px; padding: 7px 5px; border-radius: 4px; }
.route-options a[data-selected="true"] { background: #22371c; color: #b7f38f; }
.route-name { min-width: 0; overflow-wrap: anywhere; }
.route-result { flex: 0 0 auto; font-size: 10px; color: #b5c7ae; white-space: nowrap; }

.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: max(18px, env(safe-area-inset-top, 0px)) 14px max(18px, env(safe-area-inset-bottom, 0px)); }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.76); }
.modal-panel { position: relative; width: min(100%, 490px); max-height: 100%; display: flex; flex-direction: column; border: 1px solid #3b513c; border-radius: 16px; color: #eaf1e9; background: #111913; box-shadow: 0 22px 80px rgba(0,0,0,.48); overflow: hidden; }
.modal-header { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px 12px 20px; border-bottom: 1px solid #29372b; }
.guide-heading { display: flex; align-items: center; gap: 10px; min-width: 0; }
.guide-app-icon { display: block; width: 40px; height: 40px; flex: 0 0 40px; object-fit: contain; }
.modal-header h2 { margin: 0; font-size: 17px; line-height: 1.3; }
.close-guide { width: 42px; height: 42px; flex: 0 0 42px; border: 0; border-radius: 9px; color: #d3dfd2; background: #223025; font-size: 28px; line-height: 1; }
.modal-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 20px; font-size: 14px; line-height: 1.8; }
.modal-body p { margin: 0 0 14px; }
.guide-steps { padding-left: 21px; margin: 0 0 18px; }
.guide-steps li + li { margin-top: 8px; }
.guide-image-wrap { overflow: hidden; border-radius: 9px; margin-bottom: 16px; background: #fff; }
.guide-image-wrap img { width: 100%; height: auto; }
.modal-body .guide-note { margin-bottom: 0; font-size: 12px; color: #b4c1b4; }
.toast { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 80; max-width: min(90vw, 450px); padding: 12px 18px; border: 1px solid #50644d; border-radius: 10px; color: #fff; background: #182319; font-size: 14px; text-align: center; box-shadow: 0 8px 30px #0008; }
.update-notice { position: fixed; bottom: max(16px, env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); z-index: 60; width: min(calc(100% - 24px), 500px); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border: 1px solid #537448; border-radius: 12px; background: #1b2a1b; box-shadow: 0 10px 35px #0009; font-size: 13px; }
#apply-update { border: 0; border-radius: 6px; background: #7add44; color: #142a0b; padding: 10px; font-size: 12px; font-weight: 700; white-space: nowrap; }
body.modal-open { overflow: hidden; }
@media (max-width: 359px) {
  .header { gap: 7px; }
  .logo { width: 112px; }
  .header-btn img { width: 59px; }
}
@media (max-width: 319px) {
  .header { grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr) minmax(0, 1fr); padding-left: 10px; padding-right: 10px; gap: 6px; }
  .logo, .header-btn img { width: 100%; }
  .modal-header { padding-left: 12px; gap: 8px; }
  .guide-heading { gap: 8px; }
  .modal-header h2 { font-size: 15px; }
  .modal-body { padding: 14px; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .hero img { max-height: 195px; }
  .header { min-height: 68px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
