/* style.css — 儿童天赋测评 · 小红书宝妈风视觉系统
 * 设计令牌：暖奶油底 + 珊瑚红主色 + 20px 大圆角 + 柔和暖阴影
 * 分龄主题色：G1 琥珀 / G2 珊瑚 / G3 薄荷 / G4 薰衣草紫
 */
:root {
  --bg: #FDF5EF;            /* 暖奶油底 */
  --card: #FFFFFF;
  --ink: #3A2E2A;           /* 暖棕主文字 */
  --sub: #A08F85;           /* 暖灰棕次级文字 */
  --line: #F3E7DE;          /* 奶油分隔线 */
  --primary: #FF5C52;       /* 小红书珊瑚红 */
  --primary-deep: #E2554B;
  --primary-soft: #FFE9E3;
  --accent: #FFB65C;        /* 杏黄点缀 */
  --mint: #3D9A75; --mint-soft: #E5F6EF;
  --amber: #D98A2B; --amber-soft: #FFF4E3;
  --violet: #7C6BE0; --violet-soft: #EEEAFE;
  /* 兼容旧引用 */
  --blue: #FF5C52; --green: #3D9A75; --red: #E2554B;
  --shadow: 0 4px 18px rgba(58, 46, 42, .07);
  --shadow-lift: 0 10px 28px rgba(255, 92, 82, .18);
  /* 移动端一屏适配令牌 */
  --hd: 48px;              /* 顶栏高度 */
  --pad: 14px;             /* 页面安全内边距 */
  --vp: 100vh;             /* 视口高度，由 JS 的 --vh 覆盖为真实值 */
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; }
body {
  font-family: "PingFang SC", "MiSans", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--ink); min-height: 100%;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;                     /* 禁止横向滚动 */
  -webkit-text-size-adjust: 100%;         /* 移动端不自动放大字号 */
  overscroll-behavior-y: none;            /* 去掉下拉回弹露白 */
}
a { color: var(--primary-deep); text-decoration: none; }
img, svg { max-width: 100%; }
.container { max-width: 860px; margin: 0 auto; padding: 18px 16px 48px; }

/* ---------- 顶栏（胶囊毛玻璃感） ---------- */
header.site {
  background: rgba(253, 245, 239, .94); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10;
}
header.site .inner {
  max-width: 860px; margin: 0 auto; padding: 0 var(--pad);
  height: var(--hd); display: flex; align-items: center; gap: 10px;
}
header.site .logo {
  font-weight: 800; font-size: 16px; color: var(--ink); letter-spacing: .3px;
  flex: none; white-space: nowrap; display: flex; align-items: center; gap: 4px;
}
header.site .logo .dot { color: var(--primary); }
/* 导航横向滚动条：窄屏放不下时可左右滑动，不再折行撑高顶栏 */
header.site nav {
  flex: 1; min-width: 0; display: flex; gap: 5px; justify-content: flex-end;
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-left: 4px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12px); /* 左侧淡出提示可滑动 */
          mask-image: linear-gradient(90deg, transparent 0, #000 12px);
}
header.site nav::-webkit-scrollbar { display: none; }
header.site nav a {
  flex: none; font-size: 13px; color: var(--sub); white-space: nowrap;
  padding: 6px 11px; border-radius: 999px; transition: .15s;
}
header.site nav a.active, header.site nav a:hover { color: #fff; background: var(--primary); }

/* ---------- 文本 ---------- */
h1.page { font-size: 24px; margin: 24px 0 6px; font-weight: 800; }
p.lead { color: var(--sub); margin-bottom: 20px; line-height: 1.8; }
.muted { color: var(--sub); font-size: 13px; }
.center { text-align: center; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.card h3 { font-size: 16px; margin-bottom: 12px; font-weight: 700; }

/* ---------- 按钮 ---------- */
.btn { display: inline-block; border: none; cursor: pointer; border-radius: 999px; font-weight: 700; text-align: center; font-family: inherit; -webkit-tap-highlight-color: transparent; }
.btn-primary {
  background: linear-gradient(135deg, #FF7A5C, var(--primary)); color: #fff;
  padding: 13px 34px; font-size: 15.5px; box-shadow: var(--shadow-lift); transition: .15s;
}
.btn-big {
  background: linear-gradient(135deg, #FF7A5C, var(--primary)); color: #fff;
  padding: 15px 46px; font-size: 18px; box-shadow: 0 10px 24px rgba(255, 92, 82, .30); transition: .15s;
}
.btn-ghost { background: #fff; color: var(--primary-deep); border: 1.5px solid var(--primary); padding: 10px 20px; font-size: 13.5px; }
.btn-sm { padding: 7px 14px; font-size: 12.5px; }
.btn:active { transform: scale(.97); }

/* ---------- 首页 hero（纯色底 + 光点晕染，去彩虹渐变） ---------- */
.hero {
  position: relative; overflow: hidden; text-align: center;
  background: #FFF1E9;
  border: 1px solid #FFE0D2; border-radius: 26px;
  padding: 30px 20px 24px; margin-bottom: 18px;
}
/* 三团柔光：纯 radial 光斑，不做彩虹渐变 */
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none;
}
.hero::before { width: 200px; height: 200px; background: radial-gradient(circle, rgba(255,182,92,.45), transparent 68%); top: -74px; right: -56px; }
.hero::after  { width: 240px; height: 240px; background: radial-gradient(circle, rgba(255,92,82,.20), transparent 68%); bottom: -112px; left: -68px; }
/* 中央标志：一枚实心珊瑚圆 + 白色光点（替代原先的彩虹 emoji） */
.hero .mark {
  position: relative; z-index: 1; display: block;
  width: 62px; height: 62px; margin: 0 auto 12px; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #FF9A82, var(--primary) 72%);
  box-shadow: 0 8px 20px rgba(255, 92, 82, .30);
}
.hero .mark::before, .hero .mark::after {
  content: ""; position: absolute; border-radius: 50%; background: #fff;
}
.hero .mark::before { width: 26px; height: 26px; top: 9px; left: 11px; opacity: .92; }
.hero .mark::after  { width: 11px; height: 11px; bottom: 12px; right: 13px; opacity: .62; }
.hero h1 { position: relative; z-index: 1; font-size: 27px; font-weight: 800; letter-spacing: .5px; line-height: 1.25; }
.hero h1 em { font-style: normal; color: var(--primary); }
.hero .lead { position: relative; z-index: 1; font-size: 14.5px; margin: 10px 0 20px; line-height: 1.75; }
.hero .btn-big { position: relative; z-index: 1; }
.hero .foot { position: relative; z-index: 1; margin-top: 12px; font-size: 11.5px; line-height: 1.7; color: #B29C90; }

/* ---------- 分龄卡片（四色主题） ---------- */
/* ---------- 首页「软件介绍」入口卡（醒目但不占太多高度） ---------- */
.intro-entry {
  display: flex; flex-direction: column; gap: 3px;
  margin: 10px 0 9px; padding: 12px 14px;
  border-radius: var(--radius); text-decoration: none;
  background: linear-gradient(135deg, #FFF7F2, #FFEFE7);
  border: 1.5px solid #FFD9CE; box-shadow: 0 6px 18px rgba(255, 138, 61, .10);
  transition: transform .16s ease, box-shadow .16s ease;
}
.intro-entry:active { transform: scale(.985); }
.intro-entry b { font-size: 14.5px; color: var(--ink); }
.intro-entry span { font-size: 12.5px; color: var(--sub); line-height: 1.6; }
.intro-entry em { font-style: normal; color: var(--primary); font-weight: 700; }

.grid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.agecard {
  background: var(--card); border: 2px solid var(--line); border-radius: 16px;
  padding: 14px 10px 12px; text-align: center; cursor: pointer; transition: .18s; position: relative;
  -webkit-tap-highlight-color: transparent;
}
.agecard:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.agecard b { font-size: 17px; display: block; margin-bottom: 2px; }
.agecard span { font-size: 11.5px; color: var(--sub); line-height: 1.5; }
.agecard .stage { display: inline-block; font-size: 10.5px; padding: 2px 9px; border-radius: 999px; margin-bottom: 6px; font-weight: 600; }
/* G1 琥珀 */
.agecard.tG1 { background: var(--amber-soft); border-color: #F5DFC0; }
.agecard.tG1 b, .agecard.tG1 .stage { color: var(--amber); } .agecard.tG1 .stage { background: #fff; }
.agecard.tG1:hover, .agecard.tG1.sel { border-color: var(--amber); box-shadow: 0 8px 22px rgba(217, 138, 43, .18); }
/* G2 珊瑚 */
.agecard.tG2 { background: var(--primary-soft); border-color: #FFD9CE; }
.agecard.tG2 b, .agecard.tG2 .stage { color: var(--primary); } .agecard.tG2 .stage { background: #fff; }
.agecard.tG2:hover, .agecard.tG2.sel { border-color: var(--primary); box-shadow: 0 8px 22px rgba(255, 92, 82, .2); }
/* G3 薄荷 */
.agecard.tG3 { background: var(--mint-soft); border-color: #C9EADF; }
.agecard.tG3 b, .agecard.tG3 .stage { color: var(--mint); } .agecard.tG3 .stage { background: #fff; }
.agecard.tG3:hover, .agecard.tG3.sel { border-color: var(--mint); box-shadow: 0 8px 22px rgba(61, 154, 117, .18); }
/* G4 薰衣草 */
.agecard.tG4 { background: var(--violet-soft); border-color: #DCD6F7; }
.agecard.tG4 b, .agecard.tG4 .stage { color: var(--violet); } .agecard.tG4 .stage { background: #fff; }
.agecard.tG4:hover, .agecard.tG4.sel { border-color: var(--violet); box-shadow: 0 8px 22px rgba(124, 107, 224, .18); }
.agecard .hot { position: absolute; top: -9px; right: 12px; background: var(--primary); color: #fff; font-size: 11px; padding: 3px 10px; border-radius: 999px; font-weight: 700; box-shadow: 0 4px 10px rgba(255,92,82,.3); }

/* ---------- 标签 ---------- */
.tag { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 12px; margin-right: 6px; font-weight: 600; }
.tag-blue { background: var(--primary-soft); color: var(--primary-deep); }
.tag-green { background: var(--mint-soft); color: var(--mint); }
.tag-amber { background: var(--amber-soft); color: var(--amber); }
.tag-red { background: #FFE3E0; color: #C0392F; }
.tag-violet { background: var(--violet-soft); color: var(--violet); }

/* ---------- 表格 ---------- */
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th, table.tbl td { border-bottom: 1px solid var(--line); padding: 9px 6px; text-align: left; }
table.tbl th { color: var(--sub); font-weight: normal; font-size: 13px; }
table.tbl tr:last-child td { border-bottom: none; }

.star { color: var(--accent); letter-spacing: 2px; }
.radio-row label { margin-right: 16px; cursor: pointer; font-size: 14px; }
.radio-row input { accent-color: var(--primary); }

/* ---------- 提示条 ---------- */
.notice {
  background: #FFF7EC; border: 1px solid #F8E3C4; border-radius: 14px;
  padding: 12px 16px; font-size: 13px; color: #9A6A2F; margin: 12px 0; line-height: 1.8;
}

/* ---------- 游戏容器 ---------- */
.game-wrap { flex: 1 1 auto; min-height: 0; display: flex; }
iframe.gameframe {
  width: 100%; min-height: 520px; flex: 1 1 auto; border: none; border-radius: 20px;
  background: #fff; box-shadow: var(--shadow);
}
.progressbar { height: 10px; background: #F5E8DC; border-radius: 999px; overflow: hidden; margin: 10px 0 16px; }
.progressbar i { display: block; height: 100%; background: linear-gradient(90deg, #FFB65C, var(--primary)); border-radius: 999px; transition: width .35s; }
/* 分龄主题进度条 */
.progressbar.tG1 i { background: var(--amber); }
.progressbar.tG2 i { background: linear-gradient(90deg, #FFB65C, var(--primary)); }
.progressbar.tG3 i { background: var(--mint); }
.progressbar.tG4 i { background: var(--violet); }

/* ---------- 沉浸式测评页：游戏占满整屏，语音陪伴停底部一条，页面不滚动 ---------- */
.immersive {
  position: fixed; inset: 0; z-index: 5;
  display: flex; flex-direction: column;
  height: 100vh; height: 100dvh;          /* 支持 dvh 的浏览器用真实视口高 */
  background: var(--bg); overflow: hidden;
  padding: 0; margin: 0;
}
/* 顶部极简条：游戏序号 + 进度 + 更多 */
.imm-top {
  flex: none; display: flex; align-items: center; gap: 10px;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) 12px 8px;
  background: var(--bg);
}
.imm-idx {
  font-size: 13.5px; font-weight: 700; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 52%;
}
.imm-bar { flex: 1 1 auto; height: 6px; background: #F5E8DC; border-radius: 999px; overflow: hidden; }
.imm-bar i { display: block; height: 100%; width: 0; border-radius: 999px; transition: width .35s;
  background: linear-gradient(90deg, #FFB65C, var(--primary)); }
.imm-bar.tG1 i { background: var(--amber); }
.imm-bar.tG2 i { background: linear-gradient(90deg, #FFB65C, var(--primary)); }
.imm-bar.tG3 i { background: var(--mint); }
.imm-bar.tG4 i { background: var(--violet); }
.imm-more {
  flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; color: var(--sub); font-size: 17px; line-height: 1; cursor: pointer;
}
.imm-more:active { transform: scale(.94); }

/* 中部：游戏整屏（iframe 铺满，圆角留白都去掉，最大化沉浸） */
.immersive .game-wrap { flex: 1 1 auto; min-height: 0; display: flex; }
.immersive iframe.gameframe {
  width: 100%; height: 100%; min-height: 0; flex: 1 1 auto;
  border: none; border-radius: 0; box-shadow: none; background: #fff;
}

/* 底部：语音陪伴条 */
.voice-dock {
  flex: none; display: flex; align-items: center; gap: 10px;
  padding: 8px 12px calc(env(safe-area-inset-bottom, 0px) + 8px);
  background: linear-gradient(135deg, #FFF7F2, #FFEFE7);
  border-top: 1.5px solid #FFD9CE;
}
.voice-dock .avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none; object-fit: cover;
  border: 2px solid #fff; box-shadow: 0 3px 10px rgba(255, 92, 82, .18);
}
.voice-dock .say {
  flex: 1 1 auto; min-width: 0; font-size: 12.5px; color: #8A6A5A; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.voice-dock .play {
  flex: none; width: 38px; height: 38px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, #FF7A5C, var(--primary)); color: #fff; font-size: 16px;
  box-shadow: 0 4px 12px rgba(255, 92, 82, .28); transition: .15s;
  display: flex; align-items: center; justify-content: center;
}
.voice-dock .play:active { transform: scale(.94); }
.voice-dock .play.playing { animation: pulse 1.1s ease-in-out infinite; }

/* 更多菜单 */
.imm-menu {
  position: fixed; right: 10px; top: calc(env(safe-area-inset-top, 0px) + 50px); z-index: 20;
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px;
  box-shadow: var(--shadow); max-width: min(78vw, 320px);
}
.imm-menu[hidden] { display: none; }

/* 语音卡头像用图片（results 页沿用 .voice-card） */
.voice-card .avatar img, img.avatar { object-fit: cover; }
.voice-card .avatar.has-img { background: #fff; overflow: hidden; padding: 0; }
.voice-card .avatar.has-img img { width: 100%; height: 100%; display: block; }

/* ---------- 小雨老师语音卡 ---------- */
.voice-card {
  background: linear-gradient(135deg, #FFF7F2, #FFEFE7); border: 1.5px solid #FFD9CE;
  border-radius: 20px; padding: 16px 18px; margin: 14px 0; display: flex; align-items: center; gap: 14px;
}
.voice-card .avatar {
  width: 52px; height: 52px; border-radius: 50%; flex: none;
  background: var(--primary-soft); display: flex; align-items: center; justify-content: center; font-size: 28px;
  border: 2px solid #fff; box-shadow: 0 4px 12px rgba(255, 92, 82, .18);
}
.voice-card .info { flex: 1; min-width: 0; }
.voice-card .name { font-size: 14.5px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.voice-card .badge { background: var(--primary-soft); color: var(--primary); font-size: 10.5px; padding: 2px 9px; border-radius: 999px; font-weight: 600; }
.voice-card .say { font-size: 13px; color: #8A6A5A; margin-top: 4px; line-height: 1.7; }
.voice-card .play {
  flex: none; width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, #FF7A5C, var(--primary)); color: #fff; font-size: 18px;
  box-shadow: 0 6px 16px rgba(255, 92, 82, .3); transition: .15s; display: flex; align-items: center; justify-content: center;
}
.voice-card .play:active { transform: scale(.94); }
.voice-card .play.playing { animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,92,82,.35); } 50% { box-shadow: 0 0 0 12px rgba(255,92,82,0); } }

/* ---------- 信任背书行 ---------- */
.trust-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 4px 0; }
.trust-item { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 7px 13px; font-size: 11.5px; color: var(--sub); }
/* 首页专用：固定 2×2 排布，高度可预测（不再因文字长度意外折成两行半） */
.trust-row.two-col { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.trust-row.two-col .trust-item {
  padding: 7px 6px; font-size: 11px; text-align: center; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}

/* ---------- 报告页 ---------- */
.dim-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.dimcard { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.dimcard .head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.dimcard .score { font-weight: 800; font-size: 18px; color: var(--primary); }
.rec-item { border-left: 4px solid var(--primary); padding: 10px 14px; margin-bottom: 10px; background: linear-gradient(135deg, #FFF9F5, #FFF3EC); border-radius: 0 14px 14px 0; }
.rec-item b { font-size: 15px; }

footer.site { text-align: center; color: #C4B6AC; font-size: 12px; padding: 30px 0 20px; }
footer.site .claims { max-width: 640px; margin: 0 auto 8px; font-size: 11.5px; line-height: 1.9; color: #C9BBB0; }
/* 折叠式免责声明：手机上默认收起，需要时点开（保证主内容一屏可达，同时声明仍然可查） */
footer.site details.claims-box { max-width: 640px; margin: 0 auto 8px; text-align: left; }
footer.site details.claims-box > summary {
  cursor: pointer; list-style: none; text-align: center; color: #C9BBB0; font-size: 11px;
  padding: 3px 0; -webkit-tap-highlight-color: transparent;
}
footer.site details.claims-box > summary::-webkit-details-marker { display: none; }
footer.site details.claims-box > summary::after { content: " ▾"; }
footer.site details.claims-box[open] > summary::after { content: " ▴"; }
footer.site details.claims-box > .claims { margin-top: 5px; }

/* ---------- 合规组件（未成年人信息保护 / 广告法） ---------- */
/* 监护人同意勾选块 */
.consent {
  background: #FFF7EC; border: 1.5px solid #F8E3C4; border-radius: 16px;
  padding: 14px 16px; margin: 12px 0; font-size: 13px; line-height: 1.85; color: #7A5A2A;
}
.consent .title { font-weight: 800; color: #8A5A1F; margin-bottom: 6px; font-size: 13.5px; }
/* 可折叠：手机上默认收起长条款，点开再读，避免把按钮挤到一屏之外 */
details.consent > summary.title {
  cursor: pointer; list-style: none; display: flex; align-items: center; gap: 6px;
  margin-bottom: 0; -webkit-tap-highlight-color: transparent;
}
details.consent > summary.title::-webkit-details-marker { display: none; }
details.consent > summary.title::after {
  content: "展开 ▾"; margin-left: auto; font-size: 11.5px; font-weight: 600; color: #B08A50; flex: none;
}
details.consent[open] > summary.title { margin-bottom: 6px; }
details.consent[open] > summary.title::after { content: "收起 ▴"; }
.consent ul { margin: 6px 0 8px; padding-left: 18px; }
.consent li { margin-bottom: 3px; }
.consent label.check {
  display: flex; align-items: flex-start; gap: 8px; margin-top: 8px;
  font-size: 13.5px; font-weight: 700; color: #7A4A1A; cursor: pointer; line-height: 1.7;
}
.consent label.check input { width: 18px; height: 18px; flex: none; margin-top: 2px; accent-color: var(--primary); cursor: pointer; }
.consent .warn { color: #C0392F; font-weight: 700; display: none; margin-top: 8px; font-size: 13px; }
.consent .warn.show { display: block; }

/* 可折叠卡片：把「说明类」内容收起，保证主操作按钮留在首屏 */
details.card-fold { padding: 15px; }
details.card-fold > summary.fold-title {
  cursor: pointer; list-style: none; display: flex; align-items: center; gap: 6px;
  font-size: 15px; font-weight: 700; color: var(--ink); -webkit-tap-highlight-color: transparent;
}
details.card-fold > summary.fold-title::-webkit-details-marker { display: none; }
details.card-fold > summary.fold-title::after {
  content: "展开 ▾"; margin-left: auto; font-size: 11.5px; font-weight: 600; color: var(--sub); flex: none;
}
details.card-fold[open] > summary.fold-title::after { content: "收起 ▴"; }

/* 合规声明块（关于页 / 报告页） */
.legal {
  border: 1.5px solid #DCD6F7; background: #FAF9FF; border-radius: 16px;
  padding: 16px 18px; margin: 16px 0;
}
.legal h3 { color: #5D4DB8; margin-bottom: 10px; }
.legal h4 { font-size: 13.5px; margin: 12px 0 4px; color: #5D4DB8; }
.legal p, .legal li { font-size: 13px; line-height: 1.9; color: #5A5570; }
.legal ul { padding-left: 18px; }
.legal .cite { font-size: 12px; color: #8B85A3; line-height: 1.85; margin-top: 10px; }

/* 条款正文（独立合规页） */
.terms h3 { font-size: 15.5px; }
.terms p, .terms li { font-size: 13.5px; line-height: 2; color: #5A5570; }
.terms ol, .terms ul { padding-left: 22px; margin-bottom: 8px; }
.terms .meta { font-size: 12px; color: #8B85A3; margin-bottom: 14px; }

/* ---------- 输入框 ---------- */
input[type="text"], input:not([type]) {
  border: 1.5px solid var(--line); border-radius: 12px; font-size: 15px; font-family: inherit;
  color: var(--ink); background: #fff; outline: none; transition: .15s;
}
input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255, 92, 82, .12); }

/* ---------- 底部导航条（移动端，拇指可达） ---------- */
.tabbar { display: none; }

/* ---------- 首页首访弹窗（一次性：看过就不再弹） ---------- */
.modal-mask {
  display: none; position: fixed; inset: 0; z-index: 60;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(60, 40, 32, .44);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.modal-mask.show { display: flex; }
.modal-card {
  position: relative; width: 100%; max-width: 360px;
  background: #fff; border-radius: 22px; padding: 20px 18px 16px;
  box-shadow: 0 24px 60px rgba(80, 40, 20, .28);
  animation: modalIn .22s ease-out;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.modal-card h3 { font-size: 17px; font-weight: 800; line-height: 1.5; margin-bottom: 6px; padding-right: 26px; }
.modal-card .sub { font-size: 13px; color: var(--sub); line-height: 1.7; }
.modal-card ul { list-style: none; margin: 12px 0 14px; padding: 0; }
.modal-card li { font-size: 13.5px; line-height: 1.9; color: var(--ink); }
.modal-card .acts { display: flex; gap: 8px; margin: 2px 0 10px; }
.modal-card .acts .btn { flex: 1 1 0; }
.modal-card .fine { font-size: 11px; color: #B29C90; line-height: 1.6; }
.modal-x {
  position: absolute; top: 9px; right: 10px; width: 32px; height: 32px;
  border: none; background: transparent; color: #C9B6AA; font-size: 20px; line-height: 1; cursor: pointer;
}
.modal-x:active { transform: scale(.92); }

/* ---------- 一屏适配通用工具 ---------- */
/* 用真实视口高度（--vh 由 JS 写入），避开移动端浏览器地址栏导致的 100vh 偏差 */
.screen-fit {
  min-height: calc(var(--vh, 1vh) * 100 - var(--hd));
  display: flex; flex-direction: column;
  padding-bottom: 20px;
}
/* 首页：纵向空间均分，避免留白集中堆在一处（手机端一屏更协调） */
.screen-fit.distribute { justify-content: space-between; gap: 10px; }
.screen-fit.distribute > .grid2 { margin-top: 0; }
/* 纵向留白可伸缩：内容少时居中，内容多时自动压缩 */
.flex-fill { flex: 1 0 auto; }
.spacer-sm { height: 12px; }
.spacer-md { height: 20px; }
.scroll-y { overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* ---------- 移动端适配（≤600px 手机为主战场） ---------- */
@media (max-width: 600px) {
  :root { --hd: 46px; --pad: 12px; }
  .container { padding: 12px 12px 16px; }

  /* 分龄卡强制两列，四张卡一屏内排完 */
  .grid2 { grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .agecard { padding: 12px 8px 11px; border-radius: 14px; }
  .agecard b { font-size: 16px; }
  .agecard .stage { font-size: 10px; padding: 1px 8px; margin-bottom: 5px; }

  /* 卡片与标题压缩 */
  .card { padding: 15px; border-radius: 16px; margin-bottom: 12px; }
  .card h3 { font-size: 15px; margin-bottom: 9px; }
  h1.page { font-size: 20px; margin: 14px 0 5px; }
  p.lead { font-size: 13.5px; margin-bottom: 14px; line-height: 1.75; }

  /* hero 压缩到约一屏上半部分 */
  .hero { padding: 22px 16px 18px; border-radius: 22px; margin-bottom: 14px; }
  .hero .mark { width: 52px; height: 52px; margin-bottom: 10px; }
  .hero .mark::before { width: 22px; height: 22px; top: 7px; left: 9px; }
  .hero .mark::after { width: 9px; height: 9px; bottom: 10px; right: 11px; }
  .hero h1 { font-size: 23px; }
  .hero .lead { font-size: 13.5px; margin: 8px 0 16px; }
  .btn-big { padding: 14px 40px; font-size: 17px; }

  /* 游戏 iframe 撑满可视区（而非固定 480px） */
  .game-wrap { flex: 1 1 auto; min-height: 0; }
  iframe.gameframe {
    min-height: 0; height: auto; flex: 1 1 auto; border-radius: 16px;
  }
  #phaseGame { min-height: calc(var(--vh, 1vh) * 100 - var(--hd) - 34px); }
  .progressbar { height: 8px; margin: 8px 0 10px; }

  /* 语音卡横排更省高度 */
  .voice-card { padding: 12px 14px; gap: 11px; border-radius: 16px; margin: 10px 0; }
  .voice-card .avatar { width: 44px; height: 44px; font-size: 23px; }
  .voice-card .name { font-size: 13.5px; }
  .voice-card .say { font-size: 12.5px; }
  .voice-card .play { width: 40px; height: 40px; font-size: 16px; }

  /* 表格在窄屏可横向滑动，不撑破页面 */
  .tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table.tbl { font-size: 13px; }
  table.tbl th, table.tbl td { padding: 8px 5px; }

  .trust-item { font-size: 11px; padding: 6px 11px; }
  .notice { padding: 11px 13px; font-size: 12.5px; border-radius: 12px; margin: 10px 0; }
  .consent { padding: 12px 14px; font-size: 12.5px; border-radius: 14px; }
  .consent .title { font-size: 13px; }
  .consent label.check { font-size: 13px; }
  .legal { padding: 14px; border-radius: 14px; }
  .legal p, .legal li { font-size: 12.5px; line-height: 1.85; }
  .terms p, .terms li { font-size: 12.5px; line-height: 1.9; }

  /* 报告页维度卡单列，避免窄屏挤压 */
  .dim-grid { grid-template-columns: 1fr; gap: 9px; }
  .dimcard { padding: 12px; border-radius: 14px; }
  .rec-item { padding: 9px 12px; }

  /* 页脚在手机上压缩：免责声明只留一行关键信息，不占走一屏 */
  footer.site { padding: 10px 12px 6px; font-size: 10.5px; line-height: 1.6; }
  footer.site .claims { font-size: 10px; line-height: 1.7; margin-bottom: 5px; }
  footer.site details.claims-box { margin-bottom: 4px; }
  footer.site details.claims-box > summary { padding: 1px 0; }

  /* 首页一屏化：hero 与信任行再收紧 */
  .hero { padding: 20px 15px 16px; margin-bottom: 12px; }
  .hero .mark { width: 46px; height: 46px; margin-bottom: 9px; }
  .hero .mark::before { width: 19px; height: 19px; top: 6px; left: 8px; }
  .hero .mark::after { width: 8px; height: 8px; bottom: 9px; right: 10px; }
  .hero h1 { font-size: 22px; }
  .hero .lead { font-size: 13px; margin: 7px 0 14px; }
  .hero .foot { font-size: 11px; margin-top: 10px; line-height: 1.65; }
  .btn-big { padding: 13px 36px; font-size: 16.5px; }

  /* 底部导航条：只在手机显示，让主页面一屏内可达主要入口 */
  body.has-tabbar { padding-bottom: calc(54px + env(safe-area-inset-bottom, 0px)); }
  /* 挂底部导航的页面：内容区不额外撑高，避免与导航条重叠 */
  body.has-tabbar .screen-fit { min-height: calc(var(--vh, 1vh) * 100 - var(--hd) - 54px); }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: rgba(255, 255, 255, .97); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
    padding: 5px 4px calc(5px + env(safe-area-inset-bottom, 0px));
  }
  .tabbar a {
    flex: 1; text-align: center; font-size: 10.5px; color: var(--sub);
    padding: 3px 0; display: flex; flex-direction: column; align-items: center; gap: 2px;
    -webkit-tap-highlight-color: transparent;
  }
  .tabbar a i { font-style: normal; font-size: 17px; line-height: 1; }
  .tabbar a.active { color: var(--primary); font-weight: 700; }
}

/* 超窄屏（iPhone SE / 小屏安卓）再压一档：目标是首页一屏内排完 */
@media (max-width: 360px) {
  .hero h1 { font-size: 21px; }
  .agecard b { font-size: 15px; }
  .agecard span { font-size: 11px; }
}

/* 矮屏（≤700px 可视高度，如 iPhone SE 667px）：进一步压缩首屏纵向占用 */
@media (max-height: 700px) and (max-width: 600px) {
  .hero { padding: 16px 14px 14px; margin-bottom: 10px; border-radius: 18px; }
  .hero .mark { width: 40px; height: 40px; margin-bottom: 7px; }
  .hero .mark::before { width: 16px; height: 16px; top: 5px; left: 7px; }
  .hero .mark::after { width: 7px; height: 7px; bottom: 8px; right: 9px; }
  .hero h1 { font-size: 21px; }
  .hero .lead { font-size: 12.5px; margin: 6px 0 12px; }
  .btn-big { padding: 12px 32px; font-size: 16px; }
  .agecard { padding: 10px 8px 9px; }
  .agecard b { font-size: 15px; }
  .agecard span { font-size: 11px; }
  .agecard .stage { margin-bottom: 4px; padding: 1px 7px; }
  .grid2 { gap: 7px; }
  .container { padding: 8px 12px 12px; }
  .trust-row.two-col { gap: 6px; }
  .trust-row.two-col .trust-item { padding: 5px 4px; font-size: 10.5px; }
  .screen-fit.distribute { gap: 4px; }
  .hero .lead { margin-bottom: 10px; }
  footer.site { padding: 6px 12px 4px; font-size: 10px; }
  footer.site .claims-box > summary { font-size: 10px; }
}
