/* 版式概念：进站时一条裁切垫（工作台）点题后自动收起，页面主体是"排序 + 作品流 + 侧栏"。 */
:root {
  --mat: #0e5a4a;
  --mat-deep: #0a4438;
  --on-mat: #eef8f2;
  --on-mat-soft: #b5d8cb;
  --mat-line: rgba(238, 248, 242, .1);
  --mat-line-strong: rgba(238, 248, 242, .2);
  --marker: #ffc93c;
  --on-marker: #2c2300;
  --page: #f7f8fa;
  --surface: #ffffff;
  --sunken: #eef1f4;
  --ink: #202b33;
  --ink-soft: #65717b;
  --line: #e1e6eb;
  --accent: #0d6b57;
  --on-accent: #ffffff;
  --accent-tint: #eaf4f0;
  --heart: #dc3f4e;
  --warn: #8a5a00;
  --warn-tint: #fdf0cf;
  --bad: #b3261e;
  --bad-tint: #fbe3e1;
  --quote: #e9efeb;
  --shadow: 0 1px 2px rgba(12, 50, 40, .08);
  --shadow-up: 0 14px 30px -10px rgba(12, 50, 40, .3);
  --display: "ZCOOL QingKe HuangYou", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "IBM Plex Mono", Consolas, "Noto Sans SC", monospace;
  --gutter-l: max(clamp(16px, 2.4vw, 40px), env(safe-area-inset-left, 0px));
  --gutter-r: max(clamp(16px, 2.4vw, 40px), env(safe-area-inset-right, 0px));
  --head: 0px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --mat: #0b463a;
    --mat-deep: #07332a;
    --page: #0f1b18;
    --surface: #182925;
    --sunken: #21352f;
    --ink: #e5f0eb;
    --ink-soft: #9fb5ab;
    --line: #2d443c;
    --accent: #58c9a9;
    --on-accent: #06251d;
    --accent-tint: #1b3d34;
    --heart: #ff7480;
    --warn: #f2c261;
    --warn-tint: #3a2f12;
    --bad: #ff9c94;
    --bad-tint: #43201d;
    --quote: #21352f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-up: 0 14px 30px -10px rgba(0, 0, 0, .7);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --mat: #0b463a;
  --mat-deep: #07332a;
  --page: #0f1b18;
  --surface: #182925;
  --sunken: #21352f;
  --ink: #e5f0eb;
  --ink-soft: #9fb5ab;
  --line: #2d443c;
  --accent: #58c9a9;
  --on-accent: #06251d;
  --accent-tint: #1b3d34;
  --heart: #ff7480;
  --warn: #f2c261;
  --warn-tint: #3a2f12;
  --bad: #ff9c94;
  --bad-tint: #43201d;
  --quote: #21352f;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-up: 0 14px 30px -10px rgba(0, 0, 0, .7);
}
@media (min-width: 760px) { :root { --head: 57px; } }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html.modal-open { overflow: hidden; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 14px/1.55 var(--body);
  padding-bottom: 60px;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 40;
  background: var(--surface);
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap {
  width: 100%;
  max-width: none;
  margin-inline: auto;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* 头像 */
.ava {
  flex: none; display: block; width: 24px; height: 24px; border-radius: 50%; overflow: hidden;
  background: var(--sunken); box-shadow: 0 0 0 1px var(--line);
}
.ava svg, .ava img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ava-md { width: 32px; height: 32px; }
.ava-xl { width: 84px; height: 84px; }

/* 顶栏 */
.top { background: var(--surface); border-bottom: 1px solid var(--line); position: relative; z-index: 30; }
.top-in { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand account" "nav nav" "search search"; align-items: center; gap: 8px 12px; padding-block: 8px; }
.brand { grid-area: brand; min-width: 0; display: flex; align-items: center; gap: 8px; text-decoration: none; margin-right: 0; }
.brand svg { width: 30px; height: 30px; flex: none; display: block; }
.top-nav a { display: inline-flex; align-items: center; min-height: 32px; padding: 0 10px; border-radius: 7px; font-weight: 700; text-decoration: none; color: var(--accent); background: var(--accent-tint); white-space: nowrap; }
.top-nav a:hover { filter: brightness(.96); }
.top-nav { grid-area: nav; display: flex; flex-wrap: nowrap; gap: 6px; min-width: 0; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.top-nav a { flex: none; }
.nav-create { display: none; }
.brand b { font: 400 20px/1 var(--display); letter-spacing: .03em; white-space: nowrap; }
.search { grid-area: search; width: 100%; min-width: 0; margin: 0; position: relative; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--ink-soft); }
.search input {
  width: 100%; height: 36px; padding: 0 14px 0 36px;
  background: var(--sunken); border: 1px solid transparent; border-radius: 8px;
}
.search input::placeholder { color: var(--ink-soft); }
.search input:focus { background: var(--surface); border-color: var(--accent); outline: none; }
.top-actions { grid-area: account; justify-self: end; display: flex; align-items: center; gap: 8px; min-width: 0; flex: none; }
.me-wrap { position: relative; }
.me-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 2px 4px; border: 0; background: none; border-radius: 8px; white-space: nowrap; }
.me-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 45; width: 210px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-up);
}
.me-info { display: flex; align-items: center; gap: 9px; padding: 7px 8px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.me-info div { display: grid; min-width: 0; font-size: 12px; line-height: 1.4; color: var(--ink-soft); }
.me-info b { font-size: 14px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-menu a, .me-menu button {
  display: block; width: 100%; padding: 7px 8px; border: 0; border-radius: 6px; background: none;
  text-align: left; text-decoration: none; font-size: 14px;
}
.me-menu a:hover, .me-menu button:hover { background: var(--sunken); }
.me-menu .sep { height: 1px; margin: 4px 0; background: var(--line); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 36px; padding: 0 12px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface);
  font-weight: 500; white-space: nowrap; text-decoration: none;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.1); color: var(--on-accent); }
.btn.sm { min-height: 32px; padding: 0 10px; font-size: 13px; }
.btn[aria-pressed="true"] { background: var(--accent-tint); color: var(--accent); border-color: var(--accent); }
@media (min-width: 760px) {
  .top { position: sticky; top: env(safe-area-inset-top, 0px); }
}
@media (min-width: 1100px) {
  .search { max-width: 480px; justify-self: center; }
}
@media (max-width: 759px) {
  body::before { display: none; }
  .top { padding-top: 0; }
  .top-in { width: 100%; min-width: 0; grid-template-columns: minmax(0, 1fr) max-content; }
  .top-actions { min-width: max-content; }
  .top-actions .header-create { display: none; }
  .top-nav .nav-create { display: flex; flex: none; margin: 0; }
  .nav-create button { min-height: 40px; }
  .top-actions > .btn, .me-btn { min-height: 44px; }
  .top-nav a { min-height: 40px; }
  .brand b { overflow: hidden; text-overflow: ellipsis; }
}

/* 进站横幅：几秒后自动收起 */
.banner { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .45s ease; }
.banner.closed { grid-template-rows: 0fr; }
.banner.instant { transition: none; }
.banner-in { min-height: 0; overflow: hidden; }
.mat {
  position: relative; overflow: hidden; color: var(--on-mat);
  background-color: var(--mat);
  background-image:
    linear-gradient(var(--mat-line-strong) 1px, transparent 1px),
    linear-gradient(90deg, var(--mat-line-strong) 1px, transparent 1px),
    linear-gradient(var(--mat-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--mat-line) 1px, transparent 1px);
  background-size: 160px 160px, 160px 160px, 32px 32px, 32px 32px;
  background-position: -1px -1px;
}
.mat::after {
  content: ""; position: absolute; inset: auto 0 0; height: 10px;
  background-image:
    repeating-linear-gradient(90deg, var(--on-mat-soft) 0 1px, transparent 1px 160px),
    repeating-linear-gradient(90deg, var(--on-mat-soft) 0 1px, transparent 1px 32px);
  background-size: 100% 10px, 100% 5px;
  background-position: 0 bottom, 0 bottom;
  background-repeat: no-repeat;
  opacity: .55;
  pointer-events: none;
}
.mat-in { position: relative; display: grid; gap: 20px; padding-block: 14px 20px; align-items: center; }
.mat h1 {
  margin: 0; padding-right: 30px; font: 400 clamp(24px, 3vw, 38px)/1.15 var(--display);
  letter-spacing: .02em; text-wrap: balance;
}
.mat h1 em { font-style: normal; color: var(--marker); }
.tally { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 8px 0 0; padding: 0; font: 400 13px/1.4 var(--mono); color: var(--on-mat-soft); }
.tally div { display: flex; align-items: baseline; gap: 5px; }
.tally dt { order: 2; }
.tally dd { margin: 0; font-size: 18px; font-weight: 500; color: var(--on-mat); font-variant-numeric: tabular-nums; }
.banner-x {
  position: absolute; right: var(--gutter-r); top: 10px; z-index: 4; width: 30px; height: 30px; padding: 0;
  display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .28); color: var(--on-mat);
}
.banner-x:hover { background: rgba(0, 0, 0, .5); }
.banner-x svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; }
.pieces { display: none; position: relative; min-height: 110px; margin-right: 34px; }
.piece {
  position: absolute; display: block; width: min(34%, 156px); aspect-ratio: 16 / 10;
  transform: rotate(var(--r)); transition: transform .25s ease;
}
.piece:hover, .piece:focus-visible { transform: rotate(0deg) scale(1.08); z-index: 3; }
.piece span {
  display: block; height: 100%; overflow: hidden; border-radius: 5px;
  box-shadow: 0 12px 22px -8px rgba(0, 20, 14, .65), 0 0 0 2px rgba(255, 255, 255, .92);
  animation: drift var(--t, 5s) ease-in-out infinite;
  animation-delay: var(--d, 0s);
}
.piece svg { display: block; width: 100%; height: 100%; }
@media (min-width: 720px) {
  .mat-in { grid-template-columns: 1fr minmax(0, 46%); }
  .pieces { display: block; }
}
@keyframes drift {
  0%, 100% { translate: 0 0; rotate: 0deg; }
  50% { translate: var(--dx, 6px) var(--dy, -10px); rotate: var(--tilt, 1.5deg); }
}

/* 首页两栏 */
.layout { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); padding-block: 8px 12px; }
.main-col { min-width: 0; }
.side-col { display: none; }
@media (min-width: 1100px) {
  .layout { grid-template-columns: minmax(0, 1fr) 244px; }
  .side-col {
    display: grid; gap: 14px; align-content: start; position: sticky;
    top: calc(env(safe-area-inset-top, 0px) + var(--head) + 14px); align-self: start;
    max-height: calc(100vh - var(--head) - 70px); overflow-y: auto; scrollbar-width: thin;
  }
}

/* 筛选和排序 */
.toolbar { display: grid; gap: 6px; background: var(--page); padding-bottom: 8px; }
@media (min-width: 1100px) {
  .toolbar { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--head)); z-index: 20; padding-top: 6px; }
}
.forms { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.forms::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 0 10px; font-size: 13px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
  white-space: nowrap; font-weight: 500;
}
.chip small { font: 400 12px var(--mono); color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--mat); border-color: var(--mat); color: var(--on-mat); }
.chip[aria-pressed="true"] small { color: var(--marker); }
.sortbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 0 1 auto; min-width: 0; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  flex: none; min-height: 34px; padding: 0 9px; border: 0; background: none; color: var(--ink-soft);
  font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tabs button:hover { color: var(--ink); }
.tabs button[aria-pressed="true"] { color: var(--ink); font-weight: 700; border-bottom-color: var(--accent); }
.dice {
  display: inline-flex; align-items: center; gap: 5px; min-height: 28px; padding: 0 9px;
  border: 1px dashed var(--line); border-radius: 8px; background: none; color: var(--ink-soft); font-size: 13px; white-space: nowrap;
}
.dice:hover { color: var(--accent); border-color: var(--accent); }
.dice[aria-pressed="true"] { color: var(--accent); border: 1px solid var(--accent); background: var(--accent-tint); }
.selects { display: flex; gap: 6px; margin-left: auto; padding-bottom: 4px; }
.selects select {
  height: 28px; padding: 0 3px; max-width: 130px; font-size: 13px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
}
@media (max-width: 620px) {
  .selects { margin-left: 0; flex: 1 1 100%; }
  .selects label { flex: 1 1 0; min-width: 0; }
  .selects select { width: 100%; max-width: none; }
}
.count { margin: 0; font-size: 12px; color: var(--ink-soft); }

/* 作品卡片 */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 12px; }
.card {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow); overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card.fresh { animation: arrive .32s ease-out backwards; }
@keyframes arrive { from { opacity: .35; transform: translateY(10px); } }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-up); border-color: var(--accent); }
.cover { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--sunken); }
.cover .shot { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.card:hover .cover .shot { transform: scale(1.03); }
.slide > img { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.piece img { display: block; width: 100%; height: 100%; object-fit: cover; }
.badge, .vid {
  position: absolute; z-index: 2; padding: 1px 7px; border-radius: 5px;
  background: rgba(8, 30, 24, .78); color: #f1faf6; font-size: 12px; font-weight: 500; pointer-events: none;
}
.badge { left: 8px; top: 8px; }
.vid { left: 8px; bottom: 8px; display: flex; align-items: center; gap: 4px; }
.vid svg { width: 10px; height: 10px; }
.card-body { position: relative; display: flex; flex-direction: column; flex: 1; gap: 3px; padding: 8px 10px 6px; }
.card h3 { margin: 0; font-size: 14px; font-weight: 700; line-height: 1.35; }
.card h3 a { text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card h3 a:focus-visible { outline: none; }
.card-body:has(h3 a:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }
.one {
  margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.5;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  min-height: 3em;
}
.tech { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; font-size: 12px; color: var(--ink-soft); }
.tech > span { display: inline-flex; align-items: center; gap: 5px; }
.dot { flex: none; width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.flag { padding: 0 6px; border-radius: 4px; background: var(--accent-tint); color: var(--accent); font-weight: 500; }
.foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 3px; }
.who {
  position: relative; z-index: 2; display: flex; align-items: center; gap: 7px; min-width: 0;
  font-size: 13px; font-weight: 500; text-decoration: none;
}
.who:hover b { color: var(--accent); text-decoration: underline; }
.who b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.who-text small { overflow: hidden; color: var(--ink-soft); font-size: 11px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.card .foot .who { flex: 1 1 0; }
.follow-mini { position: relative; z-index: 2; display: inline-flex; flex: none; align-items: center; min-height: 28px; padding: 0 10px; border: 1px solid var(--accent); border-radius: 999px; background: var(--accent-tint); color: var(--accent); font-size: 12px; font-weight: 600; text-decoration: none; white-space: nowrap; cursor: pointer; }
.follow-mini:hover { filter: brightness(.96); }
.follow-mini[aria-pressed="true"] { border-color: var(--line); background: var(--surface); color: var(--ink-soft); font-weight: 500; }
.follow-mini:disabled { opacity: .6; cursor: wait; }
@media (max-width: 759px) { .follow-mini { min-height: 36px; padding-inline: 14px; } }
.stats { position: relative; z-index: 2; flex: none; display: flex; align-items: center; gap: 8px; color: var(--ink-soft); font: 400 12px var(--mono); font-variant-numeric: tabular-nums; }
.stat { display: inline-flex; align-items: center; gap: 3px; }
.stat svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.like {
  display: inline-flex; align-items: center; gap: 3px; min-height: 28px; padding: 0 2px;
  border: 0; background: none; color: var(--ink-soft); font: 400 12px var(--mono); font-variant-numeric: tabular-nums;
}
.like svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }
button.like:hover { color: var(--accent); }
.like[aria-pressed="true"] { color: var(--accent); font-weight: 700; }
.like[aria-pressed="true"] svg { fill: currentColor; fill-opacity: .25; animation: pop .3s ease-out; }
@keyframes pop { 40% { transform: scale(1.35); } }@keyframes pulse { to { opacity: .55; } }
.more { display: flex; justify-content: center; padding-block: 20px 6px; min-height: 40px; color: var(--ink-soft); font-size: 14px; }
.empty { grid-column: 1 / -1; padding: 40px 16px; text-align: center; background: var(--surface); border: 1px dashed var(--line); border-radius: 10px; }
.empty b { display: block; font-size: 17px; margin-bottom: 4px; }
.empty p { margin: 0 0 14px; color: var(--ink-soft); }

/* 详情页图片轮播 */
.car { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--sunken); border-radius: 10px; }
.car .slides {
  display: flex; height: 100%; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain;
}
.car .slides::-webkit-scrollbar { display: none; }
.car.dragging .slides { scroll-snap-type: none; cursor: grabbing; user-select: none; }
.slide { flex: 0 0 100%; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; display: block; position: relative; }
.slide > svg { display: block; width: 100%; height: 100%; pointer-events: none; }
@media (hover: hover) { .car .slides { cursor: grab; } }
.car-btn {
  position: absolute; top: 50%; translate: 0 -50%; z-index: 3; width: 38px; height: 38px; padding: 0;
  display: grid; place-items: center; border: 0; border-radius: 50%;
  background: rgba(8, 30, 24, .72); color: #f1faf6;
}
.car-btn:hover { background: rgba(8, 30, 24, .92); }
.car-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.car-btn.prev { left: 8px; }
.car-btn.next { right: 8px; }
.dots { position: absolute; left: 50%; bottom: 8px; translate: -50% 0; z-index: 2; display: flex; gap: 5px; padding: 3px 6px; border-radius: 9px; background: rgba(8, 30, 24, .5); pointer-events: none; }
.dots i { display: block; width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .5); transition: background .15s, scale .15s; }
.dots i.on { background: #fff; scale: 1.25; }
/* 侧栏 */
.side-box { padding: 10px 11px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.side-box h2 { margin: 0 0 8px; font-size: 14px; }
.side-list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.side-list a { display: flex; align-items: center; gap: 9px; padding: 5px 4px; border-radius: 6px; text-decoration: none; min-width: 0; }
.side-list a:hover { background: var(--sunken); }
.mini img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mini { flex: none; width: 50px; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 4px; }
.mini svg { display: block; width: 100%; height: 100%; }
.side-t { min-width: 0; display: grid; font-size: 13px; line-height: 1.4; }
.side-t b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-t span { font-size: 12px; color: var(--ink-soft); }
.arch { display: grid; gap: 2px; }
.arch button { display: flex; justify-content: space-between; gap: 8px; width: 100%; padding: 5px 4px; border: 0; border-radius: 6px; background: none; font-size: 13px; text-align: left; }
.arch button:hover { background: var(--sunken); }
.arch small { flex: none; font: 400 12px var(--mono); color: var(--ink-soft); }

/* 详情页 */
.page-view { max-width: none; padding-block: 0 28px; }
.backbar {
  position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--head)); z-index: 14;
  display: flex; align-items: center; gap: 10px; min-width: 0; padding-block: 7px; background: var(--page);
}
.backbar b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--ink-soft); font-weight: 500; }
.back {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: 8px;
  background: var(--accent); color: var(--on-accent); font-weight: 700; text-decoration: none;
}
.back:hover { filter: brightness(1.1); }.p-grid { display: flex; flex-direction: column; gap: 16px; }.intro { order: 3; }.comments { order: 7; }
@media (min-width: 960px) {
  .p-grid { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 14px 20px; }}.ver { display: grid; gap: 1px; padding-left: 10px; border-left: 2px solid var(--line); font-size: 13px; }
.ver.latest { border-left-color: var(--accent); }
.ver.wait { border-left-color: var(--warn); }
.ver-t { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; }
.ver-t b { font: 500 13px var(--mono); }
.ver-t time { font: 400 12px var(--mono); color: var(--ink-soft); }
.ver p { margin: 0; color: var(--ink-soft); font-size: 12px; }
.ver-list { display: grid; gap: 8px; margin: 8px 0 0; }
.panel details summary { cursor: pointer; font-size: 13px; color: var(--accent); font-weight: 500; }
.panel { display: grid; gap: 9px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }.panel h2 { margin: 0; font-size: 14px; }
.like-big { display: flex; justify-content: center; font-size: 13px; }
.meta { display: grid; gap: 5px; margin: 0; font-size: 13px; }
.meta div { display: flex; justify-content: space-between; gap: 12px; }
.meta dt { flex: none; color: var(--ink-soft); }
.meta dd { margin: 0; text-align: right; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.d-tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 0; padding: 0; list-style: none; font: 400 12px var(--mono); }
.d-tags li { padding: 2px 7px; background: var(--sunken); border-radius: 5px; }
.intro { padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.intro h2 { margin: 0 0 4px; font-size: 15px; }
.intro p { margin: 0; max-width: 65ch; }.review { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin-bottom: 12px; padding: 9px 13px; background: var(--accent-tint); border-radius: 8px; }
.review b { flex: none; padding: 1px 8px; border-radius: 5px; background: var(--accent); color: var(--on-accent); font-size: 12px; }
.review p { flex: 1 1 260px; margin: 0; }
.review span { flex: none; font-size: 12px; color: var(--ink-soft); }
.related { margin-top: 28px; display: grid; gap: 10px; }
.related h2 { margin: 0; font-size: 15px; }

/* 评论区 */
.comments { padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; scroll-margin-top: calc(var(--head) + 12px); }
.c-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 12px; }
.c-bar h2 { margin: 0; font-size: 15px; }
.c-sort { display: flex; gap: 2px; }
.c-sort button { min-height: 28px; padding: 0 8px; border: 0; border-radius: 6px; background: none; color: var(--ink-soft); font-size: 13px; }
.c-sort button[aria-pressed="true"] { background: var(--sunken); color: var(--ink); font-weight: 500; }
.c-bar .btn { margin-left: auto; }
.c-closed { margin-bottom: 12px; padding: 9px 12px; border-radius: 8px; background: var(--warn-tint); color: var(--warn); font-size: 14px; }
.c-form { display: flex; gap: 8px; margin-bottom: 14px; }
.c-form .ava { margin-top: 4px; }
.c-form { flex-wrap: wrap; }
.c-fb { flex: 1 0 100%; display: flex; align-items: center; gap: 6px; padding-left: 40px; font-size: 13px; color: var(--ink-soft); }
.c-form input#c-feedback { flex: none; height: auto; }
.c-form input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.c-form input:focus { outline: none; border-color: var(--accent); }
.login-tip { margin-bottom: 14px; padding: 11px 13px; background: var(--sunken); border-radius: 8px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; }
.c-list { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.c-row { display: flex; gap: 10px; min-width: 0; }
.c-main { flex: 1; min-width: 0; }
.c-who { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 7px; font-size: 13px; color: var(--ink-soft); }
.c-who b { color: var(--ink); font-weight: 500; }
.c-who time { font-size: 12px; }
.tag { padding: 0 5px; border-radius: 4px; font-size: 11px; font-weight: 700; line-height: 1.6; background: var(--sunken); color: var(--ink-soft); }
.tag.pin { background: var(--marker); color: var(--on-marker); }
.tag.author { background: var(--accent-tint); color: var(--accent); }
.tag.teacher { background: var(--accent); color: var(--on-accent); }
.tag.report { background: var(--bad-tint); color: var(--bad); }
.c-text { margin: 2px 0 0; overflow-wrap: anywhere; }
.c-text span { color: var(--ink-soft); }
.c-praise { display: inline-block; margin-top: 3px; padding: 0 7px; border-radius: 4px; background: var(--warn-tint); color: var(--warn); font-size: 12px; font-weight: 500; }
.c-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; margin-top: 2px; font-size: 13px; color: var(--ink-soft); }
.c-acts button { display: inline-flex; align-items: center; gap: 3px; min-height: 28px; padding: 0 2px; border: 0; background: none; color: var(--ink-soft); font-size: 13px; }
.c-acts button:hover { color: var(--accent); }
.c-acts .danger:hover { color: var(--bad); }
.c-acts svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.c-acts [aria-pressed="true"] { color: var(--accent); font-weight: 700; }
.c-acts [aria-pressed="true"] svg { fill: currentColor; fill-opacity: .25; }
.c-acts .down[aria-pressed="true"] { color: var(--bad); }
.c-acts .confirm { color: var(--bad); font-weight: 700; }
.c-count { display: inline-flex; align-items: center; gap: 3px; }
.c-gone, .c-fold { padding: 6px 10px; border-radius: 6px; background: var(--sunken); color: var(--ink-soft); font-size: 13px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.c-fold button, .c-gone button { padding: 0 2px; border: 0; background: none; color: var(--accent); font-size: 13px; font-weight: 500; }
.c-replies { display: grid; gap: 10px; margin: 8px 0 0; padding: 0; list-style: none; }
.c-reply-form { margin: 8px 0 0; }
.rules { margin: 14px 0 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-soft); }

.tag.fb { background: var(--warn-tint); color: var(--warn); }
.tag.done { background: var(--accent-tint); color: var(--accent); }
.c-to { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; }
.c-to:hover { text-decoration: underline; }
.c-more { justify-self: start; padding: 2px 0; border: 0; background: none; color: var(--accent); font-size: 13px; font-weight: 500; }
.rules .link { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; text-decoration: underline; }
.flash { animation: flash 1.6s ease-out; border-radius: 6px; }
@keyframes flash { 0%, 50% { background: var(--warn-tint); } 100% { background: transparent; } }

/* 作者页 */
.a-head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; padding: 18px; margin: 6px 0 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.a-head h1 { margin: 0; font-size: 26px; line-height: 1.2; }
.a-head h1:focus { outline: none; }
.a-sub { margin: 2px 0 0; color: var(--ink-soft); font-size: 14px; }
.a-stats { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 8px 0 0; font-size: 13px; color: var(--ink-soft); }
.a-stats b { color: var(--ink); font: 500 16px var(--mono); margin-right: 3px; }
.a-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }

/* 个人中心 */
.me-grid { display: grid; gap: 14px; }
.me-nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.me-nav a { flex: none; padding: 7px 12px; border-radius: 8px; text-decoration: none; font-weight: 500; color: var(--ink-soft); }
.me-nav a:hover { background: var(--sunken); color: var(--ink); }
.me-nav a[aria-current="page"] { background: var(--accent-tint); color: var(--accent); }
@media (min-width: 760px) {
  .me-grid { grid-template-columns: 170px minmax(0, 1fr); gap: 22px; align-items: start; }
  .me-nav { flex-direction: column; position: sticky; top: calc(var(--head) + 14px); }
}
.me-title { margin: 0 0 12px; font-size: 22px; line-height: 1.25; }
.me-title:focus { outline: none; }
.me-stack { display: grid; gap: 14px; }
.me-stack .panel { padding: 16px 18px; gap: 12px; }
.me-stack .panel h2 { font-size: 15px; }
.field { display: grid; gap: 3px; max-width: 420px; font-size: 14px; }
.field input { height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.field input:focus { outline: none; border-color: var(--accent); }
.field input[readonly] { background: var(--sunken); color: var(--ink-soft); }
.field small { font-size: 12px; color: var(--ink-soft); }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ava-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.m-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.m-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.m-row .mini { width: 84px; }
.m-t { flex: 1 1 200px; min-width: 0; }
.m-t b { display: block; font-weight: 700; }
.m-t a { text-decoration: none; }
.m-t a:hover { color: var(--accent); }
.m-t p { margin: 1px 0 0; font-size: 13px; color: var(--ink-soft); }
.m-t p.bad { color: var(--bad); }
.pill { display: inline-block; padding: 0 7px; border-radius: 4px; font-size: 12px; font-weight: 700; margin-left: 6px; vertical-align: 1px; }
.pill.ok { background: var(--accent-tint); color: var(--accent); }
.pill.wait { background: var(--warn-tint); color: var(--warn); }
.pill.no { background: var(--bad-tint); color: var(--bad); }
.pill.draft { background: var(--sunken); color: var(--ink-soft); }
.m-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.me-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.me-head .me-title { margin: 0; }

/* 换头像 */
dialog {
  width: min(420px, calc(100% - 32px)); padding: 18px; border: 0; border-radius: 12px;
  background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .55);
}
dialog::backdrop { background: rgba(6, 30, 24, .6); }
dialog h2 { margin: 0 0 4px; font-size: 18px; }
dialog p { margin: 0 0 12px; font-size: 14px; color: var(--ink-soft); }
.av-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; max-height: 300px; overflow-y: auto; padding: 2px; margin-bottom: 14px; }
.av-grid button { padding: 0; border: 2px solid transparent; border-radius: 50%; background: none; aspect-ratio: 1; overflow: hidden; }
.av-grid button:hover { border-color: var(--line); }
.av-grid button[aria-pressed="true"] { border-color: var(--accent); }
.av-grid svg { display: block; width: 100%; height: 100%; border-radius: 50%; }
.q-body { display: grid; gap: 8px; padding: 12px 16px 14px; }
.q-body h2 { margin: 0; font-size: 18px; line-height: 1.3; }
.q-text { margin: 0; color: var(--ink-soft); }
.q-media { position: relative; overflow: hidden; }
.bubbles { position: absolute; inset: 0; z-index: 2; overflow: hidden; pointer-events: none; }
.bubble {
  position: absolute; right: 8px; bottom: 44px; display: flex; align-items: center; gap: 4px; width: 240px; max-width: 72%; padding: 2px 9px 2px 3px; border-radius: 12px;
  background: rgba(8, 30, 24, .46); color: #fff; font-size: 12px; line-height: 1.5; white-space: nowrap; overflow: hidden;
  animation: bubble-up 2s linear forwards;
}
.bubble .ava { width: 18px; height: 18px; box-shadow: none; }
.bubble span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@keyframes bubble-up {
  0% { opacity: 0; transform: translateY(0); }
  12% { opacity: 1; }
  65% { opacity: 1; }
  100% { opacity: 0; transform: translateY(var(--rise, -150px)); }
}

/* 提交作品和图片裁剪 */
.sub-grid { display: grid; gap: 14px; }
.sub-main { display: grid; gap: 12px; min-width: 0; }
.sub-side { min-width: 0; }
@media (min-width: 900px) {
  .sub-grid { grid-template-columns: minmax(0, 1fr) 262px; align-items: start; }
  .sub-side { position: sticky; top: calc(var(--head) + 52px); }
}
.sub-panel { display: grid; gap: 10px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.sub-panel h2 { margin: 0; font-size: 15px; }
.sub-panel .hint { margin: -6px 0 0; font-size: 12px; color: var(--ink-soft); }
.sub-panel .field { max-width: none; }
.field textarea { min-height: 76px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); resize: vertical; }
.field select { height: 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 0 6px; }
.field-row { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.picks { display: flex; flex-wrap: wrap; gap: 5px; }
.picks label { display: inline-flex; }
.picks input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.picks span { padding: 4px 10px; border: 1px solid var(--line); border-radius: 7px; cursor: pointer; font-size: 13px; }
.picks input:checked + span { background: var(--mat); border-color: var(--mat); color: var(--on-mat); }
.picks input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.img-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.img-item { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); cursor: grab; }
.img-item.over { outline: 2px solid var(--accent); }
.img-pic { position: relative; aspect-ratio: 16 / 10; background: var(--sunken); }
.img-pic img { display: block; width: 100%; height: 100%; pointer-events: none; }
.img-tag { position: absolute; left: 5px; top: 5px; padding: 0 6px; border-radius: 4px; background: rgba(8, 30, 24, .78); color: #f1faf6; font-size: 11px; }
.img-tag.first { background: var(--marker); color: var(--on-marker); font-weight: 700; }
.img-acts { display: flex; gap: 2px; padding: 3px; }
.img-acts button { flex: 1; min-height: 28px; padding: 0 2px; border: 0; border-radius: 5px; background: none; font-size: 12px; }
.img-acts button:hover:not(:disabled) { background: var(--sunken); }
.img-acts button:disabled { opacity: .35; cursor: default; }
.img-acts .crop { color: var(--accent); font-weight: 700; }
.up-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-soft); }
.check { display: flex; gap: 7px; align-items: flex-start; font-size: 13px; }
.check input { margin-top: 3px; }
.notice { padding: 8px 10px; border-radius: 7px; background: var(--warn-tint); color: var(--warn); font-size: 12px; }
.errors { padding: 8px 12px; border-radius: 8px; background: var(--bad-tint); color: var(--bad); font-size: 13px; }
.errors ul { margin: 2px 0 0; padding-left: 1.2em; }
.prev-label { margin: 0 0 6px; font-size: 13px; font-weight: 700; }
.prev-card { pointer-events: none; }
.prev-empty { display: grid; place-items: center; height: 100%; color: var(--ink-soft); font-size: 13px; }
.prev-card .cover img, .prev-card .cover canvas { display: block; width: 100%; height: 100%; }
#crop-dialog { width: min(820px, calc(100% - 24px)); max-height: calc(100vh - 24px); padding: 14px; overflow-y: auto; user-select: none; }
.crop-grid { display: grid; gap: 12px; }
@media (min-width: 720px) { .crop-grid { grid-template-columns: minmax(0, 1fr) 220px; } }
#crop-canvas { display: block; max-width: 100%; max-height: min(62dvh, 560px); margin: 0 auto; border-radius: 6px; background: #14201c; cursor: crosshair; touch-action: none; }
.crop-ctl { display: grid; gap: 9px; margin-top: 8px; }
.crop-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; }
.crop-size { margin-left: auto; color: var(--ink-soft); font-size: 12px; font-variant-numeric: tabular-nums; }
.mode-seg { display: inline-flex; padding: 2px; background: var(--sunken); border-radius: 8px; }
.mode-seg button { min-height: 28px; padding: 0 9px; border: 0; border-radius: 6px; background: none; font-size: 13px; color: var(--ink-soft); }
.mode-seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); font-weight: 700; }

/* 红薯教师仓库 */.lab-top { padding-top: 8px; }
.lab-intro { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.lab-intro-actions { justify-content: flex-end; }
.lab-mobile-tabs { display: none; }
@media (max-width: 759px) {
  .lab-mobile-tabs { display: flex; gap: 8px; margin: 4px 0 12px; }
  .lab-mobile-tabs button { flex: 1; min-height: 42px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink-soft); }
  .lab-mobile-tabs button[aria-pressed="true"] { background: var(--accent-tint); color: var(--accent); border-color: var(--accent); font-weight: 700; }
  .lab-columns[data-lab-mode="time"] .lab-popular, .lab-columns[data-lab-mode="hot"] #lab-list { display: none; }
}
.lab-intro h1 { margin: 0; font-size: 20px; }
.lab-intro h1:focus { outline: none; }
.lab-intro p { margin: 2px 0 0; font-size: 13px; color: var(--ink-soft); }
.lab-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 320px); gap: 24px; align-items: start; min-width: 0; }
.lab-columns > * { min-width: 0; }
.lab-section-title { margin: 0 0 10px; font-size: 18px; }
.lab-popular-note { margin: 0 0 12px; color: var(--ink-soft); font-size: 12px; line-height: 1.6; }
.lab-popular-list { display: grid; gap: 8px; padding: 0; margin: 0; list-style: none; }
.lab-popular-card { display: flex; gap: 9px; align-items: center; padding: 9px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; color: inherit; text-decoration: none; }
.lab-popular-card:hover { border-color: var(--accent); }
.lab-popular-rank { color: var(--ink-soft); font-weight: 700; min-width: 14px; text-align: center; }
.lab-popular-card img { width: 64px; height: 45px; flex: none; border-radius: 6px; object-fit: cover; }
.lab-popular-text { display: grid; gap: 4px; min-width: 0; }
.lab-popular-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lab-popular-text small { color: var(--ink-soft); font-size: 12px; }
@media (min-width: 1101px) {
  .lab-popular { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--head) + 16px); max-height: calc(100vh - env(safe-area-inset-top, 0px) - var(--head) - 32px); max-height: calc(100dvh - env(safe-area-inset-top, 0px) - var(--head) - 32px); overflow-y: auto; scrollbar-width: thin; }
}
@media (max-width: 1100px) { .lab-columns { grid-template-columns: minmax(0, 1fr); } }
.lab-grid { display: grid; gap: 14px; }
.lab-side { display: grid; gap: 10px; align-content: start; min-width: 0; }
.lab-filter { min-width: 0; }
.lab-filter summary { padding: 7px 11px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 500; font-size: 13px; }
.lab-filter[open] summary { margin-bottom: 10px; }
@media (min-width: 900px) {
  .lab-grid { grid-template-columns: 240px minmax(0, 1fr); align-items: start; }
  .lab-filter { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--head) + 10px); }
  .lab-filter summary { display: none; }
}
.lab-box { display: grid; gap: 7px; padding: 10px 11px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.lab-box h2 { margin: 0; font-size: 13px; }
.lab-box input { width: 100%; min-width: 0; height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); font-size: 13px; }
.lab-quick { display: flex; flex-wrap: wrap; gap: 4px; }
.lab-quick button { padding: 3px 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); font-size: 13px; }
.lab-quick button[aria-pressed="true"] { background: var(--mat); border-color: var(--mat); color: var(--on-mat); }
.lab-months { display: grid; gap: 1px; max-height: 200px; overflow-y: auto; }
.lab-months button { display: flex; justify-content: space-between; gap: 8px; padding: 3px 6px; border: 0; border-radius: 6px; background: none; font-size: 13px; text-align: left; }
.lab-months button:hover { background: var(--sunken); }
.lab-months button[aria-pressed="true"] { background: var(--accent-tint); color: var(--accent); font-weight: 700; }
.lab-months small { font: 400 12px var(--mono); color: var(--ink-soft); }
.lab-range { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; font-size: 12px; color: var(--ink-soft); }
.lab-range label { display: grid; gap: 1px; min-width: 0; }
/* 时间轴：左侧一条竖线，月份是节点，每月内是和首页一样的卡片 */
.tl-wrap { position: relative; padding-left: 18px; border-left: 2px solid var(--line); }
.tl-group { padding-bottom: 14px; }
.tl-group:last-child { padding-bottom: 0; }
.tl-month { position: relative; display: flex; align-items: baseline; gap: 8px; margin: 0 0 8px; font-size: 15px; font-weight: 700; }
.tl-month::before { content: ""; position: absolute; left: -24.500px; top: 6px; width: 11px; height: 11px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--page); }
.tl-month small { font: 400 12px var(--mono); color: var(--ink-soft); }
.tl-group .grid { margin: 0; padding: 0; list-style: none; }
.idea-date { position: absolute; left: 8px; top: 8px; z-index: 2; padding: 1px 7px; border-radius: 5px; background: rgba(8, 30, 24, .78); color: #f1faf6; font: 500 12px var(--mono); pointer-events: none; }
.idea-open { display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.idea-cover { display: block; width: 100%; padding: 0; border: 0; cursor: pointer; }
.card h3 .idea-open::after { content: ""; position: absolute; inset: 0; }
.card h3 .idea-open:focus-visible { outline: none; }
.card-body:has(.idea-open:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }
.idea-tags { min-height: 20px; overflow: hidden; }
.idea-foot .acts { position: relative; z-index: 2; }
.idea-foot .acts button { padding: 0 4px; }
.idea-view { display: grid; gap: 8px; }.idea-view h2 { margin: 0; }
.idea-view p { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.idea-meta { font: 400 12px var(--mono); color: var(--ink-soft); }

/* 教师后台 */
.page-view.wide { max-width: none; }
.muted { margin: 0; font-size: 13px; color: var(--ink-soft); }
.adm-main { min-width: 0; display: grid; gap: 12px; align-content: start; }
.adm-main .me-title { margin: 0; }
.adm-main .me-head { margin: 0; }
.nav-n { margin-left: 6px; padding: 0 6px; border-radius: 9px; background: var(--bad-tint); color: var(--bad); font: 500 12px var(--mono); }
.tiles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.tile { display: grid; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; text-decoration: none; }
.tile:hover { border-color: var(--accent); }
.tile b { font: 500 24px/1.2 var(--mono); font-variant-numeric: tabular-nums; }
.tile span { font-size: 13px; color: var(--ink-soft); }
.tile.warn { background: var(--warn-tint); border-color: transparent; }
.tile.warn b, .tile.warn span { color: var(--warn); }
.adm-2 { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: start; }
.adm-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.adm-list li { display: flex; justify-content: space-between; gap: 10px; }
.adm-list span { flex: none; color: var(--ink-soft); }
.adm-tabs { flex-wrap: wrap; }
.adm-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.adm-bar input, .adm-bar select { height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 13px; }
.adm-bar input { width: 240px; max-width: 100%; }
.tbl { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.tbl table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { padding: 7px 10px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl th { font-weight: 500; color: var(--ink-soft); white-space: nowrap; background: var(--sunken); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .num { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl a { color: var(--accent); text-decoration: none; font-weight: 500; }
.tbl a:hover { text-decoration: underline; }
.acts { white-space: nowrap; }
.acts button { padding: 2px 5px; border: 0; background: none; color: var(--accent); font-size: 13px; }
.acts button:hover { text-decoration: underline; }
.btn.danger { color: var(--bad); border-color: var(--bad); }
.btn.danger:hover { background: var(--bad-tint); color: var(--bad); border-color: var(--bad); }
.btn[disabled] { opacity: .5; cursor: default; }
.rv-grid { display: grid; gap: 12px; align-items: start; }
@media (min-width: 900px) { .rv-grid { grid-template-columns: 270px minmax(0, 1fr); } }
.rv-queue { display: grid; gap: 4px; margin: 0; padding: 4px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; max-height: calc(100vh - 170px); overflow-y: auto; }
.rv-queue button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 5px; border: 0; border-radius: 6px; background: none; text-align: left; }
.rv-queue button:hover { background: var(--sunken); }
.rv-queue button[aria-pressed="true"] { background: var(--accent-tint); }
.rv-detail { gap: 10px; align-content: start; }
.rv-pics { display: grid; gap: 6px; max-width: 460px; }
.rv-pics.many { grid-template-columns: repeat(2, 1fr); max-width: 560px; }
.rv-pics svg, .rv-pics img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 6px; }
.rv-detail .rv-title { margin: 0; font-size: 18px; }
.rv-one { margin: 0; font-weight: 500; }
.rv-body { margin: 0; max-width: 65ch; }
.rv-meta { max-width: 560px; }
.rv-meta dd { text-align: left; }
.rv-meta div { justify-content: flex-start; }
.rv-meta dt { width: 62px; }
.rv-check { display: grid; gap: 3px; padding: 9px 11px; background: var(--sunken); border-radius: 8px; font-size: 13px; }
.rv-detail .field { max-width: none; }
.rv-detail textarea { min-height: 60px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); resize: vertical; }
.rv-tips { gap: 5px; }
.dict { display: flex; flex-wrap: wrap; gap: 5px; }.dict-form, .fb-form { display: flex; gap: 6px; flex-wrap: wrap; }
.dict-form input, .fb-form input { flex: 1; min-width: 120px; height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.pw-show { padding: 8px 12px; border-radius: 8px; background: var(--sunken); color: var(--ink); font: 500 18px var(--mono); letter-spacing: .05em; text-align: center; }.f-top { display: flex; justify-content: space-between; gap: 8px; }
.sub-saved { font-size: 12px; color: var(--ink-soft); }
.sub-tip { margin: -6px 0 10px; font-size: 13px; color: var(--ink-soft); }
.state-ok { color: var(--accent); }
.state-bad { color: var(--bad); }

/* 原型工具条 */.toast {
  position: fixed; left: 50%; bottom: calc(66px + env(safe-area-inset-bottom, 0px)); z-index: 60;
  transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); padding: 9px 14px; border-radius: 8px;
  background: var(--ink); color: var(--page); font-size: 14px; text-align: center;
  box-shadow: var(--shadow-up);
}
footer { padding-block: 18px; color: var(--ink-soft); font-size: 13px; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* 正式站点相对原型的调整 */
body { padding-bottom: 0; }
.ava-letter { display: grid; place-items: center; background: var(--accent-tint); color: var(--accent); font-size: 12px; font-weight: 700; }
.ava-md.ava-letter { font-size: 14px; }
.ava-xl.ava-letter { font-size: 32px; }
.layout.one-col { grid-template-columns: minmax(0, 1fr); }
.chip { text-decoration: none; }
.chip[aria-current="true"] { background: var(--mat); border-color: var(--mat); color: var(--on-mat); }
.chip[aria-current="true"] small { color: var(--marker); }
.tabs a { flex: none; display: inline-flex; align-items: center; min-height: 34px; padding: 0 9px; color: var(--ink-soft); font-weight: 500; text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a[aria-current="true"] { color: var(--ink); font-weight: 700; border-bottom-color: var(--accent); }
.dice { text-decoration: none; }
.dice[aria-current="true"] { color: var(--accent); border: 1px solid var(--accent); background: var(--accent-tint); }
.piece-1 { left: 2%; top: 14%; --r: -6deg; --t: 5s; }
.piece-2 { left: 25%; top: 26%; --r: 4deg; --t: 6s; --d: -2s; --dx: -6px; }
.piece-3 { left: 48%; top: 8%; --r: 3deg; --t: 4.6s; --d: -3s; }
.piece-4 { left: 66%; top: 26%; --r: -4deg; --t: 5.5s; --d: -1s; --dx: -5px; }
.piece span img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cover { text-decoration: none; }
.page-view.narrow { max-width: 460px; }
.page-view.wide { max-width: none; }
.auth-panel { margin-top: 16px; padding: 18px; }
.auth-panel .me-title { margin: 0; }
.login-screen { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; padding-bottom: 0; }
.login-screen > .top, .login-screen > footer { flex: none; }
.login-screen .login-page { flex: 1; display: grid; align-items: center; padding-block: 24px; }
.login-screen .auth-panel { width: 100%; margin: 0; padding: 26px; }

/* 手机两行放不下一排；平板和电脑：品牌、导航、账号同一行。 */
.top-in { grid-template-areas: "brand account" "nav nav"; }
@media (min-width: 760px) {
  .top-in { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "brand nav account"; gap: 20px; }
  .top-nav { gap: 4px; }
  .top-nav a { min-height: 40px; padding: 0 12px; }
  .top-actions > .btn, .top-actions .header-create .btn, .me-btn { min-height: 40px; }
}
.wall-search { display: flex; flex: 1 1 220px; gap: 6px; min-width: 0; max-width: 360px; margin: 0; padding-bottom: 4px; }
.wall-search input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; background: var(--surface); font-size: 13px; }
.wall-search .btn { min-height: 34px; font-size: 13px; }
.sortbar .selects { margin-left: 0; }
.card .one { display: block; overflow: visible; -webkit-line-clamp: unset; }
.card .stats { flex-wrap: wrap; gap: 8px; }

.post-media .slide img { cursor: zoom-in; }
.post-detail .post-meta { order: 6; }
.post-detail .post-resources { order: 7; }
.post-meta-tags a { color: var(--accent); text-decoration: none; }
.post-meta-tags a:hover { text-decoration: underline; }
.post-reading-body { display: block; }
.post-detail .post-comments { margin-top: 0; min-width: 0; }
.post-course-related { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.post-course-related h2 { margin: 0 0 12px; font-size: 16px; }
.post-related-item { display: flex; gap: 12px; align-items: center; padding: 10px 0; color: var(--ink); text-decoration: none; }
.post-related-item + .post-related-item { border-top: 1px solid var(--line); }
.post-related-item img { flex: none; width: 90px; aspect-ratio: 16 / 10; object-fit: contain; border-radius: 7px; background: var(--sunken); }
.post-related-item span { display: grid; gap: 5px; min-width: 0; }
.post-related-item b { font-size: 14px; overflow-wrap: anywhere; }
.post-related-item small { color: var(--ink-soft); }
.btn:disabled { background: var(--sunken); border-color: var(--line); color: var(--ink-soft); opacity: .55; cursor: not-allowed; }
.demo-resource { position: relative; }
.demo-resource > summary { list-style: none; cursor: pointer; }
.demo-resource > summary::-webkit-details-marker { display: none; }
.qr-pop { position: absolute; z-index: 24; top: calc(100% + 4px); left: 0; width: 240px; max-width: 70vw; padding: 12px; display: grid; gap: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-up); }
.qr-pop img { display: block; width: 100%; height: auto; }
.demo-qr-editor { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.demo-qr-editor img { width: 100px; height: 100px; object-fit: contain; }
.demo-qr-editor small, #demo-qr-status { color: var(--ink-soft); font-size: 12px; }
#image-viewer { inset: 0; width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 54px 56px; border: 0; border-radius: 0; background: rgba(8, 16, 14, .97); color: white; overflow: hidden; }
#image-viewer[open] { display: grid; place-items: center; }
#image-viewer img { display: block; max-width: 100%; max-height: calc(100dvh - 108px); width: auto; height: auto; object-fit: contain; }
#image-viewer button { position: absolute; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #ffffff55; border-radius: 50%; background: #ffffff18; color: #fff; font-size: 30px; }
.viewer-close { top: 14px; right: 16px; }
.viewer-prev { left: 8px; top: calc(50% - 22px); }
.viewer-next { right: 8px; top: calc(50% - 22px); }
.viewer-counter { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); }
.field input:not([type=radio]):not([type=checkbox]), .field select { min-width: 0; width: 100%; }
.me-menu form { margin: 0; }
.top-actions form { margin: 0; display: flex; }
.c-sort a { display: inline-flex; align-items: center; min-height: 28px; padding: 0 8px; border-radius: 6px; color: var(--ink-soft); font-size: 13px; text-decoration: none; }
.c-sort a[aria-current="true"] { background: var(--sunken); color: var(--ink); font-weight: 500; }
.rv-queue a { display: flex; align-items: center; gap: 8px; padding: 5px; border-radius: 6px; text-decoration: none; }
.rv-queue a:hover { background: var(--sunken); }
.rv-queue a[aria-current="true"] { background: var(--accent-tint); }
.rv-check span { display: block; }
.rv-check span::before { content: "· "; }
.rv-meta a { color: var(--accent); overflow-wrap: anywhere; }
.rv-grid > *, .rv-detail > *, .rv-detail form { min-width: 0; }
.rv-tips .btn { min-height: 28px; height: auto; padding: 3px 9px; white-space: normal; text-align: left; font-weight: 400; }
.m-acts form { margin: 0; }
.acts a, .acts form { display: inline; }
.acts a { padding: 2px 5px; color: var(--accent); font-size: 13px; font-weight: 400; }
.tbl .acts a { font-weight: 400; }
.pager { display: flex; align-items: center; justify-content: center; gap: 10px; }
.tbl-tall { max-height: 420px; overflow-y: auto; }
.tbl-tall th { position: sticky; top: 0; }
.dict-rows { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.console .panel > * { min-width: 0; }
.console .adm-2 > * { min-width: 0; }
.review { margin-bottom: 0; }
.ava { background: var(--sunken); }
.avatar-panel { margin-bottom: 12px; }
.avatar-panel .ava-row form { margin: 0; }
.av-grid button { cursor: pointer; }
.lab-quick a { padding: 3px 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); font-size: 13px; text-decoration: none; }
.lab-quick a[aria-current="true"] { background: var(--mat); border-color: var(--mat); color: var(--on-mat); }
.lab-months a { display: flex; justify-content: space-between; gap: 8px; padding: 3px 6px; border-radius: 6px; font-size: 13px; text-decoration: none; }
.lab-months a:hover { background: var(--sunken); }
.lab-months a[aria-current="true"] { background: var(--accent-tint); color: var(--accent); font-weight: 700; }
.lab-side form { margin: 0; }
.tl-group .grid { margin: 0; padding: 0; list-style: none; }
.card .cover svg.shot { display: block; width: 100%; height: 100%; }
.idea-pic { background: var(--sunken); }
.idea-pic img, .idea-pic svg { display: block; width: 100%; height: 100%; object-fit: contain; }
.page-view.narrow-idea { max-width: 680px; }
.idea-page { padding: 0 0 14px; overflow: hidden; }
.idea-page .idea-pic { aspect-ratio: 16 / 10; }
.idea-page .form-actions { padding: 0 16px; }
.idea-text { color: var(--ink); overflow-wrap: anywhere; }
.wide-field { max-width: none; }
.field textarea { width: 100%; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); resize: vertical; }.field .check { display: flex; align-items: center; gap: 6px; }
.crop-round-wrap { display: flex; justify-content: center; padding: 8px 0; }
.crop-round { width: 96px; height: 96px; border-radius: 50%; background: var(--sunken); }
.idea-crop { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 4px; }
.idea-crop img { width: 160px; max-width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 6px; background: var(--sunken); }
.idea-like { position: relative; z-index: 2; margin: 0; }
.idea-like .like { border: 0; background: none; padding: 0; cursor: pointer; }
.idea-page .form-actions { align-items: center; justify-content: space-between; }
.follow-form { margin: 0; display: inline-flex; }
.btn[aria-disabled="true"] { cursor: default; color: var(--ink-soft); }
.c-none { margin: 0; color: var(--ink-soft); }
.c-ask { display: inline-flex; align-items: center; gap: 0 8px; }
.login-tip .btn { text-decoration: none; }
.rules a.link { color: var(--accent); text-decoration: underline; }
.me-settings { max-width: 560px; }
.me-settings .auth-panel { margin-top: 0; margin-bottom: 12px; }
.m-row a.mini { display: block; }
.like-form { margin: 0; }
.stats .like-form { display: inline-flex; position: relative; z-index: 2; }
.like-form .like { cursor: pointer; }
.arch a { display: flex; justify-content: space-between; gap: 8px; padding: 5px 4px; border-radius: 6px; font-size: 13px; text-decoration: none; }
.arch a:hover { background: var(--sunken); }
/* Clear note-style reactions; collection membership is private. */
.bookmark-form { margin: 0; display: inline-flex; }
.bookmark { display: inline-flex; align-items: center; gap: 4px; border: 0; background: transparent; color: var(--ink-soft); font: inherit; cursor: pointer; padding: 4px 2px; white-space: nowrap; }
.bookmark svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.bookmark[aria-pressed="true"] { color: #ad7900; }
.bookmark[aria-pressed="true"] svg { fill: #ffcf55; }
.like-form .like { padding: 4px 2px; min-height: 32px; gap: 4px; }
.like-form button:disabled, .bookmark:disabled { opacity: .6; cursor: wait; }
.card .foot { flex-wrap: wrap; }
.card .stats { width: 100%; justify-content: space-between; gap: 6px; }
.card .stats .like, .card .stats .bookmark { min-height: 32px; }
.project-story h2:not(:first-child) { margin-top: 20px; }
.project-story p { overflow-wrap: anywhere; }

/* A readable project detail: media/story on the left, resources/author on the right. */.work-detail .backbar { position: static; padding-block: 12px 4px; background: transparent; }
.work-detail .back { min-height: 36px; padding: 0; border-radius: 0; background: transparent; color: var(--ink-soft); font-size: 13px; font-weight: 500; }
.work-detail .back svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.work-detail .back:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; filter: none; }.work-detail .p-grid { display: flex; flex-direction: column; gap: 18px; } .challenge-entry .car { aspect-ratio: auto; height: clamp(220px, 34vw, 500px); max-height: 62vh; }.work-detail .slide img, .challenge-entry .slide img { object-fit: contain; }.detail-author { display: flex; gap: 10px; align-items: center; min-width: 0; text-decoration: none; }
.detail-author .ava { width: 44px; height: 44px; }
.detail-author > span:last-child { display: grid; gap: 4px; min-width: 0; }
.detail-author b { overflow-wrap: anywhere; }
.detail-author small { color: var(--ink-soft); font-size: 12px; }
.follow-form { margin: 0; }
.follow-button { min-height: 36px; border-color: var(--accent); color: var(--accent); }
.follow-button:disabled { opacity: .6; cursor: wait; }.work-detail .project-story { padding: 20px; scroll-margin-top: calc(var(--head) + 16px); }
.work-detail .project-story > h2 { font-size: 18px; margin-bottom: 18px; }.story-block + .story-block { padding-top: 18px; margin-top: 18px; border-top: 1px solid var(--line); }
.story-block h3 { margin: 0 0 8px; font-size: 15px; }
.story-block p { line-height: 1.8; max-width: 82ch; }
.reading-progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 90; pointer-events: none; }
.reading-progress > span { display: block; width: 100%; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.back-to-top { position: fixed; right: var(--gutter-r); bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 25; display: grid; place-items: center; width: 44px; height: 44px; padding: 10px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink-soft); box-shadow: 0 2px 8px rgba(12, 50, 40, .1); cursor: pointer; }
.back-to-top[hidden] { display: none; }
.back-to-top svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.back-to-top:hover { background: var(--accent-tint); }
@media (min-width: 1024px) {
  .work-detail .p-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }}

/* Open challenges share the work wall's colors and keep participation visible. */.ch-members { padding-left: 20px; }
.ch-members li { margin-bottom: 12px; }
.ch-field { max-width: 100%; }
.ch-field textarea, .ch-field input, .ch-field select { max-width: 100%; }
.ch-field ul.errorlist { color: var(--heart); }
.ch-invitation { padding: 12px; margin-top: 16px; border: 1px solid var(--line); border-radius: 8px; }
.ch-invitation form { margin-top: 10px; }.ch-evaluation { margin: 18px 0; }

/* 作品帖子：一份正文、一份图片；手机按阅读顺序重排。 */
.post-detail { --post-tools: 52px; max-width: 1240px; margin-inline: auto; }
.post-layout { display: flex; flex-direction: column; gap: 18px; padding: clamp(16px, 2.2vw, 30px); border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.post-text { display: contents; min-width: 0; }
.post-author-row { order: 1; position: relative; display: flex; align-items: center; gap: 10px; min-width: 0; }
.post-author-row .detail-author { flex: 0 1 auto; }
.post-author-row .follow-form, .post-author-row > .follow-button { flex: none; }
.post-author-row .follow-button { min-height: 30px; padding: 4px 10px; border-radius: 999px; white-space: nowrap; font-size: 12px; }
.post-heading { order: 2; }
.post-heading h1 { margin: 0 0 10px; font-size: clamp(24px, 2.4vw, 34px); line-height: 1.3; overflow-wrap: anywhere; }
.post-heading p { margin: 0; color: var(--ink-soft); line-height: 1.8; overflow-wrap: anywhere; }
.post-media { order: 3; min-width: 0; width: 100%; align-self: start; }
.post-media .car { width: 100%; height: clamp(220px, 35vw, 480px); aspect-ratio: auto; border-radius: 10px; }
.post-media .slide img { object-fit: contain; }
.post-review { order: 4; padding: 16px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 9px; background: var(--accent-tint); min-width: 0; }
.post-review-by { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-bottom: 10px; }
.post-review-by small { color: var(--ink-soft); }
.post-review p { margin: 0; line-height: 1.8; overflow-wrap: anywhere; }
.post-review p.is-collapsed { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
.post-review-toggle { margin-top: 8px; padding: 3px 0; border: 0; background: transparent; color: var(--accent); font-size: 13px; }
.post-story { order: 5; min-width: 0; }
.post-detail .post-story .project-story { margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.post-detail .post-story .project-story > h2 { margin: 0 0 14px; font-size: 17px; }
.post-story .story-block h3 { font-size: 14px; }
.post-story p { margin: 0; line-height: 1.9; }
.post-resources { order: 6; display: flex; flex-wrap: wrap; gap: 8px; }
.post-resources:empty { display: none; }
.post-resources .btn { font-size: 13px; }
.post-meta { order: 7; display: grid; gap: 9px; padding-top: 16px; border-top: 1px solid var(--line); }
.post-meta-tags { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--ink-soft); }
.post-meta p { margin: 0; color: var(--ink-soft); font-size: 12px; }
.post-reactions { order: 8; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding-top: 14px; border-top: 1px solid var(--line); }
.post-reactions .like-form, .post-reactions .bookmark-form { flex: none; margin: 0; }
.post-reactions a { font-size: 13px; text-decoration: none; }
.post-more { margin-left: auto; flex: none; }
.post-more > summary { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; list-style: none; cursor: pointer; font-size: 23px; line-height: 1; }
.post-more > summary::-webkit-details-marker { display: none; }
.post-more > summary:hover { background: var(--sunken); }
.post-menu { position: absolute; z-index: 18; right: 0; top: calc(100% + 6px); width: min(250px, 80vw); display: grid; gap: 3px; padding: 7px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-up); }
.post-menu a, .post-menu button { display: block; width: 100%; padding: 10px; border: 0; border-radius: 6px; background: transparent; color: var(--ink); text-align: left; text-decoration: none; font-size: 13px; }
.post-menu a:hover, .post-menu button:hover { background: var(--sunken); }
.post-menu form { margin: 0; }
.post-comments { margin-top: 22px; scroll-margin-top: calc(var(--head) + var(--post-tools) + 16px); }
@media (min-width: 1024px) {
  .post-layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 28px; align-items: start; }
  .post-text { display: flex; flex-direction: column; gap: 16px; grid-column: 1; }
  .post-detail .post-text > * { order: initial; }
  .post-detail .post-media .car { max-height: max(160px, calc(100dvh - var(--head) - var(--post-tools) - var(--media-tools, 110px) - 32px)); }
  .post-media { grid-column: 2; grid-row: 1; position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--head) + var(--post-tools) + 16px); }
}

/* 赏金大厅：赛事平台的海报感，沿用 aishow 的颜色与数据流程。 */
/* 赏金详情：首屏、流程、规则和参赛操作各自成区。 */.challenge-team-panel { padding: clamp(20px, 3vw, 36px); border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.challenge-team-summary, .challenge-login { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.challenge-team-summary h3, .challenge-login h3 { margin: 8px 0 3px; }
.challenge-team-summary p, .challenge-login p { margin: 0; color: var(--ink-soft); }
.challenge-team-workspace { display: grid; gap: 22px; margin-top: 26px; padding-top: 26px; border-top: 1px solid var(--line); }
.challenge-team-workspace h3 { margin-top: 0; }
.challenge-team-actions { display: grid; gap: 18px; }
.challenge-team-actions form { margin: 0; }
.challenge-team-actions .field { max-width: none; }
.challenge-team-actions .btn { justify-self: start; }
.challenge-team-panel .ch-members { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.challenge-team-panel .ch-members li { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; margin: 0; padding: 12px; border-radius: 9px; background: var(--sunken); }
.challenge-team-panel .ch-members small { grid-column: 1 / -1; color: var(--ink-soft); }
.challenge-submit { padding: 18px; border: 1px dashed var(--line); border-radius: 10px; }
.challenge-join { display: grid; gap: 16px; margin: 0; }
.challenge-join h3, .challenge-join p { margin: 0 0 5px; }
@media (min-width: 760px) {  .challenge-team-workspace { grid-template-columns: minmax(220px, .7fr) minmax(0, 1.3fr); }
  .challenge-join { grid-template-columns: minmax(0, 1fr) minmax(240px, .7fr) auto; align-items: end; }
}
@media (max-width: 759px) {  .challenge-team-summary, .challenge-login { align-items: flex-start; flex-direction: column; }
  .challenge-team-summary .btn, .challenge-login .btn { width: 100%; }
}

/* 收敛赛事视觉：统一颜色与卡片基线，避免列表产生跳跃感。 */

/* 统一公共界面：清晰层级、轻量导航、稳定卡片。 */
.brand b { font: 700 18px/1.3 var(--body); letter-spacing: -.025em; }
.mat h1 { font-family: var(--body); font-weight: 650; letter-spacing: -.025em; }
.top .top-nav > a { color: var(--ink-soft); background: transparent; font-weight: 500; }
.top .top-nav > a:hover { color: var(--ink); background: var(--sunken); }
.top .top-nav > a[aria-current="page"] { color: var(--accent); background: var(--accent-tint); font-weight: 650; }.card { border-radius: 14px; box-shadow: none; transition: border-color .15s ease, box-shadow .15s ease; }
.card.fresh { animation: none; }
.card:hover { transform: none; border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); box-shadow: 0 4px 16px rgba(25, 40, 52, .06); }
.panel, .sub-panel, .comments { border-radius: 12px; box-shadow: none; }
.back { background: transparent; color: var(--ink-soft); font-size: 13px; font-weight: 500; }
.back:hover { background: var(--sunken); color: var(--ink); filter: none; }
.post-detail .post-layout { border-radius: 16px; }
.lab-intro { padding-block: 24px; }

/* 2026-11-03 界面重整：紧凑筛选、双栏预览、详情页底部和赏金大厅。 */
.top .top-nav > a { flex: none; }

@media (min-width: 1100px) {
  /* 右侧栏跟随滚动；内容超过一屏时在栏内滚动 */
  .side-col { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--head) + 12px); gap: 10px; max-height: calc(100dvh - var(--head) - 24px); overflow-y: auto; scrollbar-width: thin; }
}

/* 类型、平台、课程、年级都放下拉，排序和筛选合成一行 */
.toolbar { gap: 8px; padding-bottom: 6px; }
.sortbar { padding-bottom: 2px; }
.sortbar .selects { flex-wrap: wrap; margin-left: 4px; padding-bottom: 2px; }
.sortbar .selects select { height: 32px; width: 118px; max-width: 118px; padding-inline: 6px; }
.sortbar .wall-search { flex: 1 1 170px; max-width: none; padding-bottom: 2px; }
.sortbar .wall-search input, .sortbar .wall-search .btn { height: 32px; min-height: 32px; padding-block: 0; }
.toolbar + .count { margin: 2px 0 8px; font-size: 12px; color: var(--ink-soft); }
.card .stats .like, .card .stats .bookmark, .card .stats a { text-decoration: none; }
.arch-more summary { padding: 5px 4px; color: var(--accent); font-size: 12px; cursor: pointer; }
@media (max-width: 1099px) {
  .sortbar .selects { margin-left: 0; flex: 1 1 100%; }
  .sortbar .wall-search { flex: 1 1 100%; max-width: none; }
}
@media (max-width: 519px) {
  .sortbar .selects label { flex: 1 1 calc(50% - 6px); }
  .sortbar .selects select { width: 100%; max-width: none; }
}

.back-to-top { width: 40px; height: 40px; padding: 9px; }
.back-to-top[data-back-to-top] { width: 48px; height: 48px; padding: 5px; display: flex; flex-direction: column; justify-content: center; gap: 0; right: max(16px, env(safe-area-inset-right, 0px)); }
.back-to-top[data-back-to-top][hidden] { display: none; }
.back-to-top[data-back-to-top] svg { width: 19px; height: 19px; }
.back-to-top [data-scroll-percent] { font-size: 10px; font-weight: 700; line-height: 1; }

/* 图片：不自动滑动，点图放大 */
.car .slide { cursor: zoom-in; }
.car.dragging .slide { cursor: grabbing; }
.car-zoom { position: absolute; z-index: 3; top: 10px; left: 10px; padding: 4px 9px; border: 0; border-radius: 7px; background: rgba(8, 30, 24, .62); color: #fff; font-size: 12px; opacity: 0; transition: opacity .12s ease; cursor: pointer; }
.car:hover .car-zoom, .car:focus-within .car-zoom { opacity: 1; }
@media (hover: none) { .car-zoom { top: auto; right: 10px; bottom: 10px; left: auto; padding: 7px 10px; opacity: 1; } }
.car-thumbs { display: flex; gap: 6px; margin-top: 8px; overflow-x: auto; scrollbar-width: thin; }
.car-thumbs button { flex: none; width: 72px; aspect-ratio: 16 / 10; padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 7px; background: var(--sunken); cursor: pointer; opacity: .7; }
.car-thumbs button:hover, .car-thumbs button[aria-pressed="true"] { opacity: 1; }
.car-thumbs button[aria-pressed="true"] { border-color: var(--accent); }
.car-thumbs img { display: block; width: 100%; height: 100%; object-fit: cover; }
.video-play { position: absolute; z-index: 3; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; background: rgba(8, 30, 24, .82); color: #fff; font-size: 13px; font-weight: 600; text-decoration: none; }
.video-play:hover { background: rgba(8, 30, 24, .95); }
.video-play svg { width: 11px; height: 11px; }
.bubble-toggle { position: absolute; z-index: 3; right: 10px; bottom: 10px; padding: 3px 9px; border: 0; border-radius: 999px; background: rgba(8, 30, 24, .55); color: #fff; font-size: 12px; cursor: pointer; }
.bubble-toggle[aria-pressed="false"] { opacity: .65; text-decoration: line-through; }

/* 照片墙 */
#image-viewer { padding: 48px 64px 106px; }
#image-viewer[open] { grid-template: minmax(0, 1fr) / minmax(0, 1fr); }
#image-viewer > img { max-width: 100%; max-height: 100%; }
#image-viewer > button { cursor: pointer; }
#image-viewer > button:hover { background: #ffffff30; }
.viewer-foot { position: absolute; left: 0; right: 0; bottom: 10px; display: grid; justify-items: center; gap: 6px; padding-inline: 12px; }
.viewer-counter { position: static; transform: none; font-size: 13px; }
.viewer-thumbs { display: flex; gap: 6px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
#image-viewer .viewer-thumbs button { position: static; flex: none; width: 76px; height: 48px; padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 6px; background: #ffffff18; opacity: .6; cursor: pointer; }
#image-viewer .viewer-thumbs button:hover { opacity: 1; }
#image-viewer .viewer-thumbs button[aria-pressed="true"] { border-color: #fff; opacity: 1; }
#image-viewer .viewer-thumbs img { width: 100%; height: 100%; max-height: none; object-fit: cover; }
@media (max-width: 759px) { #image-viewer { padding: 48px 8px 100px; } }
#video-viewer { inset: 0; width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 54px clamp(8px, 4vw, 64px) 24px; border: 0; border-radius: 0; background: rgba(8, 16, 14, .96); }
#video-viewer[open] { display: grid; place-items: center; }
#video-viewer .viewer-close { position: absolute; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #ffffff55; border-radius: 50%; background: #ffffff18; color: #fff; font-size: 30px; cursor: pointer; }
.video-frame { width: min(100%, calc((100dvh - 90px) * 16 / 9)); aspect-ratio: 16 / 9; background: #000; }
.video-frame > * { display: block; width: 100%; height: 100%; border: 0; }

/* 预览弹窗（作品和教师创意共用，样式都在这里）
   电脑：左图右文，按内容在合理范围内收紧，长文只滚右栏。手机：上图下文。
   弹窗是铺满定位的，height: auto 会被撑到上限，所以用 fit-content。 */
#quick { width: min(680px, calc(100% - 24px)); height: fit-content; max-height: calc(100dvh - 32px); padding: 0; overflow: hidden; }
#quick[open] { display: flex; flex-direction: column; }
#quick .q-media { flex: none; width: 100%; height: auto; min-height: 0; max-height: 36dvh; aspect-ratio: 16 / 10; }
#quick .car { height: 100%; border-radius: 0; aspect-ratio: auto; }
#quick .car-zoom { top: 48px; left: auto; right: 10px; bottom: auto; }
#quick .q-panel { display: flex; flex: 0 1 auto; flex-direction: column; min-width: 0; min-height: 0; }
#quick .q-body { display: block; flex: 0 1 auto; min-height: 0; overflow-y: auto; padding: 16px 18px; scrollbar-width: thin; }
#quick .q-body > * { margin: 0; }
#quick .q-body > * + * { margin-top: 10px; }
#quick .q-body h2 { font-size: 20px; line-height: 1.35; padding-right: 26px; }
#quick .q-body h3 { margin: 14px 0 0; font-size: 13px; }
#quick .q-text { margin-top: 4px; font-size: 13px; line-height: 1.6; }
#quick .q-lead { color: var(--ink); line-height: 1.7; }
#quick .q-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; color: var(--ink-soft); font-size: 12px; }
#quick .q-meta span + span::before { content: "·"; margin-inline: 6px; }
#quick .q-review { padding: 10px 12px; border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; background: var(--accent-tint); color: var(--ink); font-size: 13px; line-height: 1.7; }
#quick .q-review b { display: block; width: fit-content; margin-bottom: 2px; color: var(--accent); font-size: 12px; line-height: 1.6; }
#quick .q-review span { display: block; }
#quick .q-review small { display: block; margin-bottom: 5px; color: var(--ink-soft); font-size: 11px; }
#quick .q-review .is-collapsed { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
.car-play { position: absolute; top: 10px; left: 10px; z-index: 3; min-height: 30px; padding: 4px 9px; border: 0; border-radius: 7px; background: rgba(8, 30, 24, .75); color: white; font-size: 12px; }
#quick .q-author-line { display: flex; align-items: center; gap: 10px; padding-right: 30px; }
#quick .q-author-line .who { flex: 0 1 auto; min-width: 0; }
#quick .q-author-line .who b { font-size: 14px; }
#quick .q-author-line .follow-form, #quick .q-author-line > .follow-button { flex: none; }
#quick .q-author-line .follow-compact { min-height: 28px; padding: 2px 8px; border-radius: 999px; background: var(--accent-tint); font-size: 12px; font-weight: 500; }
#quick .q-author-line .follow-compact[aria-pressed="true"] { background: var(--surface); border-color: var(--line); color: var(--ink-soft); }
/* 按钮固定在右边；放不下时只让左边的数字换行。点赞、收藏只留图标和数字，点击后宽度不变 */
#quick .q-foot { display: flex; flex: none; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 18px; border-top: 1px solid var(--line); }
#quick .q-foot > .btn { flex: none; white-space: nowrap; }
#quick .q-like { flex: 1 1 auto; min-width: 0; }
#quick .q-reactions [data-label], #quick .q-reactions .like > span:first-of-type:not(:last-child), #quick .q-reactions .bookmark > span:first-of-type:not(:last-child) { display: none; }
#quick .q-reactions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
#quick .q-reactions .like, #quick .q-reactions .bookmark { font-size: 13px; text-decoration: none; }
#quick .q-reactions .stat { color: var(--ink-soft); font-size: 13px; text-decoration: none; white-space: nowrap; }
.q-close { position: absolute; right: 10px; top: 10px; z-index: 6; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: var(--sunken); color: var(--ink-soft); }
.q-close svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; }
.q-close:hover { background: var(--line); color: var(--ink); }
@media (max-width: 859px) {
  #quick { max-height: 88dvh; }
  .q-close { background: rgba(255, 255, 255, .9); }
}
@media (max-width: 520px) {
  #quick .q-foot > .btn { padding-inline: 9px; font-size: 12px; }
}
@media (min-width: 860px) {
  #quick { width: min(1060px, calc(100% - 48px)); height: min(var(--quick-height, 460px), calc(100dvh - 32px)); }
  #quick[open] { display: grid; grid-template-columns: minmax(0, 3fr) minmax(320px, 2fr); }
  #quick .q-media { height: 100%; min-height: 0; max-height: none; aspect-ratio: auto; background: var(--sunken); }
  #quick .q-panel { height: 100%; overflow: hidden; }
  #quick .car-zoom { top: 10px; }
  #quick .q-body { flex: 1 1 auto; }
}

/* 作品详情 */
.post-crumbs { position: sticky; top: calc(var(--head) + env(safe-area-inset-top, 0px)); z-index: 20; background: var(--page); display: flex; align-items: center; gap: 8px; min-height: 40px; margin: 6px 0 6px; color: var(--ink-soft); font-size: 13px; }
.post-crumbs a { color: var(--ink-soft); text-decoration: none; }
.post-crumbs a:hover { color: var(--accent); }
.post-back { display: inline-flex; align-items: center; gap: 2px; margin-left: -4px; font-weight: 500; }
.post-crumbs svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.post-step { display: flex; gap: 4px; margin-left: auto; }
.post-step a { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; }
.post-step a:hover { background: var(--sunken); }
.post-detail .post-story .project-story { display: grid; gap: 14px; }
.post-detail .post-story .project-story:empty { display: none; }
.post-story .story-block h3 { margin: 0 0 4px; }
.post-story p { line-height: 1.8; }
.post-meta { padding-top: 0; border-top: 0; }
.post-meta-tags { gap: 4px 12px; }
.post-meta-tags a, .post-meta-tags span { color: var(--ink-soft); text-decoration: none; }
.post-meta-tags a:hover { color: var(--accent); }
.post-reactions { padding-top: 12px; border-top: 1px solid var(--line); }
.post-media .q-media { overflow: visible; }
.post-pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.post-pager a { display: grid; gap: 2px; min-width: 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); text-decoration: none; }
.post-pager a:hover { border-color: var(--accent); }
.post-pager small { color: var(--ink-soft); font-size: 12px; }
.post-pager b { overflow: hidden; font-size: 13px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.post-pager-next { grid-column: 2; text-align: right; }
.post-bottom { display: grid; gap: 14px; margin-top: 14px; align-items: start; }
.post-bottom > * { min-width: 0; }
.post-comments { grid-column: auto; margin-top: 0; }
.post-aside { display: grid; gap: 14px; }
.post-course-related { grid-column: auto; padding: 14px 16px; }
.post-aside-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.post-aside-head h2 { margin: 0; font-size: 14px; }
.post-aside-head a { color: var(--ink-soft); font-size: 12px; text-decoration: none; }
.post-aside-head a:hover { color: var(--accent); }
.post-related-item { padding: 8px 0; }
.post-related-item img { width: 72px; object-fit: cover; }
.post-related-item b { display: -webkit-box; overflow: hidden; font-size: 13px; font-weight: 500; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.post-related-item small { font-size: 12px; }
@media (min-width: 1024px) {
  .post-bottom { grid-template-columns: minmax(0, 1fr) 320px; }
  .post-bottom > .post-comments { grid-column: 1; grid-row: 1; }
  .post-bottom > .post-aside { grid-column: 2; grid-row: 1; }
  .post-bottom-solo { grid-template-columns: minmax(0, 1fr); }
  .post-aside { position: sticky; top: calc(var(--head) + var(--post-tools) + 16px); }
}

/* 手机和平板：评论在更多作品前面；小链接加大点击区域 */
@media (max-width: 1023px) {
  .post-bottom > .post-comments { order: -1; }
  .post-back, .post-crumbs > a { display: inline-flex; align-items: center; min-height: 40px; }
  .post-step a { width: 40px; height: 40px; }
  .c-more, .c-fold button, .c-gone button { min-height: 36px; }
  .c-to { padding-block: 4px; }
  .post-aside-head a { padding: 6px 0 6px 10px; }
}

/* 登录验证码 */
.captcha-field { display: grid; gap: 4px; }
.captcha-row { display: flex; gap: 8px; align-items: stretch; }
.captcha-row input { flex: 1; min-width: 0; letter-spacing: .3em; }
.captcha-image { flex: none; display: block; width: 132px; height: 44px; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: none; cursor: pointer; }
.captcha-image img { display: block; width: 100%; height: 100%; }

/* 赏金大厅：复刻星火赛场的版式和配色 */
.xh { color-scheme: light; --page: #f5f6f8; --surface: #fff; --sunken: #eef1f4; --ink: #1f2937; --ink-soft: #64748b; --line: #e2e8f0; --accent: #0d6b57; --on-accent: #fff; --accent-tint: #eaf4f0; --bad: #b3261e; --bad-tint: #fbe3e1; --quote: #e9efeb; --xh-paper: #f5f6f8; --xh-ink: #1f2937; --xh-orange: #c65a2d; --xh-green: #e8f1d8; --xh-line: #e2e8f0; --xh-soft: #64748b; color: var(--xh-ink); background: var(--xh-paper); }
.xh a { text-decoration: none; }
.xh-in { position: relative; max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter-l) var(--gutter-r); }
.xh-narrow { max-width: 1180px; }
.xh-ico { flex: none; width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.xh-dots { position: absolute; inset: 0; opacity: .35; pointer-events: none; background-image: radial-gradient(#102c3b 1px, transparent 1px); background-size: 22px 22px; -webkit-mask-image: linear-gradient(to right, #000 10%, transparent 85%); mask-image: linear-gradient(to right, #000 10%, transparent 85%); }
.xh-band { position: relative; overflow: hidden; padding-block: 28px 30px; border-bottom: 1px solid var(--xh-ink); }
.xh-band-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.xh-live { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; color: var(--xh-orange); font-size: 14px; font-weight: 900; }
.xh-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--xh-orange); }
.xh-band h1 { margin: 0; font-size: clamp(28px, 3.6vw, 46px); font-weight: 900; letter-spacing: -.02em; line-height: 1.15; }
.xh-outline, .xh-ghost { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 18px; border: 1px solid var(--xh-ink); border-radius: 999px; background: #fff; color: var(--xh-ink); font-weight: 800; }
.xh-ghost { min-height: 48px; padding-inline: 24px; }
.xh-outline:hover, .xh-ghost:hover { background: var(--xh-green); }
.xh-back { position: relative; display: inline-flex; align-items: center; gap: 8px; color: var(--xh-soft); font-size: 14px; font-weight: 500; }
.xh-back:hover { color: var(--xh-ink); }

.xh-hero { display: grid; overflow: hidden; min-height: 360px; border: 2px solid var(--xh-ink); border-radius: 28px; background: #fff; box-shadow: 8px 8px 0 var(--xh-ink); }
.xh-band-detail .xh-hero { margin-top: 18px; }
.xh-hero-copy { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; min-width: 0; padding: clamp(22px, 3.4vw, 44px); }
.xh-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.xh-state, .xh-pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border-radius: 999px; font-size: 14px; font-weight: 900; }
.xh-pill { border: 1px solid var(--xh-ink); background: #fff; }
.xh-state.is-open, .xh-badge.is-open { background: var(--xh-orange); color: #fff; }
.xh-state.is-judging, .xh-badge.is-judging { background: #9ee6ff; color: #102c3b; }
.xh-state.is-results, .xh-badge.is-results { background: #d8ff72; color: #102c3b; }
.xh-kicker { margin: 20px 0 0; color: var(--xh-orange); font-size: 14px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.xh-hero h1, .xh-hero h2 { max-width: 48rem; margin: 8px 0 0; font-size: clamp(30px, 3.6vw, 48px); font-weight: 900; letter-spacing: -.035em; line-height: 1.2; overflow-wrap: anywhere; }
.xh-hero h2 a { color: inherit; }
.xh-lead { max-width: 42rem; margin: 16px 0 0; color: #475569; font-size: 16px; line-height: 1.75; }
.xh-dates { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 22px; font-size: 14px; font-weight: 700; }
.xh-dates span { display: inline-flex; align-items: center; gap: 8px; }
.xh-dates .xh-ico { color: var(--xh-orange); font-size: 16px; }
.xh-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.xh-actions:empty { display: none; }
.xh-cta { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 28px; border-radius: 999px; background: var(--xh-orange); color: #fff; font-weight: 900; box-shadow: 4px 4px 0 var(--xh-ink); }
.xh-cta:hover { background: #df4e25; }
.xh-poster { position: relative; display: none; overflow: hidden; border-left: 2px solid var(--xh-ink); place-items: center; }
.xh-poster .xh-dots { opacity: .2; -webkit-mask-image: none; mask-image: none; }
.xh-soft-lime { background: #efffc7; }
.xh-soft-coral { background: #ffe5dc; }
.xh-soft-sky { background: #dcf6ff; }
.xh-accent-lime { background: #d8ff72; }
.xh-accent-coral { background: #ff9d78; }
.xh-accent-sky { background: #9ee6ff; }
.xh-tile { position: relative; display: grid; width: 68%; max-width: 300px; aspect-ratio: 1; place-items: center; border: 2px solid var(--xh-ink); border-radius: 36px; box-shadow: 10px 10px 0 var(--xh-ink); transform: rotate(3deg); }
.xh-tile .xh-ico { position: absolute; top: 26px; left: 26px; font-size: 38px; }
.xh-tile strong { font-size: clamp(56px, 6vw, 80px); font-weight: 900; letter-spacing: -.08em; line-height: 1; }
.xh-tile.is-long strong { font-size: clamp(32px, 3.4vw, 46px); letter-spacing: -.04em; }
.xh-tile em { position: absolute; right: 24px; bottom: 24px; padding: 7px 16px; border: 1px solid var(--xh-ink); border-radius: 999px; background: #fff; font-size: 14px; font-style: normal; font-weight: 900; }
@media (min-width: 1024px) {
  .xh-hero { grid-template-columns: 1.25fr .75fr; }
  .xh-poster { display: grid; }
}
.xh-carousel { position: relative; }
.xh-track { display: flex; margin: -4px -14px -14px -4px; padding: 4px 14px 14px 4px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.xh-track::-webkit-scrollbar { display: none; }
.xh-slide { flex: 0 0 100%; min-width: 0; padding-right: 18px; scroll-snap-align: start; }
.xh-slide:last-child { padding-right: 0; flex-basis: calc(100% - 18px); }
.xh-car-nav { position: absolute; right: 26px; bottom: -6px; display: flex; gap: 8px; }
.xh-car-nav button { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid var(--xh-ink); border-radius: 50%; background: #fff; color: var(--xh-ink); cursor: pointer; }
.xh-car-nav button:hover { background: var(--xh-green); }
.xh-car-dots { display: flex; justify-content: center; gap: 8px; margin-top: 20px; }
.xh-car-dots button { width: 10px; height: 10px; padding: 0; border: 1px solid var(--xh-ink); border-radius: 999px; background: #fff; cursor: pointer; transition: width .15s ease; }
.xh-car-dots button.on { width: 36px; background: var(--xh-orange); }

.xh-next { padding-block: 34px 40px; background: var(--xh-green); }
.xh-next-head { margin-bottom: 18px; }
.xh-next-head p { margin: 0; font-size: 14px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.xh-next-head h2 { margin: 4px 0 0; font-size: 30px; font-weight: 900; letter-spacing: -.02em; }
.xh-square { display: grid; flex: none; width: 46px; height: 46px; place-items: center; border-radius: 14px; background: var(--xh-ink); color: #fff; font-size: 22px; }
.xh-next-login, .xh-todos > a { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px; padding: 22px; border: 1px solid var(--xh-ink); border-radius: 22px; background: #fff; box-shadow: 5px 5px 0 var(--xh-ink); color: var(--xh-ink); }
.xh-next-login > div, .xh-todos > a > div { display: flex; gap: 14px; min-width: 0; }
.xh-next-login h3, .xh-todos h3 { margin: 0; font-size: 19px; font-weight: 900; }
.xh-next-login p, .xh-todos p { margin: 4px 0 0; color: var(--xh-soft); font-size: 14px; }
.xh-todos { display: grid; gap: 16px; }
.xh-todos small { color: var(--xh-soft); font-size: 13px; font-weight: 800; }
.xh-todos .xh-square { color: var(--xh-ink); }
.xh-square.xh-soft-lime { background: #efffc7; }
.xh-square.xh-soft-coral { background: #ffe5dc; }
.xh-square.xh-soft-sky { background: #dcf6ff; }
.xh-go { display: inline-flex; align-items: center; gap: 4px; font-weight: 900; }
.xh-tiles { display: grid; gap: 16px; }
.xh-tiles a { padding: 20px; border: 1px solid var(--xh-ink); border-radius: 20px; background: #fff; box-shadow: 4px 4px 0 var(--xh-ink); color: var(--xh-ink); }
.xh-tiles b { display: block; font-size: 30px; font-weight: 900; }
.xh-tiles h3 { margin: 14px 0 0; font-size: 16px; font-weight: 900; }
.xh-tiles p { margin: 4px 0 0; color: var(--xh-soft); font-size: 14px; }
.xh-done { display: flex; align-items: center; gap: 12px; margin: 0; padding: 20px; border: 1px dashed var(--xh-ink); border-radius: 20px; background: rgba(255, 255, 255, .5); font-size: 14px; font-weight: 700; }
.xh-done span { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; background: #fff; }
@media (min-width: 760px) {
  .xh-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .xh-todos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.xh-square-head { padding-block: 26px; border-bottom: 1px solid var(--xh-line); background: #fff; scroll-margin-top: 0; }
.xh-square-head .xh-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.xh-page-title { margin: 0; font-size: 30px; font-weight: 700; letter-spacing: -.01em; }
.xh-square-head p { margin: 6px 0 0; color: var(--xh-soft); font-size: 14px; }
.xh-head-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; flex: 1 1 320px; justify-content: flex-end; }
.xh-search { position: relative; flex: 1 1 260px; max-width: 380px; margin: 0; }
.xh-search > .xh-ico { position: absolute; top: 50%; left: 14px; color: #94a3b8; transform: translateY(-50%); }
.xh-search input { width: 100%; height: 40px; padding: 0 12px 0 38px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; }
.xh-dark { display: inline-flex; flex: none; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 0 18px; border-radius: 8px; background: #1e293b; color: #fff; font-size: 14px; font-weight: 700; white-space: nowrap; }
.xh-dark:hover { background: #334155; }
.xh-list-wrap { padding-block: 26px 40px; }
.xh-filter { padding: 16px; border: 1px solid var(--xh-line); border-radius: 10px; background: #fff; }
.xh-filter-title { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; font-weight: 600; }
.xh-segment { display: flex; gap: 4px; margin-top: 12px; padding: 4px; overflow-x: auto; border-radius: 8px; background: #f1f5f9; scrollbar-width: none; }
.xh-segment a { flex: 1 0 auto; min-height: 32px; padding: 6px 16px; border-radius: 6px; color: var(--xh-soft); font-size: 14px; text-align: center; }
.xh-segment a[aria-current] { background: #fff; color: #0f172a; box-shadow: 0 1px 2px rgba(15, 23, 42, .1); }
.xh-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #f1f5f9; }
.xh-chips a { padding: 6px 12px; border: 1px solid var(--xh-line); border-radius: 8px; color: #475569; font-size: 14px; }
.xh-chips a:hover { background: #f8fafc; }
.xh-chips a[aria-current] { border-color: #334155; background: #1e293b; color: #fff; }
.xh-chips i { width: 1px; margin-inline: 4px; background: var(--xh-line); }
.xh-list-head { display: flex; align-items: center; justify-content: space-between; margin: 26px 0 12px; color: var(--xh-soft); font-size: 14px; }
.xh-list-head h2 { margin: 0; color: var(--xh-ink); font-size: 16px; font-weight: 600; }
.xh-rows { overflow: hidden; border: 1px solid var(--xh-line); border-radius: 10px; background: #fff; }
.xh-row { display: grid; gap: 16px; align-items: center; padding: 20px; }
.xh-row + .xh-row { border-top: 1px solid var(--xh-line); }
.xh-row-main { min-width: 0; }
.xh-row-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: var(--xh-soft); font-size: 13px; }
.xh-row-tags span + span:not(.xh-badge)::before { content: ""; }
.xh-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 5px; background: #f1f5f9; color: #475569; font-size: 12px; font-weight: 600; }
.xh-row h3 { margin: 10px 0 0; font-size: 19px; font-weight: 700; overflow-wrap: anywhere; }
.xh-row h3 a { color: var(--xh-ink); }
.xh-row h3 a:hover { color: var(--xh-orange); }
.xh-row-main > p { margin: 8px 0 0; color: var(--xh-soft); font-size: 14px; line-height: 1.6; }
.xh-row-facts { display: grid; gap: 8px; margin: 0; font-size: 14px; }
.xh-row-facts div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.xh-row-facts dt { display: inline-flex; align-items: center; gap: 8px; color: var(--xh-soft); }
.xh-row-facts dd { margin: 0; font-weight: 700; }
.xh-row > .xh-dark { justify-self: start; }
@media (min-width: 900px) {
  .xh-row { grid-template-columns: minmax(0, 1fr) 240px auto; }
  .xh-row > .xh-dark { justify-self: end; }
}
.xh-empty { display: grid; justify-items: center; gap: 8px; padding: 56px 20px; border: 1px solid var(--xh-line); border-radius: 10px; background: #fff; text-align: center; }
.xh-empty > .xh-ico { color: #cbd5e1; font-size: 34px; }
.xh-empty h2 { margin: 6px 0 0; font-size: 17px; font-weight: 600; }
.xh-empty p { margin: 0; color: var(--xh-soft); font-size: 14px; }
.xh-pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 18px; font-size: 14px; }
.xh-pager a { color: var(--xh-orange); font-weight: 700; }

/* 比赛详情 */
.xh-progress { padding-block: 20px; border-bottom: 1px solid var(--xh-line); background: #fff; }
.xh-progress-title { margin: 0; color: #0f172a; font-size: 14px; font-weight: 600; }
.xh-progress-note { margin: 4px 0 0; color: var(--xh-soft); font-size: 14px; }
.xh-progress ol { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.xh-progress i { display: block; height: 6px; border-radius: 999px; background: var(--xh-line); }
.xh-progress span { display: block; margin-top: 8px; overflow: hidden; color: #94a3b8; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.xh-progress li.done i { background: #10b981; }
.xh-progress li.current i { background: #2563eb; }
.xh-progress li.done span, .xh-progress li.current span { color: #1e293b; font-weight: 500; }
.xh-body { padding-block: 22px 44px; }
.xh-manage { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; padding: 12px 16px; border: 1px solid #bfdbfe; border-radius: 10px; background: #eff6ff; color: #1e40af; font-size: 14px; }
.xh-manage b { margin-right: auto; }
.xh-manage form { margin: 0; }
.xh-tabs { display: flex; gap: 4px; padding: 4px; overflow-x: auto; border: 1px solid var(--xh-line); border-radius: 10px; background: #fff; scrollbar-width: none; scroll-margin-top: 12px; }
.xh-tabs::-webkit-scrollbar { display: none; }
.xh-tabs a { display: inline-flex; flex: 1 0 auto; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 16px; border-radius: 7px; color: var(--xh-soft); font-size: 14px; white-space: nowrap; }
.xh-tabs a:hover { color: var(--xh-ink); }
.xh-tabs a[aria-current] { background: #f1f5f9; color: #0f172a; font-weight: 600; }
.xh-tabs small { padding: 0 6px; border-radius: 999px; background: #fee2d5; color: var(--xh-orange); font-size: 12px; }
.xh-pane { max-width: 900px; margin: 22px auto 0; display: grid; gap: 18px; }
.xh-pane[hidden] { display: none; }
.xh-pane-head h2 { margin: 0; font-size: 24px; font-weight: 700; }
.xh-pane-head p { margin: 4px 0 0; color: var(--xh-soft); font-size: 14px; }
.xh-card { min-width: 0; padding: clamp(18px, 2.4vw, 28px); border: 1px solid var(--xh-line); border-radius: 12px; background: #fff; }
.xh-card > h2 { margin: 0; font-size: 20px; font-weight: 700; }
.xh-card-head { display: flex; align-items: flex-start; gap: 14px; }
.xh-card-head h2 { margin: 0; font-size: 24px; font-weight: 700; }
.xh-card-head p { margin: 10px 0 0; color: #475569; font-size: 16px; line-height: 1.75; overflow-wrap: anywhere; }
.xh-icon-box { display: grid; flex: none; width: 44px; height: 44px; place-items: center; border-radius: 12px; background: #eff6ff; color: #1d4ed8; font-size: 20px; }
.xh-icon-soft { display: grid; flex: none; width: 36px; height: 36px; place-items: center; border-radius: 9px; background: #fff7ed; color: #c2410c; }
.xh-facts { display: grid; gap: 1px; margin: 24px 0 0; overflow: hidden; border: 1px solid var(--xh-line); border-radius: 9px; background: var(--xh-line); }
.xh-facts div { padding: 14px 16px; background: #f8fafc; }
.xh-facts dt { color: var(--xh-soft); font-size: 14px; }
.xh-facts dd { margin: 6px 0 0; color: #0f172a; font-weight: 600; overflow-wrap: anywhere; }
@media (min-width: 640px) { .xh-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .xh-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.xh-two { display: grid; gap: 18px; }
@media (min-width: 900px) { .xh-two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.xh-items { display: grid; gap: 16px; margin-top: 18px; }
.xh-item { display: flex; gap: 12px; }
.xh-score { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; }
.xh-score strong { color: #c2410c; font-size: 18px; font-weight: 700; }
.xh-item b, .xh-score b { font-weight: 600; overflow-wrap: anywhere; }
.xh-item p, .xh-score p { margin: 3px 0 0; color: var(--xh-soft); font-size: 14px; overflow-wrap: anywhere; }
.xh-fold { padding-block: 4px; }
.xh-fold details + details { border-top: 1px solid var(--xh-line); }
.xh-fold summary { padding-block: 14px; font-size: 14px; font-weight: 500; cursor: pointer; }
.xh-fold details p { margin: 0 0 14px; color: #475569; line-height: 1.75; }
.xh-compose { display: grid; gap: 10px; margin: 0; }
.xh-compose-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.xh-check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.xh-login-tip { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.xh-feed { display: grid; overflow: hidden; border: 1px solid var(--xh-line); border-radius: 12px; background: #fff; }
.xh-notice { display: grid; gap: 8px; min-width: 0; padding: 18px 20px; }
.xh-notice + .xh-notice { border-top: 1px solid var(--xh-line); }
.xh-notice form { margin: 0; }
.xh-notice-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.xh-notice-top h3 { margin: 0; font-size: 16px; font-weight: 600; }
.xh-notice-top time { color: var(--xh-soft); font-size: 13px; }
.xh-notice > p { margin: 0; color: #475569; line-height: 1.7; overflow-wrap: anywhere; }
.xh-reply { padding: 10px 14px; border-left: 3px solid var(--xh-orange); border-radius: 0 8px 8px 0; background: #fff7ed; font-size: 14px; }
.xh-reply p { margin: 3px 0 0; color: #475569; line-height: 1.7; overflow-wrap: anywhere; }
.xh-reply-form { display: flex; gap: 8px; }
.xh-reply-form input { flex: 1; min-width: 0; height: 34px; padding: 0 10px; border: 1px solid #cbd5e1; border-radius: 8px; }
.xh-text-btn { justify-self: start; padding: 2px 0; border: 0; background: none; color: var(--xh-soft); font-size: 13px; cursor: pointer; }
.xh-text-btn:hover { color: #b91c1c; }
.xh .challenge-team-panel { padding: clamp(18px, 2.4vw, 28px); border-radius: 12px; border-color: var(--xh-line); }
@media (max-width: 759px) {
  .xh-hero { min-height: 0; border-radius: 22px; box-shadow: 5px 5px 0 var(--xh-ink); }
  .xh-car-nav { position: static; justify-content: flex-end; margin-top: 12px; }
  .xh-car-dots { margin-top: -30px; }
  .xh-chips i { display: none; }
  .xh-head-tools { justify-content: stretch; }
  .xh-search { max-width: none; }
}

/* 参赛资料和历届回顾 */
.xh-files { margin-top: 14px; border: 1px solid var(--xh-line); border-radius: 9px; }
.xh-file { display: flex; align-items: center; gap: 10px; padding-right: 14px; }
.xh-file + .xh-file { border-top: 1px solid #f1f5f9; }
.xh-file > a { display: flex; flex: 1; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; padding: 14px 16px; color: var(--xh-ink); font-size: 14px; font-weight: 500; }
.xh-file > a:hover { background: #f8fafc; }
.xh-file > a > span { display: inline-flex; align-items: center; gap: 10px; min-width: 0; overflow-wrap: anywhere; }
.xh-file .xh-ico { color: #94a3b8; font-size: 16px; }
.xh-file small { color: var(--xh-soft); font-size: 12px; font-weight: 400; }
.xh-file form { margin: 0; }
.xh-file-form { display: grid; gap: 10px; align-items: end; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--xh-line); }
.xh-file-form .field { max-width: none; }
.xh-file-form .btn { justify-self: start; }
.xh-pane-wide { max-width: 1000px; }
.xh-pane-head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px; }
.xh-edition { display: grid; gap: 12px 18px; align-items: center; padding: 18px 20px; }
.xh-edition + .xh-edition { border-top: 1px solid #f1f5f9; }
.xh-edition-cover { display: block; width: 100%; max-width: 280px; }
.xh-edition-cover img { display: block; width: 100%; aspect-ratio: 16 / 10; border-radius: 8px; object-fit: cover; background: #f1f5f9; }
.xh-edition-year { font-size: 20px; font-weight: 700; white-space: nowrap; }
.xh-edition-main { min-width: 0; }
.xh-edition-main h3 { margin: 0; font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.xh-edition-main h3 a { color: var(--xh-ink); }
.xh-edition-main h3 a:hover { color: var(--xh-orange); }
.xh-edition-main p { display: -webkit-box; margin: 6px 0 0; overflow: hidden; color: var(--xh-soft); font-size: 14px; line-height: 1.7; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.xh-edition-facts { display: flex; gap: 12px; color: var(--xh-soft); font-size: 14px; white-space: nowrap; }
.xh-light { display: inline-flex; flex: none; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 14px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; color: var(--xh-ink); font-size: 14px; font-weight: 500; white-space: nowrap; justify-self: start; }
.xh-light:hover { background: #f8fafc; }
@media (min-width: 900px) {
  .xh-edition { grid-template-columns: 120px 72px minmax(0, 1fr) auto auto; }
  .xh-edition:not(:has(.xh-edition-cover)) { grid-template-columns: 72px minmax(0, 1fr) auto auto; }
}
.xh-article-top { padding-block: 16px; border-bottom: 1px solid var(--xh-line); background: #fff; }
.xh-article-width { max-width: 1040px; }
.xh-article-top .xh-in { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.xh-article-top .xh-article-width { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.xh-article { padding-block: clamp(24px, 4vw, 52px); }
.xh-article-head { padding-bottom: 26px; border-bottom: 1px solid var(--xh-line); }
.xh-article-head > p { margin: 0; color: #c2410c; font-size: 14px; font-weight: 500; }
.xh-article-head h1 { max-width: 56rem; margin: 14px 0 0; color: #020617; font-size: clamp(26px, 3.2vw, 36px); font-weight: 700; line-height: 1.25; letter-spacing: -.01em; overflow-wrap: anywhere; }
.xh-article-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 16px; color: var(--xh-soft); font-size: 14px; }
.xh-article-meta span { display: inline-flex; align-items: center; gap: 8px; }
.xh-article-grid { display: grid; gap: 30px; padding-top: 28px; align-items: start; }
.xh-article-main { display: grid; gap: 26px; min-width: 0; }
.xh-article-lead { margin: 0; padding-left: 20px; border-left: 4px solid #ea580c; color: #334155; font-size: 18px; font-weight: 500; line-height: 1.8; }
.xh-article-cover { margin: 0; overflow: hidden; border-radius: 8px; background: #e2e8f0; }
.xh-article-cover .slide, .xh-photos .slide { flex: none; height: auto; margin: 0; cursor: zoom-in; }
.xh-article-cover img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.xh-article-body { color: #334155; line-height: 2; overflow-wrap: anywhere; }
.xh-article-body p { margin: 0 0 16px; }
.xh-article-body p:last-child { margin-bottom: 0; }
.xh-article-main h2 { margin: 0 0 14px; color: #020617; font-size: 22px; font-weight: 700; }
.xh-table { overflow-x: auto; border: 1px solid var(--xh-line); border-radius: 8px; background: #fff; }
.xh-table table { width: 100%; min-width: 480px; border-collapse: collapse; font-size: 14px; }
.xh-table th { padding: 10px 14px; background: #f8fafc; color: var(--xh-soft); font-weight: 500; text-align: left; white-space: nowrap; }
.xh-table td { padding: 11px 14px; border-top: 1px solid #f1f5f9; }
.xh-table td b { color: #c2410c; white-space: nowrap; }
.xh-quote { margin: 0; padding: 18px 20px; border-radius: 8px; background: #fff7ed; }
.xh-quote p { margin: 0; color: #334155; line-height: 1.85; }
.xh-quote footer { margin-top: 10px; color: var(--xh-soft); font-size: 13px; }
.xh-photos .slides { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.xh-photos .slide img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; border-radius: 8px; object-fit: cover; background: #e2e8f0; }
.xh-photos figcaption { margin-top: 6px; color: var(--xh-soft); font-size: 13px; }
.xh-article-side { padding: 18px 20px; border: 1px solid var(--xh-line); border-radius: 8px; background: #fff; }
.xh-article-side h2 { margin: 0; font-size: 15px; font-weight: 600; }
.xh-article-side dl { display: grid; gap: 14px; margin: 14px 0 0; font-size: 14px; }
.xh-article-side dt { color: #94a3b8; }
.xh-article-side dd { margin: 4px 0 0; font-weight: 500; }
.xh-article-side p { display: flex; align-items: center; gap: 8px; margin: 16px 0 0; padding-top: 14px; border-top: 1px solid #f1f5f9; font-size: 14px; font-weight: 500; }
.xh-article-side .xh-ico { color: #c2410c; }
@media (min-width: 900px) {
  .xh-article-grid { grid-template-columns: minmax(0, 1fr) 260px; }
  .xh-article-side { position: sticky; top: calc(var(--head) + 16px); }
}

/* 卡片四个数字一行放下 */
.card .stats { gap: 4px 10px; }
.card .stats [data-label], .card .stats .like > span:first-of-type:not(:last-child), .card .stats .bookmark > span:first-of-type:not(:last-child) { display: none; }

/* 参赛作品展 */
.xh-formula { margin: 12px 0 0; padding: 8px 12px; border-radius: 8px; background: #fff7ed; color: #7c2d12; font-size: 14px; }
.xh-entry-sort { display: flex; gap: 4px; }
.xh-entry-sort a { padding: 6px 12px; border: 1px solid var(--xh-line); border-radius: 8px; background: #fff; color: #475569; font-size: 14px; }
.xh-entry-sort a[aria-current] { border-color: #334155; background: #1e293b; color: #fff; }
.xh-entries { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.xh-podium { display: grid; gap: 18px; }
@media (min-width: 760px) { .xh-podium { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.xh-entry { position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--xh-line); border-radius: 14px; background: #fff; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.xh-entry:hover { border-color: var(--xh-ink); box-shadow: 4px 4px 0 var(--xh-ink); transform: translate(-1px, -1px); }
.xh-podium .xh-entry { border: 2px solid var(--xh-ink); border-radius: 18px; box-shadow: 5px 5px 0 var(--xh-ink); }
.xh-entry-cover { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #f1f5f9; }
.xh-entry-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.xh-medal { display: inline-flex; padding: 4px 12px; border: 1px solid var(--xh-ink); border-radius: 999px; background: #d8ff72; color: #102c3b; font-size: 13px; font-weight: 900; }
.xh-entry-cover .xh-medal { position: absolute; top: 10px; left: 10px; }
.xh-podium .xh-entry:first-child .xh-medal { background: #ffc93c; }
.xh-entry-body { display: flex; flex: 1; flex-direction: column; gap: 8px; padding: 14px 16px 12px; }
.xh-entry-body h3 { margin: 0; font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
.xh-entry-body h3 a { color: var(--xh-ink); }
.xh-entry-body h3 a:hover { color: var(--xh-orange); }
.xh-entry-body > p { display: -webkit-box; margin: 0; overflow: hidden; color: var(--xh-soft); font-size: 13px; line-height: 1.6; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.xh-entry-by { display: flex; align-items: center; gap: 6px; min-width: 0; color: #475569; font-size: 13px; }
.xh-entry-by span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xh-entry-score { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 2px 0; overflow: hidden; border: 1px solid var(--xh-line); border-radius: 8px; background: var(--xh-line); }
.xh-entry-score div { padding: 6px 8px; background: #f8fafc; }
.xh-entry-score dt { color: var(--xh-soft); font-size: 11px; white-space: nowrap; }
.xh-entry-score dd { margin: 2px 0 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.xh-entry-score div:first-child dd { color: #c2410c; }
.xh-entry-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 4px; font-size: 13px; }
.xh-entry-foot > a { color: var(--xh-soft); }
.xh-entry-foot > a:hover { color: var(--xh-orange); }
.xh-vote-form { display: inline-flex; margin: 0; }
.xh-vote { display: inline-flex; align-items: center; gap: 4px; min-height: 34px; padding: 0 12px; border: 1px solid var(--xh-ink); border-radius: 999px; background: #fff; color: var(--xh-ink); font: 700 13px var(--body, inherit); cursor: pointer; }
.xh-vote:hover { background: #ffe5dc; color: var(--xh-ink); }
.xh-vote[aria-pressed="true"] { border-color: var(--xh-orange); background: var(--xh-orange); color: #fff; }
.xh-vote.is-static { border-color: transparent; background: none; padding-inline: 0; font-weight: 500; color: var(--xh-soft); cursor: default; }
.xh-vote svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.xh-vote[aria-pressed="true"] svg { fill: currentColor; }

/* 参赛作品页 */
.xh-entry-width { max-width: 1180px; }
.xh-article-top .xh-entry-width { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.xh-entry-page { padding-block: 22px 44px; }
.xh-entry-head { display: grid; justify-items: start; gap: 6px; margin-bottom: 18px; }
.xh-entry-head h1 { margin: 0; font-size: clamp(24px, 3vw, 34px); font-weight: 800; overflow-wrap: anywhere; }
.xh-entry-head p { margin: 0; color: #475569; font-size: 15px; line-height: 1.7; }
.xh-entry-grid { display: grid; gap: 18px; align-items: start; }
.xh-entry-main, .xh-entry-side { display: grid; gap: 14px; min-width: 0; }
.xh-entry-main .car { height: clamp(220px, 40vw, 520px); aspect-ratio: auto; }
.xh-entry-story h2 { margin: 16px 0 6px; font-size: 16px; }
.xh-entry-story h2:first-child { margin-top: 0; }
.xh-entry-story p { margin: 0; color: #475569; line-height: 1.8; overflow-wrap: anywhere; }
.xh-side-card { display: grid; gap: 10px; padding: 16px 18px; }
.xh-side-card > h2 { margin: 0; font-size: 15px; font-weight: 700; }
.xh-side-note { margin: 0; color: var(--xh-soft); font-size: 13px; line-height: 1.7; }
.xh-side-links .btn { width: 100%; }
.xh-side-links { grid-template-columns: minmax(0, 1fr); }
.xh-member { display: flex; align-items: center; gap: 10px; min-width: 0; }
.xh-member b { display: block; font-size: 14px; font-weight: 600; }
.xh-member small { color: var(--xh-soft); font-size: 12px; }
.xh-side-card .xh-dark { justify-self: start; }
@media (min-width: 960px) {
  .xh-entry-grid { grid-template-columns: minmax(0, 1fr) 320px; }
  .xh-entry-side { position: sticky; top: calc(var(--head) + 16px); }
}

/* 比赛封面 */
.xh-poster.has-cover { background: #e2e8f0; }
.xh-poster.has-cover img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }

/* 荣誉证书：画在 canvas 上，排版见 static/js/certificate.js */
.xh-cert-page { padding-bottom: 40px; }
.xh-cert-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding-block: 16px; }
.xh-cert-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; }
.xh-cert-tools select { min-height: 38px; padding-inline: 8px; }
.xh-cert-tools button { border: 0; cursor: pointer; }
.xh-cert-tools button:disabled { opacity: .6; cursor: wait; }
.xh-cert-sheet { margin-bottom: 18px; }
.cert { display: block; width: 100%; height: auto; }

/* 手机：比赛页按钮和筛选好点 */
@media (max-width: 759px) {
  .xh-hero-copy { padding: 20px; }
  .xh-hero h1, .xh-hero h2 { font-size: 26px; }
  .xh-cta, .xh-ghost { min-height: 44px; padding-inline: 20px; }
  .xh-page-title { font-size: 24px; }
  .xh-row { padding: 16px; }
  .xh-row > .xh-dark { width: 100%; min-height: 40px; }
  .xh-pane-head h2 { font-size: 20px; }
  .xh-card-head { flex-direction: column; }
  .xh-card-head h2 { font-size: 20px; }
  .xh-tabs a { padding-inline: 12px; }
  .xh-chips a { padding-block: 8px; }
  .xh-back { min-height: 40px; }
  .xh-entries { grid-template-columns: minmax(0, 1fr); }
  .xh-vote:not(.is-static) { min-height: 40px; padding-inline: 14px; }
  .xh-edition-cover { max-width: none; }
  .xh-light { min-height: 40px; }
  .xh-reply-form { flex-wrap: wrap; }
  .xh-reply-form input { flex-basis: 100%; height: 40px; }
  .xh-article-lead { font-size: 16px; }
  .xh-file > a { padding: 12px; }
  .xh-compose-foot .btn { min-height: 38px; }}
/* 举报理由和教师审核明细 */
.c-report-form { display: grid; gap: 8px; margin: 12px 0; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.c-report-form label { font-size: 14px; font-weight: 600; }
.c-report-form textarea { width: 100%; min-height: 90px; resize: vertical; }
.report-reasons { flex-basis: 100%; min-width: 0; font-size: 13px; overflow-wrap: anywhere; }
.report-reasons p { margin: 8px 0; }

/* Review selection and long-content access on touch devices. */
#quick .q-body h2, #quick .q-lead, #quick .q-text, #quick .q-review span { overflow-wrap: anywhere; }
.rv-picker { min-width: 0; }
.rv-picker > summary { padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); cursor: pointer; overflow-wrap: anywhere; }
#review-detail { scroll-margin-top: calc(var(--head) + 16px); }
@media (min-width: 900px) { .rv-picker > summary { display: none; } }
@media (max-width: 899px) { .rv-picker .rv-queue { max-height: min(320px, 45dvh); margin-top: 8px; } }
@media (hover: none) {
  #quick .q-author-line .follow-compact, #quick .q-reactions .like, #quick .q-reactions .bookmark, #quick .q-reactions .stat { min-height: 40px; }
  .post-author-row .follow-button, .post-reactions .like, .post-reactions .bookmark, .post-reactions > a { min-height: 40px; }
  #quick .q-reactions .stat { display: inline-flex; align-items: center; }
}
.sub-session-warning { margin: 0 0 14px; padding: 12px 16px; border: 1px solid var(--warn); border-radius: 10px; background: var(--warn-tint); color: var(--ink); }
.sub-session-warning a { margin-left: 10px; color: var(--accent); }

/* Keep the two discovery entries together across responsive wrapping. */
.wall-discover { display: inline-flex; flex: none; align-items: center; gap: 8px; }
.dice[aria-current="true"] { color: var(--accent); border-color: var(--accent); background: var(--accent-tint); }
.login-intro { margin: 10px 0 18px; color: var(--ink-soft); font-size: 14px; line-height: 1.75; }
.login-help { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 12px; line-height: 1.8; }
#first-password-dialog { width: min(480px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 0; overflow-y: auto; }
#first-password-dialog .auth-panel { margin: 0; padding: 26px; border: 0; border-radius: 12px; }
#first-password-dialog .me-title { font-size: 23px; }
#first-password-dialog .form-actions .btn { width: 100%; min-height: 42px; }
.password-exit { margin-top: 16px; text-align: center; }
.link-button { min-height: 36px; padding: 4px 8px; border: 0; background: transparent; color: var(--ink-soft); font-size: 13px; }
@media (max-width: 599px) { #first-password-dialog .auth-panel { padding: 20px; } }

.piece-demo {
  position: absolute;
  right: 5px;
  bottom: 5px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(8, 30, 24, .86);
  color: #fff;
  font: 600 11px/1.4 var(--body);
}
