/* 数学练习 — 在 english.css 儿童风基础上的补充 */
:root { --bg1: #F3EFFF; --bg2: #E3F0FF; --purple: #9B7BFF; --purple-d: #7355E0; }
.btn--purple { background: var(--purple); box-shadow: 0 5px 0 var(--purple-d); }
.btn--purple:active:not(:disabled) { box-shadow: 0 1px 0 var(--purple-d); }

/* 出题设置 */
.setup { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.setup__row { display: flex; flex-direction: column; gap: 8px; }
.setup__label { font-size: 15px; color: var(--ink2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 0; border-radius: 999px; padding: 10px 18px; font-size: 18px; background: #F3F0FA; color: var(--ink2); box-shadow: inset 0 0 0 2px #E4DFF2; }
.chip.active { background: var(--purple); color: #fff; box-shadow: 0 4px 0 var(--purple-d); }
.chip--type.active { background: var(--blue); box-shadow: 0 4px 0 var(--blue-d); }
.chip--diff.active { background: var(--orange); box-shadow: 0 4px 0 var(--orange-d); }
.chip:disabled { opacity: .35; }

/* 试卷 */
.paper-head { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; color: var(--ink2); font-size: 15px; margin: 4px 0 12px; }
.paper-head b { color: var(--ink); }
.qs { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .qs { grid-template-columns: 1fr 1fr; } }
.q { background: #fff; border-radius: 22px; box-shadow: var(--shadow); padding: 14px 16px; display: grid; grid-template-columns: 34px 1fr; gap: 6px 12px; align-items: center; border-left: 8px solid var(--c); }
.q__no { width: 30px; height: 30px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 15px; grid-row: 1 / 3; }
.q__text { font-size: clamp(24px, 3.4vw, 32px); font-weight: 700; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.q__type { font-size: 12px; color: var(--ink2); }
.q__ans { display: flex; gap: 8px; align-items: center; grid-column: 2; flex-wrap: wrap; }
.q__input { width: 150px; max-width: 100%; font: inherit; font-size: 26px; font-weight: 700; padding: 8px 12px; border: 3px solid #E4DFF2; border-radius: 14px; background: #FBFAFF; text-align: center; color: var(--ink); }
.q__input:focus { outline: 0; border-color: var(--purple); }
.q__opt { border: 0; border-radius: 14px; width: 62px; height: 52px; font-size: 26px; font-weight: 800; background: #F3F0FA; box-shadow: 0 4px 0 #E4DFF2; color: var(--ink); }
.q__opt.active { background: var(--purple); color: #fff; box-shadow: 0 4px 0 var(--purple-d); }
.q__ok { border: 0; border-radius: 999px; padding: 10px 16px; font-size: 16px; font-weight: 800; color: #fff; background: var(--green); box-shadow: 0 4px 0 var(--green-d); }
.q__ok:disabled { opacity: .4; }
.q.is-locked { background: #F6FFF9; }
.q.is-locked .q__input { border-color: #BFE9D2; background: #fff; }
.q__lock { font-size: 14px; color: var(--green-d); }
.q__edit { border: 0; background: none; color: var(--blue-d); font-size: 14px; padding: 4px; }
.q.is-right { border-left-color: var(--green); }
.q.is-wrong { border-left-color: #F04444; background: #FFF4F4; }
.q__result { grid-column: 2; font-size: 16px; }
.q__result b { color: var(--green-d); }
.q.is-wrong .q__result b { color: #D12F2F; }
.paper-foot { position: sticky; bottom: calc(env(safe-area-inset-bottom, 0px) + 10px); margin-top: 18px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; background: rgba(255, 255, 255, .85); backdrop-filter: blur(8px); padding: 10px; border-radius: 999px; box-shadow: var(--shadow); }

/* 成绩 */
.score-big { font-size: clamp(64px, 12vw, 120px); font-weight: 800; line-height: 1; color: var(--purple); }
.score-big small { font-size: .35em; color: var(--ink2); }

/* 历史记录 */
.hist { display: flex; flex-direction: column; gap: 8px; }
.hist__date { font-size: 15px; color: var(--ink2); margin: 8px 4px 0; }
.hist__item { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; text-align: left; border: 0; border-radius: 18px; background: #fff; box-shadow: 0 3px 0 #EFE4D6; padding: 12px 16px; }
.hist__title { font-size: 17px; font-weight: 700; grid-column: 1; }
.hist__sub { font-size: 13px; color: var(--ink2); grid-column: 1; }
.hist__score { grid-column: 2; grid-row: 1 / 3; font-size: 26px; font-weight: 800; color: var(--purple); }
.hist__score.is-todo { font-size: 15px; color: var(--orange-d); }

/* 版本 / 题型数量步进 / 分节 */
.chip--edition.active { background: var(--green); box-shadow: 0 4px 0 var(--green-d); }
.setup__note { font-size: 14px; color: var(--ink2); background: #F6F3FF; border-radius: 12px; padding: 8px 12px; line-height: 1.5; }
.typerows { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.typerow { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #F7F5FC; border-radius: 16px; padding: 8px 8px 8px 14px; box-shadow: inset 0 0 0 2px #E8E3F5; }
.typerow.active { background: #EEF8FF; box-shadow: inset 0 0 0 2px #BCDDFF; }
.typerow__name { font-size: 18px; font-weight: 700; }
.stepper { display: flex; align-items: center; gap: 4px; }
.stepper__btn { width: 40px; height: 40px; border: 0; border-radius: 12px; background: #fff; box-shadow: 0 3px 0 #E4DFF2; font-size: 22px; font-weight: 800; color: var(--purple-d); }
.stepper__btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #E4DFF2; }
.stepper__val { min-width: 44px; text-align: center; font-size: 20px; font-weight: 800; color: var(--blue-d); }
.stepper__val.is-zero { font-size: 14px; color: var(--ink2); font-weight: 600; }
.qsec { margin-top: 14px; }
.qsec__title { margin: 0 4px 8px; font-size: 20px; color: var(--ink); }
.q--text .q__text { font-size: clamp(18px, 2.4vw, 22px); letter-spacing: 0; line-height: 1.5; font-weight: 600; }
.q__unit { font-size: 18px; color: var(--ink2); }
@media (min-width: 760px) { .q--text { grid-column: 1 / -1; } }

/* 删除试卷 */
.hist__row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: stretch; }
.hist__del { border: 0; border-radius: 16px; width: 52px; background: #fff; box-shadow: 0 3px 0 #EFE4D6; font-size: 20px; color: #B8A9C9; }
.hist__del:active { transform: translateY(2px); box-shadow: 0 1px 0 #EFE4D6; }
.hist__del:hover { color: #D12F2F; }
.btn--danger { color: #D12F2F; }

/* 奥数提升:解题思路 + 首页专题说明 */
.q__explain { grid-column: 1 / -1; margin-top: 8px; padding: 10px 12px; border-radius: 14px; background: #FFF8E6; color: #6B5A2E; font-size: 15px; line-height: 1.6; }
.q__explain b { color: #B7791F; }
.typerow__note { margin: -4px 4px 6px; font-size: 13px; line-height: 1.5; color: var(--ink2); }
