/* /apps — App 全家桶展示页（v1.2 calm catalog） */

.apps-page {
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.apps-main {
  padding-bottom: 24px;
}

.apps-hero {
  padding-top: 36px;
  padding-bottom: 20px;
}

.apps-hero-kicker,
.apps-kicker {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-chrome);
}

.apps-hero-title {
  font-size: clamp(1.45rem, 4vw, 2rem);
}

.apps-hero-sub {
  max-width: 36em;
  margin-left: auto;
  margin-right: auto;
}

.apps-body {
  padding-bottom: 48px;
}

.apps-container {
  max-width: 960px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.app-store-card--featured {
  box-shadow: var(--shadow-md);
}

.apps-badge {
  display: inline-block;
  margin-top: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--color-chrome) 12%, white);
  color: var(--color-chrome);
}

.app-store-get--featured-desktop {
  display: inline-flex;
}

.apps-featured-cta {
  display: none;
  gap: 10px;
  padding: 0 16px 14px;
  border-bottom: 1px solid var(--color-border);
}

.apps-featured-cta .app-store-get,
.apps-cta-primary {
  flex: 1;
  height: 44px;
  font-size: 15px;
}

.apps-cta-secondary,
.apps-sticky-secondary {
  flex: 1;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-bg-white);
  color: var(--color-text-primary);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.apps-cta-secondary:hover,
.apps-sticky-secondary:hover {
  border-color: var(--color-chrome);
  color: var(--color-chrome);
  text-decoration: none;
}

.apps-ecosystem {
  padding: 14px 16px;
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
}

.apps-ecosystem-lead {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-secondary);
}

.apps-ecosystem-lead strong {
  color: var(--color-text-primary);
}

.apps-ecosystem-map {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.apps-eco-pill {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-bg-tray);
  color: var(--color-text-secondary);
}

.apps-eco-pill.is-primary {
  border-color: color-mix(in srgb, var(--color-chrome) 30%, white);
  background: color-mix(in srgb, var(--color-chrome) 8%, white);
  color: var(--color-chrome);
  font-weight: 600;
}

.apps-web-exit {
  display: none;
  text-align: center;
  margin: 0;
  padding: 0;
}

.apps-web-exit a {
  color: var(--color-chrome);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}

.apps-web-exit a:hover {
  text-decoration: underline;
}

/* 桌面：保留原「已在 Web 练习？」文案行 */
.apps-web-link {
  text-align: center;
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--color-text-secondary);
}

.apps-web-link a {
  color: var(--color-chrome);
  font-weight: 600;
  text-decoration: none;
}

.apps-web-link a:hover {
  text-decoration: underline;
}

.apps-sticky-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0));
  background: rgba(254, 254, 253, 0.92);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--color-border);
  gap: 10px;
}

.apps-sticky-primary {
  flex: 1;
  height: 44px;
  font-size: 15px;
}

@media (max-width: 640px) {
  /* 移动端：独立落地页，无站点头尾 */
  .apps-page--standalone .header,
  .apps-page--standalone .footer {
    display: none !important;
  }

  .apps-page--standalone .apps-hero {
    display: none;
  }

  .apps-page--standalone .apps-main {
    padding-top: max(12px, env(safe-area-inset-top, 0));
  }

  .apps-page--standalone .apps-body {
    padding-bottom: 12px;
  }

  .apps-page--standalone .apps-web-link {
    display: none;
  }

  .apps-page--standalone .apps-web-exit {
    display: block;
    padding: 20px 0 4px;
    margin-top: 4px;
    border-top: 1px solid var(--color-border);
  }

  .apps-hero {
    text-align: left;
    padding-left: 20px;
    padding-right: 20px;
  }

  .apps-hero-sub {
    margin-left: 0;
    text-align: left;
  }

  .app-store-get--featured-desktop {
    display: none;
  }

  .apps-featured-cta--mobile {
    display: flex;
  }

  .apps-sticky-bar {
    display: flex;
  }

  .apps-page--standalone {
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 0));
  }

  .apps-page {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0));
  }

  .app-store-shots--featured .app-store-shot:nth-child(n + 4) {
    display: none;
  }
}

@media (min-width: 641px) {
  .apps-featured-cta--mobile {
    display: none;
  }

  .apps-web-exit {
    display: none;
  }

  .apps-web-link {
    display: block;
  }
}
