:root {
  --blue: #2a82e4;
  --blue-deep: #1774d4;
  --blue-soft: #eaf4ff;
  --cyan: #30bfc7;
  --green: #20b06b;
  --red: #ef5b5b;
  --ink: #202734;
  --muted: #8b94a3;
  --line: #e9edf2;
  --page: #f2f3f5;
  --white: #fff;
  --shadow: 0 10px 30px rgba(33, 91, 145, .09);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  color: var(--ink);
  background: #e8edf3;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }

.h5-shell {
  position: relative;
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 0 45px rgba(31, 57, 83, .15);
}

/* 登录 */
.login-view {
  position: relative;
  min-height: 100vh;
  padding: max(30px, env(safe-area-inset-top)) 30px max(22px, env(safe-area-inset-bottom));
  background: #fff;
}
.login-art { margin: 4vh auto 0; text-align: center; }
.login-art img { width: min(100%, 346px); height: auto; display: block; margin: auto; }
.login-copy { margin: 12px 2px 22px; }
.login-copy h1 { margin: 0 0 8px; font-size: 25px; }
.login-copy p { margin: 0; color: var(--muted); font-size: 13px; }
.login-form { display: grid; gap: 13px; }
.field {
  height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 15px;
  border: 1px solid #e5e9ef;
  border-radius: 12px;
  background: #f8f9fb;
}
.field:focus-within { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(42, 130, 228, .09); }
.field > span { padding-right: 12px; color: #3d4653; border-right: 1px solid #d9dee6; }
.field input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); }
.field input::placeholder { color: #b4bac3; }
.code-button { flex: none; padding: 8px 0 8px 12px; color: var(--blue); background: transparent; font-size: 13px; }
.demo-tip { margin: -3px 3px 1px; color: #9aa2ad; font-size: 11px; line-height: 1.6; }
.demo-tip b { color: var(--blue); }
.primary-button {
  min-height: 48px;
  width: 100%;
  padding: 0 18px;
  border-radius: 999px;
  color: #fff;
  background: var(--blue);
  font-weight: 700;
  letter-spacing: .5px;
  box-shadow: 0 8px 20px rgba(42, 130, 228, .22);
}
.primary-button:disabled { opacity: .48; cursor: default; box-shadow: none; }
.wechat-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  margin-top: 12px;
  border: 1px solid #dce3eb;
  border-radius: 999px;
  background: #fff;
  color: #4a5563;
  font-weight: 600;
}
.wechat-button span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: #fff; background: #20b86a; font-size: 12px; }
.admin-entry { display: block; width: max-content; margin: 20px auto 0; color: var(--blue); font-size: 13px; }
.terms { margin: 16px 0 0; text-align: center; color: #b2b8c0; font-size: 10px; }

/* 主框架 */
.app-view { height: 100vh; min-height: 560px; background: var(--page); }
.page-container {
  height: calc(100vh - 66px - env(safe-area-inset-bottom));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.page-container::-webkit-scrollbar { display: none; }
.page { display: none; min-height: 100%; padding-bottom: 28px; }
.page.active { display: block; }

/* 首页 */
.home-page { background: var(--page); }
.home-hero {
  padding: max(18px, env(safe-area-inset-top)) 18px 23px;
  color: #fff;
  background: var(--blue);
}
.home-topline { display: flex; align-items: center; justify-content: space-between; }
.home-topline small { opacity: .8; font-size: 11px; }
.home-topline h1 { margin: 2px 0 0; font-size: 23px; letter-spacing: 1px; }
.avatar-button {
  position: relative;
  width: 42px;
  height: 42px;
  border: 2px solid rgba(255,255,255,.85);
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  color: #fff;
  font-weight: 700;
}
.avatar-button i { position: absolute; right: 0; bottom: 1px; width: 9px; height: 9px; border: 2px solid var(--blue); border-radius: 50%; background: #44d589; }
.home-search, .sub-search {
  width: 100%;
  height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 17px;
  padding: 0 13px;
  border-radius: 21px;
  background: #fff;
  color: #a5abb5;
}
.home-search img, .sub-search img { width: 18px; height: 18px; object-fit: contain; }
.home-search span, .sub-search span { flex: 1; text-align: left; font-size: 13px; }
.home-search b, .sub-search b { padding-left: 12px; border-left: 1px solid #e7e9ec; color: var(--blue); font-size: 12px; font-weight: 600; }
.learning-banner {
  position: relative;
  min-height: 118px;
  margin-top: 16px;
  padding: 20px 128px 18px 20px;
  overflow: hidden;
  border-radius: 16px;
  color: var(--ink);
  background: #fff;
  box-shadow: var(--shadow);
}
.learning-banner small { color: var(--blue); font-weight: 700; }
.learning-banner h2 { margin: 10px 0 9px; font-size: 17px; white-space: nowrap; }
.learning-banner p { margin: 0; color: #7c8591; font-size: 12px; }
.learning-banner p b { color: var(--blue); }
.learning-banner img { position: absolute; right: 21px; bottom: 8px; width: 93px; max-height: 100px; object-fit: contain; }
.notice-card {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 9px;
  width: calc(100% - 32px);
  min-height: 49px;
  margin: -10px auto 12px;
  padding: 10px 13px;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}
.notice-card img { width: 21px; }
.notice-card b { flex: none; color: var(--blue); font-size: 12px; }
.notice-card p { flex: 1; margin: 0; overflow: hidden; color: #6f7782; font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }
.notice-card span { color: #b9c0c9; font-size: 20px; }
.home-panel {
  margin: 12px 12px 0;
  padding: 18px 16px;
  border-radius: 14px;
  background: #fff;
}
.assistant-panel { margin: 0; border-radius: 24px 24px 14px 14px; padding-top: 22px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 17px; }
.section-heading h2 { margin: 0; font-size: 18px; }
.section-heading small { display: block; margin-top: 3px; color: #a0a7b0; font-size: 10px; }
.section-heading button { display: flex; align-items: center; gap: 3px; padding: 6px; background: transparent; color: #9ba3ad; font-size: 11px; }
.section-heading button img { width: 13px; }
.assistant-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.assistant-grid button { display: flex; align-items: center; flex-direction: column; gap: 6px; padding: 0; background: transparent; }
.assistant-grid b { font-size: 13px; }
.assistant-grid small { color: #a2a8b1; font-size: 9px; }
.icon-box { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; color: #fff; font-size: 21px; font-style: normal; font-weight: 700; }
.icon-box img { width: 28px; max-height: 30px; object-fit: contain; filter: brightness(0) invert(1); }
.icon-box.blue { background: #438fe8; }
.icon-box.cyan { background: #35bfc8; }
.icon-box.violet { background: #788be9; }
.icon-box.green { background: #42be83; }
.daily-card { display: flex; align-items: center; justify-content: space-between; background: #edf6ff; border: 1px solid #dbeeff; }
.daily-card span { color: var(--blue); font-size: 11px; font-weight: 700; }
.daily-card h3 { margin: 7px 0 5px; font-size: 15px; }
.daily-card h3 b { color: var(--blue); }
.daily-card p { margin: 0; color: #8a949f; font-size: 10px; }
.small-primary { flex: none; padding: 9px 15px; border-radius: 18px; color: #fff; background: var(--blue); font-size: 12px; }
.featured-books { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; min-height: 110px; }
.featured-book { padding: 0; text-align: left; background: transparent; }
.featured-cover { display: flex; align-items: flex-end; min-height: 104px; padding: 10px; overflow: hidden; border-radius: 8px; color: #fff; font-size: 11px; font-weight: 700; line-height: 1.45; box-shadow: 0 8px 18px rgba(31,74,118,.12); }
.featured-book small { display: block; margin-top: 7px; color: #8a929d; font-size: 9px; }
.smart-title { display: flex; align-items: center; gap: 11px; }
.smart-title img { width: 47px; height: 47px; object-fit: contain; }
.smart-title h3 { margin: 0 0 4px; font-size: 15px; }
.smart-title p { margin: 0; color: #8f97a1; font-size: 10px; }
.home-stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 16px; padding-top: 15px; border-top: 1px solid var(--line); }
.home-stats div { text-align: center; border-right: 1px solid var(--line); }
.home-stats div:last-child { border: 0; }
.home-stats strong { display: block; color: var(--blue); font-size: 17px; }
.home-stats span { display: block; margin-top: 4px; color: #9aa1aa; font-size: 9px; }

/* 子页面 */
.sub-page, .quiz-page { background: var(--page); }
.sub-header {
  position: sticky;
  top: 0;
  z-index: 5;
  height: 58px;
  display: grid;
  grid-template-columns: 54px 1fr 70px;
  align-items: center;
  padding-top: env(safe-area-inset-top);
  color: #fff;
  background: var(--blue);
}
.sub-header button { height: 100%; background: transparent; color: #fff; font-size: 30px; font-weight: 300; }
.sub-header h1 { margin: 0; text-align: center; font-size: 18px; }
.sub-header span { padding-right: 15px; text-align: right; opacity: .85; font-size: 11px; }
.sub-page > .sub-search { width: calc(100% - 24px); margin: 14px auto 10px; box-shadow: 0 3px 13px rgba(37,69,105,.06); }
.active-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 13px; }
.clear-search { width: 25px; height: 25px; border-radius: 50%; background: #edf0f3; color: #8d95a0; }
.filter-chips {
  display: flex;
  width: 100%;
  max-width: 100%;
  flex-wrap: nowrap;
  gap: 8px;
  padding: 4px 12px 12px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  scrollbar-width: none;
}
.filter-chips::-webkit-scrollbar { display: none; }
.filter-chips button { flex: 0 0 auto; touch-action: pan-x; padding: 8px 15px; border-radius: 18px; background: #fff; color: #747d88; font-size: 12px; white-space: nowrap; }
.filter-chips button.active { color: #fff; background: var(--blue); box-shadow: 0 6px 14px rgba(42,130,228,.2); }
.filter-chips button.important { color: #fff; background: var(--red); }
.filter-chips button.important.active { box-shadow: 0 6px 14px rgba(221,72,72,.28); }
.filter-strip { position: relative; min-width: 0; }
.filter-strip .filter-chips { padding-right: 50px; }
.filter-next {
  position: absolute;
  z-index: 2;
  top: 3px;
  right: 7px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid #dce9f6;
  border-radius: 50%;
  color: var(--blue);
  background: rgba(255,255,255,.96);
  box-shadow: 0 3px 12px rgba(37,69,105,.16);
  font-size: 22px;
}
.dict-load-more {
  display: block;
  width: calc(100% - 24px);
  min-height: 42px;
  margin: 0 12px 22px;
  border: 1px solid #d9e9f8;
  border-radius: 22px;
  color: var(--blue);
  background: #fff;
  font-size: 12px;
}
.book-list, .dictionary-list, .record-list { display: grid; gap: 10px; padding: 0 12px 18px; }
.book-item {
  display: grid;
  grid-template-columns: 58px 1fr 58px;
  gap: 12px;
  align-items: center;
  min-height: 104px;
  padding: 13px;
  border-radius: 12px;
  background: #fff;
}
.book-cover {
  display: flex;
  align-items: flex-end;
  width: 58px;
  height: 78px;
  padding: 7px;
  overflow: hidden;
  border-radius: 5px;
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  line-height: 1.4;
}
.book-info { min-width: 0; }
.book-info > span { color: var(--blue); font-size: 9px; }
.book-info h4 { margin: 5px 0; overflow: hidden; font-size: 13px; white-space: nowrap; text-overflow: ellipsis; }
.book-info p { display: -webkit-box; margin: 0 0 4px; overflow: hidden; color: #8f97a1; font-size: 10px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.book-info small { color: #afb5bd; font-size: 9px; }
.read-button {
  min-height: 31px;
  padding: 6px 9px;
  border-radius: 18px;
  color: #fff;
  background: var(--blue);
  font-size: 0;
}
.read-button small { font-size: 11px; }
.dictionary-item {
  position: relative;
  width: 100%;
  min-height: 116px;
  padding: 15px 42px 15px 16px;
  border-radius: 12px;
  text-align: left;
  background: #fff;
}
.dictionary-item::after { content: "›"; position: absolute; right: 17px; top: 45px; color: #c5cad0; font-size: 24px; }
.dictionary-item > span { padding: 4px 9px; border-radius: 10px; color: var(--blue); background: var(--blue-soft); font-size: 9px; }
.dictionary-item h4 { display: inline; margin: 0 7px 0 10px; font-size: 16px; }
.law-status { display: inline-block; margin: 0 6px 0 0; padding: 2px 5px; border-radius: 2px; color: #fff; background: #9aa2aa; font-size: 9px; font-weight: 500; vertical-align: 2px; }
.law-status.current { background: #24b96b; }
.law-status.inactive { background: #9aa2aa; }
.dictionary-item em { color: #a5acb5; font-size: 10px; font-style: normal; }
.dictionary-item p { display: -webkit-box; margin: 14px 0 0; overflow: hidden; color: #757f8b; font-size: 11px; line-height: 1.65; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.dictionary-law-meta { display: flex; flex-wrap: wrap; margin-top: 7px; color: #969ea7; font-size: 10px; line-height: 1.5; }
.dictionary-law-meta small { font-size: inherit; }
.dictionary-law-meta small + small::before { content: " / "; margin: 0 3px; color: #c2c7cd; }
.dictionary-item.important { box-shadow: inset 3px 0 0 var(--red); }
.dictionary-item > span.important,
.dictionary-path small.important { color: #fff; background: var(--red); }
.dictionary-path { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.dictionary-path small { padding: 3px 8px; border-radius: 9px; color: #6f7883; background: #f0f3f6; font-size: 9px; }

/* 答题 */
.quiz-cover {
  min-height: 150px;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 28px;
  color: #fff;
  background: var(--blue);
}
.quiz-cover img { width: 95px; max-height: 95px; object-fit: contain; }
.quiz-cover small { opacity: .65; font-size: 9px; letter-spacing: 1.2px; }
.quiz-cover h2 { margin: 7px 0; font-size: 21px; }
.quiz-cover p { margin: 0; opacity: .8; font-size: 10px; }
.quiz-intro-card { margin: -13px 12px 0; padding: 20px; border-radius: 18px; background: #fff; }
.quiz-intro-card h3 { margin: 0 0 14px; font-size: 15px; }
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.mode-card { display: flex; align-items: center; gap: 10px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #fafbfc; text-align: left; }
.mode-card b { color: var(--blue); font-size: 24px; }
.mode-card span { color: #7f8791; font-size: 11px; }
.mode-card.selected { border-color: var(--blue); background: var(--blue-soft); box-shadow: inset 0 0 0 1px var(--blue); }
.quiz-intro-card ul { margin: 18px 0 20px; padding: 14px 15px 14px 33px; border-radius: 10px; color: #7b8490; background: #f6f8fa; font-size: 11px; line-height: 2; }
.quiz-progress {
  height: 70px;
  display: grid;
  grid-template-columns: 50px 1fr 55px;
  align-items: center;
  padding: max(8px, env(safe-area-inset-top)) 8px 0;
  color: #fff;
  background: var(--blue);
}
.quiz-progress button { background: transparent; color: #fff; font-size: 30px; }
.quiz-progress > div { text-align: center; }
.quiz-progress span { font-size: 12px; }
.quiz-progress i { display: block; height: 4px; margin-top: 7px; overflow: hidden; border-radius: 3px; background: rgba(255,255,255,.28); }
.quiz-progress i b { display: block; width: 10%; height: 100%; border-radius: inherit; background: #fff; transition: width .25s; }
.quiz-progress strong { font-size: 12px; }
.question-card { margin: 12px; padding: 19px 16px; border-radius: 13px; background: #fff; }
.question-badge { display: flex; align-items: center; gap: 7px; margin-bottom: 16px; color: var(--blue); }
.question-badge img { width: 24px; }
.question-badge span { font-size: 11px; font-weight: 700; }
.question-badge small { margin-left: auto; padding: 4px 8px; border-radius: 10px; background: var(--blue-soft); font-size: 9px; }
.question-card h2 { margin: 0; font-size: 16px; line-height: 1.75; }
.choose-tip { margin: 17px 0 9px; color: #9aa2ac; font-size: 10px; }
.question-options { display: grid; gap: 10px; }
.option-button { display: grid; grid-template-columns: 31px 1fr; align-items: center; gap: 9px; min-height: 49px; padding: 9px 12px; border: 1px solid transparent; border-radius: 9px; text-align: left; background: #f1f4f6; }
.option-button span { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; color: #6f7883; background: #fff; font-size: 11px; }
.option-button b { font-size: 12px; font-weight: 500; line-height: 1.5; }
.option-button.correct { border-color: var(--green); color: #167b4b; background: #e9f8f1; }
.option-button.correct span { color: #fff; background: var(--green); }
.option-button.wrong { border-color: var(--red); color: #b33b3b; background: #fff0f0; }
.option-button.wrong span { color: #fff; background: var(--red); }
.answer-panel { margin: 0 12px 12px; padding: 16px; border-radius: 13px; background: #fff; }
.answer-result { display: flex; align-items: center; gap: 10px; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.answer-result > span { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 50%; color: #fff; background: var(--green); font-size: 20px; }
.answer-result b { display: block; color: var(--green); font-size: 13px; }
.answer-result small { color: #8c949f; font-size: 10px; }
.answer-result em { color: var(--green); font-style: normal; }
.answer-panel.incorrect .answer-result > span { background: var(--red); }
.answer-panel.incorrect .answer-result b, .answer-panel.incorrect .answer-result em { color: var(--red); }
.answer-panel h3 { margin: 14px 0 8px; font-size: 13px; }
.answer-panel > p { margin: 0; color: #747e89; font-size: 11px; line-height: 1.8; }
.next-button { width: calc(100% - 24px); margin: 0 12px 20px; }
.quiz-result { min-height: 100%; padding: 60px 24px 30px; text-align: center; background: #fff; }
.quiz-result > img { width: 130px; max-height: 130px; object-fit: contain; }
.quiz-result > small { display: block; margin-top: 20px; color: #929aa5; }
.quiz-result h2 { margin: 5px 0; color: var(--blue); font-size: 28px; }
.quiz-result > p { margin: 0 0 23px; color: #626d78; font-size: 13px; }
.quiz-result > div { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 30px; padding: 17px 0; border-radius: 13px; background: #f5f8fb; }
.quiz-result > div span { color: #9aa2ac; font-size: 10px; }
.quiz-result > div b { display: block; margin-bottom: 5px; color: var(--blue); font-size: 18px; }
.secondary-button { width: 100%; min-height: 46px; margin-top: 10px; border: 1px solid var(--blue); border-radius: 24px; color: var(--blue); background: #fff; font-weight: 700; }

/* 我的 */
.profile-page { background: var(--page); }
.profile-blue { height: 140px; padding: max(24px, env(safe-area-inset-top)) 20px 0; color: #fff; background: var(--blue); }
.profile-blue h1 { margin: 0; text-align: center; font-size: 20px; }
.profile-card {
  position: relative;
  min-height: 166px;
  margin: -72px 12px 0;
  padding: 58px 18px 16px;
  border-radius: 52% 52% 14px 14px / 32px 32px 14px 14px;
  text-align: center;
  background: #fff;
  box-shadow: var(--shadow);
}
.profile-avatar { position: absolute; top: -31px; left: 50%; display: grid; place-items: center; width: 68px; height: 68px; transform: translateX(-50%); border: 4px solid #fff; border-radius: 50%; color: #fff; background: #6ca8eb; box-shadow: 0 6px 18px rgba(42,130,228,.25); font-size: 23px; font-weight: 700; }
.profile-user p { margin: 0 0 5px; font-size: 17px; font-weight: 700; }
.profile-user small { color: #9aa2ac; font-size: 10px; }
.profile-card > button { margin-top: 9px; padding: 5px 12px; border-radius: 12px; color: var(--blue); background: var(--blue-soft); font-size: 10px; }
.profile-card .edit-name-button { margin-right: 5px; }
.profile-score { position: absolute; top: 73px; right: 22px; display: flex; flex-direction: column; }
.profile-score small { color: #9aa2ac; font-size: 8px; }
.profile-score strong { margin-top: 4px; color: var(--blue); font-size: 18px; }
.record-tabs { display: grid; grid-template-columns: repeat(4, 1fr); margin: 12px 12px 0; padding: 13px 5px 0; border-radius: 13px 13px 0 0; background: #fff; }
.record-tabs button { position: relative; display: flex; align-items: center; flex-direction: column; gap: 7px; padding: 5px 0 13px; background: transparent; color: #838c97; font-size: 10px; }
.record-tabs img { width: 22px; height: 22px; object-fit: contain; }
.record-tabs button.active { color: var(--blue); font-weight: 700; }
.record-tabs button.active::after { content: ""; position: absolute; bottom: 0; width: 28px; height: 3px; border-radius: 2px; background: var(--blue); }
.record-list { min-height: 190px; padding-top: 10px; }
.record-item { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 10px; padding: 13px; border-radius: 10px; background: #fff; }
.record-item-button { width: 100%; color: inherit; text-align: left; }
.record-item-button:active { background: #f5f8fb; }
.record-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; font-size: 15px; font-weight: 700; }
.record-icon.good { color: var(--green); background: #e8f8f0; }
.record-icon.bad { color: var(--red); background: #fff0f0; }
.record-content { min-width: 0; }
.record-content b { display: block; overflow: hidden; font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }
.record-content small { display: block; margin-top: 6px; overflow: hidden; color: #9ba3ad; font-size: 9px; white-space: nowrap; text-overflow: ellipsis; }
.record-value { color: var(--green); font-size: 11px; }
.record-detail-modal { max-height: min(82vh, 640px); overflow-y: auto; }
.record-read-link { display: grid; place-items: center; margin-top: 18px; text-decoration: none; }
.record-option-list { display: grid; gap: 8px; margin-bottom: 16px; }
.record-option-list p { margin: 0; padding: 9px 11px; border-radius: 8px; background: #f3f5f7; }
.record-option-list .correct-option { color: #167b4b; background: #e9f8f1; }
.record-option-list .wrong-option { color: #b33b3b; background: #fff0f0; }
.record-detail-modal .modal-detail h4 { margin: 6px 0 8px; color: #333; }
.profile-actions { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 2px 12px 20px; }
.profile-actions a, .profile-actions button { display: grid; place-items: center; min-height: 42px; border-radius: 22px; background: #fff; color: var(--blue); font-size: 12px; }
.profile-actions button { color: #939ba5; }

/* 底部导航 */
.bottom-nav {
  position: absolute;
  z-index: 20;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(66px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 6px 5px env(safe-area-inset-bottom);
  border-top: 1px solid #edf0f3;
  background: rgba(255,255,255,.98);
}
.bottom-nav button { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 4px; background: transparent; color: #9aa2ad; }
.bottom-nav img { width: 23px; height: 23px; object-fit: contain; }
.bottom-nav span { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 8px; background: #eef1f5; font-size: 12px; font-weight: 700; }
.bottom-nav small { font-size: 10px; }
.bottom-nav button.active { color: var(--blue); }
.bottom-nav button.active span { color: #fff; background: var(--blue); }

/* 弹窗与反馈 */
.toast { position: fixed; z-index: 100; left: 50%; bottom: 95px; max-width: 300px; padding: 10px 16px; transform: translate(-50%, 16px); border-radius: 20px; color: #fff; background: rgba(24,31,39,.88); opacity: 0; pointer-events: none; transition: .2s; font-size: 12px; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.modal-backdrop { position: fixed; z-index: 80; inset: 0; display: grid; place-items: center; padding: 22px; background: rgba(17,30,44,.56); }
.detail-modal, .study-modal, .status-modal { position: relative; width: min(100%, 390px); max-height: 82vh; padding: 25px 22px; overflow-y: auto; border-radius: 17px; background: #fff; box-shadow: 0 24px 80px rgba(16,35,56,.24); }
.modal-close { position: absolute; top: 13px; right: 13px; display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; background: #f0f2f5; color: #7f8790; font-size: 21px; }
.modal-category { display: inline-block; margin: 5px 0 13px; padding: 5px 10px; border-radius: 12px; color: var(--blue); background: var(--blue-soft); font-size: 10px; }
.detail-modal h3 { margin: 0 0 3px; font-size: 22px; }
.modal-pinyin { margin: 0 0 15px; color: #a0a7b0; font-size: 11px; }
.modal-summary { padding: 13px; border-radius: 9px; color: #53606c; background: #f4f7fa; font-size: 12px; line-height: 1.7; }
.modal-law-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 13px; color: #79838d; font-size: 10px; }
.modal-law-meta span { padding: 3px 7px; border-radius: 8px; background: #edf4ef; }
.modal-detail { color: #505b67; font-size: 12px; line-height: 1.9; white-space: pre-wrap; }
.modal-source { margin: 18px 0 0; padding-top: 13px; border-top: 1px solid var(--line); color: #929aa4; font-size: 10px; }
.modal-source span { margin-right: 8px; color: var(--blue); }
.modal-source b { font-weight: 500; }
.study-modal, .status-modal { text-align: center; overflow: visible; }
.image-close { position: absolute; z-index: 3; top: -42px; right: 2px; width: 30px; height: 30px; padding: 0; border-radius: 50%; background: transparent; }
.image-close img { width: 100%; height: 100%; object-fit: contain; }
.study-visual { width: 98px; height: 98px; display: grid; place-items: center; margin: -4px auto 10px; border-radius: 50%; background: var(--blue-soft); }
.study-visual img { width: 73px; max-height: 75px; object-fit: contain; }
.study-modal h2, .status-modal h2 { margin: 10px 0; font-size: 19px; }
.study-modal p, .status-modal p { margin: 0 auto 21px; color: #7e8792; font-size: 12px; line-height: 1.8; }
.plain-button { width: 100%; margin-top: 11px; padding: 8px; background: transparent; color: #9ca4ad; font-size: 12px; }
.status-modal { padding-top: 0; }
.status-bg { width: calc(100% + 44px); margin: 0 -22px 7px; border-radius: 17px 17px 0 0; }

.empty-state { display: flex; align-items: center; flex-direction: column; min-height: 180px; padding: 28px; border-radius: 12px; text-align: center; background: #fff; }
.empty-state span { display: grid; place-items: center; width: 50px; height: 50px; margin-bottom: 12px; border-radius: 50%; color: var(--blue); background: var(--blue-soft); font-size: 18px; font-weight: 700; }
.empty-state b { font-size: 13px; }
.empty-state small { margin-top: 6px; color: #a2a9b1; font-size: 10px; }
.loading-block:empty::after { content: "正在加载…"; display: block; padding: 40px 0; text-align: center; color: #a1a8b1; font-size: 11px; }

@media (max-width: 360px) {
  .assistant-grid { gap: 2px; }
  .icon-box { width: 47px; height: 47px; }
  .learning-banner { padding-left: 15px; padding-right: 110px; }
  .learning-banner h2 { font-size: 15px; }
}

@media (min-width: 700px) {
  body { padding: 24px 0; }
  .h5-shell, .login-view { min-height: calc(100vh - 48px); }
  .app-view { height: calc(100vh - 48px); }
  .page-container { height: calc(100vh - 114px - env(safe-area-inset-bottom)); }
  .h5-shell { border-radius: 24px; }
}

/* web05test 原始页面视觉覆盖：主题图片、留白和版式保持不变 */
.login-view {
  min-height: 100vh;
  padding: 0;
  background: #fff;
}
.login-spacer { height: 180px; }
.login-art { width: 100%; margin: 20px 0 0; text-align: center; }
.login-art img { width: calc(100% - 30px); max-width: 346px; }
.original-login-button {
  display: block;
  width: min(calc(100% - 76px), 300px);
  height: 45px;
  margin: 75px auto 0;
  border-radius: 23px;
  color: #fff;
  background: #2a82e4;
  font-size: 15px;
  font-weight: 700;
}
.wechat-text-button {
  display: block;
  margin: 18px auto 0;
  padding: 5px 14px;
  color: #2a82e4;
  background: transparent;
  font-size: 13px;
}
.login-view .admin-entry { margin-top: 10px; color: #aaa; text-decoration: underline; }
.cancel-view {
  position: absolute;
  right: 0;
  bottom: 50px;
  left: 0;
  margin: 0;
  color: #aaa;
  text-align: center;
  text-decoration: underline;
  font-size: 13px;
}
.phone-modal {
  position: relative;
  width: min(100%, 340px);
  padding: 24px 20px 21px;
  border-radius: 5px;
  background: #fff;
}
.phone-modal h2 { margin: 0 0 20px; text-align: center; font-size: 18px; font-weight: 500; }
.bind-explain { margin: -8px 0 16px; color: #7d8792; text-align: center; font-size: 11px; line-height: 1.7; }
.wechat-qr-modal { text-align: center; }
.wechat-qr-modal canvas { display: block; width: 174px; height: 174px; margin: 0 auto 13px; border: 8px solid #fff; box-shadow: 0 5px 20px rgba(34,75,112,.12); }
.wechat-qr-modal p { margin: 0 0 13px; color: #4d5864; font-size: 12px; }
.wechat-qr-modal small { display: block; margin-top: 12px; color: #9aa2ac; font-size: 9px; line-height: 1.6; }
.frozen-modal { width: min(100%, 310px); padding: 27px 23px 22px; border-radius: 15px; text-align: center; background: #fff; }
.frozen-icon { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 13px; border-radius: 50%; color: #fff; background: #e45b55; font-size: 30px; font-weight: 700; }
.frozen-modal h2 { margin: 0 0 9px; font-size: 19px; }
.frozen-modal p { margin: 0 0 20px; color: #747e89; font-size: 12px; line-height: 1.8; }

.home-page { padding-bottom: 0; background: #f2f2f2; }
.original-top-canvas { width: 100%; height: 142px; overflow: hidden; background: #fff; }
.original-top-canvas canvas { display: block; width: 100%; height: 100%; }
.home-runtime-values { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.original-search {
  width: calc(100% - 36px);
  height: 34px;
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 9px 18px;
  padding: 0 11px;
  border-radius: 18px;
  background: #fff;
  color: #8a8a8a;
}
.original-search img { width: 20px; height: 20px; object-fit: contain; }
.original-search span { flex: 1; text-align: left; font-size: 13px; }
.original-search b { color: #383838; font-size: 12px; font-weight: 400; }
.original-banner { height: 99px; margin: 0 16px 10px; overflow: hidden; border-radius: 8px; }
.original-banner img { display: block; width: 100%; height: 100%; object-fit: cover; }
.original-notice {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 16px 14px;
  padding: 0 10px;
  border-radius: 5px;
  background: #fff;
}
.original-notice img { width: 20px; height: 16px; object-fit: contain; }
.notice-marquee { flex: 1; min-width: 0; overflow: hidden; }
.original-notice p {
  width: max-content;
  margin: 0;
  color: #353535;
  font-size: 11px;
  white-space: nowrap;
  animation: notice-scroll 16s linear infinite;
}
@keyframes notice-scroll {
  from { transform: translateX(100%); }
  to { transform: translateX(-100%); }
}
.original-list-view {
  min-height: 430px;
  padding: 14px 16px 20px;
  border-radius: 28px 28px 0 0;
  background: #fff;
  box-shadow: 0 -1px 5px rgba(0,0,0,.25);
}
.original-section-title { height: 28px; display: flex; align-items: center; justify-content: space-between; padding: 0 9px; }
.original-section-title h2 { margin: 0; color: #383838; font-size: 14px; font-weight: 400; }
.original-section-title button { display: flex; align-items: center; gap: 5px; padding: 3px 0; color: #383838; background: transparent; font-size: 12px; }
.original-section-title button img { width: 8px; height: 11px; object-fit: contain; }
.original-category-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 12px; }
.original-category-grid button { display: flex; align-items: center; flex-direction: column; gap: 7px; background: transparent; }
.original-category-grid img { width: 50px; height: 50px; object-fit: contain; }
.original-category-grid b { color: #2b85df; font-size: 15px; font-weight: 500; }
.applet-heading { margin-top: 20px; }
.original-applet-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 9px; }
.original-applet-grid button { padding: 0; overflow: hidden; border-radius: 6px; background: transparent; }
.original-applet-grid img { display: block; width: 100%; aspect-ratio: 334 / 197; object-fit: cover; }
.daily-recommend-grid { display: grid; gap: 9px; margin-top: 9px; }
.daily-recommend-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 74px;
  padding: 10px 11px;
  border: 1px solid #e2effd;
  border-radius: 8px;
  text-align: left;
  background: linear-gradient(105deg, #f7fbff, #eef7ff);
}
.daily-recommend-card > img { width: 46px; height: 46px; object-fit: contain; }
.daily-recommend-card span { min-width: 0; }
.daily-recommend-card small,
.daily-recommend-card b,
.daily-recommend-card em { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.daily-recommend-card small { color: #2b85df; font-size: 10px; }
.daily-recommend-card b { margin: 4px 0; color: #333; font-size: 13px; font-weight: 500; }
.daily-recommend-card em { color: #8b929a; font-size: 9px; font-style: normal; }
.daily-recommend-card i {
  padding: 6px 9px;
  border-radius: 14px;
  color: #fff;
  background: #2b85df;
  font-size: 10px;
  font-style: normal;
}
.daily-recommend-empty {
  padding: 22px 14px;
  border: 1px dashed #c9dff5;
  border-radius: 8px;
  color: #8b929a;
  text-align: center;
  background: #f7fbff;
  font-size: 11px;
  line-height: 1.7;
}

.bottom-nav { height: calc(58px + env(safe-area-inset-bottom)); grid-template-columns: 1fr 1fr; padding: 5px 38px env(safe-area-inset-bottom); }
.page-container { height: calc(100vh - 58px - env(safe-area-inset-bottom)); }
.bottom-nav button { gap: 2px; }
.bottom-nav img { width: 22px; height: 22px; }
.bottom-nav small { font-size: 10px; }

.study-modal {
  width: 250px;
  padding: 23px 27px 15px;
  border-radius: 0;
  overflow: hidden;
}
.study-modal h2 { margin: 0 0 8px; color: #222; font-size: 17px; font-weight: 600; }
.study-modal p { margin: 0 0 13px; color: #333; font-size: 12px; line-height: 1.5; }
.study-modal .primary-button,
.study-modal .later-button {
  width: 196px;
  min-height: 31px;
  height: 31px;
  padding: 0;
  border-radius: 5px;
  box-shadow: none;
  color: #fff;
  font-size: 15px;
  font-weight: 400;
}
.study-modal .later-button { margin-top: 8px; background: #ef4040; }
.status-modal {
  width: 283px;
  height: 312px;
  padding: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}
.status-modal .status-bg { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; border-radius: 5px; object-fit: fill; }
.status-modal h2 { position: absolute; z-index: 1; top: 202px; width: 100%; margin: 0; color: #383838; font-size: 17px; font-weight: 500; }
.status-modal p { position: absolute; z-index: 1; top: 245px; width: 100%; margin: 0; color: #666; font-size: 13px; }
.status-modal .image-close { top: auto; right: calc(50% - 20px); bottom: -51px; width: 40px; height: 40px; }

@media (min-width: 700px) {
  .login-view { min-height: calc(100vh - 48px); }
  .page-container { height: calc(100vh - 106px - env(safe-area-inset-bottom)); }
}
