/* 「经历与奖项」一节（journey/）：时间线上的身份和照片、奖杯架、看大图的弹窗。
   徽章 canvas 是 16×16，按整数倍放大（靠 .place 继承下来的 pixelated）。 */
/* 名称、名次、说明里有年份和缩写：Pixelify Sans 粗体的 5 像 8、C 像 0（2026-11-22 截图看过），这些字用 Noto Sans SC；日期和小标签仍用像素字 */
:is(.timeline .what, .award-title, .award-result, .award-meta, .viewer figcaption) { font-family: 'Noto Sans SC', sans-serif; }
:is(.snap, .cubby, .viewer-close) { font: inherit; color: inherit; border: 0; padding: 0; background: none; cursor: pointer; }

/* 时间线：日期一列，名称和身份一列；有照片的那条照片排在第三列（只在那一条多出这一列）。左边一条像素竖线，每条经历一个方块节点；
   身份是一块青色小牌，后面接做了什么。日期和名称按第一行基线对齐。 */
.timeline { margin: 0; padding: 0; list-style: none; display: grid; }
.timeline li { position: relative; display: grid; grid-template-columns: 152px 1fr; column-gap: 24px; align-items: baseline; padding: 12px 0 12px 28px; }
.timeline .snap { grid-column: 3; }
.timeline li::before { content: ''; position: absolute; left: 4px; top: 0; bottom: 0; width: 4px; background: var(--indigo); }
.timeline li::after { content: ''; position: absolute; left: 0; top: 22px; width: 12px; height: 12px; background: var(--cyan); box-shadow: 0 0 0 2px var(--deep); }
.timeline .pending::after { background: var(--deep); box-shadow: inset 0 0 0 2px var(--cyan); }
.when { font: 700 calc(16px * var(--hs))/1.5 var(--hud); color: var(--gold); }
.what { display: grid; gap: 4px; }
.what strong { font-size: 24px; line-height: 1.25; }
.timeline .detail { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 16px; color: #b9c6ff; }
.timeline .pending .detail { color: var(--gold); }
/* 小牌：身份是青色，没解锁的奖是金色 */
:is(.tag, .lock) { padding: 4px 8px; font: 700 calc(16px * var(--hs))/1 var(--hud); color: var(--deep); text-transform: uppercase; }
.tag { background: var(--cyan); }
.lock { background: var(--gold); }
:lang(zh) :is(.tag, .lock) { letter-spacing: 0.08em; }

/* 照片和证书缩略图：同一种白边相片，下面一行字，点了看大图。证书有横有竖，整张放进框里不裁。 */
.snap { align-self: start; justify-self: start; display: grid; gap: 6px; padding: 6px 6px 8px; background: var(--white); color: var(--deep); font: 700 calc(16px * var(--hs))/1 var(--hud); text-transform: uppercase; box-shadow: 0 0 0 2px var(--deep), 6px 6px 0 var(--indigo); transition: translate 0.08s steps(2); }
.snap:is(:hover, :focus-visible) { translate: 0 -4px; }
/* 大小写在 img 的 width、height 上：时间线里的照片小一号（条目只有一两行字时，照片太高会在下一条前面空出一截），证书大一号 */
.snap img { display: block; object-fit: cover; }
.award-card .snap { order: -1; }
.award-card .snap img { object-fit: contain; }

/* 奖杯架：所有奖牌一排摆在一块木板上（窄屏每排 4 格，木板在背景里按排的高度重复画）；选中的格子亮荧光黄框、奖牌上下跳 */
.shelf {
  --cell: 96px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 28px 16px;
  margin: 12px 0 24px;
  padding: 0 12px 16px;
  background: repeating-linear-gradient(transparent 0 var(--cell), #e0954a var(--cell) calc(var(--cell) + 4px), #b86b2a 0 calc(var(--cell) + 8px),
    #7a3f16 0 calc(var(--cell) + 12px), rgba(10, 15, 61, 0.6) 0 calc(var(--cell) + 16px), transparent 0 calc(var(--cell) + 28px));
}
.cubby { display: grid; place-items: center; height: var(--cell); background: rgba(40, 36, 140, 0.55); box-shadow: inset 0 0 0 2px rgba(75, 194, 242, 0.45); }
.cubby canvas { width: 64px; height: 64px; }
.cubby[aria-selected='true'] { box-shadow: inset 0 0 0 4px var(--lime); }
.cubby[aria-selected='true'] canvas { animation: bob 0.8s steps(2) infinite; }

/* 选中的奖：所有卡叠在同一格（shelf.js 说了为什么），只显示选中的。证书排在左边、紧挨着说明（排在最右会在中间空出一大块），名次最显眼 */
.award-cards { display: grid; }
.award-card { grid-area: 1 / 1; display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; padding: 16px 16px 16px 20px; background: rgba(40, 36, 140, 0.5); box-shadow: inset 0 0 0 2px rgba(75, 194, 242, 0.35); }
.award-card:not(.shown) { visibility: hidden; }
.award-text { display: grid; gap: 4px; justify-items: start; }
.award-text > * { margin: 0; }
.award-title { font-size: 24px; line-height: 1.25; }
.award-result { font-size: 24px; line-height: 1.3; color: var(--lime); }
.award-meta { font-size: 16px; color: #b9c6ff; }

/* 看大图的弹窗。.frame 带的 position: relative 会盖掉弹窗默认的 fixed，弹窗就排到页面最上面、打开时把页面滚回顶上，所以这里写回 fixed */
.viewer { position: fixed; width: min(1000px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 52px 20px 20px; border: 0; color: var(--white); overflow: auto; }
.viewer::backdrop { background: rgba(5, 7, 31, 0.88); }
.viewer figure { margin: 0; display: grid; gap: 12px; justify-items: center; }
.viewer img { display: block; max-width: 100%; max-height: calc(100dvh - 220px); background: var(--white); box-shadow: 0 0 0 4px var(--white), 0 0 0 6px var(--deep); }
.viewer figcaption { display: grid; gap: 2px; text-align: center; font-size: 16px; color: #b9c6ff; }
.viewer figcaption strong { font-size: 24px; line-height: 1.3; color: var(--white); }
.viewer-close { position: absolute; top: 16px; right: 20px; font: 700 calc(16px * var(--hs))/1 var(--hud); color: var(--cyan); text-transform: uppercase; }
.viewer-close:hover { color: var(--lime); }

/* 窄一些的屏：照片挪到说明下面，不和名称抢宽度；奖杯架每排 4 格 */
@media (max-width: 1000px) {
  .timeline .snap { grid-column: 2; margin-top: 8px; }
  .shelf { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 560px) {
  .timeline li { grid-template-columns: 1fr; gap: 4px; }
  .timeline .snap { grid-column: auto; }
  .shelf { --cell: 64px; gap: 28px 8px; padding: 0 4px 16px; }
  .cubby canvas { width: 48px; height: 48px; }
  .award-card { grid-template-columns: 1fr; gap: 12px; }
  .award-card .snap { order: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .cubby[aria-selected='true'] canvas { animation: none; }
}
