:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --ink: #17202a;
  --muted: #667085;
  --line: #d9e0e7;
  --brand: #166a73;
  --brand-dark: #0e454b;
  --accent: #d99b28;
  --good: #2f8a5b;
  --warn: #c77b21;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  border-radius: 6px;
  background: var(--brand);
  color: #fff;
  padding: 11px 16px;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: var(--brand-dark);
}

button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.secondary-button {
  background: #eef3f4;
  color: var(--brand-dark);
  border: 1px solid #c9d8da;
}

.secondary-button:hover {
  background: #dfeaec;
}

.danger-button {
  background: var(--danger);
}

.danger-button:hover {
  background: #7a271a;
}

.hidden {
  display: none !important;
}

.app-shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 16px 0 22px;
}

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

.app-logo {
  width: 150px;
  height: 48px;
  object-fit: contain;
  flex: 0 0 auto;
}

.topbar h1,
.start-title,
.start-copy h2,
.question-head h2,
.result-screen h2 {
  margin: 0;
  letter-spacing: 0;
}

.start-title {
  font-size: 26px;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.exam-meta {
  display: flex;
  gap: 12px;
}

.exam-meta div,
.section-card {
  min-width: 150px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  padding: 10px 12px;
}

.exam-meta span,
.section-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.start-screen,
.admin-screen,
.result-screen {
  position: relative;
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 28px;
  min-height: 480px;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 40px;
}

.start-footer {
  position: absolute;
  right: 18px;
  bottom: 14px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.admin-login-note {
  position: absolute;
  left: 18px;
  bottom: 14px;
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.admin-login-note button {
  background: transparent;
  color: var(--brand-dark);
  border: 0;
  padding: 0;
  font-size: 12px;
  font-weight: 800;
  text-decoration: underline;
}

.start-copy h2 {
  max-width: 620px;
  font-size: 40px;
  line-height: 1.12;
}

.start-copy p:last-child {
  max-width: 640px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

.start-form {
  display: grid;
  gap: 16px;
}

.start-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 700;
}

.start-form input,
.start-form select,
.admin-form input,
.admin-form select,
.admin-form textarea,
.admin-list input,
.admin-list select {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  color: var(--ink);
  background: #fff;
}

.admin-screen {
  display: block;
  min-height: 620px;
  overflow: hidden;
}

.admin-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 22px;
}

.admin-head h2 {
  margin: 0;
}

.admin-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: -6px 0 18px;
}

.admin-menu button {
  border: 1px solid var(--line);
}

.admin-menu button.current {
  background: var(--brand);
  color: #fff;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(280px, 1.2fr) minmax(420px, 2fr);
  gap: 18px;
  max-width: 100%;
  align-items: start;
}

.admin-list,
.admin-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  min-width: 0;
  max-width: 100%;
}

.admin-form {
  overflow: hidden;
}

.admin-list label,
.admin-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 700;
}

.section-passage-editor {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.section-passage-editor textarea {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  color: var(--ink);
  resize: vertical;
}

.group-image-editor {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.group-image-editor span {
  color: var(--muted);
  font-weight: 700;
}

.admin-question-list {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  max-height: 430px;
  overflow: auto;
}

.compact-list {
  max-height: 180px;
  margin: 8px 0;
}

.admin-question-list button {
  text-align: left;
  background: #f7fafb;
  color: var(--ink);
  border: 1px solid var(--line);
}

.admin-question-list button.current {
  background: var(--brand);
  color: #fff;
}

.reading-group-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfd;
}

.reading-group-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  color: var(--ink);
  font-weight: 800;
  margin-bottom: 8px;
}

.reading-group-title button {
  padding: 7px 9px;
  font-size: 12px;
}

.reading-question-item {
  width: 100%;
  margin-top: 6px;
  text-align: left;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px;
}

.reading-question-item.current {
  background: var(--brand);
  color: #fff;
}

.admin-panel-title,
.package-actions {
  display: grid;
  gap: 10px;
}

.admin-panel-title {
  margin-bottom: 12px;
}

.package-actions {
  grid-template-columns: 1fr;
}

.admin-form {
  display: grid;
  gap: 14px;
}

.admin-form textarea {
  resize: vertical;
}

.admin-form input,
.admin-form select,
.admin-form textarea,
.admin-list input,
.admin-list select,
.section-passage-editor textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.student-manager {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
}

.student-account-list {
  max-height: 240px;
}

.student-account-item {
  background: #f7fafb;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 10px;
}

.student-account-item.current {
  border-color: var(--brand);
  box-shadow: inset 4px 0 0 var(--brand);
}

.student-account-item span {
  color: var(--muted);
  font-size: 12px;
}

.student-form-actions,
.student-account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.student-account-actions button {
  padding: 7px 10px;
  font-size: 12px;
}

.format-toolbar {
  display: flex;
  gap: 6px;
}

.format-toolbar button {
  min-width: 34px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 0 8px;
}

rt {
  font-size: .58em;
  line-height: 1.1;
}

.choice-editor {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.choice-admin-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.media-editor {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.media-editor > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.media-editor span {
  color: var(--muted);
  font-weight: 700;
}

.media-name {
  color: var(--muted);
  margin: 0;
  min-height: 20px;
  overflow-wrap: anywhere;
}

.admin-image-preview {
  max-width: 100%;
  max-height: 140px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.choice-image-preview {
  max-width: 100%;
  max-height: 120px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.admin-actions,
.admin-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.section-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.section-actions .danger-button {
  grid-column: 1 / -1;
}

.file-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #eef3f4;
  color: var(--brand-dark) !important;
  border: 1px solid #c9d8da;
  padding: 11px 16px;
  cursor: pointer;
}

.file-button input {
  display: none;
}

.admin-status {
  min-height: 22px;
  color: var(--good);
  font-weight: 700;
  margin: 0;
}

.exam-screen {
  display: grid;
  grid-template-columns: 305px minmax(0, 1fr);
  gap: 18px;
}

.sidebar,
.question-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.sidebar {
  padding: 16px;
}

.section-tabs {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.section-tab {
  width: 100%;
  text-align: left;
  background: #f7fafb;
  color: var(--ink);
  border: 1px solid var(--line);
}

.section-tab.current {
  background: var(--brand);
  color: #fff;
}

.section-tab.locked {
  color: #98a2b3;
}

.legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  margin: 16px 0;
}

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

.legend i {
  width: 12px;
  height: 12px;
  display: inline-block;
  border-radius: 3px;
  border: 1px solid var(--line);
}

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

.legend .active {
  background: var(--brand);
}

.legend .unanswered {
  background: #f2f4f7;
}

.legend .flagged {
  background: var(--accent);
}

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

.question-grid button {
  aspect-ratio: 1;
  min-width: 0;
  padding: 0;
  background: #f2f4f7;
  color: var(--ink);
  border: 1px solid var(--line);
}

.question-grid button.answered {
  background: var(--good);
  color: #fff;
}

.question-grid button.current {
  background: var(--brand);
  color: #fff;
}

.question-grid button.flagged {
  box-shadow: inset 0 -5px 0 var(--accent);
}

.question-panel {
  min-height: 610px;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.question-head,
.question-actions {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.local-prompt,
.shared-passage,
.audio-box {
  margin-top: 18px;
  border: 1px solid #cfe2e4;
  border-radius: 6px;
  background: #f2f8f9;
  padding: 14px;
}

.shared-passage {
  white-space: pre-line;
  max-height: 260px;
  overflow: auto;
  color: var(--ink);
  line-height: 1.7;
  background: #fffdf5;
  border-color: #ead7a5;
}

.shared-passage-image {
  display: block;
  max-width: 100%;
  max-height: 360px;
  object-fit: contain;
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.reading-question-block {
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.reading-question-block h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.reading-question-text {
  white-space: pre-line;
  font-size: 18px;
  line-height: 1.55;
  margin: 0;
}

.reading-choices {
  margin-top: 14px;
}

.audio-box {
  display: flex;
  align-items: center;
  gap: 14px;
}

.question-body {
  flex: 1;
  padding: 28px 0;
}

#questionText {
  white-space: pre-line;
  font-size: 22px;
  line-height: 1.55;
  margin-top: 0;
}

.question-image {
  display: block;
  max-width: 100%;
  max-height: 280px;
  object-fit: contain;
  margin: 0 0 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.choices {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.choice {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 14px 16px;
}

.choice-content {
  display: flex;
  align-items: center;
  gap: 14px;
}

.choice-label {
  font-weight: 800;
  color: var(--brand-dark);
}

.choice.selected .choice-label {
  color: #fff;
}

.choice-answer-image {
  max-width: min(260px, 58vw);
  max-height: 130px;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
}

.choice-answer-text {
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.choice.selected {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.result-screen {
  grid-template-columns: 1fr;
  align-content: center;
}

.score-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 8px;
}

.score-summary div {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
}

.score-summary span {
  color: var(--muted);
  display: block;
  margin-bottom: 6px;
}

dialog {
  width: min(420px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
}

dialog::backdrop {
  background: rgba(16, 24, 40, .42);
}

dialog menu {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0;
  margin: 20px 0 0;
}

.login-form {
  display: grid;
  gap: 12px;
}

.login-form h3 {
  margin: 0 0 4px;
}

.login-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 700;
}

.login-form input {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  color: var(--ink);
}

.login-error {
  min-height: 20px;
  margin: 0;
  color: var(--danger);
  font-weight: 700;
}

@media (max-width: 860px) {
  .topbar,
  .exam-meta,
  .question-head,
  .question-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .brand-block {
    align-items: center;
    flex-direction: row;
  }

  .app-logo {
    width: 128px;
    height: 42px;
  }

  .start-screen,
  .exam-screen,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .start-copy h2 {
    font-size: 30px;
  }

  .start-footer {
    position: static;
    grid-column: 1;
    margin-top: 4px;
  }

  .admin-login-note {
    position: static;
    grid-column: 1;
  }

  .choice-editor,
  .media-editor,
  .score-summary {
    grid-template-columns: 1fr;
  }

  .question-grid {
    grid-template-columns: repeat(8, 1fr);
  }

}
.compact-button {
  padding: 8px 10px;
  font-size: 13px;
}

body.exam-active {
  background: #ffffff;
}

body.exam-active .app-shell {
  width: 100%;
  min-height: 100vh;
  padding: 0 0 54px;
}

body.exam-active .topbar {
  height: 32px;
  padding: 0 8px;
  background: #050505;
  color: #fff;
  align-items: center;
  gap: 12px;
}

body.exam-active .brand-block {
  width: 260px;
  min-width: 260px;
}

body.exam-active .app-logo {
  width: 138px;
  height: 28px;
  filter: brightness(1.8) contrast(1.2);
}

body.exam-active .exam-meta {
  flex: 1;
  justify-content: space-between;
  gap: 0;
}

body.exam-active .exam-meta div {
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  padding: 0 8px;
}

body.exam-active .exam-meta span {
  display: inline;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  margin: 0 6px 0 0;
}

body.exam-active .exam-meta strong {
  color: #fff;
  font-size: 12px;
}

body.exam-active .exam-screen {
  min-height: calc(100vh - 86px);
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  grid-template-rows: 20px 1fr;
  gap: 0;
  background: #fff;
}

.exam-strip {
  display: none;
}

body.exam-active .exam-strip {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  background: #5a9828;
  color: #fff;
  min-height: 20px;
  padding: 2px 8px;
  font-size: 12px;
  line-height: 1;
}

body.exam-active .sidebar {
  border: 0;
  border-right: 1px solid #d7d7d7;
  border-radius: 0;
  padding: 4px 4px 60px;
  background: #f9faf8;
  overflow: hidden;
}

body.exam-active .section-card {
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0 2px 5px;
}

body.exam-active .section-card span {
  display: none;
}

body.exam-active .section-card strong {
  display: block;
  max-width: 86px;
  color: #555;
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.exam-active .section-tabs {
  gap: 10px;
  margin: 0;
}

body.exam-active .section-tab {
  height: 70px;
  padding: 0 2px;
  border: 0;
  border-left: 9px solid #e5ebef;
  border-radius: 8px;
  background: transparent;
  color: #555;
  font-size: 11px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.exam-active .section-tab.current {
  border-left-color: #5a9828;
  background: transparent;
  color: #222;
}

body.exam-active .section-tab.locked {
  color: #9aa0a6;
}

body.exam-active .legend {
  display: none;
}

body.exam-active .question-grid {
  grid-template-columns: repeat(2, 34px);
  gap: 5px;
  margin-top: 10px;
  justify-content: center;
}

body.exam-active .question-grid button {
  height: 22px;
  aspect-ratio: auto;
  border: 0;
  border-radius: 3px;
  background: #5a9828;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

body.exam-active .question-grid button.current {
  outline: 2px solid #223c16;
}

body.exam-active .question-grid button.answered {
  background: #47791f;
}

body.exam-active .question-panel {
  min-height: calc(100vh - 86px);
  border: 0;
  border-radius: 0;
  padding: 20px 24px 74px;
  background: #fff;
  overflow: auto;
}

body.exam-active .question-head {
  align-items: flex-start;
  background: #e8f6ff;
  border: 0;
  padding: 9px 12px;
  margin-bottom: 6px;
}

body.exam-active .question-head .eyebrow {
  color: #111;
  text-transform: none;
  font-size: 12px;
  margin-bottom: 2px;
}

body.exam-active .question-head h2 {
  color: #111;
  font-size: 20px;
  font-weight: 500;
}

body.exam-active #languageButton {
  align-self: flex-end;
  border: 1px solid #888;
  border-radius: 2px;
  background: #fff;
  color: #333;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 500;
}

body.exam-active .local-prompt,
body.exam-active .audio-box {
  margin-top: 8px;
  border: 1px solid #999;
  border-radius: 2px;
  background: #fff;
  padding: 8px;
}

body.exam-active .shared-passage {
  max-height: none;
  border: 0;
  background: #fff;
  padding: 22px 10px 8px;
  font-size: 20px;
  line-height: 1.8;
}

body.exam-active .shared-passage-image {
  border: 0;
  border-radius: 0;
  max-height: 360px;
  margin: 18px auto;
}

body.exam-active .question-body {
  padding: 24px 0 10px;
}

body.exam-active #questionText {
  font-size: 22px;
  line-height: 1.6;
  max-width: 860px;
}

body.exam-active .question-image {
  border: 0;
  max-height: 260px;
  margin: 16px auto 22px;
}

body.exam-active .choices {
  max-width: 760px;
  gap: 16px;
  margin-top: 30px;
}

body.exam-active .choice {
  min-height: 36px;
  border: 1px solid #111;
  border-radius: 0;
  background: #fff;
  color: #000;
  padding: 8px 12px;
  font-weight: 800;
}

body.exam-active .choice:hover,
body.exam-active .choice.selected {
  background: #eef7e7;
  border-color: #5a9828;
  color: #000;
}

body.exam-active .choice-label {
  min-width: 20px;
  color: #000;
}

body.exam-active .choice.selected .choice-label {
  color: #000;
}

body.exam-active .question-actions {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 44px;
  align-items: center;
  padding: 6px 8px;
  border-top: 4px solid #5a9828;
  background: #050505;
  z-index: 5;
}

body.exam-active .question-actions > div {
  display: flex;
  gap: 6px;
}

body.exam-active .question-actions button {
  border-radius: 4px;
  background: #5a9828;
  color: #fff;
  padding: 8px 12px;
  font-size: 13px;
}

body.exam-active #flagButton {
  width: 34px;
  height: 30px;
  overflow: hidden;
  padding: 0;
  font-size: 0;
}

body.exam-active #flagButton::before {
  content: "⚑";
  font-size: 17px;
}

body.exam-active #prevButton::before {
  content: "‹ ";
  font-weight: 900;
}

body.exam-active #nextButton::after {
  content: " ›";
  font-weight: 900;
}

body.exam-active .question-actions.reading-actions {
  justify-content: flex-end;
}

body.exam-active .question-actions.reading-actions > div {
  margin-left: auto;
}

@media (max-width: 640px) {
  body.exam-active .app-shell {
    padding-bottom: 88px;
  }

  body.exam-active .topbar {
    height: auto;
    min-height: 38px;
  }

  body.exam-active .brand-block {
    width: auto;
    min-width: 0;
  }

  body.exam-active .exam-meta {
    gap: 8px;
  }

  body.exam-active .exam-meta div:first-child {
    display: none;
  }

  body.exam-active .exam-screen {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr;
    min-height: auto;
  }

  body.exam-active .exam-strip {
    min-height: 28px;
    padding: 4px 8px;
    overflow-wrap: anywhere;
  }

  body.exam-active .sidebar {
    border-right: 0;
    border-bottom: 1px solid #d7d7d7;
    padding: 8px;
  }

  body.exam-active .section-card {
    margin-bottom: 6px;
  }

  body.exam-active .section-card strong {
    max-width: none;
    white-space: normal;
  }

  body.exam-active .section-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  body.exam-active .section-tab {
    flex: 0 0 92px;
    height: 42px;
    border-left-width: 5px;
    font-size: 11px;
  }

  body.exam-active .question-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(34px, 1fr));
    gap: 5px;
    justify-content: stretch;
    margin-top: 6px;
  }

  body.exam-active .question-grid button {
    height: 30px;
    font-size: 12px;
  }

  body.exam-active .question-panel {
    min-height: auto;
    padding: 12px 12px 108px;
  }

  body.exam-active .question-head {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 8px;
  }

  body.exam-active .question-head h2 {
    font-size: 18px;
  }

  body.exam-active #languageButton {
    align-self: center;
    padding: 7px 8px;
    white-space: nowrap;
  }

  body.exam-active .question-body {
    padding: 12px 0 8px;
  }

  body.exam-active #questionText {
    font-size: 18px;
    line-height: 1.55;
  }

  body.exam-active .choices {
    max-width: none;
    gap: 10px;
    margin-top: 18px;
  }

  body.exam-active .choice {
    min-height: 46px;
    padding: 10px;
  }

  body.exam-active .choice-content {
    align-items: flex-start;
    gap: 10px;
  }

  body.exam-active .choice-label {
    flex: 0 0 22px;
  }

  body.exam-active .choice-answer-text {
    flex: 1;
    min-width: 0;
    font-size: 15px;
    line-height: 1.45;
  }

  body.exam-active .choice-answer-image {
    max-width: min(220px, 70vw);
    max-height: 150px;
  }

  body.exam-active .question-actions {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: stretch;
    gap: 8px;
    height: auto;
    min-height: 62px;
    padding: 8px 10px calc(10px + env(safe-area-inset-bottom));
  }

  body.exam-active .question-actions.reading-actions {
    grid-template-columns: 1fr;
  }

  body.exam-active .question-actions.reading-actions > div {
    grid-column: 1 / -1;
    margin-left: 0;
  }

  body.exam-active .question-actions > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    min-width: 0;
  }

  body.exam-active .question-actions button {
    min-width: 0;
    width: 100%;
    min-height: 44px;
    padding: 8px 6px;
    line-height: 1.15;
    white-space: nowrap;
    font-size: 12px;
  }

  body.exam-active #flagButton {
    width: 44px;
    height: 44px;
    min-height: 44px;
  }
}
