/* ============================================================
   大运之舟 · 课堂作品台
   视觉主题：宣纸白底 / 靛青主色 / 朱砂点缀（明亮浅色版）
   四个页面共用一套顶栏、按钮、卡片与排版
   ============================================================ */

:root {
  --bg: #f4f2ec;
  --bg-2: #ffffff;
  --surface: #ffffff;
  --surface-2: #eef3f1;
  --surface-3: #e2ece9;
  --line: #c4d4ce;
  --line-strong: #93b5ac;
  --ink: #173c40;
  --text: #1d3b3e;
  --muted: #4f6a68;
  --muted-2: #607a77;
  --teal: #1b6a6d;
  --teal-deep: #125356;
  --teal-soft: #e3f0ed;
  --accent: #c2543a;
  --accent-soft: #fbece7;
  --gold: #b08a45;
  --gold-light: #d9bc7e;
  --gold-deep: #8c692d;
  --green: #2f8b62;
  --red: #c2543a;
  --frame: #e6f0ec;
  --frame-line: #cfe0d9;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 24px rgba(23, 60, 64, 0.10);
  --fs-md: 16px;
  --fs-lg: 18px;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;
  --sans: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

body.app-page {
  position: relative;
  min-height: 100vh;
  background:
    radial-gradient(900px 460px at 6% -10%, rgba(27, 106, 109, 0.09), transparent 68%),
    radial-gradient(820px 420px at 96% 4%, rgba(194, 84, 58, 0.055), transparent 70%),
    linear-gradient(180deg, #faf9f5 0%, #f4f2ec 58%, #eef1ec 100%);
  background-attachment: fixed;
}

body.app-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(23, 60, 64, 0.018) 0 1px, transparent 1px 4px);
  opacity: 0.55;
}

img { display: block; max-width: 100%; }
button, input, textarea, select { font-family: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 11px clamp(16px, 3vw, 40px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  font-family: var(--serif);
  font-size: 20px;
  color: #ffffff;
  background: var(--teal);
  box-shadow: 0 5px 14px rgba(27, 106, 109, 0.22);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.22; }
.brand-text b { font-family: var(--serif); font-size: 17px; letter-spacing: 2.5px; color: var(--ink); font-weight: 500; }
.brand-text em { font-style: normal; font-size: 10px; letter-spacing: 3px; color: var(--muted-2); }

.site-nav { display: flex; align-items: center; gap: 2px; margin-left: 4px; }
.nav-link {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.5px;
  color: var(--muted);
  transition: color 0.18s ease, background 0.18s ease;
  white-space: nowrap;
}
.nav-link:hover { color: var(--teal); background: var(--teal-soft); }
.nav-link.active { color: #ffffff; background: var(--teal); font-weight: 500; }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.group-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--teal-soft);
  color: var(--teal-deep);
  font-size: 12.5px;
  letter-spacing: 1px;
  white-space: nowrap;
}
.group-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 19px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 13.5px;
  letter-spacing: 0.5px;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--teal); color: #ffffff; box-shadow: 0 6px 16px rgba(27, 106, 109, 0.18); }
.btn.primary:hover { background: var(--teal-deep); }
.btn.ghost { border-color: var(--line-strong); background: #ffffff; color: var(--teal-deep); }
.btn.ghost:hover { border-color: var(--teal); background: var(--teal-soft); }
.btn.danger { border-color: rgba(194, 84, 58, 0.28); background: var(--accent-soft); color: var(--red); }
.btn.danger:hover { border-color: var(--red); }
.btn.small { padding: 7px 14px; font-size: 12.5px; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

/* ---------- 输入 ---------- */
input[type="text"], input[type="password"], input[type="number"], select {
  width: 100%;
  padding: 11px 15px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--text);
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
input:focus, select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(27, 106, 109, 0.12); }
::placeholder { color: var(--muted-2); }
input[type="range"] { accent-color: var(--teal); }

/* ---------- 通用布局 ---------- */
.page {
  position: relative;
  z-index: 1;
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 0 100px;
}

.page-head { margin-bottom: 24px; }
.page-head h1 { margin: 0 0 8px; font-family: var(--serif); font-size: clamp(26px, 3.2vw, 36px); letter-spacing: 3px; font-weight: 500; color: var(--ink); }
.page-head p { margin: 0; max-width: 54em; color: var(--muted); font-size: 13.5px; line-height: 1.9; }

.empty-hint { font-size: 12.5px; color: var(--muted-2); }
.picker { position: relative; z-index: 1; }

.chip {
  padding: 7px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.5px;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.chip:hover { border-color: var(--teal); color: var(--teal-deep); }
.chip.active { background: var(--teal); border-color: var(--teal); color: #ffffff; }

/* ---------- 学生端：选组 ---------- */
.group-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 14px; margin: 0 0 22px; }

.group-card {
  position: relative;
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
  text-align: left;
  color: var(--text);
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.group-card:hover { transform: translateY(-3px); border-color: var(--teal); }
.group-card b { display: block; font-family: var(--serif); font-size: 17px; letter-spacing: 1px; margin-bottom: 12px; padding-right: 34px; font-weight: 500; color: var(--ink); }
.group-avatar { position: absolute; top: 16px; right: 16px; font-family: var(--serif); font-size: 12px; letter-spacing: 1px; color: var(--teal); opacity: 0.65; }
.group-card .mini-state { display: flex; gap: 6px; flex-wrap: wrap; }
.mini-tag { font-size: 11px; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); letter-spacing: 0.5px; }
.mini-tag.done { background: rgba(47, 139, 98, 0.12); color: var(--green); }
.group-card .arrow { position: absolute; right: 16px; bottom: 12px; color: var(--teal); font-size: 17px; opacity: 0.75; }

.new-group { display: flex; gap: 12px; max-width: 560px; padding: 16px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: rgba(255, 255, 255, 0.6); }

/* ---------- 学生端：提交区 ---------- */
.submit-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 1fr);
  gap: clamp(20px, 3vw, 36px);
  padding: clamp(22px, 2.6vw, 34px);
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.submit-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, var(--teal), var(--gold), transparent); opacity: 0.5; }
.submit-copy { align-self: center; }
.eyebrow { margin: 0 0 12px; font-size: 10.5px; letter-spacing: 4px; color: var(--teal); text-transform: uppercase; }
.submit-copy h1 { margin: 0 0 14px; font-family: var(--serif); font-size: clamp(28px, 3.4vw, 40px); font-weight: 500; letter-spacing: 2px; line-height: 1.28; color: var(--ink); }
.submit-copy h1 span { color: var(--teal); }
.hero-sub { margin: 0 0 24px; max-width: 34em; font-size: 13.5px; line-height: 1.95; color: var(--muted); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.submit-progress { align-self: center; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.progress-head { display: flex; align-items: baseline; justify-content: space-between; font-size: 11.5px; letter-spacing: 2px; color: var(--muted); }
.progress-head b { font-family: var(--serif); font-size: 22px; font-weight: 500; color: var(--teal-deep); letter-spacing: 1px; }
.progress-track { height: 5px; margin: 12px 0 18px; border-radius: 999px; background: #dce7e3; overflow: hidden; }
.progress-track i { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--teal); transition: width 0.4s ease; }
.progress-steps { display: flex; flex-direction: column; gap: 11px; }
.pstep { display: flex; align-items: center; gap: 12px; opacity: 0.55; transition: opacity 0.2s ease; }
.pstep i { width: 24px; height: 24px; flex: none; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; font-style: normal; font-size: 11px; color: var(--muted); }
.pstep b { display: block; font-size: 12.5px; font-weight: 500; letter-spacing: 0.5px; }
.pstep small { font-size: 10.5px; color: var(--muted-2); }
.pstep.done { opacity: 1; }
.pstep.done i { background: var(--teal); border-color: var(--teal); color: #ffffff; font-weight: 500; }
.pstep.done small { color: var(--green); }

.round-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 18px; }
.round-card { border: 1px solid var(--line); border-radius: var(--radius); background: #ffffff; box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.round-card.is-done { border-color: rgba(47, 139, 98, 0.45); }
.round-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 20px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.round-title { display: flex; align-items: center; gap: 13px; }
.round-index { font-family: var(--serif); font-size: 23px; line-height: 1; color: var(--teal); opacity: 0.85; }
.round-title b { display: block; font-size: 14.5px; font-weight: 500; letter-spacing: 1px; }
.round-title small { display: block; font-size: 10.5px; color: var(--muted-2); margin-top: 2px; }
.round-state { font-size: 11.5px; padding: 4px 11px; border-radius: 999px; background: #ffffff; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.round-state.open { background: var(--teal-soft); border-color: var(--line-strong); color: var(--teal-deep); }
.round-state.done { background: rgba(47, 139, 98, 0.12); border-color: transparent; color: var(--green); }
.round-body { padding: 18px 20px 22px; flex: 1; display: flex; flex-direction: column; gap: 14px; }

.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 210px;
  padding: 24px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 12px;
  background: var(--surface-2);
  text-align: center;
  color: var(--muted);
  transition: border-color 0.18s ease, background 0.18s ease;
}
.dropzone:hover, .dropzone.drag { border-color: var(--teal); background: var(--teal-soft); }
.dropzone .dz-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-strong); font-size: 19px; color: var(--teal); background: #ffffff; }
.dropzone b { font-size: 13.5px; color: var(--text); letter-spacing: 0.5px; }
.dropzone small { font-size: 12px; line-height: 1.7; color: var(--muted-2); }
.dropzone.locked { border-style: solid; border-color: var(--line); background: var(--surface-2); }
.dropzone.locked .dz-icon { color: var(--muted-2); }

.preview-box { display: flex; flex-direction: column; gap: 12px; }
.preview-frame { position: relative; border-radius: 12px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); min-height: 180px; display: grid; place-items: center; }
.preview-frame img { width: 100%; max-height: 260px; object-fit: contain; }
.preview-actions { display: flex; gap: 10px; }
.preview-actions .btn { flex: 1; }
.progress { height: 5px; border-radius: 999px; background: #dce7e3; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--teal); transition: width 0.15s linear; }
.shot { border-radius: 12px; overflow: hidden; background: #ffffff; border: 1px solid var(--line); }
.shot img { width: 100%; max-height: 260px; object-fit: contain; }
.shot-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 11.5px; color: var(--muted-2); flex-wrap: wrap; }
.shot-meta .ok-dot { color: var(--green); }
.prompt-field { display: flex; flex-direction: column; gap: 6px; }
.prompt-field span { font-size: 11.5px; color: var(--muted); letter-spacing: 0.5px; }
.prompt-field textarea {
  width: 100%;
  min-height: 64px;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--sans);
  font-size: 12.5px;
  line-height: 1.6;
  resize: vertical;
  outline: none;
}
.prompt-field textarea:focus { box-shadow: 0 0 0 3px rgba(27, 106, 109, 0.12); border-color: var(--teal); }
.shot-prompt {
  margin-top: 8px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--frame);
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
  word-break: break-word;
}

/* ---------- 学生端：弹幕条 ---------- */
.dm-strip { display: flex; align-items: center; gap: 14px; margin-top: 18px; padding: 12px 14px 12px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #ffffff; box-shadow: var(--shadow); }
.dm-strip-label { flex: none; }
.dm-strip-label b { display: block; font-size: 12.5px; font-weight: 500; letter-spacing: 1px; }
.dm-strip-label small { font-size: 10.5px; color: var(--muted-2); }
.dm-strip input { flex: 1; min-width: 0; padding: 10px 15px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface-2); color: var(--text); font-size: 12.5px; }
.dm-strip input:focus { box-shadow: 0 0 0 3px rgba(27, 106, 109, 0.12); }
.dm-strip .counter { font-size: 11px; color: var(--muted-2); }

/* ---------- 展厅大屏（唐风·扬州·运河）：五组横向展开 ---------- */
/* 一屏铺满：body 100vh，页面本身不滚动；导航改为标题旁纯文字链接，零额外高度 */
body.hall-page {
  height: 100vh;
  overflow: hidden;
  display: block;
}
.hall-page {
  background:
    radial-gradient(1100px 520px at 6% -12%, rgba(176, 138, 69, 0.13), transparent 66%),
    radial-gradient(880px 460px at 96% 0%, rgba(27, 106, 109, 0.07), transparent 68%),
    linear-gradient(180deg, #faf8f1 0%, #f5f0e4 52%, #efe9da 100%);
  background-attachment: fixed;
}
/* 底部运河水波暗纹 */
.hall-page::before {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 200px;
  z-index: 0;
  pointer-events: none;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='60' viewBox='0 0 300 60'%3E%3Cpath d='M0 30 Q37.5 6 75 30 T150 30 T225 30 T300 30' fill='none' stroke='%231b6a6d' stroke-opacity='0.13' stroke-width='1.4'/%3E%3C/svg%3E") repeat-x left 0 bottom 52px / 300px 48px,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='60' viewBox='0 0 300 60'%3E%3Cpath d='M0 30 Q37.5 54 75 30 T150 30 T225 30 T300 30' fill='none' stroke='%23b08a45' stroke-opacity='0.11' stroke-width='1.2'/%3E%3C/svg%3E") repeat-x left 14px bottom 10px / 300px 48px;
}
.hall-board { position: relative; z-index: 1; height: 100vh; display: flex; flex-direction: column; padding: clamp(14px, 2.4vh, 26px) clamp(16px, 2.4vw, 36px) clamp(8px, 1.4vh, 16px); }
.hall-head { flex: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; padding: clamp(8px, 1.6vh, 20px) 0 clamp(6px, 1.2vh, 14px); flex-wrap: wrap; }
.hall-title-row { display: flex; align-items: center; gap: 16px; }
.hall-title h1 { margin: 0; font-family: var(--serif); font-size: clamp(20px, 2.2vw, 30px); font-weight: 600; line-height: 1.2; letter-spacing: 6px; text-indent: 6px; color: var(--ink); text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85); }
.hall-title p { margin: 0; font-size: 12.5px; color: var(--muted); letter-spacing: 1px; }
/* 朱砂方印 */
.hall-seal {
  flex: none;
  width: 46px;
  height: 46px;
  padding: 3px;
  border-radius: 9px;
  background: linear-gradient(135deg, #c2543a, #a3412a);
  box-shadow: inset 0 0 0 2px rgba(253, 243, 227, 0.55), 0 4px 12px rgba(194, 84, 58, 0.32);
  transform: rotate(3deg);
}
.hall-seal b {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(253, 243, 227, 0.5);
  border-radius: 6px;
  font-family: var(--serif);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 1px;
  color: #fdf3e3;
  text-align: center;
}
/* 鎏金装饰线：渐隐长线 + 三枚菱形珠 */
.hall-title-ornament { display: flex; align-items: center; gap: 9px; margin-top: 10px; }
.hall-title-ornament::before {
  content: "";
  width: 216px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), rgba(176, 138, 69, 0.08));
}
.hall-title-ornament i {
  width: 7px;
  height: 7px;
  border-radius: 1.5px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  box-shadow: 0 1px 3px rgba(140, 105, 45, 0.35);
  transform: rotate(45deg);
}
.hall-title-ornament i:nth-child(2) { width: 9px; height: 9px; }
.hall-tools { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
/* 标题旁纯文字导航：无底框、低对比，不抢镜也不占高度 */
.hall-nav { display: flex; align-items: center; gap: 9px; font-size: 12.5px; letter-spacing: 0.5px; }
.hall-nav a { color: var(--muted); transition: color 0.16s ease; }
.hall-nav a:hover { color: var(--teal); }
.hall-nav a.active { color: var(--teal-deep); }
.hall-nav i { font-style: normal; color: var(--line-strong); }
.hall-stats { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.hall-stats b { color: var(--teal-deep); font-size: 15px; font-weight: 500; }

/* 分段胶囊筛选 */
.hall-filters {
  display: flex;
  gap: 2px;
  padding: 4px;
  border: 1px solid #d9cdb0;
  border-radius: 999px;
  background: linear-gradient(180deg, #fffdf7, #f6efdd);
  box-shadow: 0 3px 12px rgba(23, 60, 64, 0.08);
}
.hall-filters .chip {
  padding: 7px 20px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #6b5f45;
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 2px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.hall-filters .chip:hover { background: rgba(176, 138, 69, 0.15); color: var(--gold-deep); }
.hall-filters .chip.active {
  background: linear-gradient(135deg, var(--teal), var(--teal-deep));
  color: #f4e9c8;
  box-shadow: 0 3px 9px rgba(18, 83, 86, 0.28);
}

/* 五组：网格吃掉剩余高度，列内严格分行，图片等大对齐 */
.hall-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(12px, 1.4vw, 24px);
  align-items: stretch;
}
.hall-col {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-width: 0;
  min-height: 0;
}
.hall-col.is-empty { padding: 14px; border: 1px dashed rgba(147, 181, 172, 0.5); border-radius: 12px; }
/* 组头：组名居中于图片上方 */
.hall-col-head {
  flex: none;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  padding: 0 0 clamp(6px, 1vh, 10px);
}
.hall-col-name { font-family: var(--serif); font-size: 18px; font-weight: 500; letter-spacing: 2px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
.hall-col-empty { flex: none; font-size: 11px; color: var(--muted-2); letter-spacing: 0.5px; }
.hall-shots {
  flex: 1;
  min-height: 0;
  display: grid;
  gap: clamp(8px, 1.4vh, 16px);
}
.hall-grid.single-round .hall-shots { grid-template-rows: 1fr; }
.hall-grid:not(.single-round) .hall-shots { grid-template-rows: 1fr 1fr; }
/* 对比模式两行平分高度，允许图片按行高收缩；单图模式不允许收缩，保证五列等大 */
.hall-grid:not(.single-round) .hall-shot { flex: 0 1 auto; }
.hall-round {
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 6px;
  min-width: 0;
}

/* 图片：宽度吃满列宽，高度按 4:5 上限，垂直居中；五列宽高完全一致 */
.hall-shot {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 4 / 5;
  max-height: 100%;
  align-self: center;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(243, 239, 224, 0.6);
  box-shadow: 0 8px 22px rgba(23, 60, 64, 0.15);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.hall-shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hall-col:hover .hall-shot {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(23, 60, 64, 0.24);
}
/* 两次对比：图片左侧竖排「优化前 / 优化后」，标签放进列间空隙，不挤占图片宽度 */
.hall-round.has-label { position: relative; }
.hall-round.has-label .hall-shot { width: 100%; }
.hall-round-tag {
  position: absolute;
  left: -20px;
  top: 50%;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 3px;
  color: var(--gold-deep);
  text-align: center;
  pointer-events: none;
}

/* 提示词：占满图片下方剩余高度，超长才在框内滚动 */
.hall-prompt {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 5px;
  color: #6a5e44;
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
  text-align: justify;
}
.hall-prompt::-webkit-scrollbar { width: 4px; }
.hall-prompt::-webkit-scrollbar-thumb { background: rgba(27, 106, 109, 0.25); border-radius: 99px; }
.hall-prompt::-webkit-scrollbar-track { background: transparent; }
/* 内容溢出时底部渐隐，提示可滚动 */
.hall-prompt.is-overflow {
  -webkit-mask-image: linear-gradient(180deg, #000 0, #000 calc(100% - 18px), transparent 100%);
  mask-image: linear-gradient(180deg, #000 0, #000 calc(100% - 18px), transparent 100%);
}
.hall-prompt.is-none { color: var(--muted-2); }
.hall-prompt-tag {
  margin-right: 6px;
  color: var(--gold-deep);
  font-size: 11px;
  font-style: normal;
  letter-spacing: 2px;
}
.hall-prompt.is-none .hall-prompt-tag { color: var(--muted-2); }

.hall-placeholder { width: 100%; height: 100%; display: grid; place-items: center; padding: 12px; text-align: center; font-size: 11.5px; letter-spacing: 1px; line-height: 1.8; color: var(--muted-2); background: rgba(243, 239, 224, 0.5); border-radius: 10px; }
.hall-col.is-empty .hall-placeholder { min-height: 210px; }

/* ---------- 弹幕层（浅色底上的胶囊弹幕） ---------- */
.dm-layer { position: fixed; top: 76px; left: 0; right: 0; height: 42%; z-index: 4; pointer-events: none; overflow: hidden; }
.dm { position: absolute; left: 100%; white-space: nowrap; font-size: clamp(14px, 1.2vw, 19px); font-weight: 500; letter-spacing: 0.5px; padding: 6px 16px; border-radius: 999px; color: var(--ink); background: rgba(255, 255, 255, 0.95); border: 1px solid var(--line-strong); box-shadow: 0 6px 18px rgba(23, 60, 64, 0.12); animation: dm-move linear forwards; will-change: transform; }
.dm.g1 { color: var(--teal-deep); border-color: rgba(27, 106, 109, 0.35); }
.dm.g2 { color: var(--accent); border-color: rgba(194, 84, 58, 0.3); }
.dm.g3 { color: var(--gold-deep); border-color: rgba(176, 138, 69, 0.35); }
.dm.g4 { color: var(--green); border-color: rgba(47, 139, 98, 0.3); }
@keyframes dm-move { from { transform: translateX(0); } to { transform: translateX(calc(-100vw - 100%)); } }

/* ---------- 教师端 ---------- */
.t-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.panel { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: #ffffff; box-shadow: var(--shadow); }
.panel.wide { grid-column: 1 / -1; }
.panel h2 { margin: 0 0 4px; font-family: var(--serif); font-size: 16.5px; font-weight: 500; letter-spacing: 2px; color: var(--ink); }
.panel .hint { margin: 0 0 18px; font-size: 12px; color: var(--muted); line-height: 1.8; }
.inline-form { display: flex; gap: 8px; align-items: center; }
.inline-form input { flex: 1; min-width: 0; }
.inline-form + .inline-form { margin-top: 10px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chips .empty-hint { width: 100%; }
.chips .g-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 12.5px; color: var(--text); background: var(--surface-2); }
.chips .g-chip button { width: 19px; height: 19px; border: none; border-radius: 50%; background: #ffffff; color: var(--muted); font-size: 11px; line-height: 1; }
.chips .g-chip button:hover { background: var(--accent-soft); color: var(--red); }

.link-list { display: flex; flex-direction: column; gap: 8px; }
.link-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 8px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); font-size: 12.5px; }
.link-row .lbl { grid-column: 1 / -1; font-size: 10px; letter-spacing: 1.5px; color: var(--muted-2); }
.link-row .mono { font-family: Consolas, "Courier New", monospace; font-size: 11.5px; color: var(--teal-deep); word-break: break-all; }

.stat-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.stat { flex: 1; min-width: 110px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.stat b { display: block; font-family: var(--serif); font-size: 24px; font-weight: 500; color: var(--teal-deep); }
.stat small { font-size: 11px; color: var(--muted); letter-spacing: 1px; }

.works-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.works-table th { text-align: left; padding: 8px 10px; font-size: 11px; letter-spacing: 2px; color: var(--muted-2); border-bottom: 1px solid var(--line-strong); font-weight: 500; }
.works-table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.works-table tr:last-child td { border-bottom: none; }
.cell-body { display: flex; gap: 10px; align-items: center; }
.cell-img { width: 88px; height: 62px; border-radius: 8px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; }
.cell-img img { width: 100%; height: 100%; object-fit: cover; }
.cell-img span { font-size: 10.5px; color: var(--muted-2); }
.time { font-size: 11.5px; color: var(--muted-2); white-space: nowrap; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.danger-zone { border-color: rgba(194, 84, 58, 0.32); background: var(--accent-soft); }
.danger-zone h2 { color: var(--red); }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 32px; z-index: 100; transform: translate(-50%, 16px); padding: 11px 22px; border: 1px solid var(--line-strong); border-radius: 999px; background: #ffffff; color: var(--ink); font-size: 13px; letter-spacing: 0.5px; box-shadow: 0 14px 36px rgba(23, 60, 64, 0.16); opacity: 0; pointer-events: none; transition: opacity 0.22s ease, transform 0.22s ease; max-width: calc(100vw - 40px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--accent-soft); border-color: rgba(194, 84, 58, 0.5); color: var(--red); }

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(27, 106, 109, 0.22); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(27, 106, 109, 0.38); }

/* ---------- 精致浅色：层级、画框与留白（v3） ---------- */
.page { width: min(1320px, calc(100% - 48px)); padding: 22px 0 64px; }
.page-head p { font-size: var(--fs-md); line-height: 1.8; max-width: 48em; }
.hero-sub { font-size: var(--fs-md); line-height: 1.8; }
.panel .hint { font-size: 15px; }
.panel h2 { font-size: var(--fs-lg); }
.hall-title p { font-size: 15px; }
.works-table { font-size: 14px; }
.works-table th { font-size: 12px; }
.link-row { font-size: 13.5px; }

/* 等比完整显示的作品，留白改为画框衬底，绝不裁切（hall-shot 样式已并入上方唐风展厅段） */
.shot, .preview-frame, .cell-img {
  background: var(--frame);
  border: 1px solid var(--frame-line);
}
.shot img, .preview-frame img {
  object-fit: contain;
  background: var(--frame);
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(23, 60, 64, 0.10);
}
/* 管理缩略图是覆盖填充例外，不改为 contain */
.cell-img img { object-fit: cover; }

/* 学生端：选组区垂直居中偏上，卡片放大 */
.picker { min-height: calc(100vh - 150px); display: flex; flex-direction: column; justify-content: center; padding-top: 32px; }
.group-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.group-card { padding: 22px 22px 20px; }
.group-card b { font-size: 19px; }
.new-group { max-width: 640px; }
.dropzone { min-height: 240px; }

/* 教师端 */
.panel { padding: 20px; }
.t-grid { gap: 16px; }

/* ---------- 独立弹幕页 ---------- */
.dm-page { width: min(880px, calc(100% - 48px)); padding-top: clamp(48px, 14vh, 150px); }
.dm-compose { margin-top: 8px; }
.dm-compose-head { display: flex; align-items: center; gap: 14px; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.dm-compose-index { flex: none; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--teal); color: #ffffff; font-family: var(--serif); font-size: 18px; }
.dm-compose-head b { display: block; font-family: var(--serif); font-size: 20px; letter-spacing: 1px; color: var(--ink); }
.dm-compose-head small { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); }
.dm-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 22px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--frame); }
.dm-empty b { font-family: var(--serif); font-size: 18px; color: var(--ink); }
.dm-empty span { font-size: var(--fs-md); line-height: 1.8; color: var(--muted); }
.dm-compose-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.dm-last { margin-left: auto; max-width: 50%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--muted-2); }

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  .hall-title h1 { letter-spacing: 2px; }
}

@media (max-width: 1000px) {
  .site-nav { overflow-x: auto; scrollbar-width: none; }
  .site-nav::-webkit-scrollbar { display: none; }
  .submit-hero { grid-template-columns: 1fr; }
  .round-grid { grid-template-columns: 1fr; }
  .t-grid { grid-template-columns: 1fr; }
  .hall-grid { grid-template-columns: repeat(5, minmax(190px, 1fr)); overflow-x: auto; padding-bottom: 8px; }
  .hall-stats { display: none; }
  /* 小屏放弃一屏铺满，恢复自然滚动，避免内容被裁 */
  body.hall-page { height: auto; min-height: 100vh; overflow: auto; display: block; }
  .hall-board { min-height: 0; padding-bottom: 24px; }
  .hall-shots { display: flex; flex-direction: column; }
  .hall-shot { min-height: 240px; }
  .hall-prompt { flex: none; overflow: visible; max-height: none; }
  .hall-round-tag {
    position: static;
    transform: none;
    writing-mode: horizontal-tb;
    margin: 2px 0 4px;
  }
}

/* 矮屏（投影 720p 及以下）同样允许滚动，防止图片被压扁 */
@media (max-height: 640px) {
  body.hall-page { height: auto; min-height: 100vh; overflow: auto; display: block; }
  .hall-board { min-height: 0; }
  .hall-shot { min-height: 200px; }
  .hall-prompt { flex: none; overflow: visible; }
}

@media (max-width: 760px) {
  .page { width: calc(100% - 26px); padding-top: 20px; }
  .topbar { flex-wrap: wrap; gap: 10px; padding: 10px 14px; }
  .brand-text em { display: none; }
  .site-nav { order: 3; width: 100%; margin-left: 0; }
  .nav-link { padding: 7px 11px; font-size: 12px; }
  .topbar-right { margin-left: auto; }
  .dm-strip { flex-wrap: wrap; gap: 10px; padding: 12px 14px; }
  .dm-strip-label { width: 100%; }
  .dm-strip .counter { display: none; }
  .panel { padding: 16px; }
}
