/* ============================================================
   班级作品展评 — 展厅式界面
   ============================================================ */

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f3f5f8;
  --ink: #18283e;
  --ink-soft: #35465c;
  --muted: #657286;
  --line: #dce3eb;
  --line-strong: #bdc9d8;
  --accent: #2855d9;
  --accent-dark: #1c3fa9;
  --accent-soft: #eaf0ff;
  --teal: #236b58;
  --teal-soft: #e7f2ed;
  --sun: #f2c94c;
  --danger: #ad3542;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(24, 40, 62, 0.05);
  --shadow: 0 10px 26px rgba(24, 40, 62, 0.1);
  --shadow-lg: 0 24px 70px rgba(24, 40, 62, 0.16);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --font-display: "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", serif;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}

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

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

h1, h2, h3 { line-height: 1.3; }

h1 {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

h2 { font-size: 1.08rem; }

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
img, video { max-width: 100%; }
[hidden] { display: none !important; }
::selection { color: #fff; background: var(--accent); }

.icon {
  width: 1.2em;
  height: 1.2em;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.18em;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.muted { color: var(--muted); }
.small { font-size: 0.82rem; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.mono { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.count { font-size: 0.92rem; font-weight: 500; }
.inline { display: inline-flex; margin: 0; }
.mobile-only { display: none; }

:focus-visible {
  outline: 3px solid var(--accent-dark);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 12px;
  z-index: 100;
  padding: 9px 14px;
  border-radius: 6px;
  color: #fff;
  background: var(--accent-dark);
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

.container {
  width: min(1500px, 100% - 48px);
  margin: 0 auto;
  padding: 40px 0 68px;
  flex: 1;
}

/* ---------------- 顶栏与导航 ---------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  padding-top: env(safe-area-inset-top);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.2) blur(14px);
  -webkit-backdrop-filter: saturate(1.2) blur(14px);
}

.topbar-inner {
  width: min(1500px, 100% - 48px);
  min-height: 70px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  font-weight: 700;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: var(--accent);
}

.brand-mark .icon { width: 22px; height: 22px; }
.brand-text { font-size: 1.02rem; }

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 7px;
  color: var(--ink-soft);
  font-size: 0.92rem;
  transition: color 0.16s ease, background 0.16s ease;
}

.nav .icon { display: none; }
.nav a.active { color: var(--accent-dark); background: var(--accent-soft); font-weight: 650; }

.user-area {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 1;
}

.user-chip {
  min-width: 0;
  max-width: 220px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  color: var(--ink-soft);
  font-size: 0.85rem;
  white-space: nowrap;
}

.user-chip > span { overflow: hidden; text-overflow: ellipsis; }

.user-chip::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------------- 按钮与表单 ---------------- */

.btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.35;
  white-space: nowrap;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.btn .icon { width: 18px; height: 18px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { color: #fff; background: var(--accent); }
.btn-primary:hover { background: var(--accent-dark); }

.btn-ghost {
  color: var(--ink-soft);
  background: var(--surface);
  border-color: var(--line-strong);
}

.btn-ghost:hover { color: var(--accent-dark); border-color: var(--accent); background: var(--accent-soft); }

.btn-danger-ghost {
  color: var(--danger);
  background: transparent;
  border-color: rgba(173, 53, 66, 0.35);
}

.btn-danger-ghost:hover { background: #fff0f1; border-color: var(--danger); }
.btn-sm { min-height: 40px; padding: 8px 13px; font-size: 0.84rem; }
.btn-block { width: 100%; }

.field { display: flex; flex-direction: column; gap: 8px; }

.field > span {
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 650;
}

.input,
.field input,
.field textarea,
.field select,
.rate-input input,
.criterion-row input:not([type="file"]) {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  font-size: 1rem;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.field textarea { min-height: 96px; resize: vertical; }

.input:focus,
.field input:focus,
.field textarea:focus,
.field select:focus,
.rate-input input:focus,
.criterion-row input:not([type="file"]):focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(40, 85, 217, 0.13);
}

.field select {
  padding-right: 38px;
  background: var(--surface)
    url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23657286' d='M6 8 0 0h12z'/%3E%3C/svg%3E")
    no-repeat right 14px center;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

/* ---------------- 消息与页头 ---------------- */

.flashes { display: grid; gap: 10px; margin-bottom: 22px; }

.flash {
  min-width: 0;
  padding: 13px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
  animation: flash-in 0.2s ease;
}

@keyframes flash-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.flash-ok { color: #185344; background: var(--teal-soft); border-color: #b9d9cd; }
.flash-error { color: #872b35; background: #fff0f1; border-color: #edc2c7; }

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

.page-head h1 { font-size: clamp(2rem, 3.3vw, 2.65rem); }

.lede {
  max-width: 64ch;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.8;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.lede-nowrap { max-width: none; white-space: nowrap; }

.back-link {
  max-width: 100%;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.back-link:hover { color: var(--accent-dark); }
.back-link .icon { width: 17px; height: 17px; }

/* ---------------- 作品工具栏 ---------------- */

.toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
}

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

.search-box > .icon {
  position: absolute;
  top: 50%;
  left: 14px;
  z-index: 1;
  width: 18px;
  height: 18px;
  color: var(--muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.search { max-width: none; padding-left: 42px; }

.segmented {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}

.seg {
  min-width: 58px;
  min-height: 40px;
  padding: 8px 13px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-size: 0.86rem;
}

.seg:hover { color: var(--ink); background: var(--surface-soft); }
.seg.is-active { color: #fff; background: var(--accent); font-weight: 650; }
.gallery-count { margin-left: auto; color: var(--muted); font-size: 0.82rem; }

/* ---------------- 作品排序 ---------------- */

.sort-control { position: relative; }

.sort-trigger {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--ink);
  background: var(--surface-soft);
  font-size: 0.86rem;
  white-space: nowrap;
}

.sort-trigger:hover { background: var(--surface); }
.sort-caption { color: var(--muted); }
.sort-arrow { width: 15px; height: 15px; color: var(--accent); }

.sort-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  min-width: 132px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.sort-option {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 0.86rem;
  text-align: left;
}

.sort-option:hover { background: var(--surface-soft); }
.sort-option.is-active { color: var(--accent); background: var(--accent-soft); font-weight: 650; }
.sort-option-arrow { width: 15px; height: 15px; }

/* ---------------- 画框式作品墙 ---------------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 28px 20px;
}

.work-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-radius: 5px;
}

.thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  overflow: hidden;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.thumb img {
  width: 100%;
  height: 100%;
  border-radius: 2px;
  object-fit: cover;
}

.work-card:hover .thumb { border-color: var(--accent); box-shadow: 0 5px 16px rgba(40, 85, 217, 0.12); }
.thumb-audio, .thumb-video { background: #e9eef7; }
.thumb-icon { color: var(--accent); }
.thumb-icon .icon { width: 46px; height: 46px; stroke-width: 1.35; }

.audio-wave { height: 28px; display: flex; align-items: center; gap: 5px; color: var(--accent-dark); }
.audio-wave i { width: 3px; height: 12px; border-radius: 2px; background: currentColor; }
.audio-wave i:nth-child(2), .audio-wave i:nth-child(4) { height: 25px; }
.audio-wave i:nth-child(3) { height: 18px; }

.ribbon {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 8px;
  border-radius: 3px;
  color: var(--ink);
  background: var(--sun);
  box-shadow: 0 1px 3px rgba(24, 40, 62, 0.12);
  font-size: 0.72rem;
  font-weight: 700;
}

.work-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(24, 40, 62, 0.16);
}

.work-badge.todo { color: #fff; background: var(--accent); }
.work-badge.done { color: var(--teal); background: var(--teal-soft); }

.gallery-section + .gallery-section { margin-top: 36px; }

.gallery-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}

.gallery-section-head h2 { font-size: 1.18rem; }

.gallery-progress {
  padding: 3px 11px;
  border-radius: 999px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  font-size: 0.8rem;
  font-weight: 700;
}

.work-card-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 12px 2px 0;
}

.work-card h3 {
  min-height: 2.6em;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 1.04rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.85rem;
}

.work-byline { justify-content: space-between; gap: 8px; }
.work-author { min-width: 0; color: var(--ink-soft); font-size: 0.82rem; overflow-wrap: anywhere; }

.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 0.72rem;
  white-space: nowrap;
}

.card-foot {
  min-height: 29px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 5px 8px;
  margin-top: 2px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.work-date { font-size: 0.74rem; }

.score-pill {
  color: var(--accent-dark);
  font-size: 0.8rem;
  white-space: nowrap;
}

.score-pill strong { font-size: 0.96rem; font-variant-numeric: tabular-nums; }
.score-count { margin-left: 4px; color: var(--muted); font-size: 0.72rem; }
.score-pill.empty { color: var(--muted); font-size: 0.76rem; }
.rating-progress { font-weight: 600; }
.rating-progress.low { color: var(--danger); }
.rating-progress.ok { color: var(--teal); }

/* ---------------- 通用面板 ---------------- */

.panel {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.panel + .panel { margin-top: 18px; }
.panel h2 { margin-bottom: 15px; }

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

.panel-head h2 { margin-bottom: 0; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.text-link { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }

.notice {
  padding: 13px 15px;
  border: 1px solid #cbd8fa;
  border-radius: 8px;
  color: #263f7d;
  background: var(--accent-soft);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.notice a { text-decoration: underline; font-weight: 650; }
.notice.neutral { color: var(--ink-soft); background: var(--surface-soft); border-color: var(--line); }
.notice.notice-strong {
  border: 2px solid var(--accent);
  color: var(--accent-dark);
  background: #eef3ff;
  font-size: 0.98rem;
  font-weight: 650;
  text-align: center;
}

.resume-notice { display: grid; gap: 10px; }
.resume-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }

.static-value {
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink-soft);
  background: var(--surface-soft);
}

/* ---------------- 作品详情 ---------------- */

.work-layout {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 24px;
  align-items: start;
}

.media-panel { padding: 12px; }

.media-stage {
  min-height: 350px;
  display: grid;
  place-items: center;
  gap: 18px;
  overflow: hidden;
  padding: 20px;
  border-radius: 8px;
  background: #101b2d;
}

.media-image {
  width: auto;
  max-width: 100%;
  max-height: 64vh;
  border-radius: 3px;
  object-fit: contain;
}

.media-stage video { width: 100%; max-height: 66vh; border-radius: 4px; background: #000; }
.video-hover-frame { position: relative; width: 100%; display: flex; justify-content: center; }
.video-hover-toggle {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: clamp(52px, 22%, 108px);
  height: auto;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 0;
  transform: translate(-50%, -50%);
  color: rgba(255, 255, 255, 0.5);
  background: transparent;
  filter: drop-shadow(0 1px 5px rgba(0, 0, 0, 0.35));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.video-hover-toggle .icon { width: 75%; height: 75%; fill: currentColor; stroke: none; }
.video-hover-play { display: block; }
.video-hover-pause { display: none; }
.video-hover-frame.is-visible .video-hover-toggle { opacity: 1; }
.video-hover-frame.is-playing .video-hover-play { display: none; }
.video-hover-frame.is-playing .video-hover-pause { display: block; }
.video-hover-frame.is-idle,
.video-hover-frame.is-idle .video-hover-toggle { cursor: none; }
.video-hover-frame.is-idle video { cursor: none; }
@media (hover: none) {
  .video-hover-toggle { display: none; }
}
.media-stage video::-webkit-media-controls-play-button,
.media-stage video::-webkit-media-controls-start-playback-button,
.media-stage video::-webkit-media-controls-mute-button,
.media-stage video::-webkit-media-controls-fullscreen-button,
.media-stage video::-webkit-media-controls-overflow-button,
.media-stage video::-webkit-media-controls-current-time-display,
.media-stage video::-webkit-media-controls-time-remaining-display,
.media-stage video::-webkit-media-controls-timeline,
.media-stage video::-webkit-media-controls-volume-slider { opacity: 0.6; }
.media-stage audio { width: min(440px, 100%); }
.media-local { width: 100%; }

.media-pending {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 56px 24px;
  text-align: center;
  color: #dbe4f5;
}

.media-pending strong { color: #fff; font-size: 1.12rem; }
.media-pending .muted { color: #aebbd0; }
.media-pending .icon { width: 48px; height: 48px; color: #c7d6ff; stroke-width: 1.35; }

.media-pending-spinner {
  width: 42px;
  height: 42px;
  border: 3px solid rgba(255, 255, 255, 0.22);
  border-top-color: #c7d6ff;
  border-radius: 50%;
  animation: media-pending-spin 0.9s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .media-pending-spinner { animation: none; }
}

.media-info { padding: 20px 10px 10px; }

.media-info h1 {
  margin: 10px 0 12px;
  font-size: clamp(1.7rem, 2.6vw, 2.15rem);
  overflow-wrap: anywhere;
}

.work-detail-byline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 16px;
  color: var(--muted);
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

.work-detail-byline strong { color: var(--ink-soft); font-weight: 650; }
.project-ref { display: flex; flex-wrap: wrap; gap: 9px; margin: 14px 0 18px; font-size: 0.9rem; min-width: 0; overflow-wrap: anywhere; }
.project-ref a { min-width: 0; overflow-wrap: anywhere; }
.processing-note { margin-top: 16px; }

.big-score { display: flex; align-items: baseline; gap: 8px; margin: 0 0 6px; }
.big-number { color: var(--accent-dark); font-size: 3.35rem; font-weight: 780; line-height: 1; letter-spacing: -0.04em; }
.big-number.is-empty { color: var(--muted); font-size: 2.4rem; letter-spacing: 0; }
.big-max { color: var(--muted); font-size: 1rem; }
.score-sub { display: flex; flex-wrap: wrap; gap: 3px 12px; margin-bottom: 20px; font-size: 0.83rem; }
.score-panel .rating-list + .rate-form {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.score-panel .empty-mini + .rate-form { margin-top: 18px; }
.crit-list { display: grid; gap: 15px; }
.crit-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; font-size: 0.85rem; }

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

.bar > span { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width 0.3s ease; }

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

.rate-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.rate-image-link {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: inherit;
  background: var(--surface-soft);
  font: inherit;
  cursor: zoom-in;
}

.rate-image { display: block; width: 100%; max-height: 420px; object-fit: contain; }
.rate-row.has-image { display: grid; gap: 10px; }
.rate-row.has-image .rate-main { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rate-row.has-image .rate-input { margin-left: auto; }
.rate-row.has-image .rate-label { padding-top: 0; }
.rate-form:not(.rate-form-single) .rate-image { max-height: 240px; }

.student-evaluation .rate-panel h2 { max-width: 960px; margin-right: auto; margin-left: auto; }
.student-evaluation .rate-form { max-width: 960px; margin: 0 auto; }
.student-evaluation .rate-form .rate-image-link { width: fit-content; max-width: 100%; margin: 0 auto; }
.student-evaluation .rate-form .rate-image { width: auto; max-width: 100%; max-height: 70vh; }
.student-evaluation .rate-form > .field,
.student-evaluation .rate-form > .rate-total,
.student-evaluation .rate-form > .btn-block,
.student-evaluation .rate-form > .rate-edit-hint {
  width: 100%;
  max-width: 720px;
  margin-right: auto;
  margin-left: auto;
}

.work-layout-student {
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  align-items: start;
}
.work-layout-student .media-panel { width: 100%; max-width: none; margin: 0; }
.student-evaluation { grid-column: 2; width: 100%; max-width: none; margin: 0; display: grid; gap: 18px; }
.student-evaluation .panel + .panel { margin-top: 0; }
.my-rating-summary-inner { max-width: 960px; margin: 0 auto; }
.my-rating-total { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.my-rating-total strong { color: var(--accent-dark); font-size: 2rem; font-weight: 780; line-height: 1; letter-spacing: -0.03em; }
.my-rating-summary .rating-scores { margin-bottom: 8px; }

.image-lightbox {
  position: fixed;
  inset: 0;
  width: fit-content;
  height: fit-content;
  max-width: 96vw;
  max-height: 94vh;
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  overflow: visible;
}
.image-lightbox::backdrop { background: rgba(10, 17, 28, 0.82); backdrop-filter: blur(3px); }
.image-lightbox-image {
  display: block;
  width: min(92vw, 1200px);
  height: auto;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
}
.image-lightbox-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(16, 24, 38, 0.92);
  font: inherit;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}
.image-lightbox-close:hover { background: var(--accent); }
.image-lightbox-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
body:has(.image-lightbox[open]) { overflow: hidden; }

.rate-form-single .rate-row { border-bottom: 0; padding-bottom: 0; }
.rate-form-single .rate-input input { width: 118px; min-height: 52px; font-size: 1.25rem; }
.rate-form-single .rate-name { font-size: 1rem; }
.rate-form-single .rate-desc { max-width: none; }
.rate-score-label { color: var(--ink-soft); font-size: 0.84rem; font-weight: 650; white-space: nowrap; }

.rate-label { min-width: 0; display: flex; flex-direction: column; gap: 3px; padding-top: 5px; }
.rate-name { font-size: 0.92rem; font-weight: 650; overflow-wrap: anywhere; }
.rate-desc { max-width: 28ch; color: var(--muted); font-size: 0.76rem; overflow-wrap: anywhere; }
.rate-input { display: flex; align-items: center; flex-shrink: 0; gap: 7px; font-size: 0.83rem; }
.rate-input input { width: 84px; min-height: 44px; padding: 8px 9px; text-align: center; font-weight: 650; }

.rate-total {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 7px;
  color: var(--ink-soft);
  background: var(--accent-soft);
  font-size: 0.88rem;
}

.rate-edit-hint { margin-top: -4px; text-align: center; font-size: 0.76rem; }

.rate-total strong { color: var(--accent-dark); font-size: 1.25rem; }

.rating-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.rating-item { padding: 16px 0; border-bottom: 1px solid var(--line); }
.rating-item:first-child { padding-top: 0; }
.rating-item:last-child { padding-bottom: 0; border-bottom: 0; }
.rating-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 7px; min-width: 0; }
.rating-who { min-width: 0; display: inline-flex; align-items: center; gap: 7px; font-size: 0.9rem; font-weight: 650; overflow-wrap: anywhere; }

.role-badge {
  display: inline-flex;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 650;
  white-space: nowrap;
}

.role-badge.teacher { color: var(--accent-dark); background: var(--accent-soft); }
.role-badge.student { color: var(--teal); background: var(--teal-soft); }
.rating-total { color: var(--accent-dark); font-size: 0.94rem; font-weight: 700; }
.rating-scores { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 7px; }

.mini-score {
  max-width: 100%;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink-soft);
  background: var(--surface-soft);
  font-size: 0.74rem;
  overflow-wrap: anywhere;
}

.rating-comment { margin: 5px 0 7px; color: var(--ink-soft); font-size: 0.89rem; white-space: pre-line; overflow-wrap: anywhere; }

/* ---------------- 上传 ---------------- */

.upload-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(270px, 0.75fr);
  gap: 24px;
  align-items: start;
}

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

.dropzone {
  position: relative;
  display: block;
  padding: 38px 20px;
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-soft);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.dropzone:hover, .dropzone.dragover { border-color: var(--accent); background: var(--accent-soft); }
.dropzone:has(input:focus-visible) { outline: 3px solid var(--accent-dark); outline-offset: 3px; }
.dropzone input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dropzone-inner { display: flex; flex-direction: column; align-items: center; gap: 9px; font-size: 0.94rem; }

.dropzone-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  margin-bottom: 3px;
  border-radius: 50%;
  color: var(--accent);
  background: var(--accent-soft);
}

.dropzone-icon .icon { width: 27px; height: 27px; }
.dropzone-formats { max-width: 48ch; font-size: 0.79rem; }

.file-picked {
  max-width: 100%;
  margin-top: 5px;
  padding: 6px 12px;
  border: 1px solid #cbd8fa;
  border-radius: 6px;
  color: var(--accent-dark);
  background: var(--surface);
  font-size: 0.84rem;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.progress { height: 10px; overflow: hidden; border-radius: 999px; background: #e8edf4; }
.progress > span { display: block; width: 0; height: 100%; background: var(--accent); transition: width 0.15s linear; }

.form-error {
  padding: 11px 14px;
  border: 1px solid #edc2c7;
  border-radius: 8px;
  color: var(--danger);
  background: #fff0f1;
  font-size: 0.88rem;
}

.my-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.my-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.my-list li:first-child { padding-top: 0; }
.my-list li:last-child { padding-bottom: 0; border-bottom: 0; }
.my-list li > div { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.my-list a { font-size: 0.93rem; font-weight: 650; overflow-wrap: anywhere; }
.my-list a:hover { color: var(--accent-dark); }
.my-list .small { overflow-wrap: anywhere; }

/* ---------------- 项目列表与项目页 ---------------- */

.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }

.project-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 23px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.project-card:hover { border-color: var(--accent); box-shadow: 0 7px 20px rgba(24, 40, 62, 0.07); }
.project-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.project-card h2 { font-family: var(--font-display); font-size: 1.5rem; overflow-wrap: anywhere; }

.project-desc {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  color: var(--muted);
  font-size: 0.9rem;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-badge.open { color: var(--teal); background: var(--teal-soft); }
.status-badge.closed { color: var(--muted); background: #edf0f4; }
.status-badge.draft { color: #8a6116; background: #fbf0d9; }
.autosave-status[data-state="saving"] { color: var(--muted); }
.autosave-status[data-state="saved"] { color: var(--teal); }
.autosave-status[data-state="error"] { color: var(--danger); }
.criteria-chips, .chip-row { display: flex; flex-wrap: wrap; gap: 7px; }
.missing-groups { display: grid; gap: 14px; }
.missing-group-title { margin: 0 0 8px; font-size: 0.88rem; font-weight: 700; }
.missing-group-title .count { margin-left: 4px; font-size: 0.78rem; font-weight: 500; }

.chip {
  max-width: 100%;
  min-width: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-soft);
  font-size: 0.84rem;
  overflow-wrap: anywhere;
}

.chip .muted { font-size: 0.73rem; }
.chip.sm { padding: 4px 8px; font-size: 0.76rem; }

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: auto;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}

.project-action { padding-top: 1px; }
.done-pill, .go-pill { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 5px; font-size: 0.8rem; font-weight: 650; }
.done-pill { color: var(--teal); background: var(--teal-soft); }
.go-pill { color: var(--accent-dark); background: var(--accent-soft); }
.project-card:hover .go-pill { color: #fff; background: var(--accent); }

/* ---------------- 项目页：展签式页头 ---------------- */

.project-page .container { padding-top: 22px; }

.project-masthead {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-strong);
}

.masthead-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.masthead-bar .back-link { min-height: 36px; margin: 0; font-size: 0.84rem; }
.masthead-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.masthead-actions .muted { text-align: right; }

.masthead-title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 16px;
}

.masthead-title h1 {
  min-width: 0;
  font-size: clamp(1.75rem, 2.5vw, 2.1rem);
  line-height: 1.24;
  overflow-wrap: anywhere;
}

.masthead-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 12px;
  color: var(--muted);
  font-size: 0.78rem;
}

.masthead-date { font-variant-numeric: tabular-nums; }
.masthead-mine { color: var(--ink-soft); }

.masthead-lede {
  max-width: 80ch;
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.7;
}

.project-rubric {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 18px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
}

.rubric-label {
  color: var(--ink-soft);
  font-weight: 650;
  letter-spacing: 0.02em;
}

.rubric-list {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rubric-list li { display: inline-flex; align-items: baseline; gap: 6px; }
.rubric-pts { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }

.rubric-total { margin-left: auto; color: var(--ink-soft); white-space: nowrap; }
.rubric-total b { color: var(--accent-dark); font-size: 0.95rem; font-variant-numeric: tabular-nums; }

.project-admin-title { margin-top: 10px; }

/* ---------------- 教师端数据 ---------------- */

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.stat-row-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.stat {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 13px 16px;
  border-left: 1px solid var(--line);
}

.stat:first-child { border-left: 0; }
.stat-num { font-size: 1.62rem; font-weight: 760; line-height: 1.2; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--muted); font-size: 0.78rem; }
.stat-cue {
  margin-top: auto;
  padding-top: 7px;
  color: var(--accent-dark);
  font-size: 0.73rem;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.stat-link { transition: background 0.16s ease; }
.stat-link:hover { background: var(--accent-soft); }
.stat-link:hover .stat-num { color: var(--accent-dark); }
#projects { scroll-margin-top: 92px; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 0.88rem; }

.table th {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-strong);
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 0.76rem;
  font-weight: 650;
  text-align: left;
  white-space: nowrap;
}

.table th:first-child { border-radius: 6px 0 0 0; }
.table th:last-child { border-radius: 0 6px 0 0; }
.table td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-soft); }
.col-check { width: 44px; }
.check-touch {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: -10px 0;
  border-radius: 7px;
  cursor: pointer;
}
.check-touch:hover { background: var(--accent-soft); }
.table input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.table-link { color: var(--accent-dark); font-weight: 650; overflow-wrap: anywhere; }
.table-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.row-actions { display: flex; align-items: center; gap: 8px; }
.col-actions { text-align: right; }
.col-student { white-space: nowrap; }
@media (min-width: 721px) { .col-student { min-width: 7em; } }
.cell-stack { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.download-note { margin-top: 14px; }

.storage-summary { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 10px 20px; margin-bottom: 12px; font-size: 0.9rem; }
.storage-summary strong { color: var(--accent-dark); font-size: 1.14rem; }
.storage-bar { height: 10px; }
.storage-note { margin-top: 8px; }
.storage-warning { margin-top: 12px; }
.head-storage { margin-top: 9px; color: var(--muted); font-size: 0.85rem; }
.head-storage strong { color: var(--accent-dark); }
.head-storage-bar { max-width: 340px; height: 7px; margin-top: 7px; }
.account-note { max-width: 88ch; margin-bottom: 16px; line-height: 1.75; }
.account-form { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }

.account-form input[type="file"] {
  flex: 1;
  min-width: 230px;
  min-height: 48px;
  padding: 7px 11px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: var(--surface-soft);
  font-size: 1rem;
}

.account-form input[type="file"]::file-selector-button {
  min-height: 34px;
  margin-right: 10px;
  padding: 5px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

/* ---------------- 新建项目 ---------------- */

.project-form { display: grid; gap: 23px; }
.criteria-editor { display: grid; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.criteria-editor-head { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 14px; }
.criteria-editor-head > div:first-child { display: flex; flex-direction: column; gap: 4px; }
.criteria-editor-actions { display: flex; align-items: center; flex-direction: row; flex-wrap: wrap; gap: 8px; }
.criteria-rows { display: grid; gap: 12px; }
.criterion-row {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) 40px;
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.criterion-media { display: grid; gap: 7px; min-width: 0; }
.criterion-image-pick {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-soft);
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease;
}
.criterion-image-pick:hover,
.criterion-image-pick:focus-within { border-color: var(--accent); background: var(--accent-soft); }
.criterion-image-empty { display: grid; justify-items: center; gap: 4px; font-size: 0.76rem; font-weight: 650; }
.criterion-image-empty .icon { width: 22px; height: 22px; }
.criterion-image-preview { display: block; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.criterion-image-preview[hidden] { display: none; }
.criterion-image-remove {
  padding: 0;
  border: 0;
  color: var(--muted);
  background: none;
  font: inherit;
  font-size: 0.76rem;
  text-decoration: underline;
  cursor: pointer;
}
.criterion-image-remove:hover { color: var(--danger); }
.criterion-image-remove[hidden] { display: none; }
.criterion-fields { display: grid; gap: 9px; min-width: 0; }
.criterion-row-meta { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 9px; }
.criterion-max { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 7px; color: var(--ink-soft); font-size: 0.8rem; font-weight: 650; }
.criterion-max input { min-width: 0; }

.icon-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: var(--surface);
}

.icon-btn:hover { color: var(--danger); border-color: #edc2c7; background: #fff0f1; }
.icon-btn .icon { width: 17px; height: 17px; }
.check-row { display: grid; gap: 13px; }
.check { min-height: 44px; display: flex; align-items: center; gap: 10px; font-size: 0.92rem; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); cursor: pointer; }

/* ---------------- 弹窗 ---------------- */

.password-dialog,
.return-dialog {
  width: min(430px, calc(100vw - 32px));
  max-height: calc(100dvh - 40px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: var(--radius-lg);
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.password-dialog::backdrop,
.return-dialog::backdrop { background: rgba(16, 27, 45, 0.55); backdrop-filter: blur(3px); }
.password-form { display: grid; gap: 17px; padding: 25px; }
.return-dialog-form { display: grid; gap: 17px; padding: 25px; }
.return-dialog-lede { margin: 0; }
.return-dialog textarea { min-height: 120px; resize: vertical; }
.return-save-hint { min-height: 1.2em; margin: 0; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dialog-head h2 { margin: 0; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 3px; }

.tag-processing { color: #795410; background: #fff6da; border-color: #e7d28a; }
.tag-assigned.todo { color: #fff; background: var(--accent); border-color: var(--accent); }
.tag-assigned.done { color: var(--teal); background: var(--teal-soft); border-color: transparent; }
.comment-summary { padding: 8px 0 4px; color: var(--ink-soft); font-size: 0.95rem; }
.comment-summary strong { padding: 0 3px; color: var(--accent-dark); font-size: 1.7rem; vertical-align: -2px; }

/* ---------------- 空状态、错误与页脚 ---------------- */

.empty-state {
  padding: 62px 22px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-align: center;
}

.empty-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  border-radius: 50%;
  color: var(--accent);
  background: var(--accent-soft);
}

.empty-icon .icon { width: 30px; height: 30px; }
.empty-state h2 { margin-bottom: 9px; font-size: 1.3rem; }
.empty-state p { max-width: 46ch; margin: 0 auto 21px; color: var(--muted); }

.empty-mini {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 0.87rem;
  text-align: center;
}

.filtered-empty { margin-top: 22px; }
.error-state { margin-top: 20px; padding-top: 72px; padding-bottom: 72px; }
.error-code { margin-bottom: 12px; color: var(--accent); font-size: 4rem; font-weight: 780; line-height: 1; letter-spacing: -0.04em; }

.footer {
  width: min(1500px, 100% - 48px);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0 auto;
  padding: 19px 0 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.footer a:hover { color: var(--accent-dark); }

/* ---------------- 登录页 ---------------- */

.login-page .container { display: flex; padding-top: 32px; padding-bottom: 32px; }

.login-wrap {
  width: 100%;
  min-height: calc(100dvh - 190px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.login-card {
  width: min(900px, 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.login-hero { display: flex; flex-direction: column; justify-content: center; padding: 46px; color: #fff; background: var(--ink); }
.login-mark { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 10px; color: var(--ink); background: var(--surface); }
.login-mark .icon { width: 29px; height: 29px; }
.login-kicker { margin-top: 28px; color: #cbd7e8; font-size: 0.85rem; }
.login-hero h1 { margin: 8px 0 16px; color: #fff; font-size: clamp(2rem, 3.5vw, 2.7rem); overflow-wrap: anywhere; }
.login-desc { max-width: 31ch; color: #d2dce9; font-size: 0.92rem; line-height: 1.9; }
.login-media { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 38px; }

.login-media span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  color: #edf2fa;
  font-size: 0.8rem;
}

.login-media .icon { width: 17px; height: 17px; }
.login-panel { display: flex; flex-direction: column; justify-content: center; padding: 42px; }
.login-form { display: grid; gap: 17px; }
.login-form h2 { margin-bottom: 7px; font-size: 1.35rem; }

/* ---------------- 平板 ---------------- */

@media (max-width: 960px) {
  .work-layout, .upload-layout { grid-template-columns: 1fr; }
  .work-layout-student { grid-template-columns: minmax(0, 1fr); }
  .submission-layout { grid-template-columns: 1fr; }
  .student-evaluation { grid-column: 1; }

  .side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .side .panel + .panel { margin-top: 0; }
  .side .ratings-panel { grid-column: 1 / -1; }

  .login-hero, .login-panel { padding: 34px; }
}

@media (hover: none) {
  .work-card:hover .thumb, .project-card:hover { box-shadow: none; }
  .work-card:hover .thumb { border-color: var(--line); }
  .project-card:hover { border-color: var(--line); border-top-color: var(--line-strong); }
  .project-card:hover .go-pill { color: var(--accent-dark); background: var(--accent-soft); }
}

.project-description { white-space: pre-line; }

/* ---------------- 手机 ---------------- */

@media (max-width: 720px) {
  html { scroll-padding-top: 140px; }

  .container, .topbar-inner, .footer { width: calc(100% - 32px); }
  .container { padding: 24px 0 38px; }

  .topbar {
    background: var(--surface);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .topbar-inner { min-height: 60px; flex-wrap: wrap; gap: 8px 10px; padding: 6px 0 10px; }
  .brand { order: 1; min-width: 0; gap: 8px; }
  .brand-mark { width: 32px; height: 32px; border-radius: 8px; }
  .brand-mark .icon { width: 19px; height: 19px; }
  .brand-text { overflow: hidden; font-size: 0.94rem; text-overflow: ellipsis; white-space: nowrap; }

  .nav {
    order: 3;
    width: 100%;
    flex: 1 0 100%;
    min-height: 0;
    display: flex;
    gap: 4px;
    margin: 0;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--surface-soft);
  }

  .nav a {
    min-width: 0;
    min-height: 44px;
    flex: 1;
    flex-direction: row;
    justify-content: center;
    gap: 7px;
    padding: 7px 10px;
    border-radius: 7px;
    font-size: 0.86rem;
    line-height: 1.2;
  }

  .nav .icon { display: block; width: 19px; height: 19px; }
  .user-area { order: 2; margin-left: auto; gap: 4px; }
  .user-chip { display: none; }
  .user-area .btn { min-height: 44px; padding: 8px 10px; border-color: transparent; background: transparent; font-size: 0.8rem; }
  .footer { margin-bottom: 0; padding-bottom: max(22px, env(safe-area-inset-bottom)); }
  .resume-actions .btn { flex: 1; min-height: 44px; }

  .page-head { flex-direction: column; align-items: flex-start; gap: 18px; margin-bottom: 24px; }
  .page-head h1 { font-size: 2rem; }
  .page-head > .btn { width: 100%; }
  .lede { font-size: 0.91rem; line-height: 1.75; }
  .lede-nowrap { white-space: normal; }

  .toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 12px; margin-bottom: 16px; }
  .search-box { grid-column: 1; width: 100%; }
  .segmented { grid-column: 1; grid-row: 2; width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .seg { min-width: 0; min-height: 44px; padding: 8px 4px; }
  .sort-control { grid-column: 2; grid-row: 2; align-self: center; }
  .sort-caption { display: none; }
  .sort-trigger { min-height: 44px; padding: 8px 9px; }
  .sort-menu { left: auto; right: 0; }
  .gallery-count { grid-column: 2; grid-row: 1; align-self: center; margin-left: 0; text-align: right; }

  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 23px 12px; }
  .thumb { gap: 9px; padding: 6px; }
  .thumb-icon .icon { width: 36px; height: 36px; }
  .audio-wave { height: 20px; gap: 4px; }
  .audio-wave i:nth-child(2), .audio-wave i:nth-child(4) { height: 20px; }
  .ribbon { top: 6px; left: 6px; padding: 3px 6px; font-size: 0.65rem; }
  .work-card-body { gap: 5px; padding: 10px 1px 0; }
  .work-card h3 { min-height: 2.6em; font-size: 0.95rem; }
  .work-author { font-size: 0.76rem; }
  .work-byline .tag { padding: 1px 5px; font-size: 0.66rem; }
  .work-date, .score-count { display: none; }
  .card-foot { min-height: 22px; margin-top: 1px; padding-top: 0; border-top: 0; }
  .score-pill strong { font-size: 0.88rem; }

  .panel { padding: 18px; }
  .panel + .panel { margin-top: 16px; }
  .media-panel { padding: 8px; }
  .media-stage { min-height: 220px; padding: 10px; }
  .media-info { padding: 18px 8px 8px; }
  .media-info h1 { font-size: 1.75rem; }
  .work-detail-byline { gap: 3px 12px; }
  .side { grid-template-columns: 1fr; gap: 16px; }
  .side .ratings-panel { grid-column: auto; }
  .side .rate-panel { order: -1; }
  .big-number { font-size: 2.8rem; }
  .rate-input input { min-height: 46px; }
  .rate-form-single .rate-image { max-height: 52vh; }
  .criterion-row { grid-template-columns: 104px minmax(0, 1fr) 44px; gap: 10px; padding: 11px; }
  .criterion-row-meta { grid-template-columns: 92px minmax(0, 1fr); gap: 7px; }
  .rating-item { padding: 15px 0; }

  .project-grid { grid-template-columns: 1fr; }
  .project-card { padding: 20px; }

  .project-page .container { padding-top: 14px; }
  .project-masthead { gap: 7px; margin-bottom: 14px; padding-bottom: 10px; }
  .masthead-bar { flex-wrap: nowrap; gap: 10px; }
  .masthead-bar .back-link { min-height: 44px; font-size: 0.82rem; }
  .masthead-actions { margin-left: auto; }
  .masthead-actions .btn { min-height: 44px; }
  .masthead-title { gap: 4px 12px; }
  .masthead-title h1 { font-size: 1.68rem; }
  .masthead-date { display: none; }
  .masthead-lede { font-size: 0.89rem; line-height: 1.62; }
  .project-rubric {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 3px 14px;
    padding-top: 8px;
    font-size: 0.77rem;
  }
  .rubric-label { grid-column: 1; grid-row: 1; }
  .rubric-total, .rubric-simple { grid-column: 2; grid-row: 1; margin-left: 0; }
  .rubric-list { grid-column: 1 / -1; grid-row: 2; gap: 2px 14px; }

  .upload-layout { gap: 18px; }
  .dropzone { padding: 30px 16px; }
  .dropzone-formats { font-size: 0.75rem; }
  .my-list li { align-items: flex-start; }

  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 12px 14px; }
  .stat:nth-child(odd) { border-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .stat-num { font-size: 1.45rem; }

  .table-wrap { overflow: visible; }
  .table-mobile { min-width: 0; display: block; }
  .table-mobile thead { display: none; }
  .table-mobile tbody { display: grid; gap: 12px; }

  .table-mobile tbody tr {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--surface-soft);
  }

  .table-mobile tbody tr:hover { background: var(--surface-soft); }

  .table-mobile tbody td {
    order: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 2px;
    padding: 7px 0;
    border: 0;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .table-mobile tbody td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 650;
    text-align: left;
  }

  .table-mobile tbody td.primary-cell {
    order: 0;
    grid-column: 1 / -1;
    display: block;
    margin-bottom: 5px;
    padding: 0 44px 12px 0;
    border-bottom: 1px solid var(--line);
    text-align: left;
    font-size: 0.98rem;
  }

  .table-mobile tbody td.primary-cell::before { display: none; }
  .table-mobile tbody td .cell-stack { text-align: left; }
  .table-mobile tbody td.primary-cell .cell-stack { text-align: left; }

  .table-mobile tbody td.col-check {
    position: absolute;
    top: 11px;
    right: 11px;
    z-index: 1;
    padding: 0;
  }

  .table-mobile tbody td.col-check::before { display: none; }
  .table-mobile tbody td[data-label="项目"],
  .table-mobile tbody td[data-label="提交时间"],
  .table-mobile tbody td[data-label="创建时间"],
  .table-mobile tbody td[data-label="评价时间"],
  .table-mobile tbody td[data-label="操作"],
  .table-mobile tbody td[data-label="评语"] { grid-column: 1 / -1; }
  .table-mobile tbody td[data-label="评语"] { display: block; text-align: left; }
  .table-mobile tbody td[data-label="评语"]::before { display: block; margin-bottom: 5px; }
  .table-mobile tbody td[data-label="操作"] { margin-top: 5px; padding-top: 11px; border-top: 1px solid var(--line); }
  .table-mobile tbody td .row-actions { width: 100%; flex-wrap: wrap; justify-content: flex-end; }
  .table-mobile tbody td[data-label="操作"] .btn { flex: 1; }
  .table-mobile input[type="checkbox"] { width: 22px; height: 22px; }

  .btn, .btn-sm { min-height: 44px; }
  .row-actions { flex-wrap: wrap; }
  .account-form { align-items: stretch; }
  .account-form input[type="file"] { width: 100%; min-width: 0; }
  .account-form .btn { width: 100%; }
  .storage-summary { align-items: flex-start; }

  .criterion-row .icon-btn { grid-column: 3; grid-row: 1 / 3; }
  .icon-btn { width: 44px; height: 44px; }
  .criteria-editor { padding: 14px; }
  .criteria-editor-actions { width: 100%; }
  .criteria-editor-actions .btn { flex: 1; }

  .password-dialog {
    width: 100%;
    max-width: none;
    max-height: calc(100dvh - 24px);
    margin: auto 0 0;
    border-radius: 16px 16px 0 0;
  }

  .password-form { padding: 22px 20px max(22px, env(safe-area-inset-bottom)); }
  .dialog-actions .btn { flex: 1; }

  .login-page .container { padding-top: 18px; padding-bottom: 24px; }
  .login-page .footer { margin-bottom: 0; }
  .login-wrap { min-height: auto; }
  .login-card { grid-template-columns: 1fr; box-shadow: var(--shadow); }
  .login-hero { padding: 25px; }
  .login-mark { width: 44px; height: 44px; }
  .login-mark .icon { width: 25px; height: 25px; }
  .login-kicker { margin-top: 18px; }
  .login-hero h1 { margin: 6px 0 10px; font-size: 1.9rem; }
  .login-desc { max-width: 42ch; font-size: 0.87rem; }
  .login-media { margin-top: 20px; }
  .login-media span { padding: 6px 9px; }
  .login-panel { padding: 25px; }

  .empty-state { padding: 46px 18px; }
  .desktop-only { display: none; }
  .mobile-only { display: inline; }
}

@media (max-width: 430px) {
  .brand-text { max-width: 8em; }
  .user-area .btn { padding-right: 7px; padding-left: 7px; }
  .panel-head .actions { width: 100%; }
  .panel-head .actions .btn { flex: 1; }
  .criterion-row { grid-template-columns: 84px minmax(0, 1fr) 44px; gap: 8px; }
  .criterion-row-meta { grid-template-columns: 1fr; }
}

@media (max-width: 360px) {
  .brand-text { display: none; }
  .grid { column-gap: 10px; }
  .work-card h3 { font-size: 0.9rem; }
  .rate-row { gap: 8px; }
  .rate-input input { width: 76px; }
}

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

/* ---------------- 提交版本与提交页 ---------------- */

.submission-collage { position: relative; display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; }
/* 只看缩略图数量；角标（我的作品 / 必评）是绝对定位的 span，不应影响封面占满整行。 */
.submission-collage > .thumb:only-of-type { grid-column: 1 / -1; }
.submission-collage .thumb { min-height: 90px; }
.submission-layout { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 24px; align-items: start; }
.submission-layout > * { min-width: 0; }
.submission-layout > .panel + .panel { margin-top: 0; }
.submission-works-panel { padding: 24px; }
.submission-work-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 16px; }
@media (max-width: 960px) {
  .submission-layout { grid-template-columns: 1fr; }
}
.submission-work { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; background: var(--surface-soft); }
.submission-work h2 { font-size: 1.02rem; margin-bottom: 10px; }
.submission-work img, .submission-work video { width: 100%; max-height: 420px; object-fit: contain; border-radius: 6px; background: #000; }
.submission-work audio { width: 100%; }
.submission-audio { position: relative; width: 100%; aspect-ratio: 16 / 9; min-height: 0; max-height: none; display: block; padding: 0; }
.audio-cover { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; padding: 0 12px 58px; border: 0; border-radius: 8px; color: #fff; background: transparent; cursor: pointer; }
.audio-cover:focus-visible { outline: 3px solid #c7d6ff; outline-offset: -5px; }
.submission-audio .audio-art { position: relative; width: clamp(52px, 22%, 108px); height: auto; aspect-ratio: 1; grid-area: 1 / 1; display: grid; place-items: center; border-radius: 50%; color: rgba(255, 255, 255, 0.7); background: transparent; opacity: 1; transition: opacity 0.3s ease; }
.submission-audio .audio-art > .icon { width: 75%; height: 75%; stroke-width: 1.4; }
.audio-art .audio-art-play, .audio-art .audio-art-pause { display: none; fill: currentColor; stroke: none; }
.audio-eq { grid-area: 1 / 1; display: flex; width: min(78%, 460px); height: min(50%, 170px); align-items: flex-end; justify-content: center; gap: clamp(2px, 0.7vw, 4px); opacity: 0; transition: opacity 0.3s ease; }
.audio-eq i { flex: 1 1 0; max-width: 8px; height: 100%; border-radius: 999px; background: rgba(255, 255, 255, 0.55); transform: scaleY(0.08); transform-origin: center bottom; animation: audio-eq-bar 1.1s ease-in-out infinite alternate; animation-delay: calc(var(--i, 0) * -0.11s); animation-duration: calc(1s + var(--i, 0) * 0.02s); animation-play-state: paused; }
.audio-eq.live i { animation: none; }
.audio-cover.playing:not(.is-hinting) .audio-art { opacity: 0; }
.audio-cover.playing:not(.is-hinting) .audio-eq { opacity: 1; }
.audio-cover.playing:not(.is-hinting) .audio-eq i { animation-play-state: running; }
@keyframes audio-eq-bar { from { transform: scaleY(0.12); } to { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) {
  .audio-eq i { animation: none; transform: none; }
  .audio-eq i:nth-child(3n) { height: 62%; }
  .audio-eq i:nth-child(3n+1) { height: 84%; }
  .audio-eq i:nth-child(3n+2) { height: 46%; }
}
@media (hover: hover) {
  .audio-cover.playing.is-hinting .audio-art { opacity: 1; }
  .audio-cover.is-hinting .audio-art-note { display: none; }
  .audio-cover.is-hinting .audio-art-play { display: block; }
  .audio-cover.playing.is-hinting .audio-eq { opacity: 0; }
  .audio-cover.is-hinting.playing .audio-art-play { display: none; }
  .audio-cover.is-hinting.playing .audio-art-pause { display: block; }
  .audio-cover.is-idle { cursor: none; }
}
.audio-controls { position: absolute; right: 10px; bottom: 8px; left: 10px; z-index: 2; min-width: 0; display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 6px; color: rgba(255, 255, 255, 0.72); background: rgba(3, 8, 18, 0.58); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06); }
.audio-control-button { flex: 0 0 auto; width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 4px; color: rgba(255, 255, 255, 0.72); background: transparent; cursor: pointer; }
.audio-control-button:hover { background: rgba(255, 255, 255, 0.12); }
.audio-control-button:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.audio-control-button .icon { width: 20px; height: 20px; }
.audio-control-button .audio-play-icon, .audio-control-button .audio-pause-icon { fill: currentColor; stroke: none; }
.audio-control-button .audio-pause-icon, .audio-control-button .audio-muted-icon { display: none; }
.audio-play-toggle.playing .audio-play-icon { display: none; }
.audio-play-toggle.playing .audio-pause-icon { display: block; }
.audio-mute.muted .audio-volume-icon { display: none; }
.audio-mute.muted .audio-muted-icon { display: block; }
.audio-time { flex: 0 0 auto; color: rgba(255, 255, 255, 0.66); font-size: 0.72rem; font-variant-numeric: tabular-nums; line-height: 1; white-space: nowrap; }
.audio-seek { --audio-progress: 0%; flex: 1 1 80px; min-width: 40px; height: 28px; margin: 0; appearance: none; -webkit-appearance: none; background: transparent; cursor: pointer; }
.audio-seek::-webkit-slider-runnable-track { height: 3px; border-radius: 999px; background: linear-gradient(to right, rgba(255, 255, 255, 0.72) 0 var(--audio-progress), rgba(255, 255, 255, 0.22) var(--audio-progress) 100%); }
.audio-seek::-webkit-slider-thumb { width: 12px; height: 12px; margin-top: -4.5px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.82); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35); -webkit-appearance: none; appearance: none; }
.audio-seek::-moz-range-track { height: 3px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.22); }
.audio-seek::-moz-range-progress { height: 3px; border-radius: 999px; background: rgba(255, 255, 255, 0.72); }
.audio-seek::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.82); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35); }
.audio-seek:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 999px; }
.audio-seek:disabled { cursor: default; opacity: 0.5; }
.submission-audio audio { display: none; }
.submission-work .actions { margin-top: 10px; }
.collage-more { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.72); color: #fff; border-radius: 999px; padding: 2px 8px; font-size: .78rem; }
.version-strip { display: flex; gap: 10px; overflow-x: auto; padding: 4px 0 10px; }
.version-chip { flex: 0 0 auto; width: 132px; border: 1px solid var(--line); border-radius: 8px; padding: 6px; background: var(--surface); }
.version-chip.current { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.version-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.version-chip .versions-mini { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; margin-bottom: 6px; min-height: 34px; }
.version-chip .versions-mini img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; }
.version-chip .versions-mini .thumb-icon { display: flex; align-items: center; justify-content: center; }
.version-chip strong { display: block; font-size: .84rem; }
.version-chip .muted { display: block; }
.version-chip .tag { margin-top: 4px; }

/* 提交页：整行紧凑页头 */
.submission-page .container { padding-top: 22px; }
.submission-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-bottom: 20px;
}
.submission-head h1 {
  min-width: 0;
  font-size: clamp(1.5rem, 2vw, 1.9rem);
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.submission-head-meta {
  position: relative;
  align-self: baseline;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}
.submission-head-meta .status-badge {
  position: absolute;
  left: 0;
  bottom: calc(100% + 3px);
}
.submission-head-detail {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px 8px;
}
.submission-head-detail > span:first-child { white-space: nowrap; }
.submission-head-meta .tag { font-size: 0.7rem; }
.submission-head .back-link {
  flex: 0 1 auto;
  max-width: min(52ch, 100%);
  min-height: 44px;
  margin: 0;
  flex-wrap: nowrap;
  font-size: 0.84rem;
}
.submission-head .back-link .submission-back-text {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.submission-head .actions { flex: 0 0 auto; margin-left: auto; }

@media (max-width: 720px) {
  .submission-head { gap: 4px 10px; margin-bottom: 16px; }
  .submission-head h1 { font-size: 1.55rem; }
  .submission-head-meta {
    position: static;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    font-size: 0.8rem;
  }
  .submission-head-meta .status-badge { position: static; }
  .submission-head-detail > span:first-child { white-space: normal; }
  .submission-head .back-link { max-width: 100%; }
}

/* ---------------- 提交页：扁平化展示（无外框） ---------------- */

.submission-page { background: var(--surface); }

.submission-layout {
  grid-template-columns: minmax(0, 2fr) minmax(340px, 1fr);
  gap: 48px;
}
.submission-layout > .panel {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.submission-work-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
  gap: 32px 24px;
}
.submission-work {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.submission-work h2 {
  margin: 12px 0 0;
  font-size: 1.02rem;
  line-height: 1.4;
}
.submission-work img,
.submission-work video {
  max-height: 65vh;
  border-radius: 10px;
}
.submission-work .media-stage {
  min-height: 0;
  padding: 0;
  border-radius: 10px;
  background: #000;
}
.submission-work .media-pending { min-height: 300px; padding: 48px 24px; }
.submission-work .actions {
  margin-top: 6px;
  margin-left: -8px;
  gap: 2px;
}
.submission-work .actions .btn {
  min-height: 32px;
  padding: 4px 8px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}
.submission-work .actions .btn:hover {
  border-color: transparent;
  background: var(--accent-soft);
  color: var(--accent-dark);
}
.submission-work .actions .icon { width: 16px; height: 16px; }

.submission-page .notice { border-color: transparent; }
.submission-page .tag { border-color: transparent; }
.submission-page .mini-score { border-color: transparent; background: #f2f4f7; }
.submission-page .rate-image-link { border-color: transparent; }
.submission-page .empty-mini {
  padding: 6px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: left;
}
.submission-page .score-panel h2 { margin-bottom: 16px; }
.submission-page .score-panel .field input,
.submission-page .score-panel .field textarea {
  border-color: transparent;
  background: #f2f4f7;
}
.submission-page .score-panel .field input:focus,
.submission-page .score-panel .field textarea:focus {
  border-color: var(--accent);
  background: var(--surface);
}
.submission-page .btn-danger-ghost { border-color: transparent; background: transparent; }
.submission-page .btn-danger-ghost:hover { border-color: transparent; background: #fff0f1; }

.submission-page .container > .panel {
  margin-top: 40px;
  padding: 24px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}
.submission-page .container > .panel h2 { margin-bottom: 14px; }
.submission-page .version-chip {
  width: 140px;
  padding: 6px;
  border: 0;
  background: transparent;
}
.submission-page .version-chip:hover { background: #f5f6f8; }
.submission-page .version-chip.current {
  background: var(--accent-soft);
  box-shadow: none;
}
.submission-page .version-chip.current strong { color: var(--accent-dark); }
.submission-page .version-chip .versions-mini img { border-radius: 8px; }

@media (max-width: 960px) {
  .submission-layout { grid-template-columns: 1fr; gap: 36px; }
  .submission-page .score-panel {
    padding-top: 28px;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 720px) {
  .submission-layout { gap: 28px; }
  .submission-work-grid { gap: 24px; }
  .submission-work img, .submission-work video { max-height: 62vh; }
}

.submission-page .topbar .btn-ghost {
  border-color: transparent;
  background: transparent;
}
.submission-page .topbar .btn-ghost:hover {
  border-color: transparent;
  background: var(--accent-soft);
}

@media (max-width: 720px) {
  .submission-page .nav {
    padding: 4px 0;
    border-color: transparent;
    background: transparent;
    gap: 8px;
  }
}

/* ============================================================
   全站扁平化：白底、无外框、浅灰填充、留白分隔
   ============================================================ */

/* 页面区块：不再使用卡片外框 */
.panel {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.panel + .panel { margin-top: 32px; }
.panel h2 { margin-bottom: 16px; }

/* 通知与提示：去掉描边 */
.notice,
.notice.neutral,
.notice.notice-strong,
.flash,
.form-error,
.file-picked { border-color: transparent; }
.notice.notice-strong { border: 0; }
.notice.warning { color: #795410; background: #fbf0d9; }

/* 标签、选项、评分小标签：平面浅底 */
.tag,
.chip,
.mini-score {
  border-color: transparent;
  background: var(--surface-soft);
}
.tag-assigned.todo { border-color: transparent; }
.tag-processing { border-color: transparent; }

/* 次要按钮：无边框文字按钮 */
.btn-ghost {
  border-color: transparent;
  background: transparent;
}
.btn-ghost:hover {
  border-color: transparent;
  background: var(--accent-soft);
  color: var(--accent-dark);
}
.btn-danger-ghost { border-color: transparent; background: transparent; }
.btn-danger-ghost:hover { border-color: transparent; background: #fff0f1; }

/* 表单控件：浅灰填充，聚焦时才出现描边 */
.input,
.field input,
.field textarea,
.field select,
.rate-input input,
.criterion-row input:not([type="file"]) {
  border-color: transparent;
  background-color: var(--surface-soft);
}
.field select { background-color: var(--surface-soft); }
.input:focus,
.field input:focus,
.field textarea:focus,
.field select:focus,
.rate-input input:focus,
.criterion-row input:not([type="file"]):focus {
  border-color: var(--accent);
  background-color: var(--surface);
}
.static-value { border-color: transparent; background: var(--surface-soft); }

/* 工具栏与搜索 */
.segmented { border-color: transparent; background: var(--surface-soft); }
.seg { border-radius: 7px; }
.seg:hover { background: var(--surface); }
.search { background: var(--surface-soft); }

/* 项目列表：平面浅底块，不再有描边和阴影 */
.project-grid { gap: 24px; }
.project-card {
  padding: 22px;
  border: 0;
  border-radius: 14px;
  background: var(--surface-soft);
  box-shadow: none;
}
.project-card:hover {
  border-color: transparent;
  background: #e9edf3;
  box-shadow: none;
}
.project-card h2 { font-size: 1.35rem; }

/* 项目页作品墙：缩略图无框，直接作为媒体 */
.thumb {
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: var(--surface-soft);
  box-shadow: none;
}
.thumb img { border-radius: 12px; }
.thumb-audio, .thumb-video { background: var(--surface-soft); }
.work-card:hover .thumb { border-color: transparent; box-shadow: none; }
.work-card:hover h3 { color: var(--accent-dark); }
.ribbon, .work-badge { box-shadow: none; }
.work-card-body { padding: 10px 0 0; }

/* 教师统计条：浅灰整体，无外框 */
.stat-row {
  border: 0;
  border-radius: 14px;
  background: var(--surface-soft);
}

/* 表格：去掉外框，只保留行分隔 */
.table th { border-radius: 0; }

/* 上传、项目编辑：扁平填写区 */
.dropzone {
  border: 0;
  background: var(--surface-soft);
}
.dropzone:hover, .dropzone.dragover {
  border-color: transparent;
  background: var(--accent-soft);
}
.file-picked { background: var(--accent-soft); }
.criteria-editor {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.criterion-row {
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}
.criterion-row:last-child { border-bottom: 0; }
.criterion-image-pick {
  border: 0;
  background: var(--surface-soft);
}
.criterion-image-pick:hover,
.criterion-image-pick:focus-within {
  border-color: transparent;
  background: var(--accent-soft);
}
.icon-btn { border-color: transparent; background: transparent; }
.icon-btn:hover { border-color: transparent; }
.account-form input[type="file"] {
  border: 0;
  background: var(--surface-soft);
}
.account-form input[type="file"]::file-selector-button {
  border: 0;
  background: var(--surface);
}

/* 空状态：不再使用虚线框 */
.empty-state {
  border: 0;
  background: transparent;
}
.empty-mini {
  border: 0;
  background: transparent;
}

/* 登录页：去掉大卡片，保留深色展示块 */
.login-card {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  gap: 36px;
  overflow: visible;
}
.login-hero { border-radius: var(--radius-lg); }
.login-panel { padding: 0; }
.login-media span {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.1);
}

/* 手机端：导航、统计、表格行改为无框平面块 */
@media (max-width: 720px) {
  .panel + .panel { margin-top: 24px; }
  .nav {
    padding: 4px 0;
    border-color: transparent;
    background: transparent;
    gap: 8px;
  }
  .stat-row { border-radius: 12px; }
  .table-mobile tbody tr {
    border: 0;
    border-radius: 12px;
    background: var(--surface-soft);
  }
  .table-mobile tbody tr:hover { background: var(--surface-soft); }
  .login-card { gap: 24px; }
}

/* 宽屏下的表单阅读宽度 */
.project-form { max-width: 880px; }
.account-form { max-width: 760px; }
.account-form input[type="file"] { flex: 0 1 520px; }

/* 登录页的提示消息不要和登录卡并排 */
.login-page .container { flex-direction: column; }

@media (max-width: 720px) {
  .project-form { max-width: none; }
  .account-form { max-width: none; }
  .account-form input[type="file"] { flex: 1 1 auto; }
}

/* 浅色块内的标签需要反白，避免与底同色 */
.project-card .chip,
.project-card .tag { background: var(--surface); }

/* 上传页的侧栏与表单顶端对齐 */
.upload-layout > .panel + .panel { margin-top: 0; }

@media (max-width: 720px) {
  .table-mobile .tag,
  .table-mobile .chip,
  .table-mobile .mini-score { background: var(--surface); }
}

/* 项目编辑：输入边界更清楚，说明区更大 */
.project-form .field input,
.project-form .field textarea,
.project-form .field select,
.project-form .criterion-row input:not([type="file"]) {
  border-color: var(--line-strong);
  background-color: var(--surface-soft);
}
.project-form .field input:focus,
.project-form .field textarea:focus,
.project-form .field select:focus,
.project-form .criterion-row input:not([type="file"]):focus {
  border-color: var(--accent);
  background-color: var(--surface);
}
.project-form textarea[name="description"] { min-height: 168px; }

/* 首页项目卡片：轻微增强层次感 */
.project-card {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  box-shadow: 0 2px 10px rgba(24, 40, 62, 0.04);
}
.project-card:hover {
  border-color: var(--line-strong);
  background: #eef2f7;
  box-shadow: 0 10px 26px rgba(24, 40, 62, 0.08);
}

/* 首页项目卡片：恢复为扁平化之前的卡片样式 */
.project-grid { gap: 18px; }
.project-card {
  padding: 23px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface);
  box-shadow: none;
}
.project-card:hover {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 7px 20px rgba(24, 40, 62, 0.07);
}
.project-card h2 { font-size: 1.5rem; }
.project-card .chip,
.project-card .tag {
  border-color: var(--line);
  background: var(--surface-soft);
}

/* 手机端作品列表：轻微底板，增强卡片边界 */
@media (max-width: 720px) {
  .project-page .work-card {
    padding: 8px 8px 10px;
    border-radius: 12px;
    background: var(--surface-soft);
  }
  .project-page .work-card .thumb {
    border-radius: 8px;
    background: var(--surface);
  }
  .project-page .work-card .work-card-body { padding: 9px 0 0; }
  .project-page .work-card .tag,
  .project-page .work-card .chip { background: var(--surface); }
}

.status-badge.returned {
  color: #9a3412;
  background: #fff1e6;
}
.tag-returned {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #f2c9b0;
  color: #9a3412;
  background: #fff1e6;
  font-size: 0.75rem;
}
.return-banner {
  display: grid;
  gap: 8px;
}
