:root {
  color-scheme: light;
  --ink: #17202a;
  --muted: #617080;
  --paper: #fffaf0;
  --surface: #ffffff;
  --line: #e5ded2;
  --teal: #157a7f;
  --teal-dark: #0d5559;
  --coral: #f06a4d;
  --yellow: #ffd166;
  --green: #6abf69;
  --danger: #b42318;
  --shadow: 0 18px 45px rgba(23, 32, 42, 0.14);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background:
    linear-gradient(135deg, rgba(21, 122, 127, 0.12) 0 25%, transparent 25% 50%, rgba(240, 106, 77, 0.12) 50% 75%, transparent 75%) 0 0 / 42px 42px,
    var(--paper);
}

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

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

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

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 4px 4px 0 var(--ink);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mode-switch {
  display: inline-flex;
  gap: 8px;
  margin: 0 0 16px;
  padding: 5px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 4px 4px 0 rgba(23, 32, 42, 0.18);
}

.mode-button {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-weight: 900;
}

.mode-button.is-active {
  background: var(--ink);
  color: #ffffff;
}

.pill,
.ghost-button,
.exam-shortcut,
.secondary-button,
.primary-button,
.danger-button,
.link-button,
.icon-button {
  min-height: 40px;
  border-radius: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
  color: var(--muted);
  font-size: 0.92rem;
}

.ghost-button {
  padding: 0 14px;
  border: 1px solid var(--ink);
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  box-shadow: 3px 3px 0 var(--ink);
}

.exam-shortcut {
  padding: 0 14px;
  border: 1px solid var(--ink);
  background: var(--coral);
  color: #ffffff;
  font-weight: 900;
  box-shadow: 3px 3px 0 var(--ink);
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: stretch;
}

.stage {
  position: relative;
  display: grid;
  min-height: 620px;
  align-content: start;
  box-sizing: border-box;
  padding-top: 62px;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 209, 102, 0.24), transparent 42%),
    linear-gradient(180deg, #ffffff, #f6fff8);
  box-shadow: var(--shadow), 8px 8px 0 var(--ink);
}

.study-panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(150px, 210px) minmax(220px, 310px) auto minmax(0, 1fr);
  gap: 12px;
  align-items: end;
  width: min(900px, calc(100% - 48px));
  margin: 0 auto;
}

.email-login-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.email-suffix {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdfa;
  color: var(--teal-dark);
  font-weight: 900;
  white-space: nowrap;
}

.study-login-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.study-login-actions .link-button {
  padding: 0 14px;
  border: 1px solid var(--teal);
  border-radius: 8px;
  background: #f3fffc;
}

.study-summary {
  min-height: 42px;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdfa;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.learner-report {
  display: grid;
  gap: 12px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.report-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.report-metrics span {
  display: grid;
  gap: 2px;
  min-height: 56px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdfa;
}

.report-metrics strong {
  color: var(--ink);
  font-size: 1rem;
}

.report-metrics em {
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 800;
}

.bank-progress,
.report-list {
  display: grid;
  gap: 8px;
}

.bank-progress span {
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.bank-progress span.is-active {
  border-color: var(--teal);
  color: var(--teal-dark);
  background: #f3fffc;
}

.report-block {
  display: grid;
  gap: 8px;
}

.report-block h3 {
  margin: 0;
  color: var(--ink);
  font-size: 0.92rem;
}

.report-item {
  display: grid;
  gap: 5px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.report-item strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 0.88rem;
}

.report-item span,
.compact-empty {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.exam-stage {
  grid-column: 1 / -1;
  min-height: 620px;
  padding: 26px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(106, 191, 105, 0.16), transparent 45%),
    linear-gradient(180deg, #ffffff, #f7fbff);
  box-shadow: var(--shadow), 8px 8px 0 var(--ink);
}

.exam-lock,
.exam-setup,
.exam-running,
.exam-result {
  display: grid;
  gap: 18px;
  width: min(820px, 100%);
  margin: 0 auto;
}

.exam-title {
  display: grid;
  gap: 8px;
}

.exam-title span,
.result-kicker {
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  background: #e8f6f3;
  color: var(--teal-dark);
  font-weight: 900;
}

.exam-title h1,
.exam-result h1 {
  min-height: 0;
  font-size: 2rem;
}

.exam-title p,
#examResultScore {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.exam-name-field,
.exam-password-field {
  max-width: 420px;
}

.exam-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.exam-meta span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffdfa;
  color: var(--muted);
  font-weight: 900;
}

.exam-question-zone {
  width: 100%;
  margin: 0;
}

.exam-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.correct-button {
  background: #f1fff0;
  color: #255828;
}

.exam-result-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.exam-result-list li {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdfa;
}

.exam-result-list strong {
  display: block;
  margin-bottom: 4px;
}

.result-correct {
  color: #255828;
}

.result-wrong {
  color: var(--danger);
}

.ticket-strip {
  position: absolute;
  inset: 18px 18px auto;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.ticket-strip span {
  height: 12px;
  border-radius: 999px;
  background: var(--yellow);
}

.ticket-strip span:nth-child(2n) {
  background: var(--coral);
}

.ticket-strip span:nth-child(3n) {
  background: var(--teal);
}

.question-zone {
  align-self: center;
  width: min(720px, calc(100% - 48px));
  margin: 34px auto 24px;
  padding: 32px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 6px 6px 0 rgba(23, 32, 42, 0.22);
}

.category-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.category-row span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: #e8f6f3;
  color: var(--teal-dark);
  font-weight: 800;
}

.category-row span:last-child {
  background: #fff2cc;
  color: #7a4b00;
}

h1 {
  min-height: 154px;
  margin: 0;
  font-size: 2.45rem;
  line-height: 1.25;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.answer {
  margin: 22px 0 0;
  padding: 18px;
  border-left: 6px solid var(--green);
  border-radius: 8px;
  background: #f1fff0;
  color: #255828;
  font-size: 1.2rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.study-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.machine {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 0 24px 42px;
}

.dial {
  position: relative;
  flex: 0 0 auto;
  width: 86px;
  height: 86px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: conic-gradient(var(--coral), var(--yellow), var(--teal), var(--green), var(--coral));
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 460ms ease;
}

.dial.is-spinning {
  transform: rotate(360deg) scale(1.04);
}

.dial span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ink);
}

.dial span:nth-child(1) {
  transform: translate(-50%, -39px);
}

.dial span:nth-child(2) {
  transform: translate(30px, -50%);
}

.dial span:nth-child(3) {
  transform: translate(-50%, 30px);
}

.dial span:nth-child(4) {
  transform: translate(-39px, -50%);
}

.draw-button {
  min-width: 188px;
  min-height: 62px;
  padding: 0 30px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: var(--coral);
  color: #ffffff;
  font-size: 1.3rem;
  font-weight: 900;
  box-shadow: 6px 6px 0 var(--ink);
}

.secondary-button,
.primary-button,
.danger-button {
  padding: 0 14px;
  font-weight: 800;
}

.secondary-button {
  border: 1px solid var(--ink);
  background: #ffffff;
  color: var(--ink);
}

.primary-button {
  background: var(--teal);
  color: #ffffff;
}

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

.history-panel {
  min-height: 620px;
  padding: 18px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 6px 6px 0 rgba(23, 32, 42, 0.2);
}

.panel-heading,
.dialog-top,
.editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-heading h2,
.dialog-top h2 {
  margin: 0;
  font-size: 1.05rem;
}

.link-button {
  min-height: 32px;
  background: transparent;
  color: var(--teal-dark);
  font-weight: 800;
}

.history-list {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.history-list li {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdfa;
}

.history-list strong {
  display: block;
  margin-bottom: 6px;
  color: var(--teal-dark);
  font-size: 0.8rem;
}

.history-list span {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink);
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.empty-state {
  margin: 18px 0 0;
  color: var(--muted);
}

.admin-dialog {
  width: min(940px, calc(100% - 32px));
  max-height: min(760px, calc(100vh - 36px));
  padding: 0;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.admin-dialog::backdrop {
  background: rgba(23, 32, 42, 0.48);
}

.dialog-top {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: #fffaf0;
}

.icon-button {
  width: 38px;
  min-height: 38px;
  background: var(--ink);
  color: #ffffff;
  font-size: 1.4rem;
}

.login-panel,
.editor-panel {
  padding: 18px;
}

.admin-status {
  margin: 14px 18px 0;
  padding: 10px 12px;
  border: 1px solid #b8dedb;
  border-radius: 8px;
  background: #ecfffb;
  color: var(--teal-dark);
  font-weight: 800;
  line-height: 1.45;
}

.admin-status.is-error {
  border-color: #f2b8b5;
  background: #fff1f0;
  color: var(--danger);
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  outline: none;
}

input {
  height: 42px;
  padding: 0 12px;
}

select {
  height: 42px;
  padding: 0 12px;
}

textarea {
  min-height: 88px;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.55;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(21, 122, 127, 0.16);
}

.login-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
}

.editor-panel {
  display: grid;
  gap: 16px;
}

.batch-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px dashed var(--teal);
  border-radius: 8px;
  background: #f3fffc;
}

.batch-panel textarea {
  min-height: 190px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92rem;
}

.batch-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.batch-summary {
  color: var(--teal-dark);
  font-weight: 800;
}

.batch-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.results-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.records-filter {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(140px, 180px) minmax(140px, 180px);
  gap: 10px;
}

.results-panel,
.study-stats-panel,
.study-records-panel,
.study-access-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.access-grid {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  gap: 12px;
}

.access-grid .wide-field {
  grid-column: span 1;
}

.access-grid textarea {
  min-height: 170px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.exam-results-list,
.study-stats-list,
.study-records-list {
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow: auto;
}

.exam-result-card,
.study-stat-card,
.study-record-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.study-stat-card strong,
.study-record-card strong {
  color: var(--ink);
}

.study-stat-card span,
.study-record-card span {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.45;
}

.result-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.result-card-main {
  display: grid;
  gap: 3px;
}

.result-card-actions {
  display: flex;
  justify-content: flex-end;
}

.result-card-head strong {
  color: var(--ink);
}

.result-card-head span {
  color: var(--muted);
  font-weight: 800;
}

.exam-result-card summary {
  cursor: pointer;
  color: var(--teal-dark);
  font-weight: 900;
}

.exam-result-card ol {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.45;
}

.editor-toolbar {
  align-items: end;
}

.bank-tools {
  display: grid;
  gap: 12px;
}

.bank-switch {
  display: inline-flex;
  width: fit-content;
  gap: 8px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdfa;
}

.search-box {
  width: min(360px, 100%);
}

.editor-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.editor-count,
.selection-count {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdfa;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.selection-count {
  border-color: var(--teal);
  color: var(--teal-dark);
}

.question-editor-list {
  display: grid;
  gap: 12px;
  max-height: 560px;
  overflow: auto;
  padding-right: 4px;
}

.question-editor-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdfa;
}

.select-question {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 900;
}

.select-question input {
  width: 18px;
  height: 18px;
}

.item-fields {
  display: grid;
  grid-template-columns: 140px 110px 100px minmax(0, 1fr);
  gap: 12px;
}

.wide-field {
  grid-column: 1 / -1;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: min(360px, calc(100% - 36px));
  padding: 12px 14px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff;
  font-weight: 800;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .main-grid {
    grid-template-columns: 1fr;
  }

  .stage,
  .history-panel {
    min-height: auto;
  }

  h1 {
    min-height: 128px;
    font-size: 2rem;
  }

  .history-panel {
    order: 2;
  }
}

@media (max-width: 640px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    background:
      linear-gradient(135deg, rgba(21, 122, 127, 0.1) 0 25%, transparent 25% 50%, rgba(240, 106, 77, 0.1) 50% 75%, transparent 75%) 0 0 / 34px 34px,
      var(--paper);
  }

  .app-shell {
    width: min(100% - 14px, 1180px);
    padding: 10px 0 18px;
  }

  .topbar,
  .top-actions,
  .machine,
  .login-panel,
  .editor-toolbar,
  .bank-switch,
  .batch-footer,
  .results-actions,
  .result-card-head {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar,
  .login-panel {
    display: grid;
  }

  .topbar {
    gap: 10px;
    margin-bottom: 10px;
  }

  .brand {
    font-size: 1.05rem;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    border-width: 2px;
    box-shadow: 3px 3px 0 var(--ink);
  }

  .top-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .mode-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    margin-bottom: 10px;
  }

  .bank-tools,
  .bank-switch {
    width: 100%;
  }

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

  .mode-button {
    min-height: 46px;
    padding: 0 10px;
    font-size: 1rem;
  }

  .main-grid {
    gap: 12px;
  }

  .stage {
    min-height: calc(100svh - 132px);
    padding-top: 48px;
    border-width: 2px;
    box-shadow: 4px 4px 0 var(--ink);
  }

  .ticket-strip {
    inset: 12px 12px auto;
    gap: 5px;
  }

  .ticket-strip span {
    height: 8px;
  }

  .study-panel {
    width: calc(100% - 16px);
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 0;
  }

  .email-login-row,
  .access-grid,
  .records-filter {
    grid-template-columns: 1fr;
  }

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

  .study-summary {
    min-height: auto;
    padding: 10px 12px;
    font-size: 0.86rem;
  }

  .question-zone {
    width: calc(100% - 16px);
    margin: 12px auto 14px;
    padding: 16px;
    border-width: 2px;
    box-shadow: 4px 4px 0 rgba(23, 32, 42, 0.2);
  }

  .category-row {
    gap: 6px;
    margin-bottom: 12px;
  }

  .category-row span {
    min-height: 28px;
    font-size: 0.84rem;
  }

  h1 {
    min-height: 136px;
    font-size: 1.36rem;
    line-height: 1.35;
  }

  .answer {
    font-size: 1rem;
    line-height: 1.55;
    padding: 14px;
  }

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

  .machine {
    gap: 10px;
    padding: 0 12px 22px;
  }

  .dial {
    width: 62px;
    height: 62px;
    border-width: 2px;
  }

  .dial span:nth-child(1) {
    transform: translate(-50%, -28px);
  }

  .dial span:nth-child(2) {
    transform: translate(22px, -50%);
  }

  .dial span:nth-child(3) {
    transform: translate(-50%, 22px);
  }

  .dial span:nth-child(4) {
    transform: translate(-28px, -50%);
  }

  .draw-button {
    width: 100%;
    min-width: 0;
    min-height: 58px;
    font-size: 1.18rem;
    box-shadow: 4px 4px 0 var(--ink);
  }

  .secondary-button,
  .primary-button,
  .danger-button,
  .ghost-button,
  .exam-shortcut {
    width: 100%;
    min-height: 44px;
  }

  .exam-stage {
    min-height: calc(100svh - 132px);
    padding: 12px;
    border-width: 2px;
    box-shadow: 4px 4px 0 var(--ink);
  }

  .exam-lock,
  .exam-setup,
  .exam-running,
  .exam-result {
    gap: 14px;
  }

  .exam-title h1,
  .exam-result h1 {
    font-size: 1.5rem;
  }

  .exam-title p,
  #examResultScore {
    font-size: 0.92rem;
  }

  .exam-name-field,
  .exam-password-field {
    max-width: none;
  }

  input,
  select,
  textarea {
    min-width: 0;
    max-width: 100%;
    font-size: 16px;
  }

  .exam-meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .exam-meta span {
    justify-content: center;
  }

  .exam-question-zone {
    width: 100%;
    margin: 0;
  }

  .exam-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .exam-actions #examRevealButton {
    grid-column: 1 / -1;
  }

  .history-panel {
    padding: 14px;
  }

  .admin-dialog {
    width: calc(100% - 12px);
    max-height: calc(100svh - 12px);
  }

  .dialog-top,
  .login-panel,
  .editor-panel {
    padding: 12px;
  }

  .question-editor-list,
  .exam-results-list,
  .study-stats-list,
  .study-records-list {
    max-height: 48svh;
  }

  .item-fields {
    grid-template-columns: 1fr;
  }

  .question-editor-item {
    grid-template-columns: 1fr;
  }

  .select-question {
    width: fit-content;
  }
}
