/* 方向 C：玩家档案。两个参考站的实测色合在一起：夜空 #111b5e、#046dcf、#4bc2f2 和高亮 #f9ec88
   来自 stardewvalley.net；靛 #28248c、荧光黄 #e3ff37 来自 pixels.xyz；橙 #ff6633 来自 Stardew 的重点字。 */
:root {
  --deep: #0a0f3d;
  --indigo: #28248c;
  --cyan: #4bc2f2;
  --lime: #e3ff37;
  --gold: #f9ec88;
  --orange: #ff6633;
  --white: #f4f6ff;
  /* 场景盖不到的地方：天空色（量自 stage-bg.png 的上边）和地面色（量自 scene-*.png 的上下边草地；
     art/pixelize.py 把场景图上下边渐变成它，从这里读）。场景图显示的大小由 stage.js 按首屏的倍数设。 */
  --sky: #0c124f;
  --ground: #044242;
  --art-w: 1536px;
  --art-h: 1024px;
  --body: 'Pixelify Sans', 'Noto Sans SC', sans-serif;
}
/* 像素字只在 8 的倍数（16、24、32、40、48、64px）时笔画整齐，其余字号会糊，所以英文字号都取这几档。
   HUD 字按语言换：中文用 ZCOOL 打头，小标签整体乘 --hs 放大到和正文相称。
   语言写在元素的 lang 上（名字、P1、按键数字、EN 按钮是 en，中 按钮是 zh）。 */
:lang(en) { --hud: 'Silkscreen', monospace; --hs: 1; }
:lang(zh) { --hud: 'ZCOOL QingKe HuangYou', 'Noto Sans SC', sans-serif; --hs: 1.25; font-synthesis: none; }
/* 标了 lang 的元素自己按自己的语言取 HUD 字，不继承父元素按另一种语言算好的字体 */
:where(body [lang]) { font-family: var(--hud); }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--deep); color: var(--white); font: 400 16px/1.6 var(--body); overflow-x: hidden; }

/* 角上四个荧光黄折角的面板 */
.frame {
  position: relative;
  padding: 22px 24px;
  background:
    linear-gradient(var(--lime) 0 0) top left / 18px 4px no-repeat,
    linear-gradient(var(--lime) 0 0) top left / 4px 18px no-repeat,
    linear-gradient(var(--lime) 0 0) top right / 18px 4px no-repeat,
    linear-gradient(var(--lime) 0 0) top right / 4px 18px no-repeat,
    linear-gradient(var(--lime) 0 0) bottom left / 18px 4px no-repeat,
    linear-gradient(var(--lime) 0 0) bottom left / 4px 18px no-repeat,
    linear-gradient(var(--lime) 0 0) bottom right / 18px 4px no-repeat,
    linear-gradient(var(--lime) 0 0) bottom right / 4px 18px no-repeat,
    rgba(10, 15, 61, 0.86);
  box-shadow: inset 0 0 0 2px rgba(75, 194, 242, 0.35);
}
.label {
  margin: 0 0 10px;
  font: 700 calc(16px * var(--hs))/1 var(--hud);
  color: var(--cyan);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.bar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 12px 24px;
  background: linear-gradient(rgba(10, 15, 61, 0.95), rgba(10, 15, 61, 0));
}
.brand { font: 700 24px var(--hud); color: var(--lime); text-decoration: none; }
.links { display: flex; gap: 22px; margin-left: auto; }
.links a { font: 400 calc(16px * var(--hs)) var(--hud); color: var(--white); text-decoration: none; text-transform: uppercase; }
.links a:hover { color: var(--lime); }
.lang { display: flex; }
.lang button { font: 700 16px var(--hud); color: var(--white); background: transparent; border: 2px solid var(--cyan); padding: 4px 10px; cursor: pointer; }
.lang button + button { border-left: 0; }
.lang button[aria-pressed='true'] { background: var(--lime); color: var(--deep); border-color: var(--lime); }

/* 选人界面 */
.select { position: relative; min-height: 100vh; padding: 90px 24px 40px; display: grid; grid-template-rows: 1fr auto auto; gap: 18px; overflow: hidden; }
/* 首屏场景 canvas 铺满这一节，尺寸和像素放大倍数由 stage.js 设 */
.stage-bg { position: absolute; top: 0; left: 0; image-rendering: pixelated; }
.hud { position: relative; display: grid; grid-template-columns: minmax(260px, 340px) 1fr minmax(300px, 380px); gap: 24px; align-items: center; max-width: 1360px; width: 100%; margin: 0 auto; }
.player h1 { margin: 0; font: 700 64px/1 var(--body); color: var(--white); text-shadow: 4px 4px 0 var(--indigo); }
.lv { display: flex; gap: 10px; align-items: center; margin: 14px 0 12px; font: 400 calc(16px * var(--hs)) var(--hud); color: var(--gold); text-transform: uppercase; }
.lv-chip { padding: 4px 8px; background: var(--orange); color: var(--deep); font-weight: 700; font-size: 16px; line-height: 1; }
.role { margin: 0 0 12px; font-size: 16px; color: #b9c6ff; }
.tagline { margin: 0; font-size: 24px; line-height: 1.35; color: var(--lime); }

/* 角色画在背景 canvas 上，脚落在 .spot 底边中点（stage.js 按它的位置摆场景）；.spot 本身是进房间的链接。 */
.spot { position: relative; display: block; height: min(58vh, 460px); text-decoration: none; cursor: pointer; }

.abilities ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.ability, .slot, .ride {
  font: inherit;
  color: var(--white);
  background: rgba(40, 36, 140, 0.55);
  border: 0;
  box-shadow: inset 0 0 0 2px rgba(75, 194, 242, 0.45);
  cursor: pointer;
  transition: transform 0.08s steps(2);
}
.ability { width: 100%; display: grid; grid-template-columns: 32px 56px 1fr; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; text-align: left; }
.ability:hover { transform: translateX(-4px); }
:is(.ability, .slot, .ride)[aria-pressed='true'] { --xp: var(--orange); background: var(--lime); color: var(--deep); box-shadow: 4px 4px 0 var(--indigo); }
.ability kbd { display: grid; place-items: center; width: 32px; height: 32px; font: 700 16px var(--hud); color: var(--deep); background: var(--gold); }
.ability canvas { width: 56px; height: 56px; image-rendering: pixelated; background: var(--deep); }
.info { display: grid; grid-template-columns: 1fr auto; column-gap: 8px; align-items: baseline; }
:is(.ability, .slot, .ride) .name { font: 700 calc(16px * var(--hs))/1.2 var(--hud); text-transform: uppercase; }
.lvl { font-weight: 700; font-size: 16px; line-height: 1; color: var(--gold); }
.ability[aria-pressed='true'] .lvl { color: var(--indigo); }
:is(.ability, .slot, .ride) .trait { grid-column: 1 / -1; font-size: 16px; opacity: 0.85; }
/* 经验条：按等级占满级 99 的比例填色，每 8px 一格 */
.xp { grid-column: 1 / -1; height: 8px; margin-top: 4px; background: rgba(10, 15, 61, 0.8); box-shadow: 0 0 0 2px rgba(10, 15, 61, 0.8); }
.xp span { display: block; height: 100%; background: repeating-linear-gradient(90deg, var(--xp, var(--lime)) 0 6px, transparent 6px 8px); }
.hint { margin: 12px 0 0; font-size: 16px; color: #9fb0ee; }

.dialog { width: 100%; max-width: 860px; margin: 0 auto; min-height: 150px; }
.dialog:has(> .face) { display: grid; grid-template-columns: auto 1fr; column-gap: 20px; align-content: start; }
.dialog:has(> .face) > :not(.face) { grid-column: 2; }
/* 对话框左边是 Yuki 的 64×64 像素头像，放大 2 倍 */
.face { grid-row: 1 / span 3; width: 128px; height: 128px; image-rendering: pixelated; background: rgba(40, 36, 140, 0.55); box-shadow: inset 0 0 0 2px rgba(75, 194, 242, 0.45); }
.who { margin: 0 0 6px; font: 700 calc(16px * var(--hs)) var(--hud); color: var(--lime); text-transform: uppercase; }
.say { margin: 0 0 10px; font-size: 24px; line-height: 1.45; }
.caret { margin-left: 6px; color: var(--lime); font-size: 16px; animation: blink 0.8s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.tbd { margin: 0; font-size: 16px; color: var(--gold); }
.tbd::before { content: '+ '; }
.next { position: relative; justify-self: center; font: 400 calc(16px * var(--hs)) var(--hud); color: var(--cyan); text-decoration: none; text-transform: uppercase; letter-spacing: 0.14em; animation: blink 1.4s steps(1) infinite; }

/* 像素场景背景（下面几段和爱好房间）：景物在两边，中间放面板；--fill 填图盖不到的地方。 */
.place, .room { background: var(--scene) center / var(--art-w) var(--art-h) no-repeat, var(--fill); image-rendering: pixelated; }
/* 场景里的照片、证书、录屏是真图，不跟着像素化（:where 不加权重，像素头像这类自己写了 pixelated 的照旧） */
:where(.place, .room) :where(img, video) { image-rendering: auto; }
/* 下面几段：每段一张场景（assets/scene-<段>.png），上下边已经点阵渐变成地面色，段比图高时上下填地面色，接起来看不出缝。
   --narrow-x：窄屏只看得到场景的一条，挪到有景物的那一边。 */
.place { --fill: var(--ground); display: grid; align-content: center; min-height: var(--art-h); }
#about { --scene: url(assets/scene-about.png); --narrow-x: 4%; }
#journey { --scene: url(assets/scene-journey.png); --narrow-x: 96%; }
.wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 70px 24px; }
:is(.wrap, .room) h2 { margin: 0 0 14px; font: 700 40px/1.15 var(--hud); color: var(--white); text-transform: uppercase; text-shadow: 4px 4px 0 var(--indigo); }
.lede { margin: 0; font-size: 24px; max-width: 46ch; }
.status-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }
.quick { padding: 16px 18px; background: rgba(40, 36, 140, 0.6); }
.quick h3 { margin: 0 0 10px; font: 700 calc(16px * var(--hs)) var(--hud); color: var(--lime); text-transform: uppercase; }
.quick ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 16px; }
.quick li::before { content: '▸ '; color: var(--cyan); }

/* 经历与奖项：两块面板都占满内容宽，上下排（并排时一高一矮、一宽一窄，用户 2026-11-22 说不对称）；里面的时间线、奖杯架在 journey/journey.css */
.journey { display: grid; gap: 24px; }

.foot { padding: 30px 16px 40px; text-align: center; font: 400 16px var(--body); color: #9fb6c8; background: var(--ground); }
.foot .legal { max-width: 720px; margin: 8px auto 0; font-family: var(--body); } /* 标了 lang=en，不让它换成 HUD 字 */

:lang(zh) .links a, :lang(zh) .label, :lang(zh) :is(.ability, .slot) .name, :lang(zh) .who, :lang(zh) .game h3 { letter-spacing: 0.08em; }
:lang(zh) :is(.wrap, .room) h2 { letter-spacing: 0.06em; }

/* 首屏角色可以点：头顶一个上下跳的箭头，点了进这个技能的房间。--head 是角色头顶离 .spot 底边的高度，由场景设。 */
.pick-arrow { position: absolute; bottom: calc(var(--head) + 12px); left: 50%; translate: -50% 0; font: 700 24px var(--hud); color: var(--lime); text-shadow: 3px 3px 0 var(--indigo); animation: bob 0.8s steps(2) infinite; }
@keyframes bob { 50% { transform: translateY(8px); } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
/* 实心按钮：首屏的「进入」、骑行回放的播放键（rides/rides.css 里换成金色） */
.enter, .ride-play { padding: 8px 12px; font: 700 calc(16px * var(--hs))/1 var(--hud); color: var(--deep); background: var(--lime); text-decoration: none; text-transform: uppercase; box-shadow: 4px 4px 0 var(--indigo); }
:is(.enter, .ride-play):hover { translate: 0 -2px; }
.enter { position: absolute; top: 16px; right: 20px; }

@media (max-width: 1000px) {
  .hud { grid-template-columns: 1fr; }
  .spot { order: -1; height: 340px; }
  .place { background-position-x: var(--narrow-x); }
  .status-grid { grid-template-columns: 1fr; }
  .select { padding-top: 70px; }
}
@media (max-width: 560px) {
  .enter { position: static; justify-self: start; margin-bottom: 10px; }
  .face { width: 64px; height: 64px; }
  .bar { gap: 12px; padding: 10px 12px; }
  .links { display: none; }
  .lang { margin-left: auto; }
  .select, .wrap { padding-left: 16px; padding-right: 16px; }
  .frame { padding: 18px 16px; }
  .say, .lede { font-size: 16px; }
  .player h1 { font-size: 48px; }
  :is(.wrap, .room) h2 { font-size: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .caret, .next, .pick-arrow { animation: none; }
}

