/* =====================================================================
   PCR ARCHIVE — 工会战 SET 刀
   官方奶油白 / Logo 蓝 / 品牌粉 + 机能风面板
   ===================================================================== */
:root {
  --bg: #fff8f0;
  --panel: #ffffff;
  --cream: #fffdf9;
  --navy: #26364f;
  --body: #5f6f86;
  --muted: #66748b;
  --line: #ece3d8;
  --line-2: #f3ece4;
  --pink: #f1528b;
  --pink-deep: #c72f6a;
  --pink-soft: #ffeaf2;
  --blue: #1aa3ef;
  --blue-deep: #0d7fbe;
  --sky: #eaf7fe;
  --gold: #e0a033;
  --gold-soft: #fff4d9;
  --shadow: 0 6px 22px rgba(120, 84, 70, .055);
  --cn: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --wide: 'EF Wide', var(--cn);
  --gilroy: 'EF Gilroy', var(--cn);
  --mono: 'EF Mono', ui-monospace, "Cascadia Mono", Consolas, monospace;
  --edge: clamp(12px, 1.5vw, 24px);
  --r: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100%;
  color: var(--body);
  font-family: var(--gilroy);
  font-size: 14px;
  line-height: 1.5;
  background-color: var(--bg);
  background-image:
    radial-gradient(70% 50% at 12% 0%, rgba(255, 255, 255, .9), transparent 70%),
    linear-gradient(90deg, rgba(38, 54, 79, .032) 1px, transparent 1px),
    linear-gradient(180deg, rgba(38, 54, 79, .028) 1px, transparent 1px);
  background-size: auto, 26px 26px, 26px 26px;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--pink); color: #fff; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #e3d3cb; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #e7aec4; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }

.app {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

/* ---------------- 顶栏 ---------------- */
.topbar {
  flex: none;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 var(--edge);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 250, 244, .9);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand { display: flex; align-items: center; flex: none; }
.brand img { height: 42px; width: auto; }
.topbar__divider { width: 1px; height: 24px; background: var(--line); flex: none; }
.page-id { display: flex; align-items: baseline; gap: 9px; min-width: 0; }
.page-id b {
  font-family: var(--cn);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--navy);
}
.page-id span {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .18em;
  color: var(--muted);
  white-space: nowrap;
}
.topbar__right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.live {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 8.5px; letter-spacing: .16em;
  color: var(--muted);
}
.live i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 3px rgba(26, 163, 239, .14);
}
.clock {
  font-family: var(--mono); font-size: 10.5px;
  letter-spacing: .08em; color: var(--navy);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.clock em { font-style: normal; font-size: 8px; color: var(--muted); margin-left: 5px; letter-spacing: .12em; }
.back {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  font-family: var(--cn); font-size: 11.5px; font-weight: 600;
  letter-spacing: .06em; color: var(--navy);
  border: 1px solid var(--line); border-radius: 999px;
  background: #fff;
  transition: border-color .2s, color .2s, background .2s;
}
.back span { font-family: var(--mono); font-size: 10px; }
.back:hover { border-color: #ffc9dc; color: var(--pink-deep); background: var(--pink-soft); }

/* ---------------- 工作区 ---------------- */
.workspace {
  flex: 1;
  width: 100%;
  max-width: 1760px;
  margin: 0 auto;
  padding: 16px var(--edge) 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 标题 */
.topline {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.topline__title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topline__num {
  font-family: var(--wide); font-weight: 700;
  font-size: 44px; line-height: .78;
  letter-spacing: -.03em; color: var(--pink);
  font-variant-numeric: tabular-nums;
}
.eyebrow {
  margin: 0 0 3px;
  font-family: var(--mono); font-size: 8px; letter-spacing: .22em;
  color: var(--muted); text-transform: uppercase;
}
.topline h1 {
  margin: 0;
  font-family: var(--cn); font-size: 21px; font-weight: 700;
  letter-spacing: .1em; color: var(--navy); line-height: 1.2;
}
.sub { margin: 3px 0 0; font-size: 11px; letter-spacing: .04em; color: var(--muted); }
.topline__right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 10px;
  background: rgba(255, 255, 255, .86);
  border: 1px solid var(--line); border-radius: 999px;
  font-family: var(--cn); font-size: 10.5px; color: var(--body);
  white-space: nowrap;
}
.chip b { font-family: var(--mono); font-size: 11px; font-weight: 400; color: var(--navy); }
.dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.dot--pink { background: var(--pink); }
.dot--blue { background: var(--blue); }
.dot--gold { background: var(--gold); }

/* ---------------- 面板 ---------------- */
.panel {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel__head {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fffdfa, #fffaf4);
}
.panel__idx {
  display: inline-grid; place-items: center;
  width: 20px; height: 18px;
  font-family: var(--mono); font-size: 8px;
  color: var(--pink-deep); background: var(--pink-soft);
  border-radius: 4px; flex: none;
}
.panel__head h2 {
  margin: 0;
  font-family: var(--cn); font-size: 12.5px; font-weight: 700;
  letter-spacing: .1em; color: var(--navy); white-space: nowrap;
}
.panel__en {
  font-family: var(--mono); font-size: 7.5px; letter-spacing: .18em;
  color: var(--muted); white-space: nowrap;
}
.panel__count {
  margin-left: 2px;
  font-family: var(--mono); font-size: 9px;
  color: var(--pink-deep); background: var(--pink-soft);
  border-radius: 999px; padding: 1px 6px;
}
/* 阶段切换条 */
.stagebar {
  position: sticky;
  top: 68px;
  z-index: 18;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 10px;
  background: rgba(255, 250, 244, .95);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.stagebar__label {
  display: flex; align-items: center; gap: 7px;
  padding-right: 10px;
  border-right: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .16em;
  color: var(--muted);
  text-transform: uppercase;
}
.stagebar__label b {
  font-family: var(--cn);
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--navy);
}
.stagebar__tabs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.stage {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 72px;
  padding: 10px 16px;
  border: 1.5px solid #e6d8cb;
  border-radius: 10px;
  background: #fff;
  font-family: var(--cn);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--navy);
  box-shadow: 0 2px 6px rgba(120, 84, 70, .06);
  transition: border-color .18s, color .18s, background .18s, transform .18s, box-shadow .18s;
}
.stage em {
  font-family: var(--mono);
  font-style: normal;
  font-size: 10px;
  font-weight: 400;
  padding: 1px 7px;
  border-radius: 999px;
  background: #f4ece5;
  color: var(--muted);
  transition: background .18s, color .18s;
}
.stage:hover {
  border-color: #f6cad9;
  color: var(--pink-deep);
  transform: translateY(-1px);
}
.stage.is-active {
  border-color: transparent;
  background: linear-gradient(135deg, #f1528b, #d63a72);
  color: #fff;
  box-shadow: 0 8px 18px rgba(241, 82, 139, .3);
}
.stage.is-active em { background: rgba(255, 255, 255, .24); color: #fff; }
.stagebar__hint {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .08em;
  color: var(--muted);
}

.panel__body { padding: 8px; }

/* ---------------- 作业图 ---------------- */
.teams {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 960px;
  margin-inline: auto;
}
/* D6 简单分刀：两列并排 */
.teams--two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-width: 1400px;
  align-items: start;
}
.team {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--cream);
  overflow: hidden;
  cursor: zoom-in;
  transition: border-color .18s, box-shadow .18s;
}
.team img {
  width: 100%;
  height: auto;
  object-fit: contain;
  background: #fdf8f2;
}
.team:hover {
  border-color: #f6cad9;
  box-shadow: 0 8px 22px rgba(120, 84, 70, .12);
}
.team__no {
  position: absolute; left: 8px; top: 8px;
  min-width: 24px; height: 20px;
  display: inline-grid; place-items: center;
  padding: 0 6px;
  font-family: var(--mono); font-size: 9.5px;
  color: var(--navy);
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--line);
  border-radius: 5px;
}
.team__day {
  position: absolute; right: 8px; bottom: 8px;
  padding: 2px 7px;
  font-family: var(--mono); font-size: 9px; letter-spacing: .06em;
  color: var(--pink-deep);
  background: rgba(255, 255, 255, .94);
  border-radius: 5px;
}

.empty {
  margin: 0;
  padding: 28px 10px;
  text-align: center;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .12em;
  color: var(--muted);
}

/* ---------------- 作者 ---------------- */
.authors {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(172px, 1fr));
  gap: 6px;
}
.creator {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 8px;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  background: var(--cream);
  min-width: 0;
  transition: border-color .18s, background .18s, transform .18s;
}
.creator:hover { border-color: #f6cad9; background: #fff; transform: translateY(-1px); }
.creator__avatar {
  width: 34px; height: 34px;
  flex: none;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, var(--blue), var(--pink));
}
.creator__avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #fff;
}
.creator__body { flex: 1; min-width: 0; }
.creator__name {
  display: block;
  font-family: var(--cn);
  font-size: 11px; font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.creator__tag {
  display: inline-block;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: .04em;
  color: var(--pink-deep);
  background: var(--pink-soft);
  border-radius: 3px;
  padding: 0 4px;
}
.creator__arrow {
  flex: none;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  transition: color .18s, transform .18s;
}
.creator:hover .creator__arrow { color: var(--pink-deep); transform: translate(2px, -2px); }

/* ---------------- 页脚 ---------------- */
.footer {
  flex: none;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 8px var(--edge) 12px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .06em;
  color: var(--muted);
}
.footer a { color: var(--body); }
.footer a:hover { color: var(--pink-deep); }
.footer__clock { margin-left: auto; }
.footer__dot { width: 3px; height: 3px; border-radius: 50%; background: #d9c9bf; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1100px) {
  .brand img { height: 34px; }
  .page-id span { display: none; }
  .topline__num { font-size: 36px; }
  .topline h1 { font-size: 18px; }
}

@media (max-width: 760px) {
  .topbar { height: 60px; gap: 10px; }
  .clock, .live, .topbar__divider { display: none; }
  .brand img { height: 30px; }
  .workspace { padding-top: 12px; }
  .sub { display: none; }
  .chips { display: none; }
  .panel__head { flex-wrap: wrap; padding-bottom: 6px; }
  .stagebar {
    top: 60px;
    padding: 6px 8px;
    gap: 6px;
    flex-wrap: nowrap;
  }
  .stagebar__label, .stagebar__hint { display: none; }
  .stagebar__tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    width: 100%;
    padding-bottom: 2px;
  }
  .stagebar__tabs::-webkit-scrollbar { display: none; }
  .stage { flex: none; font-size: 13px; padding: 8px 12px; }
  .teams--two { grid-template-columns: 1fr; max-width: 960px; }
  .authors { grid-template-columns: 1fr; }
  .footer { gap: 8px 12px; font-size: 8px; }
  .footer__dot, .footer__clock { display: none; }
}

@media (max-width: 420px) {
  .page-id b { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
