body.readingExamMode {
  overflow: hidden;
  background: #eef3fb;
}

body.readingExamMode .topbar,
body.readingExamMode #calculator580Root,
body.readingExamMode #worldChatRoot,
body.readingExamMode #friendsRoot,
body.readingExamMode #playerLeaderboardRoot,
body.readingExamMode #guildRoot,
body.readingExamMode #dailyMissionsRoot {
  display: none !important;
}

body.readingExamMode #app.app {
  width: 100%;
  max-width: none;
  height: 100dvh;
  min-height: 100dvh;
  padding: 0;
  margin: 0;
}

.readingExamShell {
  --reading-blue: #3157d5;
  --reading-blue-soft: #eef2ff;
  --reading-line: #dce3f2;
  height: 100dvh;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  color: #15213a;
  background: #eef3fb;
  font-family: "Be Vietnam Pro", Inter, system-ui, sans-serif;
}

.readingExamHeader {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 68px;
  padding: 10px 18px;
  border-bottom: 1px solid #d7dfef;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 8px 24px rgba(31, 48, 83, 0.08);
}

.readingExamHeaderMain {
  min-width: 0;
}

.readingExamEyebrow {
  margin-bottom: 3px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.readingExamTitle {
  margin: 0;
  overflow: hidden;
  color: #12203a;
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.readingExamHeaderActions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 9px;
}

.readingExamTimer,
.readingExamProgressPill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 13px;
  border: 1px solid #d9e1f0;
  border-radius: 14px;
  background: #f8fafc;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.readingExamTimer {
  border-color: #f2d391;
  background: #fff8df;
  color: #8b5a00;
}

.readingExamHeaderBtn {
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid #d9e1f0;
  border-radius: 14px;
  background: #fff;
  color: #24324c;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.readingExamHeaderBtn:hover {
  border-color: #aebde0;
  background: #f8faff;
}

.readingExamHeaderBtn.isSubmit {
  border-color: #d9343a;
  background: linear-gradient(135deg, #e94c51, #cb2e34);
  color: #fff;
  box-shadow: 0 9px 20px rgba(203, 46, 52, 0.2);
}

.readingExamMain {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(360px, 3fr);
  gap: 12px;
  padding: 12px;
}

.readingExamPane {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--reading-line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(31, 48, 83, 0.09);
}

.readingPassagePane,
.readingQuestionsPane {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.readingPaneHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 50px;
  padding: 11px 15px;
  border-bottom: 1px solid var(--reading-line);
  background: linear-gradient(180deg, #fbfcff, #f6f8fd);
}

.readingPaneTitle {
  color: #17233c;
  font-size: 15px;
  font-weight: 800;
}

.readingPaneMeta {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.readingPassageScroll,
.readingQuestionsScroll {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #a9b8d6 #edf1f8;
  scrollbar-width: thin;
}

.readingPassageScroll {
  padding: 16px 16px 88px;
  background: #f7f9fd;
}

.readingPassageDocument {
  width: min(100%, 1040px);
  margin: 0 auto 16px;
  padding: 14px;
  border: 1px solid #dce3ef;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(31, 48, 83, 0.07);
}

.readingPassageDocument:last-child {
  margin-bottom: 0;
}

.readingPassageLabel {
  margin: 0 0 10px;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.readingPassageImage {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 8px;
  background: #fff;
}

.readingPassageImage + .readingPassageImage {
  margin-top: 10px;
}

.readingPassageError {
  padding: 18px;
  border: 1px dashed #ef9a9a;
  border-radius: 10px;
  color: #b4232a;
  background: #fff5f5;
  font-size: 13px;
  font-weight: 700;
}

.readingQuestionsScroll {
  padding: 12px 12px 88px;
  background: #f7f9fd;
}

.readingQuestionCard {
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid #dbe3f2;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 6px 17px rgba(31, 48, 83, 0.065);
}

.readingQuestionCard:last-child {
  margin-bottom: 0;
}

.readingQuestionCard.isAnswered {
  border-color: #a7b9eb;
}

.readingQuestionCardHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border-bottom: 1px solid #e4e9f3;
  background: #fbfcff;
}

.readingQuestionNumber {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #1d2b47;
  font-size: 14px;
  font-weight: 800;
}

.readingQuestionNumberBadge {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 10px;
  background: var(--reading-blue);
  color: #fff;
  font-size: 12px;
}

.readingQuestionType {
  color: #667085;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.readingQuestionBody {
  padding: 12px;
}

.readingQuestionStem .contentTextBlock {
  color: #172033 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.55 !important;
}

.readingQuestionStem .contentLatex {
  font-size: 16px !important;
}

.readingAnswerArea {
  margin-top: 10px;
}

.readingChoiceList {
  display: grid;
  gap: 8px;
}

.readingChoiceBtn {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #dbe2ef;
  border-radius: 12px;
  background: #fff;
  color: #1e293b;
  text-align: left;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  cursor: pointer;
}

.readingChoiceBtn:hover {
  border-color: #a9b9df;
  background: #f8faff;
}

.readingChoiceBtn.isSelected {
  border-color: #526fda;
  background: #eef2ff;
  box-shadow: 0 0 0 2px rgba(82, 111, 218, 0.12);
}

.readingShortInput {
  width: 100%;
  min-height: 46px;
  padding: 11px 12px;
  border: 1px solid #cfd8e8;
  border-radius: 12px;
  outline: none;
  background: #fff;
  color: #172033;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
}

.readingShortInput:focus {
  border-color: #526fda;
  box-shadow: 0 0 0 3px rgba(82, 111, 218, 0.12);
}

.readingTrueFalseList {
  display: grid;
  gap: 9px;
}

.readingTrueFalseRow {
  padding: 10px;
  border: 1px solid #e0e6f1;
  border-radius: 12px;
  background: #fbfcff;
}

.readingTrueFalseText {
  margin-bottom: 8px;
  color: #26344f;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.readingTrueFalseActions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.readingTFBtn {
  min-height: 36px;
  border: 1px solid #d6deec;
  border-radius: 10px;
  background: #fff;
  color: #475569;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.readingTFBtn.isSelected[data-value="true"] {
  border-color: #34a66f;
  background: #eaf8f0;
  color: #16734a;
}

.readingTFBtn.isSelected[data-value="false"] {
  border-color: #dc6468;
  background: #fff0f0;
  color: #ad2d34;
}

.readingDragPool {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
}

.readingDragPiece {
  padding: 8px 10px;
  border: 1px solid #cbd6eb;
  border-radius: 10px;
  background: #f8faff;
  color: #273552;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.readingDragPiece.isSelected {
  border-color: #526fda;
  background: #e8edff;
}

.readingDragPiece.isUsed {
  opacity: 0.42;
}

.readingDragReset {
  width: auto;
  min-width: 94px;
  margin: 10px 0 0;
  padding-inline: 14px;
}

.readingQuestionCard .inlineDropSlot:focus-visible,
.readingDragPiece:focus-visible,
.readingChoiceBtn:focus-visible,
.readingTFBtn:focus-visible {
  outline: 3px solid rgba(82, 111, 218, 0.22);
  outline-offset: 2px;
}

.readingQuestionCard .inlineDropSlot {
  min-width: 74px;
  min-height: 34px;
  margin: 2px 4px;
  border: 1px dashed #8094c8;
  border-radius: 9px;
  background: #f4f7ff;
  color: #243865;
  font-size: 12px;
  font-weight: 800;
  vertical-align: middle;
}

.readingQuestionCard .inlineDropSlot.filled {
  border-style: solid;
  background: #e9efff;
}

.readingSupportToggle {
  width: calc(100% - 24px);
  min-height: 40px;
  margin: 0 12px 12px;
  border: 1px solid #cbd7f1;
  border-radius: 11px;
  background: #f1f5ff;
  color: #304fbd;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.readingSupportToggle:hover {
  background: #e8eeff;
}

.readingSupportBody {
  margin: 0 12px 12px;
  padding: 12px;
  border: 1px solid #d8e1f4;
  border-radius: 12px;
  background: #fbfcff;
}

.readingSupportSection + .readingSupportSection {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e0e6f1;
}

.readingSupportLabel {
  margin-bottom: 7px;
  color: #3653b9;
  font-size: 12px;
  font-weight: 800;
}

.readingSupportContent .contentTextBlock {
  color: #334155 !important;
  font-size: 13px !important;
  font-weight: 650 !important;
}

.readingExamPager {
  position: fixed;
  left: 20px;
  bottom: 18px;
  z-index: 20;
  display: flex;
  gap: 9px;
}

.readingPagerBtn {
  min-width: 116px;
  min-height: 46px;
  padding: 10px 18px;
  border: 1px solid #3454c6;
  border-radius: 14px;
  background: linear-gradient(135deg, #4469e5, #2f50c6);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(47, 80, 198, 0.25);
}

.readingPagerBtn.isBack {
  border-color: #cbd5e1;
  background: #fff;
  color: #334155;
  box-shadow: 0 8px 20px rgba(31, 48, 83, 0.12);
}

@media (max-width: 1100px) {
  .readingExamMain {
    grid-template-columns: minmax(0, 65fr) minmax(340px, 35fr);
  }

  .readingExamProgressPill {
    display: none;
  }
}

@media (max-width: 860px) {
  body.readingExamMode {
    overflow: auto;
  }

  body.readingExamMode #app.app,
  .readingExamShell {
    height: auto;
    min-height: 100dvh;
  }

  .readingExamHeader {
    align-items: flex-start;
    flex-direction: column;
    padding: 11px 12px;
  }

  .readingExamHeaderActions {
    width: 100%;
    flex-wrap: wrap;
  }

  .readingExamMain {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .readingPassagePane {
    height: min(48dvh, 520px);
  }

  .readingQuestionsPane {
    min-height: 70dvh;
  }

  .readingQuestionsScroll {
    overflow-y: visible;
  }

  .readingExamPager {
    left: 12px;
    bottom: 12px;
  }
}

@media (max-width: 560px) {
  .readingExamTitle {
    white-space: normal;
  }

  .readingExamTimer {
    order: 1;
  }

  .readingExamHeaderBtn {
    flex: 1 1 auto;
  }

  .readingExamMain {
    gap: 8px;
    padding: 8px;
  }

  .readingPassageScroll {
    padding: 8px;
  }

  .readingPassageDocument {
    padding: 7px;
  }

  .readingQuestionsScroll {
    padding: 8px 8px 80px;
  }
}
