/* 答题端布局 */

.f-header {
  position: relative;
  color: #fff;
  background:
    radial-gradient(780px 220px at 82% -40%, rgba(238, 28, 37, 0.55), transparent 70%),
    linear-gradient(100deg, #5f0000 0%, #990000 42%, #cc0000 78%, #dc241f 100%);
  border-bottom: 1px solid #5c0000;
}

.f-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(230, 207, 157, 0.55) 16%, rgba(230, 207, 157, 0.95) 50%, rgba(230, 207, 157, 0.55) 84%, transparent);
}

.f-header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  max-width: 1180px;
  height: 74px;
  margin: 0 auto;
  padding: 0 24px;
}

.f-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #fff;
}

.f-brand:hover {
  text-decoration: none;
}

.f-brand .emblem {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
}

.f-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.f-brand-text b {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
}

.f-brand-text i {
  margin-top: 3px;
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.26em;
  color: rgba(255, 235, 200, 0.72);
}

.f-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  align-self: stretch;
  margin-left: auto;
}

.f-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 100%;
  padding: 0 16px;
  color: rgba(255, 246, 232, 0.82);
  font-size: 14px;
  letter-spacing: 0.04em;
}

.f-nav a:hover {
  color: #fff;
  text-decoration: none;
}

.f-nav a.active {
  color: #fff;
  font-weight: 600;
}

.f-nav a.active::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  height: 2px;
  background: var(--gold-soft);
}

.f-user {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-left: 18px;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 244, 228, 0.86);
  font-size: 13px;
  white-space: nowrap;
}

.f-user .avatar {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(230, 207, 157, 0.55);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.13);
  color: #fff8ea;
  font-family: var(--serif);
  font-size: 14px;
}

.f-user .btn-text {
  color: rgba(255, 235, 205, 0.68);
  font-size: 12px;
}

.f-user .btn-text:hover {
  color: #fff;
}

.f-main {
  flex: 1 0 auto;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.f-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.f-footer {
  flex: 0 0 auto;
  border-top: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.6);
  padding: 18px 24px 26px;
  color: #8a7666;
  font-size: 12px;
}

.f-footer-inner {
  max-width: 1180px;
  margin: 0 auto;
}

/* 登录 */

.login-page {
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  min-height: 100vh;
}

.login-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 46px 52px 42px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(900px 500px at 88% 0%, rgba(238, 28, 37, 0.5), transparent 62%),
    linear-gradient(150deg, #560000 0%, #8a0000 38%, #b30000 68%, #cc0000 100%);
}

.login-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 10px);
}

.login-visual::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -150px;
  width: 420px;
  height: 420px;
  border: 1px solid rgba(230, 207, 157, 0.2);
  border-radius: 50%;
  box-shadow: 0 0 0 64px rgba(230, 207, 157, 0.055), 0 0 0 128px rgba(230, 207, 157, 0.035);
}

.login-visual > * {
  position: relative;
  z-index: 1;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 241, 220, 0.86);
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.14em;
}

.login-brand .emblem {
  width: 38px;
  height: 38px;
}

.login-hero {
  max-width: 520px;
  margin: auto 0;
  padding-bottom: 18px;
}

.login-kicker {
  margin: 0 0 16px;
  color: var(--gold-soft);
  font-size: 11px;
  letter-spacing: 0.32em;
}

.login-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 46px;
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: 0.06em;
  color: #fff;
}

.login-title em {
  font-style: normal;
  color: #ffe9b8;
}

.login-form-area {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 28px;
  background: transparent;
}

.login-box {
  width: 100%;
  max-width: 360px;
}

.login-form-title {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.login-note {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 12.5px;
}

.login-box .btn {
  margin-top: 6px;
}

/* 页头 */

.f-page-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.f-page-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--ink);
}

.f-page-date {
  color: var(--muted);
  font-size: 13px;
}

/* 欢迎区 */

.welcome {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 176px;
  padding: 26px 32px;
  overflow: hidden;
  color: #fff;
  border: 1px solid #7d0a06;
  background: linear-gradient(108deg, #6b0000 0%, #990000 34%, #c00000 72%, #dc241f 100%);
  box-shadow: 0 22px 44px -30px rgba(90, 0, 0, 0.75);
}

.welcome::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 9px);
}

.welcome::after {
  content: "";
  position: absolute;
  top: -170px;
  right: -110px;
  width: 430px;
  height: 430px;
  border: 1px solid rgba(230, 207, 157, 0.18);
  border-radius: 50%;
  box-shadow: 0 0 0 62px rgba(230, 207, 157, 0.05), 0 0 0 124px rgba(230, 207, 157, 0.035);
}

.welcome-body {
  position: relative;
  z-index: 1;
}

.welcome-kicker {
  margin: 0 0 8px;
  color: rgba(255, 232, 194, 0.78);
  font-size: 11px;
  letter-spacing: 0.3em;
}

.welcome-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 29px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.35;
}

.welcome-title span {
  color: #ffe9b8;
}

.welcome-meta {
  margin: 10px 0 0;
  color: rgba(255, 244, 228, 0.72);
  font-size: 12.5px;
  letter-spacing: 0.04em;
}

/* 今日进度卡 */

.f-main.is-home {
  display: flex;
  flex-direction: column;
}

.home-view {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
}

.today-card {
  display: flex;
  flex-direction: column;
  padding: 24px 26px 26px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 18px 36px -34px rgba(90, 20, 10, 0.6);
}

.today-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.today-card-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--ink);
}

.today-card-count {
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.today-card-count b {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--red-deep);
}

.today-progress {
  height: 6px;
  margin: 14px 0 14px;
  background: #ecdfcb;
}

.today-progress i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #990000, #dc241f 65%, #ee1c25);
  transition: width 0.3s ease;
}

.today-dots {
  display: grid;
  grid-template-columns: repeat(20, 1fr);
  gap: 6px;
  margin-top: 16px;
}

.today-dots span {
  height: 30px;
  border: 1px solid #e6d8c3;
  background: #fffdf8;
  border-radius: 2px;
}

.today-dots span.on {
  border-color: #d8b2ae;
  background: linear-gradient(180deg, #fbe9e4, #f5d9d2);
}

.today-card-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.today-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
}

.today-card.is-done {
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 34px 26px 30px;
}

.today-done-mark {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border: 1px solid #cfe0d3;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  font-size: 24px;
}

.today-done-title {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 21px;
  letter-spacing: 0.03em;
  color: var(--ink);
}

.today-done-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.today-done-note b {
  font-family: var(--serif);
  font-size: 20px;
  color: var(--red-deep);
}

.today-card.is-done .today-actions {
  justify-content: center;
}

/* 答题 */

.f-main.is-quiz > .quiz-head,
.f-main.is-quiz > .quiz-progress,
.f-main.is-quiz > .q-panel {
  width: 100%;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}

.quiz-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.quiz-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
}

.quiz-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.quiz-sub b {
  color: var(--ink-2);
  font-weight: 600;
}

.quiz-exit {
  flex: 0 0 auto;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.quiz-exit:hover {
  color: var(--red-deep);
}

.quiz-progress {
  height: 4px;
  margin: 12px 0 20px;
  background: #eaddc9;
}

.quiz-progress i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #990000, #dc241f 60%, #ee1c25);
  transition: width 0.25s ease;
}

.q-panel {
  padding: 28px 30px 22px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 18px 36px -34px rgba(90, 20, 10, 0.6);
}

.q-kicker {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 12px;
}

.q-stem {
  margin: 0 0 20px;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.85;
  color: var(--ink);
}

.options {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e2d5c1;
  border-radius: 3px;
  background: #fffdf8;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.7;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.option:hover {
  border-color: #cfae9a;
  background: #fffaf0;
}

.option.selected {
  border-color: var(--red-mid);
  background: #fdf0ec;
  box-shadow: inset 0 0 0 1px rgba(204, 0, 0, 0.4);
}

.option-key {
  flex: 0 0 24px;
  height: 24px;
  margin-top: 1px;
  display: grid;
  place-items: center;
  border: 1px solid #d5c4ad;
  border-radius: 50%;
  background: #fff;
  color: #8b6a52;
  font-size: 12px;
}

.option.selected .option-key {
  border-color: var(--red-deep);
  background: var(--red-mid);
  color: #fff;
}

.option-text {
  flex: 1;
  min-width: 0;
}

.q-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px dashed #e3d5c1;
}

.q-actions-note {
  flex: 1;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.q-hint-done {
  margin: 16px 0 0;
  padding: 10px 12px;
  border: 1px dashed #e3c4a9;
  background: #fdf8ef;
  color: #7a4a2a;
  font-size: 12.5px;
}

.quiz-complete {
  padding: 44px 20px 40px;
  text-align: center;
}

.quiz-complete-mark {
  width: 54px;
  height: 54px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border: 1px solid #cfe0d3;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  font-size: 26px;
}

.quiz-complete-title {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 21px;
  letter-spacing: 0.03em;
  color: var(--ink);
}

.quiz-complete-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

/* 成绩 */

.back-link {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12.5px;
}

.back-link:hover {
  color: var(--red-deep);
}

.result-hero {
  position: relative;
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 30px 36px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(105deg, #fffdf8, #fbf3e6);
  box-shadow: 0 18px 36px -34px rgba(90, 20, 10, 0.6);
}

.score-ring {
  --p: 0;
  position: relative;
  flex: 0 0 156px;
  width: 156px;
  height: 156px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(#dc241f calc(var(--p) * 1%), #eadcc6 0);
}

.score-ring::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: #fffdf8;
  box-shadow: inset 0 0 0 1px #eadcc6;
}

.score-ring::after {
  content: "";
  position: absolute;
  inset: -6px;
  border: 1px solid rgba(193, 154, 75, 0.4);
  border-radius: 50%;
}

.score-center {
  position: relative;
  z-index: 1;
  text-align: center;
}

.score-num {
  font-family: var(--serif);
  font-size: 50px;
  font-weight: 700;
  line-height: 1;
  color: var(--red-deep);
  font-variant-numeric: tabular-nums;
}

.score-num small {
  margin-left: 2px;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--muted);
}

.score-label {
  margin-top: 6px;
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.18em;
}

.result-info {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
}

.result-kicker {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.18em;
}

.result-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 23px;
  letter-spacing: 0.03em;
  color: var(--ink);
}

.result-facts {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 8px 34px;
  margin: 18px 0;
  padding: 14px 0;
  border-top: 1px solid #eadfd0;
  border-bottom: 1px solid #eadfd0;
}

.result-facts em {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-style: normal;
  font-size: 11.5px;
}

.result-facts span {
  color: var(--ink-2);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.review-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 26px 0 14px;
}

.tabs {
  display: inline-flex;
  border: 1px solid var(--line);
  background: var(--surface);
}

.tab {
  padding: 7px 16px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}

.tab + .tab {
  border-left: 1px solid var(--line);
}

.tab.active {
  background: var(--red-mid);
  color: #fff;
}

.toolbar-note {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

/* 学习记录 */

.records {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 18px 36px -34px rgba(90, 20, 10, 0.45);
}

.record-row {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) 84px 64px 12px;
  gap: 16px;
  align-items: center;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  color: inherit;
}

.record-row:last-child {
  border-bottom: 0;
}

.record-row:hover {
  background: #fbf4ea;
  text-decoration: none;
}

.record-date {
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.record-main {
  display: block;
  min-width: 0;
}

.record-range {
  display: block;
  color: var(--ink);
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}

.record-meta {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.record-count {
  color: var(--muted);
  font-size: 12.5px;
  text-align: right;
}

.record-score {
  font-family: var(--serif);
  font-size: 21px;
  text-align: right;
  color: var(--red-deep);
  font-variant-numeric: tabular-nums;
}

.record-arrow {
  color: #c3ab8f;
  font-size: 16px;
  text-align: right;
}

@media (max-width: 980px) {
  .login-visual {
    padding: 40px 40px 36px;
  }

  .login-title {
    font-size: 40px;
  }
}

@media (max-width: 860px) {
  .result-hero {
    gap: 26px;
    padding: 24px 26px;
  }
}

@media (max-width: 760px) {
  .f-header-inner {
    flex-wrap: wrap;
    gap: 0;
    height: auto;
    padding: 10px 16px 0;
  }

  .f-brand-text b {
    font-size: 16px;
  }

  .f-brand-text i {
    display: none;
  }

  .f-brand .emblem {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .f-user {
    margin-left: auto;
    padding-left: 0;
    border-left: 0;
  }

  .f-user .name {
    display: none;
  }

  .f-nav {
    order: 3;
    width: 100%;
    height: 42px;
    margin-left: 0;
    justify-content: center;
    gap: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
  }

  .f-nav a {
    height: 42px;
    padding: 0 18px;
    font-size: 13.5px;
  }

  .f-nav a.active::after {
    left: 18px;
    right: 18px;
    bottom: 6px;
  }

  .f-main {
    padding: 22px 16px 48px;
  }

  .f-page-title {
    font-size: 22px;
  }

  .f-page-date {
    font-size: 12px;
  }

  .login-page {
    grid-template-columns: 1fr;
    min-height: 100vh;
  }

  .login-visual {
    min-height: 250px;
    padding: 28px 24px 26px;
  }

  .login-hero {
    margin: 24px 0 0;
    padding-bottom: 0;
  }

  .login-title {
    font-size: 32px;
  }

  .login-form-area {
    padding: 34px 24px 48px;
  }

  .welcome {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    min-height: auto;
    padding: 24px 22px;
  }

  .welcome-title {
    font-size: 24px;
  }

  .q-panel {
    padding: 20px 18px 18px;
  }

  .q-stem {
    font-size: 17px;
  }

  .today-card {
    padding: 20px 18px 22px;
  }

  .today-dots {
    grid-template-columns: repeat(10, 1fr);
    gap: 5px;
    margin-top: 14px;
  }

  .today-dots span {
    height: 30px;
  }

  .today-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .today-actions .btn {
    width: 100%;
  }

  .q-actions {
    gap: 8px;
  }

  .q-actions .btn {
    flex: 0 0 auto;
  }

  .q-actions-note {
    font-size: 11.5px;
  }

  .result-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  .result-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .record-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    gap: 4px 12px;
    padding: 14px 16px;
  }

  .record-date {
    grid-column: 1;
    grid-row: 1;
  }

  .record-main {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .record-count,
  .record-arrow {
    display: none;
  }

  .record-score {
    grid-column: 2;
    grid-row: 1;
    font-size: 19px;
  }
}

@media (max-width: 420px) {
  .f-brand-text b {
    font-size: 15px;
  }

  .f-brand .emblem {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }

  .login-title {
    font-size: 28px;
  }

  .score-ring {
    width: 136px;
    height: 136px;
    flex-basis: 136px;
  }

  .score-num {
    font-size: 42px;
  }
}
