:root {
  --bg0: #e8eef2;
  --bg1: #f4f7f9;
  --card: #ffffff;
  --ink: #1a2228;
  --muted: #6b7780;
  --line: #d5dee5;
  --green: #1aad19;
  --green-deep: #159414;
  --green-soft: #e8f7e8;
  --navy: #1e3a5f;
  --navy-2: #254a75;
  --shadow: 0 18px 40px rgba(30, 58, 95, 0.12);
  --radius: 16px;
  --font: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --display: "Sora", "Noto Sans SC", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(26, 173, 25, 0.08), transparent 55%),
    linear-gradient(180deg, var(--bg1) 0%, var(--bg0) 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 28px 16px 48px;
}

/* —— 上门页卡片 —— */
.gate-card {
  position: relative;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 28px 28px;
  overflow: hidden;
}

.gate-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--green), #5ad05a 50%, var(--green-deep));
  opacity: 0.9;
}

.stage-progress,
.stage-pass {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.stage-pass {
  display: none;
}

.gate-card.is-done .stage-progress {
  display: none;
}

.gate-card.is-done .stage-pass {
  display: flex;
  animation: rise 0.45s ease both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* 进度环 */
.ring-wrap {
  position: relative;
  width: 168px;
  height: 168px;
  margin: 8px 0 18px;
}

.ring-wrap svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-track {
  fill: none;
  stroke: #eef2f4;
  stroke-width: 10;
}

.ring-bar {
  fill: none;
  stroke: var(--green);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 440;
  stroke-dashoffset: 440;
  transition: stroke-dashoffset 0.05s linear;
  filter: drop-shadow(0 0 6px rgba(26, 173, 25, 0.35));
}

.ring-num {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 52px;
  letter-spacing: -0.03em;
  color: var(--ink);
  transform: rotate(0deg);
}

.gate-head {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.gate-sub {
  margin: 14px 0 0;
  color: var(--green);
  font-size: 16px;
  line-height: 1.55;
  font-weight: 500;
}

/* 盾牌 */
.shield {
  width: 92px;
  height: 108px;
  margin: 6px 0 18px;
  filter: drop-shadow(0 10px 18px rgba(26, 173, 25, 0.28));
}

.pass-title {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.pass-hint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

/* 线路列表：进度中隐藏，完成后显示 */
.routes {
  display: none;
  width: 100%;
  margin-top: 26px;
  gap: 12px;
  flex-direction: column;
}

.gate-card.is-done .routes {
  display: flex;
  animation: rise 0.5s ease 0.08s both;
}

.route-btn {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 16px 18px;
  background: linear-gradient(180deg, #22c021 0%, var(--green) 55%, var(--green-deep) 100%);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.25) inset,
    0 8px 18px rgba(26, 173, 25, 0.28);
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}

.route-btn:hover {
  filter: brightness(1.05);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.3) inset,
    0 10px 22px rgba(26, 173, 25, 0.36);
}

.route-btn:active {
  transform: translateY(1px) scale(0.992);
}

.tip-bar {
  display: none;
  margin-top: 14px;
  width: 100%;
  border-radius: 10px;
  padding: 12px 14px;
  background: linear-gradient(180deg, var(--navy-2), var(--navy));
  color: #f3f7fb;
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 16px rgba(30, 58, 95, 0.22);
}

.gate-card.is-done .tip-bar {
  display: block;
  animation: rise 0.5s ease 0.12s both;
}

.meta {
  margin-top: 18px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.meta .support {
  color: #5a6a75;
}

/* —— 下部资讯壳 —— */
.chrome {
  margin-top: 28px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 20px 26px;
}

.chrome-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  justify-content: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  font-weight: 600;
  color: #2c3740;
}

.chrome-nav a {
  padding: 4px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.chrome-nav a:hover {
  color: var(--green-deep);
  border-bottom-color: var(--green);
}

.search {
  display: flex;
  gap: 8px;
  margin: 16px 0 8px;
}

.search input {
  flex: 1;
  min-width: 0;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  font: inherit;
  font-size: 14px;
  background: #fbfcfd;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search input:focus {
  border-color: #8fd48e;
  box-shadow: 0 0 0 3px rgba(26, 173, 25, 0.15);
}

.search button {
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(180deg, #3d6fa8, #2a5484);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.search button:active {
  transform: translateY(1px);
}

.updates {
  margin-top: 18px;
}

.updates-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 800;
}

.updates-title::before {
  content: "";
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: linear-gradient(180deg, #4d8fd6, #2a5484);
}

.updates-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.updates-list li {
  border-bottom: 1px dashed #e4ebf0;
}

.updates-list a {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 11px 2px;
  font-size: 14px;
  line-height: 1.45;
  color: #243038;
  transition: color 0.15s ease;
}

.updates-list a::before {
  content: "·";
  color: #7a8a96;
  font-weight: 700;
  line-height: 1.2;
}

.updates-list a:hover {
  color: var(--green-deep);
}

.foot {
  margin-top: 22px;
  text-align: center;
  color: #8a96a0;
  font-size: 12px;
  line-height: 1.7;
}

@media (max-width: 420px) {
  .gate-card {
    padding: 28px 18px 22px;
  }

  .ring-num {
    font-size: 46px;
  }

  .pass-title,
  .gate-head {
    font-size: 24px;
  }

  .route-btn {
    font-size: 16px;
    padding: 15px 14px;
  }
}
