/* ================================
   /route/ — 卡片堆叠浏览页
   竖屏优化 · 窄长卡片
   ================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #FAFAF9;
  color: #292524;
  display: flex;
  flex-direction: column;
  align-items: center;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-x;
}

/* ── Top Nav ── */
.route-nav {
  width: 100%;
  max-width: 360px;
  padding: 1rem 1rem 0;
}

.back-link {
  font-family: "Press Start 2P", monospace;
  font-size: 0.45rem;
  color: #A8A29E;
  text-decoration: none;
  transition: color 0.2s;
}

.back-link:hover { color: #3B82F6; }

/* ── Card Stack ── */
.card-stack {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  padding: 0 0.75rem;
}

/* ── Card Wrapper ── */
.card-wrapper {
  position: absolute;
  width: 100%;
  max-width: 320px;
  cursor: pointer;
  will-change: transform, opacity;
  transition: none;
}

.card-wrapper[data-pos="active"] {
  z-index: 10;
  pointer-events: auto;
}

.card-wrapper[data-pos="left"],
.card-wrapper[data-pos="right"] {
  z-index: 5;
  pointer-events: none;
}

/* ── Card ── */
.card-inner {
  background: #FFFFFF;
  border: 1px solid #E7E5E4;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

/* ── Card Scene ── */
.card-scene {
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #EFF6FF;
  position: relative;
}

.card-scene canvas,
.card-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Card Badge ── */
.card-badge {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  font-family: "Press Start 2P", monospace;
  font-size: 0.4rem;
  background: rgba(0, 0, 0, 0.6);
  color: #FFF;
  padding: 0.3rem 0.55rem;
  border-radius: 6px;
  letter-spacing: 0.5px;
  backdrop-filter: blur(2px);
}

.card-badge.vt-b { background: rgba(245, 158, 11, 0.85); }
.card-badge.vt-c { background: rgba(139, 92, 246, 0.85); }
.card-badge.vt-d { background: rgba(16, 185, 129, 0.85); }
.card-badge.vt-e { background: rgba(239, 68, 68, 0.85); }

/* ── Card Info ── */
.card-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.75rem 1rem 1rem;
}

.card-label {
  font-family: "Press Start 2P", monospace;
  font-size: 0.55rem;
  color: #292524;
  text-align: center;
  line-height: 1.4;
}

.card-desc {
  font-size: 0.8rem;
  color: #A8A29E;
  text-align: center;
  line-height: 1.4;
}

.card-link {
  margin-top: 0.35rem;
  font-family: "Press Start 2P", monospace;
  font-size: 0.45rem;
  color: #3B82F6;
  text-decoration: none;
  padding: 0.35rem 0.9rem;
  border: 1px solid #3B82F6;
  transition: all 0.2s;
}

.card-link:hover,
.card-link:active {
  background: #3B82F6;
  color: #FFF;
}

/* ── Responsive ── */
@media (min-width: 600px) {
  .route-nav { max-width: 420px; }
  .card-stack { max-width: 420px; }
  .card-wrapper { max-width: 360px; }
  .card-label { font-size: 0.65rem; }
  .card-desc { font-size: 0.85rem; }
  .back-link { font-size: 0.5rem; }
}

@media (max-width: 380px) {
  .card-stack { padding: 0 0.5rem; }
  .card-wrapper { max-width: 100%; }
  .card-scene { aspect-ratio: 3 / 4; }
  .card-label { font-size: 0.45rem; }
  .card-desc { font-size: 0.7rem; }
  .card-link { font-size: 0.4rem; padding: 0.3rem 0.7rem; }
}
