/* ========== tokens (深岩灰 + 琥珀) ========== */
:root {
  --bg-1: #eef1f4;
  --bg-2: #e2e7ec;
  --card: #ffffff;
  --ink:  #1c2632;
  --muted: rgba(28, 38, 50, .58);
  --faint: rgba(28, 38, 50, .42);
  --line: rgba(28, 38, 50, .12);
  --perf: rgba(28, 38, 50, .24);
  --accent: #d59226;
  --accent-ink: #9a6310;
  --accent-soft: rgba(213, 146, 38, .12);
}

/* ========== reset ========== */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  min-height: 100vh;
  background: linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 100%);
}

/* ========== layout (flex centering, old-device safe) ========== */
.stage {
  min-height: 100vh;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  padding: 40px 18px;
}

/* ========== card  ========== */
.portal {
  width: 100%;
  max-width: 480px;            /* fallback for min(); robust on old browsers */
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 32px 26px 26px;
  box-shadow:
    0 1px 2px rgba(20, 30, 40, .05),
    0 18px 44px rgba(20, 30, 40, .10);

  opacity: 0;
  -webkit-transform: translateY(14px);
  transform: translateY(14px);
  -webkit-animation: rise .5s ease forwards;
  animation: rise .5s ease forwards;
}

@-webkit-keyframes rise {
  to { opacity: 1; -webkit-transform: translateY(0); }
}
@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

/* ========== lead text (居中) ========== */
.lead {
  margin-bottom: 24px;
  text-align: center;
}

.headline {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: .2px;
  line-height: 1.3;
  color: var(--ink);
}

.tagline {
  margin-top: 8px;
  font-size: 15.5px;
  color: var(--muted);
  line-height: 1.5;
}

/* ========== routes  ========== */
.routes-block { margin-top: 4px; }

.routes {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
}

.route {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  width: 100%;
  padding: 13px 16px;
  text-decoration: none;
  -webkit-user-select: none;
  user-select: none;
  border-radius: 13px;
  background: var(--card);
  border: 1px solid var(--line);
  -webkit-transition: border-color 130ms ease, box-shadow 130ms ease, -webkit-transform 130ms ease;
  transition: border-color 130ms ease, box-shadow 130ms ease, transform 130ms ease;
}

/* （软琥珀底） */
.route-code {
  -webkit-box-flex: 0;
  -webkit-flex: 0 0 auto;
  flex: 0 0 auto;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--accent-soft);
}

/* 圆点 */
.route-code::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-ink);
}

/* 虚线 */
.route-body {
  -webkit-box-flex: 1;
  -webkit-flex: 1 1 auto;
  flex: 1 1 auto;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
  min-width: 0;
  margin-left: 13px;
  padding-left: 15px;
  border-left: 1.5px dashed var(--perf);
  text-align: left;
}

/* 1 */
.route-title {
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
}

/* 2 */
.route-desc {
  margin-top: 2px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--accent-ink);
}

/* 箭头 */
.route-arrow {
  -webkit-box-flex: 0;
  -webkit-flex: 0 0 auto;
  flex: 0 0 auto;
  margin-left: 12px;
  font-size: 18px;
  line-height: 1;
  color: var(--faint);
  -webkit-transition: color 130ms ease, -webkit-transform 130ms ease;
  transition: color 130ms ease, transform 130ms ease;
}

.route + .route { margin-top: 10px; }

.route:hover {
  border-color: var(--accent);
  box-shadow: 0 6px 18px rgba(20, 30, 40, .10);
  -webkit-transform: translateY(-1px);
  transform: translateY(-1px);
}

.route:hover .route-arrow {
  color: var(--accent);
  -webkit-transform: translateX(2px);
  transform: translateX(2px);
}

.route:active {
  -webkit-transform: translateY(0);
  transform: translateY(0);
}

/* ========== note + credit ========== */
.note {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
  text-align: center;
}

.credit {
  margin-top: 18px;
  text-align: center;
  font-size: 13px;
  color: var(--faint);
}

.credit-sep { margin: 0 6px; }

/* ========== reduced motion ========== */
@media (prefers-reduced-motion: reduce) {
  .portal { -webkit-animation: none; animation: none; opacity: 1; -webkit-transform: none; transform: none; }
  .route-arrow { -webkit-transition: none; transition: none; }
}

/* ========== tablet ========== */
@media (min-width: 600px) {
  .portal {
    max-width: 500px;
    padding: 36px 32px 28px;
  }
  .headline { font-size: 25px; }
}

/* ========== desktop ========== */
@media (min-width: 1024px) {
  .stage { padding: 56px 24px; }

  .portal {
    max-width: 560px;
    padding: 44px 42px 34px;
    border-radius: 20px;
  }

  .headline { font-size: 28px; }
  .tagline { font-size: 16.5px; margin-top: 9px; }

  .lead { margin-bottom: 28px; }

  .routes-block { margin-top: 6px; }

  .route { padding: 15px 18px; }
  .route-code { width: 42px; height: 42px; }
  .route-code::before { width: 9px; height: 9px; }
  .route-body { margin-left: 15px; padding-left: 17px; }
  .route-title { font-size: 16.5px; }
  .route-desc { font-size: 14px; margin-top: 3px; }
  .route-arrow { font-size: 20px; }
  .route + .route { margin-top: 11px; }

  .note { font-size: 15px; margin-top: 28px; padding-top: 22px; }
  .credit { font-size: 13.5px; margin-top: 20px; }
}
