* { box-sizing: border-box; margin: 0; padding: 0; }
:root { --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif; --hl: #FFD866; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font); color: var(--text, #23233B); background: var(--bg, #fff);
  line-height: 1.4; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; text-align: inherit; }
a { color: inherit; }

.app {
  position: relative; width: 100%; max-width: 440px; min-height: 100vh; min-height: 100dvh; margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
  background: var(--bg); overflow-x: hidden;
}
@media (min-width: 520px) {
  body { background: color-mix(in srgb, var(--bg) 86%, #6b6b80); }
  .app { margin: 28px auto; min-height: calc(100dvh - 56px); border-radius: 32px; box-shadow: 0 24px 60px rgba(35, 35, 59, .16); }
}
.boot { padding: 80px 0; text-align: center; color: var(--muted, #888); }
.screen { animation: in .28s ease both; }
@keyframes in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .screen { animation: none; } }

.brand { display: flex; align-items: center; justify-content: space-between; font-size: 14px; color: var(--muted); font-weight: 600; letter-spacing: 1px; }
.brand > div { display: flex; align-items: center; gap: 10px; }
.dots { display: flex; gap: 5px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); display: block; }

/* 开始页 */
.start { display: flex; flex-direction: column; min-height: calc(100dvh - 44px); }
@media (min-width: 520px) { .start { min-height: calc(100dvh - 56px - 42px); } }
.kicker { align-self: flex-start; margin-top: 22px; padding: 8px 18px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 15px; font-weight: 700; letter-spacing: 2px; }
.hook { margin-top: 14px; font-size: 56px; line-height: 1.14; font-weight: 800; letter-spacing: 1px; }
.hook span { display: block; }
.hook .acc { position: relative; isolation: isolate; width: fit-content; color: var(--q-mind); }
.hook .acc::after { content: ""; position: absolute; left: -6px; right: -6px; bottom: 7px; height: 16px; background: var(--hl); border-radius: 4px; z-index: -1; }
.sub { margin-top: 16px; font-size: 16px; font-weight: 600; line-height: 1.55; text-wrap: balance; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.tile { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 6px; padding: 12px 14px; min-height: 70px; border-radius: 20px; background: var(--c); color: #fff; }
.tile > div { display: contents; }
.tile b { grid-column: 1; grid-row: 1; display: block; font-size: 21px; font-weight: 800; letter-spacing: 2px; }
.tile span { grid-column: 1 / -1; grid-row: 2; white-space: nowrap; display: block; margin-top: 2px; font-size: 11px; line-height: 1.3; opacity: .95; }
.tile s { grid-column: 2; grid-row: 1; text-decoration: none; line-height: 1; font-size: 30px; font-weight: 800; opacity: .92; }
.lvline { margin-top: 14px; font-size: 13px; color: var(--muted); line-height: 1.6; }
.lvline b { color: var(--text); }
.spacer { flex: 1; min-height: 16px; }
.resume { margin-top: 16px; padding: 10px 14px; border-radius: 14px; background: var(--card); border: 1.5px dashed var(--line); font-size: 14px; color: var(--muted); }
.resume b { color: var(--text); }
.actions { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.btn { display: flex; align-items: center; justify-content: center; min-height: 54px; padding: 0 22px; border-radius: 999px; font-size: 17px; font-weight: 800; text-align: center; text-decoration: none; transition: transform .12s, opacity .12s; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--primary); color: #fff; }
.btn.ghost { background: var(--card); border: 2px solid var(--line); color: var(--text); font-weight: 700; }
.note { margin-top: 12px; text-align: center; font-size: 12px; color: var(--muted); }

/* 答题页 */
.qtop { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.back { display: flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 14px 0 10px; border-radius: 999px; background: var(--card); border: 1.5px solid var(--line); font-size: 14px; font-weight: 700; }
.back:active { transform: scale(.96); }
.count { font-size: 17px; font-weight: 800; letter-spacing: 1px; }
.count small { font-size: 13px; font-weight: 600; color: var(--muted); }
.chip { padding: 6px 14px; border-radius: 999px; background: var(--c); color: #fff; font-size: 14px; font-weight: 800; letter-spacing: 2px; white-space: nowrap; }
.segs { display: flex; gap: 5px; margin-top: 14px; }
.segs i { position: relative; flex: 1; height: 8px; border-radius: 4px; background: var(--soft); overflow: hidden; }
.segs i b { position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--c); border-radius: 4px; transition: width .3s ease; }
.segs i.cur { box-shadow: 0 0 0 2px var(--soft); }
.qscope { margin-top: 8px; font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; }
.qcard { margin-top: 26px; }
.qno { display: inline-block; padding: 3px 11px; border-radius: 8px; background: var(--c); color: #fff; font-size: 14px; font-weight: 800; }
.stem { margin-top: 12px; font-size: 27px; line-height: 1.32; font-weight: 800; }
.opts { display: flex; flex-direction: column; gap: 12px; margin-top: 26px; }
.opt { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 66px; padding: 14px 16px; border-radius: 20px; background: var(--card); border: 2px solid var(--line); font-size: 17px; line-height: 1.4; transition: border-color .12s, background .12s, transform .12s; }
.opt .lt { flex: none; display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: var(--soft); color: var(--c); font-size: 16px; font-weight: 800; }
@media (hover: hover) { .opt:hover { border-color: var(--c); } }
.opt:active { transform: scale(.98); }
.opt.sel { border-color: var(--c); background: var(--soft); font-weight: 700; }
.opt.sel .lt { background: var(--c); color: #fff; }
.qhint { margin-top: 20px; text-align: center; font-size: 12px; color: var(--muted); }

/* 结果页 */
.res-top { display: flex; align-items: center; justify-content: space-between; }
.hero { margin-top: 18px; padding: 22px 20px; border-radius: 28px; background: var(--primary); color: #fff; }
.hero .eyebrow { font-size: 13px; letter-spacing: 3px; opacity: .8; }
.hero h1 { margin-top: 6px; font-size: 38px; line-height: 1.15; font-weight: 800; letter-spacing: 2px; }
.hero p { margin-top: 8px; font-size: 16px; opacity: .92; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pill { padding: 5px 12px; border-radius: 999px; background: var(--c); color: #fff; font-size: 14px; font-weight: 700; }
.pill.hot { box-shadow: 0 0 0 3px rgba(255, 255, 255, .85); }
.radar-card { margin-top: 16px; padding: 10px 6px 12px; border-radius: 28px; background: var(--card); border: 2px solid var(--line); }
.radar-card svg { display: block; width: 100%; height: auto; }
.radar-card .cap { text-align: center; font-size: 12px; color: var(--muted); }
.radar-card text { font-family: var(--font); }

.focus { margin-top: 18px; border-radius: 28px; border: 3px solid var(--c); background: var(--soft); box-shadow: 0 0 0 6px var(--soft); overflow: hidden; }
.focus .fbar { display: flex; align-items: center; gap: 8px; padding: 10px 18px; background: var(--c); color: #fff; font-size: 15px; font-weight: 800; letter-spacing: 1px; }
.focus .fbar svg { flex: none; }
.focus .fbody { padding: 16px 18px 18px; }
.focus .fhead { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; }
.focus h2 { font-size: 46px; line-height: 1.1; font-weight: 800; letter-spacing: 4px; color: var(--c); }
.lvchip { padding: 4px 12px; border-radius: 999px; font-size: 15px; font-weight: 800; color: #fff; background: var(--lv); white-space: nowrap; }
.focus .fscope { margin-top: 6px; font-size: 13px; color: var(--muted); }
.focus .why { margin-top: 10px; font-size: 14px; font-weight: 700; }
.focus .ftext { margin-top: 10px; font-size: 15px; line-height: 1.65; }
.tips { list-style: none; margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.tips li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 16px; background: var(--card); font-size: 15px; line-height: 1.55; font-weight: 600; }
.tips li b { flex: none; display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin-top: 1px; border-radius: 50%; background: var(--c); color: #fff; font-size: 13px; font-weight: 800; }
.tie { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .7); font-size: 12px; line-height: 1.6; color: var(--muted); }

.sec-title { margin: 26px 0 4px; font-size: 20px; font-weight: 800; }
.sec-sub { font-size: 13px; color: var(--muted); }
.dcard { margin-top: 12px; padding: 16px 16px 16px 18px; border-radius: 22px; background: var(--card); border: 2px solid var(--soft); border-left: 7px solid var(--c); }
.dcard.is-focus { border-color: var(--c); }
.dhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dhead h3 { font-size: 22px; font-weight: 800; letter-spacing: 3px; color: var(--c); }
.dhead h3 small { margin-left: 8px; font-size: 12px; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.dmeta { margin-top: 8px; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.dcard p.txt { margin-top: 8px; font-size: 14.5px; line-height: 1.65; }
.dcard .tips { margin-top: 10px; gap: 8px; }
.dcard .tips li { background: var(--soft); font-size: 14px; padding: 10px 12px; }
.badge { padding: 3px 10px; border-radius: 999px; background: var(--c); color: #fff; font-size: 12px; font-weight: 800; white-space: nowrap; }
.dcard .seefocus { margin-top: 10px; font-size: 13px; color: var(--c); font-weight: 700; }

.res-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 26px; }
.cta-line { margin-top: 16px; text-align: center; font-size: 13px; color: var(--muted); }

/* 弹层 */
.modal { position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(35, 35, 59, .62); animation: in .2s ease both; }
.sheet { width: 100%; max-width: 400px; max-height: 100%; overflow: auto; padding: 18px 16px 16px; border-radius: 26px; background: var(--card); text-align: center; }
.sheet h3 { font-size: 19px; font-weight: 800; }
.sheet .hint { margin-top: 6px; font-size: 14px; color: var(--muted); line-height: 1.55; }
.sheet .hint b { color: var(--text); }
.sheet img { display: block; width: 100%; max-height: 60vh; object-fit: contain; margin-top: 12px; border-radius: 14px; border: 1.5px solid var(--line); -webkit-touch-callout: default; user-select: auto; }
.sheet .row { display: flex; gap: 10px; margin-top: 14px; }
.sheet .row .btn { flex: 1; min-height: 48px; font-size: 15px; padding: 0 12px; }
.sheet.confirm { max-width: 320px; padding: 22px 18px 18px; }
.sheet.confirm p { margin-top: 8px; font-size: 14px; color: var(--muted); }
.errbox { padding: 40px 8px; text-align: center; line-height: 1.7; }
.errbox code { display: inline-block; margin-top: 8px; padding: 4px 10px; border-radius: 8px; background: var(--card); border: 1px solid var(--line); font-size: 13px; }
