:root {
  --orange: #ff5a1f;
  --orange-pressed: #e94d16;
  --orange-light: #fff4ef;
  --orange-softer: #fff8f5;
  --orange-border: #f6b28f;
  --text: #222222;
  --regular: #555555;
  --muted: #999999;
  --disabled: #c7c7c7;
  --page: #f7f7f8;
  --card: #ffffff;
  --border: #eeeeee;
  --divider: #f2f2f2;
  --success: #1fc48d;
  --success-light: #ecfdf5;
  --error: #f05252;
  --error-light: #fff1f2;
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: #eef0f3;
}

button,
textarea {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgb(255 90 31 / 42%);
  outline-offset: 2px;
}

.demo-stage {
  min-height: 100vh;
  display: grid;
  grid-template-columns: auto 250px;
  align-items: center;
  justify-content: center;
  gap: 34px;
  padding: 20px;
}

.phone {
  position: relative;
  width: min(390px, 100vw);
  height: min(844px, calc(100vh - 40px));
  min-height: 680px;
  overflow: hidden;
  border: 1px solid #dddddf;
  border-radius: 28px;
  background: var(--card);
  box-shadow: 0 24px 72px rgb(25 30 38 / 18%);
}

#app,
.practice-screen {
  width: 100%;
  height: 100%;
}

.practice-screen {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--card);
}

.demo-note {
  align-self: center;
  padding: 18px;
  border: 1px solid #e5e6e8;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 12px 36px rgb(31 45 61 / 8%);
}

.demo-note span {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 4px;
  background: var(--orange-light);
  color: var(--orange);
  font-size: 11px;
  font-weight: 600;
}

.demo-note strong {
  display: block;
  margin-top: 10px;
  font-size: 17px;
  line-height: 24px;
}

.demo-note p {
  margin: 8px 0 0;
  color: #777f87;
  font-size: 13px;
  line-height: 21px;
}

.status-bar {
  flex: 0 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 20px 0;
  background: #ffffff;
  color: #111111;
  font-size: 11px;
}

.status-bar strong {
  font-size: 13px;
  font-weight: 600;
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: pre;
}

.status-icons b {
  padding: 1px 4px;
  border-radius: 4px;
  background: #777777;
  color: #ffffff;
  font-size: 9px;
}

.practice-nav {
  flex: 0 0 54px;
  display: grid;
  grid-template-columns: 64px 1fr 64px;
  align-items: center;
  padding: 0 10px;
  background: #ffffff;
}

.nav-circle {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid #f0f0f0;
  border-radius: 50%;
  background: #ffffff;
}

.practice-nav .nav-circle:last-child {
  justify-self: end;
}

.mode-tabs {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.mode-tabs button {
  position: relative;
  height: 100%;
  padding: 0 2px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
}

.mode-tabs button.active {
  color: var(--text);
  font-weight: 600;
}

.mode-tabs button.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 24px;
  height: 3px;
  border-radius: 999px;
  background: var(--orange);
  transform: translateX(-50%);
}

.subject-progress {
  flex: 0 0 45px;
  background: #ffffff;
}

.subject-progress > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 37px;
  padding: 0 14px;
}

.subject-progress strong {
  font-size: 15px;
  font-weight: 600;
}

.subject-progress span {
  color: var(--regular);
  font-size: 14px;
}

.subject-progress > i {
  display: block;
  height: 6px;
  overflow: hidden;
  background: #dedede;
}

.subject-progress > i b {
  display: block;
  width: 28.6%;
  height: 100%;
  border-radius: 0 999px 999px 0;
  background: var(--orange);
}

.shared-stem {
  position: relative;
  max-height: 92px;
  overflow: hidden;
  padding: 11px 14px 10px 16px;
  border-top: 1px solid #ffe4d7;
  border-bottom: 1px solid var(--divider);
  background: #ffffff;
  box-shadow: inset 4px 0 0 var(--orange), 0 2px 7px rgb(25 30 38 / 5%);
  transition: max-height 260ms ease, box-shadow 260ms ease;
}

.shared-stem.expanded {
  max-height: 2000px;
  box-shadow: inset 4px 0 0 var(--orange), 0 4px 12px rgb(25 30 38 / 8%);
}

.shared-stem-heading {
  display: flex;
  align-items: center;
  min-height: 22px;
}

.type-tag {
  padding: 3px 6px;
  border-radius: 4px;
  background: var(--orange);
  color: #ffffff;
  font-size: 10px;
  font-weight: 600;
  line-height: 16px;
}

.shared-stem-heading button {
  flex: 0 0 auto;
  margin-left: auto;
  display: flex;
  align-items: center;
  color: var(--orange);
  font-size: 11px;
}

.shared-stem p {
  display: -webkit-box;
  margin: 5px 0 0;
  overflow: hidden;
  color: var(--regular);
  font-size: 15px;
  line-height: 23px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.shared-stem.expanded p {
  display: block;
  overflow: visible;
}

.shared-options-summary {
  word-break: keep-all;
}

.shared-stem.expanded .shared-options-summary {
  display: none;
}

.shared-option-list {
  display: grid;
  gap: 7px;
  margin: 10px 0 2px;
  padding: 0;
  list-style: none;
}

.shared-option-list li {
  display: grid;
  grid-template-columns: 26px 1fr;
  align-items: center;
  min-height: 26px;
  padding: 0 3px;
}

.shared-option-list li span {
  color: var(--regular);
  font-size: 14px;
}

.shared-option-list li strong {
  color: var(--regular);
  font-size: 14px;
  font-weight: 400;
}

.shared-stem:not(.expanded) .shared-option-list {
  display: none;
}

.shared-stem-media {
  margin: 10px 0 0;
}

.shared-stem-media img {
  display: block;
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border: 1px solid #e6e6e8;
  border-radius: 8px;
  background: #fafafa;
}

.shared-stem-media figcaption {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 17px;
}

.shared-stem:not(.expanded) .shared-stem-media {
  display: none;
}

.subquestion-tabs {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--divider);
  background: #ffffff;
}

.subquestion-tab-scroll {
  min-width: 0;
  flex: 1;
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 1px 2px;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.subquestion-tab-scroll::-webkit-scrollbar {
  display: none;
}

.subquestion-tab-scroll > button {
  position: relative;
  min-width: 62px;
  height: 31px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #ffffff;
  color: var(--regular);
  font-size: 11px;
}

.subquestion-tab-scroll > button.active,
.subquestion-tab-scroll > button.current {
  border-color: var(--orange);
  background: var(--orange-light);
  color: var(--orange);
  font-weight: 600;
}

.subquestion-tab-scroll > button.answered {
  border-color: var(--orange-border);
  color: var(--orange-pressed);
}

.subquestion-tab-scroll > button.correct {
  border-color: var(--success);
  background: var(--success-light);
  color: var(--success);
}

.subquestion-tab-scroll > button.wrong {
  border-color: var(--error);
  background: var(--error-light);
  color: var(--error);
}

.tab-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--orange);
}

.review-dot {
  background: var(--success);
}

.tab-mark {
  font-size: 12px;
  font-weight: 700;
}

.answered-summary {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.question-scroll {
  min-height: 0;
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  background: #ffffff;
  touch-action: pan-y;
}

.question-scroll::-webkit-scrollbar {
  display: none;
}

.question-panel {
  padding: 12px 14px 14px;
  animation: question-in 180ms ease-out;
}

.standalone-type {
  display: flex;
  margin-bottom: 9px;
}

.peer-notes-panel {
  min-height: 310px;
  padding: 14px;
  border-top: 8px solid var(--page);
  background: #ffffff;
  animation: question-in 180ms ease-out;
}

.peer-notes-header {
  display: flex;
  align-items: center;
  min-height: 28px;
  border-bottom: 1px solid var(--divider);
  padding-bottom: 10px;
}

.peer-notes-header > span {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--orange);
}

.peer-notes-header svg {
  width: 18px;
  height: 18px;
}

.peer-notes-header strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.peer-notes-header em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.peer-notes-empty {
  min-height: 230px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--disabled);
}

.peer-notes-empty > span {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fafafa;
}

.peer-notes-empty svg {
  width: 29px;
  height: 29px;
}

.peer-notes-empty p {
  margin: 12px 0 0;
  font-size: 12px;
}

.peer-notes-list {
  display: grid;
  gap: 10px;
  padding-top: 12px;
}

.peer-notes-list article {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.peer-notes-list article strong {
  font-size: 12px;
}

.peer-notes-list article p {
  margin: 6px 0 0;
  color: var(--regular);
  font-size: 12px;
  line-height: 18px;
}

@keyframes question-in {
  from {
    opacity: 0.5;
    transform: translateX(8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.question-heading {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 3px;
  align-items: start;
}

.question-heading > span,
.question-heading h1 {
  font-size: 15px;
  font-weight: 400;
  line-height: 22px;
}

.question-heading h1 {
  margin: 0;
}

.option-list {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.shared-answer-options {
  grid-template-columns: repeat(5, 46px);
  justify-content: space-between;
}

.question-option {
  width: 100%;
  min-height: 46px;
  display: grid;
  grid-template-columns: 27px 1fr 24px;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  text-align: left;
}

.shared-answer-option {
  position: relative;
  width: 46px;
  height: 46px;
  min-height: 46px;
  display: flex;
  justify-content: center;
  padding: 6px;
  border-radius: 6px;
  text-align: center;
}

.shared-answer-option .option-letter {
  justify-self: center;
}

.shared-answer-option .option-state {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 18px;
  height: 18px;
  border-radius: 6px 0 5px 0;
}

.shared-answer-option .option-state::after {
  font-size: 11px;
}

.shared-answer-option.wrong .option-state::after {
  font-size: 14px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.option-letter {
  align-self: center;
  color: var(--regular);
  font-size: 15px;
  line-height: 20px;
}

.option-copy {
  color: var(--regular);
  font-size: 14px;
  line-height: 20px;
}

.question-option.selected {
  border-color: var(--orange);
  background: #ffffff;
}

.question-option.selected .option-letter,
.question-option.selected .option-copy {
  color: var(--orange);
}

.question-option.correct {
  border-color: var(--success);
  background: var(--success-light);
}

.question-option.correct .option-letter,
.question-option.correct .option-copy {
  color: var(--success);
}

.question-option.wrong {
  border-color: var(--error);
  background: var(--error-light);
}

.question-option.wrong .option-letter,
.question-option.wrong .option-copy {
  color: var(--error);
}

.option-state {
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  justify-self: end;
  border-radius: 50%;
  background: currentColor;
  color: var(--success);
  font-size: 0;
}

.option-state::after {
  content: "✓";
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
}

.question-option.wrong .option-state {
  color: var(--error);
}

.question-option.wrong .option-state::after {
  content: "×";
  font-size: 15px;
}

.analysis-block {
  padding: 13px 14px 22px;
  border-top: 8px solid var(--page);
  background: #ffffff;
}

.answer-lines p {
  margin: 0;
  font-size: 13px;
  line-height: 21px;
}

.answer-lines strong {
  font-weight: 600;
}

.answer-empty {
  color: var(--muted);
}

.answer-selected {
  color: var(--orange);
}

.answer-wrong {
  color: var(--error);
}

.answer-correct {
  color: var(--success);
}

.data-card {
  height: 58px;
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  align-items: center;
  margin-top: 10px;
  border-radius: 8px;
  background: #f3f3f4;
}

.data-card div {
  display: grid;
  place-items: center;
}

.data-card strong {
  font-size: 17px;
  line-height: 22px;
}

.data-card span {
  color: var(--muted);
  font-size: 10px;
  line-height: 16px;
}

.data-card i {
  width: 1px;
  height: 34px;
  background: #d7d7d8;
}

.analysis-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 13px;
}

.analysis-title > span {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--orange);
}

.analysis-title strong {
  color: var(--text);
  font-size: 14px;
}

.analysis-title button {
  color: var(--muted);
  font-size: 10px;
}

.analysis-copy {
  margin: 7px 0 0;
  color: var(--regular);
  font-size: 12px;
  line-height: 18px;
}

.ai-button {
  width: 100%;
  height: 36px;
  margin-top: 11px;
  border-radius: 4px;
  background: linear-gradient(100deg, #13b7ee 0%, #8649ff 50%, #e338ed 100%);
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
}

.ai-button span {
  margin-right: 4px;
  font-size: 11px;
}

.group-actions {
  flex: 0 0 61px;
  display: flex;
  align-items: center;
  padding: 8px 14px 9px;
  border-top: 1px solid var(--divider);
  background: #ffffff;
  box-shadow: 0 -5px 18px rgb(31 45 61 / 4%);
}

.question-switcher {
  height: 29px;
  display: grid;
  grid-template-columns: 1fr 48px 1fr;
  align-items: center;
}

.question-switcher button {
  color: var(--orange);
  font-size: 11px;
}

.question-switcher button:first-child {
  text-align: left;
}

.question-switcher button:last-child {
  text-align: right;
}

.question-switcher button:disabled {
  color: var(--disabled);
  cursor: default;
}

.question-switcher span {
  color: var(--muted);
  text-align: center;
  font-size: 10px;
}

.group-submit,
.sheet-primary {
  width: 100%;
  height: 44px;
  border-radius: 999px;
  background: var(--orange-light);
  color: var(--orange);
  font-size: 14px;
  font-weight: 600;
}

.group-submit.enabled,
.sheet-primary {
  background: var(--orange);
  color: #ffffff;
}

.group-submit.complete,
.sheet-primary {
  background: var(--orange);
  color: #ffffff;
}

.group-submit:disabled {
  background: var(--orange-light);
  color: var(--orange);
  cursor: not-allowed;
}

.bottom-toolbar {
  flex: 0 0 61px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 3px 10px 5px;
  border-top: 1px solid var(--divider);
  background: #ffffff;
}

.bottom-toolbar button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  color: #262b35;
  font-size: 10px;
  line-height: 14px;
}

.bottom-toolbar button > span {
  height: 25px;
}

.bottom-toolbar button.active {
  color: var(--orange);
}

.toast {
  position: absolute;
  left: 50%;
  bottom: 170px;
  z-index: 30;
  max-width: 80%;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgb(34 34 34 / 88%);
  color: #ffffff;
  font-size: 11px;
  white-space: nowrap;
  transform: translateX(-50%);
}

.overlay {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgb(0 0 0 / 42%);
}

.sheet-overlay {
  align-items: end;
  padding: 0;
}

.answer-card-sheet,
.note-sheet {
  width: 100%;
  padding: 18px 18px calc(14px + env(safe-area-inset-bottom));
  border-radius: 20px 20px 0 0;
  background: #ffffff;
  box-shadow: 0 -12px 40px rgb(0 0 0 / 12%);
}

.answer-card-sheet header,
.note-sheet header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.answer-card-sheet h2,
.note-sheet h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}

.answer-card-sheet header button,
.note-sheet header button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--regular);
}

.card-stats {
  display: flex;
  gap: 22px;
  margin-top: 13px;
  color: var(--muted);
  font-size: 12px;
}

.card-stats strong {
  color: var(--orange);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 13px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 10px;
}

.legend span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #eeeeef;
}

.legend .legend-correct {
  background: var(--success);
}

.legend .legend-wrong {
  background: var(--error);
}

.legend .legend-answered {
  background: var(--orange-border);
}

.legend .legend-current {
  background: var(--orange);
}

.number-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 13px 18px;
  margin-top: 18px;
}

.number-grid button {
  aspect-ratio: 1;
  border-radius: 50%;
  background: #f1f2f3;
  color: var(--muted);
  font-size: 12px;
}

.number-grid button.correct {
  background: var(--success);
  color: #ffffff;
}

.number-grid button.wrong {
  background: var(--error);
  color: #ffffff;
}

.number-grid button.answered {
  background: var(--orange-light);
  color: var(--orange);
}

.number-grid button.active {
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--orange);
}

.number-grid button.active.unanswered {
  background: var(--orange);
  color: #ffffff;
}

.answer-card-sheet .sheet-primary,
.note-sheet .sheet-primary {
  margin-top: 22px;
}

.note-sheet textarea {
  width: 100%;
  height: 132px;
  margin-top: 14px;
  padding: 12px;
  resize: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--page);
  color: var(--text);
  font-size: 13px;
  line-height: 20px;
}

@media (max-width: 480px) {
  .demo-stage {
    display: block;
    min-height: 100vh;
    padding: 0;
  }

  .phone {
    width: 100vw;
    height: 100vh;
    min-height: 600px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .demo-note {
    display: none;
  }
}

@media (max-height: 730px) and (min-width: 761px) {
  .phone {
    min-height: 650px;
  }

  .shared-stem p {
    -webkit-line-clamp: 1;
  }

  .group-actions {
    flex-basis: 57px;
    padding-bottom: 5px;
  }

  .group-submit {
    height: 40px;
  }
}
