:root {
  --orange: #ff5a1f;
  --orange-dark: #ea4c14;
  --orange-soft: #fff4ef;
  --orange-pale: #fff8f5;
  --page: #f6f6f8;
  --text: #222;
  --regular: #555;
  --muted: #999;
  --line: #eeeeef;
  --green: #1fbf93;
  --red: #ed4967;
  font-family: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; background: #eef0f3; }
body, button, input { font: inherit; letter-spacing: 0; }
button { border: 0; background: transparent; color: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 2px solid #222; outline-offset: 2px; }
.demo-stage { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.phone { position: relative; width: min(390px, 100vw); height: min(844px, calc(100vh - 48px)); min-height: 680px; overflow: hidden; border: 1px solid #dddddf; border-radius: 28px; background: var(--page); box-shadow: 0 24px 72px rgb(25 30 38 / 18%); }
#app, .app-screen { width: 100%; height: 100%; }
.app-screen { position: relative; display: flex; flex-direction: column; overflow: hidden; background: var(--page); animation: screen-in 220ms ease-out; }
@keyframes screen-in { from { opacity: .7; transform: translateX(8px); } to { opacity: 1; transform: translateX(0); } }
.screen-scroll { min-height: 0; flex: 1; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.screen-scroll::-webkit-scrollbar { display: none; }
.status-bar { height: 30px; display: flex; align-items: center; justify-content: space-between; padding: 8px 18px 0; flex: 0 0 auto; background: #fff; font-size: 12px; }
.status-bar.light { background: transparent; color: #fff; }

/* 每日一练报告 */
.report-scroll { padding-bottom: 92px; }
.report-hero { height: 226px; background: var(--orange); color: #fff; }
.report-nav { height: 50px; display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; padding: 0 12px; }
.report-nav h1, .plain-nav h1 { margin: 0; text-align: center; font-size: 18px; font-weight: 600; }
.report-nav button { color: #fff; font-size: 14px; text-align: left; }
.report-slogan { margin: 28px 18px 0; font-size: 25px; font-weight: 600; }
.report-content { position: relative; margin-top: -48px; padding: 0 14px 24px; }
.report-card { margin-bottom: 12px; padding: 18px 16px; border-radius: 12px; background: #fff; }
.section-title { display: flex; align-items: center; gap: 9px; }
.section-title > span { width: 4px; height: 18px; border-radius: 3px; background: var(--orange); }
.section-title h2 { margin: 0; font-size: 17px; font-weight: 600; }
.accuracy { display: grid; justify-items: center; gap: 3px; padding: 24px 0 22px; }
.accuracy span { color: #aaa; font-size: 14px; }
.accuracy strong { color: var(--orange); font-size: 40px; line-height: 1.1; }
.metrics { display: grid; text-align: center; }
.metrics.four { grid-template-columns: repeat(4, 1fr); }
.metrics.three { grid-template-columns: repeat(3, 1fr); margin-top: 34px; }
.metrics > div { display: grid; gap: 5px; border-right: 1px solid #f0f0f1; }
.metrics > div:last-child { border-right: 0; }
.metrics strong { font-size: 24px; font-weight: 500; line-height: 1; }
.metrics strong small { margin-left: 2px; font-size: 11px; font-weight: 500; }
.metrics span { color: var(--muted); font-size: 12px; }
.metrics .right strong { color: var(--green); }
.metrics .wrong strong { color: var(--red); }
.metrics .muted strong { color: #aaa; }
.today-card { min-height: 268px; }
.cumulative-card { min-height: 172px; padding-top: 20px; }
.continue-card { min-height: 86px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; margin-bottom: 12px; padding: 11px 13px; border: 1px solid #ffd7c7; border-radius: 10px; background: var(--orange-pale); }
.continue-label { display: flex; align-items: center; margin-bottom: 3px; }
.continue-label span { color: var(--orange-dark); font-size: 11px; font-weight: 600; }
.continue-copy h2 { margin: 0 0 2px; font-size: 14px; line-height: 1.4; }
.continue-copy p { margin: 0; color: #8e7368; font-size: 11px; line-height: 1.4; }
.continue-button { min-width: 74px; height: 30px; padding: 0 10px; border-radius: 15px; background: var(--orange); color: #fff; font-size: 12px; font-weight: 600; }
.report-actions, .config-action { position: absolute; right: 0; bottom: 0; left: 0; z-index: 5; display: grid; grid-template-columns: 1fr 1.7fr; gap: 12px; padding: 12px 16px max(14px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgb(255 255 255 / 98%); }
.report-actions button, .config-action button { height: 46px; border-radius: 24px; font-size: 16px; }
.primary { background: var(--orange); color: #fff; font-weight: 600; }
.secondary { border: 1px solid #dedee1; background: #fff; }

/* 自主组题配置 */
.config-screen { background: #f7f7f8; }
.plain-nav { height: 52px; display: grid; grid-template-columns: 74px 1fr 74px; align-items: center; padding: 0 14px; border-bottom: 1px solid var(--line); background: #fff; }
.plain-nav button { padding: 0; font-size: 13px; text-align: left; }
.plain-nav button:last-child { text-align: right; }
.config-scroll { padding-bottom: 86px; }
.vip-strip { display: flex; align-items: center; justify-content: space-between; margin: 10px 12px; padding: 12px; border: 1px solid #f1dcc0; border-radius: 9px; background: #fffaf3; }
.vip-strip div { display: grid; gap: 3px; }
.vip-strip strong { color: #6f4a12; font-size: 14px; }
.vip-strip span { color: #9b7a48; font-size: 11px; }
.vip-strip button { padding: 7px 10px; border-radius: 5px; background: var(--orange); color: #fff; font-size: 11px; }
.config-card { margin: 0 12px; padding: 16px 12px 20px; border-radius: 10px; background: #fff; }
.field-label, .field-head strong { font-size: 14px; font-weight: 600; }
.field-label { display: block; margin-bottom: 8px; }
.config-card input { width: 100%; height: 42px; padding: 0 12px; border: 0; border-radius: 8px; background: #f7f7f9; color: var(--regular); font-size: 13px; }
.field-head { display: flex; align-items: center; justify-content: space-between; margin: 21px 0 10px; }
.field-head small { color: var(--muted); font-size: 11px; font-weight: 400; }
.field-head button { color: var(--orange); font-size: 11px; }
.chip-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.chip-grid.four-col { grid-template-columns: repeat(4, 1fr); }
.chip-grid.five-col { grid-template-columns: repeat(5, 1fr); gap: 5px; }
.chip { position: relative; min-width: 0; min-height: 34px; padding: 6px 4px; border: 1px solid transparent; border-radius: 5px; background: #f7f7f9; color: #555; font-size: 11px; }
.chip.selected { border-color: #efb89e; background: #fffaf7; color: var(--orange-dark); }
.chip.locked { color: #bbb; }
.chip small { position: absolute; top: 1px; right: 3px; color: #b99158; font-size: 7px; }
.config-action { grid-template-columns: 1fr; }

/* 权益与生成状态 */
.sheet-mask, .loading-mask { position: absolute; inset: 0; z-index: 20; display: flex; align-items: flex-end; background: rgb(0 0 0 / 42%); }
.vip-sheet { width: 100%; padding: 10px 20px max(18px, env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0; background: #fff; }
.sheet-handle { width: 38px; height: 4px; margin: 0 auto 16px; border-radius: 4px; background: #ddd; }
.vip-sheet h2 { margin: 0; text-align: center; font-size: 19px; }
.vip-sheet > p { margin: 9px 0 16px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.benefit-row { display: grid; gap: 5px; margin-bottom: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.benefit-row.vip { border-color: #ffc7b1; background: var(--orange-pale); }
.benefit-row span { color: var(--muted); font-size: 11px; }
.benefit-row strong { font-size: 13px; }
.vip-sheet > .primary { width: 100%; height: 44px; margin-top: 8px; border-radius: 22px; }
.sheet-cancel { width: 100%; height: 38px; color: var(--muted); font-size: 13px; }
.loading-mask { align-items: center; justify-content: center; }
.loading-card { width: 238px; display: grid; justify-items: center; gap: 9px; padding: 24px; border-radius: 12px; background: #fff; }
.spinner { width: 30px; height: 30px; border: 3px solid #ffe2d6; border-top-color: var(--orange); border-radius: 50%; animation: spin 800ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-card strong { font-size: 15px; }
.loading-card span { color: var(--muted); font-size: 11px; }

/* 题库作答 */
.quiz-screen { background: #fff; }
.quiz-nav { height: 52px; display: grid; grid-template-columns: 60px 1fr 60px; align-items: center; padding: 0 14px; border-bottom: 1px solid var(--line); }
.quiz-nav > button { padding: 0; font-size: 13px; text-align: left; }
.quiz-nav > button:last-child { text-align: right; }
.mode-tabs { height: 100%; display: flex; align-items: stretch; justify-content: center; gap: 26px; }
.mode-tabs button { position: relative; font-size: 15px; }
.mode-tabs .active { color: var(--orange); font-weight: 600; }
.mode-tabs .active::after { content: ""; position: absolute; right: 2px; bottom: 0; left: 2px; height: 2px; background: var(--orange); }
.quiz-scroll { padding-bottom: 74px; }
.quiz-progress { padding: 13px 14px 10px; }
.quiz-progress > div { display: flex; justify-content: space-between; align-items: center; }
.quiz-progress strong { font-size: 14px; }
.quiz-progress span { color: var(--muted); font-size: 12px; }
.quiz-progress i { height: 3px; display: block; margin-top: 10px; overflow: hidden; border-radius: 3px; background: #eee; }
.quiz-progress b { height: 100%; display: block; background: var(--orange); }
.question-card { padding: 10px 14px 30px; }
.question-type { display: inline-block; padding: 3px 7px; border-radius: 4px; background: var(--orange); color: #fff; font-size: 11px; }
.question-card h2 { margin: 13px 0 17px; font-size: 16px; font-weight: 500; line-height: 1.75; }
.options { display: grid; gap: 10px; }
.option { min-height: 58px; display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid #e6e6e8; border-radius: 8px; background: #fff; text-align: left; }
.option b { font-size: 16px; }
.option em { font-size: 14px; font-style: normal; }
.option span { font-size: 11px; font-weight: 600; }
.option.correct { border-color: #88ddc5; background: #effbf7; color: #139b79; }
.option.wrong { border-color: #f0a6b5; background: #fff3f5; color: #d83a5b; }
.answer-result { margin-top: 18px; padding-top: 16px; border-top: 8px solid #f6f6f8; }
.answer-result p { display: grid; grid-template-columns: auto 1fr auto 1fr; gap: 7px; align-items: center; margin: 0 0 18px; font-size: 12px; }
.answer-result p span { color: var(--muted); }
.answer-result .is-right { color: var(--green); }
.answer-result .is-wrong { color: var(--red); }
.answer-result h3 { margin: 0 0 8px; font-size: 15px; }
.answer-result div { color: var(--regular); font-size: 13px; line-height: 1.75; }
.quiz-tools { position: absolute; right: 0; bottom: 0; left: 0; z-index: 5; display: grid; grid-template-columns: repeat(3, 1fr); padding: 10px 28px max(12px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; }
.quiz-tools button { font-size: 12px; }
.toast { position: absolute; right: 50%; bottom: 82px; z-index: 40; max-width: 82%; padding: 9px 13px; border-radius: 6px; background: rgb(34 34 34 / 92%); color: #fff; font-size: 12px; opacity: 0; transform: translate(50%, 8px); pointer-events: none; transition: 180ms ease; }
.toast.show { opacity: 1; transform: translate(50%, 0); }

@media (max-width: 480px) {
  body { background: #fff; }
  .demo-stage { display: block; min-height: 100dvh; padding: 0; }
  .phone { width: 100vw; height: 100dvh; min-height: 0; border: 0; border-radius: 0; box-shadow: none; }
}
