/* 手速反应挑战模块样式（自包含，玫红主题） */
/* =====================================================
   小测一下 · 平台设计令牌（Bento Box Grid · Apple 式浅色）
   全站只引用变量；模块级差异只加 --app-* 覆盖，不改令牌名
   ===================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* 墨纸 */
  --page-bg: #F5F5F7;
  --card-bg: #FFFFFF;
  --ink: #1D1D1F;
  --ink-dim: #6E6E73;
  --ink-faint: #A1A1A6;
  --line: #E5E5EA;
  --line-soft: #E9E9EE;

  /* 品牌强调 */
  --accent: #E11D48;
  --accent-2: #FB7185;

  /* 网格 */
  --grid-gap: 16px;
  --card-radius: 24px;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-lift: 0 12px 28px rgba(0, 0, 0, 0.09);
  --hover-scale: 1.02;

  /* 布局 */
  --maxw: 640px;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro SC", "PingFang SC",
    "Segoe UI", "Microsoft YaHei", sans-serif;

  /* 动效 */
  --dur-fast: 0.15s;
  --dur: 0.25s;
  --dur-slow: 0.45s;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

body {
  min-height: 100vh;
  background: var(--page-bg);
  color: var(--ink);
  font-family: var(--font-sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ===================== 通用组件 ===================== */
.screen { display: none; }
.screen.active { display: block; animation: screenIn var(--dur-slow) var(--ease) both; }

@keyframes screenIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.bento { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--grid-gap); }


#app { max-width: 640px; margin: 0 auto; padding: 28px 18px 40px; }
@media (min-width: 560px) {
  .bento { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.tile {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow);
  padding: 28px 24px;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.accent-text {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.btn-primary {
  display: inline-block;
  border: none;
  cursor: pointer;
  font-size: 16.5px;
  font-weight: 600;
  color: #fff;
  padding: 15px 44px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  box-shadow: 0 6px 18px rgba(225, 29, 72, 0.28);
  text-decoration: none;
  font-family: inherit;
}
.btn-primary:hover { transform: scale(var(--hover-scale)); box-shadow: 0 10px 26px rgba(225, 29, 72, 0.36); }
.btn-primary:active { transform: scale(0.97); }

.btn-ghost {
  border: 1px solid #D2D2D7;
  background: var(--card-bg);
  color: var(--ink);
  font-size: 15px;
  padding: 13px 24px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color var(--dur-fast), transform var(--dur) var(--ease), box-shadow var(--dur);
  font-family: inherit;
}
.btn-ghost:hover { border-color: var(--accent); transform: scale(var(--hover-scale)); box-shadow: var(--shadow); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 60px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(29, 29, 31, 0.92);
  color: #fff;
  font-size: 14px;
  padding: 11px 22px;
  border-radius: 999px;
  box-shadow: var(--shadow-lift);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 99;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.footer {
  text-align: center;
  font-size: 12px;
  color: var(--ink-faint);
  padding: 20px 0 30px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
/* ===================== Bento 网格 ===================== */
.bento { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--grid-gap); }

.tile {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow);
  padding: 28px 24px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.accent-text {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---------- 首页 ---------- */
.tile-hero {
  grid-column: 1 / -1;
  text-align: center;
  padding: 46px 26px 42px;
}

.robot-emoji { font-size: 64px; animation: bob 3s ease-in-out infinite; }

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.title { font-size: 40px; line-height: 1.18; margin: 16px 0 14px; letter-spacing: 0.5px; font-weight: 700; }

.subtitle { color: var(--text-dim); font-size: 16px; line-height: 1.7; margin-bottom: 26px; }

.tile-stat { text-align: center; padding: 24px 16px; }
.tile-stat:hover { transform: scale(var(--hover-scale)); box-shadow: var(--shadow-lift); }

.stat-num { font-size: 34px; font-weight: 700; line-height: 1.2; margin-bottom: 6px; }

.stat-label { font-size: 13.5px; color: var(--text-dim); line-height: 1.55; }

.tile-stat-wide { grid-column: 1 / -1; }

.tile-note {
  grid-column: 1 / -1;
  text-align: center;
  background: linear-gradient(120deg, rgba(225, 29, 72, 0.06), rgba(251, 113, 133, 0.08));
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.7;
  padding: 18px;
}

.home-models {
  text-align: center;
  font-size: 12.5px;
  color: var(--text-faint);
  letter-spacing: 0.5px;
  margin-top: 14px;
}

@media (min-width: 560px) {
  .bento { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  /* 行1-2：hero 占 2×2；10/6 占右上；📸 占右下 2×1；note 通栏收尾 */
  .tile-hero { grid-column: span 2; grid-row: span 2; padding: 40px 30px; display: flex; flex-direction: column; justify-content: center; }
  .tile-stat-wide { grid-column: span 2; flex-direction: row; align-items: center; gap: 14px; }
  .tile-stat-wide .stat-num { margin-bottom: 0; font-size: 40px; }
  .tile-note { grid-column: 1 / -1; }
}

/* ===================== 按钮 ===================== */
.btn-primary {
  display: inline-block;
  border: none;
  cursor: pointer;
  font-size: 16.5px;
  font-weight: 600;
  color: #fff;
  padding: 15px 44px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  transition: transform 0.2s ease, box-shadow 0.25s ease;
  box-shadow: 0 6px 18px rgba(225, 29, 72, 0.28);
  text-decoration: none;
  font-family: inherit;
}
.btn-primary:hover { transform: scale(var(--hover-scale)); box-shadow: 0 10px 26px rgba(225, 29, 72, 0.36); }
.btn-primary:active { transform: scale(0.97); }

.btn-ghost {
  border: 1px solid #D2D2D7;
  background: var(--card-bg);
  color: var(--text);
  font-size: 15px;
  padding: 13px 24px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  font-family: inherit;
}
.btn-ghost:hover { border-color: var(--accent); transform: scale(var(--hover-scale)); box-shadow: var(--shadow); }

/* ===================== 答题页 ===================== */
.quiz-wrap { animation: screenIn 0.4s ease both; }

.progress-area { margin-bottom: 18px; }
.progress-info { font-size: 13px; color: var(--text-dim); margin-bottom: 8px; text-align: right; }
.progress-bar {
  height: 8px;
  border-radius: 4px;
  background: #E5E5EA;
  overflow: hidden;
}
#progress-fill {
  height: 100%;
  width: 0;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.question-tile.q-in { animation: qIn 0.35s ease both; }

@keyframes qIn {
  from { opacity: 0; transform: translateX(22px); }
  to { opacity: 1; transform: none; }
}

#q-text { font-size: 21px; line-height: 1.55; margin-bottom: 22px; font-weight: 700; }

.options { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }

@media (min-width: 560px) {
  .options { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  #q-text { margin-bottom: 26px; }
}

.option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  font-family: inherit;
  background: var(--page-bg);
  border: 1.5px solid transparent;
  border-radius: 18px;
  padding: 16px 18px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.2s ease, box-shadow 0.2s;
  animation: optIn 0.35s ease both;
}

.opt-key {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dim);
  background: #E9E9EE;
  border-radius: 9px;
  margin-top: 1px;
  transition: background 0.15s, color 0.15s;
}
.option span.opt-text { flex: 1; }

@keyframes optIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.option:hover {
  border-color: var(--accent-2);
  background: var(--card-bg);
  transform: scale(var(--hover-scale));
  box-shadow: var(--shadow-lift);
}
.option:hover .opt-key { background: var(--accent); color: #fff; }
.option:active { transform: scale(0.985); }
.option.picked {
  border-color: var(--accent);
  background: linear-gradient(120deg, rgba(225, 29, 72, 0.07), rgba(251, 113, 133, 0.09));
  box-shadow: 0 0 0 1px var(--accent);
}
.option.picked .opt-key { background: var(--accent); color: #fff; }

.quiz-footer { margin-top: 16px; min-height: 44px; }

/* ===================== 结果页 ===================== */
.result-wrap { animation: screenIn 0.5s ease both; }

.result-eyebrow {
  text-align: center;
  color: var(--text-dim);
  font-size: 14px;
  letter-spacing: 6px;
  margin-bottom: 16px;
}

.bento-result .tile-persona { grid-column: 1 / -1; text-align: center; padding: 36px 26px 34px; }

/* 契合度圆环 */
.match-ring { position: relative; width: 80px; height: 80px; margin: 0 auto 4px; }
.match-ring svg { transform: rotate(-90deg); }
.match-ring circle { fill: none; stroke-width: 7; stroke-linecap: round; }
.ring-track { stroke: #E9E9EE; }
.ring-fill {
  stroke: var(--p1, var(--accent));
  stroke-dasharray: 213.6;
  stroke-dashoffset: 213.6;
  transition: stroke-dashoffset 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}
.ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
}
.ring-text span { font-size: 19px; font-weight: 700; color: var(--text); }
.ring-text small { font-size: 10px; color: var(--text-faint); }

.result-emoji { font-size: 56px; margin-top: 8px; margin-bottom: 6px; }
.result-name {
  font-size: 38px;
  letter-spacing: 1px;
  margin-bottom: 8px;
  font-weight: 800;
  background: linear-gradient(100deg, var(--p1, var(--accent)), var(--p2, var(--accent-2)));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.result-arch {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--p1, var(--accent));
  background: color-mix(in srgb, var(--p1, var(--accent)) 10%, transparent);
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.result-tagline { color: var(--text-dim); font-size: 15.5px; margin-bottom: 18px; }
.result-desc {
  text-align: left;
  color: #3A3A3C;
  font-size: 15px;
  line-height: 1.9;
  margin-bottom: 20px;
}
.result-traits { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }

.trait {
  font-size: 13px;
  font-weight: 500;
  color: var(--p1, var(--accent));
  background: color-mix(in srgb, var(--p1, var(--accent)) 9%, transparent);
  padding: 7px 15px;
  border-radius: 999px;
}

.tile-quote {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 14.5px;
  color: var(--text-dim);
  background: linear-gradient(120deg,
    color-mix(in srgb, var(--p1, var(--accent)) 7%, transparent),
    color-mix(in srgb, var(--p2, var(--accent-2)) 9%, transparent));
  padding: 20px 22px;
}

.tile-bars { grid-column: 1 / -1; }
.tile-bars h3 { font-size: 16px; color: var(--text-dim); font-weight: 600; margin-bottom: 18px; }

.bar-row { display: grid; grid-template-columns: 112px minmax(0, 1fr) 44px; align-items: center; gap: 10px; margin-bottom: 12px; }
.bar-row:last-child { margin-bottom: 0; }
.bar-label { font-size: 13px; color: #3A3A3C; white-space: nowrap; }
.bar-emoji { margin-right: 4px; }
.bar-track { height: 12px; border-radius: 6px; background: #E9E9EE; overflow: hidden; }
.bar-fill {
  height: 100%;
  width: 0;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--p1, var(--accent)), var(--p2, var(--accent-2)));
  transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.bar-row.top .bar-label { color: var(--text); font-weight: 700; }
.bar-pct { font-size: 12px; color: var(--text-dim); text-align: right; }

.share-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 24px 0; }

.share-card-area { text-align: center; }
.share-card-area canvas {
  border-radius: 18px;
  box-shadow: var(--shadow-lift);
  margin-bottom: 16px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* ===================== 其他 ===================== */
.toast {
  position: fixed;
  left: 50%;
  bottom: 60px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(29, 29, 31, 0.92);
  color: #fff;
  font-size: 14px;
  padding: 11px 22px;
  border-radius: 999px;
  box-shadow: var(--shadow-lift);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 99;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.footer {
  text-align: center;
  font-size: 12px;
  color: var(--text-faint);
  padding: 20px 0 30px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

@media (max-width: 420px) {
  .title { font-size: 34px; }
  .tile { padding: 24px 20px; }
  #q-text { font-size: 19px; }
  .bar-row { grid-template-columns: 100px minmax(0, 1fr) 40px; }
  .result-name { font-size: 29px; }
}


/* ===================== v3 新增组件 ===================== */
.invite-banner, .resume-banner { margin-top: 16px; text-align: center; }
.invite-title { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.invite-desc { color: var(--ink-dim); font-size: 14px; margin-bottom: 14px; }
.resume-banner p { font-size: 14.5px; margin-bottom: 12px; }
.resume-actions { display: flex; gap: 10px; justify-content: center; }
.btn-small { padding: 11px 26px; font-size: 14.5px; }

.kbd-hint { font-size: 12px; color: var(--ink-faint); }
.quiz-footer { display: flex; justify-content: space-between; align-items: center; }

.tile-quality {
  grid-column: 1 / -1;
  font-size: 13.5px;
  color: #92400E;
  background: #FEF3C7;
  border-radius: 16px;
  padding: 14px 18px;
}

.pk-box { margin-top: 16px; }
.pk-box h3 { font-size: 16px; margin-bottom: 6px; }
.pk-box > p { color: var(--ink-dim); font-size: 13.5px; margin-bottom: 12px; }
.pk-actions { display: flex; justify-content: center; }
#pk-out { margin-top: 14px; text-align: center; }
.pk-link-row { display: flex; gap: 8px; margin-top: 12px; }
#pk-link {
  flex: 1; min-width: 0;
  border: 1.5px solid var(--line, #E5E5EA);
  border-radius: 12px; padding: 10px 12px;
  font-size: 12.5px; color: var(--ink-dim, #6E6E73);
  background: var(--page-bg, #F5F5F7);
}
.qr-figure svg { width: 132px; height: 132px; }

.result-arch { display: inline-block; }

@media (max-width: 420px) {
  .quiz-footer { flex-direction: column; gap: 8px; }
}

/* ===================== duo 页组件 ===================== */
.duo-faces { display: flex; justify-content: center; align-items: center; gap: 18px; margin-bottom: 12px; }
.duo-vs { font-size: 20px; font-weight: 800; color: var(--ink-faint, #A1A1A6); }
.duo-score { margin: 14px 0 10px; display: flex; align-items: baseline; justify-content: center; gap: 10px; }
.duo-score-num {
  font-size: 64px; font-weight: 800; line-height: 1;
  background: linear-gradient(100deg, var(--p1, var(--accent)), var(--p2, var(--accent-2)));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.duo-stars { font-size: 22px; color: #F59E0B; letter-spacing: 2px; }
.duo-meters { margin-top: 18px; text-align: left; }
.duo-meter { display: grid; grid-template-columns: 150px minmax(0, 1fr) 44px; align-items: center; gap: 10px; margin-bottom: 12px; }
.duo-meter .bar-label { font-size: 13px; }
.footer-home { color: inherit; text-decoration: none; }
.footer-home:hover { color: var(--accent, #0071E3); }

/* ---------- 浓度条 ---------- */
.concentration {
  position: relative;
  height: 16px;
  border-radius: 8px;
  background: #E9E9EE;
  overflow: hidden;
  margin: 14px auto 10px;
  max-width: 360px;
}
.con-fill {
  height: 100%; width: 0;
  border-radius: 8px;
  background: linear-gradient(90deg, #2DD4BF, #0D9488);
  transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
}
#r-pct {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700; color: #134E4A;
}
.result-card { text-align: center; }

/* ---------- 游戏面板 ---------- */
.game-tile { min-height: 280px; display: flex; align-items: center; justify-content: center; text-align: center; cursor: pointer; user-select: none; -webkit-user-select: none; transition: background 0.12s ease, box-shadow 0.2s ease; }
.game-tile #pad-text { font-size: 22px; font-weight: 700; line-height: 1.7; }
.game-tile.wait { background: #FEE2E2; cursor: default; }
.game-tile.wait #pad-text { color: #B91C1C; }
.game-tile.go { background: linear-gradient(135deg, #059669, #34D399); box-shadow: 0 0 40px rgba(16, 185, 129, 0.45); }
.game-tile.go #pad-text { color: #fff; font-size: 30px; }
.game-tile.foul { background: #FEF3C7; }
.game-tile.foul #pad-text { color: #B45309; }
.rounds { display: flex; gap: 10px; justify-content: center; font-size: 18px; font-weight: 700; color: var(--ink-dim, #6E6E73); margin-bottom: 14px; font-variant-numeric: tabular-nums; }
.rounds .done { color: var(--accent); }
.avg-line { text-align: center; font-size: 16px; color: var(--ink-dim, #6E6E73); }
.avg-line b { font-size: 30px; color: var(--accent); font-variant-numeric: tabular-nums; }
.stats-tile { margin-bottom: 18px; }
.stats-tile h3 { font-size: 15px; color: var(--ink-dim, #6E6E73); font-weight: 600; margin-bottom: 14px; }
/* ---------- 挑战对比 ---------- */
.vs-line { text-align: center; font-size: 15.5px; padding: 12px 16px; border-radius: 14px; margin-bottom: 16px; }
.vs-line.win { background: #D1FAE5; color: #065F46; }
.vs-line.lose { background: #FEE2E2; color: #991B1B; }
.invite-banner { text-align: center; }
.invite-title { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.invite-desc { color: var(--ink-dim, #6E6E73); font-size: 14px; }

/* ===================== 桌面增强（≥1024px） ===================== */
@media (min-width: 1024px) {
  #app { max-width: 760px; }
  .game-tile { min-height: 380px; border-radius: 28px; }
  .game-tile.go #pad-text { font-size: 38px; }
  .game-tile #pad-text { font-size: 26px; }
  .rounds { font-size: 22px; gap: 16px; }
  .avg-line b { font-size: 38px; }
  .hero h1 { font-size: 40px; }
}

/* ---------- 首页辅助类（补齐） ---------- */
@media (min-width: 560px) {
  .tile-note { grid-column: span 2; }
}
.hero-emoji { font-size: 56px; line-height: 1.2; }
.tile-hero .sub { color: var(--ink-dim, #6E6E73); font-size: 15.5px; line-height: 1.7; margin-bottom: 24px; }
.tile-hero h1 { margin: 14px 0 10px; font-weight: 800; }

/* ---------- 双语切换（全站共用） ---------- */
html[lang="en"] .lang-zh { display: none !important; }
html:not([lang="en"]) .lang-en { display: none !important; }
.lang-toggle {
  border: 1px solid var(--line, #D2D2D7); background: transparent; cursor: pointer;
  font: inherit; font-size: 12px; padding: 3px 9px; border-radius: 999px;
  color: var(--ink-dim, #6E6E73);
}
.lang-toggle[aria-pressed="true"] { background: var(--accent, #0071E3); color: #fff; border-color: var(--accent, #0071E3); }
.lang-toggle-group { display: inline-flex; gap: 4px; align-items: center; }

/* =====================================================
   英文排版（html[lang="en"] 时生效）
   中文参数（行高 1.9-2.0、为汉字准备的 letter-spacing、宽栏）
   不适合英文：行高收到 1.6-1.75、字距归零、标题均衡断行、
   允许长词折行。切换回中文时这些规则完全不生效。
   ===================================================== */
html[lang="en"] {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei",
               "Noto Sans SC", sans-serif;
}
html[lang="en"] body {
  font-family: var(--font-sans);
  line-height: 1.65;
  overflow-wrap: break-word;
}
/* 标题：去掉汉字字距、收紧行高、均衡断行（避免孤词） */
html[lang="en"] h1, html[lang="en"] h2, html[lang="en"] h3 {
  letter-spacing: normal;
  line-height: 1.28;
  text-wrap: balance;
}
/* 正文段落与列表：英文行高 1.7（中文是 1.9-2.0） */
html[lang="en"] p, html[lang="en"] li, html[lang="en"] dd, html[lang="en"] dt {
  line-height: 1.7;
}
/* 英文应用名更长，禁止折行会撑破卡片 */
html[lang="en"] .app-name { white-space: normal; text-wrap: balance; }

/* ---------- 英文排版 ---------- */
html[lang="en"] .title { letter-spacing: normal; }
/* .result-eyebrow 的 6px 字距是为汉字准备的，英文会被拉散 */
html[lang="en"] .result-eyebrow { letter-spacing: 0.08em; line-height: 1.5; }
html[lang="en"] .result-name { letter-spacing: normal; line-height: 1.15; }
html[lang="en"] .result-tagline { line-height: 1.55; }
html[lang="en"] .result-desc { line-height: 1.7; }
/* ---------- 英文排版补充 ---------- */
html[lang="en"] .topnav .brand { letter-spacing: normal; }

/* =====================================================
   人机功效 · 无声的关心（与平台 tokens.css 同源副本）
   ===================================================== */
body { -webkit-tap-highlight-color: transparent; }
a, button, input, select, textarea, label, [role="button"], summary {
  touch-action: manipulation;
}
@media (hover: none) {
  *:hover { transform: none !important; }
}
::selection { background: color-mix(in srgb, var(--accent, #0071E3) 22%, transparent); }
input, textarea { caret-color: var(--accent, #0071E3); }
body { text-autospace: normal; line-break: strict; overflow-wrap: break-word; }
@media (pointer: coarse) {
  input, textarea { font-size: max(16px, 1em); }
}
html { scrollbar-gutter: stable; }

/* =====================================================
   交互打磨 · 入场与反馈（各 app 副本共用）
   全部纯 CSS、动画短促且 reduced-motion 由全局规则兜底。
   ===================================================== */
/* 页面首帧：极短抬升淡入，遮住字体回退与排版微调瞬间 */
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
body { animation: pageIn 0.28s var(--ease, ease-out) both; }

/* 页面内锚点滚动丝滑 */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* 选项选中：推进前的轻微弹跳——「已收到」的触觉化确认 */
@keyframes pickPulse { 0% { transform: scale(1); } 45% { transform: scale(1.03); } 100% { transform: scale(1); } }
.option.picked { animation: pickPulse 0.26s var(--ease, ease-out); }

/* 结果区逐项入场：emoji 弹入 → 名称 → 标签行 → 描述/引用 → 特质 chips 阶梯 */
@keyframes popIn { 0% { opacity: 0; transform: scale(0.5); } 55% { opacity: 1; transform: scale(1.08); } 100% { opacity: 1; transform: scale(1); } }
@keyframes riseIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.result-emoji, #r-emoji { animation: popIn 0.5s var(--ease, ease-out) 0.08s both; }
.result-name, #r-name { animation: riseIn 0.4s var(--ease, ease-out) 0.2s both; }
.result-tagline, #r-tagline { animation: riseIn 0.4s var(--ease, ease-out) 0.3s both; }
.result-desc, .result-quote, .classical, #r-desc, #r-quote { animation: riseIn 0.45s var(--ease, ease-out) 0.4s both; }
.trait { animation: riseIn 0.35s var(--ease, ease-out) 0.45s both; }
.trait:nth-child(2) { animation-delay: 0.52s; }
.trait:nth-child(3) { animation-delay: 0.59s; }
.trait:nth-child(4) { animation-delay: 0.66s; }
.trait:nth-child(n+5) { animation-delay: 0.7s; }
.tile-read, #r-read { animation: riseIn 0.4s var(--ease, ease-out) 0.72s both; }

/* 卡片/链接按压反馈：tap-highlight 已关，:active 是触屏唯一的「按到了」信号 */
.app-card:active, .acard:active, .btn-ghost:active { transform: scale(0.98); }

/* 跨页导航默认交叉淡入淡出（渐进增强，不支持的浏览器自动忽略） */
@view-transition { navigation: auto; }

/* 分享卡渲染后浮出（display:none→block 时动画自动播放） */
#share-card-area { animation: riseIn 0.4s var(--ease, ease-out) both; }
