:root {
  --bg-deep: #0c2a26;
  --bg-mid: #134039;
  --bg-soft: #e8f3ef;
  --ink: #10221f;
  --muted: #4d635e;
  --foam: #f4fbf8;
  --line: rgba(16, 34, 31, 0.12);
  --accent: #d4786a;
  --accent-deep: #b4574a;
  --glow: rgba(94, 184, 158, 0.35);
  --shadow: 0 18px 50px rgba(12, 42, 38, 0.14);
  --radius: 18px;
  --font-display: "ZCOOL XiaoWei", "STKaiti", "KaiTi", serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --max: 980px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(212, 120, 106, 0.18), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(94, 184, 158, 0.22), transparent 50%),
    linear-gradient(180deg, #dceee8 0%, var(--bg-soft) 42%, #f7faf8 100%);
}

a {
  color: var(--accent-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--ink);
}

.atmosphere {
  pointer-events: none;
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.35), transparent 70%);
  z-index: 0;
}

.site-header,
.site-main,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-header {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.1rem 1.25rem 0.5rem;
  padding-left: max(1.25rem, env(safe-area-inset-left));
  padding-right: max(1.25rem, env(safe-area-inset-right));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1 1 auto;
  color: inherit;
  text-decoration: none;
}

.brand-logo {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  display: block;
  background: transparent;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.55rem;
  line-height: 1.1;
  letter-spacing: 0.04em;
}

.brand-tag {
  font-size: 0.78rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.site-nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  position: relative;
  padding: 0.2rem 0;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -0.15rem;
  height: 2px;
  background: var(--accent);
  transition: right 0.35s ease;
}

.site-nav a:hover::after,
.site-nav a.is-active::after {
  right: 0;
}

.site-main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
  padding-left: max(1.25rem, env(safe-area-inset-left));
  padding-right: max(1.25rem, env(safe-area-inset-right));
}

.home-hero,
.page-hero,
.detail-hero {
  padding: 1.5rem 0 1.75rem;
}

.eyebrow {
  margin: 0 0 0.6rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.display {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 6.5vw, 3.6rem);
  line-height: 1.2;
  letter-spacing: 0.03em;
  font-weight: 400;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.lede {
  margin: 0;
  max-width: 38rem;
  font-size: 1.08rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.section-head {
  margin: 1rem 0 1.25rem;
}

.section-head h2 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 400;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.app-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.app-row-link {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  background: rgba(244, 251, 248, 0.72);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: transform 0.35s ease, background 0.35s ease, border-color 0.35s ease;
}

.app-row-link:hover {
  transform: translateY(-3px);
  background: var(--foam);
  border-color: rgba(180, 87, 74, 0.28);
}

.app-row-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  object-fit: cover;
}

.app-row-body {
  min-width: 0;
}

.app-row-topline {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.app-row-topline h2 {
  margin: 0;
  font-size: 1.35rem;
  font-family: var(--font-display);
  font-weight: 400;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.app-row-sub,
.app-row-desc,
.app-row-meta {
  margin: 0.25rem 0 0;
  overflow-wrap: anywhere;
}

.app-row-sub {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
}

.app-row-desc,
.app-row-meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.app-row-go {
  color: var(--accent-deep);
  font-size: 0.9rem;
  white-space: nowrap;
}

.back-link {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--muted);
  text-decoration: none;
}

.back-link:hover {
  color: var(--ink);
}

.detail-feature {
  margin: 0 0 1.25rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--foam);
}

.detail-feature img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1024 / 500;
  object-fit: cover;
}

.detail-hero {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.detail-hero > div {
  min-width: 0;
}

.detail-icon {
  width: 112px;
  height: 112px;
  border-radius: 28px;
  object-fit: cover;
  box-shadow: var(--shadow);
  background: var(--foam);
}

.detail-meta {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 1.05rem;
  min-height: 44px;
  border-radius: 999px;
  background: var(--bg-deep);
  color: #f4fbf8;
  text-decoration: none;
  font-weight: 600;
}

.store-btn .store-icon {
  flex-shrink: 0;
  display: block;
}

.store-btn:hover {
  background: var(--bg-mid);
  color: #fff;
}

.detail-block {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.detail-block h2 {
  margin: 0 0 0.7rem;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 400;
}

.detail-block ul,
.prose ul {
  margin: 0.4rem 0 0;
  padding-left: 1.2rem;
}

.mono {
  margin-top: 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
  color: var(--muted);
  overflow-wrap: anywhere;
  word-break: break-all;
}

.legal-dates {
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.prose {
  max-width: 42rem;
  overflow-wrap: anywhere;
}

.prose h2 {
  margin: 1.8rem 0 0.55rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 400;
}

.prose p,
.prose li {
  color: var(--ink);
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 1.75rem 0;
}

.about-page .prose {
  font-size: 1.05rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(12, 42, 38, 0.04);
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.75rem 1.25rem 2.5rem;
  padding-left: max(1.25rem, env(safe-area-inset-left));
  padding-right: max(1.25rem, env(safe-area-inset-right));
  padding-bottom: max(2.5rem, env(safe-area-inset-bottom));
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem 1.2rem;
  margin: 0 0 0.75rem;
}

.footer-links a {
  color: var(--ink);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent-deep);
}

.footer-meta,
.footer-copy {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: rise 0.7s ease forwards;
  animation-delay: var(--delay, 0.05s);
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 720px) {
  .site-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
    padding-top: 0.9rem;
  }

  .brand-logo {
    width: 56px;
    height: 56px;
  }

  .brand-name {
    font-size: 1.35rem;
  }

  .site-nav {
    width: 100%;
    justify-content: flex-start;
    gap: 1rem;
  }

  .site-nav a {
    font-size: 0.92rem;
    padding: 0.35rem 0;
  }

  .site-main {
    padding-top: 1rem;
    padding-bottom: 2rem;
  }

  .home-hero,
  .page-hero,
  .detail-hero {
    padding: 0.75rem 0 1.25rem;
  }

  .lede {
    font-size: 1rem;
  }

  .section-head h2 {
    font-size: 1.5rem;
  }

  .app-row-link {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 0.85rem;
    padding: 0.9rem;
  }

  .app-row-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
  }

  .app-row-topline h2 {
    font-size: 1.15rem;
  }

  .app-row-desc,
  .app-row-meta {
    font-size: 0.86rem;
  }

  .app-row-go {
    display: none;
  }

  .detail-hero {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .detail-icon {
    width: 88px;
    height: 88px;
    border-radius: 22px;
  }

  .detail-block h2,
  .prose h2 {
    font-size: 1.28rem;
  }

  .store-btn {
    width: 100%;
  }

  .footer-links {
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
  }
}

@media (max-width: 380px) {
  .brand-tag {
    font-size: 0.72rem;
  }

  .display {
    font-size: 1.55rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .app-row-link {
    transition: none;
  }

  html {
    scroll-behavior: auto;
  }
}
