/* ============ 黑客松收藏册 · HACKATHON ALBUM ============ */
/* 世界：票券收藏册。纸、活版墨、齿孔、邮戳。seed:849f338398a013c4 */

@font-face {
  font-family: "Rozha One";
  src: url("../fonts/rozha-one.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Courier Prime";
  src: url("../fonts/courier-prime-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Courier Prime";
  src: url("../fonts/courier-prime-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --desk: #e7dfcd;        /* 桌面 */
  --paper: #f5efe2;       /* 册页 */
  --ticket: #fbf7ec;      /* 票面 */
  --ink: #23211c;         /* 活版墨 */
  --ink-2: #524b3d;       /* 次级墨 */
  --red: #b5351f;         /* 邮戳红 */
  --perf: #c5b998;        /* 齿孔线 */
  --hatch: rgba(183, 173, 152, .16);
  --phase-reg: #b5351f;
  --phase-build: #c0762a;
  --phase-judge: #8a8266;
  --phase-announce: #5f6b78;
  --serif: "Noto Serif CJK SC", "Noto Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif;
  --display: "Rozha One", "Noto Serif CJK SC", "Songti SC", "SimSun", Georgia, serif;
  --mono: "Courier Prime", ui-monospace, "Courier New", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--desk);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.65;
  padding: clamp(16px, 3vw, 40px) clamp(12px, 3vw, 48px) 64px;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--red); color: var(--paper); }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 1px; }

a { color: var(--ink); }

/* ---------- 册页 ---------- */
.album {
  max-width: 1160px;
  margin: 0 auto;
  background: var(--paper);
  border: 1px solid var(--perf);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.6), 0 16px 36px rgba(35,33,28,.16);
  padding: clamp(22px, 4vw, 48px) clamp(18px, 4vw, 56px) clamp(30px, 4vw, 56px);
}

.masthead {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 18px;
}

.masthead h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.1;
  letter-spacing: .01em;
}

.masthead .vol {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .28em;
  color: var(--ink-2);
}

.nextbeat {
  font-family: var(--mono);
  border: 1.5px solid var(--ink);
  background: var(--ticket);
  padding: 8px 14px;
  font-size: 12px;
  letter-spacing: .18em;
  color: var(--ink-2);
  white-space: nowrap;
}

.nextbeat b {
  display: block;
  font-size: 20px;
  letter-spacing: .06em;
  color: var(--red);
  margin-top: 2px;
}

.masthead-side { display: flex; align-items: flex-end; gap: 18px; }

.tickets noscript, .spread noscript { display: block; padding: 16px 4px; }

/* ---------- 票券 ---------- */
.tickets { margin-top: clamp(28px, 4vw, 46px); display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(24px, 3vw, 36px); }

.ticket {
  display: grid;
  grid-template-columns: 1fr 250px;
  background: var(--ticket);
  border: 1.5px solid var(--ink);
  box-shadow: 0 3px 10px rgba(35,33,28,.18), 0 16px 30px rgba(35,33,28,.12);
  color: var(--ink);
  text-decoration: none;
  position: relative;
  transition: transform .35s cubic-bezier(.16, 1, .3, 1), box-shadow .35s cubic-bezier(.16, 1, .3, 1);
}

.ticket:hover, .ticket:focus-visible {
  transform: translateY(-4px) rotate(-.15deg);
  box-shadow: 0 8px 16px rgba(35,33,28,.2), 0 24px 38px rgba(35,33,28,.16);
}

.ticket.tearing { transform: translateY(-2px); }
.ticket.tearing .t-stub { transform: rotate(1.6deg) translate(5px, -7px); }
.ticket.tearing::after { opacity: 1; }

.t-body { padding: clamp(20px, 3vw, 34px) clamp(18px, 3vw, 38px) 26px; min-width: 0; }

.t-name {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(30px, 4.6vw, 52px);
  line-height: 1.06;
}

.t-sub { font-size: clamp(15px, 1.8vw, 19px); color: var(--ink-2); margin-top: 6px; }

.t-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 14px 26px;
  margin-top: clamp(16px, 2.4vw, 26px);
  border-top: 1px solid var(--ink);
  padding-top: 14px;
}

.t-facts b {
  display: block;
  font-family: var(--mono);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: .22em;
  color: var(--ink-2);
  margin-bottom: 3px;
}

.t-facts span { font-family: var(--mono); font-size: 15px; letter-spacing: .02em; }

.t-tags { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }

.t-tags i {
  font-style: normal;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .12em;
  border: 1px solid var(--ink-2);
  color: var(--ink-2);
  padding: 2px 9px;
}

/* 骑缝章 */
.corner-seal {
  position: absolute;
  top: -16px;
  left: -16px;
  width: 58px;
  height: 58px;
  border: 2px solid rgba(181, 53, 31, .55);
  border-radius: 50%;
  transform: rotate(22deg);
  mix-blend-mode: multiply;
  pointer-events: none;
}

.corner-seal::before {
  content: "ALBUM";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .22em;
  color: rgba(181, 53, 31, .6);
}

/* 节点标注：引出线注释 */
.t-note {
  position: absolute;
  right: 268px;
  bottom: 20px;
  width: 168px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: .06em;
  color: var(--ink-2);
}

.t-note::before {
  content: "";
  position: absolute;
  left: 100%;
  bottom: 6px;
  width: 44px;
  height: 1px;
  background: var(--ink);
  transform: rotate(24deg);
  transform-origin: left center;
}

/* 齿孔 */
.t-perf {
  position: relative;
  background:
    radial-gradient(circle at 50% 0, var(--desk) 7px, transparent 7.5px) top / 100% 20px repeat-y,
    radial-gradient(circle at 50% 100%, var(--desk) 7px, transparent 7.5px) bottom / 100% 20px repeat-y,
    linear-gradient(var(--ticket), var(--ticket));
  border-left: 1px dashed var(--perf);
  border-right: 1px dashed var(--perf);
}

/* 票根 */
.t-stub {
  padding: 22px 20px 18px;
  background: linear-gradient(105deg, #f3ecd9, #f6f0e0);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transform-origin: 78% 30%;
  transition: transform .3s cubic-bezier(.16, 1, .3, 1);
}

.ticket:hover .t-stub, .ticket:focus-visible .t-stub { transform: rotate(.7deg) translate(2px, -3px); }

.t-serial { font-family: var(--mono); font-size: 11px; letter-spacing: .2em; color: var(--ink-2); }

.t-serial b { display: block; font-size: 16px; font-weight: 700; color: var(--ink); letter-spacing: .1em; margin-top: 3px; }

.postmark {
  width: 148px;
  height: 148px;
  margin: 0 auto;
  border: 2.5px solid rgba(181, 53, 31, .82);
  border-radius: 50%;
  color: var(--red);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  transform: rotate(-10deg);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-align: center;
  mix-blend-mode: multiply;
}

.postmark b { font-size: 16px; letter-spacing: .16em; font-weight: 700; }

.postmark .pm-date { font-size: 12.5px; }

.barcode {
  height: 30px;
  background: repeating-linear-gradient(90deg,
    var(--ink) 0 2px, transparent 2px 5px,
    var(--ink) 5px 6px, transparent 6px 10px,
    var(--ink) 10px 13px, transparent 13px 15px);
}

/* 阶段色温条 */
.t-phases {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 8px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.t-phases span:nth-child(1) { background: var(--phase-reg); }
.t-phases span:nth-child(2) { background: var(--phase-build); }
.t-phases span:nth-child(3) { background: var(--phase-judge); }
.t-phases span:nth-child(4) { background: var(--phase-announce); }

/* 撕票高光 */
.ticket::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.35) 48%, transparent 60%);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}

/* 空收藏槽 */
.slots {
  margin-top: clamp(26px, 3.6vw, 40px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.slot {
  border: 1.5px dashed var(--perf);
  min-height: 118px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .3em;
  background: repeating-linear-gradient(45deg, transparent 0 14px, var(--hatch) 14px 15px);
}

/* ---------- 册尾 ---------- */
.album-foot {
  margin-top: clamp(34px, 4vw, 52px);
  border-top: 1px solid var(--ink);
  padding-top: 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--ink-2);
}

/* ---------- 详情页 ---------- */
.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .18em;
  color: var(--ink-2);
  text-decoration: none;
  margin-bottom: 22px;
}

.back:hover { color: var(--red); }

.spread { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(26px, 3.6vw, 44px); }

.spread > .ticket { min-width: 0; }

.tickets > .ticket { min-width: 0; }

.d-poster img { display: block; width: 100%; height: auto; max-width: 100%; }

.spread .ticket { grid-template-columns: 1fr 280px; }
.spread .ticket:hover { transform: none; box-shadow: 0 3px 0 rgba(35,33,28,.28), 0 14px 26px rgba(35,33,28,.14); }

.d-poster { margin-top: 18px; border: 1px solid var(--ink); padding: 10px; background: var(--ticket); transform: rotate(.6deg); }

.d-poster img { display: block; width: 100%; height: auto; max-width: 100%; }

.d-poster figcaption {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--ink-2);
  margin-top: 8px;
}

.d-poster figcaption a { color: var(--ink-2); }

.d-host { margin-top: 14px; font-size: 15px; color: var(--ink-2); max-width: 62ch; }

.block { border-top: 2px solid var(--ink); padding-top: 18px; }

.block h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.15;
  margin-bottom: 18px;
}

.block h2 small {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .26em;
  color: var(--ink-2);
  margin-left: 14px;
  vertical-align: 2px;
}

/* 时间线：检票联 */
.tl { display: grid; gap: 0; border: 1.5px solid var(--ink); background: var(--ticket); }

.tl-row {
  display: grid;
  grid-template-columns: 150px 1fr auto;
  gap: 8px 20px;
  align-items: baseline;
  padding: 13px 20px;
  border-bottom: 1px dashed var(--perf);
}

.tl-row:last-child { border-bottom: none; }

.tl-date { font-family: var(--mono); font-size: 15px; font-weight: 700; letter-spacing: .04em; }

.tl-label { font-size: 15.5px; }

.tl-dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--ink); align-self: center; }

.tl-row.done .tl-dot { background: var(--ink); }
.tl-row.now .tl-dot { background: var(--red); border-color: var(--red); box-shadow: 0 0 0 3px rgba(181,53,31,.18); }
.tl-row.now .tl-date { color: var(--red); }
.tl-row.done { color: var(--ink-2); }

/* 赛道副票 */
.routes { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }

.route {
  border: 1.5px solid var(--ink);
  background: var(--ticket);
  padding: 16px 18px 14px;
  position: relative;
}

.route::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 10px;
  width: 1px;
  border-left: 1px dashed var(--perf);
}

.route h3 { font-family: var(--display); font-weight: 400; font-size: 20px; line-height: 1.2; padding-left: 14px; }

.route span { font-family: var(--mono); font-size: 13px; letter-spacing: .2em; color: var(--red); padding-left: 14px; }

/* 条款 */
.conds { list-style: none; display: grid; gap: 12px; max-width: 78ch; }

.conds li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: baseline; }

.conds .n {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .08em;
  color: var(--red);
  border: 1px solid rgba(181,53,31,.5);
  border-radius: 50%;
  width: 34px; height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.conds p { font-size: 15.5px; line-height: 1.7; }

.factsheet { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px 28px; margin-bottom: 20px; max-width: 78ch; }

.factsheet div { border-left: 1px solid var(--perf); padding-left: 14px; }

.factsheet b { display: block; font-family: var(--mono); font-weight: 400; font-size: 11px; letter-spacing: .22em; color: var(--ink-2); margin-bottom: 2px; }

/* 评分：活版占比条 */
.judge { display: grid; gap: 14px; max-width: 78ch; }

.j-row { display: grid; grid-template-columns: 1fr; gap: 4px; }

.j-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }

.j-head h3 { font-size: 16.5px; font-weight: 700; }

.j-head .w { font-family: var(--mono); font-size: 17px; font-weight: 700; color: var(--red); }

.j-bar { height: 13px; border: 1px solid var(--ink); background: repeating-linear-gradient(90deg, var(--ink) 0 3px, transparent 3px 6px); background-size: 0% 100%; background-repeat: no-repeat; }

.j-bar i { display: block; height: 100%; background: repeating-linear-gradient(90deg, var(--ink) 0 3px, transparent 3px 6px); }

.j-desc { font-size: 14px; color: var(--ink-2); }

/* 价目表 */
.prizes { border: 1.5px solid var(--ink); background: var(--ticket); max-width: 78ch; }

.prizes .p-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 11px 20px;
  border-bottom: 1px dashed var(--perf);
}

.prizes .p-row:last-child { border-bottom: none; }

.prizes .p-name { font-weight: 700; font-size: 15.5px; white-space: nowrap; }

.prizes .p-detail { font-size: 13.5px; color: var(--ink-2); }

.prizes .p-lead { flex: 1; border-bottom: 1.5px dotted var(--perf); transform: translateY(-4px); }

.prizes .p-amt { font-family: var(--mono); font-weight: 700; font-size: 16px; color: var(--red); white-space: nowrap; }

/* 册注 */
.notes { list-style: none; display: grid; gap: 12px; max-width: 78ch; }

.notes li { position: relative; padding-left: 26px; font-size: 15.5px; line-height: 1.7; }

.notes li::before {
  content: "※";
  position: absolute;
  left: 0;
  color: var(--red);
}

/* 回执联 */
.receipt { border: 1.5px solid var(--ink); background: var(--ticket); padding: 20px 22px; max-width: 78ch; }

.receipt h3 { font-family: var(--mono); font-size: 12px; font-weight: 400; letter-spacing: .3em; color: var(--ink-2); margin-bottom: 12px; }

.receipt ul { list-style: none; display: grid; gap: 9px; }

.receipt a {
  font-family: var(--mono);
  font-size: 15px;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--perf);
}

.receipt a:hover { color: var(--red); text-decoration-color: var(--red); }

.receipt .src { margin-top: 14px; font-size: 12.5px; color: var(--ink-2); line-height: 1.7; }

/* ---------- 动效 ---------- */
@keyframes settle { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.ticket { animation: settle .5s cubic-bezier(.16, 1, .3, 1) backwards; }

.tickets .ticket:nth-child(2) { animation-delay: .07s; }
.tickets .ticket:nth-child(3) { animation-delay: .14s; }

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

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .t-note { display: none; }
}

@media (max-width: 720px) {
  .ticket, .spread .ticket { grid-template-columns: 1fr; }
  .t-perf { grid-column: 1; grid-row: 2; height: 26px; background:
      radial-gradient(circle at 0 50%, var(--desk) 7px, transparent 7.5px) left / 22px 100% repeat-x,
      radial-gradient(circle at 100% 50%, var(--desk) 7px, transparent 7.5px) right / 22px 100% repeat-x,
      linear-gradient(var(--ticket), var(--ticket));
      border: none; border-top: 1px dashed var(--perf); border-bottom: 1px dashed var(--perf); }
  .t-stub { grid-row: 3; }
  .t-phases { bottom: auto; top: 0; }
  .ticket:hover .t-stub { transform: none; }
  .tl-row { grid-template-columns: 1fr auto; }
  .tl-date { grid-column: 1 / -1; }
  .postmark { width: 128px; height: 128px; }
}

/* ---------- 打印 ---------- */
@media print {
  body { background: none; padding: 0; }
  .album { box-shadow: none; }
  .ticket { box-shadow: none; }
  .back, .nextbeat { display: none; }
}
