* { box-sizing: border-box; }

:root {
  font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #000;
  background: #fff;
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
}

body { margin: 0; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button, input, select { -webkit-tap-highlight-color: transparent; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.page { min-height: 100vh; min-height: 100dvh; padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)); }

.page-header {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f7f7f7;
  box-shadow: 0 3px 5px #00000016;
}
.page-header h1 { margin: 0; font-size: 18px; font-weight: 600; line-height: 1; }
.main-content { width: 88.4%; max-width: 680px; margin: 0 auto; }
.register-prompt {
  margin: 12px 0 17px;
  text-align: right;
  color: #646464;
  font-size: 12px;
  line-height: 17px;
}
.text-link { padding: 0; border: 0; background: none; color: #6d89b3; }
.register-prompt .text-link { margin-left: 5px; }
.login-form { margin: 0; }
.input-row {
  display: flex;
  align-items: center;
  position: relative;
  height: 39px;
  margin-bottom: 15px;
  border: 1px solid #939393;
  border-radius: 24px;
  color: #909090;
}
.field-icon {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin-left: 27px;
  margin-right: 22px;
  fill: none;
  stroke: #000;
  stroke-width: .9;
}
.star-icon { width: 22px; height: 22px; }
.input-row input, .input-row select {
  display: block;
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0 15px 0 0;
  border: 0;
  outline: 0;
  background: transparent;
  border-radius: inherit;
  color: #909090;
  font-size: 14px;
  appearance: none;
  -webkit-appearance: none;
}
.input-row input::placeholder { color: #aaa; opacity: 1; }
.input-row:focus-within { border-color: #2989fa; box-shadow: 0 0 0 2px #2989fa16; }
.password-row { margin-bottom: 0; }
.password-row input { padding-right: 38px; }
.eye-icon { position: absolute; right: 9px; width: 20px; height: 20px; color: #999; }
.forgot-password { margin: 20px 0 23px; padding-left: 20px; font-size: 12px; line-height: 15px; }
.login-button {
  display: block;
  width: 100%;
  height: 40px;
  padding: 0;
  border: 1px solid #c8c8c8;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(105deg, #2477fc, #2b94fa);
  font-size: 15px;
  font-weight: 400;
}
.login-button:active { filter: brightness(.96); }
.security-notice { margin: 21px 0 0; color: #f00; text-align: center; font-size: 14px; line-height: 22px; }
.bottom-nav {
  position: fixed;
  z-index: 10;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  height: calc(51px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  border-top: 1px solid #bdbdbd;
  background: #f7f7f7;
}
.nav-item {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 5px 0 6px;
  border: 0;
  background: none;
  color: #999;
  font-size: 12px;
  line-height: 14px;
}
.nav-item svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.2; }
.nav-item.active { color: #0085ed; }
button:focus-visible { outline: 2px solid #2989fa; outline-offset: 3px; }
a:focus-visible { outline: 2px solid #2989fa; outline-offset: -3px; }
.nav-item { text-decoration: none; }
.password-toggle { position: absolute; right: 0; top: 0; width: 38px; height: 100%; padding: 0; border: 0; background: transparent; border-radius: 24px; }
.password-toggle .eye-icon { top: 50%; transform: translateY(-50%); }
.login-error { margin: 10px 0 0; color: #e33; font-size: 12px; text-align: center; }

/* 成绩入口 */
.scores-page { background: #eee; }
.score-menu { padding-top: 15px; }
.score-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 47px;
  margin-bottom: 15px;
  padding: 0 13px;
  border: 0;
  border-bottom: 1px solid #ccc;
  background: #fdfdfd;
  color: #292929;
  text-align: left;
  text-decoration: none;
  font-size: 16px;
}
.score-menu-item svg { width: 16px; height: 18px; flex-shrink: 0; fill: none; stroke: #298ad1; stroke-width: 1.2; }
.score-menu-item:active { background: #f3f7fa; }

/* 历年成绩详情，分数按最后提供的参考图填写。 */
.history-page { color: #222; }
.history-page .page-header { position: relative; }
.back-link { position: absolute; inset: 0 auto 0 8px; width: 28px; display: flex; align-items: center; justify-content: center; color: #0085ed; }
.back-link svg { width: 20px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.5; }
.history-content { padding: 16px 15px 50px; }
.candidate-info { font-size: 14px; line-height: 21px; }
.candidate-info p { margin: 0; }
.results-table { width: 100%; table-layout: fixed; border-collapse: collapse; border: 1px solid #eaeaea; font-size: 14px; }
.results-table caption { padding: 20px 0 15px; color: #4c6675; font-size: 16px; line-height: 22px; }
.subject-column { width: 46.4%; }
.results-table th, .results-table td { height: 39px; padding: 8px 4px; border: 1px solid #aaa; font-weight: 400; text-align: center; line-height: 22px; }
.results-table th { background: #f3f8f9; }
.results-table th:first-child { text-align: left; }
.results-table tr > :first-child { border-left-color: #eaeaea; }
.results-table tr > :last-child { border-right-color: #eaeaea; }
.results-table thead th { border-top-color: #eaeaea; }
.results-table tbody tr:last-child > * { border-bottom-color: #eaeaea; }
.score-explanation { display: flex; gap: 6px; margin-top: 17px; font-size: 14px; line-height: 21px; }
.question-icon { flex: 0 0 20px; height: 20px; border: 1px solid red; border-radius: 50%; color: red; text-align: center; font: 17px/18px Georgia, serif; margin-left: 2px; }
.score-explanation h2 { font-size: 14px; line-height: 21px; margin: 0; font-weight: 700; }
.score-explanation ul { list-style: none; margin: 0; padding: 0; color: #000; }
.history-notice { color: red; font-size: 14px; line-height: 21px; margin: 18px 0 0; }
.current-content { padding: 12px 15px 50px; }
.current-results caption { padding: 0 0 12px; color: #405d7e; line-height: 28px; }
.current-results th, .current-results td { padding: 8px 20px; text-align: left; }
.current-results .candidate-row td { border-top-color: #eaeaea; }
.current-results thead tr:last-child th { border-top-color: #aaa; }
.current-content .score-explanation { margin-top: 23px; }
@media (max-width: 374px) {
  .current-content { padding-right: 10px; padding-left: 10px; }
  .current-results th, .current-results td { padding-right: 10px; padding-left: 10px; }
  .history-content { padding-right: 10px; padding-left: 10px; }
  .results-table { font-size: 12px; }
  .results-table th, .results-table td { padding-right: 3px; padding-left: 3px; }
  .candidate-info { font-size: 12px; }
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* 参考图为 430px 宽移动视口；窄屏保持布局，大屏限制表单宽度。 */
@media (max-width: 359px) {
  .field-icon { margin-left: 20px; margin-right: 16px; }
  .security-notice { font-size: 12px; }
}
