* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100dvh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  letter-spacing: 0;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-record-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  justify-content: center;
  padding: 12px 16px 18px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
  text-align: center;
}

.site-record-footer a {
  opacity: 0.72;
}

.site-record-footer a:hover {
  opacity: 1;
  text-decoration: underline;
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hidden {
  display: none !important;
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border-radius: var(--radius-small);
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  line-height: 1;
  transition: background 160ms ease, transform 120ms ease;
}

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

.button:active {
  transform: translateY(1px);
}

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

.button.secondary:hover {
  background: var(--surface-soft);
}

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

.button.small {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

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

.field label,
.field-label {
  font-size: 14px;
  font-weight: 800;
}

.field input,
.field select,
.field textarea,
.select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  outline: none;
  background: #fff;
  color: var(--ink);
  padding: 11px 13px;
}

.field textarea {
  min-height: 112px;
  resize: vertical;
  line-height: 1.7;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.field-help,
.muted {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
}

.status.warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.status.neutral {
  background: #edf0ee;
  color: #53605a;
}

.notice {
  padding: 14px 16px;
  border-radius: var(--radius-small);
  background: var(--accent-soft);
  color: var(--accent-dark);
  line-height: 1.65;
}

.notice.warning {
  background: var(--warning-soft);
  color: #6f4a0d;
}

.notice.error {
  background: var(--danger-soft);
  color: var(--danger);
}

.empty {
  min-height: 220px;
  display: grid;
  place-items: center;
  padding: 32px;
  border: 1px dashed #cbd7d1;
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.skeleton {
  min-height: 120px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, #e7ece9 25%, #f2f5f3 50%, #e7ece9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
  to { background-position: -200% 0; }
}

.login-page {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
}

.login-intro {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(32px, 6vw, 80px);
  background:
    linear-gradient(rgba(16, 39, 30, 0.25), rgba(16, 39, 30, 0.7)),
    url("/student-assets/work-48.png") center / cover;
  color: #fff;
}

.login-brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 24px;
  font-weight: 900;
}

.login-brand span {
  font-size: 13px;
  font-weight: 700;
  opacity: 0.78;
}

.login-copy {
  max-width: 680px;
}

.login-copy h1 {
  max-width: 680px;
  margin-bottom: 18px;
  font-size: clamp(42px, 7vw, 84px);
  line-height: 1.06;
}

.login-copy p {
  max-width: 620px;
  margin-bottom: 28px;
  font-size: 18px;
  line-height: 1.8;
}

.login-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.login-steps span {
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 13px;
}

.login-panel {
  display: grid;
  place-items: center;
  padding: 28px;
  background: var(--surface);
}

.login-form {
  width: min(420px, 100%);
}

.login-form h2 {
  margin-bottom: 8px;
  font-size: 30px;
}

.login-form > p {
  margin-bottom: 28px;
  color: var(--muted);
  line-height: 1.7;
}

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

.login-form .button {
  width: 100%;
  min-height: 50px;
}

.demo-access {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.app-shell {
  width: min(var(--content), 100%);
  min-height: 100dvh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  padding: 22px;
}

.sidebar {
  position: sticky;
  top: 22px;
  height: calc(100dvh - 44px);
  display: flex;
  flex-direction: column;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.site-logo {
  display: block;
  object-fit: contain;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 24px;
  font-size: 20px;
  font-weight: 900;
}

.brand-logo {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
}

.brand-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.brand small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.mobile-page-logo {
  display: none;
}

.mobile-logout-button {
  display: none;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav button {
  min-height: 44px;
  border-radius: var(--radius-small);
  background: transparent;
  color: var(--muted);
  text-align: left;
  padding: 0 13px;
  font-weight: 800;
}

.nav button:hover,
.nav button.active {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.sidebar-user {
  margin-top: auto;
  display: grid;
  gap: 10px;
  padding: 14px 10px 4px;
  border-top: 1px solid var(--line);
}

.sidebar-user strong,
.sidebar-user span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user span {
  color: var(--muted);
  font-size: 12px;
}

.main {
  min-width: 0;
  padding-bottom: 48px;
}

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

.topbar h1 {
  margin: 0;
  font-size: 26px;
}

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

.topbar-actions .select {
  width: auto;
  min-width: 166px;
}

.topbar-actions .button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.phase-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(2, minmax(160px, 0.36fr));
  gap: 16px;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
}

.phase-band h2 {
  margin-bottom: 7px;
  font-size: 22px;
}

.phase-band p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.68);
}

.countdown {
  padding-left: 18px;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.countdown span {
  display: block;
  margin-bottom: 5px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
}

.countdown strong {
  font-size: 19px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.72fr);
  gap: 20px;
  margin-top: 20px;
}

.workflow {
  min-height: 430px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 5vw, 58px);
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}

.workflow h2 {
  max-width: 720px;
  margin-bottom: 14px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.12;
}

.workflow > p {
  max-width: 680px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.workflow-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 30px;
}

.workflow-line span {
  padding: 8px 11px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: #45534d;
  font-size: 13px;
  font-weight: 800;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.icon-button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-weight: 900;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.section-head h2 {
  margin-bottom: 6px;
  font-size: 28px;
}

.section-head p {
  margin-bottom: 0;
  color: var(--muted);
}

.panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.split {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: 20px;
}

.task-poem {
  padding: 28px;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
}

.task-poem h3 {
  font-size: 30px;
}

.task-poem p {
  color: rgba(255, 255, 255, 0.72);
  line-height: 2;
  white-space: pre-line;
}

.upload-form {
  display: grid;
  gap: 18px;
}

.upload-preview {
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px dashed #b9c9c1;
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--muted);
}

.upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

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

.work-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
}

.work-card:hover {
  border-color: #a8bdb3;
  box-shadow: var(--shadow);
}

.work-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--surface-soft);
}

.work-card-body {
  display: grid;
  gap: 9px;
  padding: 15px;
}

.work-card-body h3 {
  margin: 0;
  font-size: 16px;
}

.work-card-body p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.55fr) minmax(0, 1.45fr);
  gap: 24px;
}

.detail-image-link {
  position: sticky;
  top: 22px;
  display: grid;
  align-self: start;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  text-decoration: none;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: zoom-in;
}

.detail-image-link:hover,
.detail-image-link:focus-visible {
  color: var(--accent-dark);
}

.detail-image {
  width: 100%;
  max-height: 420px;
  border-radius: var(--radius);
  object-fit: contain;
  background: #e8eeeb;
}

.detail-content {
  display: grid;
  gap: 18px;
}

.option-list {
  display: grid;
  gap: 10px;
}

.poem-choice-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(360px, 1.1fr);
  gap: 16px;
  align-items: start;
}

.poem-preview {
  position: sticky;
  top: 84px;
  visibility: hidden;
  opacity: 0;
  transform: translateX(8px);
  display: flex;
  flex-direction: column;
  max-height: min(520px, calc(100dvh - 140px));
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-small);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 14px 34px rgba(38, 49, 45, 0.12);
  transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
}

.poem-preview.visible {
  visibility: visible;
  opacity: 1;
  transform: translateX(0);
}

.poem-preview span {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-dark);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.poem-preview strong {
  font-family: "Noto Serif SC", "Songti SC", SimSun, serif;
  font-size: 18px;
}

.poem-preview p {
  min-height: 0;
  margin: 12px 0 0;
  padding-right: 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
  white-space: pre-line;
  color: var(--muted);
  line-height: 1.9;
}

.option {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--surface);
}

.option:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

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

.rating label {
  min-height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--surface);
  font-weight: 800;
}

.rating label:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.rating input {
  position: absolute;
  opacity: 0;
}

.comment-list {
  display: grid;
  gap: 12px;
}

.comment {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.comment:first-child {
  border-top: 0;
}

.comment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.comment p {
  margin-bottom: 8px;
  color: #405049;
  line-height: 1.7;
}

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

.progress-item {
  padding: 18px;
  border-top: 3px solid var(--accent);
  border-radius: 0 0 var(--radius-small) var(--radius-small);
  background: var(--surface);
}

.progress-item span {
  color: var(--muted);
  font-size: 13px;
}

.progress-item strong {
  display: block;
  margin: 10px 0 12px;
  font-size: 26px;
}

.progress-bar {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5ebe8;
}

.progress-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.profile-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 20px;
  margin-top: 20px;
}

.list {
  display: grid;
  gap: 10px;
}

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.list-row.is-me {
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  padding-inline: 12px;
}

.list-row:last-child {
  border-bottom: 0;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(15, 24, 20, 0.46);
}

.modal.open {
  display: grid;
}

.modal-dialog {
  width: min(560px, 100%);
  max-height: calc(100dvh - 40px);
  overflow: auto;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.modal-dialog.modal-wide {
  width: min(1040px, calc(100vw - 32px));
}

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

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  place-items: center;
  padding: 28px;
  background: rgba(12, 18, 16, 0.88);
}

.image-lightbox.open {
  display: grid;
}

.image-lightbox img {
  max-width: min(94vw, 1600px);
  max-height: 90dvh;
  object-fit: contain;
  border-radius: var(--radius-small);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

.image-lightbox-close {
  position: fixed;
  top: 18px;
  right: 20px;
  z-index: 1;
}

.teacher-shell {
  --content: 1440px;
  grid-template-columns: 240px minmax(0, 1fr);
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric {
  padding: 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}

.metric span {
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 13px;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f1f5f3;
  color: #52605a;
}

tbody tr:hover {
  background: #f7faf8;
}

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

.toggle-row {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.toggle {
  width: 46px;
  height: 26px;
  position: relative;
}

.toggle input {
  position: absolute;
  opacity: 0;
}

.toggle i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: #c8d1cd;
  transition: 160ms ease;
}

.toggle i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: 160ms ease;
}

.toggle input:checked + i {
  background: var(--accent);
}

.toggle input:checked + i::after {
  transform: translateX(20px);
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 80;
  max-width: min(380px, calc(100vw - 40px));
  padding: 13px 16px;
  border-radius: var(--radius-small);
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
}

@media (max-width: 1023px) {
  .work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .phase-band {
    grid-template-columns: 1fr 1fr;
  }

  .phase-copy {
    grid-column: 1 / -1;
  }

  .progress-grid,
  .metric-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-image-link {
    position: static;
  }

  .detail-image {
    max-height: 360px;
  }
}

@media (max-width: 767px) {
  .poem-choice-layout {
    grid-template-columns: 1fr;
  }

  .poem-preview {
    position: static;
    order: 2;
    max-height: 48dvh;
    transform: translateY(-4px);
  }

  .poem-preview.visible {
    transform: translateY(0);
  }

  .mobile-page-logo {
    width: 34px;
    height: 34px;
    display: block;
    flex: 0 0 34px;
  }

  .topbar .mobile-page-logo + h1 {
    margin-right: auto;
  }

  .login-page {
    grid-template-columns: 1fr;
  }

  .login-intro {
    min-height: 42dvh;
    padding: 24px;
  }

  .login-copy h1 {
    font-size: 42px;
  }

  .login-copy p {
    font-size: 15px;
  }

  .login-panel {
    min-height: 58dvh;
    align-items: start;
    padding: 28px 20px 36px;
  }

  .app-shell,
  .teacher-shell {
    display: block;
    padding: 14px 14px 88px;
  }

  .sidebar {
    position: fixed;
    inset: auto 10px 10px;
    z-index: 40;
    height: auto;
    display: block;
    padding: 6px;
    border-radius: 16px;
    box-shadow: var(--shadow);
  }

  .brand,
  .sidebar-user {
    display: none;
  }

  .nav {
    grid-template-columns: repeat(4, 1fr);
    gap: 3px;
  }

  .teacher-shell .nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    overflow-x: auto;
  }

  .nav button {
    min-height: 50px;
    padding: 0 6px;
    font-size: 11px;
    text-align: center;
  }

  .topbar {
    min-height: 52px;
    margin-bottom: 14px;
  }

  .topbar h1 {
    font-size: 21px;
  }

  .phase-band,
  .dashboard-grid,
  .split,
  .profile-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .phase-band {
    gap: 14px;
    padding: 18px;
  }

  .phase-copy {
    grid-column: auto;
  }

  .countdown {
    padding: 0;
    border: 0;
  }

  .workflow {
    min-height: 360px;
    padding: 26px 22px;
  }

  .workflow h2 {
    font-size: 34px;
  }

  .work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .work-card-body {
    padding: 12px;
  }

  .work-card-body h3 {
    font-size: 14px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .progress-grid,
  .metric-row {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .progress-item,
  .metric {
    padding: 14px;
  }

  .progress-item strong,
  .metric strong {
    font-size: 22px;
  }

  .panel {
    padding: 18px;
  }

  .topbar-actions .button.secondary {
    display: none;
  }

  .topbar-actions .button.secondary.mobile-logout-button {
    min-height: 36px;
    display: inline-flex;
    padding: 7px 12px;
  }

  .teacher-shell .topbar {
    flex-wrap: wrap;
  }

  .teacher-shell .topbar-actions {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .teacher-shell .topbar-actions .select {
    width: 100%;
    min-width: 0;
  }

  .detail-layout {
    gap: 16px;
  }

  .rating {
    gap: 5px;
  }
}

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
.pwa-splash {
  display: none;
}

@media (display-mode: standalone) {
  .pwa-splash {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    padding: 32px;
    background: #f4f0e7;
    color: #385048;
    opacity: 1;
    transition: opacity 320ms ease, visibility 320ms ease;
  }

  .pwa-splash.is-finished {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
  }

  .pwa-splash img {
    width: min(34vw, 152px);
    height: auto;
  }

  .pwa-splash-progress {
    width: min(64vw, 280px);
    height: 4px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(56, 80, 72, 0.14);
  }

  .pwa-splash-progress i {
    display: block;
    width: 42%;
    height: 100%;
    border-radius: inherit;
    background: #1f7a5a;
    animation: pwa-loading 1.35s ease-in-out infinite;
  }

  .pwa-splash p {
    margin: 0;
    font-family: serif;
    font-size: 16px;
    letter-spacing: 0.14em;
  }
}

@keyframes pwa-loading {
  from { transform: translateX(-110%); }
  to { transform: translateX(250%); }
}

@media (prefers-reduced-motion: reduce) {
  .pwa-splash-progress i { animation-duration: 2.8s; }
}
