/* 数学乐园：打开先看到今天这一关和开始按钮，其次才是选年级、知识地图和记录。逻辑都在 assets/math.js。 */
.math-shell.hub-shell { width: 100%; max-width: 1080px; margin: 0 auto; padding: 12px clamp(16px, 3vw, 32px) 28px; }
.math-topbar.hub-topbar { height: 56px; justify-content: flex-end; gap: 8px; padding: 0 clamp(16px, 3vw, 32px); background: transparent !important; border: 0 !important; position: static; }
.math-topbar .back-link, .math-topbar .math-brand { display: none !important; }
.top-score { background: #fffdf7 !important; border: 1px solid #e9e0cc !important; box-shadow: none !important; color: #2b2721 !important; }

/* 页头 */
.math-hero { display: block !important; min-height: 0 !important; margin: 0 0 12px !important; padding: 0 !important; background: transparent !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; overflow: visible !important; }
.math-hero .hero-copy { width: 100% !important; max-width: none !important; }
.math-hero .hero-kicker, .math-hero .hero-orbit { display: none !important; }
.math-hero h1 { margin: 0 !important; font-size: clamp(30px, 6vw, 40px) !important; line-height: 1.25 !important; }
.math-hero p { margin: 0 !important; font-size: 16px !important; }
.hero-progress { display: flex !important; align-items: center; gap: 10px; margin: 6px 0 0 !important; padding: 0 !important; background: transparent !important; border: 0 !important; color: #5f584a !important; }
.hero-progress strong { color: #2b2721 !important; }
.hero-progress i { flex: 1; height: 8px !important; border: 0 !important; border-radius: 4px; background: #e9e0cc !important; box-shadow: none !important; }
.hero-progress em { border-radius: 4px; background: #3e7c4a !important; box-shadow: none !important; }

/* 做题 / 实验室 */
.math-mode-nav { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px !important; margin: 0 0 14px !important; padding: 4px !important; border-radius: 999px; background: #f3ebd9 !important; }
.math-mode-nav button { display: flex !important; align-items: center; justify-content: center; min-height: 44px !important; padding: 0 8px !important; border: 0 !important; border-radius: 999px !important; background: transparent !important; color: #5f584a !important; box-shadow: none !important; transform: none !important; }
.math-mode-nav button > span:first-child, .math-mode-nav button small { display: none !important; }
.math-mode-nav button b { font-size: 16px !important; font-weight: 600 !important; }
.math-mode-nav button[aria-selected="true"] { background: #fffdf7 !important; color: #2b2721 !important; box-shadow: 0 1px 3px rgba(74, 58, 28, .16) !important; }

/* 今天这一关 */
.daily-card { display: grid !important; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 14px; align-items: center !important; margin: 0 0 18px !important; padding: 16px 18px !important; background: #fffdf7 !important; background-image: none !important; border: 1px solid #e9e0cc !important; border-radius: 26px !important; box-shadow: 0 1px 2px rgba(74, 58, 28, .06), 0 6px 18px rgba(74, 58, 28, .07) !important; color: #2b2721 !important; text-align: left !important; }
.daily-card::before, .daily-card::after { display: none !important; }
.daily-card > * { grid-column: 1; margin: 0 !important; }
.daily-card .daily-label { justify-self: start; padding: 0 !important; background: transparent !important; color: #a33019 !important; font-size: 14px !important; font-weight: 700 !important; letter-spacing: 0 !important; }
.daily-card .daily-icon, .daily-card .daily-route, .daily-card > small { display: none !important; }
.daily-card h2 { color: #2b2721 !important; font: 400 28px/1.25 "Star Kai", "Kaiti SC", "STKaiti", "KaiTi", serif !important; letter-spacing: 0 !important; }
.daily-card p { color: #5f584a !important; font-size: 14px !important; line-height: 1.5 !important; }
.daily-card .recommend-reason { background: transparent !important; padding: 0 !important; color: #8a826f !important; font-size: 13px !important; }
.recommend-switch { justify-self: start; min-height: 40px; padding: 0 !important; background: transparent !important; color: #2e6ab1 !important; border: 0 !important; box-shadow: none !important; font-weight: 600; }
.daily-card .round-meter { display: flex !important; align-items: center; gap: 8px; width: 100% !important; margin-top: 4px !important; color: #5f584a !important; font-size: 13px !important; background: transparent !important; }
.daily-card .round-meter b { color: #2b2721 !important; }
.daily-card .round-meter i { flex: 1; height: 6px !important; border-radius: 3px; background: #e9e0cc !important; border: 0 !important; }
.daily-card .round-meter em { border-radius: 3px; background: #c43d26 !important; }
.daily-card .start-button { grid-column: 2; grid-row: 1 / span 6; justify-self: end; display: inline-flex !important; align-items: center; gap: 6px; width: auto !important; min-height: 56px !important; padding: 0 24px !important; border: 0 !important; border-radius: 999px !important; font-size: 17px !important; font-weight: 600 !important; }
.daily-card .start-button svg { width: 20px; height: 20px; fill: currentColor; }

/* 选年级 */
.grade-section { margin: 0 0 18px !important; }
.grade-section .section-heading small, .mission-panel .section-heading .grade-code { display: none !important; }
.section-heading { margin-bottom: 10px !important; }
.grade-grid { display: flex !important; gap: 6px !important; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.grade-grid > button { flex: 1 0 auto; min-width: 88px; min-height: 64px !important; padding: 8px 10px !important; border: 1.5px solid #e9e0cc !important; border-radius: 18px !important; background: #fffdf7 !important; color: #2b2721 !important; box-shadow: none !important; transform: none !important; }
.grade-grid > button * { color: inherit !important; }
.grade-grid > button.active, .grade-grid > button[aria-pressed="true"] { border-color: #c43d26 !important; background: #fbe6dd !important; color: #a33019 !important; }

/* 知识地图 */
.math-layout { display: block !important; margin-top: 0 !important; }
.mission-panel { padding: 16px !important; background: #fffdf7 !important; background-image: none !important; border: 1px solid #e9e0cc !important; border-radius: 26px !important; box-shadow: none !important; color: #2b2721 !important; }
.topic-grid { gap: 10px !important; }
.topic-card { border: 1.5px solid #e9e0cc !important; border-radius: 18px !important; background: #fbf6ea !important; color: #2b2721 !important; box-shadow: none !important; transform: none !important; }
.topic-card.active { border-color: #c43d26 !important; background: #fbe6dd !important; }
.topic-card.recommended .topic-card-state { background: #fbefd2 !important; color: #b56d06 !important; }
.topic-card.weak .topic-card-state { background: #fbe6dd !important; color: #a33019 !important; }
.topic-card.complete .topic-card-state { background: #e3f0dc !important; color: #2f6239 !important; }
.topic-card .topic-copy > i { background: #e9e0cc !important; }
.topic-card .topic-copy > i > em, .topic-card em { background: #3e7c4a; }

/* 记录、错题 */
.math-stats { margin-top: 16px !important; background: #fffdf7 !important; border: 1px solid #e9e0cc !important; border-radius: 18px !important; box-shadow: none !important; }
.math-stats article { border-color: #e9e0cc !important; }
.math-stats strong { color: #2b2721 !important; }
.math-stats small { color: #5f584a !important; }
.mistake-review { margin-top: 16px !important; background: #fffdf7 !important; border: 1px solid #e9e0cc !important; border-radius: 18px !important; box-shadow: none !important; }
.mistake-review-head > div > span { color: #a33019 !important; letter-spacing: 0 !important; }
#reviewMistakes { min-height: 48px; border: 0 !important; border-radius: 999px !important; background: #c43d26 !important; color: #fff !important; box-shadow: none !important; }
#reviewMistakes[disabled] { background: #f3ebd9 !important; color: #8a826f !important; }
.taxonomy-entry { margin: 16px 0 0 !important; background: #fffdf7 !important; background-image: none !important; border: 1px solid #e9e0cc !important; border-radius: 18px !important; box-shadow: none !important; }
.taxonomy-entry h2 { color: #2b2721 !important; font: 400 22px/1.3 "Star Kai", "Kaiti SC", "STKaiti", "KaiTi", serif !important; }
.taxonomy-entry p, .taxonomy-entry small { color: #5f584a !important; }
.taxonomy-entry a { min-height: 44px; border: 0 !important; border-radius: 999px !important; background: #f3ebd9 !important; color: #2b2721 !important; box-shadow: none !important; }

/* 做题和结果 */
.quiz-header { background: #fbf6ea !important; border: 0 !important; box-shadow: none !important; }
.quiz-header button { min-height: 44px; min-width: 44px; border: 0 !important; border-radius: 999px !important; background: #f3ebd9 !important; color: #2b2721 !important; box-shadow: none !important; }
.quiz-track { background: #e9e0cc !important; border: 0 !important; }
.quiz-track i { background: #c43d26 !important; }
.quiz-card, .math-lab, .quiz-stage > section, .quiz-stage > div { border-color: #e9e0cc !important; box-shadow: none !important; }
.math-lab { background: #fffdf7 !important; }
.result-card { background: #fffdf7 !important; background-image: none !important; border: 1px solid #e9e0cc !important; border-radius: 26px !important; box-shadow: none !important; color: #2b2721 !important; }
.result-burst { display: none !important; }
.result-actions button { min-height: 48px; border-radius: 999px !important; box-shadow: none !important; }

/* 实验室 */
.phet-library-hero { background: #fffdf7 !important; background-image: none !important; border: 1px solid #e9e0cc !important; border-radius: 26px !important; box-shadow: none !important; color: #2b2721 !important; }
.phet-library-hero * { color: inherit; }
.phet-library-hero h2 { font: 400 26px/1.3 "Star Kai", "Kaiti SC", "STKaiti", "KaiTi", serif !important; }
.phet-library-stats { background: #fbf6ea !important; border-color: #e9e0cc !important; }
.phet-grade-guide, .phet-filter-panel { background: #fffdf7 !important; background-image: none !important; border-color: #e9e0cc !important; box-shadow: none !important; color: #2b2721 !important; }
.phet-grade-grid button, .phet-subject-filters button { min-height: 44px; border-color: #e9e0cc !important; background: #fffdf7 !important; color: #2b2721 !important; box-shadow: none !important; }
.phet-grade-grid button.active, .phet-grade-grid button[aria-pressed="true"], .phet-subject-filters button.active, .phet-subject-filters button[aria-pressed="true"] { border-color: #c43d26 !important; background: #fbe6dd !important; color: #a33019 !important; }

@media (max-width: 560px) {
  .daily-card { grid-template-columns: minmax(0, 1fr); }
  .daily-card .start-button { grid-column: 1; grid-row: auto; justify-self: stretch; justify-content: center; width: 100% !important; margin-top: 8px !important; }
}

/* 旧样式里选择器更长的几条，要写得和它一样长才盖得住 */
body[data-page="math"][data-global-theme] .hub-shell .math-hero, .hub-shell .math-hero { min-height: 0 !important; padding: 0 !important; background: transparent !important; background-image: none !important; border: 0 !important; box-shadow: none !important; }
.hub-shell .math-hero::before, .hub-shell .math-hero::after, .hub-shell .math-hero:before, .hub-shell .math-hero:after { display: none !important; }
.hub-shell .math-hero h1 { color: #2b2721 !important; }
.hub-shell .math-hero p { color: #5f584a !important; }
body[data-page="math"] .daily-card .daily-lab { width: auto; padding: 0; border: 0; border-radius: 0; background: transparent !important; color: #5f584a !important; font-weight: 500 !important; }
body[data-page="math"] .daily-card .recommend-reason { width: auto; padding: 0; border: 0; border-radius: 0; background: transparent !important; color: #8a826f !important; }
body[data-page="math"] .daily-card .round-meter { padding: 0; border: 0; border-radius: 0; background: transparent !important; }
body[data-page="math"] .daily-card .round-meter span { color: #5f584a !important; }
