:root {
  --field: #efb88e;
  --ink: #2b1c14;
  --ink-soft: #5a3d2c;
  --text: #eef0f6;
  --stone: #262d44;
  --done: #1f5a52;
  --doing: #a04a12;
  --todo: rgba(43, 28, 20, 0.5);
  --track: rgba(43, 28, 20, 0.13);
  --rule: linear-gradient(90deg, rgba(43, 28, 20, 0) 0%, rgba(43, 28, 20, 0.34) 22%, rgba(43, 28, 20, 0.34) 78%, rgba(43, 28, 20, 0) 100%);
  --stone-col: clamp(40px, 9vw, 150px);
  --radius: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

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

/* ---------- 横幅 ---------- */

.hero {
  position: relative;
  height: max(320px, calc(100vw * 1240 / 3840));
  overflow: hidden;
  background: #0b0f1e;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% 30%;
  display: block;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.88) 0%,
    rgba(0, 0, 0, 0.72) 22%,
    rgba(0, 0, 0, 0.38) 40%,
    rgba(0, 0, 0, 0) 58%
  );
}

.hero-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 0 0 clamp(20px, 4.5vw, 96px);
  max-width: min(640px, 60%);
}

.hero h1 {
  margin: 0;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.5);
}

.hero-line { display: block; }
#title { font-size: clamp(26px, 3.6vw, 68px); }
#subtitle { font-size: clamp(20px, 2.6vw, 50px); color: #dfe6ff; }

.hero-percent {
  margin: clamp(8px, 1.2vw, 22px) 0 0;
  font-size: clamp(48px, 6.6vw, 128px);
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 24px rgba(120, 170, 255, 0.35);
}

.hero-percent small {
  font-size: 0.45em;
  font-weight: 700;
  margin-left: 0.08em;
  color: #c9d4ff;
}

.hero-bar {
  margin-top: clamp(12px, 1.4vw, 26px);
  width: min(100%, 420px);
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}

.hero-bar-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #cfe3ff, #ffffff);
  box-shadow: 0 0 12px rgba(200, 225, 255, 0.8);
  transition: width 0.9s cubic-bezier(.2, .8, .2, 1);
}

.hero-updated {
  margin: 12px 0 0;
  font-size: clamp(12px, 1vw, 16px);
  color: rgba(230, 236, 255, 0.7);
  min-height: 1.3em;
}

/* ---------- 橙色区域与石头 ---------- */

.field {
  position: relative;
  overflow: hidden;
  min-height: 60vh;
  --s: 1;
}

.stones {
  position: absolute;
  top: 0;
  bottom: 0;
  width: var(--stone-col);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0;
  gap: 22px;
  pointer-events: none;
}

.stones-left { left: clamp(4px, 1vw, 20px); }
.stones-right { right: clamp(4px, 1vw, 20px); }

.stone {
  width: 100%;
  flex: none;
  display: flex;
  justify-content: center;
}

.stone img {
  display: block;
  max-width: 100%;
  height: auto;
  transform: rotate(calc(var(--d) * var(--s) * 15deg));
  filter: drop-shadow(0 6px 6px rgba(60, 30, 10, 0.25));
}

/* ---------- 主体 ---------- */

.content {
  position: relative;
  margin: 0 auto;
  padding: 44px calc(var(--stone-col) + clamp(16px, 3vw, 48px)) 36px;
  max-width: calc(1080px + 2 * var(--stone-col) + 96px);
}

.intro {
  margin: 0 0 32px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.75;
  text-align: center;
}

.block + .block { margin-top: 44px; }

.block-title {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 18px;
  color: var(--ink);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.block-title::before,
.block-title::after {
  content: "";
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(43, 28, 20, 0.45));
}

.block-title::after { transform: scaleX(-1); }

/* 中间实、两端虚的分隔线 */
.creator,
.seg-row {
  position: relative;
}

.creator::after,
.seg-row::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--rule);
  pointer-events: none;
}

/* 制作者 */

.creators {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  column-gap: 40px;
}

.creator {
  cursor: pointer;
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 18px 12px;
  border-radius: 12px;
  color: var(--ink);
  transition: background-color 0.15s ease;
}

.creator:hover { background: rgba(255, 248, 240, 0.2); }
.creator[aria-pressed="true"] { background: rgba(255, 248, 240, 0.38); }
.creator:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }

.avatar {
  flex: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--stone);
  color: #f4e7da;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 20px;
  overflow: hidden;
  box-shadow: 0 0 0 3px rgba(255, 248, 240, 0.35);
}

.avatar img { width: 100%; height: 100%; object-fit: cover; }

.creator-main { min-width: 0; flex: 1; }
.creator-name { font-weight: 700; font-size: 17px; overflow-wrap: anywhere; }
.creator-role { color: var(--ink-soft); font-size: 13px; margin-top: 2px; }
.creator-stats { display: flex; gap: 14px; margin-top: 7px; font-size: 12px; color: var(--ink-soft); flex-wrap: wrap; }
.creator-stats b { font-weight: 700; margin-right: 3px; font-size: 13px; }
.creator-stats .s-done b { color: var(--done); }
.creator-stats .s-doing b { color: var(--doing); }
.creator-note { color: var(--ink-soft); font-size: 12px; margin-top: 6px; line-height: 1.55; }
.creator-link { color: var(--ink); font-size: 12px; font-weight: 600; text-decoration: none; margin-top: 6px; display: inline-block; border-bottom: 1px solid rgba(43, 28, 20, 0.35); }
.creator-link:hover { border-bottom-color: var(--ink); }

/* 汇总 */

.summary { margin-bottom: 20px; }

.summary-bar {
  display: flex;
  height: 8px;
  border-radius: 99px;
  overflow: hidden;
  background: var(--track);
}

.summary-bar > span { height: 100%; }
.summary-bar .b-done { background: var(--done); }
.summary-bar .b-doing { background: var(--doing); }

.summary-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 12px;
  font-size: 14px;
  color: var(--ink-soft);
}

.summary-legend b { color: var(--ink); font-size: 16px; margin-left: 5px; font-variant-numeric: tabular-nums; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.dot.done { background: var(--done); }
.dot.doing { background: var(--doing); }
.dot.todo { background: var(--todo); }

/* 筛选 */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 18px;
}

.filter {
  appearance: none;
  font: inherit;
  font-size: 13px;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid rgba(43, 28, 20, 0.22);
  border-radius: 99px;
  padding: 5px 15px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.filter:hover { color: var(--ink); background: rgba(255, 248, 240, 0.25); }
.filter[aria-selected="true"] { background: var(--ink); color: var(--field); border-color: var(--ink); font-weight: 700; }

.filter-creator {
  margin-left: auto;
  font-size: 13px;
  color: var(--ink);
  font-weight: 600;
  align-self: center;
}

.filter-creator button {
  appearance: none;
  border: 0;
  background: none;
  color: var(--ink-soft);
  cursor: pointer;
  font: inherit;
  font-weight: 400;
  text-decoration: underline;
  margin-left: 6px;
}

/* 分段表 */

.seg-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 2fr) minmax(0, 1.3fr) 84px minmax(0, 1.9fr);
  gap: 16px;
  align-items: center;
  padding: 15px 8px;
  color: var(--ink);
}

.seg-head {
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 0.1em;
  padding-top: 4px;
  padding-bottom: 10px;
}

.seg-no { color: var(--ink-soft); font-variant-numeric: tabular-nums; font-size: 14px; }
.seg-name { font-weight: 700; overflow-wrap: anywhere; }
.seg-note { color: var(--ink-soft); font-size: 12px; margin-top: 4px; line-height: 1.5; font-style: italic; }
.seg-who { font-size: 14px; overflow-wrap: anywhere; }
.seg-who .none { color: var(--todo); }

.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
  white-space: nowrap;
  justify-self: start;
}

.badge.done { background: rgba(31, 90, 82, 0.13); color: var(--done); }
.badge.doing { background: rgba(160, 74, 18, 0.13); color: var(--doing); }
.badge.todo { background: rgba(43, 28, 20, 0.07); color: var(--todo); }

.seg-video .none { color: var(--todo); }

.seg-video { min-width: 0; }

.video-link {
  display: block;
  color: #1546b0;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-link:hover { color: #0b2f80; }

.seg-row.todo .seg-name,
.seg-row.todo .seg-no { color: rgba(43, 28, 20, 0.6); }

.empty, .error {
  padding: 28px 8px;
  text-align: center;
  color: var(--ink-soft);
  line-height: 1.7;
}

.error { color: #9b2a12; }

/* 页脚 */

.footer {
  margin-top: 56px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.8;
}

.footer p { margin: 0; }

/* ---------- 窄屏 ---------- */

@media (max-width: 760px) {
  .hero { height: 300px; }
  .hero-img { object-position: 78% 30%; }
  .hero-shade {
    background: linear-gradient(to right, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.6) 50%, rgba(0, 0, 0, 0.1) 85%);
  }
  .hero-text { max-width: 78%; }

  .content { padding-top: 32px; }
  .creators { grid-template-columns: 1fr; }
  .creator { padding: 16px 6px; }

  .seg-head { display: none; }
  .seg-row {
    grid-template-columns: 26px minmax(0, 1fr) auto;
    grid-template-areas:
      "no name badge"
      "no who who"
      "no video video";
    gap: 6px 10px;
    padding: 14px 4px;
  }
  .seg-no { grid-area: no; align-self: start; padding-top: 2px; }
  .seg-main { grid-area: name; }
  .seg-who { grid-area: who; font-size: 13px; }
  .seg-row .badge { grid-area: badge; align-self: start; }
  .seg-video { grid-area: video; }
  .seg-video:has(.none) { display: none; }
  .filter-creator { margin-left: 0; width: 100%; }
}
