/* 掼蛋天天练 · 落地页。全部系统字体，零外部资源。颜色和 App 的 AppColors 一致。 */
:root {
  --bg: #FFFFFF;
  --ink: #1A1A2E;
  --muted: #6B6B7A;
  --line: rgba(26, 26, 46, .10);
  --dot: rgba(26, 26, 46, .13);
  --yellow: #E4A600;
  --blue: #3B82F6;
  --green: #35B779;
  --violet: #7C5CFC;
  --sky: #0EA5E9;
  --gold: #D99A00;
  --yellow-soft: #FDF4DC;
  --blue-soft: #E8EFFF;
  --green-soft: #E3F6EA;
  --blob-y: rgba(228, 166, 0, .20);
  --blob-b: rgba(59, 130, 246, .16);
  --blob-g: rgba(53, 183, 121, .16);
  --pop-bg: #FFFFFF;
  --icon-shadow: 0 22px 50px rgba(26, 26, 46, .22), 0 2px 6px rgba(26, 26, 46, .10);
  --card-shadow: 0 1px 2px rgba(26, 26, 46, .04);
  --card-shadow-hover: 0 16px 36px rgba(26, 26, 46, .12);
  --glow: rgba(124, 92, 252, .22);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B0B14;
    --ink: #F5F1E8;
    --muted: #A3A3B5;
    --line: rgba(255, 255, 255, .12);
    --dot: rgba(255, 255, 255, .11);
    --yellow: #F0C75E;
    --blue: #59C5FF;
    --green: #6EE7B7;
    --sky: #7DF9FF;
    --gold: #F0C75E;
    --yellow-soft: #241D0E;
    --blue-soft: #131C33;
    --green-soft: #0F2A21;
    --blob-y: rgba(240, 199, 94, .16);
    --blob-b: rgba(89, 197, 255, .14);
    --blob-g: rgba(110, 231, 183, .13);
    --pop-bg: #1C1C30;
    --icon-shadow: 0 22px 50px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .08);
    --card-shadow: none;
    --card-shadow-hover: 0 16px 36px rgba(0, 0, 0, .5);
    --glow: rgba(124, 92, 252, .38);
  }
}

* { box-sizing: border-box; }
/* 作者样式里的 display 会盖过浏览器默认的 [hidden]，这里压回去 */
[hidden] { display: none !important; }
/* 首屏背景的柔光故意比内容宽，横向多出来的部分裁掉，手机上才不会左右晃 */
html, body { overflow-x: hidden; overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-align: center;
}
html[lang="en"] body { font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif; }
a { color: inherit; }
img, svg { max-width: 100%; height: auto; }
main { flex: 1; width: 100%; max-width: 800px; margin: 0 auto; padding: 0 20px; }

/* 页头：左边纯 XST 标识，右边语言。 */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: 100%; max-width: 1080px; margin: 0 auto; padding: 18px 24px;
}
.langs { display: flex; gap: 4px; font-size: 13px; }
.langs a, .langs span { padding: 5px 10px; border-radius: 999px; text-decoration: none; color: var(--muted); }
.langs a:hover { color: var(--ink); }
.langs span { color: var(--ink); font-weight: 600; background: var(--line); }

/* 「另一种语言」提示：悬浮在页面顶部正中的一颗胶囊，只在浏览器语言和页面不一致时由 JS 显示。
   文字 + 箭头在胶囊里居中（左边留出和右侧 × 一样宽的空），× 靠右 */
.lang-hint {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 6;
  display: inline-flex; align-items: center;
  padding: 0 6px 0 34px; border-radius: 999px;
  background: var(--pop-bg); border: 1px solid var(--line); box-shadow: var(--card-shadow-hover);
  font-size: 14px; color: var(--muted); white-space: nowrap;
  animation: rise .5s cubic-bezier(.2, .7, .2, 1) both;
}
.lang-hint a { color: var(--ink); text-decoration: none; font-weight: 600; padding: 8px 8px; }
.lang-hint a:hover { color: var(--violet); }
.lang-hint button {
  width: 28px; height: 28px; margin-left: 2px; border-radius: 50%; background: none; border: 0;
  color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; display: grid; place-items: center;
}
.lang-hint button:hover { color: var(--ink); background: var(--line); }

/* 首屏：图标 · 名字 · 一句话 · 下载 */
/* z-index：hero 里的块带 rise 动画（fill both），Chrome 会让它们各成层叠上下文，二维码弹层会被后面的卡片盖住，所以整块提到卡片上面 */
.hero { position: relative; z-index: 1; padding: 44px 0 20px; }
.hero::before {
  content: ""; position: absolute; z-index: -1; inset: -80px -120px 0;
  background:
    radial-gradient(420px 300px at 32% 28%, var(--blob-y), transparent 70%),
    radial-gradient(420px 300px at 70% 30%, var(--blob-b), transparent 70%),
    radial-gradient(360px 260px at 50% 78%, var(--blob-g), transparent 70%),
    radial-gradient(var(--dot) 1px, transparent 1.6px) 0 0 / 22px 22px;
  -webkit-mask-image: radial-gradient(closest-side at 50% 42%, #000 30%, transparent 100%);
  mask-image: radial-gradient(closest-side at 50% 42%, #000 30%, transparent 100%);
  pointer-events: none;
}
.app-icon {
  width: 128px; height: 128px; border-radius: 29px; display: block; margin: 0 auto 22px;
  box-shadow: var(--icon-shadow);
}
.hero h1 { font-size: 40px; line-height: 1.15; margin: 0 0 8px; letter-spacing: -.01em; }
.tagline { font-size: 22px; font-weight: 500; color: var(--muted); margin: 0 0 30px; }
/* 下载区：官方角标 + 同高的二维码按钮，悬停按钮弹出二维码 */
.get { display: flex; align-items: center; justify-content: center; gap: 12px; }
.badge { display: inline-block; line-height: 0; border-radius: 10px; transition: transform .2s ease; }
.badge img { height: 56px; width: auto; display: block; }
.badge:hover { transform: translateY(-2px); }
.qr-btn {
  width: 56px; height: 56px; border-radius: 9px; padding: 0; cursor: pointer;
  background: #000; color: #fff; border: 1px solid #A6A6A6;   /* 和 Apple 黑色角标一样的底和描边 */
  display: grid; place-items: center; transition: transform .2s ease;
}
.qr-btn svg { width: 26px; height: 26px; }
.qr-btn:hover, .pop.open .qr-btn { transform: translateY(-2px); }
.note { margin: 14px 0 0; font-size: 14px; color: var(--muted); }

/* 二维码弹层：默认在触发物上方，.pop-right 在右边（下载区用，不压卡片）。能悬停就悬停出，键盘焦点也出，触屏点开 .open */
.pop { position: relative; display: inline-flex; }
.popover {
  position: absolute; left: 50%; bottom: calc(100% + 12px); transform: translate(-50%, 6px);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 12px 14px 10px; border-radius: 16px; background: var(--pop-bg); border: 1px solid var(--line);
  box-shadow: var(--card-shadow-hover); color: var(--muted); font-size: 13px; white-space: nowrap;
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .18s ease, transform .18s ease, visibility .18s; z-index: 5;
}
.popover::after {
  content: ""; position: absolute; left: 50%; bottom: -7px; width: 12px; height: 12px;
  background: var(--pop-bg); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  transform: translateX(-50%) rotate(45deg);
}
.pop-right .popover { left: calc(100% + 14px); bottom: auto; top: 50%; transform: translate(-6px, -50%); }
.pop-right .popover::after { left: -7px; top: 50%; bottom: auto; transform: translateY(-50%) rotate(45deg); border: 0; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); }
/* 全局 img/svg 有 max-width:100%，在收缩包裹的弹层里会把二维码压没，这里放开 */
.popover svg, .popover img { width: 160px; height: 160px; max-width: none; background: #fff; padding: 8px; border-radius: 12px; display: block; }
/* 微信里长按能识别，只在微信里提一句（JS 开） */
.popover .longpress { display: none; }
.pop:hover .popover, .pop:focus-within .popover, .pop.open .popover { opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, 0); }
.pop-right:hover .popover, .pop-right:focus-within .popover, .pop-right.open .popover { transform: translate(0, -50%); }

/* 三张卡 */
.kicker { font-size: 15px; font-weight: 600; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; margin: 0 0 18px; }
.features { padding: 40px 0 8px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.card {
  padding: 26px 16px 22px; border-radius: 24px; border: 1px solid var(--line);
  box-shadow: var(--card-shadow); transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--card-shadow-hover); }
.card-sort { background: var(--yellow-soft); }
.card-count { background: var(--blue-soft); }
.card-scan { background: var(--green-soft); }
.glyph { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; margin: 0 auto 14px; color: #fff; }
.glyph svg { width: 30px; height: 30px; }
.card-sort .glyph { background: #E4A600; }
.card-count .glyph { background: #3B82F6; }
.card-scan .glyph { background: #35B779; }
.card h3 { font-size: 22px; margin: 0 0 4px; line-height: 1.2; }
.card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; text-wrap: balance; }

/* 三行保证 */
.perks { list-style: none; padding: 22px 0 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: center; color: var(--muted); font-size: 15px; }
.perks li::before { content: "✓"; color: var(--green); font-weight: 700; margin-right: 6px; }

/* 找到我们 */
.contacts { padding: 48px 0 40px; }
.social { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.soc {
  display: flex; flex-direction: column; align-items: center; gap: 0;
  min-width: 116px; padding: 16px 14px 14px; border-radius: 20px; border: 1px solid var(--line);
  background: none; text-decoration: none; font: inherit; font-size: 14px; color: var(--ink); line-height: 1.5;
  transition: transform .2s ease, border-color .2s ease;
}
a.soc, button.soc { cursor: pointer; }
/* 抬起只给有鼠标的设备：触屏上 :hover 会在点过之后一直粘着 */
@media (hover: hover) {
  .pop:hover .soc, .pop:focus-within .soc, .pop.open .soc, button.soc:hover, button.soc:focus-visible { transform: translateY(-3px); border-color: var(--muted); outline: none; }
}
/* 昵称下面那行「微信号：xstapps」是卡片的一部分：整张卡点哪儿都复制，复制成功那 1.5 秒这行套上胶囊底、头上冒「已复制」。手机上换短写 ID: xstapps，三张卡才排得下一行 */
.soc .uid { position: relative; display: inline-block; margin-top: 2px; padding: 0 8px; border-radius: 999px; font-size: 12px; line-height: 1.4; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.soc .uid.done { color: var(--ink); background: var(--line); }
.soc .uid-short { display: none; }
.soc .uid .tip {
  position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translate(-50%, 4px);
  padding: 4px 10px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 600; line-height: 1.4;
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.soc .uid.done .tip { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.soc .ring { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: #fff; margin-bottom: 4px; }
.soc .ring svg { width: 24px; height: 24px; fill: currentColor; }
/* 小红书的标是横排字标，矮而宽，放大一点才认得出 */
.soc-xiaohongshu .ring svg { width: 34px; height: 34px; }
.soc-wechat .ring { background: #07C160; }
.soc-xiaohongshu .ring { background: #FF2442; }
.soc-douyin .ring { background: #111; }
/* 平台名是主角（15px 粗）；昵称和账号号都是弱色配角；平台与昵称的视觉间距加倍（补 4px），昵称到 ID 的额外间距从 4px 减为 2px */
.soc b { font-size: 15px; font-weight: 700; line-height: 1.4; }
.soc small { color: var(--muted); font-size: 14px; font-weight: 400; line-height: 1.4; margin-top: 4px; }

/* 微信 / QQ 里的引导蒙层 */
.guide {
  position: fixed; inset: 0; z-index: 10; background: rgba(0, 0, 0, .78); color: #fff;
  display: flex; flex-direction: column; align-items: flex-end; padding: 14px 22px 0;
}
.guide-arrow { width: 72px; height: 72px; margin-right: 6px; animation: nudge 1.2s ease-in-out infinite alternate; }
/* 提示语在文案里用换行分成两句（哪一步、选什么），pre-line 让它按写的地方断，不在菜单项名字中间断 */
.guide-text { align-self: stretch; text-align: center; margin-top: 18px; font-size: 17px; line-height: 1.6; padding: 0 20px; white-space: pre-line; }
.guide-text b { display: block; font-size: 22px; margin-bottom: 8px; }
@keyframes nudge { from { transform: translate(0, 4px); } to { transform: translate(4px, -2px); } }

/* 下载中转页：普通浏览器停不到一眼就跳走了，微信里是蒙层后面的底 */
.download { padding: 72px 0 64px; }
.download h1 { font-size: 28px; margin: 0 0 6px; }
.download .note { margin: 0 0 24px; }
.download .badge { margin: 0 auto; }
.download .back { color: var(--muted); font-size: 14px; }

/* 帮助、隐私：经典法律条文，纯文字 */
.legal { text-align: left; max-width: 680px; margin: 0 auto; padding: 32px 0 72px; font-size: 16px; line-height: 1.75; }
.legal h1 { font-size: 28px; line-height: 1.3; margin: 0 0 6px; }
.legal h2 { font-size: 18px; margin: 32px 0 8px; }
.legal h3 { font-size: 16px; margin: 20px 0 4px; }
.legal p { margin: 0 0 12px; }
.legal ul { padding-left: 22px; margin: 0 0 12px; }
.legal li { margin: 0 0 6px; }
.legal .meta { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.legal a { text-decoration: underline; text-underline-offset: 3px; }

.notfound { padding: 96px 0 72px; }
.notfound h1 { font-size: 32px; margin: 0 0 20px; }
.button { display: inline-block; background: var(--ink); color: var(--bg); text-decoration: none; font-weight: 600; padding: 12px 24px; border-radius: 999px; }

footer { padding: 28px 20px 40px; color: var(--muted); font-size: 13px; }
footer p { margin: 0 0 6px; }
footer a { color: inherit; text-decoration: none; }
footer a:hover { color: var(--ink); }
footer .dot { margin: 0 8px; }

/* 进场：从下轻轻浮起 */
@media (prefers-reduced-motion: no-preference) {
  .hero > *, .features, .perks, .contacts { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
  .hero h1 { animation-delay: .06s; }
  .tagline { animation-delay: .12s; }
  .get, .note { animation-delay: .2s; }
  .features { animation-delay: .3s; }
  .perks { animation-delay: .4s; }
  .contacts { animation-delay: .5s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (max-width: 720px) {
  .top { padding: 14px 18px; }
  .lang-hint { top: 58px; }
  .hero { padding: 24px 0 12px; }
  .app-icon { width: 112px; height: 112px; border-radius: 25px; margin-bottom: 18px; }
  .hero h1 { font-size: 34px; }
  .tagline { font-size: 19px; margin-bottom: 24px; }
  /* 手机上自己扫自己没意义，只留角标 */
  .get .pop { display: none; }
  .badge img { height: 52px; }
  .cards { grid-template-columns: 1fr; gap: 12px; }
  .card { display: grid; grid-template-columns: 52px 1fr; column-gap: 16px; align-items: center; text-align: left; padding: 18px 18px 18px 16px; }
  .card .glyph { grid-row: 1 / span 2; width: 52px; height: 52px; margin: 0; }
  .card h3 { font-size: 20px; }
  .card p { font-size: 14px; }
  .perks { flex-direction: column; gap: 6px; align-items: center; }
  /* 三张卡仍排一行：卡片等分、内边距收紧，账号号换短写 ID: xstapps */
  .social { gap: 8px; flex-wrap: nowrap; }
  .soc { flex: 1 1 0; min-width: 0; padding: 12px 6px 10px; }
  .soc small { font-size: 13px; }
  .soc .uid-full { display: none; }
  .soc .uid-short { display: inline; }
  /* 手机上不弹二维码（扫不了自己的屏幕），点卡片就是复制账号号；只有微信里打开时微信那张保留（.keep-qr，JS 加），居中弹出、长按识别 */
  .social .pop:not(.keep-qr) .popover { display: none; }
  .social .popover { position: fixed; left: 50%; top: 50%; bottom: auto; transform: translate(-50%, calc(-50% + 6px)); padding: 16px 16px 14px; gap: 10px; }
  .social .popover::after { display: none; }
  .social .pop.open .popover, .social .pop:focus-within .popover { transform: translate(-50%, -50%); }
  .popover .longpress:not([hidden]) { display: block; font-size: 13px; }
  .legal { padding-top: 20px; }
}
