/* =====================================================================
   会员单位（学校）：总览目录 + 学校子站 + 学校管理页
   依赖 site.css 的设计变量，不重复定义颜色
   ===================================================================== */

/* ---------------- 总览：统计条 ---------------- */
.units-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.us-cell {
  display: flex;
  flex-direction: column;
  min-width: 92px;
  padding: 10px 16px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(8px);
}
.us-cell b {
  font-size: 22px;
  line-height: 1.1;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.us-cell span {
  font-size: 12px;
  color: rgba(234, 246, 255, .78);
  margin-top: 2px;
}

/* ---------------- 总览：布局 ---------------- */
.units-layout {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.units-side {
  position: sticky;
  top: calc(var(--nav-h) + 14px);
  max-height: calc(100vh - var(--nav-h) - 28px);
  overflow: auto;
  padding: 14px 12px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.units-side::-webkit-scrollbar { width: 6px; }
.units-side::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }

.units-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px 10px;
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--text-3);
  text-transform: uppercase;
}
.units-side-toggle { display: none; }

.units-tree { display: flex; flex-direction: column; gap: 2px; }

.ut-group { border: 0; }
.ut-sum {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  margin-top: 4px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 650;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  transition: background .2s var(--ease);
}
.ut-sum::-webkit-details-marker { display: none; }
.ut-sum::before {
  content: "";
  width: 6px; height: 6px;
  border-right: 1.6px solid var(--text-3);
  border-bottom: 1.6px solid var(--text-3);
  transform: rotate(-45deg);
  transition: transform .22s var(--ease);
  flex: none;
  margin-right: 2px;
}
.ut-group[open] > .ut-sum::before { transform: rotate(45deg); }
.ut-sum:hover { background: var(--surface-2); }
.ut-sum em {
  font-style: normal;
  font-size: 11px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--accent-weak);
}
.ut-sum.ut-l2 { font-size: 13px; font-weight: 500; color: var(--text-2); padding-left: 16px; }
.ut-body { padding-left: 10px; }

.ut-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 6px 10px;
  border: 0;
  border-radius: var(--r-sm);
  background: none;
  font: inherit;
  font-size: 13px;
  color: var(--text-2);
  text-align: left;
  cursor: pointer;
  transition: background .16s var(--ease), color .16s var(--ease);
}
.ut-item:hover { background: var(--surface-2); color: var(--text); }
.ut-item em {
  font-style: normal;
  font-size: 11px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.ut-item.is-on {
  background: var(--accent-weak);
  color: var(--accent);
  font-weight: 650;
}
.ut-item.is-on em { color: var(--accent); }
.ut-l0 { font-size: 14px; font-weight: 650; color: var(--text); }
.ut-l3 { font-size: 12.5px; padding-left: 18px; color: var(--text-3); }
.ut-towns { padding-left: 8px; margin: 2px 0 6px; border-left: 1px dashed var(--border-strong); }

/* ---------------- 总览：右侧 ---------------- */
.units-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.units-toolbar .input { max-width: 320px; }
.units-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.units-head h2 { margin: 0; font-size: 19px; }
.units-count { font-size: 13px; color: var(--text-3); }

.units-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
  gap: 14px;
}
.school-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 16px 13px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: transform .28s var(--ease), box-shadow .28s var(--ease), border-color .28s var(--ease);
}
.school-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.sc-top { display: flex; align-items: flex-start; gap: 8px; }
.sc-name {
  flex: 1;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.45;
  color: var(--text);
}
.sc-badge {
  flex: none;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.sc-badge.badge-public { color: #0b6b3a; background: rgba(22, 163, 74, .12); }
.sc-badge.badge-private { color: #9a5b04; background: rgba(217, 119, 6, .14); }
.sc-badge.badge-other { color: var(--accent); background: var(--accent-weak); }
.sc-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.sc-tag, .sc-town {
  font-size: 11.5px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-3);
}
.sc-tag { color: var(--accent); background: var(--accent-weak); }
.sc-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  font-size: 12px;
  color: var(--text-3);
}
.sc-arrow { color: var(--accent); transition: transform .24s var(--ease); }
.school-card:hover .sc-arrow { transform: translateX(4px); }

:root[data-theme="dark"] .sc-badge.badge-public { color: #6ee7a8; }
:root[data-theme="dark"] .sc-badge.badge-private { color: #fbbf24; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1000px) {
  .units-layout { grid-template-columns: 1fr; gap: 16px; }
  .units-side {
    position: static;
    max-height: 0;
    overflow: hidden;
    padding: 0 12px;
    border-width: 0;
    transition: max-height .32s var(--ease), padding .32s var(--ease);
  }
  .units-side.is-open {
    max-height: 70vh;
    overflow: auto;
    padding: 12px;
    border-width: 1px;
  }
  .units-side-head { padding-top: 6px; }
  .units-side-toggle {
    display: inline-flex;
    padding: 4px 12px;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    background: var(--surface-2);
    font-size: 12px;
    color: var(--text-2);
    cursor: pointer;
  }
}
@media (max-width: 560px) {
  .units-grid { grid-template-columns: 1fr; }
  .us-cell { flex: 1 1 30%; min-width: 0; padding: 8px 12px; }
  .us-cell b { font-size: 18px; }
  .units-toolbar .input { max-width: none; }
}

/* =====================================================================
   学校子站
   ===================================================================== */
.sch-page { background: var(--bg); }
.sch-head {
  position: relative;
  padding: 16px 0 0;
  background: var(--grad-deep);
  color: #eaf6ff;
  overflow: hidden;
}
.sch-head::after {
  content: "";
  position: absolute;
  right: -80px; top: -120px;
  width: 420px; height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, .28), transparent 65%);
  pointer-events: none;
}
.sch-head-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}
.sch-crumb {
  font-size: 13px;
  color: rgba(234, 246, 255, .72);
  text-decoration: none;
  transition: color .2s var(--ease);
}
.sch-crumb:hover { color: #fff; }
.sch-head-acts { display: flex; gap: 8px; }
.sch-icon-btn {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .08);
  color: #eaf6ff;
  font-size: 12.5px;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s var(--ease);
}
.sch-icon-btn:hover { background: rgba(255, 255, 255, .18); }

.sch-id {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px 20px 20px;
}
.sch-mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 58px; height: 58px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .2);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .04em;
  color: #fff;
  overflow: hidden;
}
/* 真校徽多是方图，圆形外框会切到边上的字：留 3px 内边距 + contain */
.sch-mark img {
  width: 100%; height: 100%; object-fit: contain;
  padding: 3px; box-sizing: border-box; background: #fff;
}
.sch-name {
  margin: 0 0 4px;
  font-size: clamp(20px, 3vw, 27px);
  font-weight: 750;
  letter-spacing: .01em;
  color: #fff;
}
.sch-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: rgba(234, 246, 255, .78);
  flex-wrap: wrap;
}
.sch-sub i { font-style: normal; opacity: .45; }

/* ---- 两栏骨架：左侧栏目导航 + 右侧内容 ----
   模板对所有学校通用：学校管理页开通哪些栏目，这里就渲染哪几项。 */
.sch-shell {
  display: grid;
  grid-template-columns: 214px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
  max-width: var(--container);
  margin: 0 auto;
  padding: 24px 20px 44px;
}
.sch-side {
  position: sticky;
  top: calc(var(--nav-h, 64px) + 14px);
  align-self: start;
  min-width: 0;
}
.sch-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.sch-tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  white-space: nowrap;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.sch-tab-i {
  flex: none;
  display: grid;
  place-items: center;
  width: 18px; height: 18px;
  color: var(--text-3);
  transition: color .18s var(--ease);
}
.sch-tab-i svg { width: 100%; height: 100%; display: block; }
.sch-tab:hover { background: var(--surface-2); color: var(--text); }
.sch-tab:hover .sch-tab-i { color: var(--text-2); }
.sch-tab.is-on {
  background: var(--accent-weak);
  color: var(--accent);
  font-weight: 650;
}
.sch-tab.is-on .sch-tab-i { color: var(--accent); }
.sch-tab.is-on::before {
  content: "";
  position: absolute;
  left: 2px; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 17px;
  border-radius: 2px;
  background: var(--grad-brand);
}

.sch-main {
  min-width: 0;
  padding: 0;
}
/* 只显示当前栏目；其余隐藏但保留 DOM，切回来时 iframe / 已加载数据都还在 */
#sch-body > * { display: none; }
#sch-body > *.is-on { display: block; animation: schfade .22s var(--ease); }
@keyframes schfade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
.sch-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 60px 0;
  justify-content: center;
  color: var(--text-3);
  font-size: 14px;
}
.sch-spin {
  width: 15px; height: 15px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: schspin .7s linear infinite;
}
@keyframes schspin { to { transform: rotate(360deg); } }

.sch-sec { margin-bottom: 26px; scroll-margin-top: calc(var(--nav-h) + 12px); }
.sch-sec-h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}
.sch-sec-h h2 {
  position: relative;
  margin: 0;
  padding-left: 13px;
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
}
.sch-sec-h h2::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 4px; height: 17px;
  border-radius: 2px;
  background: var(--grad-brand);
}
.sch-more { font-size: 13px; color: var(--accent); text-decoration: none; }

/* 首页大卡 */
.sch-hero-card {
  padding: 26px 26px 22px;
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}
.shc-badges { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.shc-badge {
  font-size: 11.5px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-weak);
  color: var(--accent);
}
.shc-title { margin: 0 0 10px; font-size: clamp(21px, 3vw, 26px); color: var(--text); }
.shc-desc { margin: 0 0 6px; font-size: 15px; line-height: 1.8; color: var(--text-2); }
.shc-note { margin: 0 0 14px; font-size: 12.5px; color: var(--text-3); }
.shc-quick {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin: 18px 0 4px;
}
.shc-q {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: transform .26s var(--ease), border-color .26s var(--ease), box-shadow .26s var(--ease);
}
.shc-q:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.shc-q b { font-size: 14px; color: var(--text); }
.shc-q span { font-size: 12px; color: var(--text-3); }

.shc-news { margin-top: 20px; padding-top: 16px; border-top: 1px dashed var(--border); }
.shc-news-h { font-size: 13px; color: var(--text-3); margin-bottom: 8px; letter-spacing: .04em; }
.shc-news-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  text-decoration: none;
  border-bottom: 1px dashed var(--border);
}
.shc-news-item:last-child { border-bottom: 0; }
.shc-news-t {
  font-size: 14px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shc-news-item:hover .shc-news-t { color: var(--accent); }
.shc-news-d { flex: none; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }

/* 通用内容块 */
.sch-prose {
  padding: 22px 24px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}
.sch-prose p { margin: 0 0 12px; font-size: 15px; line-height: 1.9; color: var(--text-2); }
.sch-prose p:last-child { margin-bottom: 0; }

.sch-list {
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
}
.sch-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: background .2s var(--ease);
}
.sch-item:last-child { border-bottom: 0; }
.sch-item:hover { background: var(--surface-2); }
.sch-item-main { flex: 1; min-width: 0; }
.sch-item-t { font-size: 14.5px; color: var(--text); }
.sch-item-s {
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sch-item-d { flex: none; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }

/* 校园动态卡片：一行 3 个（≥1100px 4 个），带缩略图，样式对齐名师空间作品卡 */
.sch-news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.sch-news-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .2s var(--ease), transform .2s var(--ease), border-color .2s var(--ease);
}
.sch-news-card:hover {
  border-color: var(--brand);
  box-shadow: 0 10px 26px rgba(12, 74, 110, .12);
  transform: translateY(-2px);
}
.sch-news-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, rgba(34,211,238,.16), rgba(14,165,233,.1));
  overflow: hidden;
}
.sch-news-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sch-news-thumb-video {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #0b2239, #123b57);
  color: #fff;
}
/* B 站/抖音这类外链视频：有封面就铺满，再压一层暗色让 ▶ 看得清 */
.sch-news-thumb-video.has-cover { background: #0b2239; }
.sch-news-thumb-video.has-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sch-news-thumb-video.has-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(6, 18, 30, .28);
}
.sch-news-thumb-video.has-cover .sch-news-play,
.sch-news-thumb-video.has-cover .sch-news-tag { position: relative; z-index: 2; }
.sch-news-play { font-size: 34px; line-height: 1; opacity: .92; }
.sch-news-tag {
  position: absolute;
  right: 10px;
  bottom: 10px;
  font-size: 11.5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(6, 20, 32, .62);
  color: #fff;
}
.sch-news-thumb-text {
  display: grid;
  place-items: center;
  color: var(--text-3);
  font-size: 13px;
  letter-spacing: .04em;
}
.sch-news-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.sch-news-t {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sch-news-s {
  font-size: 12.5px;
  color: var(--text-3);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sch-news-d { margin-top: auto; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
@media (min-width: 1100px) { .sch-news-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 760px) { .sch-news-grid { grid-template-columns: repeat(1, minmax(0, 1fr)); } }


.sch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
  gap: 14px;
}
.sch-card {
  display: block;
  padding: 16px 18px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: transform .26s var(--ease), box-shadow .26s var(--ease);
}
.sch-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.sch-card-t { font-size: 14.5px; font-weight: 600; color: var(--text); line-height: 1.5; }
.sch-card-s { margin-top: 6px; font-size: 12.5px; color: var(--text-3); line-height: 1.65; }
.sch-work { padding: 0; overflow: hidden; }
.sch-work-cover {
  height: 132px;
  background-size: cover;
  background-position: center;
  background-color: var(--surface-2);
}
/* 无封面时的占位：淡渐变 + 编程积木意象，避免大片死板灰块 */
.sch-work-cover.is-empty {
  position: relative;
  background-image:
    radial-gradient(circle at 26% 32%, rgba(94, 234, 212, .28), transparent 46%),
    radial-gradient(circle at 78% 22%, rgba(127, 211, 255, .30), transparent 50%),
    linear-gradient(150deg, #eef6ff 0%, #e6f0fb 100%);
}
.sch-work-cover.is-empty::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%);
  border-radius: 11px;
  background:
    linear-gradient(180deg, rgba(31, 111, 235, .20), rgba(31, 111, 235, .10));
  box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset,
              0 6px 14px rgba(11, 37, 69, .08),
              -14px 8px 0 -6px rgba(34, 211, 238, .35),
              14px 8px 0 -6px rgba(31, 111, 235, .28);
}
.sch-work .sch-card-t { padding: 12px 16px 0; }
.sch-work .sch-card-s { padding: 0 16px 14px; margin-top: 4px; }

/* 窄屏作品网格：两列，压缩封面高度，避免一屏只有一个作品 */
@media (max-width: 560px) {
  .sch-grid-works { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .sch-work-cover { height: 86px; }
  .sch-work-cover.is-empty::after { width: 26px; height: 26px; border-radius: 9px; }
  .sch-work .sch-card-t { padding: 9px 11px 0; font-size: 13px; line-height: 1.45; }
  .sch-work .sch-card-s { padding: 0 11px 11px; font-size: 11.5px; }
}

.sch-team {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}
.sch-teacher {
  padding: 18px 14px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: center;
}
.sch-avatar {
  width: 54px; height: 54px;
  margin: 0 auto 10px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--grad-brand);
  color: #06202e;
  font-size: 20px;
  font-weight: 700;
  position: relative;
  overflow: hidden;
}
.sch-teacher-t { font-size: 14px; font-weight: 600; color: var(--text); }
.sch-teacher-s { margin-top: 3px; font-size: 12px; color: var(--text-3); }

/* 本校名师卡片：4 位一行；整块可点，进这位老师的名师空间 */
.sch-team-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
a.sch-teacher,
.sch-teacher-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
a.sch-teacher:hover,
.sch-teacher-link:hover {
  border-color: var(--brand);
  box-shadow: 0 6px 18px rgba(12, 74, 110, .10);
  transform: translateY(-1px);
}
.sch-avatar img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  position: absolute;
  inset: 0;
}
@media (max-width: 900px) {
  .sch-team-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .sch-team-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.sch-contact {
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
}
.sch-c-row {
  display: flex;
  gap: 18px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.sch-c-row:last-child { border-bottom: 0; }
.sch-c-row span { flex: none; width: 84px; color: var(--text-3); }
.sch-c-row b { font-weight: 500; color: var(--text); }
.sch-contact-tip { margin: 12px 0 0; font-size: 12.5px; color: var(--text-3); }

.sch-empty {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 24px 20px;
  border-radius: var(--r-lg);
  border: 1px dashed var(--border-strong);
  background: var(--surface);
  text-align: center;
}
.sch-empty b { font-size: 14px; color: var(--text-2); font-weight: 600; }
.sch-empty span { font-size: 12px; color: var(--text-3); line-height: 1.6; }

/* 编程工作空间 */
.sch-ws {
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.sch-ws-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--text-2);
}
.sch-ws-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, .16);
}
.sch-ws-bar em {
  font-style: normal;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-weak);
  color: var(--accent);
}
.sch-ws-actions { margin-left: auto; display: flex; gap: 8px; }
.sch-btn {
  padding: 5px 13px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-2);
  font-size: 12.5px;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.sch-btn:hover { background: var(--surface-2); }
.sch-btn.is-link { display: inline-flex; align-items: center; }
.sch-btn-solid {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.sch-btn-solid:hover { background: var(--brand-500); }
.sch-ws-frame { height: min(78vh, 880px); background: #0b1220; }
.sch-ws-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.sch-ws-tip {
  padding: 10px 16px 12px;
  font-size: 12.5px;
  color: var(--text-3);
  border-top: 1px solid var(--border);
}

/* 子站页脚 */
.sch-foot {
  margin-top: 20px;
  padding: 24px 20px 30px;
  background: var(--grad-deep);
  color: rgba(234, 246, 255, .82);
}
.sch-foot-in {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container);
  margin: 0 auto;
  font-size: 13px;
}
.sch-foot-links { display: flex; gap: 16px; flex-wrap: wrap; }
.sch-foot-links a { color: rgba(234, 246, 255, .82); text-decoration: none; }
.sch-foot-links a:hover { color: #fff; }
.sch-foot-copy {
  max-width: var(--container);
  margin: 14px auto 0;
  font-size: 12px;
  color: rgba(234, 246, 255, .5);
}

@media (max-width: 700px) {
  .sch-id { gap: 12px; padding: 14px 16px 16px; }
  .sch-mark { width: 48px; height: 48px; border-radius: 13px; font-size: 17px; }
  .sch-hero-card { padding: 20px 18px 18px; border-radius: var(--r-lg); }
  .sch-ws-frame { height: 70vh; }
  /* 手机竖屏：编辑器左右分栏在 390 宽下只剩几十像素，给足高度并引导全屏使用 */
  .sch-ws-narrow { display: block; }
  .sch-ws-bar { flex-wrap: wrap; }
  .sch-ws-actions { margin-left: 0; width: 100%; }
  .sch-item { padding: 12px 16px; }
  .sch-c-row { padding: 12px 16px; }
  .sch-c-row span { width: 74px; }
  .sch-head-top { padding: 0 16px; }
}

/* 窄屏：侧栏收成顶部横向滚动条，不占正文高度 */
@media (max-width: 900px) {
  .sch-shell {
    /* 必须 minmax(0,1fr)：纯 1fr 的最小尺寸是 max-content，
       正文里的宽表格 / iframe 会把整列撑出屏幕 */
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    padding: 14px 16px 32px;
  }
  .sch-side {
    position: sticky;
    top: 0;
    z-index: 30;
    margin: 0 -16px;
    padding: 8px 16px;
    background: var(--bg);
  }
  .sch-nav {
    flex-direction: row;
    gap: 6px;
    padding: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    border-radius: 999px;
  }
  .sch-nav::-webkit-scrollbar { display: none; }
  .sch-tab {
    flex: none;
    gap: 7px;
    padding: 8px 13px;
    border-radius: 999px;
    font-size: 13.5px;
  }
  .sch-tab-i { width: 15px; height: 15px; }
  .sch-tab.is-on::before { display: none; }
  .sch-tab.is-on {
    background: var(--grad-brand);
    color: #fff;
  }
  .sch-tab.is-on .sch-tab-i { color: #fff; }
}


/* =====================================================================
   学校管理页
   ===================================================================== */
.sadm-page { background: var(--bg); min-height: 100vh; }
.sadm-head {
  background: var(--grad-deep);
  color: #eaf6ff;
  padding: 14px 0;
}
.sadm-head-in {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}
.sadm-back { font-size: 13px; color: rgba(234, 246, 255, .72); text-decoration: none; }
.sadm-back:hover { color: #fff; }
.sadm-title { display: flex; align-items: baseline; gap: 10px; flex: 1; min-width: 0; }
.sadm-title b { font-size: 16px; font-weight: 700; color: #fff; }
.sadm-title span { font-size: 12px; color: rgba(234, 246, 255, .55); font-family: ui-monospace, monospace; }
.sadm-head-acts { display: flex; gap: 8px; }
.sadm-head-acts .sch-btn {
  background: rgba(255, 255, 255, .1);
  border-color: rgba(255, 255, 255, .22);
  color: #eaf6ff;
}
.sadm-head-acts .sch-btn:hover { background: rgba(255, 255, 255, .2); }

.sadm-login { display: grid; place-items: center; padding: 60px 20px; }
.sadm-card {
  width: min(420px, 100%);
  padding: 26px 26px 24px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}
.sadm-card h2 { margin: 0 0 6px; font-size: 19px; color: var(--text); }
.sadm-hint { margin: 0 0 18px; font-size: 12.5px; line-height: 1.7; color: var(--text-3); }

.sadm-main { max-width: 1080px; margin: 0 auto; padding: 22px 20px 50px; }
.sadm-tabs, .sadm-subtabs { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.sadm-tab, .sadm-sub {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-size: 13.5px;
  font-family: inherit;
  cursor: pointer;
  transition: all .2s var(--ease);
}
.sadm-tab.is-on, .sadm-sub.is-on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.sadm-subtabs { margin-bottom: 14px; }
.sadm-sub { padding: 6px 14px; font-size: 13px; }

.sadm-note {
  margin-bottom: 16px;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  background: var(--accent-weak);
  color: var(--text-2);
  font-size: 12.5px;
  line-height: 1.7;
}
.sadm-note code { padding: 1px 5px; border-radius: 4px; background: rgba(0, 0, 0, .06); }

.sadm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px 16px;
}
.sadm-col2 { grid-column: 1 / -1; }
.sadm-field { display: flex; flex-direction: column; gap: 6px; }
.sadm-field > span { font-size: 12.5px; color: var(--text-3); }
.sadm-field .input { width: 100%; }
.sadm-field textarea.input { resize: vertical; line-height: 1.7; font-family: inherit; }

.sadm-mods { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--border); }
.sadm-mods-h { font-size: 12.5px; color: var(--text-3); margin-bottom: 10px; }
.sadm-mod-row { display: flex; flex-wrap: wrap; gap: 8px; }
.sadm-mod {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
}
.sadm-mod input { accent-color: var(--accent); }
.sadm-mod.is-locked { opacity: .6; cursor: not-allowed; }

.sadm-actions { display: flex; align-items: center; gap: 14px; margin-top: 20px; flex-wrap: wrap; }
.sadm-msg { font-size: 12.5px; }
.sadm-msg.is-ok { color: var(--ok); }
.sadm-msg.is-err { color: var(--danger); }

.sadm-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 20px;
  align-items: start;
}
.sadm-list {
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
}
.sadm-art {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
}
.sadm-art:last-child { border-bottom: 0; }
.sadm-art-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sadm-art-main b {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sadm-art-main span { font-size: 11.5px; color: var(--text-3); }
.sadm-mini {
  flex: none;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 12px;
  color: var(--text-2);
  cursor: pointer;
  font-family: inherit;
}
.sadm-mini:hover { background: var(--surface-2); }
.sadm-mini.is-danger { color: var(--danger); border-color: rgba(220, 38, 38, .3); }
.sadm-empty { padding: 30px 16px; text-align: center; font-size: 13px; color: var(--text-3); }

.sadm-editor {
  padding: 18px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 16px;
}
.sadm-editor-h { font-size: 14px; font-weight: 700; color: var(--text); }
.sadm-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sadm-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }

.sadm-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.sadm-pick {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none;
}
.sadm-pick:hover { border-color: var(--accent); }
.sadm-pick b { font-size: 13.5px; color: var(--text); font-weight: 600; }
.sadm-pick span { font-size: 11.5px; color: var(--text-3); }

@media (max-width: 860px) {
  .sadm-content-grid { grid-template-columns: 1fr; }
  .sadm-editor { position: static; }
  .sadm-head-in { flex-wrap: wrap; gap: 10px; }
  .sadm-title { order: 3; flex-basis: 100%; }
}

/* =====================================================================
   身份入口（游客 / 老师 / 学生）与作业区
   ===================================================================== */
.sch-ident-btn {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .1);
  color: #eaf6ff;
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
  transition: all .2s var(--ease);
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sch-ident-btn:hover { background: rgba(255, 255, 255, .2); }
.sch-ident-btn.is-student { border-color: rgba(34, 197, 94, .55); background: rgba(34, 197, 94, .18); }
.sch-ident-btn.is-teacher { border-color: rgba(245, 158, 11, .55); background: rgba(245, 158, 11, .18); }
.sch-ident-btn.is-guest {
  background: rgba(15, 23, 42, .1);
  border-color: rgba(15, 23, 42, .18);
  color: #0b2545;
}
/* 微信身份：绿色 + 头像 */
.sch-ident-btn.is-wx {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 170px;
  padding-left: 5px;
  border-color: rgba(7, 193, 96, .55);
  background: rgba(7, 193, 96, .16);
  color: #d7ffe9;
}
.sch-ident-btn.is-wx span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sch-ident-av {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  background: #07c160;
}

/* 身份弹层里的「微信登录」 */
.sg-wx {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(7, 193, 96, .38);
  border-radius: 13px;
  background: rgba(7, 193, 96, .07);
  color: var(--text);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: all .2s var(--ease);
}
.sg-wx:hover {
  border-color: #07c160;
  background: rgba(7, 193, 96, .13);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.sg-wx-ico {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #07c160;
  color: #fff;
}
.sg-wx-ico svg { width: 20px; height: 20px; }
.sg-wx-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sg-wx-txt b { font-size: 14.5px; font-weight: 700; }
.sg-wx-txt i { font-size: 12px; font-style: normal; color: var(--text-3); }
.sg-wx-note {
  margin: 7px 0 0;
  font-size: 11.5px;
  color: var(--text-3);
  line-height: 1.6;
}
.sg-wx-note.is-warn { color: var(--danger); }

.sch-gate {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 20, 38, .62);
  backdrop-filter: blur(6px);
  animation: sgFade .18s var(--ease);
}
.sch-gate[hidden] { display: none; }
@keyframes sgFade { from { opacity: 0; } to { opacity: 1; } }

.sg-card {
  position: relative;
  width: min(460px, 100%);
  max-height: 90vh;
  overflow: auto;
  padding: 26px 26px 22px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sg-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-3);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.sg-close:hover { background: var(--surface-2); color: var(--text); }
.sg-title { font-size: 17px; font-weight: 700; color: var(--text); }
.sg-desc { font-size: 12.5px; line-height: 1.7; color: var(--text-3); }

.sg-opts { display: flex; flex-direction: column; gap: 9px; }
.sg-opt {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 13px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s var(--ease);
}
.sg-opt:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.sg-opt em { font-size: 14.5px; font-weight: 700; font-style: normal; color: var(--text); }
.sg-opt span { font-size: 12px; color: var(--text-3); }

/* --- 身份三选一：卡片网格 --- */
.sg-card.is-wide { width: min(660px, 100%); }
.sg-opts.is-led {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
}
.sg-opts.is-led .sg-opt {
  position: relative;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 20px 12px 16px;
  border-radius: var(--r-md);
  overflow: hidden;
  isolation: isolate;
}
.sg-opts.is-led .sg-opt::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .28s var(--ease);
}
.sg-opts.is-led .sg-opt:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.sg-opts.is-led .sg-opt:hover::before { transform: scaleX(1); }
.sg-opts.is-led .sg-opt:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.sg-ico {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: var(--surface-2);
  color: var(--text-2);
  transition: all .26s var(--ease);
}
.sg-ico svg { width: 23px; height: 23px; display: block; }
.sg-opts.is-led .sg-opt em { font-size: 15px; letter-spacing: .01em; }
.sg-opts.is-led .sg-opt span {
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--text-2);
  min-height: 36px;
}
.sg-tag {
  margin-top: 2px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-2);
  background: var(--surface-2);
  transition: all .26s var(--ease);
}

/* 三种身份的强调色 */
.sg-opt.is-guest:hover { border-color: var(--border-strong); }
.sg-opt.is-guest:hover .sg-ico { background: #e7eef8; color: var(--brand-700); }
.sg-opt.is-guest:hover::before { background: var(--border-strong); }

.sg-opt.is-student:hover { border-color: var(--brand-500); }
.sg-opt.is-student:hover .sg-ico { background: rgba(31, 111, 235, .12); color: var(--brand-500); }
.sg-opt.is-student:hover .sg-tag { background: rgba(31, 111, 235, .12); color: var(--brand-500); }

.sg-opt.is-teacher:hover { border-color: var(--warn); }
.sg-opt.is-teacher:hover .sg-ico { background: rgba(217, 119, 6, .13); color: var(--warn); }
.sg-opt.is-teacher:hover .sg-tag { background: rgba(217, 119, 6, .13); color: var(--warn); }

@media (max-width: 560px) {
  .sg-opts.is-led { grid-template-columns: 1fr; }
  .sg-opts.is-led .sg-opt {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    text-align: left;
    padding: 13px 14px;
    gap: 4px 12px;
  }
  .sg-ico { width: 40px; height: 40px; border-radius: 13px; flex: none; }
  .sg-ico svg { width: 20px; height: 20px; }
  .sg-opts.is-led .sg-opt em { flex: 1; }
  .sg-opts.is-led .sg-opt span { flex-basis: 100%; min-height: 0; padding-left: 52px; }
  .sg-tag { order: 9; margin-left: 52px; }
}

.sg-form { display: flex; flex-direction: column; gap: 12px; }
.sg-field { display: flex; flex-direction: column; gap: 5px; }
.sg-field > span { font-size: 12.5px; color: var(--text-3); }
.sg-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
}
.sg-input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
.sg-input[type="file"] { padding: 8px 10px; font-size: 12.5px; }
.sg-who { font-size: 13.5px; font-weight: 700; color: var(--text); }
.sg-tip { font-size: 12px; line-height: 1.7; color: var(--text-3); }
.sg-err {
  padding: 9px 12px;
  border-radius: var(--r-sm);
  background: rgba(220, 38, 38, .1);
  color: var(--danger);
  font-size: 12.5px;
  line-height: 1.6;
}
.sg-acts { display: flex; gap: 9px; }
.sg-acts .sch-btn { flex: 1; }
.sg-form[hidden], .sg-opts[hidden], .sg-err[hidden] { display: none; }

/* ---------- 作业区 ---------- */
.wk-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.wk-who { font-size: 13.5px; font-weight: 700; color: var(--text); }
.wk-hint { font-size: 12px; color: var(--text-3); flex: 1; }
.sch-btn.is-locked { opacity: .55; cursor: not-allowed; }

.wk-sect { margin-top: 16px; }
.wk-sect-h {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}
.wk-sect-h span { font-size: 11.5px; font-weight: 400; color: var(--text-3); }

.wk-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  margin-bottom: 8px;
}
.wk-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.wk-row-t {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.wk-row-s { font-size: 11.5px; color: var(--text-3); }
.wk-row-f a { font-size: 11.5px; color: var(--accent); text-decoration: none; }
.wk-row-f a:hover { text-decoration: underline; }
.wk-badge {
  flex: none;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(245, 158, 11, .14);
  color: #b45309;
  font-size: 11px;
  font-weight: 500;
}
.wk-badge.is-done { background: rgba(34, 197, 94, .14); color: #15803d; }

@media (max-width: 560px) {
  .sch-ident-btn { max-width: 110px; font-size: 11.5px; padding: 5px 9px; }
  .sg-card { padding: 20px 18px 18px; }
  .wk-bar { padding: 10px 12px; }
  .wk-row { flex-wrap: wrap; }
}

/* ---------- 学生作品封面（按类型渐变）与点赞 ---------- */
.sch-work-cover {
  display: grid;
  place-items: center;
  position: relative;
}
.sch-work-cover svg {
  width: 38px;
  height: 38px;
  stroke: rgba(255, 255, 255, .92);
  fill: none;
  stroke-width: 1.6;
}
.sch-work-cover.k-scratch { background: linear-gradient(135deg, #ffb347, #f97316); }
.sch-work-cover.k-hardware { background: linear-gradient(135deg, #34d399, #0d9488); }
.sch-work-cover.k-science { background: linear-gradient(135deg, #818cf8, #4f46e5); }
.sch-work-cover.k-code { background: linear-gradient(135deg, #60a5fa, #1d4ed8); }
.sch-work-cover.k-craft { background: linear-gradient(135deg, #f472b6, #be185d); }

.sch-work-link { display: block; text-decoration: none; color: inherit; }
.sch-card-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px 14px;
}
.sch-card-foot .sch-card-s {
  padding: 0;
  margin: 0;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wk-like {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-3);
  font-size: 11.5px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s var(--ease);
}
.wk-like svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
.wk-like i { font-style: normal; font-variant-numeric: tabular-nums; }
.wk-like:hover { border-color: rgba(220, 38, 38, .35); color: var(--danger); }
.wk-like.is-on {
  color: var(--danger);
  border-color: rgba(220, 38, 38, .3);
  background: rgba(220, 38, 38, .07);
}
.wk-like.is-on svg { fill: currentColor; }

/* ---------- 编程作品：类型徽标 · 继续编辑 · 点赞 ---------- */
.sch-work-cover.k-python { background: linear-gradient(135deg, #38bdf8, #0284c7); }
.wk-kind {
  position: absolute;
  top: 8px;
  left: 8px;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  background: rgba(15, 23, 42, .6);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .02em;
}
.wk-kind.is-scratch { background: rgba(234, 88, 12, .85); }
.wk-kind.is-python { background: rgba(3, 105, 161, .88); }
.wk-edit {
  flex: none;
  color: var(--brand, #1d4ed8);
  font-size: 11.5px;
  font-weight: 700;
  text-decoration: none;
}
.wk-edit:hover { text-decoration: underline; }
/* .wk-clike 与 .wk-like 外观一致，只是编号来自平台字符串 id */
.wk-clike {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-3);
  font-size: 11.5px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s var(--ease);
}
.wk-clike svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
.wk-clike i { font-style: normal; font-variant-numeric: tabular-nums; }
.wk-clike:hover { border-color: rgba(220, 38, 38, .35); color: var(--danger); }
.wk-clike.is-on {
  color: var(--danger);
  border-color: rgba(220, 38, 38, .3);
  background: rgba(220, 38, 38, .07);
}

/* 分享按钮：微信绿实心胶囊，带文字，进页面时轻微脉动 3 下引起注意 */
.wk-share {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #07c160;
  background: #07c160;
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  font-family: inherit;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(7, 193, 96, .3);
  transition: transform .16s var(--ease), box-shadow .16s var(--ease);
  animation: wkPulse 2.2s ease-in-out 3;
}
.wk-share svg { width: 13px; height: 13px; flex: none; }
.wk-share:active { transform: scale(.94); }
.wk-share:hover { box-shadow: 0 3px 12px rgba(7, 193, 96, .45); }
@keyframes wkPulse {
  0%, 100% { box-shadow: 0 2px 8px rgba(7, 193, 96, .3); }
  50% { box-shadow: 0 2px 8px rgba(7, 193, 96, .3), 0 0 0 5px rgba(7, 193, 96, .16); }
}

/* 点赞：未点过时浅红底 + 呼吸，点过变实心红（.is-on 单独定义，别覆盖它） */
.wk-clike:not(.is-on) {
  color: #dc2626;
  border-color: rgba(220, 38, 38, .32);
  background: rgba(220, 38, 38, .06);
  animation: wkBeat 2.6s ease-in-out 3;
}
@keyframes wkBeat {
  0%, 100% { transform: scale(1); }
  45% { transform: scale(1.08); }
}

/* 分享插在点赞前面，间距收一点（作者名已 flex:1 撑开，不需要 auto） */
.wk-share + .wk-clike { margin-left: 6px; }
.wk-clike.is-on svg { fill: currentColor; }

/* ---------- 老师布置的作业 ---------- */
.wk-hw {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.wk-hw-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 15px 17px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  transition: all .22s var(--ease);
}
.wk-hw-item:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.wk-hw-item b {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.45;
}
.wk-hw-item span {
  font-size: 12.5px;
  color: var(--text-3);
  line-height: 1.6;
}
.wk-hw-item em {
  font-style: normal;
  font-size: 11.5px;
  color: var(--text-2);
  margin-top: 2px;
}

@media (max-width: 560px) {
  .wk-hw { grid-template-columns: 1fr; }
  .sch-work-cover svg { width: 28px; height: 28px; }
}

/* ---------- 编程工作空间：左侧目录 + 右侧工作区 ---------- */
.sch-ws {
  display: grid;
  grid-template-columns: 262px minmax(0, 1fr);
  align-items: stretch;
}
.sch-ws-nav {
  border-right: 1px solid var(--border);
  background: var(--surface-2);
  padding: 10px 8px 12px;
  overflow-y: auto;
  max-height: min(calc(72vh + 108px), 830px);
}
.sch-ws-navh {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 9px 9px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--text-3);
}
.sch-ws-navh span {
  font-weight: 600;
  letter-spacing: 0;
  color: var(--text-3);
  opacity: .8;
}
.sch-ws-group + .sch-ws-group { margin-top: 10px; }
.sch-ws-gt {
  padding: 7px 9px 5px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .05em;
  color: var(--text-3);
  opacity: .85;
}
.sch-ws-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 9px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  transition: background .18s var(--ease), box-shadow .18s var(--ease);
}
.sch-ws-item:hover { background: var(--surface); }
.sch-ws-item.is-on {
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.sch-ws-item.is-off { cursor: not-allowed; opacity: .52; }
.sch-ws-item.is-off:hover { background: transparent; }
.sch-ws-ico {
  flex: 0 0 auto;
  width: 27px;
  height: 27px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--surface);
  color: var(--text-3);
  border: 1px solid var(--border);
}
.sch-ws-item.is-on .sch-ws-ico {
  background: var(--accent-weak);
  border-color: transparent;
  color: var(--accent);
}
.sch-ws-ico svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sch-ws-txt {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.sch-ws-txt b {
  font-size: 12.8px;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sch-ws-item.is-on .sch-ws-txt b { color: var(--accent); }
.sch-ws-txt i {
  font-style: normal;
  font-size: 10px;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sch-ws-bd {
  flex: 0 0 auto;
  font-size: 9.5px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-3);
  border: 1px solid var(--border);
}
.sch-ws-item.is-on .sch-ws-bd {
  background: var(--accent-weak);
  color: var(--accent);
  border-color: transparent;
}
.sch-ws-main { min-width: 0; display: flex; flex-direction: column; }
.sch-ws-name { font-size: 13.5px; font-weight: 700; color: var(--text); }
.sch-ws-empty {
  height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  background: var(--surface-2);
  text-align: center;
  padding: 40px 20px;
}
.sch-ws-empty b { font-size: 14px; color: var(--text-2); font-weight: 700; }
.sch-ws-empty span { font-size: 12.5px; color: var(--text-3); }

@media (max-width: 760px) {
  .sch-ws {
    grid-template-columns: 1fr;
  }
  .sch-ws-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 7px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding: 10px 12px;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }
  .sch-ws-navh { display: none; }
  .sch-ws-group { display: contents; }
  .sch-ws-gt { display: none; }
  .sch-ws-group + .sch-ws-group { margin-top: 0; }
  .sch-ws-item {
    width: auto;
    flex: 0 0 auto;
    padding: 7px 12px 7px 9px;
    border: 1px solid var(--border);
    background: var(--surface);
  }
  .sch-ws-item.is-on { border-color: var(--accent); }
  .sch-ws-ico {
    width: 20px;
    height: 20px;
    border: 0;
    background: transparent;
  }
  .sch-ws-ico svg { width: 14px; height: 14px; }
  .sch-ws-txt i { display: none; }
  .sch-ws-bd { display: none; }
  .sch-ws-frame { height: 70vh; }
  /* 窄屏工具条：标题一行，按钮一行平分 */
  .sch-ws-bar {
    flex-wrap: wrap;
    row-gap: 8px;
    padding: 10px 12px;
    font-size: 13px;
  }
  .sch-ws-name { font-size: 13px; }
  .sch-ws-actions { margin-left: 0; width: 100%; gap: 8px; }
  .sch-ws-actions .sch-btn { flex: 1 1 0; text-align: center; padding: 7px 0; }
}

/* ---------------- 教学工作台（内嵌教学平台） ---------------- */
.teach-gate {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 10px; padding: 46px 20px; border: 1px dashed var(--border-strong);
  border-radius: var(--r-md); background: var(--surface);
}
.teach-gate-ic {
  width: 52px; height: 52px; display: grid; place-items: center;
  border-radius: 16px; background: var(--accent-weak); color: var(--accent);
}
.teach-gate-ic svg { width: 28px; height: 28px; }
.teach-gate b { font-size: 18px; color: var(--text); }
.teach-gate p {
  max-width: 560px; margin: 0; font-size: 13.5px; line-height: 1.8; color: var(--text-2);
}
.teach-gate-acts { display: flex; gap: 10px; margin-top: 8px; }

.teach-top {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px; border: 1px solid var(--border);
  border-radius: var(--r-md) var(--r-md) 0 0; background: var(--surface-2);
}
.teach-who { font-size: 14px; font-weight: 600; color: var(--text); }
.teach-who em {
  margin-left: 8px; font-style: normal; font-size: 11.5px;
  font-weight: 400; color: var(--ok);
}
.teach-acts { display: flex; gap: 8px; margin-left: auto; }
.teach-acts button {
  height: 30px; padding: 0 12px; border: 1px solid var(--border-strong);
  border-radius: 8px; background: var(--surface); color: var(--text-2);
  font-size: 12.5px; cursor: pointer; white-space: nowrap;
}
.teach-acts button:hover { border-color: var(--accent); color: var(--accent); }

.teach-nav {
  display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 14px;
  border: 1px solid var(--border); border-top: 0; background: var(--surface);
}
.teach-nav-b {
  height: 30px; padding: 0 12px; border: 1px solid var(--border);
  border-radius: 999px; background: var(--surface-2); color: var(--text-2);
  font-size: 12.5px; cursor: pointer; white-space: nowrap;
  transition: background-color .2s, color .2s, border-color .2s;
}
.teach-nav-b:hover { border-color: var(--accent); color: var(--accent); }
.teach-nav-b.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.teach-nav-b.is-menu {
  margin-left: auto; border-style: dashed; border-color: var(--accent);
  color: var(--accent); font-weight: 600;
}
.teach-nav-b.is-menu span { margin-right: 2px; font-size: 13px; }

.teach-frame-wrap {
  position: relative;
  border: 1px solid var(--border); border-top: 0;
  border-radius: 0 0 var(--r-md) var(--r-md);
  background: var(--surface); overflow-x: auto; -webkit-overflow-scrolling: touch;
}
/* 进工作台前要先向本站换一个平台 token，这一步 1~2 秒；盖一层提示，
   免得用户对着白 iframe 以为坏了，或者误以为要重新登录 */
.teach-loading {
  position: absolute; inset: 0; z-index: 3;
  display: none; align-items: center; justify-content: center;
  background: rgba(248, 250, 252, .92);
  font-size: 13px; font-weight: 600; color: var(--text-3, #475569);
  letter-spacing: .2px;
}
.teach-loading.is-on { display: flex; }
.teach-loading::before {
  content: ""; width: 14px; height: 14px; margin-right: 9px;
  border: 2px solid #dbeafe; border-top-color: #2563eb; border-radius: 50%;
  animation: teach-spin .7s linear infinite;
}
@keyframes teach-spin { to { transform: rotate(360deg); } }
.teach-frame-tip {
  padding: 8px 14px; font-size: 12px; color: var(--text-3);
  border-bottom: 1px solid var(--border); background: var(--surface-2);
}
/* 宽度跟随容器：平台是响应式的，跟着 iframe 宽度自适应，不再需要横向拖动整页 */
.teach-frame {
  display: block; width: 100%; height: 78vh; min-height: 620px;
  border: 0; background: var(--surface);
}
.teach-note { margin-top: 10px; font-size: 12px; line-height: 1.8; color: var(--text-3); }

/* 教学工作台：桌面端把侧栏收成图标条，给内嵌平台多让 ~150px，
   否则平台里的表格（约 800px）还会被挤到要横向拖动 */
@media (min-width: 901px) {
  .sch-shell { transition: grid-template-columns .22s var(--ease, ease); }
  .sch-shell.is-teach { grid-template-columns: 64px minmax(0, 1fr); gap: 18px; }
  .sch-shell.is-teach .sch-tab {
    justify-content: center; gap: 0; padding-left: 0; padding-right: 0;
  }
  .sch-shell.is-teach .sch-tab span { display: none; }
  .sch-shell.is-teach .sch-tab.is-on::before { left: 0; }
}

@media (max-width: 900px) {
  .teach-top { padding: 10px 12px; }
  .teach-acts { width: 100%; margin-left: 0; }
  .teach-acts button { flex: 1 1 0; }
  .teach-nav { flex-wrap: wrap; padding: 10px 12px; }
  .teach-nav-b { flex: 0 0 auto; }
  .teach-nav-b.is-menu { margin-left: 0; }
  .teach-frame { height: 72vh; min-height: 520px; }
}

/* ===== 子站校徽 + 为学校点赞（2026-11-03） ===== */
/* 校徽统一做成圆形，和首页排行榜卡片上的小徽标呼应；
   上传过真校徽的用真图，否则用后端生成的 SVG 徽标 */
.sch-mark { border-radius: 50%; overflow: hidden; background: transparent; }
.sch-mark.has-logo { padding: 0; border-color: rgba(255, 255, 255, .28); }
.sch-mark img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

.sch-like {
  flex: none;
  display: inline-flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 16px 0 13px;
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  color: #fff; font: inherit; font-size: 13.5px; font-weight: 600;
  cursor: pointer; transition: all .18s ease;
  -webkit-tap-highlight-color: transparent;
}
.sch-like svg { width: 15px; height: 15px; fill: currentColor; opacity: .9; }
.sch-like:hover { background: rgba(255, 255, 255, .22); border-color: rgba(255, 255, 255, .4); }
.sch-like:active { transform: scale(.96); }
.sch-like:disabled { opacity: .7; cursor: default; }
.sch-like.is-on {
  background: #e11d48; border-color: #e11d48;
  box-shadow: 0 6px 16px rgba(225, 29, 72, .35);
}
.sch-like.is-on svg { opacity: 1; animation: sch-like-pop .3s ease; }
.sch-like-n { font-variant-numeric: tabular-nums; line-height: 1; }
@keyframes sch-like-pop {
  0% { transform: scale(.72); }
  60% { transform: scale(1.24); }
  100% { transform: scale(1); }
}

@media (max-width: 700px) {
  .sch-id { gap: 12px; }
  .sch-mark { width: 46px; height: 46px; border-radius: 50%; }
  .sch-like { height: 34px; padding: 0 13px 0 11px; font-size: 12.5px; }
  .sch-like svg { width: 13px; height: 13px; }
}

/* ===== 点赞按钮 + 按钮下方的提示（2026-11-03 V2） =====
   需求原文：点赞按钮「下面」要有一行提示「给学校点赞」，
   点完只看高亮和数字变化，不要再弹任何 tip 层。 */
.sch-like-wrap {
  margin-left: auto; flex: none;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.sch-like-cap {
  font-size: 12px; line-height: 1;
  color: rgba(234, 246, 255, .78);
  letter-spacing: .04em;
  white-space: nowrap;
  transition: color .18s var(--ease);
}
.sch-like-wrap:hover .sch-like-cap { color: #fff; }

@media (max-width: 700px) {
  .sch-like-wrap { gap: 4px; }
  .sch-like-cap { font-size: 11px; letter-spacing: .02em; }
}


/* ===== 后台「校徽」上传区（2026-11-03） ===== */
.sadm-logo { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.sadm-logo-prev {
  width: 84px; height: 84px; flex: none;
  border-radius: 50%; object-fit: cover;
  background: #f1f5f9; border: 1px solid var(--border, #e5e9f0);
  box-shadow: 0 2px 8px rgba(15, 23, 42, .06);
}
.sadm-logo-side { min-width: 0; flex: 1 1 220px; }
.sadm-logo-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.sadm-logo-tip { margin: 8px 0 0; font-size: 12px; line-height: 1.6; color: var(--text-3, #8494a8); }

/* =====================================================================
   学生个人空间（我的空间）：QQ 空间式装扮
   外观全部由 .spc-stage 上的 --spc-* 变量驱动，值来自接口下发的装扮预设，
   前端不硬编码任何一套皮肤 —— 新增主题只要改后端预设即可。
   ===================================================================== */
.spc-loading { display: flex; align-items: center; gap: 10px; padding: 28px; color: var(--text-3, #8494a8); }
/* ⚠️ 作者样式里的 display:flex 会盖掉 hidden 属性的 display:none，
   不补这条，内容出来后「正在打开空间…」会一直挂着 */
.spc-loading[hidden] { display: none; }
.spc-acts { display: flex; gap: 10px; justify-content: center; padding: 10px 0 4px; }
.spc-tip { font-size: 12px; color: var(--text-3, #8494a8); }

/* ---- 顶部舞台：背景 + 挂件 + 名片 ---- */
.spc-stage {
  position: relative; overflow: hidden;
  border-radius: var(--r-lg, 16px);
  background: var(--spc-bg);
  padding: 22px;
  box-shadow: 0 6px 22px rgba(15, 23, 42, .10);
}
/* 背景可能是深色渐变，压一层浅色保证白字始终读得清 */
.spc-stage::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .26), rgba(255, 255, 255, .05) 62%, transparent);
}
.spc-head { position: relative; z-index: 2; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.spc-av {
  width: 74px; height: 74px; flex: none; border-radius: 50%; overflow: hidden;
  background: #fff; box-shadow: 0 2px 10px rgba(15, 23, 42, .18);
}
.spc-av-i { display: block; width: 100%; height: 100%; }
.spc-id { min-width: 0; flex: 1 1 200px; }
.spc-name {
  display: block; font-size: 20px; font-weight: 800; color: #fff;
  text-shadow: 0 1px 3px rgba(15, 23, 42, .3);
}
.spc-sign {
  display: block; margin-top: 3px; font-size: 13px; line-height: 1.5;
  color: rgba(255, 255, 255, .94); text-shadow: 0 1px 2px rgba(15, 23, 42, .24);
}
.spc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.spc-tags i {
  font-style: normal; font-size: 12px; font-weight: 600;
  padding: 2px 9px; border-radius: 999px;
  background: rgba(255, 255, 255, .88); color: var(--spc-main);
}
.spc-stats { display: flex; gap: 16px; flex: none; }
.spc-stats u { text-decoration: none; text-align: center; font-size: 12px; color: rgba(255, 255, 255, .95); }
.spc-stats u b {
  display: block; font-size: 19px; font-weight: 800; color: #fff;
  font-variant-numeric: tabular-nums;
}
.spc-deco {
  flex: none; padding: 9px 16px; border: 0; border-radius: 999px; cursor: pointer;
  font-size: 13px; font-weight: 700; background: #fff; color: var(--spc-main);
  box-shadow: 0 3px 10px rgba(15, 23, 42, .16);
}
.spc-deco:hover { filter: brightness(1.03); }
.spc-deco.is-back { background: rgba(255, 255, 255, .92); }

/* ---- 挂件：漂浮装饰，纯 CSS 动画 ---- */
.spc-decor { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.spc-decor s {
  position: absolute; text-decoration: none; font-size: 15px;
  color: rgba(255, 255, 255, .88);
  animation: spcfloat 8s linear infinite;
}
.spc-decor.is-none s { display: none; }
.spc-d1 { left: 7%;  bottom: -8%; animation-delay: 0s; }
.spc-d2 { left: 24%; bottom: -8%; animation-delay: 1.1s; font-size: 12px; }
.spc-d3 { left: 42%; bottom: -8%; animation-delay: 2.3s; font-size: 18px; }
.spc-d4 { left: 61%; bottom: -8%; animation-delay: .6s; }
.spc-d5 { left: 78%; bottom: -8%; animation-delay: 3.1s; font-size: 13px; }
.spc-d6 { left: 92%; bottom: -8%; animation-delay: 1.8s; font-size: 17px; }
@keyframes spcfloat {
  0%   { transform: translateY(0) rotate(0deg); opacity: 0; }
  12%  { opacity: .95; }
  100% { transform: translateY(-190px) rotate(200deg); opacity: 0; }
}

/* ---- 主体两栏 ---- */
.spc-grid { display: grid; gap: 16px; margin-top: 16px; }
.spc-grid.is-double { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.spc-grid.is-single { grid-template-columns: minmax(0, 1fr); }
.spc-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.spc-box {
  background: var(--spc-card); border: 1px solid var(--border, #e5e9f0);
  border-radius: var(--r-md, 14px); padding: 16px;
}
.spc-box-h { font-size: 14px; font-weight: 800; color: var(--spc-main); margin-bottom: 12px; }

/* ---- 作品墙 ---- */
.spc-works { display: grid; grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); gap: 12px; }
.spc-work {
  display: block; text-decoration: none; overflow: hidden;
  border: 1px solid var(--border, #e5e9f0); border-radius: 12px;
  background: var(--bg-2, #f8fafc);
  transition: transform .16s var(--ease), box-shadow .16s var(--ease);
}
.spc-work:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(15, 23, 42, .10); }
.spc-work-c {
  position: relative;                 /* 封面绝对定位盖住垫底的图标 */
  display: flex; align-items: center; justify-content: center;
  height: 86px; font-size: 32px;
  background: linear-gradient(135deg, #e0f2fe, #ede9fe);
}
.spc-work.is-python .spc-work-c { background: linear-gradient(135deg, #dcfce7, #dbeafe); }
/* 无封面时露出的类型图标（SVG，任何环境都能渲染） */
.spc-work-ico { width: 40px; height: 40px; display: block; color: #7c8ba1; opacity: .7; }
.spc-work-ico svg { width: 100%; height: 100%; fill: currentColor; }
/* 封面失效时（平台静态地址偶尔 404）隐藏图片，露出底下的类型图标，不留白框 */
.spc-work-c img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.spc-work b {
  display: block; padding: 8px 10px 2px; font-size: 13px;
  color: var(--text-1, #1e293b);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.spc-work span { display: block; padding: 0 10px 9px; font-size: 11px; color: var(--text-3, #8494a8); }

/* ---- 徽章 ---- */
.spc-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.spc-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px; border-radius: 999px;
  background: var(--spc-soft); color: var(--spc-main);
  font-size: 12px; font-weight: 700;
}
.spc-badge i { font-style: normal; font-size: 14px; }

/* ---- 最近访客 ---- */
.spc-vis { display: flex; flex-wrap: wrap; gap: 10px; }
.spc-vis-i { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 54px; }
.spc-vis-av {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--spc-soft); color: var(--spc-main);
  font-weight: 800; font-style: normal; font-size: 14px;
}
.spc-vis-i u {
  text-decoration: none; font-size: 11px; color: var(--text-3, #8494a8);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---- 同学空间（互访入口） ---- */
.spc-mates { display: flex; flex-direction: column; gap: 6px; }
.spc-mate {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px; border-radius: 10px; text-decoration: none;
  transition: background .16s var(--ease);
}
.spc-mate:hover { background: var(--spc-soft); }
.spc-mate.is-mine { background: var(--spc-soft); }
.spc-mate-av { flex: none; width: 32px; height: 32px; border-radius: 50%; overflow: hidden; }
.spc-mate-av svg { display: block; width: 100%; height: 100%; }
.spc-mate u {
  text-decoration: none; font-size: 13px; font-weight: 700;
  color: var(--text-1, #1e293b); flex: none;
}
.spc-mate span {
  flex: 1 1 auto; min-width: 0; font-size: 11px; color: var(--text-3, #8494a8);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---- 留言板 ---- */
.spc-msg-in { display: flex; gap: 8px; margin-bottom: 12px; }
.spc-input {
  flex: 1 1 auto; min-width: 0; padding: 9px 12px; font-size: 13px;
  border: 1px solid var(--border, #e5e9f0); border-radius: 10px;
  background: var(--bg-2, #f8fafc); color: var(--text-1, #1e293b);
}
.spc-msg-tip { font-size: 12px; color: var(--text-3, #8494a8); margin-bottom: 10px; }
.spc-msg-item { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-top: 1px dashed var(--border, #e5e9f0); }
.spc-msg-item:first-child { border-top: 0; }
.spc-msg-av {
  flex: none; width: 30px; height: 30px; border-radius: 50%; font-style: normal;
  display: flex; align-items: center; justify-content: center;
  background: var(--spc-soft); color: var(--spc-main); font-weight: 800; font-size: 13px;
}
.spc-msg-b { min-width: 0; flex: 1 1 auto; }
.spc-msg-b b { display: block; font-size: 13px; color: var(--text-1, #1e293b); }
.spc-msg-b b u { text-decoration: none; margin-left: 8px; font-size: 11px; font-weight: 400; color: var(--text-3, #8494a8); }
.spc-msg-b span { display: block; margin-top: 2px; font-size: 13px; line-height: 1.6; color: var(--text-2, #475569); word-break: break-word; }
.spc-msg-del {
  flex: none; padding: 0 4px; border: 0; background: transparent; cursor: pointer;
  color: var(--text-3, #8494a8); font-size: 16px; line-height: 1;
}
.spc-msg-del:hover { color: #e11d48; }

/* ---- 装扮面板（在 modal 里） ---- */
.spc-pick-h { margin: 14px 0 6px; font-size: 12px; font-weight: 700; color: var(--text-3, #8494a8); }
.spc-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.spc-opt {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 6px 10px; cursor: pointer;
  border: 1px solid var(--border, #e5e9f0); border-radius: 10px;
  background: var(--bg-2, #f8fafc);
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.spc-opt.is-on { border-color: var(--accent, #2f7fe0); box-shadow: 0 0 0 2px rgba(47, 127, 224, .16); }
.spc-opt u { text-decoration: none; font-size: 11px; color: var(--text-2, #475569); }
.spc-opt-av { display: block; width: 34px; height: 34px; border-radius: 50%; overflow: hidden; }
.spc-opt-av svg { display: block; width: 100%; height: 100%; }
.spc-opt-sw { display: block; width: 34px; height: 34px; border-radius: 8px; }
.spc-opt-bg { display: block; width: 52px; height: 26px; border-radius: 6px; }

/* 窄屏：舞台收紧、双栏并成单栏（放最后，确保覆盖前面的栅格） */
@media (max-width: 700px) {
  .spc-stage { padding: 16px 14px; }
  .spc-head { gap: 12px; }
  .spc-av { width: 60px; height: 60px; }
  .spc-name { font-size: 17px; }
  .spc-stats { gap: 12px; }
  .spc-deco { padding: 8px 13px; font-size: 12px; }
  .spc-grid.is-double { grid-template-columns: minmax(0, 1fr); }
  .spc-works { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .spc-box { padding: 13px; }
}
