/* ---------- 测评应用 ---------- */
[hidden] { display: none !important; }
.top { box-shadow: 0 1px 0 var(--line); }
.progress-steps { list-style: none; margin: 0 auto 0 0; padding: 0; display: flex; gap: 4px; counter-reset: ps; }
.progress-steps li { counter-increment: ps; display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); padding: 6px 12px 6px 8px; border-radius: 999px; }
.progress-steps li::before { content: counter(ps); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 800 12px var(--mono); background: var(--sand); }
.progress-steps li.on { color: var(--ink); font-weight: 800; background: var(--paper); box-shadow: 0 0 0 1px var(--line); }
.progress-steps li.on::before { background: var(--apricot); color: #fff; }
.progress-steps li.done::before { content: "✓"; background: var(--sage); color: #fff; }
.progress-steps:empty, .progress-steps.off { visibility: hidden; }
.local-banner { background: #fff1d6; color: #7a5520; font-size: 13.5px; padding: 8px 0; }
.local-banner code { font-family: var(--mono); background: rgba(0, 0, 0, .06); padding: 1px 6px; border-radius: 4px; }
.view { min-height: calc(100vh - 64px); }
.view-head { max-width: 720px; margin-bottom: 26px; }
.view-head h1 { font-size: clamp(30px, 4vw, 44px); margin-bottom: 10px; }
.view-head p { color: var(--ink2); font-size: 16.5px; }

/* 激活 */
.v-activate { display: grid; place-items: center; padding: 40px 18px 64px; background: radial-gradient(80% 60% at 50% 0%, #fff3e2, transparent 70%); }
.act-card { width: min(560px, 100%); padding: clamp(26px, 4vw, 44px); text-align: center; display: grid; justify-items: center; }
.act-card canvas { width: 180px; height: 120px; margin-bottom: 8px; }
.act-card h1 { font-size: clamp(26px, 3.4vw, 34px); }
.act-sub { color: var(--ink2); margin: 10px 0 22px; font-size: 15px; }
#actForm { width: 100%; }
.key-box { position: relative; }
.key-box input { width: 100%; min-height: 62px; padding: 12px 52px 12px 20px; border-radius: 16px; border: 2px solid var(--line2); background: var(--cream); font: 800 clamp(18px, 2.6vw, 23px) var(--mono); letter-spacing: .08em; text-align: center; text-transform: uppercase; transition: border-color .2s, background .2s; }
.key-box input:focus { outline: none; border-color: var(--apricot); background: #fff; }
.key-box input::placeholder { color: #cdbfb3; letter-spacing: .06em; }
.key-ok { position: absolute; right: 18px; top: 50%; transform: translateY(-50%) scale(.6); opacity: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--sage); color: #fff; display: grid; place-items: center; font-weight: 900; transition: .2s; }
.key-box.valid input { border-color: var(--sage); }
.key-box.valid .key-ok { opacity: 1; transform: translateY(-50%) scale(1); }
.key-box.bad input { border-color: #d9654a; }
.act-err { min-height: 1.6em; color: #c04a30; font-size: 14px; margin: 10px 0 4px; }
.act-btn { width: 100%; min-height: 56px; font-size: 17px; }
.act-facts { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 10px; text-align: left; width: 100%; }
.act-facts li { padding: 14px 16px; background: var(--cream); border-radius: 14px; font-size: 14px; color: var(--ink2); }
.act-facts b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 2px; }
.act-foot { margin-top: 20px; font-size: 14px; color: var(--muted); }
.act-foot a { color: var(--apricot-d); font-weight: 700; }
#demoBtn { margin-top: 12px; }

/* 建档 */
.v-profile { padding: 40px 0 80px; }
.pf-form { margin-top: 18px; padding: clamp(20px, 3vw, 32px); display: grid; gap: 22px; }
.pf-name label, .pf-l { display: block; font-weight: 800; font-size: 15.5px; margin-bottom: 8px; }
.pf-name input { width: min(420px, 100%); min-height: 52px; padding: 10px 16px; font-size: 17px; border-radius: 14px; border: 2px solid var(--line2); background: var(--cream); }
.pf-name input:focus { outline: none; border-color: var(--apricot); background: #fff; }
.pf-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px 24px; }
.pf-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.pf-opts button { border: 0; min-height: 42px; padding: 8px 15px; border-radius: 999px; background: var(--cream); box-shadow: inset 0 0 0 1px var(--line2); font-size: 14.5px; transition: background .15s; }
.pf-opts button:hover { background: var(--sand); }
.pf-opts button[aria-checked=true] { background: var(--ink); color: #fff; box-shadow: none; font-weight: 700; }
.pf-why { font-size: 13.5px; color: var(--muted); }
.pf-err { color: #c04a30; font-size: 14px; min-height: 1.4em; margin: -10px 0; }
.pf-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.pf-meta { color: var(--muted); font-size: 14px; }

/* 答题 */
.v-quiz { padding: 28px 0 60px; background: radial-gradient(80% 50% at 50% 0%, #fff3e2, transparent 70%); }
.quiz-wrap { max-width: 980px; }
.qbar { margin-bottom: 22px; }
.qbar-top { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--ink2); margin-bottom: 30px; }
#qCount { font-weight: 800; color: var(--ink); font-family: var(--mono); }
#qHint { color: var(--apricot-d); font-weight: 700; }
.qsave { margin-left: auto; color: var(--muted); font-size: 13px; }
.qtrack { position: relative; height: 10px; border-radius: 99px; background: var(--sand); }
.qfill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 99px; background: linear-gradient(90deg, #f6b182, var(--apricot)); transition: width .45s cubic-bezier(.3, .9, .3, 1); }
.qcat { position: absolute; bottom: 2px; width: 72px; height: 48px; margin-left: -36px; transition: left .45s cubic-bezier(.3, .9, .3, 1); pointer-events: none; }
.qcard { display: grid; grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr); overflow: hidden; min-height: 420px; }
.q-art { position: relative; background: radial-gradient(120% 90% at 50% 10%, #fff4de 0%, #f4dbb7 60%, #e4bf93 100%); display: grid; place-items: end center; padding-bottom: 26px; }
.q-art canvas { width: 100%; max-width: 300px; height: auto; aspect-ratio: 300 / 220; }
.q-name { position: absolute; left: 16px; top: 14px; font-size: 13px; font-weight: 800; background: rgba(255, 255, 255, .85); padding: 4px 11px; border-radius: 999px; }
.q-body { padding: clamp(22px, 3.4vw, 40px); display: flex; flex-direction: column; }
.q-k { font-size: 13.5px; color: var(--muted); font-weight: 700; margin-bottom: 8px; }
.q-text { font-size: clamp(21px, 2.4vw, 27px); line-height: 1.35; margin-bottom: 22px; letter-spacing: 0; }
.q-opts { display: grid; gap: 10px; }
.q-opt { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; border: 0; padding: 14px 16px; min-height: 56px; border-radius: 14px; background: var(--cream); box-shadow: inset 0 0 0 1.5px var(--line); font-size: 16px; line-height: 1.45; transition: background .15s, box-shadow .15s, transform .12s; }
.q-opt:hover { background: #fff3e6; box-shadow: inset 0 0 0 1.5px #f3c4a4; }
.q-opt:active { transform: scale(.99); }
.q-opt kbd { flex: none; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font: 800 13px var(--mono); background: var(--paper); box-shadow: inset 0 0 0 1px var(--line2); color: var(--ink2); }
.q-opt[aria-checked=true] { background: var(--ink); color: #fff; box-shadow: none; }
.q-opt[aria-checked=true] kbd { background: var(--apricot); color: #fff; box-shadow: none; }
.q-na { align-self: flex-start; margin-top: 14px; border: 0; background: none; color: var(--muted); font-size: 14px; padding: 8px 4px; text-decoration: underline; text-underline-offset: 3px; }
.q-na[aria-checked=true] { color: var(--ink); font-weight: 800; text-decoration-thickness: 2px; }
.qnav { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.qkeys { margin: 0 auto; font-size: 13px; color: var(--muted); }
.qcard.swap { animation: swap .32s ease; }
@keyframes swap { from { opacity: 0; transform: translateY(8px); } }

/* 分析 */
.v-analyze { display: grid; place-items: center; background: var(--night); color: var(--night-ink); padding: 40px 18px; }
.an-in { display: grid; justify-items: center; text-align: center; }
.an-in canvas { width: 260px; height: 162px; }
.an-in h1 { font-size: clamp(26px, 3.4vw, 36px); margin: 10px 0 22px; }
.an-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; text-align: left; }
.an-steps li { display: flex; align-items: center; gap: 12px; color: var(--night-muted); transition: color .3s; }
.an-steps li::before { content: ""; width: 20px; height: 20px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(248, 239, 226, .25); flex: none; }
.an-steps li.on { color: var(--night-ink); }
.an-steps li.on::before { box-shadow: inset 0 0 0 2px #ffcf96; border-top-color: transparent; animation: spin .8s linear infinite; background: conic-gradient(#ffcf96 0 25%, transparent 0); }
.an-steps li.done { color: var(--night-ink); }
.an-steps li.done::before { content: "✓"; display: grid; place-items: center; font-size: 12px; font-weight: 900; background: #7fd8a8; color: var(--night); box-shadow: none; animation: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 报告 ---------- */
.v-report { background: var(--cream); }
.r-sample { background: var(--ink); color: #f8efe2; font-size: 14px; }
.r-sample .wrap { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; min-height: 52px; padding: 8px 0; }
.r-sample a { margin-left: auto; }
.r-hero { background: var(--night); color: var(--night-ink); position: relative; overflow: hidden; padding: clamp(36px, 5vw, 64px) 0; }
.r-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(50% 70% at 28% 60%, rgba(239, 138, 85, .28), transparent 70%); pointer-events: none; }
.r-hero-in { position: relative; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.r-show { position: relative; aspect-ratio: 4 / 3; border-radius: 22px; background: radial-gradient(90% 80% at 50% 20%, #5a3f36, #2b1e22 70%); box-shadow: inset 0 0 0 1px var(--night-line); overflow: hidden; }
.r-show canvas { width: 100%; height: 100%; }
.r-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.r-meta .chip { background: rgba(248, 239, 226, .08); color: var(--night-muted); box-shadow: inset 0 0 0 1px var(--night-line); font-weight: 600; }
.r-meta .chip b { color: var(--night-ink); }
.r-name { font-size: clamp(20px, 2.2vw, 24px); color: var(--night-muted); font-weight: 700; }
.r-type { font-family: var(--serif); font-size: clamp(40px, 6vw, 72px); line-height: 1.1; color: #ffcf96; margin: 6px 0 16px; letter-spacing: 0; }
.r-blurb { font-size: 17px; color: #e2d2c4; max-width: 32em; }
.r-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.r-sec { padding: clamp(48px, 7vw, 88px) 0; }
.r-sec + .r-sec { padding-top: 0; }
.r-sec h2 { font-size: clamp(26px, 3.2vw, 38px); margin-bottom: 10px; }
.r-sec .lead { color: var(--ink2); max-width: 46em; margin-bottom: 26px; font-size: 16.5px; }
.r-dims { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(20px, 4vw, 48px); padding: clamp(20px, 3.4vw, 40px); align-items: center; }
.r-radar { max-width: 400px; width: 100%; margin: 0 auto; }
.r-flow { padding: clamp(14px, 2vw, 22px); }
.flow-ctl { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 4px 6px 14px; }
.flow-ctl input[type=range] { flex: 1; min-width: 160px; accent-color: var(--apricot); }
.flow-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); padding: 12px 6px 4px; }
.flow-legend span { display: inline-flex; align-items: center; gap: 6px; }
.flow-legend i { width: 22px; height: 0; border-top: 3px solid var(--ink2); }
.flow-legend i.dash { border-top-style: dashed; }
.flow-legend i.ring { width: 11px; height: 11px; border: 2.5px solid var(--ink2); border-radius: 50%; }
.r-day-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.r-day-chips button { border: 0; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; min-height: 42px; border-radius: 999px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line2); font-size: 14px; }
.r-day-chips button[aria-current=true] { background: var(--ink); color: #fff; box-shadow: none; }
.r-ins { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-bottom: 18px; }
.r-ins li { list-style: none; padding: 22px; }
.r-ins b { display: block; font-size: 17px; margin-bottom: 6px; }
.r-ins p { color: var(--ink2); font-size: 15px; }
.r-ins { padding: 0; }
.r-tips { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.r-tip { padding: 20px 22px; border-top: 4px solid var(--c); border-radius: 18px; }
.r-tip h3 { font-size: 16.5px; display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.r-tip h3 small { font-size: 13px; color: var(--c); font-weight: 800; }
.r-tip .t { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.r-tip ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.r-tip li { position: relative; padding-left: 16px; font-size: 14.5px; color: var(--ink2); }
.r-tip li::before { content: ""; position: absolute; left: 0; top: .68em; width: 6px; height: 6px; background: var(--c); }
.r-notes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.r-notes .card { padding: 22px; font-size: 14.5px; color: var(--ink2); }
.r-notes h3 { font-size: 16px; color: var(--ink); margin-bottom: 8px; }
.r-notes ul { margin: 8px 0 0; padding-left: 18px; }
.r-end { background: var(--night); color: var(--night-ink); text-align: center; padding: clamp(48px, 7vw, 80px) 0; }
.r-end h2 { font-size: clamp(26px, 3.4vw, 38px); }
.r-end p { color: var(--night-muted); margin: 10px 0 24px; }
.r-end .btns { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }

@media (max-width: 900px) {
  .qcard { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .q-art { padding: 14px 0 12px; }
  .q-art canvas { max-width: 190px; }
  .qkeys { display: none; }
  .qnav { justify-content: space-between; }
  .r-hero-in, .r-dims, .r-cert, .r-notes { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .progress-steps li { font-size: 0; padding: 4px; gap: 0; }
  .progress-steps li.on { font-size: 13px; padding: 4px 10px 4px 6px; gap: 6px; }
  .brand b { display: none; }
}

/* =====================================================================
   温馨主题 · 测评流程
   ===================================================================== */
.top { box-shadow: 0 2px 0 var(--ol-s); }
.progress-steps li.on { box-shadow: 0 0 0 2px var(--ol); }
.progress-steps li.on::before { box-shadow: 0 0 0 2px var(--ol); }

/* 激活：小猫坐在卡片上沿 */
.v-activate { background: transparent; padding-top: 120px; }
.act-card { position: relative; overflow: visible; padding-top: 40px; }
.act-card #actCat { position: absolute; top: -114px; left: 50%; transform: translateX(-50%); width: 180px; height: 120px; margin: 0; }
.act-card::before { content: ""; position: absolute; top: -14px; left: 50%; width: 120px; height: 12px; margin-left: -60px; border-radius: 50%; background: radial-gradient(closest-side, rgba(58, 37, 48, .18), transparent); }
.key-box input { border: 0; box-shadow: inset 0 0 0 2.5px var(--ol), inset 0 4px 0 rgba(58, 37, 48, .08); background: #fffaf2; border-radius: 14px; }
.key-box input:focus { box-shadow: inset 0 0 0 2.5px var(--apricot), 0 0 0 5px rgba(239, 138, 85, .2); }
.key-box.valid input { box-shadow: inset 0 0 0 2.5px var(--sage); }
.key-box.bad input { box-shadow: inset 0 0 0 2.5px #d9654a; }
.act-facts li { background: #fbf1e2; box-shadow: inset 0 0 0 2px var(--ol-s); }
.act-facts b::before { content: ""; display: inline-block; width: 14px; height: 11px; margin-right: 6px; background: var(--i-paw-o) center / contain no-repeat; vertical-align: -1px; }

/* 建档 */
.pf-name input { border: 0; box-shadow: inset 0 0 0 2.5px var(--ol-s); background: #fffaf2; }
.pf-name input:focus { box-shadow: inset 0 0 0 2.5px var(--apricot); }
.pf-opts button { box-shadow: inset 0 0 0 2px var(--ol-s); }
.pf-opts button[aria-checked=true] { background: var(--ol); box-shadow: 0 3px 0 rgba(0, 0, 0, .2); }

/* ---------- 答题：小剧场 ---------- */
.v-quiz { background: transparent; padding-top: 22px; }
.quiz-wrap { max-width: 1180px; }
.qbar { margin-bottom: 16px; }
.qbar-top { margin-bottom: 10px; gap: 14px; }
.q-chapter { font-weight: 900; color: var(--ol); font-size: 15px; display: inline-flex; align-items: center; gap: 8px; }
.q-chapter::before { content: ""; width: 18px; height: 15px; background: var(--i-paw-o) center / contain no-repeat; transform: rotate(-14deg); }
.q-count { font: 800 14px var(--mono); color: var(--muted); }
.qpaws { display: flex; flex-wrap: wrap; gap: 3px 4px; align-items: center; }
.qpaws button { width: 20px; height: 16px; padding: 0; border: 0; background: #e3cfb6; -webkit-mask: var(--i-paw) center / contain no-repeat; mask: var(--i-paw) center / contain no-repeat; transform: rotate(90deg); transition: background .2s, transform .2s; }
.qpaws button:nth-child(odd) { transform: rotate(90deg) translateX(-3px); }
.qpaws button.done { background: var(--apricot); }
.qpaws button.cur { background: var(--ol); transform: rotate(90deg) scale(1.3); animation: pawCur 1s ease-in-out infinite; }
.qpaws button.act { margin-left: 12px; }
@keyframes pawCur { 50% { transform: rotate(90deg) scale(1.3) translateX(-2px); } }
.qcard { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); min-height: 0; align-items: stretch; }
.q-theater { background: #22171d; padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 14px; }
.q-stage { position: relative; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; margin: 8px; box-shadow: 0 0 0 3px var(--ol), 0 0 0 9px var(--wood-d), 0 0 0 11px #2a1a20; background: #2a1f22; }
.q-stage canvas { width: 100%; height: 100%; display: block; }
.q-name { position: absolute; left: 10px; top: 10px; font-size: 12.5px; font-weight: 800; background: rgba(255, 250, 240, .92); padding: 3px 10px; border-radius: 999px; box-shadow: 0 0 0 2px var(--ol); }
.q-tip { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); white-space: nowrap; font-size: 12.5px; color: #fff8ec; background: rgba(30, 20, 24, .6); padding: 4px 12px; border-radius: 999px; transition: opacity .5s; pointer-events: none; }
.q-tip.off { opacity: 0; }
.q-cap { position: relative; min-height: 3.4em; margin: 0 2px; padding: 14px 16px 14px 44px; border-radius: 8px; background: #2d1f26; color: #fbf1e2; font-size: 15.5px; line-height: 1.65; box-shadow: inset 0 0 0 2px #f2dcb8, inset 0 0 0 4px var(--ol); }
.q-cap::before { content: ""; position: absolute; left: 16px; top: 18px; width: 18px; height: 15px; background: var(--i-paw-g) center / contain no-repeat; }
.q-body { padding: clamp(22px, 3vw, 34px); }
.q-k { color: var(--apricot-d); font: 800 13px var(--mono); letter-spacing: .06em; }
.q-text { font-size: clamp(20px, 2.1vw, 25px); }
.q-opt { box-shadow: inset 0 0 0 2px var(--ol-s); background: #fbf3e7; border-radius: 14px; position: relative; }
.q-opt:hover { background: #fff1e2; box-shadow: inset 0 0 0 2px var(--apricot); transform: translateX(3px); }
.q-opt kbd { box-shadow: inset 0 0 0 2px var(--ol-s); }
.q-opt[aria-checked=true] { background: var(--ol); color: #fff4e4; box-shadow: 0 4px 0 rgba(58, 37, 48, .25); }
.q-opt[aria-checked=true] kbd { background: var(--apricot); }
.q-opt[aria-checked=true]::after { content: ""; position: absolute; right: 14px; top: 50%; width: 20px; height: 16px; margin-top: -8px; background: var(--i-paw-g) center / contain no-repeat; transform: rotate(-14deg); }
.q-opt.picked { animation: picked .45s cubic-bezier(.2, .9, .3, 1.4); }
@keyframes picked { 40% { transform: scale(1.03); } }
.qnav .btn-ghost::before { content: ""; width: 15px; height: 12px; background: var(--i-paw) center / contain no-repeat; transform: rotate(-90deg); }

/* 幕间休息 */
.q-break { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 18px; background: rgba(27, 19, 23, .55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fadeIn .25s; }
@keyframes fadeIn { from { opacity: 0; } }
.qb-card { position: relative; width: min(470px, 100%); padding: 30px 28px 26px; text-align: center; display: grid; justify-items: center; gap: 6px; animation: pop .45s cubic-bezier(.2, .9, .3, 1.25); }
.qb-card canvas { width: 200px; height: 125px; }
.qb-card h2 { font-size: 22px; }
.qb-prog { color: var(--muted); font-size: 14px; }
.qb-stamp { position: absolute; right: 18px; top: 18px; padding: 8px 10px; font-weight: 900; font-size: 14px; color: #c8523a; border: 3px double #c8523a; border-radius: 10px; transform: rotate(10deg); letter-spacing: .1em; animation: stamp .5s cubic-bezier(.2, .9, .3, 1.4) .15s both; }
@keyframes stamp { from { transform: rotate(10deg) scale(2.2); opacity: 0; } }
.qb-fact { position: relative; margin: 14px 0 16px; padding: 18px 18px 16px; background: #fff4c8; border-radius: 4px; text-align: left; font-size: 14.5px; color: #5e4a2a; box-shadow: 0 6px 14px -8px rgba(60, 30, 20, .4); transform: rotate(-1deg); }
.qb-fact::before { content: ""; position: absolute; top: -9px; left: 50%; width: 76px; height: 18px; margin-left: -38px; background: repeating-linear-gradient(45deg, rgba(143, 207, 184, .7) 0 6px, rgba(220, 240, 230, .8) 6px 12px); transform: rotate(2deg); }
.qb-fact b { display: block; color: var(--ol); margin-bottom: 4px; }

/* 分析中 */
.v-analyze { background: linear-gradient(180deg, #1b1317, #2f2128); }

@media (max-width: 900px) {
  .qcard { grid-template-columns: minmax(0, 1fr); }
  .q-theater { padding: 12px 12px 12px; }
  .q-stage { margin: 6px; }
  .q-cap { font-size: 14.5px; }
  .qpaws button { width: 14px; height: 11px; }
  .qpaws button.act { margin-left: 6px; }
  .q-tip { display: none; }
  /* 手机上小剧场吸顶：往下看选项时，小猫的反应一直在眼前 */
  .qcard { overflow: clip; }
  .q-theater { position: sticky; top: 58px; z-index: 3; box-shadow: 0 10px 18px -12px rgba(0, 0, 0, .5); }
  .q-cap { min-height: 0; padding: 10px 12px 10px 38px; }
  .q-cap::before { left: 12px; top: 13px; }
}

/* ---------- 报告：选择的力量（玻璃罐） ---------- */
.r-flow { padding: 18px 18px 10px; background: #fffaf2 var(--i-wall); background-size: 64px 64px; }
.flow-ctl .btn-small { padding: 9px 14px; }
.flow-legend i { border: 0; width: 14px; height: 14px; border-radius: 50%; }
.flow-legend i.c-up { background: radial-gradient(circle, #fff4dc 0 25%, #ef8a55 45%, rgba(239, 138, 85, .2) 75%); }
.flow-legend i.c-down { background: radial-gradient(circle, #fffaf2 0 30%, #6aa2c9 40%, rgba(106, 162, 201, .2) 75%); }
.flow-legend i.c-skip { background: radial-gradient(circle, #e6ddd5 0 30%, #b9aa9e 45%, rgba(185, 170, 158, .2) 75%); }
.flow-tip { background: var(--ol); box-shadow: 0 0 0 2px #f2dcb8, 0 16px 30px -10px rgba(0, 0, 0, .45); }
.flow-tip em.up { color: #ffb37f; font-style: normal; font-weight: 800; }
.flow-tip em.down { color: #9fd0ea; font-style: normal; font-weight: 800; }

/* ---------- 报告：相处指南 ---------- */
.g-key { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin: 8px 0 18px; }
.g-k { position: relative; padding: 26px 24px 24px; overflow: hidden; }
.g-k::before { content: ""; position: absolute; inset: 0 0 auto; height: 8px; background: var(--c); }
.g-no { position: absolute; right: 18px; top: 14px; font: 900 44px/1 var(--mono); color: var(--c); opacity: .2; }
.g-k canvas { width: 72px; height: 58px; display: block; margin-bottom: 8px; }
.g-k h3 { font-size: 20px; margin-bottom: 8px; letter-spacing: -.01em; }
.g-k p { font-size: 15px; color: var(--ink2); line-height: 1.75; }
.g-k p b { display: block; color: var(--ink); font-weight: 800; margin-bottom: 4px; background: linear-gradient(transparent 62%, color-mix(in srgb, var(--c) 30%, transparent) 62%); display: inline; }
.g-notes { display: flex; gap: 16px; flex-wrap: wrap; margin: 6px 0 22px; }
.g-note { position: relative; flex: 1 1 240px; max-width: 380px; padding: 18px 18px 16px; background: #fff4c8; color: #5e4a2a; font-size: 14px; line-height: 1.7; border-radius: 3px; box-shadow: 0 8px 16px -10px rgba(60, 30, 20, .45); transform: rotate(-.8deg); }
.g-note:nth-child(even) { transform: rotate(.9deg); background: #e4f3ea; }
.g-note::before { content: ""; position: absolute; top: -9px; left: 22px; width: 64px; height: 18px; background: repeating-linear-gradient(45deg, rgba(239, 138, 85, .5) 0 6px, rgba(255, 207, 150, .6) 6px 12px); transform: rotate(-3deg); }
.g-note b { display: block; color: var(--ol); margin-bottom: 4px; }
.g-book { padding: 0; overflow: hidden; }
.g-tabs { display: flex; gap: 6px; padding: 14px 14px 0; background: #f3e6d3; box-shadow: inset 0 -2.5px 0 var(--ol); overflow-x: auto; }
.g-tabs button { flex: 1 0 auto; min-width: 104px; display: grid; gap: 1px; justify-items: center; padding: 10px 12px 9px; border: 0; border-radius: 12px 12px 0 0; background: rgba(255, 250, 242, .55); box-shadow: inset 0 3px 0 var(--c); font-size: 15px; color: var(--ink2); transition: background .2s, transform .2s; }
.g-tabs button small { font-size: 12px; color: var(--c); font-weight: 800; }
.g-tabs button:hover { background: rgba(255, 250, 242, .85); transform: translateY(-2px); }
.g-tabs button[aria-selected=true] { background: var(--paper); color: var(--ink); box-shadow: inset 0 5px 0 var(--c), inset 2.5px 0 0 var(--ol), inset -2.5px 0 0 var(--ol), inset 0 2.5px 0 var(--ol); position: relative; z-index: 1; margin-bottom: -2.5px; padding-bottom: 11.5px; }
.g-page { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(20px, 3vw, 44px); padding: clamp(22px, 3vw, 36px); animation: gFlip .4s ease; }
@keyframes gFlip { from { opacity: 0; transform: translateX(10px); } }
.g-side { display: grid; justify-items: center; gap: 10px; align-content: start; text-align: center; }
.g-side canvas { width: 144px; height: 116px; }
.g-lv { font-weight: 900; color: #fff; background: var(--c); padding: 4px 14px; border-radius: 999px; box-shadow: 0 0 0 2px var(--ol); }
.g-meter { position: relative; width: 34px; height: 120px; border-radius: 17px; background: #f1e4d2; box-shadow: inset 0 0 0 2.5px var(--ol); overflow: hidden; }
.g-meter i { position: absolute; left: 0; right: 0; bottom: 0; background: var(--c); opacity: .85; transition: height .6s; }
.g-meter span { position: absolute; inset: auto 0 6px; font: 800 12px var(--mono); color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, .3); }
.g-what { font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.g-kick { font-weight: 800; color: var(--c); font-size: 13.5px; letter-spacing: .04em; }
.g-main h3 { font-size: clamp(22px, 2.4vw, 28px); margin: 4px 0 14px; letter-spacing: -.01em; }
.g-main blockquote { margin: 0 0 22px; padding: 14px 18px 14px 22px; border-left: 4px solid var(--c); background: color-mix(in srgb, var(--c) 9%, #fffaf2); border-radius: 0 12px 12px 0; font-family: var(--serif, "Songti SC", "STSong", serif); font-size: 16.5px; line-height: 1.8; color: var(--ink); }
.g-list { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 10px; }
.g-list label { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; align-items: start; padding: 14px 16px; border-radius: 14px; background: #fbf3e7; box-shadow: inset 0 0 0 2px var(--ol-s); cursor: var(--cur-paw); transition: background .2s, box-shadow .2s; font-size: 15px; line-height: 1.7; color: var(--ink2); }
.g-list label:hover { box-shadow: inset 0 0 0 2px var(--c); }
.g-list b { color: var(--ink); font-weight: 800; }
.g-list input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.g-list label i { width: 24px; height: 24px; margin-top: 1px; border-radius: 8px; background: #fff; box-shadow: inset 0 0 0 2.5px var(--ol); transition: background .2s; }
.g-list input:checked + i { background: var(--c) var(--i-check) center / 14px no-repeat; animation: picked .4s cubic-bezier(.2, .9, .3, 1.4); }
.g-list input:checked ~ span { color: var(--muted); }
.g-list input:checked ~ span b { text-decoration: line-through; text-decoration-color: var(--c); text-decoration-thickness: 2px; }
.g-list input:focus-visible + i { outline: 3px solid var(--c); outline-offset: 2px; }
.g-prog { display: flex; align-items: center; gap: 12px; font-size: 13.5px; color: var(--muted); font-weight: 700; }
.g-bar { flex: 0 1 220px; height: 10px; border-radius: 5px; background: #f1e4d2; box-shadow: inset 0 0 0 2px var(--ol-s); overflow: hidden; }
.g-bar i { display: block; height: 100%; background: var(--c); transition: width .4s; }
.r-hero .lights { --lt: 0px; }
@media (max-width: 760px) {
  .g-page { grid-template-columns: minmax(0, 1fr); }
  .g-side { grid-template-columns: auto auto 1fr; justify-items: start; align-items: center; text-align: left; }
  .g-side canvas { width: 96px; height: 78px; }
  .g-meter { display: none; }
  .g-what { grid-column: 1 / -1; }
  .g-tabs button { min-width: 84px; }
}

/* ---------- 四幕进度：每一幕一种颜色的猫爪 ---------- */
.qpaws { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.qact { display: grid; gap: 6px; padding: 8px 10px 9px; border-radius: 12px; background: rgba(255, 250, 242, .6); box-shadow: inset 0 0 0 2px var(--ol-s); transition: background .3s, box-shadow .3s; }
.qact.on { background: #fffaf2; box-shadow: inset 0 0 0 2.5px var(--ac), 0 4px 0 rgba(58, 37, 48, .08); }
.qact-name { font-size: 12.5px; color: var(--muted); display: flex; gap: 6px; align-items: baseline; white-space: nowrap; overflow: hidden; }
.qact-name b { color: var(--ac); font-weight: 900; }
.qact.on .qact-name { color: var(--ink); }
.qact-paws { display: flex; gap: 2px 3px; flex-wrap: wrap; }
.qact .qact-paws button { width: 18px; height: 14px; background: color-mix(in srgb, var(--ac) 25%, #eadccb); transform: rotate(90deg); }
.qact .qact-paws button:nth-child(odd) { transform: rotate(90deg) translateX(-3px); }
.qact .qact-paws button.done { background: var(--ac); }
.qact .qact-paws button.cur { background: var(--ol); transform: rotate(90deg) scale(1.3); }
.q-chapter i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.q-chapter::before { display: none; }
.q-stage canvas { cursor: var(--cur-paw); }
.qb-card { --ac: var(--apricot); border-top: 8px solid var(--ac); }
.qb-kick { font-weight: 900; color: var(--ac); letter-spacing: .08em; font-size: 14px; margin-top: 4px; }
.qb-card h2 { font-size: 30px; letter-spacing: .04em; }
.qb-desc { color: var(--ink2); font-size: 15px; }
.qb-prog { margin-top: 4px; }
.qb-fact[hidden] { display: none; }
.qb-stamp { color: var(--ac); border-color: var(--ac); filter: saturate(1.2) brightness(.85); }
@media (max-width: 900px) {
  .qpaws { gap: 5px; }
  .qact { padding: 6px 6px 7px; }
  .qact-name { font-size: 11.5px; }
  .qact:not(.on) .qact-name span, .qact:not(.on) .qact-name { font-size: 0; }
  .qact:not(.on) .qact-name b { font-size: 11.5px; }
  .qact .qact-paws button { width: 12px; height: 10px; }
}


/* ---------- 报告页头：性格卡 + 称号 ---------- */
.r-cardwrap { display: grid; justify-items: center; color: var(--night-muted); }
.r-cardwrap .mcard { width: min(360px, 80vw); }
.r-rar { font-weight: 800; letter-spacing: .12em; color: #ffcf96; font-size: 15px; margin-top: 6px; }
.r-rar span { color: #ffd36b; margin-right: 8px; letter-spacing: 2px; }
.r-rar[data-tier=rare] span { color: #dfe8f5; }
.r-type { margin: 4px 0 8px; }
.r-flavor { font-family: var(--serif); font-size: 19px; color: #f2dcc4; margin-bottom: 14px; }
.r-blurb b { display: block; color: #ffcf96; font-size: 15px; margin-bottom: 4px; }
/* 认证书与性格卡导出 */
.r-cert { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.r-certbox { padding: 14px; display: grid; gap: 12px; }
.cert-live { width: 100%; aspect-ratio: 2000 / 1414; }
.cert-cv { width: 100%; height: 100%; display: block; border-radius: 6px; box-shadow: 0 10px 24px -14px rgba(60, 30, 20, .5); }
.r-cardexp { padding: 22px; display: grid; gap: 10px; background: #2a1c22; color: #f6ecd8; }
.r-cardexp-k { color: #ffcf96; font-weight: 800; letter-spacing: .08em; font-size: 13px; }
.r-cardexp h3 { font-family: var(--serif); font-size: 28px; color: #fff; }
.r-cardexp ul { list-style: none; padding: 0; margin: 4px 0; display: grid; gap: 8px; font-size: 13.5px; color: #d9c8b4; }
.r-cardexp li b { display: block; color: #fff4e4; font-size: 14.5px; }
.r-cardexp .btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.r-cardexp .btn-ghost { --bg: rgba(255, 240, 220, .06); color: #f6ecd8; box-shadow: 0 0 0 2px rgba(255, 207, 150, .5), 0 4px 0 2px rgba(0, 0, 0, .4); }
.r-cardmsg { font-size: 12.5px; color: #d9c8b4; min-height: 1.2em; }
@media (max-width: 900px) { .r-cert { grid-template-columns: minmax(0, 1fr); } }

/* ---------- 顶栏「我的猫」 ---------- */
.top-link { font-weight: 800; font-size: 14px; color: var(--ink2); padding: 8px 10px; border-radius: 10px; margin-left: auto; margin-right: 6px; }
.top-link:hover { background: rgba(58, 37, 48, .06); }

/* ---------- 建档：关联之前测过的猫、出生年月 ---------- */
.pf-link { padding: 18px 20px; margin-bottom: 18px; display: grid; gap: 12px; }
.pf-link[hidden] { display: none; }
.pf-link-list { display: flex; gap: 10px; flex-wrap: wrap; }
.pf-link-list button { display: grid; justify-items: center; gap: 2px; min-width: 96px; padding: 10px 12px 8px; border: 0; border-radius: 14px; background: #fbf3e7; box-shadow: inset 0 0 0 2px var(--ol-s); font-weight: 800; font-size: 14px; color: var(--ink); }
.pf-link-list button small { font-weight: 600; font-size: 11.5px; color: var(--muted); }
.pf-link-list button canvas { width: 72px; height: 58px; }
.pf-link-list button[aria-checked=true] { background: #fff1e2; box-shadow: inset 0 0 0 2.5px var(--apricot), 0 4px 0 rgba(58, 37, 48, .1); }
.pf-new { display: grid; place-items: center; width: 72px; height: 58px; font-size: 30px; color: var(--apricot); }
.pf-link-key { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pf-link-key input { flex: 1 1 240px; padding: 10px 12px; border: 0; border-radius: 12px; background: #fffaf2; box-shadow: inset 0 0 0 2px var(--ol-s); font: 600 14px var(--mono); }
.pf-link-msg { font-size: 13px; color: var(--muted); }
.pf-birth { display: grid; gap: 8px; margin: 4px 0 18px; }
.pf-birth label { font-weight: 800; }
.pf-birth small { font-weight: 500; color: var(--muted); }
.pf-birth input { width: min(260px, 100%); padding: 10px 12px; border: 0; border-radius: 12px; background: #fffaf2; box-shadow: inset 0 0 0 2.5px var(--ol-s); font: 600 15px var(--sans, inherit); }

/* ---------- 我的猫 ---------- */
.v-mine { padding: 40px 0 80px; }
.mine h1 { font-size: clamp(30px, 4vw, 44px); margin: 6px 0 8px; }
.mine-lead { color: var(--ink2); max-width: 40em; margin-bottom: 20px; }
.mine-find { padding: 18px 20px; display: grid; gap: 10px; margin-bottom: 24px; max-width: 640px; }
.mine-find label { font-weight: 800; }
.mine-row { display: flex; gap: 10px; flex-wrap: wrap; }
.mine-row input { flex: 1 1 240px; padding: 11px 14px; border: 0; border-radius: 12px; background: #fffaf2; box-shadow: inset 0 0 0 2.5px var(--ol-s); font: 700 15px var(--mono); letter-spacing: .04em; }
.mine-err { font-size: 13px; color: #b4652f; min-height: 1.2em; }
.mine-cat { padding: clamp(18px, 3vw, 28px); display: grid; gap: 18px; margin-bottom: 22px; }
.mine-h { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; }
.mine-h canvas { width: 108px; height: 87px; }
.mine-h h2 { font-size: 26px; }
.mine-h p { color: var(--muted); font-size: 14px; }
.mine-title { display: grid; justify-items: end; font-family: var(--serif); font-size: 24px; font-weight: 900; color: var(--ol); }
.mine-title small { font-family: var(--sans, inherit); font-size: 12px; font-weight: 800; color: #b07a2a; letter-spacing: .06em; }
.mine-journey { list-style: none; padding: 0; margin: 0; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.mine-journey li { display: grid; padding: 8px 14px; border-radius: 12px; background: #fbf3e7; box-shadow: inset 0 0 0 2px var(--ol-s); }
.mine-journey li + li::before { content: "→"; position: absolute; margin: 10px 0 0 -24px; color: var(--muted); }
.mine-journey li { position: relative; margin-left: 14px; }
.mine-journey li:first-child { margin-left: 0; }
.mine-journey small { color: var(--muted); font-size: 11.5px; }
.mine-journey b { font-family: var(--serif); font-size: 17px; }
.mine-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.mine-grid h3 { font-size: 14px; color: var(--ink2); margin-bottom: 6px; display: flex; gap: 6px; align-items: center; }
.mine-grid h3 i { width: 18px; height: 0; display: inline-block; border-top: 3px dashed #9d8ad0; }
.mine-grid h3 i.l2 { border-top: 3px solid #ef8a55; }
.mine-chart, .mine-radar { padding: 14px; border-radius: 14px; background: #fffdf8; box-shadow: inset 0 0 0 2px var(--ol-s); }
.mine-changes { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
.mine-changes li { padding: 10px 12px; border-radius: 12px; background: #fbf3e7; font-size: 13.5px; color: var(--ink2); border-left: 4px solid var(--c); }
.mine-changes li b { display: block; color: var(--ink); }
.mine-changes li.big { background: color-mix(in srgb, var(--c) 12%, #fffaf2); font-weight: 700; }
.mine-note { font-size: 13px; color: var(--muted); }
.mine-note b { color: #b4652f; display: block; margin-top: 4px; }
.mine-once { padding: 12px 14px; border-radius: 12px; background: #fff4c8; color: #5e4a2a; font-size: 14px; }
.mine-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.mine-list li { display: grid; grid-template-columns: 110px 190px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 10px; font-size: 13.5px; }
.mine-list li:nth-child(odd) { background: rgba(58, 37, 48, .035); }
.mine-list .mono { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.mine-empty { padding: 34px; display: grid; justify-items: center; gap: 10px; text-align: center; }
.mine-empty canvas { width: 144px; height: 116px; }
@media (max-width: 760px) {
  .mine-h { grid-template-columns: auto minmax(0, 1fr); }
  .mine-title { grid-column: 1 / -1; justify-items: start; }
  .mine-grid { grid-template-columns: minmax(0, 1fr); }
  .mine-list li { grid-template-columns: 1fr auto; }
  .mine-list li .mono, .mine-list li span:nth-child(3) { grid-column: 1 / -1; }
  .top-link { padding: 6px; font-size: 13px; }
}
/* 返回按钮 */
.top-back { display: inline-flex; align-items: center; gap: 2px; height: 36px; padding: 0 12px 0 8px; margin-right: -6px; border: 0; border-radius: 999px; background: rgba(58, 37, 48, .06); color: var(--ink2); font: 800 14px var(--sans); cursor: pointer; white-space: nowrap; flex: none; }
.top-back:hover { background: rgba(58, 37, 48, .12); color: var(--ink); }
.top-back i { font-style: normal; font-size: 22px; line-height: 1; margin-top: -3px; }
.top-back[hidden] { display: none; }
@media (max-width: 400px) { .top-back b { display: none; } .top-back { padding: 0 10px; } }
/* 手机顶栏：进度、我的猫、换个密钥挤在一行时不换行 */
@media (max-width: 760px) {
  .top-in { gap: 8px; }
  .progress-steps li.on, .top-link, #exitBtn { white-space: nowrap; }
  .progress-steps { min-width: 0; }
  .progress-steps li::before { flex: none; }
}
@media (max-width: 400px) {
  .top.light .brand b { display: none; }
  #exitBtn { padding-left: 12px; padding-right: 12px; }
}
.r-rar .rar-q { display: inline-block; margin-left: 12px; padding: 2px 10px; border-radius: 999px; font: 600 12px/1.6 var(--sans); letter-spacing: 0; font-style: normal; color: var(--night-muted); background: rgba(255, 240, 220, .07); vertical-align: 2px; }
@media (max-width: 760px) { .r-rar .rar-q { display: block; width: fit-content; margin: 6px 0 0; } }

/* ---------- 手机端细节 ---------- */
@media (max-width: 760px) {
  /* iOS 上输入框字号小于 16px 会自动放大页面，统一 16px 起 */
  .key-box input { font-size: 17px; letter-spacing: .02em; padding-left: 14px; padding-right: 44px; }
  .key-box input::placeholder { letter-spacing: 0; }
  .pf-birth input, #pfLinkInput, #mineKey { font-size: 16px; }
  .g-cnt { white-space: nowrap; }
  .act-foot a { display: inline-block; padding: 8px 2px; }
}
@media (max-width: 400px) {
  /* 顶栏太挤：只留返回、当前这一步和右边的按钮 */
  .top.light .brand { display: none; }
  .progress-steps li:not(.on) { display: none; }
  .progress-steps li.on { font-size: 13px; }
}
