/* 入籍128题中文陪练。给不太用手机的人用：字大、按钮大、一屏只做一件事。 */
:root {
  --bg: #f5f2ec; --card: #ffffff; --ink: #1b2530; --soft: #5b6672; --line: #ddd6ca;
  --blue: #1d4e89; --blue-soft: #e6eef8; --green: #1f7a4d; --green-soft: #e3f3ea; --red: #b3372f; --red-soft: #fbe9e7; --gold: #7a5a00; --gold-soft: #fff4cf;
  --fs: 18px;
  color-scheme: light;
}
html.big { --fs: 21px; }
* { box-sizing: border-box; }
html { font-size: var(--fs); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Segoe UI", Roboto, sans-serif; line-height: 1.55; }
#app { max-width: 640px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-right, 0px)) calc(40px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); min-height: 100vh; }
.loading { padding: 48px 0; text-align: center; color: var(--soft); }
a { color: var(--blue); }
h1, h2, p { margin: 0; }
[lang="en"] { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }

/* 顶上一条 */
.top { display: flex; align-items: center; gap: 8px; padding: 14px 0 10px; }
.top h1 { flex: 1; text-align: center; font-size: 1.15rem; }
.top .back { width: 4.6rem; font-size: 1rem; text-decoration: none; color: var(--blue); padding: 8px 0; }
.hero { padding: 26px 0 14px; text-align: center; }
.hero h1 { font-size: 1.75rem; letter-spacing: .02em; }
.hero p { color: var(--soft); margin-top: 2px; }

/* 卡片 */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin: 12px 0; }
.card.center { text-align: center; }
.bigmsg { font-size: 1.35rem; font-weight: 700; margin-bottom: 8px; }

/* 首页 */
.plan { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; background: var(--blue-soft); border-radius: 12px; padding: 12px 14px; text-decoration: none; color: var(--ink); }
.plan .chg { margin-left: auto; color: var(--blue); white-space: nowrap; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0 4px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 4px; text-align: center; }
.stat b { display: block; font-size: 1.6rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat span { color: var(--soft); font-size: .9rem; }
.menu { display: grid; gap: 10px; margin: 14px 0; }
.menu a { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; text-decoration: none; color: var(--ink); min-height: 72px; }
.menu a:active { background: var(--blue-soft); }
.menu .badge { flex: none; width: 2.7rem; height: 2.7rem; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-size: 1.25rem; font-weight: 700; }
.menu .badge.g { background: var(--green); } .menu .badge.r { background: var(--red); } .menu .badge.k { background: #3b4754; } .menu .badge.o { background: #9a5b00; }
.menu b { display: block; font-size: 1.2rem; }
.menu small { color: var(--soft); font-size: .9rem; }
.fine { color: var(--soft); font-size: .86rem; margin: 10px 0; }
.note { background: var(--gold-soft); color: #4d3b00; border-radius: 12px; padding: 12px 14px; margin: 12px 0; font-size: .95rem; }
.note.red { background: var(--red-soft); color: #6d1d17; }

/* 题目 */
.qhead { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.num { color: var(--soft); font-size: .95rem; font-variant-numeric: tabular-nums; }
.chip { background: var(--blue-soft); color: var(--blue); border-radius: 999px; padding: 1px 10px; font-size: .82rem; white-space: nowrap; }
.chip.star { background: var(--gold-soft); color: var(--gold); }
.qmain { font-size: 1.45rem; line-height: 1.4; font-weight: 600; overflow-wrap: anywhere; }
.qsub { color: var(--soft); margin-top: 8px; font-size: 1.05rem; overflow-wrap: anywhere; }
.say { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.saybtn { border: 1px solid var(--line); background: #faf8f4; border-radius: 999px; padding: 8px 14px; font-size: .95rem; color: var(--ink); min-height: 44px; font-family: inherit; }
.saybtn:active, .saybtn.on { background: var(--blue-soft); border-color: var(--blue); }
.saybtn[disabled] { opacity: .45; }
.ico { width: 1.15em; height: 1.15em; vertical-align: -0.2em; fill: currentColor; margin-right: .35em; }

/* 答案 */
.ans { border-color: #bfd8c9; background: #fbfefc; }
.alabel { color: var(--green); font-weight: 700; font-size: .92rem; margin-bottom: 4px; }
.amain { font-size: 1.4rem; line-height: 1.4; font-weight: 700; overflow-wrap: anywhere; }
.asub { margin-top: 6px; font-size: 1.08rem; color: var(--soft); overflow-wrap: anywhere; }
.tip { margin-top: 10px; font-size: .95rem; color: var(--soft); }
.warn { margin-top: 10px; background: var(--gold-soft); color: #4d3b00; border-radius: 10px; padding: 10px 12px; font-size: .92rem; }
details { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 10px; }
summary { color: var(--blue); cursor: pointer; padding: 6px 0; font-size: 1rem; }
.all { list-style: none; padding: 0; margin: 6px 0 0; }
.all li { padding: 9px 0; border-bottom: 1px solid #eee7da; cursor: pointer; }
.all li:last-child { border-bottom: 0; }
.all li span { display: block; font-size: 1.05rem; overflow-wrap: anywhere; }
.all li small { color: var(--soft); font-size: .92rem; }
.repbox { margin-top: 10px; display: grid; gap: 8px; }
.repbox input { font: inherit; padding: 12px; border: 1px solid var(--line); border-radius: 10px; width: 100%; }

/* 按钮 */
.btn { display: block; width: 100%; min-height: 58px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-size: 1.15rem; font-weight: 600; padding: 12px 16px; text-align: center; text-decoration: none; cursor: pointer; }
.btn.main { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.ok { background: var(--green); border-color: var(--green); color: #fff; }
.btn.no { background: var(--red); border-color: var(--red); color: #fff; }
.btn.ghost { background: transparent; }
.btn:active { filter: brightness(.94); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.stack { display: grid; gap: 10px; margin: 12px 0; }
.prog { text-align: center; color: var(--soft); font-variant-numeric: tabular-nums; margin-top: 2px; }
.bar { height: 8px; background: #e6dfd2; border-radius: 99px; overflow: hidden; margin: 8px 0 2px; }
.bar i { display: block; height: 100%; background: var(--blue); }

/* 目录 */
.sec h2 { font-size: 1.05rem; margin: 22px 0 4px; }
.sec h2 small { display: block; color: var(--soft); font-weight: 400; font-size: .8rem; }
.qlist { list-style: none; padding: 0; margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.qlist li + li { border-top: 1px solid #eee7da; }
.qrow { display: flex; gap: 10px; align-items: baseline; padding: 12px 14px; text-decoration: none; color: var(--ink); }
.qrow .num { flex: none; width: 2.2rem; }
.qrow .qt { flex: 1; overflow-wrap: anywhere; }
.dot { flex: none; width: .7rem; height: .7rem; border-radius: 50%; background: #d8d1c4; align-self: center; }
.dot.ok { background: var(--green); } .dot.no { background: var(--red); }

/* 结果 */
.result { text-align: center; padding: 26px 18px; }
.result .big { font-size: 2rem; font-weight: 800; }
.result.pass .big { color: var(--green); } .result.fail .big { color: var(--red); }
.result p { margin-top: 6px; }

/* 连续听 */
.now { min-height: 12rem; }
.part { padding: 8px 10px; border-radius: 10px; margin: 4px -10px; transition: background .2s; overflow-wrap: anywhere; }
.part.on { background: var(--blue-soft); }
.part.q { font-size: 1.3rem; font-weight: 600; } .part.a { font-size: 1.3rem; font-weight: 700; color: var(--green); }
.part.zh { font-size: 1.1rem; }
.ctl { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 10px; margin: 12px 0; }
.ctl .btn { padding: 12px 4px; white-space: nowrap; }
.opts { display: grid; gap: 8px; margin: 12px 0; }
.opt { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; min-height: 54px; }
.opt input[type="checkbox"] { width: 1.5rem; height: 1.5rem; flex: none; accent-color: var(--blue); }
.opt span { flex: 1; }

/* 设置 */
.choice { display: block; width: 100%; text-align: left; font: inherit; background: var(--card); border: 2px solid var(--line); border-radius: 14px; padding: 14px 16px; margin: 10px 0; color: var(--ink); cursor: pointer; }
.choice b { display: block; font-size: 1.12rem; }
.choice small { color: var(--soft); font-size: .92rem; }
.choice.on { border-color: var(--blue); background: var(--blue-soft); }
label.field { display: block; margin: 16px 0 6px; font-weight: 700; }
select { font: inherit; width: 100%; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); min-height: 54px; }
.about h2 { font-size: 1.1rem; margin: 20px 0 6px; }
.about p, .about li { font-size: .98rem; }
.about ul { padding-left: 1.2rem; margin: 6px 0; }

/* 首页的三步 */
.path { text-align: center; color: var(--soft); margin-top: 12px; font-size: .95rem; }
.step { font-size: 1rem; color: var(--soft); margin: 20px 0 -4px; font-weight: 700; }
.menu .badge.p { background: #5d4a6b; }
.stats.two { grid-template-columns: 1fr 1fr; }

/* 十位移民官 */
.olist { display: grid; gap: 10px; margin: 12px 0; }
.orow { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; text-decoration: none; color: var(--ink); }
.orow:active { background: var(--blue-soft); }
.orow .face { flex: none; width: 3.4rem; height: 3.86rem; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.orow .face svg { display: block; width: 100%; height: 100%; }
.orow .who { flex: 1; min-width: 0; }
.orow b { display: block; font-size: 1.05rem; }
.orow small { color: var(--soft); font-size: .9rem; }
.chip.ok { background: var(--green-soft); color: var(--green); }
.chip.no { background: var(--red-soft); color: var(--red); }

/* 面试的场景 */
.scene { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); margin: 12px 0; background: #e9e3d7; }
.scene svg { display: block; width: 100%; height: auto; }
.scene .tag { position: absolute; top: 8px; right: 8px; background: rgba(27, 37, 48, .55); color: #fff; font-size: .7rem; padding: 1px 8px; border-radius: 99px; }
.scene .turn { position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 12px; text-align: center; font-weight: 700; color: #fff; background: rgba(27, 37, 48, .84); }
.scene.who-you .turn { background: rgba(31, 122, 77, .93); }
.scene .wave { opacity: 0; }
.scene.who-officer .wave-o, .scene.who-interp .wave-i { opacity: 1; animation: wave .9s ease-in-out infinite; }
.scene .mouth { transform-box: fill-box; transform-origin: center; }
.scene.who-officer .officer .mouth, .scene.who-interp .interp .mouth { animation: talk .24s ease-in-out infinite alternate; }
@keyframes wave { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@keyframes talk { from { transform: scaleY(.8); } to { transform: scaleY(3.2); } }
@media (prefers-reduced-motion: reduce) { .scene .wave, .scene .mouth { animation: none !important; } }

/* 面试的场景：真人照片（AI 生成） */
.scene.real { aspect-ratio: 4 / 3; background: #1b2530; }
.scene .photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.scene .turn:empty { display: none; }
.scene .bars { position: absolute; left: 10px; top: 8px; display: none; gap: 3px; align-items: flex-end; height: 26px; padding: 6px 8px; border-radius: 10px; background: rgba(27, 37, 48, .6); }
.scene.real.who-officer .bars { display: flex; }
.scene .bars i { width: 4px; height: 100%; background: #fff; border-radius: 2px; transform-origin: bottom; animation: bar .7s ease-in-out infinite; }
.scene .bars i:nth-child(2) { animation-delay: .15s; } .scene .bars i:nth-child(3) { animation-delay: .3s; } .scene .bars i:nth-child(4) { animation-delay: .45s; } .scene .bars i:nth-child(5) { animation-delay: .2s; }
@keyframes bar { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
.scene .ichip { position: absolute; left: 10px; bottom: 46px; background: rgba(93, 74, 107, .95); color: #fff; font-size: .8rem; padding: 2px 12px; border-radius: 99px; display: none; }
.scene.real .ichip { display: block; }
.scene.real.who-interp .ichip { outline: 2px solid #fff; animation: wave .9s ease-in-out infinite; }
.orow .face img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; background: #d9d2c3; }
@media (prefers-reduced-motion: reduce) { .scene .bars i, .scene .ichip { animation: none !important; } }

/* 申请表问话 */
.stem { color: var(--soft); font-size: 1rem; margin-bottom: 8px; overflow-wrap: anywhere; }
.qmain.long { font-size: 1.2rem; }
.parts { margin: 8px 0 0; padding-left: 1.2rem; font-size: 1.05rem; }
.parts li { margin: 5px 0; overflow-wrap: anywhere; }
.qmore { color: var(--soft); margin-top: 8px; font-size: .98rem; overflow-wrap: anywhere; }
.zmain { font-size: 1.2rem; line-height: 1.5; font-weight: 600; overflow-wrap: anywhere; }
.alabel.k { color: var(--soft); }
.words b { font-size: 1.1rem; }
.words li small { display: block; }
.offtag, .wno { font-style: normal; margin-left: 8px; border-radius: 99px; padding: 0 8px; font-size: .75rem; white-space: nowrap; }
.offtag { background: var(--gold-soft); color: var(--gold); }
.wno { background: #efe9dd; color: var(--soft); }
.qrow .num.wide { width: 3.1rem; }
.condlist { margin-top: 8px; border-top: 0; padding-top: 0; }
.condlist summary { font-size: .95rem; }
.listen { transition: background .2s, border-color .2s; }
.listen.on { border-color: var(--blue); background: var(--blue-soft); }
.say.center { justify-content: center; }
