/* /mini/ — the Mini Program's landing page. Same palette as the web app
   and the Mini Program: light grey ground, white cards, red up / green down. */
:root {
  --bg: #f2f3f5;
  --panel: #ffffff;
  --cell: #f5f6f8;
  --line: #e9ebef;
  --text: #171a21;
  --text-2: #3a404c;
  --muted: #8a919c;
  --rise: #e5484d;
  --accent: #1d2740;
  --radius: 18px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

/* Header */
.top { max-width: 1080px; margin: 0 auto; padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 32px; height: 32px; border-radius: 9px; box-shadow: 0 2px 8px rgba(125, 25, 25, .16); }
.brand span { display: flex; flex-direction: column; line-height: 1.2; }
.brand b { font-size: 16px; font-weight: 700; }
.brand small { font-size: 11.5px; color: var(--muted); }
.top-link { font-size: 14px; color: var(--text-2); padding: 7px 14px; border-radius: 999px; background: var(--panel); }
.top-link:hover { color: var(--text); }

main { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* Hero */
.hero { display: grid; grid-template-columns: 1fr; gap: 36px; align-items: center; padding: 24px 0 56px; }
.kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 5px 12px; border-radius: 999px; background: var(--panel); font-size: 13px; color: var(--text-2); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--rise); box-shadow: 0 0 0 3px rgba(229, 72, 77, .15); }
h1 { margin: 0; font-size: clamp(32px, 7.4vw, 52px); line-height: 1.18; letter-spacing: -.02em; font-weight: 800; }
.lead { margin: 18px 0 28px; max-width: 30em; font-size: 16.5px; color: var(--text-2); }

/* Open card: the code plus the searchable name */
.open-card { display: flex; align-items: center; gap: 18px; padding: 16px; max-width: 440px; background: var(--panel); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(23, 26, 33, .06); }
.open-card .code { flex: none; width: 132px; height: 132px; border-radius: 10px; }
.open-card.compact .code { width: 112px; height: 112px; }
.open-text { display: flex; flex-direction: column; min-width: 0; }
.open-title { font-size: 16px; font-weight: 700; }
.open-sub { margin-top: 10px; font-size: 13px; color: var(--muted); }
.name-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.compact .name-row { margin-top: 10px; }
.name { font-size: 15px; font-weight: 600; padding: 6px 10px; border-radius: 10px; background: var(--cell); user-select: all; -webkit-user-select: all; }
.copy { font: inherit; font-size: 14px; font-weight: 600; color: #fff; background: var(--accent); border: 0; border-radius: 10px; padding: 7px 14px; cursor: pointer; }
.copy:active { transform: translateY(1px); }
.feedback { min-height: 20px; margin-top: 6px; font-size: 12.5px; color: var(--muted); }

/* Phone frames around real screenshots */
.phone { margin: 0 auto; width: min(300px, 78vw); padding: 9px; background: var(--panel); border-radius: 40px; box-shadow: 0 1px 0 rgba(23, 26, 33, .04), 0 24px 60px rgba(23, 26, 33, .12); }
.phone img { width: 100%; border-radius: 32px; }

/* Features */
.feature { display: grid; grid-template-columns: 1fr; gap: 28px; align-items: center; padding: 48px 0; border-top: 1px solid var(--line); }
.feature .phone { width: min(230px, 62vw); }
/* Phones read the heading before the screenshot. */
.feature .feature-copy { order: -1; }
.num { display: inline-block; font-size: 13px; font-weight: 700; color: var(--rise); letter-spacing: .08em; }
.feature h2 { margin: 6px 0 12px; font-size: clamp(22px, 5.2vw, 30px); line-height: 1.3; letter-spacing: -.01em; }
.feature p { margin: 0 0 10px; max-width: 28em; color: var(--text-2); }

/* Closing */
.closing { padding: 52px 0 64px; border-top: 1px solid var(--line); text-align: center; }
.closing h2 { margin: 0 0 8px; font-size: clamp(24px, 5.6vw, 32px); }
.closing p { margin: 0 auto 24px; max-width: 30em; color: var(--text-2); }
.closing .open-card { margin: 0 auto; text-align: left; }

.foot { max-width: 1080px; margin: 0 auto; padding: 20px 20px 36px; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); }
.foot a { margin-left: 16px; }
.foot a:first-child { margin-left: 0; }
.foot .icp { margin-left: 16px; }

/* Phones: stack, keep the open card above the fold */
@media (max-width: 559px) {
  .open-card { gap: 14px; padding: 14px; }
  .open-card .code { width: 112px; height: 112px; }
}

/* Wider screens: side by side, features alternate */
@media (min-width: 860px) {
  .top { padding: 24px 28px; }
  main { padding: 0 28px; }
  .hero { grid-template-columns: 1.15fr .85fr; gap: 48px; padding: 40px 0 80px; }
  .hero-phone { width: 300px; }
  .feature { grid-template-columns: .8fr 1.2fr; gap: 64px; padding: 64px 0; }
  .feature.flip { grid-template-columns: 1.2fr .8fr; }
  .feature.flip .phone { order: 2; }
  .feature .phone { width: 260px; }
  .feature .feature-copy { order: 0; }
  .foot { padding: 24px 28px 40px; }
}
