:root {
  color-scheme: light;
  --ink: #21302f;
  --muted: #66716f;
  --line: #d9dfdc;
  --paper: #fbfaf7;
  --surface: #ffffff;
  --green: #1f7a5a;
  --green-dark: #165640;
  --red: #b33a3a;
  --gold: #c48a22;
  --blue: #34699a;
  --shadow: 0 10px 30px rgba(33, 48, 47, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

button {
  border: 0;
  cursor: pointer;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px clamp(18px, 4vw, 48px);
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  background: var(--green);
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0;
}

.org {
  margin: 0 0 4px;
  color: var(--green);
  font-weight: 700;
}

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

h1 {
  font-size: clamp(26px, 3vw, 38px);
}

h2 {
  font-size: 22px;
}

.date-pill {
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--muted);
}

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

.logout-button {
  min-height: 40px;
  border-radius: 8px;
  padding: 0 14px;
  background: #eef4f2;
  color: var(--green-dark);
  font-weight: 700;
}

.mode-button {
  min-height: 40px;
  border: 1px solid #b9d2c6;
  border-radius: 8px;
  padding: 0 14px;
  background: #edf7f1;
  color: var(--green-dark);
  font-weight: 800;
}

.pet-mode-button {
  border-color: #bfd0e3;
  background: #edf3fa;
  color: #28577f;
}

.ket-mode-button {
  border-color: #c8b9df;
  background: #f5f0fb;
  color: #694c8d;
}

.writing-mode-button {
  border-color: #d9c18a;
  background: #fff7e5;
  color: #8a5b0c;
}

.login-screen {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 118px);
  padding: 28px 16px;
}

.login-screen[hidden] {
  display: none;
}

.login-box {
  display: grid;
  gap: 18px;
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
  padding: 28px;
}

.login-box button {
  min-height: 44px;
  border-radius: 8px;
  background: var(--green);
  color: #ffffff;
  font-weight: 800;
}

.login-status {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
}

.login-status.error {
  color: var(--red);
}

main {
  width: min(1280px, calc(100% - 32px));
  margin: 28px auto 52px;
}

main[hidden] {
  display: none;
}

.mode-chooser {
  min-height: 440px;
  display: grid;
  align-content: center;
  gap: 28px;
  padding: clamp(28px, 6vw, 64px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.mode-chooser[hidden] {
  display: none;
}

.mode-chooser-heading {
  text-align: center;
}

.mode-chooser-heading h2 {
  font-size: clamp(26px, 4vw, 36px);
}

.mode-chooser-heading p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
}

.mode-chooser-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.mode-card {
  display: grid;
  align-content: center;
  gap: 10px;
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px 18px;
  background: #ffffff;
  color: var(--ink);
  text-align: left;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.mode-card:hover,
.mode-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  outline: none;
}

.mode-card strong {
  font-size: 22px;
}

.mode-card span {
  color: var(--muted);
  line-height: 1.55;
}

.mode-card-class {
  border-color: #b9d2c6;
  background: #f4faf6;
}

.mode-card-writing {
  border-color: #d9c18a;
  background: #fffaf0;
}

.mode-card-pet {
  border-color: #bfd0e3;
  background: #f5f9fd;
}

.mode-card-ket {
  border-color: #c8b9df;
  background: #faf7fd;
}

.file-warning {
  margin-bottom: 20px;
  border: 1px solid #d6a03a;
  border-radius: 8px;
  background: #fff6df;
  color: #6f4b08;
  padding: 14px 16px;
  font-weight: 700;
}

.toolbar,
.knowledge-panel,
.upload-panel,
.report-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(280px, 1.3fr);
  gap: 20px;
  padding: 20px;
  margin-bottom: 20px;
}

.knowledge-panel {
  padding: 20px;
  margin-bottom: 20px;
}

.knowledge-panel .panel-heading {
  margin-bottom: 16px;
}

.knowledge-badge {
  flex: 0 0 auto;
  border: 1px solid #c7ded4;
  border-radius: 999px;
  padding: 7px 10px;
  background: #f0f8f4;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 800;
}

.knowledge-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.knowledge-notes-field {
  margin-top: 14px;
}

.knowledge-preview {
  margin-top: 14px;
  border-left: 4px solid var(--green);
  padding: 10px 14px;
  background: #f4f8f5;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-line;
}

.knowledge-preview strong {
  color: var(--ink);
}

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

.field span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

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

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(31, 122, 90, 0.14);
}

.upload-panel,
.report-section {
  padding: 20px;
  margin-top: 20px;
}

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

.panel-heading p {
  margin: 7px 0 0;
  color: var(--muted);
}

.upload-button,
.report-actions button,
.ai-review,
.full-score-review,
.save-review {
  display: inline-grid;
  place-items: center;
  min-height: 42px;
  border-radius: 8px;
  padding: 0 16px;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
}

.upload-button input {
  display: none;
}

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

.report-actions .danger {
  background: var(--red);
}

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

.student-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 16px;
}

.empty-state {
  grid-column: 1 / -1;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 34px;
  text-align: center;
  color: var(--muted);
  background: #fcfcfb;
}

.student-card {
  position: relative;
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.remove-card {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(33, 48, 47, 0.72);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  touch-action: manipulation;
}

.preview-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: 10px;
  min-height: 112px;
}

.preview-item {
  position: relative;
}

.preview {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 8px;
  background: #f0f2ef;
  border: 1px solid var(--line);
}

.preview-empty {
  display: grid;
  place-items: center;
  min-height: 112px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fcfcfb;
}

.remove-image {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(179, 58, 58, 0.9);
  color: #fff;
  font-size: 18px;
  line-height: 1;
}

.card-image-button {
  display: inline-grid;
  place-items: center;
  min-height: 38px;
  border-radius: 8px;
  border: 1px solid var(--green);
  color: var(--green-dark);
  font-weight: 700;
  cursor: pointer;
}

.card-image-button input {
  display: none;
}

.image-count {
  margin: -8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.card-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.card-fields .field:first-child {
  grid-column: 1 / -1;
}

.review-field textarea {
  min-height: 112px;
}

.review-highlight {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(196, 138, 34, 0.2);
}

.ai-review {
  width: 100%;
}

.full-score-review {
  width: 100%;
  background: var(--gold);
}

.save-review {
  width: 100%;
  background: var(--blue);
}

.ai-review[disabled] {
  cursor: wait;
  opacity: 0.72;
}

.status-line {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.status-line.error {
  color: var(--red);
}

.status-line.success {
  color: var(--green);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.report-title {
  margin: 0;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  font-size: 20px;
  text-align: center;
}

table {
  width: 100%;
  min-width: 960px;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #edf4f0;
  color: var(--green-dark);
  font-size: 14px;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.check {
  color: var(--green);
  font-weight: 800;
}

.slash {
  color: var(--muted);
  font-weight: 800;
}

.review-cell {
  min-width: 260px;
  line-height: 1.55;
}

.row-delete {
  border-radius: 8px;
  background: #f8e8e8;
  color: var(--red);
  font-weight: 700;
  min-height: 34px;
  padding: 0 12px;
}

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

.pet-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #ffffff 0%, #f2f7fb 100%);
}

.pet-hero p:last-child {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.pet-score-note {
  flex: 0 0 auto;
  border: 1px solid #cbd9e8;
  border-radius: 8px;
  padding: 12px 16px;
  background: #f7fbff;
  color: #28577f;
  font-weight: 800;
  line-height: 1.65;
  text-align: center;
}

.pet-workspace {
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(420px, 1.2fr);
  gap: 20px;
  padding: 20px;
}

.pet-batch-section,
.pet-report-section {
  margin-top: 20px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.pet-batch-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(300px, 1.25fr);
  gap: 16px;
  margin-bottom: 18px;
}

.pet-batch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 16px;
}

.pet-batch-card {
  position: relative;
  display: grid;
  gap: 14px;
  min-width: 0;
  border: 1px solid #cbd9e8;
  border-radius: 8px;
  padding: 16px;
  background: #fbfdff;
}

.pet-batch-name-field {
  padding-right: 38px;
}

.pet-remove-card {
  background: #eef3f7;
  color: #28577f;
}

.pet-assignment {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.pet-assignment-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.pet-assignment-heading h3 {
  margin: 0;
  color: #28577f;
  font-size: 17px;
}

.pet-assignment-score {
  color: #28577f;
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}

.pet-second-type-field {
  flex: 1;
}

.pet-assignment-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 8px;
  min-height: 88px;
}

.pet-assignment-review {
  min-height: 40px;
  font-size: 14px;
}

.pet-assignment-result {
  border-left: 3px solid #4d8bb8;
  padding: 10px 12px;
  background: #f3f8fc;
}

.pet-assignment-feedback {
  margin: 0;
  line-height: 1.6;
}

.pet-assignment-advice {
  margin-top: 8px;
  font-size: 13px;
}

.pet-save-student {
  min-height: 42px;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-weight: 800;
}

.pet-score-text {
  color: #28577f;
  font-weight: 800;
  white-space: nowrap;
}

.pet-input-panel,
.pet-result-panel {
  min-width: 0;
}

.pet-input-panel {
  display: grid;
  align-content: start;
  gap: 16px;
}

.pet-input-panel .panel-heading,
.pet-result-panel .panel-heading {
  margin-bottom: 0;
}

.pet-preview-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 10px;
  min-height: 116px;
}

.pet-primary-button {
  min-height: 46px;
  border-radius: 8px;
  background: #28577f;
  color: #fff;
  font-weight: 800;
}

.pet-primary-button[disabled] {
  cursor: wait;
  opacity: 0.7;
}

.pet-result-panel {
  display: grid;
  align-content: start;
  gap: 18px;
  border-left: 1px solid var(--line);
  padding-left: 20px;
}

.pet-total-score {
  color: #28577f;
  font-size: 28px;
  font-weight: 900;
  white-space: nowrap;
}

.pet-score-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.pet-score-card {
  border: 1px solid #cbd9e8;
  border-radius: 8px;
  padding: 14px;
  background: #f8fbfe;
}

.pet-score-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.pet-score-card h3 {
  margin: 0;
  color: #28577f;
  font-size: 15px;
  line-height: 1.4;
}

.pet-score-card strong {
  color: #28577f;
  font-size: 22px;
  white-space: nowrap;
}

.pet-score-card strong span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.pet-score-bar {
  height: 7px;
  margin: 12px 0 10px;
  overflow: hidden;
  border-radius: 99px;
  background: #dce7f0;
}

.pet-score-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #4d8bb8;
}

.pet-score-card p,
.pet-feedback-text {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.65;
}

.pet-result-block {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.pet-result-block h3 {
  margin: 0 0 10px;
  color: var(--green-dark);
  font-size: 16px;
}

.pet-extracted-text {
  min-height: 170px;
  background: #fcfcfb;
  line-height: 1.65;
}

.pet-advice-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: var(--ink);
  line-height: 1.6;
}

.ket-hero,
.ket-workspace,
.ket-batch-section,
.ket-report-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.ket-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #ffffff 0%, #faf5ff 100%);
}

.ket-hero p:last-child {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.ket-score-note {
  flex: 0 0 auto;
  border: 1px solid #d7c8e8;
  border-radius: 8px;
  padding: 12px 16px;
  background: #fbf8ff;
  color: #694c8d;
  font-weight: 800;
  line-height: 1.65;
  text-align: center;
}

.ket-workspace {
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(420px, 1.2fr);
  gap: 20px;
  padding: 20px;
}

.ket-input-panel,
.ket-result-panel {
  min-width: 0;
}

.ket-input-panel {
  display: grid;
  align-content: start;
  gap: 16px;
}

.ket-primary-button {
  min-height: 46px;
  border-radius: 8px;
  background: #694c8d;
  color: #fff;
  font-weight: 800;
}

.ket-primary-button[disabled] {
  cursor: wait;
  opacity: 0.7;
}

.ket-result-panel {
  display: grid;
  align-content: start;
  gap: 18px;
  border-left: 1px solid var(--line);
  padding-left: 20px;
}

.ket-total-score {
  color: #694c8d;
  font-size: 28px;
  font-weight: 900;
  white-space: nowrap;
}

.ket-batch-section,
.ket-report-section {
  margin-top: 20px;
  padding: 20px;
}

.ket-batch-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(300px, 1.25fr);
  gap: 16px;
  margin-bottom: 18px;
}

.ket-batch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 16px;
}

.ket-batch-card {
  position: relative;
  display: grid;
  gap: 14px;
  min-width: 0;
  border: 1px solid #d7c8e8;
  border-radius: 8px;
  padding: 16px;
  background: #fdfaff;
}

.ket-batch-name-field {
  padding-right: 38px;
}

.ket-remove-card {
  background: #f1eafa;
  color: #694c8d;
}

.ket-assignment {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.ket-assignment-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.ket-assignment-heading h3 {
  margin: 0;
  color: #694c8d;
  font-size: 17px;
}

.ket-assignment-score {
  color: #694c8d;
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}

.ket-assignment-prompt-preview,
.ket-assignment-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 8px;
  min-height: 88px;
}

.ket-assignment-review {
  min-height: 40px;
  font-size: 14px;
}

.ket-assignment-result {
  border-left: 3px solid #9a76b9;
  padding: 10px 12px;
  background: #faf6ff;
}

.ket-assignment-feedback {
  margin: 0;
  line-height: 1.6;
}

.ket-save-student {
  min-height: 42px;
  border-radius: 8px;
  background: #694c8d;
  color: #fff;
  font-weight: 800;
}

.ket-score-text {
  color: #694c8d;
  font-weight: 800;
  white-space: nowrap;
}

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

.writing-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
  margin-bottom: 20px;
  background: #fffaf0;
}

.writing-hero p:last-child {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.writing-score-note {
  flex: 0 0 auto;
  border: 1px solid #e2c98e;
  border-radius: 8px;
  padding: 12px 16px;
  background: #fffaf0;
  color: #8a5b0c;
  font-weight: 800;
  line-height: 1.65;
  text-align: center;
}

.writing-workspace {
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(420px, 1.2fr);
  gap: 20px;
  padding: 20px;
}

.writing-input-panel {
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
}

.writing-primary-button {
  min-height: 46px;
  border-radius: 8px;
  background: #a87317;
  color: #fff;
  font-weight: 800;
}

.writing-primary-button[disabled] {
  cursor: wait;
  opacity: 0.7;
}

.writing-result-panel {
  display: grid;
  align-content: start;
  gap: 18px;
  min-width: 0;
  border-left: 1px solid var(--line);
  padding-left: 20px;
}

.writing-result-block {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.writing-result-block h3 {
  margin: 0 0 10px;
  color: var(--green-dark);
  font-size: 16px;
}

.writing-feedback-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.writing-feedback-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.writing-feedback-box h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.writing-strengths-box {
  border-color: #b9d2c6;
  background: #f4faf6;
}

.writing-strengths-box h3 {
  color: var(--green-dark);
}

.writing-improvements-box {
  border-color: #e2c98e;
  background: #fffaf0;
}

.writing-improvements-box h3 {
  color: #8a5b0c;
}

.writing-ket-detail {
  display: grid;
  gap: 14px;
}

.writing-ket-detail[hidden] {
  display: none;
}

.writing-ket-box {
  border: 1px solid #b9d2c6;
  border-top-width: 6px;
  border-radius: 0;
  padding: 16px;
}

.writing-ket-box h3 {
  margin: 0 0 10px;
  font-size: 17px;
}

.writing-ket-vocabulary {
  border-color: #4caf50;
  background: #f0f8e9;
}

.writing-ket-vocabulary h3 {
  color: #3b9d43;
}

.writing-ket-sentence {
  border-color: #2693e6;
  background: #e9f5ff;
}

.writing-ket-sentence h3 {
  color: #1687d8;
}

.writing-ket-upgrade {
  border-color: #f28b00;
  background: #fff4e1;
}

.writing-ket-upgrade h3 {
  color: #e87900;
}

.writing-total-score {
  color: #8a5b0c;
  font-size: 28px;
  font-weight: 900;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .app-header,
  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-actions {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .toolbar {
    grid-template-columns: 1fr;
  }

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

  .pet-batch-toolbar {
    grid-template-columns: 1fr;
  }

  .ket-batch-toolbar {
    grid-template-columns: 1fr;
  }

  .student-grid {
    grid-template-columns: 1fr;
  }

  .pet-batch-grid {
    grid-template-columns: 1fr;
  }

  .ket-batch-grid {
    grid-template-columns: 1fr;
  }

  .mode-chooser-grid {
    grid-template-columns: 1fr;
  }

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

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

  .pet-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .ket-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .pet-workspace {
    grid-template-columns: 1fr;
  }

  .ket-workspace {
    grid-template-columns: 1fr;
  }

  .writing-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .writing-workspace {
    grid-template-columns: 1fr;
  }

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

  .pet-result-panel {
    border-top: 1px solid var(--line);
    border-left: 0;
    padding-top: 20px;
    padding-left: 0;
  }

  .ket-result-panel {
    border-top: 1px solid var(--line);
    border-left: 0;
    padding-top: 20px;
    padding-left: 0;
  }

  .writing-result-panel {
    border-top: 1px solid var(--line);
    border-left: 0;
    padding-top: 20px;
    padding-left: 0;
  }
}

@media print {
  .toolbar,
  .upload-panel,
  .report-actions,
  .row-delete {
    display: none;
  }

  body {
    background: #fff;
  }

  main {
    width: 100%;
    margin: 0;
  }

  .app-header,
  .report-section {
    box-shadow: none;
    border: 0;
  }
}
