:root {
  --page: #f6f8fb;
  --card: #ffffff;
  --ink: #071b3a;
  --muted: #526783;
  --soft: #f7fbff;
  --line: #e3eaf2;
  --blue: #1f66ff;
  --blue-soft: #eaf3ff;
  --green: #079b73;
  --green-soft: #e7f8f1;
  --dark: #101a30;
  --red: #d95353;
  --shadow: 0 18px 48px rgba(30, 48, 72, 0.09);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
}

html {
  scrollbar-gutter: stable;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--page);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app {
  width: min(100%, 1280px);
  margin: 0 auto;
  padding: 30px 22px 52px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  margin-bottom: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, var(--blue), var(--green));
  font-weight: 900;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: 18px;
}

.brand span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.quiet-button,
.back-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  color: var(--muted);
  background: transparent;
  text-decoration: none;
}

.site-header .brand {
  margin-right: auto;
}

.member-name {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.activation-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(7, 27, 58, 0.42);
}

.activation-card {
  position: relative;
  width: min(100%, 430px);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(7, 27, 58, 0.22);
}

.activation-card h1 {
  margin: 6px 0 8px;
  font-size: 26px;
}

.activation-card > p:not(.eyebrow) {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.65;
}

.activation-card label,
.activation-card label span {
  display: block;
}

.activation-card label span {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.activation-card input {
  width: 100%;
  min-height: 48px;
  margin-bottom: 16px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

.activation-card input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}

.activation-card .primary-button {
  width: 100%;
}

.contact-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 22px 0 16px;
  color: var(--muted);
  font-size: 12px;
}

.contact-divider::before,
.contact-divider::after {
  height: 1px;
  flex: 1;
  background: var(--line);
  content: "";
}

.wechat-contact {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.wechat-contact img {
  width: 132px;
  height: 132px;
  display: block;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.wechat-contact strong,
.wechat-contact span {
  display: block;
}

.wechat-contact strong {
  margin-bottom: 6px;
  font-size: 15px;
}

.wechat-contact span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: var(--page);
  font-size: 22px;
}

body.modal-open {
  overflow: hidden;
}

.quiet-button:hover,
.back-button:hover {
  color: var(--blue);
  background: #eef5ff;
}

.home-screen {
  display: grid;
  gap: 28px;
  width: min(100%, 1120px);
  margin: 0 auto;
}

.cert-card {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  min-height: 250px;
  padding: 38px 42px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.cert-icon {
  width: 100px;
  height: 100px;
  display: grid;
  place-items: center;
  border-radius: 28px;
  color: var(--blue);
  background: #dceaff;
  font-size: 34px;
  font-weight: 900;
}

.intermediate-card .cert-icon {
  color: var(--green);
  background: #d8f8eb;
}

.cert-body {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.intermediate-card .eyebrow {
  color: var(--green);
}

.cert-card h1,
.exam-setup h1,
.exam-result h1 {
  margin: 0;
  font-size: 29px;
  line-height: 1.25;
  letter-spacing: 0;
}

.summary,
.exam-setup p {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin-top: 22px;
  color: #344a66;
  font-size: 15px;
}

.meta-row span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.meta-row span::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--blue);
}

.intermediate-card .meta-row span::before {
  background: var(--green);
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.primary-button,
.dark-button,
.light-button,
.secondary-button {
  min-height: 54px;
  padding: 0 28px;
  border: 1px solid transparent;
  border-radius: 15px;
  font-weight: 900;
}

.primary-button {
  color: #fff;
  background: var(--blue);
}

.primary-button.green {
  background: var(--green);
}

.primary-button:disabled {
  background: #a1a9b6;
  cursor: not-allowed;
}

.dark-button {
  color: #fff;
  background: var(--dark);
}

.light-button {
  color: var(--blue);
  border-color: #cfe0ff;
  background: #f5f9ff;
}

.light-button.green {
  color: var(--green);
  border-color: #bdebdc;
  background: #f1fbf7;
}

.secondary-button {
  color: var(--blue);
  border-color: #cfe0ff;
  background: #fff;
}

.work-screen {
  display: grid;
  gap: 18px;
}

.study-page {
  min-height: 100svh;
  overflow-y: scroll;
  background: #fff;
}

.study-page .app {
  width: 100%;
  min-height: 100svh;
  padding: 0;
}

.study-page .work-screen {
  min-height: 100svh;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 0;
}

.study-page .work-topbar,
.study-page .work-tools {
  width: 100%;
  padding-right: max(20px, calc((100vw - 1180px) / 2));
  padding-left: max(20px, calc((100vw - 1180px) / 2));
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

.study-page .work-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto minmax(150px, 1fr) auto auto;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
}

.study-page .work-tools {
  background: #f8fafc;
}

.study-account {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.study-account .member-name {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.answer-sheet-trigger {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid #cfe0ff;
  border-radius: 8px;
  color: #164a9b;
  background: #fff;
  font-weight: 800;
}

.answer-sheet-trigger:hover {
  border-color: #8eb4ff;
  background: var(--blue-soft);
}

.answer-sheet-trigger strong {
  padding-left: 8px;
  border-left: 1px solid var(--line);
  color: var(--green);
  font-size: 12px;
}

.answer-sheet-icon {
  color: var(--blue);
  font-size: 20px;
  line-height: 1;
}

.answer-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 24;
  visibility: hidden;
  background: rgba(7, 27, 58, 0.28);
  opacity: 0;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.answer-sheet-overlay.open {
  visibility: visible;
  opacity: 1;
}

.answer-sheet-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 25;
  width: min(390px, 100%);
  height: 100dvh;
  overflow-y: auto;
  padding: 28px 24px max(28px, env(safe-area-inset-bottom));
  border-left: 1px solid var(--line);
  background: #fff;
  box-shadow: -18px 0 48px rgba(7, 27, 58, 0.14);
  transform: translateX(102%);
  transition: transform 220ms ease;
}

.answer-sheet-drawer.open {
  transform: translateX(0);
}

.answer-sheet-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.answer-sheet-header span {
  color: var(--muted);
  font-size: 12px;
}

.answer-sheet-header h2 {
  margin: 5px 0 0;
  font-size: 20px;
  letter-spacing: 0;
}

.answer-sheet-close {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: #f1f5f9;
  font-size: 24px;
  line-height: 1;
}

.answer-sheet-legend {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 20px 0;
}

.answer-sheet-legend span {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.answer-sheet-legend i {
  width: 12px;
  height: 12px;
  display: block;
  border: 1px solid #cbd7e5;
  border-radius: 3px;
  background: #fff;
}

.answer-sheet-legend i.current {
  border: 2px solid var(--blue);
}

.answer-sheet-legend i.answered {
  border-color: #b8e6d5;
  background: var(--green-soft);
}

.answer-sheet-legend i.wrong {
  border-color: #efb7b7;
  background: #fff0f0;
}

.answer-sheet-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.answer-number {
  aspect-ratio: 1;
  min-width: 0;
  border: 1px solid #cbd7e5;
  border-radius: 6px;
  color: #3e536f;
  background: #fff;
  font-size: 14px;
  font-weight: 800;
}

.answer-number:hover {
  border-color: #8eb4ff;
  color: var(--blue);
  background: #f5f9ff;
}

.answer-number.answered {
  border-color: #9ddac3;
  color: #087b5d;
  background: var(--green-soft);
}

.answer-number.wrong {
  border-color: #eba5a5;
  color: #b23d3d;
  background: #fff0f0;
}

.answer-number.current {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(31, 102, 255, 0.18);
}

.answer-number:disabled {
  border-color: #e5eaf0;
  color: #aab6c4;
  background: #f4f6f8;
  cursor: not-allowed;
}

.answer-sheet-open {
  overflow: hidden;
}

.study-page .screen {
  min-width: 0;
  padding: 24px 20px 48px;
  background: #fff;
}

.study-page .question-card {
  min-height: clamp(480px, calc(100svh - 210px), 760px);
  margin-top: 0;
  padding: 36px 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.study-page .exam-setup,
.study-page .exam-result {
  margin-top: 0;
}

.work-topbar,
.work-tools {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.work-topbar {
  justify-content: space-between;
}

.work-topbar > div:not(.mode-switch) {
  min-width: 0;
}

.work-topbar strong,
.work-topbar span {
  display: block;
}

.work-topbar strong {
  font-size: 18px;
}

.work-topbar span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.work-tools {
  justify-content: space-between;
  flex-wrap: wrap;
}

.mode-switch,
.level-switch {
  display: inline-grid;
  gap: 5px;
  padding: 5px;
  border-radius: 15px;
  background: #edf3f8;
}

.mode-switch {
  grid-template-columns: repeat(3, 1fr);
}

.level-switch {
  grid-template-columns: 1fr 1fr;
}

.mode-switch button,
.level-switch button {
  min-height: 38px;
  min-width: 76px;
  border: 0;
  border-radius: 11px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}

.mode-switch button.active {
  color: #fff;
  background: var(--blue);
}

.level-switch button.active {
  color: #fff;
  background: var(--green);
}

.type-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.type-filter label {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #fff;
  font-size: 13px;
  font-weight: 700;
}

.type-filter input {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
}

.stats-row {
  display: flex;
  gap: 10px;
}

.stats-row div {
  min-width: 82px;
  display: grid;
  justify-items: center;
  gap: 1px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}

.stats-row strong {
  color: var(--blue);
  font-size: 18px;
}

.stats-row span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.question-card,
.exam-setup,
.exam-result {
  width: min(100%, 900px);
  margin: 12px auto 0;
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.card-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid #cfe0ff;
  border-radius: 999px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 13px;
  font-weight: 800;
}

.counter-label,
.type-label {
  color: var(--muted);
  font-size: 13px;
}

.counter-label {
  justify-self: center;
}

.progress-track {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef3f8;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green));
}

.question-title {
  margin: 26px 0 30px;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.5;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.question-images {
  display: grid;
  gap: 12px;
  margin: -12px 0 28px;
}

.question-images img {
  display: block;
  width: auto;
  max-width: min(100%, 680px);
  max-height: 360px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(28, 55, 96, 0.08);
}

.review-item .question-images {
  margin: 10px 0 14px;
}

.review-item .question-images img {
  max-height: 240px;
}

.option-list {
  display: grid;
  gap: 13px;
}

.option-item {
  min-height: 66px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: 17px;
  color: var(--ink);
  background: var(--soft);
  text-align: left;
}

.option-item:hover {
  border-color: #bcd3ff;
  background: #f1f6ff;
}

.option-item.selected {
  border-color: #5f92ff;
  color: #0b3e91;
  background: #e6f0ff;
  box-shadow: inset 0 0 0 1px rgba(31, 102, 255, 0.08);
}

.option-item.selected .option-letter {
  border-color: var(--blue);
  color: #fff;
  background: var(--blue);
}

.option-item.correct {
  border-color: #aee4d1;
  background: var(--green-soft);
}

.option-item.correct .option-letter {
  border-color: var(--green);
  color: #fff;
  background: var(--green);
}

.option-item.wrong {
  border-color: #efb7b7;
  background: #fff5f5;
}

.option-item.wrong .option-letter {
  border-color: var(--red);
  color: #fff;
  background: var(--red);
}

.option-letter {
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid #9fb1c9;
  border-radius: 10px;
  color: #7085a0;
  background: #fff;
  font-weight: 900;
}

.option-text {
  font-size: 17px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.short-answer {
  display: grid;
  gap: 8px;
}

.short-answer span {
  color: var(--muted);
  font-size: 13px;
}

.short-answer textarea {
  min-height: 180px;
  width: 100%;
  resize: vertical;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 17px;
  color: var(--ink);
  background: var(--soft);
  font-size: 16px;
  line-height: 1.7;
}

.card-actions {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr) minmax(150px, 0.75fr);
  gap: 12px;
  margin-top: 30px;
}

.answer-panel {
  margin-top: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 17px;
  color: #31445e;
  background: #fbfdff;
  line-height: 1.8;
}

.answer-panel.correct {
  border-color: #aee4d1;
  background: var(--green-soft);
}

.answer-panel.wrong {
  border-color: #efb7b7;
  background: #fff7f7;
}

.exam-setup,
.exam-result {
  display: grid;
  gap: 22px;
}

.exam-rule-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: #fbfdff;
}

.exam-rule-card strong {
  font-size: 17px;
}

.exam-rule-card p {
  margin: 0;
  color: var(--blue);
  font-weight: 900;
}

.exam-rule-card div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.exam-rule-card span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #fff;
  font-size: 12px;
  font-weight: 700;
}

.timer {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--green);
  background: var(--green-soft);
  font-weight: 900;
}

.score {
  color: var(--blue);
  font-size: 58px;
  line-height: 1;
  font-weight: 900;
}

.score small {
  color: var(--muted);
  font-size: 22px;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.result-grid div,
.review-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfdff;
}

.result-grid strong,
.result-grid span {
  display: block;
}

.result-grid strong {
  font-size: 22px;
}

.result-grid span,
.review-item p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.review-list {
  display: grid;
  gap: 12px;
}

.review-item h3 {
  margin: 8px 0;
  font-size: 16px;
  line-height: 1.5;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 10;
  transform: translate(-50%, 18px);
  max-width: min(92vw, 520px);
  padding: 12px 16px;
  border-radius: 999px;
  color: #fff;
  background: rgba(16, 26, 48, 0.94);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 760px) {
  .app {
    padding: 18px 12px 36px;
  }

  .study-page .app {
    padding: 0;
  }

  .site-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .site-header .brand {
    width: calc(100% - 150px);
  }

  .member-name {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .site-header .quiet-button {
    flex: 1 1 auto;
    min-width: 88px;
  }

  .brand span {
    display: none;
  }

  .home-screen {
    gap: 18px;
  }

  .cert-card {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 24px;
    border-radius: 24px;
  }

  .cert-icon {
    width: 74px;
    height: 74px;
    border-radius: 22px;
    font-size: 25px;
  }

  .cert-card h1 {
    font-size: 24px;
  }

  .summary {
    font-size: 15px;
  }

  .home-actions,
  .work-topbar,
  .work-tools {
    display: grid;
    grid-template-columns: 1fr;
  }

  .study-page .work-topbar {
    position: static;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    padding: 12px 14px;
  }

  .study-page .work-topbar .mode-switch,
  .study-page .study-account {
    grid-column: 1 / -1;
  }

  .study-page .study-account {
    justify-content: space-between;
  }

  .study-page .work-tools {
    padding: 12px 14px;
  }

  .answer-sheet-trigger {
    width: 100%;
  }

  .answer-sheet-drawer {
    top: auto;
    bottom: 0;
    width: 100%;
    height: min(72dvh, 620px);
    padding: 22px 18px max(24px, env(safe-area-inset-bottom));
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    transform: translateY(102%);
  }

  .answer-sheet-drawer.open {
    transform: translateY(0);
  }

  .study-page .screen {
    padding: 14px 14px max(55svh, env(safe-area-inset-bottom));
  }

  .study-page .question-card {
    min-height: 0;
    padding: 16px 0 24px;
    border-radius: 0;
  }

  .study-page #practiceCard .card-top .pill,
  .study-page #practiceCard .counter-label,
  .study-page #wrongCard .card-top .pill,
  .study-page #wrongCard .counter-label {
    display: none;
  }

  .primary-button,
  .dark-button,
  .secondary-button {
    width: 100%;
  }

  .mode-switch,
  .level-switch {
    width: 100%;
  }

  .type-filter,
  .stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .stats-row {
    grid-template-columns: repeat(3, 1fr);
  }

  .question-card,
  .exam-setup,
  .exam-result {
    padding: 24px;
    border-radius: 24px;
  }

  .card-top,
  .card-actions,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .counter-label {
    justify-self: start;
  }

  .study-page .type-label,
  .study-page .card-top {
    scroll-margin-top: 10px;
  }

  .question-title {
    font-size: 23px;
  }

  .question-images img {
    width: 100%;
    max-height: 280px;
  }

  .activation-modal {
    align-items: end;
    padding: 0;
  }

  .activation-card {
    width: 100%;
    max-height: calc(100vh - 12px);
    padding: 28px 20px max(24px, env(safe-area-inset-bottom));
    border-radius: 8px 8px 0 0;
  }

  .wechat-contact {
    grid-template-columns: 118px minmax(0, 1fr);
  }

  .wechat-contact img {
    width: 118px;
    height: 118px;
  }
}

@media (max-width: 430px) {
  .meta-row {
    gap: 10px 14px;
  }

  .type-filter {
    grid-template-columns: 1fr 1fr;
  }

  .stats-row div {
    min-width: 0;
  }
}
