:root {
  --ink: #172033;
  --muted: #667085;
  --line: #d8dee8;
  --line-strong: #bcc8dc;
  --panel: #ffffff;
  --soft: #f5f7fa;
  --green: #08745f;
  --green-soft: #e8f7f2;
  --blue: #2d5ecf;
  --blue-soft: #eef4ff;
  --purple: #7b5bd6;
  --purple-deep: #5a3eb3;
  --lav-1: #f4eefa;
  --lav-2: #e8def2;
  --lav-3: #f9f5fd;
  --amber: #a15c00;
  --amber-soft: #fff6df;
  --red: #c72f51;
  --red-soft: #fff0f3;
  --shadow: 0 10px 28px rgba(19, 34, 58, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #eef3f8;
}

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

button,
.file-button {
  border: 1px solid #cfd8e6;
  border-radius: 6px;
  padding: 0.52rem 0.72rem;
  color: #26364d;
  background: #fff;
  font-size: 0.78rem;
  font-weight: 750;
  cursor: pointer;
}

button:hover,
.file-button:hover {
  border-color: #9db3d5;
  background: #f7fbff;
}

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

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

.file-button {
  display: inline-flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.visually-hidden-file {
  display: none;
}

.hero,
.setup-bar,
.layout {
  width: min(100% - 1rem, 2400px);
  margin-inline: auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.72rem;
  align-items: center;
  margin-top: 0.5rem;
  padding: 0.72rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.guide-link-button {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.38rem 0.62rem;
  border: 1px solid #b8c8e0;
  border-radius: 999px;
  background: var(--blue-soft);
  color: #1d4fbf;
  font-size: 0.76rem;
  font-weight: 900;
  text-decoration: none;
}

.guide-link-button:hover {
  border-color: var(--blue);
  background: #fff;
}

.eyebrow {
  margin: 0 0 0.25rem;
  color: var(--blue);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 1.24rem;
}

.subcopy {
  display: none;
}

.hero-actions,
.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
}

.setup-bar {
  display: grid;
  grid-template-columns: 86px 150px 120px 120px 150px minmax(230px, 1fr) minmax(230px, 1fr) 128px;
  gap: 0.26rem 0.38rem;
  align-items: end;
  margin-top: 0.5rem;
  padding: 0.42rem 0.48rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  margin-top: 0.5rem;
  margin-bottom: 2rem;
}

.panel,
.workspace {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.filters {
  display: grid;
  grid-template-columns: 120px minmax(180px, 1fr) 140px minmax(260px, 1.4fr) minmax(210px, 1fr);
  gap: 0.42rem;
  align-items: end;
  align-self: start;
  padding: 0.62rem;
}

.count-card {
  margin-bottom: 0;
  min-height: 52px;
}

.filters label {
  margin-bottom: 0;
}

.source-card,
.hint {
  margin-bottom: 0;
  min-height: 52px;
}

.count-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.46rem 0.52rem;
  border-radius: 6px;
  background: var(--soft);
  color: var(--muted);
  font-size: 0.78rem;
}

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

label {
  display: grid;
  gap: 0.12rem;
  margin: 0;
  color: #344054;
  font-size: 0.64rem;
  font-weight: 800;
}

select,
input,
textarea {
  width: 100%;
  min-height: 23px;
  border: 1px solid #c8d2e0;
  border-radius: 6px;
  padding: 0.14rem 0.3rem;
  background: #fff;
  color: var(--ink);
  font-size: 0.69rem;
}

textarea {
  min-height: 27px;
  max-height: 68px;
  resize: vertical;
}

.source-card,
.hint {
  display: grid;
  gap: 0.25rem;
  padding: 0.65rem;
  border-radius: 6px;
  line-height: 1.45;
  font-size: 0.76rem;
}

.source-card {
  background: var(--blue-soft);
  color: #26406f;
}

.source-card span {
  color: #51627c;
}

.hint {
  background: var(--amber-soft);
  color: var(--amber);
  font-weight: 700;
}

.build-refresh-warning {
  margin: 0.75rem 0.75rem 0;
  padding: 0.75rem 1rem;
  border: 1px solid #f1b94d;
  border-radius: 12px;
  background: #fff4d6;
  color: #8a4a00;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(138, 74, 0, 0.08);
}

.build-refresh-warning button {
  width: auto;
  min-height: 28px;
  margin-left: 0.6rem;
  padding: 0.22rem 0.5rem;
  border-color: #d38a00;
  background: #fff;
  color: #7a4200;
  font-size: 0.68rem;
}

.workspace {
  min-width: 0;
  padding: 0.5rem;
}

.detail-panel {
  display: grid;
  gap: 0.3rem;
  margin: 0 0 0.45rem;
  padding: 0.5rem 0.56rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfd;
}

.detail-panel-empty {
  padding: 0.36rem 0.48rem;
}

.detail-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.detail-panel-header strong {
  font-size: 0.78rem;
}

.detail-panel-header span {
  display: block;
  margin-top: 0.08rem;
  color: var(--muted);
  font-size: 0.64rem;
}

.detail-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
}

.detail-action-row button,
.detail-panel-header button {
  min-height: 22px;
  padding: 0.12rem 0.3rem;
  font-size: 0.63rem;
}

.detail-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.24rem;
}

.detail-card {
  display: grid;
  gap: 0.06rem;
  padding: 0.3rem 0.38rem;
  border: 1px solid #d8e1ec;
  border-radius: 6px;
  background: #fff;
}

.detail-card span {
  color: var(--muted);
  font-size: 0.6rem;
  font-weight: 700;
}

.detail-card strong {
  font-size: 0.76rem;
}

.detail-panel-body {
  display: grid;
  gap: 0.22rem;
}

.detail-comment-block {
  display: grid;
  gap: 0.16rem;
  padding: 0.34rem 0.4rem;
  border: 1px solid #d8e1ec;
  border-radius: 8px;
  background: #fff;
}

.detail-section-label {
  font-size: 0.56rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #6a7484;
  text-transform: uppercase;
}

.detail-comment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.detail-comment-header strong {
  font-size: 0.68rem;
}

.detail-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.16rem;
}

.detail-inline-actions button {
  min-height: 20px;
  padding: 0.06rem 0.24rem;
  font-size: 0.6rem;
}

.detail-inline-actions-secondary {
  justify-content: flex-end;
}

.detail-save-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  padding: 0.24rem 0.32rem;
  border: 1px solid #d8e1ec;
  border-radius: 6px;
  background: #f8fbff;
}

.detail-save-status strong {
  flex: 0 0 auto;
  font-size: 0.6rem;
}

.detail-save-status span {
  min-width: 0;
  color: #596579;
  font-size: 0.58rem;
  line-height: 1.35;
  text-align: right;
}

.detail-save-status-ready {
  border-color: #b9e7c9;
  background: #f0fbf4;
}

.detail-save-status-ready strong {
  color: #1f6b43;
}

.detail-save-status-pending {
  border-color: #f0d49a;
  background: #fff8e8;
}

.detail-save-status-pending strong {
  color: #9a4b00;
}

.detail-save-status-pending strong::before {
  display: inline-block;
  width: 0.72em;
  height: 0.72em;
  margin-right: 0.24rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  content: "";
  vertical-align: -0.08em;
  animation: save-spin 0.75s linear infinite;
}

.detail-save-status-warning {
  border-color: #f0b8a8;
  background: #fff1ee;
}

.detail-save-status-warning strong {
  color: #b42318;
}

.detail-save-status-neutral strong {
  color: #596579;
}

@keyframes save-spin {
  to {
    transform: rotate(360deg);
  }
}

.detail-comment-textarea {
  min-height: 64px;
  padding: 0.34rem 0.42rem;
  font-size: 0.66rem;
  line-height: 1.35;
  resize: vertical;
}

.detail-preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.16rem;
}

.detail-preset-button {
  min-height: 20px;
  padding: 0.08rem 0.3rem;
  border: 1px solid #c8d7ea;
  border-radius: 999px;
  background: #f7fbff;
  color: #33557d;
  font-size: 0.58rem;
  font-weight: 800;
}

.detail-message-preview {
  display: grid;
  gap: 0.08rem;
  padding: 0.24rem 0.3rem;
  border: 1px dashed #d4dde8;
  border-radius: 6px;
  background: #f8fbff;
}

.detail-message-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.3rem;
}

.detail-message-preview strong {
  font-size: 0.6rem;
  color: #33557d;
}

.detail-message-status {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  padding: 0.08rem 0.34rem;
  font-size: 0.56rem;
  font-weight: 700;
}

.detail-message-status-ready {
  background: #dff5e8;
  color: #1f6b43;
}

.detail-message-status-pending {
  background: #fff0d6;
  color: #9a4b00;
}

.detail-message-status-warning {
  background: #ffe8cf;
  color: #995000;
}

.detail-message-status-neutral {
  background: #eef2f6;
  color: #6a7484;
}

.detail-message-preview pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.58rem;
  line-height: 1.3;
  color: #536275;
  font-family: inherit;
}

.detail-score-editor {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.28rem;
  margin-bottom: 0.22rem;
}

.detail-score-editor label {
  display: grid;
  gap: 0.08rem;
  color: #334155;
  font-size: 0.58rem;
  font-weight: 850;
}

.detail-score-editor input {
  min-height: 24px;
  padding: 0.08rem 0.18rem;
  font-size: 0.66rem;
  font-weight: 850;
}

.detail-helper-text {
  margin: -0.04rem 0 0.36rem;
  color: #667085;
  font-size: 0.58rem;
  line-height: 1.35;
}

.detail-question-list {
  display: grid;
  gap: 0.16rem;
  max-height: 220px;
  overflow: auto;
  padding-right: 0.1rem;
}

.detail-question-group {
  border: 1px solid #d9e2ef;
  border-radius: 8px;
  background: #f8fbff;
}

.detail-question-group-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  padding: 0.16rem 0.3rem;
  cursor: pointer;
  font-size: 0.62rem;
  font-weight: 800;
  color: #294766;
  list-style: none;
}

.detail-question-group-summary::-webkit-details-marker {
  display: none;
}

.detail-question-group-summary span {
  color: var(--muted);
  font-size: 0.56rem;
  font-weight: 700;
}

.detail-question-group-body {
  display: grid;
  gap: 0.14rem;
  padding: 0 0.16rem 0.16rem;
}

.detail-question-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 32px;
  gap: 0.24rem;
  align-items: center;
  padding: 0.14rem 0.18rem;
  border: 1px solid #dde4ee;
  border-radius: 6px;
  background: #fff;
}

.detail-question-no {
  font-size: 0.64rem;
  text-align: center;
}

.detail-question-meta {
  display: grid;
  gap: 0.02rem;
  min-width: 0;
}

.detail-question-meta small {
  color: var(--muted);
  font-size: 0.58rem;
  line-height: 1.1;
}

.detail-meta-input {
  min-height: 20px;
  padding: 0.04rem 0.16rem;
  font-size: 0.62rem;
  font-weight: 700;
}

.detail-meta-input-inline {
  display: inline-block;
  width: 55%;
  min-height: 18px;
  vertical-align: middle;
  margin-right: 0.14rem;
  font-size: 0.58rem;
}

.detail-answer-meta {
  color: #2f4f7a;
  font-weight: 600;
}

.detail-mark-button {
  min-height: 20px;
  padding: 0.04rem 0;
  font-size: 0.72rem;
  font-weight: 900;
}

.detail-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
}

.detail-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.1rem 0.34rem;
  background: #eef4ff;
  color: #2d5ecf;
  font-size: 0.6rem;
  font-weight: 800;
}

.detail-comment-preview {
  margin: 0;
  color: #40526b;
  font-size: 0.66rem;
  line-height: 1.25;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 0.45rem 0.5rem 0.75rem;
}

.toolbar h2 {
  font-size: 1rem;
}

#boardMeta {
  color: var(--muted);
  margin: 0.25rem 0 0;
  font-size: 0.78rem;
}

.attempt-audit-panel {
  margin: 0 0.5rem 0.6rem;
  border: 1px solid #cdd9eb;
  border-radius: 8px;
  background: #f8fbff;
  overflow: hidden;
}

.attempt-audit-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  padding: 0.62rem 0.72rem;
  border-bottom: 1px solid #dce6f4;
}

.attempt-audit-head b {
  display: block;
  font-size: 0.86rem;
}

.attempt-audit-head p {
  margin: 0.12rem 0 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.attempt-audit-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.38rem;
  padding: 0.55rem 0.72rem;
}

.attempt-audit-cards span {
  display: grid;
  gap: 0.04rem;
  min-height: 48px;
  padding: 0.42rem 0.5rem;
  border: 1px solid #d8e3f3;
  border-radius: 7px;
  background: #fff;
}

.attempt-audit-cards b {
  font-size: 1rem;
  line-height: 1;
}

.attempt-audit-cards small {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
}

.attempt-audit-table-wrap {
  max-height: 260px;
  overflow: auto;
  border-top: 1px solid #dce6f4;
  background: #fff;
}

.attempt-audit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.66rem;
}

.attempt-audit-table th,
.attempt-audit-table td {
  border-bottom: 1px solid #e4ebf5;
  padding: 0.32rem 0.42rem;
  text-align: left;
  vertical-align: middle;
}

.attempt-audit-table th {
  position: sticky;
  top: 0;
  background: #f1f5fb;
  color: #33445d;
  z-index: 1;
}

.attempt-audit-table td:first-child span {
  display: inline-flex;
  align-items: center;
  min-width: 72px;
  justify-content: center;
  border-radius: 999px;
  padding: 0.12rem 0.34rem;
  font-weight: 900;
}

.attempt-audit-table small {
  display: block;
  color: var(--muted);
  font-size: 0.56rem;
  font-weight: 700;
}

.attempt-audit-ok td:first-child span {
  background: var(--green-soft);
  color: var(--green);
}

.attempt-audit-warn td:first-child span {
  background: var(--amber-soft);
  color: var(--amber);
}

.attempt-audit-bad td:first-child span {
  background: var(--red-soft);
  color: var(--red);
}

.attempt-audit-empty {
  margin: 0;
  padding: 0.72rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.excel-import-panel {
  display: grid;
  gap: 0.46rem;
  margin: 0 0 0.5rem;
  padding: 0.56rem;
  border: 1px solid #c9d8ec;
  border-radius: 8px;
  background: #f8fbff;
}

.excel-import-panel[hidden] {
  display: none;
}

.excel-import-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(20, 32, 50, 0.38);
}

.excel-import-dialog-backdrop[hidden] {
  display: none;
}

.excel-import-dialog {
  width: min(560px, 100%);
  display: grid;
  gap: 0.68rem;
  border: 1px solid #c5d3e6;
  border-radius: 8px;
  background: #fff;
  padding: 0.86rem;
  box-shadow: 0 18px 46px rgba(20, 32, 50, 0.22);
}

.excel-import-dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
}

.excel-import-dialog-header strong {
  font-size: 0.9rem;
}

.excel-import-dialog-header button {
  min-height: 28px;
  padding: 0.24rem 0.52rem;
  font-size: 0.66rem;
}

.excel-import-dialog-copy,
.excel-import-target-message {
  margin: 0;
  color: #465873;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.45;
}

.excel-import-target-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 0.45rem;
}

.excel-import-target-grid label {
  display: grid;
  gap: 0.22rem;
  color: #34445d;
  font-size: 0.64rem;
  font-weight: 900;
}

.excel-import-target-grid select {
  width: 100%;
  min-height: 34px;
}

.excel-import-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.36rem;
}

.excel-import-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.excel-import-header strong {
  display: block;
  font-size: 0.78rem;
}

.excel-import-header span {
  display: block;
  margin-top: 0.08rem;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 750;
}

.excel-import-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.24rem;
  justify-content: flex-end;
}

.excel-import-actions button {
  min-height: 24px;
  padding: 0.16rem 0.44rem;
  font-size: 0.64rem;
}

.excel-import-message {
  margin: 0;
  color: #43546e;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.45;
}

.excel-import-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.22rem;
}

.excel-import-summary span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 1px solid #d6e2f2;
  border-radius: 999px;
  background: #fff;
  padding: 0.08rem 0.42rem;
  color: #33445d;
  font-size: 0.6rem;
  font-weight: 900;
}

.excel-import-table-wrap {
  max-height: 260px;
  overflow: auto;
  border: 1px solid #d6e2f2;
  border-radius: 7px;
  background: #fff;
}

.excel-import-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  font-size: 0.64rem;
}

.excel-import-table th,
.excel-import-table td {
  border-bottom: 1px solid #e4ebf5;
  padding: 0.3rem 0.4rem;
  text-align: left;
  vertical-align: top;
}

.excel-import-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #edf3fb;
  color: #33445d;
  font-weight: 900;
}

.excel-import-table td:nth-child(4) {
  max-width: 460px;
  line-height: 1.4;
}

.excel-import-blocked td {
  background: #fff7f8;
  color: #8a2740;
}

.table-wrap {
  overflow: auto;
  max-height: calc(100vh - 260px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.student-table {
  width: 100%;
  min-width: 1500px;
  border-collapse: collapse;
  table-layout: auto;
}

.student-table th,
.student-table td {
  height: 23px;
  border: 1px solid var(--line);
  padding: 0.08rem 0.14rem;
  vertical-align: middle;
  font-size: 0.69rem;
}

.student-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f3f6fa;
  color: #27364b;
  white-space: nowrap;
}

.student-table th:nth-child(1),
.student-table td:nth-child(1) {
  width: 118px;
  min-width: 118px;
  position: sticky;
  left: 0;
  z-index: 1;
  background: inherit;
}

.student-table th:nth-child(2),
.student-table td:nth-child(2) {
  width: 156px;
  min-width: 156px;
}

.student-table th:nth-child(3),
.student-table td:nth-child(3) {
  width: 48px;
  text-align: center;
}

.student-table th:nth-child(4),
.student-table td:nth-child(4) {
  width: 62px;
}

.student-table th:nth-child(1) {
  z-index: 3;
  background: #f3f6fa;
}

.student-name {
  display: block;
  font-weight: 900;
  line-height: 1;
}

.student-meta-cell {
  min-width: 0;
  width: 118px;
  position: relative;
}

.student-meta-cell-follow {
  border-top-color: transparent;
}

.row-select-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 18px;
  margin-right: 3px;
  vertical-align: top;
  color: #5f7492;
  font-size: 0.62rem;
  font-weight: 900;
  cursor: pointer;
}

.row-select-wrap input {
  width: 13px;
  height: 13px;
  margin: 0;
  accent-color: #2f6bff;
}

.student-meta-text {
  display: inline-block;
  max-width: calc(100% - 24px);
  vertical-align: top;
}

.student-classline {
  display: block;
  margin-top: 0.02rem;
  color: var(--muted);
  font-size: 0.54rem;
  line-height: 1;
}

.student-code-line {
  display: inline-flex;
  align-items: center;
  gap: 0.18rem;
  margin-top: 0.12rem;
  border: 1px solid #c8d6ea;
  border-radius: 6px;
  background: #f7fbff;
  padding: 0.08rem 0.22rem;
  color: #53627a;
  font-size: 0.56rem;
  font-weight: 800;
  line-height: 1;
}

.student-code-line b {
  color: #10213d;
  font-size: 0.66rem;
  letter-spacing: 0.04em;
}

.student-follow-hint {
  display: block;
  color: #7f93ae;
  font-size: 0.49rem;
  line-height: 0.95;
  font-weight: 700;
}

.exam-book-cell {
  min-width: 0;
  width: 156px;
}

.exam-book-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 0.59rem;
  font-weight: 850;
  line-height: 1.02;
  color: #24364f;
  max-height: 1.22rem;
}

.student-exam-inline {
  margin-top: 0.04rem;
}

.student-exam-inline .exam-select-inline {
  min-height: 17px;
  padding: 0.02rem 0.14rem;
  font-size: 0.54rem;
  width: 100%;
  max-width: 146px;
  margin-top: 0.08rem;
  border-radius: 6px;
}

.exam-static-label {
  display: block;
  margin-top: 0.04rem;
  color: #536275;
  font-size: 0.55rem;
  font-weight: 750;
  line-height: 1.05;
}

.exam-apply-group-btn {
  display: block;
  width: 100%;
  max-width: 146px;
  min-height: 18px;
  margin-top: 0.08rem;
  padding: 0.04rem 0.16rem;
  border-color: #c9d6e7;
  background: #f7fbff;
  color: #274264;
  font-size: 0.54rem;
  font-weight: 850;
}

.student-group-start td {
  border-bottom-color: #d7e3f1;
}

.student-group-follow td {
  border-top-color: #edf3f8;
}

.slot-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  padding: 0.04rem 0.14rem;
  border-radius: 999px;
  background: #eef4ff;
  color: #33557d;
  font-size: 0.53rem;
  font-weight: 900;
}

.exam-select-inline {
  min-height: 22px;
  border-color: transparent;
  border-radius: 5px;
  padding: 0.08rem 1.2rem 0.08rem 0.18rem;
  background-color: transparent;
  font-size: 0.64rem;
  font-weight: 750;
}

.exam-select-inline:hover,
.exam-select-inline:focus {
  border-color: #9db3d5;
  background-color: #fff;
}

.exam-select-needed {
  border-color: #f3c37b;
  background: #fff8e7;
  color: #7a4200;
}

.raw-score {
  width: 86px;
  color: #24364f;
  text-align: center;
  white-space: pre-line;
  line-height: 1.2;
  font-weight: 800;
}

.q-cell,
.question-head {
  width: 26px;
}

.q-cell {
  min-width: 26px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
  user-select: none;
}

.q-cell[data-view="student"],
.q-cell[data-view="answer"],
.q-cell[data-view="compare"] {
  min-width: 58px;
  max-width: 92px;
  font-size: 0.68rem;
  line-height: 1.12;
  user-select: text;
}

.q-cell[data-view="student"] {
  cursor: text;
  background: #fff;
}

.q-answer-input {
  width: 100%;
  min-width: 48px;
  border: 1px solid #cbd7ea;
  border-radius: 6px;
  background: #fff;
  color: #172033;
  font: inherit;
  font-weight: 850;
  line-height: 1.1;
  padding: 0.22rem 0.25rem;
  text-align: center;
}

.q-answer-toggle {
  width: 100%;
  min-width: 46px;
  min-height: 1.75rem;
  border: 1px solid #cbd7ea;
  border-radius: 999px;
  background: #f8fbff;
  color: #172033;
  font: inherit;
  font-weight: 900;
  line-height: 1.1;
  padding: 0.18rem 0.3rem;
  text-align: center;
  cursor: pointer;
}

.q-answer-toggle:hover,
.q-answer-toggle:focus {
  border-color: #2f6bff;
  background: #eef5ff;
  outline: 2px solid #2f6bff24;
}

.q-answer-input:focus {
  border-color: #2f6bff;
  outline: 2px solid #2f6bff24;
}

.q-answer-text {
  display: block;
  overflow-wrap: anywhere;
}

.q-compare {
  display: grid;
  gap: 2px;
}

.q-compare b,
.q-compare i,
.q-compare em {
  display: block;
  overflow-wrap: anywhere;
  font-style: normal;
}

.q-compare b {
  color: #172033;
}

.q-compare i {
  color: #64748b;
  font-size: 0.58rem;
}

.q-compare em {
  color: #1d4fbf;
  font-size: 0.66rem;
}

.q-cell[data-mark="○"] {
  color: var(--green);
  background: var(--green-soft);
}

.q-cell[data-mark="△"] {
  color: var(--amber);
  background: var(--amber-soft);
}

.q-cell[data-mark="*"] {
  color: var(--red);
  background: var(--red-soft);
}

.q-cell[data-mark="X"] {
  color: #64748b;
  background: #e5e7eb;
  text-decoration: line-through;
}

.q-cell-disabled {
  cursor: default;
  background: #f6f7f9;
  color: #b5bdc9;
}

.question-segment-follow td {
  border-top-style: dashed;
}

.q-cell-subjective-muted {
  min-width: 46px;
  cursor: default;
  background: #eef1f5;
  color: #6b7280;
  font-size: 0.54rem;
  letter-spacing: 0;
}

.q-cell-subjective-muted span {
  display: inline-block;
  transform: scale(0.92);
  transform-origin: center;
}

.score-input,
.grade-input {
  min-height: 18px;
  padding: 0.04rem 0.1rem;
  text-align: center;
  font-weight: 850;
}

.score-input {
  width: 46px;
}

.grade-input {
  width: 38px;
}

.midterm-head,
.midterm-cell {
  background: #f3f5f8 !important;
}

.midterm-cell {
  width: 48px;
  min-width: 48px;
  text-align: center;
}

.midterm-score-input,
.midterm-grade-input {
  background: #eef2f6;
  color: #536070;
  border-color: #cbd4df;
}

.subjective-score-control {
  display: grid;
  gap: 0.03rem;
  margin-top: 0.12rem;
  color: #5c6b7e;
  font-size: 0.5rem;
  font-weight: 800;
  line-height: 1.05;
}

.subjective-score-control label {
  display: flex;
  align-items: center;
  gap: 0.12rem;
  white-space: nowrap;
}

.subjective-score-input {
  width: 42px;
  min-height: 18px;
  padding: 0.02rem 0.1rem;
  text-align: center;
  font-size: 0.56rem;
  font-weight: 850;
}

.subjective-score-control small {
  color: #7c8796;
  font-size: 0.48rem;
}

.subject-cell {
  min-width: 68px;
}

.manual-question-count-control {
  display: inline-flex;
  align-items: center;
  gap: 0.08rem;
  margin-top: 0.12rem;
  padding: 0.06rem;
  border: 1px solid #cbd8eb;
  border-radius: 6px;
  background: #f6f9fd;
  white-space: nowrap;
}

.manual-question-count-control button {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  border-radius: 5px;
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1;
}

.manual-question-count-control select {
  width: 44px;
  height: 18px;
  min-height: 18px;
  padding: 0 0.1rem;
  border-radius: 5px;
  font-size: 0.58rem;
  font-weight: 850;
  text-align: center;
}

.readonly-input {
  background: #f2f5f8;
  color: #6a7484;
}

.row-actions,
.status-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.12rem;
  min-width: 132px;
}

.action-cell {
  width: 146px;
  min-width: 146px;
}

.status-cell {
  width: 92px;
  min-width: 92px;
}

.status-stack {
  display: grid;
  grid-template-columns: 1fr;
  min-width: 80px;
}

.row-actions button,
.status-stack button {
  min-height: 19px;
  padding: 0.08rem 0.14rem;
  font-size: 0.62rem;
}

.row-actions button.row-action-active {
  border-color: #7b8794;
  background: #eef1f5;
  color: #334155;
}

.status-stack small {
  color: var(--muted);
  font-size: 0.61rem;
  line-height: 1.08;
}

.status-stack .review-note {
  color: #9a4b00;
  font-weight: 850;
}

.status-stack .operation-note {
  color: #2f6b45;
}

.saved {
  background: #f3fbf8;
}

.review-row {
  background: #fff9f0;
}

.decision-confirmed {
  background: #f3fbf8;
}

.decision-review {
  background: #fff9f0;
}

.decision-hidden {
  background: #f4f5f7;
}

.decision-delete {
  background: #fff1f0;
}

.badge-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.18rem;
}

.status-badge {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 0.1rem 0.38rem;
  font-size: 0.64rem;
  font-weight: 900;
  line-height: 1.25;
}

.badge-confirmed {
  background: #dff5e8;
  color: #1f6b43;
}

.badge-review,
.badge-phone0000 {
  background: #fff0d6;
  color: #9a4b00;
}

.badge-saving {
  background: #fff0d6;
  color: #9a4b00;
}

.badge-saving::before {
  display: inline-block;
  width: 0.66em;
  height: 0.66em;
  margin-right: 0.24rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  content: "";
  animation: save-spin 0.75s linear infinite;
}

.badge-stored {
  background: #e8f5ee;
  color: #1f6f48;
}

.badge-hidden {
  background: #e7ebf0;
  color: #475467;
}

.badge-delete {
  background: #ffe0dc;
  color: #a1261b;
}

.sent-once {
  background: #eef6ff;
}

.sent-twice {
  background: #f4f0ff;
}

.empty {
  padding: 3rem 1rem;
  text-align: center;
  color: var(--muted);
}

.exam-mobile-body {
  background: #eef3f8;
}

.exam-mobile-shell {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 0.75rem;
}

.exam-mobile-header {
  display: grid;
  gap: 0.75rem;
  padding: 1rem 0.1rem 0.75rem;
}

.exam-mobile-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: start;
}

.exam-mobile-header h1 {
  font-size: 1.45rem;
}

.exam-mobile-header p {
  margin: 0.28rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.exam-add-toggle {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-color: var(--blue);
  border-radius: 999px;
  background: #fff;
  color: var(--blue);
  font-size: 1.6rem;
  line-height: 1;
}

.exam-add-toggle[aria-expanded="true"] {
  background: var(--blue);
  color: #fff;
}

.exam-term-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.28rem;
  padding: 0.28rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #e8eef8;
}

.exam-term-toggle button {
  min-height: 48px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font-size: 1rem;
}

.exam-term-toggle button.active {
  background: #fff;
  color: var(--blue);
  box-shadow: 0 8px 18px rgba(36, 63, 112, 0.1);
}

.exam-mobile-card {
  margin-top: 0.75rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.exam-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.exam-mobile-card label {
  gap: 0.28rem;
  font-size: 0.76rem;
}

.exam-mobile-card select,
.exam-mobile-card input {
  min-height: 44px;
  padding: 0.5rem 0.62rem;
  font-size: 1rem;
}

.exam-quick-add-panel {
  margin-top: 0;
  border-color: #bfd0ea;
  background: #f8fbff;
}

.exam-quick-add-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: start;
  margin-bottom: 0.75rem;
}

.exam-quick-add-head strong,
.exam-quick-add-head span {
  display: block;
}

.exam-quick-add-head strong {
  color: #1d3972;
  font-size: 1rem;
}

.exam-quick-add-head span {
  margin-top: 0.18rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
}

.exam-quick-add-head button {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 999px;
  font-size: 1.3rem;
  line-height: 1;
}

.exam-quick-add-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.exam-quick-add-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.exam-quick-add-actions button {
  min-height: 44px;
}

.exam-search-label {
  margin-top: 0.8rem;
}

.exam-add-student {
  margin-top: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.exam-add-student summary {
  cursor: pointer;
  padding: 0.58rem 0.68rem;
  font-weight: 850;
  color: var(--ink);
}

.exam-add-student-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: end;
  padding: 0 0.68rem 0.58rem;
}

.exam-add-student p {
  margin: 0;
  padding: 0 0.68rem 0.68rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
}

.exam-pick-list {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.exam-pick-item {
  display: grid;
  gap: 0.22rem;
  width: 100%;
  min-height: 68px;
  padding: 0.78rem 0.86rem;
  text-align: left;
  border-radius: 8px;
}

.exam-pick-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.98rem;
  font-weight: 850;
}

.exam-pick-item small,
.exam-solve-top span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.exam-empty {
  padding: 1rem;
  border-radius: 8px;
  background: var(--soft);
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

.exam-extra-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: end;
  margin-top: 0.8rem;
  padding: 0.78rem;
  border: 1px solid #bfd0ea;
  border-radius: 8px;
  background: #f8fbff;
}

.exam-extra-picker div,
.exam-extra-picker strong,
.exam-extra-picker span {
  display: block;
}

.exam-extra-picker strong {
  color: #1d3972;
  font-size: 0.94rem;
}

.exam-extra-picker span {
  margin-top: 0.16rem;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 780;
}

.exam-extra-picker select {
  grid-column: 1 / -1;
  width: 100%;
}

.exam-extra-picker button {
  grid-column: 1 / -1;
  min-height: 44px;
}

.exam-solve-card {
  padding: 0;
  overflow: hidden;
}

.exam-solve-top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.65rem;
  align-items: center;
  padding: 0.72rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

.exam-solve-top strong,
.exam-solve-top span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.exam-progress {
  padding: 0.7rem 0.9rem;
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 900;
}

.exam-answer-form {
  display: grid;
}

.mobile-question-group {
  border-bottom: 1px solid #e6ebf3;
}

.mobile-question-group-header {
  display: grid;
  gap: 0.55rem;
  padding: 0.95rem 0.9rem 0.35rem;
}

.mobile-question-group-header strong {
  color: var(--blue);
  font-size: 1rem;
  font-weight: 950;
}

.mobile-question-group-header span {
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1.35;
}

.mobile-question-group-body {
  display: grid;
}

.mobile-question-group .mobile-question {
  border-bottom: 1px solid #eef2f7;
}

.mobile-question-group .mobile-question:last-child {
  border-bottom: 0;
}

.mobile-question {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.55rem 0.65rem;
  padding: 1rem 0.9rem;
  border-bottom: 1px solid #e6ebf3;
}

.mobile-question-number {
  grid-row: span 4;
  color: var(--blue);
  font-size: 1.45rem;
  font-weight: 950;
  line-height: 1.1;
}

.mobile-section-text {
  padding: 0.74rem;
  border-radius: 8px;
  background: #f4f7fb;
  color: #49566c;
  font-size: 0.92rem;
  line-height: 1.65;
  white-space: pre-wrap;
}

.mobile-word-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.62rem 0.7rem;
  border-radius: 8px;
  background: #f4f7fb;
}

.mobile-word-bank span,
.mobile-chip-choice span {
  font-weight: 950;
}

.mobile-prompt {
  font-size: 1.08rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.mobile-choice-list {
  display: grid;
  gap: 0.5rem;
}

.mobile-choice-list-compact,
.mobile-choice-list-balanced {
  grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
}

.mobile-choice {
  display: grid;
  grid-template-columns: 24px auto minmax(0, 1fr);
  gap: 0.55rem;
  align-items: center;
  min-height: 54px;
  padding: 0.62rem;
  border: 1px solid #cfd8e6;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 1rem;
}

.mobile-choice-list-compact .mobile-choice {
  grid-template-columns: 22px minmax(0, 1fr);
  min-height: 48px;
  padding: 0.54rem 0.62rem;
}

.mobile-choice-list-compact .mobile-choice-mark {
  display: none;
}

.mobile-choice-list-compact .mobile-choice span:last-child {
  font-weight: 950;
}

.mobile-choice-list-balanced .mobile-choice {
  grid-template-columns: 22px auto minmax(0, 1fr);
}

.mobile-choice input {
  width: 22px;
  min-height: 22px;
  accent-color: var(--blue);
}

.mobile-choice-mark {
  color: var(--blue);
  font-weight: 950;
}

@media (min-width: 760px) {
  .mobile-choice-list-compact {
    grid-template-columns: repeat(var(--mobile-choice-count, 6), minmax(0, 1fr));
  }
}

.mobile-chip-choice-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.48rem;
}

.mobile-chip-choice {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0.55rem 0.75rem;
  border: 1px solid #cfd8e6;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 1rem;
}

.mobile-chip-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mobile-chip-choice:has(input:checked) {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
}

.mobile-short-answer {
  min-height: 52px;
  border-radius: 8px;
  font-size: 1.04rem;
}

.exam-submit-bar {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.72rem;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  font-weight: 900;
}

.exam-submit-bar button {
  min-width: 112px;
  min-height: 48px;
  font-size: 1rem;
}

.exam-result-card.success {
  border-color: #98d8c8;
  background: var(--green-soft);
}

.exam-result-card.error {
  border-color: #ffd380;
  background: var(--amber-soft);
}

.exam-result-card h2 {
  font-size: 1.12rem;
}

.exam-result-card p {
  margin: 0.4rem 0 0;
  color: #344054;
}

.exam-result-card details {
  margin-top: 0.75rem;
}

.exam-result-card pre {
  max-height: 280px;
  overflow: auto;
  padding: 0.65rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
  font-size: 0.72rem;
  white-space: pre-wrap;
}

.parent-portal-body {
  min-height: 100vh;
  background: #ffffff;
}

.parent-portal {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 32px;
}

.parent-code-card,
.repo-gate-card {
  width: min(560px, 100%);
  margin: 0 auto;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 40px rgba(28, 43, 71, 0.12);
}

.parent-code-card h1,
.repo-gate-card h1 {
  margin: 4px 0 8px;
  font-size: 2rem;
}

.parent-code-card p,
.repo-gate-card p {
  margin: 0 0 18px;
  color: #53627a;
}

.parent-code-form,
.repo-gate-card {
  display: grid;
  gap: 14px;
}

.parent-code-form label,
.repo-gate-card label {
  display: grid;
  gap: 7px;
  font-weight: 800;
}

.parent-code-form input,
.repo-gate-card input {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font: inherit;
  font-size: 1.1rem;
  letter-spacing: 0;
}

.parent-code-form button,
.repo-gate-card button {
  min-height: 52px;
}

.parent-code-form button.primary {
  border-color: var(--purple);
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-deep) 100%);
  color: #fff;
}

.parent-code-message,
.repo-gate-message {
  min-height: 22px;
  font-weight: 800;
}

.parent-code-message.error,
.repo-gate-message.error {
  color: #b42318;
}

.parent-code-message.success,
.repo-gate-message.success {
  color: #047857;
}

.parent-report-mount {
  margin-top: 0;
}

.parent-report-frame {
  width: 100%;
  min-height: clamp(720px, 112vh, 1320px);
  border: 0;
  border-radius: 8px;
  background: #fff;
}

.parent-report-mount .report-shell {
  background: #fff;
}

.parent-portal-body.parent-report-loaded .parent-stage {
  gap: 14px;
}

.parent-portal-body.parent-report-loaded .parent-code-card {
  display: none;
}

.parent-portal-body.parent-report-loaded .parent-portal {
  width: 100%;
  padding: 0;
}

.parent-portal-body.parent-report-loaded .parent-report-frame {
  display: block;
  min-height: 100vh;
  border-radius: 0;
}

.repo-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  background: #eef4fb;
}

.guide-body {
  background: #eef3f8;
}

.guide-shell {
  width: min(100% - 1.2rem, 1180px);
  margin: 0 auto;
  padding: 1rem 0 3rem;
}

.guide-hero,
.guide-section,
.guide-alert {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.guide-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1.1rem;
}

.guide-hero h1 {
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.guide-hero p {
  max-width: 720px;
  margin: 0.42rem 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.guide-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  justify-content: flex-end;
}

.guide-quick-links a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0.42rem 0.66rem;
  border: 1px solid #cbd7ea;
  border-radius: 999px;
  background: #f8fbff;
  color: #1d3764;
  font-size: 0.78rem;
  font-weight: 900;
  text-decoration: none;
}

.guide-alert {
  margin-top: 0.75rem;
  padding: 0.9rem 1rem;
  background: var(--amber-soft);
  color: #653700;
}

.guide-alert strong {
  display: block;
  margin-bottom: 0.22rem;
}

.guide-alert p {
  margin: 0;
  line-height: 1.55;
}

.guide-section {
  margin-top: 0.8rem;
  padding: 1rem;
}

.guide-section-head {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.9rem;
}

.guide-section-head > span {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-weight: 950;
}

.guide-section-head h2 {
  font-size: 1.2rem;
}

.guide-section-head p {
  margin: 0.28rem 0 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.5;
}

.guide-section a {
  color: #1d4fbf;
  font-weight: 850;
}

.guide-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 0.85rem;
  align-items: start;
}

.guide-grid + .guide-grid {
  margin-top: 0.85rem;
}

.guide-grid-reverse {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.guide-grid-single {
  grid-template-columns: minmax(0, 1fr);
}

.guide-shot,
.guide-card {
  margin: 0;
  border: 1px solid #d9e2f0;
  border-radius: 8px;
  background: #fbfdff;
  overflow: hidden;
}

.guide-shot img {
  display: block;
  width: 100%;
  height: auto;
  background: #eef3f8;
}

.guide-shot figcaption {
  padding: 0.65rem 0.75rem;
  border-top: 1px solid #e4ebf5;
  color: #475467;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.5;
}

.guide-card {
  padding: 0.85rem;
}

.guide-card h3 {
  margin: 0 0 0.55rem;
  font-size: 1rem;
}

.guide-strong-line {
  margin: 0 0 0.85rem;
  padding: 0.7rem 0.8rem;
  border-radius: 8px;
  background: #fff7d6;
  color: #7a4200;
  font-size: 0.95rem;
  font-weight: 950;
  line-height: 1.55;
}

.guide-link-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.55rem;
}

.guide-link-strip a,
.guide-address-card a {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 32px;
  padding: 0.38rem 0.6rem;
  border: 1px solid #b8c8e0;
  border-radius: 999px;
  background: #fff;
  color: #1d4fbf;
  font-size: 0.82rem;
  font-weight: 950;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.guide-address-card p {
  margin: 0 0 0.65rem;
  color: #344054;
  font-weight: 750;
  line-height: 1.55;
}

.guide-qr-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: center;
}

.guide-qr-card img {
  width: 180px;
  padding: 0.65rem;
}

.guide-qr-card figcaption {
  border-top: 0;
  border-left: 1px solid #e4ebf5;
}

.guide-card ol,
.guide-card ul {
  margin: 0;
  padding-left: 1.2rem;
  color: #344054;
  font-weight: 700;
  line-height: 1.68;
}

.guide-method-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0.85rem 0 0.9rem;
}

.guide-method-grid article {
  min-height: 160px;
  padding: 0.85rem;
  border: 1px solid #d9e2f0;
  border-radius: 8px;
  background: #fbfdff;
}

.guide-method-grid b {
  display: block;
  color: #12305a;
  font-size: 0.92rem;
  font-weight: 950;
}

.guide-method-grid p {
  margin: 0.55rem 0 0;
  color: #344054;
  font-size: 0.86rem;
  font-weight: 760;
  line-height: 1.58;
}

.guide-toggle-intro {
  margin: 0;
  color: #475467;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.6;
}

.guide-method-toggle {
  margin-top: 0;
}

.guide-button-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.guide-button-grid article {
  min-height: 130px;
  padding: 0.82rem;
  border: 1px solid #d9e2f0;
  border-radius: 8px;
  background: #fbfdff;
}

.guide-button-grid b {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.25rem 0.5rem;
  border: 1px solid #cbd7ea;
  border-radius: 999px;
  background: var(--blue-soft);
  color: #1d4fbf;
  font-size: 0.82rem;
}

.guide-button-grid p {
  margin: 0.55rem 0 0;
  color: #344054;
  font-size: 0.86rem;
  font-weight: 750;
  line-height: 1.58;
}

.guide-note {
  margin: 0.75rem 0 0;
  padding: 0.65rem;
  border-radius: 7px;
  background: var(--blue-soft);
  color: #244373;
  font-size: 0.84rem;
  line-height: 1.55;
}

.guide-faq {
  display: grid;
  gap: 0.55rem;
}

.guide-faq details {
  border: 1px solid #d9e2f0;
  border-radius: 8px;
  background: #fbfdff;
  padding: 0.75rem 0.85rem;
}

.guide-faq summary {
  cursor: pointer;
  font-weight: 900;
}

.guide-faq summary::marker,
.guide-hidden-toggle summary::marker {
  color: #dc2626;
}

.guide-faq summary::-webkit-details-marker,
.guide-hidden-toggle summary::-webkit-details-marker {
  color: #dc2626;
}

.guide-faq summary em,
.guide-hidden-toggle summary em {
  color: #dc2626;
  font-style: normal;
  font-weight: 950;
}

.guide-faq p {
  margin: 0.6rem 0 0;
  color: #475467;
  font-weight: 700;
  line-height: 1.55;
}

.guide-hidden-toggle {
  margin-top: 0.85rem;
  border: 1px solid #d9e2f0;
  border-radius: 8px;
  background: #fbfdff;
  padding: 0.8rem;
}

.guide-hidden-toggle summary {
  cursor: pointer;
  font-weight: 950;
  color: #1d3764;
}

.guide-hidden-toggle[open] summary {
  margin-bottom: 0.8rem;
}

.guide-feedback-form {
  border: 1px solid #d9e2f0;
  border-radius: 8px;
  background: #fbfdff;
  padding: 1rem;
}

.guide-feedback-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.guide-feedback-form label {
  display: grid;
  gap: 0.35rem;
  color: #1f2f46;
  font-size: 0.82rem;
  font-weight: 900;
}

.guide-feedback-form input,
.guide-feedback-form select,
.guide-feedback-form textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cbd7ea;
  border-radius: 7px;
  background: #fff;
  color: #172033;
  font: inherit;
  font-weight: 750;
  padding: 0.62rem 0.7rem;
}

.guide-feedback-form input[type="file"] {
  padding: 0.52rem 0.7rem;
}

.guide-feedback-description {
  margin-top: 0.85rem;
}

.guide-feedback-form textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.5;
}

.guide-feedback-actions {
  margin-top: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.guide-feedback-actions p {
  margin: 0;
  color: #52657f;
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.45;
}

.guide-feedback-actions button {
  min-height: 42px;
  border: 0;
  border-radius: 7px;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 950;
  padding: 0.65rem 1rem;
}

.guide-feedback-actions button:disabled {
  cursor: wait;
  opacity: 0.65;
}

@media (max-width: 1200px) {
  .hero,
  .layout {
    grid-template-columns: 1fr;
  }

  .setup-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filters {
    position: static;
  }

  .hero-actions,
  .toolbar,
  .toolbar-actions {
    justify-content: flex-start;
  }

  .table-wrap {
    max-height: 70vh;
  }

  .exam-field-grid {
    grid-template-columns: 1fr;
  }

  .exam-quick-add-grid {
    grid-template-columns: 1fr;
  }

  .exam-extra-picker {
    grid-template-columns: 1fr;
  }

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

  .mobile-question-number {
    grid-row: auto;
  }

  .parent-portal-body.parent-report-loaded .parent-code-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .guide-hero,
  .guide-grid,
  .guide-grid-reverse,
  .guide-grid-single,
  .guide-method-grid,
  .guide-button-grid {
    grid-template-columns: 1fr;
  }

  .guide-qr-card {
    grid-template-columns: 1fr;
  }

  .guide-qr-card img {
    width: min(220px, 100%);
    margin: 0 auto;
  }

  .guide-qr-card figcaption {
    border-left: 0;
    border-top: 1px solid #e4ebf5;
  }

  .guide-quick-links {
    justify-content: flex-start;
  }

  .guide-feedback-grid {
    grid-template-columns: 1fr;
  }

  .guide-feedback-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .excel-import-target-grid {
    grid-template-columns: 1fr;
  }

  .excel-import-dialog-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .excel-import-dialog-actions button {
    min-height: 42px;
  }

  .parent-portal {
    width: min(100% - 24px, 100%);
    padding: 40px 0 24px;
  }

  .parent-code-card,
  .repo-gate-card {
    padding: 22px 18px;
  }

  .parent-code-card h1,
  .repo-gate-card h1 {
    font-size: 1.6rem;
  }

  .parent-code-form input,
  .repo-gate-card input,
  .parent-code-form button,
  .repo-gate-card button {
    min-height: 48px;
  }

  .parent-report-frame {
    min-height: 92vh;
    border-radius: 18px;
  }
}
