/* ============================================================
 * 学生作品 · 大屏舞台（6 套文化主题 × 3 档版式 × 容器查询自适应）
 * 被 sp_screen.php（编辑器）/ showcase.php（公开展厅）/ share.php（分享落地页）共用
 * 主题只改 CSS 变量，版式只改 data-layout —— 页面无需各自的样式分支
 * ============================================================ */

/* ── 舞台外框：容器查询的载体，尺寸随容器缩放，内部一律用 cqw/clamp 定字号 ── */
.sp-stage {
  container-type: size;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 10px;
  background: #0b0d12;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .28);
}

/* ── 单屏 ── */
.sp-slide {
  --st-bg: #f7f4ec;
  --st-fg: #23262b;
  --st-accent: #9c2b22;
  --st-accent2: #b98a2f;
  --st-muted: #6b727b;
  --st-font: "Songti SC", "Noto Serif CJK SC", serif;
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  color: var(--st-fg);
  font-family: var(--st-font);
  background-color: var(--st-bg);
  background-size: cover;
  background-position: center;
  padding: clamp(12px, 4.4cqw, 56px);
  box-sizing: border-box;
  overflow: hidden;
}
.sp-slide::after { /* 背景图上的暗角，保证文字可读 */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .08), rgba(0, 0, 0, .38));
  opacity: var(--st-veil, 0);
  pointer-events: none;
}
.sp-slide > * { position: relative; z-index: 1; }

.sp-slide .st-kicker {
  font-size: clamp(9px, 1.5cqw, 15px);
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--st-accent);
}
.sp-slide .st-title {
  margin: .28em 0 .12em;
  font-size: clamp(19px, 5.6cqw, 78px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: .02em;
}
.sp-slide .st-sub {
  font-size: clamp(11px, 2.3cqw, 30px);
  line-height: 1.5;
  color: var(--st-muted);
}
.sp-slide .st-rule {
  width: clamp(26px, 8cqw, 120px);
  height: clamp(2px, .34cqw, 5px);
  margin: clamp(6px, 1.8cqw, 22px) 0;
  background: linear-gradient(90deg, var(--st-accent), var(--st-accent2));
  border-radius: 2px;
}
.sp-slide .st-points {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: clamp(4px, 1.3cqw, 16px);
}
.sp-slide .st-points li {
  font-size: clamp(11px, 2.15cqw, 27px);
  line-height: 1.45;
  padding-left: 1.5em;
  position: relative;
}
.sp-slide .st-points li::before {
  content: "";
  position: absolute;
  left: .3em;
  top: .58em;
  width: .5em;
  height: .5em;
  border-radius: 50%;
  background: var(--st-accent2);
}
.sp-slide .st-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .4em 1.4em;
  font-size: clamp(9px, 1.7cqw, 21px);
  color: var(--st-muted);
}
.sp-slide .st-foot {
  margin-top: auto;
  padding-top: clamp(6px, 1.6cqw, 22px);
  border-top: 1px solid color-mix(in srgb, var(--st-fg) 22%, transparent);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1em;
  font-size: clamp(9px, 1.7cqw, 22px);
  color: var(--st-muted);
}
.sp-slide .st-note {
  font-size: clamp(9px, 1.7cqw, 22px);
  line-height: 1.55;
  color: var(--st-muted);
  margin-top: .6em;
}
.sp-slide .st-cover {
  flex: 1;
  min-height: 0;
  border-radius: clamp(4px, 1.2cqw, 16px);
  overflow: hidden;
  background: color-mix(in srgb, var(--st-fg) 8%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.sp-slide .st-cover img,
.sp-slide .st-media img,
.sp-slide .st-media video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.sp-slide .st-embed {
  flex: 1;
  min-height: 0;
  border: 0;
  width: 100%;
  border-radius: clamp(4px, 1.2cqw, 16px);
  background: #fff;
}

/* 版式 A：海报（标题居中 + 要点） */
.sp-slide[data-layout="A"] { align-items: center; text-align: center; }
.sp-slide[data-layout="A"] .st-points { justify-items: center; }
.sp-slide[data-layout="A"] .st-points li { list-style: none; padding-left: 0; }
.sp-slide[data-layout="A"] .st-points li::before { position: static; display: inline-block; margin-right: .5em; vertical-align: middle; }
.sp-slide[data-layout="A"] .st-body { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; min-height: 0; }
.sp-slide[data-layout="A"] .st-foot { width: 100%; }

/* 版式 B：图文（左文右图，可左右互换） */
.sp-slide[data-layout="B"] .st-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(8px, 2.6cqw, 34px); align-items: center; }
.sp-slide[data-layout="B"][data-flip="1"] .st-body { direction: rtl; }
.sp-slide[data-layout="B"][data-flip="1"] .st-col { direction: ltr; }
.sp-slide[data-layout="B"] .st-col { display: flex; flex-direction: column; justify-content: center; min-width: 0; }

/* 版式 C：媒体铺满 + 角标说明 */
.sp-slide[data-layout="C"] { padding: 0; justify-content: flex-end; }
.sp-slide[data-layout="C"] .st-media { position: absolute; inset: 0; background: #000; }
.sp-slide[data-layout="C"] .st-media img,
.sp-slide[data-layout="C"] .st-media video { object-fit: cover; }
.sp-slide[data-layout="C"] .st-embed { position: absolute; inset: 0; border-radius: 0; }
.sp-slide[data-layout="C"] .st-cap {
  position: relative;
  margin: 0;
  padding: clamp(10px, 3cqw, 40px);
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .72) 45%);
  color: #fff;
}
.sp-slide[data-layout="C"] .st-cap .st-title { font-size: clamp(16px, 3.6cqw, 48px); }

/* 空态 */
.sp-slide.is-empty { align-items: center; justify-content: center; text-align: center; color: var(--st-muted); }

/* ── 播放器（自研极简滑屏，不依赖外部库） ── */
.sp-deck { position: relative; width: 100%; }
.sp-track { display: flex; transition: transform .38s cubic-bezier(.22, .61, .36, 1); will-change: transform; }
.sp-track > .sp-slide { position: relative; inset: auto; flex: 0 0 100%; width: 100%; }
.sp-deck-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: clamp(28px, 4cqw, 46px);
  height: clamp(28px, 4cqw, 46px);
  border: 0;
  border-radius: 50%;
  background: rgba(20, 22, 26, .55);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: .25;
  transition: opacity .2s;
}
.sp-deck:hover .sp-deck-nav { opacity: .92; }
.sp-deck-nav.prev { left: 10px; }
.sp-deck-nav.next { right: 10px; }
.sp-deck-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
  font-size: 13px;
  color: #444;
}
.sp-dots { display: flex; gap: 6px; flex-wrap: wrap; }
.sp-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #c9cdd4;
  cursor: pointer;
  display: block;
}
.sp-dots i.on { background: #9c2b22; transform: scale(1.25); }
.sp-dots i.hide { opacity: .35; }

/* 全屏播放 */
.sp-stage:fullscreen, .sp-deck.is-full { border-radius: 0; box-shadow: none; }
.sp-full-wrap { position: fixed; inset: 0; z-index: 900; background: #05070a; display: flex; flex-direction: column; }
.sp-full-wrap .sp-deck { flex: 1; display: flex; align-items: center; }
.sp-full-wrap .sp-stage { max-height: 100%; aspect-ratio: 16 / 9; width: 100%; }
.sp-full-wrap .sp-deck-bar { margin: 0; padding: 8px 14px; background: rgba(255, 255, 255, .06); color: #dfe4ec; }
.sp-full-wrap .sp-dots i { background: #566072; }
.sp-full-wrap .sp-dots i.on { background: #d0402c; }

/* 缩略图墙（展厅 / 编辑列表共用） */
.sp-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.sp-thumb { border: 1px solid #e3e5e9; border-radius: 10px; overflow: hidden; background: #fff; cursor: pointer; }
.sp-thumb.on { outline: 2px solid #9c2b22; outline-offset: 1px; }
.sp-thumb .sp-stage { border-radius: 0; box-shadow: none; }
.sp-thumb .cap { padding: 7px 9px; font-size: 12.5px; color: #4b5563; display: flex; justify-content: space-between; gap: 8px; }
.sp-thumb .cap .code { color: #9c2b22; font-weight: 600; }
.sp-thumb .cap .off { color: #b45309; }

/* 小按钮（播放条 / 全屏退出） */
.sp-btn.sm { padding: 4px 10px; font-size: 12.5px; border-radius: 6px; }
.sp-full-wrap .sp-btn.sm { background: rgba(255,255,255,.14); color: #e9edf5; border-color: transparent; }
