/* 足一把-生涯模拟器 —— 样式
   版式照 copero 的生涯模拟器（OVR 徽章、年龄时间线、球场选位、球衣），
   配色和控件质感照「足一把」的墨绿主题。只有这一套配色，没有浅色主题：

     · 近黑墨绿打底，面板只比底色亮一点点，层次靠 1px 描边而不是大块色差
     · 按钮和卡片是 7~10px 小圆角，不用胶囊
     · 交互反馈统一成一条：hover 时描边变绿，再加一圈 inset 内阴影当作加粗
     · 主按钮绿底深字（--accent / --accent-on），字距 .06em，字号偏小
     · OVR 徽章和时间线的能力值用金色，跟满屏的绿拉开

   颜色存 HSL 三元组，用的时候 hsl(var(--bg))，要透明度就 hsl(var(--bg) / .5)。
*/

* { margin: 0; padding: 0; box-sizing: border-box; }

/* ================= 自托管的 emoji 字体 =================

   这个库里用到 179 个不同的 emoji，其中六个在 Win10 自带的 Segoe UI Emoji
   （1.29）里根本没有：🪖 头盔、🫶 手心、🪜 梯子、🩻 X 光、🪪 证件、🩼 拐杖 ——
   全是 Emoji 12.1 之后才进标准的，玩家屏幕上那几处是空方框。
   （查法：拿 seguiemj.ttf 的 cmap 逐个比对，不是数方框数出来的。
     更老的 Win10 缺得更多，这只是这一台的结果。）

   所以自带一份 Noto Color Emoji：全量 5.4 MB，用 pyftsubset 按项目
   真正用到的那批字符裁到 406 KB。加新事件、用了新 emoji 之后要重裁一次，
   不然新加的那个照样是方框 —— 裁的命令写在 tools/preview-emoji.js 顶上。

   **unicode-range 是这条的关键**：只有 emoji 那几段码位才会来找这个字体，
   中英文一个字都不会落到它身上，所以放在 font-family 最前面也不影响正文。
   CSP 是 default-src 'self'，字体走 font-src 由它兜底 —— 自托管正好合规，
   挂 CDN 反而会被拦下来。
   COLRv1 在老 Safari 上不支持，那边自动退回系统字体，也就是现在的样子。 */
@font-face {
  font-family: "Noto Emoji Local";
  src: url("assets/fonts/noto-emoji-subset.woff2") format("woff2");
  font-display: swap;
  unicode-range: U+1F000-1FAFF, U+2600-27BF, U+2B00-2BFF, U+FE0F, U+200D;
}

:root {
  --font: "Noto Emoji Local", "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC",
          "HarmonyOS Sans SC", "Source Han Sans SC", "Noto Sans SC",
          "Segoe UI", "Microsoft YaHei", sans-serif;
  /* 圆角从一个源派生。原来 --r-card 10px 和 --r-row 7px 是两个各写各的数，
     只差 3px —— 近看没层次，远看又不统一。现在 14 / 9，差 5px，
     「卡片」和「行」的关系一眼读得出来。改这一个数，全站跟着走。 */
  --radius: 14px;
  --r-card: var(--radius);
  --r-row: calc(var(--radius) - 5px);
  --maxw: 460px;
  /* 生涯页和结算页用的宽度。940 → 1180：两栏在大屏上挤着，
     年表那几列（年龄/俱乐部/能力/三项数据）宽度不够，队名和徽章老是换行。 */
  --maxw-wide: 1180px;
  /* 首页在宽屏用的宽度。不跟着 1180 走：首页统共就那么点东西，
     铺到 1180 之后两栏各 560，一行能排四十个字，比窄栏还难读。 */
  --maxw-intro: 920px;
}

/* ---------- 墨绿（唯一一套）---------- */
/* 2026-08-14：分块的方式试过一次「撤线 + 提亮」，又退回来了。

   试的那一版把 --border 压到几乎看不见，靠卡片比底色亮一档来分块
   （暗色界面的通行做法）。用户看完的判断是「曝光太重了，颜色改回之前的，
   还是要能看到线条」—— 这套界面满屏是队徽、球衣、金色徽章和队色卡片，
   底子一提亮，那些东西就没有地方跳了；而细线在这儿也不是噪音，
   它是把一屏十几块内容分开的东西。

   所以亮度和描边全部回到原值，一个数不差。这一版真正留下来的是别的几样：
   圆角一个源派生、hover 不再用内阴影、焦点圈、间距落到 4px 标尺、
   中文字距修正 —— 那几条都不动底色，也就没有「曝光」的问题。 */
html {
  --bg: 150 7% 6%;
  --card: 140 7% 9%;
  --row: 135 7% 11%;
  --row-hi: 130 6% 15%;
  --border: 129 6% 21%;
  --border-strong: 127 6% 27%;
  --text: 84 10% 93%;
  --muted: 128 5% 63%;
  --faint: 127 3% 53%;
  --accent: 136 39% 51%;
  --accent-on: 130 30% 8%;
  --btn-bg: 120 8% 21%;
  --gold1: 40 66% 55%;
  --gold2: 32 62% 44%;
  --warning: 40 66% 55%;
  --failure: 8 62% 58%;
  --info: 202 45% 60%;
  --scrim: 150 10% 2%;
}
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: hsl(var(--bg));
  color: hsl(var(--text));
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
}
body.no-actionbar { padding-bottom: 2rem; }

/* ================= 顶栏 ================= */
.topbar {
  position: relative;
  display: flex; align-items: center; justify-content: flex-start;
  flex-wrap: wrap; row-gap: .5rem;
  padding: .8rem 3.4rem .8rem 1rem;
  border-bottom: 1px solid hsl(var(--border));
}
.brand {
  display: inline-flex; align-items: center; gap: .45rem;
  background: none; border: 0; padding: 0; cursor: pointer;
  font-family: inherit; color: inherit;
  font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em;
}
.brand-mark {
  display: grid; place-items: center;
  width: 1.5rem; height: 1.5rem; border-radius: 6px;
  background: hsl(var(--text)); color: hsl(var(--bg)); font-size: .82rem;
}
.corner-btn {
  position: absolute; right: .75rem; top: 50%; transform: translateY(-50%);
  font-family: inherit; font-size: .74rem;
  padding: .32rem .6rem; border-radius: var(--r-row); letter-spacing: .06em;
  border: 1px solid hsl(var(--border));
  background: transparent; color: hsl(var(--faint)); cursor: pointer; transition: all .15s;
}
.corner-btn:hover { color: hsl(var(--text)); border-color: hsl(var(--muted)); }

/* 姊妹站入口（两个）。margin-right:auto —— auto 外边距先吃掉所有剩余空间，
   所以这一组紧挨在标题右边、待在左上角，不会被推到顶栏另一头。
   这里破了「强调色只给主按钮和选中项」的规矩：顶栏本来没有强调色元素，
   两块实心绿在这儿不和别处抢视线。两个入口分量一样，别改成一主一次。
   小圆点会呼吸，把眼睛勾过来；prefers-reduced-motion 下停掉。 */
.brand-links {
  display: flex; align-items: center; gap: .4rem;
  margin: 0 auto 0 .7rem; min-width: 0;
}
.brand-link {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .3rem .6rem; border-radius: 999px;
  background: hsl(var(--accent)); color: hsl(var(--accent-on));
  font-size: .68rem; font-weight: 650; letter-spacing: .04em;
  white-space: nowrap; text-decoration: none;
  transition: transform .15s, filter .15s, box-shadow .15s;
}
.brand-link:hover {
  transform: translateY(-1px); filter: brightness(1.07);
  box-shadow: 0 3px 12px hsl(var(--accent) / .28);
}
.brand-link:active { transform: translateY(0); }
.bl-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: hsl(var(--accent-on)); opacity: .85;
  animation: bl-pulse 1.9s ease-in-out infinite;
}
@keyframes bl-pulse {
  0%, 100% { opacity: .25; transform: scale(.8); }
  50%      { opacity: 1;   transform: scale(1.15); }
}
@media (prefers-reduced-motion: reduce) {
  .bl-dot { animation: none; opacity: .85; }
  .brand-link:hover { transform: none; }
}
/* 窄屏：标题一行，两个入口整组折到第二行居中。生涯页顶栏要压高度，那里收掉（见文件末） */
@media (max-width: 600px) {
  .topbar { padding: .7rem 3.4rem .6rem 1rem; }
  .brand-links { order: 3; width: 100%; margin: 0; justify-content: center; gap: .35rem; }
  .brand-link { font-size: .62rem; padding: .26rem .5rem; gap: .3rem; }
  .bl-dot { width: 4px; height: 4px; }
}

/* ================= 布局 ================= */
#app { max-width: var(--maxw); margin: 0 auto; padding: 1.1rem 1rem 0; }
#app.wide { max-width: var(--maxw-wide); }
.view { animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.hidden { display: none !important; }

/* ================= 首页 ================= */
.intro { text-align: center; }
/* 窄屏就是一列，跟改之前一样；宽屏那套在文件末尾的 @media 里 */
.intro-grid { display: grid; gap: 0; }

/* 「家底」那一排：事件 / 结局 / 球队 / 从几岁开始。
   数字用 --gold（全站给「值得记住的数」保留的那套色），
   底下的名目压到 faint —— 这一排是给人扫一眼的，不是让人读的。 */
.intro-facts {
  list-style: none; display: grid; grid-template-columns: repeat(4, 1fr);
  gap: .4rem; margin-top: 1.1rem;
}
.intro-facts li {
  display: flex; flex-direction: column; align-items: center; gap: .1rem;
  padding: .6rem .2rem; border-radius: var(--r-row);
  background: hsl(var(--card)); border: 1px solid hsl(var(--border));
}
.intro-facts b {
  font-size: 1.15rem; font-weight: 750; color: hsl(var(--gold1));
  font-variant-numeric: tabular-nums; line-height: 1.1;
}
.intro-facts span { font-size: .66rem; color: hsl(var(--faint)); }
/* 站名。比 eyebrow 大两档、亮一档 —— 这两行是「谁」和「什么」的关系，
   字号一样的话读起来是并列的两个词。前面那个圆点是顶栏 brand-mark 的呼应。 */
.hero-brand {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: 1.1rem; font-weight: 800; letter-spacing: .06em;
  color: hsl(var(--text));
}
.hero-brand::before {
  content: ""; width: .42rem; height: .42rem; border-radius: 50%;
  background: hsl(var(--accent));
}
.eyebrow {
  font-size: .7rem; font-weight: 700; letter-spacing: .2em;
  text-transform: uppercase; color: hsl(var(--faint));
  margin-top: .15rem;
}
.hero-title {
  margin-top: .9rem;
  font-size: 1.9rem; font-weight: 800; letter-spacing: -.025em; line-height: 1.15;
}
.hero-art {
  margin: 1.2rem auto 0; width: 100%; aspect-ratio: 4 / 3;
  border-radius: var(--r-card); overflow: hidden;
  border: 1px solid hsl(var(--border));
}
.hero-art svg { display: block; width: 100%; height: 100%; }
.hero-sub { margin-top: 1.1rem; font-size: .9rem; color: hsl(var(--muted)); }

.segmented {
  display: flex; gap: .25rem; margin: 1.4rem auto 0;
  padding: .25rem; border-radius: var(--r-card);
  background: hsl(var(--card)); border: 1px solid hsl(var(--border));
}
.seg {
  flex: 1; font-family: inherit; font-size: .86rem; font-weight: 650;
  padding: .5rem .3rem; border: 0; border-radius: var(--r-row); letter-spacing: .06em;
  background: transparent; color: hsl(var(--faint)); cursor: pointer;
  transition: background .18s, color .18s;
}
.seg:hover { color: hsl(var(--text)); }
.seg.selected { background: hsl(var(--accent)); color: hsl(var(--accent-on)); }
.seg-note { margin-top: .7rem; font-size: .8rem; color: hsl(var(--faint)); min-height: 1.2em; }

/* ================= 按钮 ================= */
.btn {
  display: block; width: 100%;
  font-family: inherit; font-size: .86rem; font-weight: 550; letter-spacing: .06em;
  padding: .7rem 1.1rem; border-radius: var(--r-row);
  border: 1px solid hsl(var(--border-strong));
  background: hsl(var(--btn-bg)); color: hsl(var(--text));
  cursor: pointer; text-align: center;
  /* 只过渡真正要动的那几样，不写 all —— all 会把将来加的任何属性
     都一起带上过渡，出问题的时候极难查 */
  transition: border-color .15s ease-out, background-color .15s ease-out,
              box-shadow .15s ease-out, transform .15s ease-out;
}
/* hover 原来是 box-shadow: inset 0 0 0 1px，效果等于把 1px 边框加粗成 2px：
   暗底上看着像描了一圈毛边，按钮还会有一瞬间的「变胖」。
   换成边框提亮 + 底色抬一档 + 上浮 1px —— 都是明度和位移，不改尺寸，也就不会抖。 */
.btn:hover {
  border-color: hsl(var(--accent) / .8);
  background: hsl(var(--row-hi));
  box-shadow: 0 3px 8px hsl(var(--scrim) / .5), 0 0 0 1px hsl(var(--accent) / .35);
  transform: translateY(-1px);
}
.btn-primary {
  background: hsl(var(--accent)); border-color: hsl(var(--accent));
  color: hsl(var(--accent-on)); font-weight: 650;
}
.btn-primary:hover {
  background: hsl(var(--accent)); filter: brightness(1.06);
  box-shadow: 0 3px 10px hsl(var(--accent) / .22);
}
.btn:active, .opt:active { transform: translateY(0); }
.btn:disabled {
  opacity: .5; cursor: default; filter: none; box-shadow: none; transform: none;
}
/* 焦点圈。原来只有浏览器默认的那一圈，在近黑的墨绿底上几乎看不见 ——
   用键盘玩的人等于全程在盲点里。focus-visible 只在键盘操作时出现，
   鼠标点击不触发，所以不影响原来的手感。 */
.btn:focus-visible, .opt:focus-visible,
.seg:focus-visible, .mini-btn:focus-visible {
  outline: 2px solid hsl(var(--accent) / .7);
  outline-offset: 2px;
}
.btn-stack { display: grid; gap: .5rem; margin-top: 1.3rem; }

.actionbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; gap: .6rem;
  max-width: var(--maxw); margin: 0 auto;
  padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom, 0px));
  background: hsl(var(--bg) / .93);
  backdrop-filter: blur(12px);
  border-top: 1px solid hsl(var(--border));
}
.actionbar .btn { flex: 1; }
.actionbar .btn-back { flex: 0 0 34%; }

/* ================= 分步页头 ================= */
.step-head { margin-bottom: 1.1rem; }
.step-title { font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; }
.progress { margin-top: .7rem; height: 5px; border-radius: 999px; background: hsl(var(--row)); overflow: hidden; }
.progress-fill { height: 100%; border-radius: 999px; background: hsl(var(--accent)); transition: width .35s ease; }
.step-sub { margin-top: .6rem; font-size: .82rem; color: hsl(var(--faint)); }

/* ================= 下一世 =================
   身份流程顶上那条「第 N 世」提示，和结算页「下一世」按钮下面那行小字。
   用金色而不是主色调：这不是一个可点的东西，是一句「你带着东西来的」。 */
.legacy-banner {
  display: flex; align-items: baseline; gap: .6rem;
  margin-bottom: .8rem; padding: .55rem .8rem;
  border-radius: var(--r-row);
  background: hsl(var(--gold1) / .09);
  box-shadow: inset 0 0 0 1px hsl(var(--gold1) / .3);
}
.legacy-gen {
  flex-shrink: 0;
  font-size: .74rem; font-weight: 800; letter-spacing: .04em;
  color: hsl(var(--gold1));
}
.legacy-bits { min-width: 0; font-size: .76rem; color: hsl(var(--muted)); }
.legacy-note {
  margin: -.15rem 0 .25rem;
  text-align: center; font-size: .75rem; line-height: 1.5;
  color: hsl(var(--faint));
}

/* ================= 选择列表 ================= */
.panel {
  background: hsl(var(--card)); border: 1px solid hsl(var(--border));
  border-radius: var(--r-card); padding: .5rem;
}
.pick-list { display: grid; gap: .3rem; }
.pick {
  display: flex; align-items: center; gap: .7rem; width: 100%;
  padding: .7rem .8rem; border: 0; border-radius: var(--r-row);
  background: transparent; color: inherit; font-family: inherit;
  text-align: left; cursor: pointer;
}
.pick:hover { background: hsl(var(--row)); box-shadow: inset 0 0 0 1px hsl(var(--accent)); }
.pick.selected { background: hsl(var(--row)); box-shadow: inset 0 0 0 1px hsl(var(--accent)); }
.pick-main { min-width: 0; flex: 1; }
.pick-name { display: block; font-size: .92rem; font-weight: 650; }
.pick-desc { display: block; font-size: .76rem; color: hsl(var(--faint)); margin-top: .1rem; }
.swatch { width: 1.5rem; height: 1.5rem; border-radius: 5px; flex-shrink: 0; }

/* ================= 心仪球队 =================
   一百二十多支队摆一屏读不完，所以是「先挑联赛、再挑队」：
   上面一条横滚的联赛标签，下面一格队徽网格。
   「随缘」单独摆在最上面而且默认选中 —— 不指定是这一步的正常答案。 */
.dream-none {
  display: block; width: 100%; margin-bottom: .7rem;
  padding: .6rem .8rem; border: 0; border-radius: var(--r-row);
  background: hsl(var(--row)); color: inherit; font-family: inherit;
  text-align: left; cursor: pointer;
  box-shadow: inset 0 0 0 1px transparent;
}
.dream-none.selected { box-shadow: inset 0 0 0 1px hsl(var(--accent)); }
.dream-none-t { display: block; font-size: .88rem; font-weight: 650; }
.dream-none-d { display: block; margin-top: .1rem; font-size: .74rem; color: hsl(var(--faint)); }

.lg-tabs {
  display: flex; gap: .35rem; overflow-x: auto; padding-bottom: .5rem;
  scrollbar-width: none;
}
.lg-tabs::-webkit-scrollbar { display: none; }
.lg-tab {
  flex-shrink: 0; padding: .34rem .68rem; border-radius: 999px;
  border: 1px solid hsl(var(--border)); background: transparent;
  color: hsl(var(--faint)); font-family: inherit; font-size: .78rem; cursor: pointer;
}
.lg-tab.selected {
  border-color: hsl(var(--accent)); color: hsl(var(--accent));
  background: hsl(var(--accent) / .1);
}

.dream-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(6.6rem, 1fr));
  gap: .4rem; margin-top: .2rem;
}
.dream-team {
  display: flex; flex-direction: column; align-items: center; gap: .3rem;
  padding: .55rem .3rem; border: 0; border-radius: var(--r-row);
  background: hsl(var(--row)); color: inherit; font-family: inherit;
  font-size: .72rem; line-height: 1.25; text-align: center; cursor: pointer;
  box-shadow: inset 0 0 0 1px transparent;
}
.dream-team:hover { box-shadow: inset 0 0 0 1px hsl(var(--border-strong)); }
.dream-team.selected {
  box-shadow: inset 0 0 0 1px hsl(var(--accent)); color: hsl(var(--accent));
}
.dream-team .crest, .dream-team .crest-pic { width: 1.8rem; height: 1.8rem; }
.dream-team .crest-pic .crest { width: 100%; height: 100%; }
.dream-team svg { width: 1.8rem; height: 1.8rem; }

/* ================= 球场选位置 ================= */
.pitch {
  position: relative; width: 100%; max-width: 330px; margin: 0 auto;
  aspect-ratio: 3 / 4.15;
  border-radius: var(--r-card); overflow: hidden;
  border: 1px solid hsl(var(--border));
}
.pitch > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.pos-btn {
  position: absolute; transform: translate(-50%, -50%);
  font-family: inherit; font-size: .76rem; font-weight: 750; letter-spacing: .03em;
  padding: .3rem .6rem; border-radius: 999px; white-space: nowrap;
  background: rgba(8, 30, 22, .82); color: #eafff6;
  border: 1.5px solid rgba(255, 255, 255, .28);
  cursor: pointer; transition: transform .15s, background .15s;
}
.pos-btn:hover { background: rgba(8, 40, 28, .95); transform: translate(-50%, -50%) scale(1.08); }
.pos-btn.selected {
  background: #6ede8a; color: #10281c; border-color: #b7f5c6;
  transform: translate(-50%, -50%) scale(1.12);
}
.pitch-hint { margin-top: .7rem; text-align: center; font-size: .8rem; color: hsl(var(--faint)); }
.pitch-hint b { color: hsl(var(--text)); font-weight: 700; }

/* ================= 表单 ================= */
.field-label {
  display: block; text-align: center;
  font-size: .66rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: hsl(var(--faint)); margin-bottom: .35rem;
}
.form-row { display: flex; gap: .6rem; margin-top: 1.1rem; }
.form-row > * { flex: 1; }
.form-row .narrow { flex: 0 0 30%; }
.input {
  width: 100%; font-family: inherit; font-size: .95rem; font-weight: 650;
  text-align: center; padding: .7rem .8rem;
  border: 1px solid hsl(var(--border)); border-radius: var(--r-row);
  background: hsl(var(--card)); color: hsl(var(--text));
}
.input::placeholder { color: hsl(var(--faint)); font-weight: 500; }
.input:focus { outline: none; border-color: hsl(var(--muted)); }

.jersey-wrap { display: grid; place-items: center; padding: 1.2rem 0 .3rem; }

/* 球衣：八个出身各一张画好的图（assets/jersey/），代码不再染色。
   姓名号码是 SVG 印在图上的，所以图必须是干净的后背。 */
.jersey {
  position: relative; display: block;
  width: 66%; max-width: 230px; aspect-ratio: 1 / 1;
}
.jersey picture { position: absolute; inset: 0; display: block; }
.j-img { width: 100%; height: 100%; object-fit: contain; display: block; }
.j-print { position: absolute; inset: 0; width: 100%; height: 100%; }
/* 画好的图垫在最上面，底下那件是按出身主色现画的 SVG。
   新加一个出身、图还没出的时候，img 会 onerror 给 picture 加 .gone，
   露出下面这件 —— 不至于在身份页上摆一个破图图标。 */
.j-fallback { position: absolute; inset: 0; width: 100%; height: 100%; }
.jersey picture.gone { display: none; }
.jersey.mini { width: 2.3rem; max-width: none; flex-shrink: 0; }


/* ================= 生涯页：三块 =================
   DOM 顺序是「身份卡 a → 时间线 b → 决策 c」，手机上竖着一条就是这个顺序：
   照 copero 的读法，先看自己是谁，再看走过的路，决策落在最下面、拇指够得着的地方。
   宽屏用 grid-template-areas 把 a 和 c 摞回左栏、b 占满右栏，还是原来那两栏。 */
.career-grid { display: grid; gap: .85rem; align-items: start; }
/* 网格子项的自动最小尺寸是 min-content，不写这条的话「奖杯柜」那排横向滚动的
   chip（nowrap 的 flex 行，min-content = 所有 chip 宽度之和）会把整列撑到
   四百多像素宽，窄屏上整页横向溢出 —— 奖杯多的生涯才会犯，一眼还看不出是它 */
.career-grid > * { min-width: 0; }
@media (min-width: 820px) {
  .career-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    grid-template-areas: "a b" "c b";
    gap: 1rem;
  }
  .col-a { grid-area: a; }
  .col-b { grid-area: b; }
  .col-c { grid-area: c; }
}

/* 左上：OVR 徽章 + 球队条 */
.hero-row { display: flex; gap: .7rem; align-items: stretch; }
/* 能力值分档：铜 → 橙 → 银 → 金 → 白金。徽章和时间线的 pill 共用这套。 */
.ovr-badge {
  flex: 0 0 auto; display: grid; place-content: center; text-align: center;
  min-width: 5rem; padding: .6rem .8rem; border-radius: 12px;
  background: linear-gradient(155deg, #8a6a44, #5f4426);
}
.ovr-badge.bronze { background: linear-gradient(155deg, #c98a45, #8f5a22); }
.ovr-badge.silver { background: linear-gradient(155deg, #cfd8de, #8d9aa6); }
.ovr-badge.gold   { background: linear-gradient(155deg, #ffd75e, #d99b1c); }
/* 最高一档原来是冰蓝白（#eaf6ff → #9fc4dd）。它比金色亮，但**冷**，
   在 24px 的小胶囊里眼睛只认冷暖不认明度 —— 88 分那一下看着像从金掉回银，
   明明是升了一档。改成暖白金：顶上接近纯白、底下压回金，再加一圈光晕，
   读起来是「比金还亮」而不是「另一种灰」。 */
.ovr-badge.plat {
  background: linear-gradient(155deg, #fffaea 0%, #ffdf95 52%, #e8ac3c 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .75), 0 0 16px rgba(255, 213, 120, .45);
}
.ovr-badge-l { font-size: .6rem; font-weight: 700; letter-spacing: .16em; color: rgba(0,0,0,.55); }
.ovr-badge-v { font-size: 2rem; font-weight: 800; line-height: 1.05; color: #16110a;
  font-variant-numeric: tabular-nums; }
.ovr-badge.up { animation: ovrup .8s ease; }
.ovr-badge.down { animation: ovrdn .8s ease; }
@keyframes ovrup { from { box-shadow: 0 0 0 0 hsl(var(--accent)/.75) }
  to { box-shadow: 0 0 0 15px hsl(var(--accent)/0) } }
@keyframes ovrdn { from { box-shadow: 0 0 0 0 hsl(var(--failure)/.75) }
  to { box-shadow: 0 0 0 15px hsl(var(--failure)/0) } }

.club-bar {
  flex: 1; min-width: 0; position: relative; overflow: hidden;
  display: flex; align-items: center; gap: .7rem;
  padding: .65rem .85rem; border-radius: 12px;
  background: hsl(var(--card)); border: 1px solid hsl(var(--border));
}
.club-bar-main { min-width: 0; flex: 1; }
.tag-row { display: flex; gap: .3rem; margin-bottom: .25rem; flex-wrap: wrap; }
.tag {
  font-size: .62rem; font-weight: 750; letter-spacing: .06em;
  padding: .1rem .45rem; border-radius: 5px;
  background: hsl(var(--row)); color: hsl(var(--muted));
}
.tag.blue { background: hsl(var(--accent) / .18); color: hsl(var(--accent)); }
/* 球员名是这张卡的主角，队名退一档 —— 一眼扫过去先看见「我是谁」，再看见「我在哪」 */
.player-name {
  font-size: 1.15rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.25;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.club-line { display: flex; align-items: center; gap: .45rem; min-width: 0; margin-top: .1rem; }
/* 队徽：程序按队色生成的盾形，替代原来的小色块 */
/* 真徽是 <img>，生成的是 <svg>，两者共用同一组尺寸，靠 object-fit 对齐 */
.crest { flex-shrink: 0; display: block; object-fit: contain; }
/* 画的队徽走 <picture>（WebP + PNG 兜底），外层这层壳不能吃掉尺寸和收缩规则 */
.crest-pic { display: block; flex-shrink: 0; line-height: 0; }
.club-line .crest { width: 1.7rem; height: 1.7rem; }
.tl-club .crest { width: 1.25rem; height: 1.25rem; }
.club-name-big {
  font-size: .95rem; font-weight: 700; letter-spacing: -.01em; color: hsl(var(--muted));
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.club-dot { width: .6rem; height: .6rem; border-radius: 3px; flex-shrink: 0; }
.club-right { text-align: right; flex-shrink: 0; }
.cr-l { font-size: .58rem; font-weight: 700; letter-spacing: .12em; color: hsl(var(--faint)); }
.cr-v { font-size: 1.05rem; font-weight: 750; line-height: 1.15; }
/* 青训期那一格写的是青训营名字，比数字长，得小一号 */
.cr-v.sm { font-size: .78rem; font-weight: 700; }

/* 三格总数据 */
.stat-row {
  display: grid; grid-template-columns: repeat(3, 1fr);
  margin-top: .8rem; padding: .7rem 0;
  border-top: 1px solid hsl(var(--border)); border-bottom: 1px solid hsl(var(--border));
}
.stat-cell { text-align: center; }
.stat-cell + .stat-cell { border-left: 1px solid hsl(var(--border)); }
.stat-l { font-size: .6rem; font-weight: 700; letter-spacing: .14em; color: hsl(var(--faint)); }
.stat-v { font-size: 1.15rem; font-weight: 750; font-variant-numeric: tabular-nums; margin-top: .1rem; }

/* 四条属性 */
.bars { display: grid; gap: .45rem; margin-top: .85rem; }
.bar { display: grid; grid-template-columns: 2.4rem 1fr 1.9rem; align-items: center; gap: .5rem; }
.bar-l { font-size: .74rem; color: hsl(var(--faint)); }
.bar-t { height: 5px; border-radius: 999px; background: hsl(var(--row)); overflow: hidden; }
.bar-f { height: 100%; border-radius: 999px; transition: width .55s cubic-bezier(.22,1,.36,1); }
.bar-v { font-size: .74rem; text-align: right; font-variant-numeric: tabular-nums; color: hsl(var(--muted)); }

/* 队内地位 + 合同：两格并排，跟 money-row 同一种底 —— 它们都是
   「现在的处境」，不是 0-100 的量，做不成条 */
.status-row { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem; margin: .7rem 0 .1rem; }
.st-cell {
  display: flex; align-items: baseline; justify-content: space-between; gap: .4rem;
  padding: .4rem .55rem; background: hsl(var(--row)); border-radius: var(--r-row);
}
.st-l { font-size: .72rem; color: hsl(var(--faint)); white-space: nowrap; }
.st-v { font-size: .84rem; font-weight: 750; color: hsl(var(--text)); white-space: nowrap; }
/* 五档地位各给一个色：一眼能看出自己是队里的什么人 */
.st-v.role-star    { color: hsl(var(--warning)); }
.st-v.role-starter { color: hsl(var(--accent)); }
.st-v.role-rot     { color: hsl(var(--info)); }
.st-v.role-sub     { color: hsl(var(--muted)); }
.st-v.role-bench   { color: hsl(var(--failure)); }

.money-row {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-top: .6rem; padding: .45rem .55rem;
  background: hsl(var(--row)); border-radius: var(--r-row);
  font-size: .78rem; color: hsl(var(--faint));
}
.money-row b { font-size: .92rem; font-weight: 750; color: hsl(var(--text)); }
.money-row b.neg { color: hsl(var(--failure)); }

/* 荣誉室 */
.trophy-block { margin-top: .9rem; padding-top: .85rem; border-top: 1px solid hsl(var(--border)); }
.shelf { display: flex; flex-wrap: wrap; gap: .3rem; }
.chip {
  font-size: .74rem; font-weight: 650; padding: .22rem .6rem; border-radius: 5px;
  background: hsl(var(--warning) / .18); color: hsl(var(--warning));
}
.chip.award { background: hsl(var(--info) / .18); color: hsl(var(--info)); }
.empty-case { text-align: center; padding: .5rem 0; color: hsl(var(--faint)); }
.empty-case-icon { font-size: 1.1rem; opacity: .5; }
.empty-case-t { font-size: .66rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin-top: .15rem; }

/* 「从头来过」：身份卡下面的一行。原来跟正文一样淡，藏得太好，
   想重开的人找不着 —— 现在用主色描出来。跟决策区那颗按钮仍然是两种质感
   （那颗是实心绿底，这颗是描边＋一层淡底），抢不走注意力，但一眼能看见。
   旁边那句说明保持淡色，亮的只是按钮本身。 */
.restart-row {
  display: flex; align-items: center; gap: .55rem;
  margin-top: .8rem; padding-top: .8rem;
  border-top: 1px solid hsl(var(--border));
}
.restart-row span { font-size: .7rem; color: hsl(var(--faint)); }
.restart-row .mini-btn {
  flex: 0 0 auto;
  color: hsl(var(--accent));
  border-color: hsl(var(--accent) / .5);
  background: hsl(var(--accent) / .12);
}
.restart-row .mini-btn:hover {
  color: hsl(var(--accent-on)); background: hsl(var(--accent));
  border-color: hsl(var(--accent));
}
.restart-row .mini-btn:active { background: hsl(var(--accent) / .75); }

/* ================= 年龄时间线 ================= */
.timeline { background: hsl(var(--card)); border: 1px solid hsl(var(--border));
  border-radius: var(--r-card); padding: .55rem; }
/* 行装在这里面。宽屏不限高（爱多长多长），手机上在下面的窄屏块里限高＋内部滚动 */
.tl-scroll { display: grid; gap: 0; }
.tl-cols {
  display: grid; grid-template-columns: 2.5rem minmax(0,1fr) 2.5rem 2.6rem 2.6rem 2.6rem;
  gap: .3rem; align-items: center;
}
.tl-head { padding: .3rem .5rem .5rem; }
.tl-head span { font-size: .58rem; font-weight: 700; letter-spacing: .13em;
  color: hsl(var(--faint)); text-transform: uppercase; }
.tl-head .r, .tl-row .r { text-align: right; }
.tl-row { padding: .42rem .5rem; border-radius: var(--r-row); font-size: .82rem; }
.tl-row.done { background: hsl(var(--row) / .55); }
.tl-row.now { background: hsl(var(--accent) / .1); box-shadow: inset 0 0 0 1px hsl(var(--accent) / .45); }
/* 青训那四年：比职业赛季淡一档，读起来是「正片开始之前」的一段 */
.tl-row.youth { background: hsl(var(--row) / .28); opacity: .82; }
.tl-row.youth .tl-club-name { font-weight: 600; color: hsl(var(--muted)); }
/* 没有「未来年份」那种行了 —— 时间线写到今天为止，下面直接空着 */
.age-chip {
  display: grid; place-items: center; width: 2.1rem; height: 1.6rem;
  border-radius: 7px; font-size: .76rem; font-weight: 750;
  background: hsl(var(--row-hi)); color: hsl(var(--muted));
  font-variant-numeric: tabular-nums;
}
.tl-row.now .age-chip { background: hsl(var(--accent)); color: hsl(var(--accent-on)); }
.tl-club { display: flex; align-items: center; gap: .4rem; min-width: 0; }
.tl-club-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.ovr-pill {
  display: inline-block; min-width: 2.1rem; text-align: center;
  padding: .08rem .3rem; border-radius: 6px;
  font-size: .74rem; font-weight: 750; font-variant-numeric: tabular-nums;
  background: linear-gradient(155deg, #8a6a44, #5f4426); color: #fff;
}
.ovr-pill.bronze { background: linear-gradient(155deg, #c98a45, #8f5a22); color: #2a1a08; }
.ovr-pill.silver { background: linear-gradient(155deg, #cfd8de, #8d9aa6); color: #1c2429; }
.ovr-pill.gold   { background: linear-gradient(155deg, #ffd75e, #d99b1c); color: #2b1f02; }
/* 跟徽章同一套：暖白金 + 一圈光晕，时间线上 88 分那一行要比 80 分那行更亮 */
.ovr-pill.plat {
  background: linear-gradient(155deg, #fffaea 0%, #ffdf95 52%, #e8ac3c 100%);
  color: #2b1f02;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .7), 0 0 8px rgba(255, 213, 120, .4);
}
.tl-n { font-size: .78rem; font-variant-numeric: tabular-nums; color: hsl(var(--muted)); }
/* min-width:0 是必须的：badge 里的字都是 nowrap，作为 flex 子项它的自动最小尺寸
   等于 max-content，一行「亚洲杯小组赛出局 中超冠军」就能把整张时间线顶宽，
   窄屏上右边几列直接被推出屏幕（横向出现滚动条）。允许它缩，让 flex-wrap 生效。 */
.tl-badges { display: flex; gap: .25rem; flex-wrap: wrap; margin-left: .1rem; min-width: 0; }
.mini-badge { font-size: .62rem; font-weight: 700; color: hsl(var(--warning)); white-space: nowrap; }
.mini-badge.bad { color: hsl(var(--failure)); }
/* 国家队大赛战绩：既不是荣誉也不是伤病，用中性的蓝拉开 */
.mini-badge.nat { color: hsl(var(--info)); }
/* 升上一级：跟奖杯不是一回事（没人发杯子），但确实是这一年最大的事，用绿的 */
.mini-badge.up { color: hsl(var(--accent)); }

/* 结算页国家队卡：每项大赛一行「赛事 — 最好成绩 — 那年多大」 */
.nat-best { margin-top: .55rem; display: grid; gap: .28rem; }
.nat-best > div { display: flex; align-items: baseline; gap: .45rem; }
.nat-best span { font-size: .72rem; color: hsl(var(--faint)); letter-spacing: .04em; }
.nat-best b { font-size: .92rem; font-weight: 750; }
.nat-best i { font-style: normal; font-size: .68rem; color: hsl(var(--faint)); margin-left: auto; }

/* ================= 事件 / 决策 ================= */
/* 事件区不再是「卡中卡」：去掉外壳，用一条分隔线把它接在左栏下面，
   跟 copero 一样直接长在这一栏里。 */
.event {
  margin-top: 1rem; padding-top: 1rem;
  border-top: 1px solid hsl(var(--border));
}
/* 事件块现在是网格里独立的一格，格子之间已经有 gap，自己就别再留上边距了 */
.col-c .event { margin-top: 0; }
/* 事件头：左边一块 emoji 当插图，右边 标签 + 标题 */
.ev-head { display: flex; gap: .7rem; align-items: center; }
.ev-icon {
  flex: 0 0 auto; display: grid; place-items: center;
  width: 2.7rem; height: 2.7rem; border-radius: var(--r-row);
  background: hsl(var(--row));
  /* 它在视觉上属于「这件事」的一部分，不该比旁边的选项卡还淡 */
  border: 1px solid hsl(var(--border-strong));
  font-size: 1.4rem; line-height: 1;
}
.ev-head-main { min-width: 0; }
.ev-tag {
  display: inline-block; font-size: .63rem; font-weight: 750; letter-spacing: .16em;
  text-transform: uppercase; color: hsl(var(--faint)); margin-bottom: .1rem;
}
.ev-tag.decision { color: hsl(var(--accent)); }
.ev-title { font-size: 1.2rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.3; }
.ev-desc { margin-top: .5rem; font-size: .89rem; color: hsl(var(--muted)); }

.opts { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; margin-top: 1rem; }
.opt {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .25rem; width: 100%; min-height: 5.6rem;
  /* 间距落到 4px 的标尺上：.8rem/.7rem（12.8/11.2px）→ 1.1rem/.85rem。
     原来那两个数是手调出来的，跟别处的 .5/.55/.6 凑不成一套。
     线撤掉之后留白是唯一的分隔手段，挤了会糊成一片。 */
  padding: 1.1rem .85rem;
  /* 选项是「能点的」那一档，用提亮后的描边 */
  border: 1px solid hsl(var(--border-strong));
  border-radius: var(--r-card); background: hsl(var(--card)); color: inherit;
  font-family: inherit; text-align: center; cursor: pointer;
  box-shadow: 0 1px 3px hsl(var(--scrim) / .5);
  transition: border-color .15s ease-out, background-color .15s ease-out,
              box-shadow .15s ease-out, transform .15s ease-out;
}
/* 三个选项就三列并排：青训和转会窗那三家报价本来就是「三选一」，
   二加一地摆会让第三张卡看着像另一档的东西。列数由 data-n 决定。 */
.opts[data-n="3"] { grid-template-columns: repeat(3, 1fr); }
/* 落单的那张卡占满整行（只有一个选项、或四个里的第五个），别孤零零缩在左边。
   三列那一档天然不落单，要排除掉，否则第三张会被拉成整行。 */
.opts:not([data-n="3"]) > .opt:last-child:nth-child(odd),
.opts > .btn { grid-column: 1 / -1; }

/* 「留下 / 挂靴」不是俱乐部，跟三家报价分开一排，做得比球队卡矮一档 */
.opts-alt { margin-top: .5rem; }
.opts-alt .opt {
  flex-flow: row wrap; align-items: baseline; justify-content: center;
  gap: .1rem .5rem; min-height: 0; padding: .6rem .7rem;
}
/* 「留在原队」那张卡是横排的，队徽跟着文字走，别用报价卡那个 2rem 的尺寸 */
.opts-alt .opt .crest, .opts-alt .opt .crest-pic { width: 1.15rem; height: 1.15rem; align-self: center; }
.opts-alt .opt .crest-pic .crest { width: 100%; height: 100%; }
.opt-lead { font-size: .68rem; color: hsl(var(--faint)); letter-spacing: .06em; }
/* 转会页上「外租」那一排前面的小字。它跟报价不是一类选择，中间要有一句话隔开 */
.opts-note {
  margin: .9rem 0 .45rem; font-size: .76rem; color: hsl(var(--faint));
}
/* 生涯页球队名后面那个「租借自 X」。人还是母队的，这件事得一直写在明面上 */
.loan-tag {
  flex-shrink: 0; margin-left: .4rem;
  padding: .08rem .34rem; border-radius: 999px;
  font-size: .62rem; font-weight: 700; white-space: nowrap;
  color: hsl(var(--faint)); background: hsl(var(--row));
  box-shadow: inset 0 0 0 1px hsl(var(--border));
}
/* 开局挑的那支心仪球队上了报价单。金色，跟「下一世」那条提示同一套色 ——
   都是「你自己带来的东西起作用了」，不是引擎在推荐你选它。 */
.opt.dream { border-color: hsl(var(--gold1) / .55); }
.opt-dream {
  font-size: .64rem; font-weight: 800; letter-spacing: .1em;
  padding: .08rem .34rem; border-radius: 999px;
  color: hsl(var(--gold1)); background: hsl(var(--gold1) / .13);
}
.opt .crest { width: 2rem; height: 2rem; margin: .15rem 0; }
.opt:hover {
  border-color: hsl(var(--accent) / .8);
  background: hsl(var(--row-hi));
  box-shadow: 0 3px 8px hsl(var(--scrim) / .5), 0 0 0 1px hsl(var(--accent) / .35);
  transform: translateY(-1px);
}
.opt-label { display: block; font-size: .92rem; font-weight: 700; line-height: 1.3; }
.opt-hint { display: block; font-size: .72rem; color: hsl(var(--faint)); line-height: 1.35; }
/* 青训营卡（12 岁那一步）。队徽在这张卡上是主视觉 ——
   这一步要判断的就是「去哪家」，而卡上有五行字（远近 / 队名 / 联赛档次 /
   取舍 / 花钱），2rem 的徽夹在中间等于没有（实测渲染出来才 24px，
   用户第一反应是「队徽呢」）。所以单独放大到 3rem，并且排在队名上面。 */
.youth-opt { justify-content: flex-start; min-height: 9.4rem; gap: .2rem; }
.youth-opt .crest { width: 3rem; height: 3rem; margin: .25rem 0 .1rem; }
.youth-trade {
  margin-top: auto; padding-top: .4rem; width: 100%;
  border-top: 1px dashed hsl(var(--border));
  font-size: .66rem; font-weight: 650; color: hsl(var(--warning)); line-height: 1.35;
}
.opts[data-n="4"] { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 720px) {
  .opts[data-n="4"] { grid-template-columns: repeat(2, 1fr); }
  .youth-opt { min-height: 8.6rem; }
  .youth-trade { font-size: .6rem; }
}

/* 报价单：钱和地位。跟联赛档次之间拉一道分隔 —— 上面是「这是哪支队」，
   这一行是「这支队给你什么」，两件事 */
.opt-offer {
  display: flex; flex-direction: column; align-items: center; gap: .1rem;
  margin-top: .35rem; padding-top: .35rem; width: 100%;
  border-top: 1px dashed hsl(var(--border));
  font-size: .68rem; color: hsl(var(--faint)); line-height: 1.3;
}
.opt-offer b { font-size: .84rem; font-weight: 750; color: hsl(var(--warning)); }
.opt-role { font-weight: 700; }
.opt-role.role-star    { color: hsl(var(--warning)); }
.opt-role.role-starter { color: hsl(var(--accent)); }
.opt-role.role-rot     { color: hsl(var(--info)); }
.opt-role.role-sub     { color: hsl(var(--muted)); }
.opt-role.role-bench   { color: hsl(var(--failure)); }

.result { margin-top: .9rem; padding: .85rem .9rem; background: hsl(var(--row));
  border-radius: var(--r-row); font-size: .89rem; }

/* ==================== 团队（生涯内商城）====================
   人选卡比普通选项多两行：价钱和一句人物注脚。价钱要显眼 ——
   这一步要判断的就是「这笔钱值不值」。 */
.staff-opt { align-items: flex-start; }
.staff-fee {
  display: block; margin-top: .15rem; font-size: .8rem; font-weight: 800;
  color: hsl(var(--warning)); font-variant-numeric: tabular-nums;
}
/* 效果一行写完。真放不下就省略号，也不让它折成两行 ——
   三张卡并排时，一张折行就整排高度不齐 */
.staff-opt .opt-hint {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.staff-note { display: block; margin-top: .3rem; font-size: .72rem;
  color: hsl(var(--muted)); opacity: .85; line-height: 1.5; }
.staff-cur {
  display: flex; align-items: center; flex-wrap: wrap; gap: .35rem;
  margin-top: .7rem; font-size: .76rem; color: hsl(var(--muted));
}
.staff-cur b { color: hsl(var(--warning)); font-variant-numeric: tabular-nums; }

/* 生涯页左栏那一块：养着谁、一季多少钱 */
.staff-row { margin-top: .55rem; padding: .55rem .7rem;
  background: hsl(var(--row)); border-radius: var(--r-row); }
.staff-row-l {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: .72rem; letter-spacing: .08em; color: hsl(var(--muted));
}
.staff-row-l b { color: hsl(var(--warning)); font-size: .78rem;
  font-variant-numeric: tabular-nums; letter-spacing: 0; }
.staff-chips { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .4rem; }

/* ==================== 关键战 ====================
   决赛、附加赛、保级战。一段生涯就这么两三场球，所以它跟普通事件
   长得不一样：比分牌摆在最上面，战报一行一行往下走。
   赢了整块泛绿、输了泛红 —— 但只是一层很淡的边和底，
   不做成庆祝弹窗，这游戏的底色不该在这儿变。 */
.bigmatch .bm-vs {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: .6rem; margin-top: .9rem; padding: .7rem .8rem;
  background: hsl(var(--row)); border-radius: var(--r-row);
  border: 1px solid hsl(var(--border));
}
.bigmatch.won .bm-vs  { border-color: hsl(var(--accent) / .55); background: hsl(var(--accent) / .1); }
.bigmatch.lost .bm-vs { border-color: hsl(var(--failure) / .5); background: hsl(var(--failure) / .08); }
.bm-side { font-size: .82rem; font-weight: 650; text-align: center; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm-score {
  font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums;
  letter-spacing: .02em; white-space: nowrap;
}
.bigmatch.won .bm-score  { color: hsl(var(--accent)); }
.bigmatch.lost .bm-score { color: hsl(var(--failure)); }
.bm-pens { margin-top: .3rem; text-align: center; font-size: .7rem;
  letter-spacing: .08em; color: hsl(var(--muted)); }
.bm-log { margin-top: .8rem; display: flex; flex-direction: column; gap: .45rem; }
/* 每一行前面一个竖杠，读起来像一条时间轴上的播报 */
.bm-line { font-size: .87rem; line-height: 1.5; padding-left: .7rem;
  border-left: 2px solid hsl(var(--border)); }
.bm-log.second .bm-line { border-left-color: hsl(var(--accent) / .5); }
.bigmatch.lost .bm-log.second .bm-line { border-left-color: hsl(var(--failure) / .45); }
.bm-log.second { animation: result-in .32s ease-out; }
.deltas { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .65rem; }
.delta {
  font-size: .72rem; font-weight: 700; font-variant-numeric: tabular-nums;
  padding: .12rem .5rem; border-radius: 5px;
  background: hsl(var(--row-hi)); color: hsl(var(--muted));
}
.delta.up { background: hsl(var(--accent) / .2); color: hsl(var(--accent)); }
.delta.down { background: hsl(var(--failure) / .2); color: hsl(var(--failure)); }

/* ---------- 抽签：两边跳，最后落一边 ----------
   概率用金色，跟满屏的绿拉开，和 OVR 徽章是同一套逻辑。
   高亮（.on）复用全站那条统一的反馈：描边变绿 + 一圈 inset 内阴影。 */
/* minmax(0,1fr) 而不是 1fr：两边的说法长短不一，纯 1fr 会被长的那边把列撑宽，
   两个格子一大一小，跳动的时候还会跟着抖 */
.roulette {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center; gap: .55rem; margin-top: 1rem;
}
.slot {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .1rem; min-height: 4.6rem; padding: .7rem .6rem; text-align: center;
  border: 1px solid hsl(var(--border)); border-radius: var(--r-card);
  background: hsl(var(--card));
  transition: border-color .12s, box-shadow .12s, background .12s, opacity .25s, transform .12s;
}
.slot-pct {
  font-size: 1.15rem; font-weight: 800; line-height: 1.1;
  font-variant-numeric: tabular-nums; letter-spacing: -.02em;
  color: hsl(var(--gold1));
}
.slot-lab { font-size: .76rem; color: hsl(var(--muted)); line-height: 1.3; }
/* 中间这块「抽签中 / 落定」定宽，字数变了两边的格子也不跟着挪 */
.roulette-vs {
  font-size: .6rem; font-weight: 750; letter-spacing: .16em;
  color: hsl(var(--faint)); white-space: nowrap;
  min-width: 3.4rem; text-align: center;
}
.roulette[data-state="spin"] .roulette-vs { animation: vs-blink 1s ease-in-out infinite; }

/* 跳到哪边，哪边亮 */
.slot.on {
  background: hsl(var(--row-hi)); border-color: hsl(var(--accent));
  box-shadow: inset 0 0 0 1px hsl(var(--accent));
  transform: translateY(-1px);
}
/* 落定 */
.slot.win {
  background: hsl(var(--accent) / .12); border-color: hsl(var(--accent));
  box-shadow: inset 0 0 0 1px hsl(var(--accent));
  animation: slot-land .4s cubic-bezier(.2, 1.4, .4, 1);
}
.slot.win .slot-lab { color: hsl(var(--text)); font-weight: 700; }
.slot.lose { opacity: .38; }

@keyframes vs-blink { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes slot-land {
  0% { transform: scale(1); }
  45% { transform: scale(1.045); }
  100% { transform: scale(1); }
}
/* 抽签落定之后结果才浮出来 */
.roulette + .result { animation: result-in .32s ease-out; }
@keyframes result-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .slot, .slot.win, .roulette[data-state="spin"] .roulette-vs, .roulette + .result {
    animation: none; transition: none;
  }
}

.season-mini { display: grid; gap: .25rem; margin-top: .8rem; }

/* ================= 结算 =================
   照 copero 的「生涯完成」那屏：顶部姓名 + 身价 + OVR，
   然后国家队 / 个人奖项两张卡，再往下每家效力过的俱乐部一张卡（队色渐变 + 队徽水印）。 */
.sum-hero {
  display: flex; align-items: center; gap: 1rem;
  background: hsl(var(--card)); border: 1px solid hsl(var(--border));
  border-radius: var(--r-card); padding: 1rem 1.1rem;
}
.sum-hero-main { flex: 1; min-width: 0; }
.sum-name { font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin: .25rem 0 .4rem; }
.sum-hero-side { text-align: right; flex-shrink: 0; }
.sum-hero .ovr-badge { min-width: 4.4rem; }

/* 窄屏时三张卡自然堆叠，不需要额外规则 */
.sum-top { display: grid; gap: .5rem; }
.sum-card {
  position: relative; overflow: hidden;
  border: 1px solid hsl(var(--border)); border-radius: var(--r-card);
  padding: 1.05rem 1.15rem; background: hsl(var(--card));
  box-shadow: 0 1px 3px hsl(var(--scrim) / .5);
}
.sum-card.nat::before, .sum-card.awards::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
}
.sum-card.nat::before { background: linear-gradient(120deg, #b12a2a55, transparent 65%); }
.sum-card.awards::before { background: linear-gradient(120deg, #d9a63f4d, transparent 65%); }
.sum-card > * { position: relative; }
.sum-card-l { font-size: .62rem; font-weight: 750; letter-spacing: .18em;
  text-transform: uppercase; color: hsl(var(--faint)); }
.sum-card-title { font-size: 1.15rem; font-weight: 750; margin-top: .15rem; }
.sum-card-stat { font-size: .8rem; color: hsl(var(--muted)); margin-top: .1rem; }
/* 国家队的进球助攻。比出场数亮一档：出场是履历，进球是故事 */
.nat-prod {
  font-size: .82rem; font-weight: 650; color: hsl(var(--gold1));
  margin-top: .15rem; font-variant-numeric: tabular-nums;
}
.case-empty { font-size: .74rem; color: hsl(var(--faint)); margin-top: .6rem;
  letter-spacing: .1em; }

/* 奖杯：真图是竖长的实物照，跟原来手画 SVG 的横向比例不同，
   所以统一给一个竖向的框，用 object-fit 装进去 */
.trophy { width: 1.5rem; height: 1.9rem; display: block; object-fit: contain; }
.trophy-row { display: flex; flex-wrap: wrap; gap: .5rem .85rem; margin-top: .6rem; }
.trophy-item { display: flex; align-items: center; gap: .3rem;
  font-size: .72rem; color: hsl(var(--muted)); }

/* 奖杯陈列：结算页单独一栏，横排大图标 + 右下角的 ×N */
.trophy-hall {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 1.1rem .6rem;
  padding: 1.3rem 1rem;
  background: hsl(var(--card)); border: 1px solid hsl(var(--border));
  border-radius: var(--r-card);
}
.hall-item {
  position: relative; width: 5.2rem;
  display: flex; flex-direction: column; align-items: center; gap: .4rem;
}
.hall-item .trophy { width: 2.9rem; height: 3.6rem; }
.hall-count {
  position: absolute; top: 2.3rem; right: .55rem;
  background: hsl(var(--bg)); color: hsl(var(--text));
  border: 1px solid hsl(var(--border-strong));
  border-radius: 999px; font-size: .68rem; font-weight: 750;
  padding: .02rem .38rem; font-variant-numeric: tabular-nums;
}
.hall-name { font-size: .66rem; color: hsl(var(--muted)); text-align: center; line-height: 1.3; }
.empty-hall { color: hsl(var(--faint)); font-size: .8rem; letter-spacing: .1em; }

/* 俱乐部卡 */
.club-grid { display: grid; gap: .5rem; margin-top: .5rem; }
@media (min-width: 620px) { .club-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 860px) { .club-grid { grid-template-columns: repeat(3, 1fr); } }
/* 一辈子只效力过一家的（「一人一城」那种，全站最常见的一条结局）：
   多列布局下这张卡会顶在最左边，右边空掉两三格 —— 那不是留白，是缺东西。
   让它横跨整行再居中，宽度收在单卡该有的尺寸上，不然拉满一行会变成一条横幅。
   窄屏本来就是一列、占满即正常，所以这条只在 620 往上生效。 */
@media (min-width: 620px) {
  .club-grid > .club-card:only-child {
    grid-column: 1 / -1;
    /* 这里必须写死宽度，不能只给 max-width：grid item 一旦设了 margin: auto，
       默认的 stretch 就失效了，宽度退回按内容算 —— 而这张卡的内容
       （队徽 + 队名）很窄，实测缩成了 133px，比正常那档还小一半。 */
    width: min(22rem, 100%);
    margin-inline: auto;
  }
}
.club-card {
  position: relative; overflow: hidden; min-height: 14rem;
  display: flex; flex-direction: column;
  border: 1px solid hsl(var(--border)); border-radius: var(--r-card);
  background: hsl(var(--card));
  box-shadow: 0 1px 3px hsl(var(--scrim) / .5);
}
/* 队色从上往下铺，越往下越浓，和 copero 那几张卡一样 */
.club-card::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--tc) -20%, transparent 78%);
  opacity: .5;
}
/* 队徽水印：放大居中压在卡片中部 */
.club-card-wash {
  position: absolute; left: 50%; top: 46%; width: 78%;
  transform: translate(-50%, -50%);
  opacity: .07; pointer-events: none;
}
/* 真徽是彩色位图，同样的透明度会比生成的盾徽抢眼得多 */
.club-card-wash img.crest { opacity: .55; filter: grayscale(.35); }
.club-card-wash .crest { width: 100%; height: auto; }
.club-card-body {
  position: relative; flex: 1;
  display: flex; flex-direction: column; align-items: center;
  padding: 1.1rem .9rem .9rem; text-align: center;
}
.club-card-crest { height: 3.4rem; display: grid; place-items: center; }
.club-card-crest .crest { width: 3.4rem; height: 3.4rem; }
.club-card-name { font-size: 1.05rem; font-weight: 750; margin-top: .6rem; line-height: 1.25; }
.club-card-lg { font-size: .72rem; color: hsl(var(--muted)); margin-top: .1rem; }
/* 效力年龄段：比联赛名再淡一档，它是注脚不是标题 */
.club-card-years {
  font-size: .68rem; margin-top: .18rem; color: hsl(var(--muted)); opacity: .8;
  font-variant-numeric: tabular-nums;
}

/* ==================== 结局图鉴 ====================
   见过的亮着，没见过的压暗只留条件。整页的读法是「原来还能这样活」，
   所以没见过的那些也要占位置，不能藏。 */
.codex-bar {
  height: 6px; border-radius: 999px; background: hsl(var(--row));
  overflow: hidden; margin: .2rem 0 .5rem;
}
.codex-bar-fill {
  height: 100%; transition: width .4s ease;
  background: linear-gradient(90deg, hsl(var(--gold2)), hsl(var(--gold1)));
}
.codex-note { font-size: .76rem; color: hsl(var(--muted)); line-height: 1.6; margin-bottom: 1rem; }
.codex-tier {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 1.1rem 0 .5rem; font-size: .78rem; font-weight: 700;
  letter-spacing: .1em; color: hsl(var(--muted));
}
.codex-tier span { font-weight: 600; font-variant-numeric: tabular-nums; }
/* 一条一张卡，按容器宽度自动分列 —— PC 上五列，手机上一列。
   注意这条只有在 #app 拿到 .wide（1180px）时才排得开：
   容器是 460px 窄栏的话，minmax(210px, 1fr) 只够一列，
   四十九条就成了一路往下拉。放宽是在 game.js 的 show() 里做的。 */
.codex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .55rem; }
.codex-item {
  padding: .65rem .75rem; border-radius: var(--r-row);
  background: hsl(var(--card)); border: 1px solid hsl(var(--border));
  opacity: .55;
}
/* 拿到过的：用结算页那张结局卡的同一套金（--gold1），不是绿。
   用户要的就是这个 —— 图鉴里点亮的那格，得跟你当年在结算页
   看到的那块金色是同一种光，翻图鉴才有「这是我拿过的」那个劲。
   金色在这里只表示「真的以这条收场过」，别处不要再用。 */
.codex-item.got {
  opacity: 1;
  background:
    radial-gradient(120% 160% at 0% 0%, hsl(var(--gold1) / .13), transparent 60%),
    hsl(var(--row));
  border-color: hsl(var(--gold1) / .45);
  box-shadow:
    inset 3px 0 0 hsl(var(--gold1)),
    0 0 18px -8px hsl(var(--gold1) / .5);
}
.codex-item.got .codex-title { color: hsl(var(--gold1)); }
/* 够到过、但那一局被更重的一条压下去没说出口的：也亮，但比 got 暗一档，
   左边那道杠是虚的 —— 一眼能分出「真的这么收场过」和「差一点就是它」 */
.codex-item.touch {
  opacity: .9; background: hsl(var(--row) / .5);
  border-color: hsl(var(--border));
  box-shadow: inset 3px 0 0 hsl(var(--muted) / .45);
}
.codex-title { font-size: .92rem; font-weight: 700; display: flex; gap: .4rem; align-items: baseline; }
.codex-x { font-size: .7rem; color: hsl(var(--gold1)); font-variant-numeric: tabular-nums; }
.codex-touch {
  font-size: .62rem; font-weight: 600; color: hsl(var(--muted));
  border: 1px solid hsl(var(--border)); border-radius: 999px; padding: .05rem .34rem;
}
/* 同一条结局在别的位置叫什么 —— 贴着标题走，比正文再小一号 */
.codex-alias { margin-top: .18rem; font-size: .68rem; color: hsl(var(--muted)); opacity: .8; }
.codex-desc { margin-top: .3rem; font-size: .78rem; line-height: 1.55; color: hsl(var(--muted)); }
/* 已解锁的条目下面再补一行达成条件，字更小 —— 正文是它的故事，这行是它的规则 */
.codex-hint {
  margin-top: .35rem; padding-top: .35rem; font-size: .7rem; color: hsl(var(--muted));
  border-top: 1px dashed hsl(var(--border)); opacity: .85;
}

/* 结算页的「逐赛季表现」：默认收起来的一段年表。
   结局才是这一页的主角，二十五行赛季会把它顶到屏幕外面去。 */
/* ================= 球场以外（结算页的感情线）=================
   跟俱乐部卡同一种底，但排成一行窄条：这一栏说的是几件事实，
   不是又一块数据面板，所以不给它数字那种字号和金色。 */
/* 卡片按内容宽、靠左排，不再一人一半铺满整行：
   结算页在 PC 上是 1180 宽，两格各占 590 的话，每格里几个字孤零零悬在中间。
   auto-fit + 上限 22rem：宽屏排得下三格，实际只有一两格时也不会被拉开。 */
.life-row {
  display: grid; gap: .6rem; margin-top: .55rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 22rem));
  justify-content: start;
}
.life-item {
  display: flex; align-items: center; gap: .7rem;
  padding: .8rem .95rem;
  border: 1px solid hsl(var(--border)); border-radius: var(--r-row);
  background: hsl(var(--card));
  box-shadow: 0 1px 3px hsl(var(--scrim) / .5);
}
.life-ico { font-size: 1.25rem; line-height: 1; flex: 0 0 auto; }
/* 两行字竖着叠在图标右边。原来主副两段是同一层 flex 的兄弟、
   副的挂 margin-left:auto 顶到最右 —— 一格里一个顶左一个顶右，中间空一条，
   眼睛得来回扫。 */
.life-text { display: flex; flex-direction: column; gap: .05rem; min-width: 0; }
.life-main { font-weight: 650; font-size: .9rem; line-height: 1.3; }
.life-sub { font-size: .72rem; color: hsl(var(--muted)); line-height: 1.35; }
.life-item.empty .life-main { color: hsl(var(--muted)); font-weight: 500; }

/* ================= 能力值曲线（结算页）=================
   金色是全站给「能力」保留的那一套（OVR 徽章、年表里的能力列都是它），
   所以曲线也用金；青训那一段用 --muted 的虚线，跟职业期分开。
   SVG 里的字号写死成 px 是有意的：viewBox 会连字一起等比缩放，
   rem 在这儿反而算不准。 */
.ovr-chart {
  margin-top: 1.1rem; padding: 1rem 1.1rem .75rem;
  border: 1px solid hsl(var(--border)); border-radius: var(--r-card);
  background: hsl(var(--card));
  box-shadow: 0 1px 3px hsl(var(--scrim) / .5);
}
.ovrc-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: .5rem; flex-wrap: wrap; margin-bottom: .3rem;
}
.ovrc-title { font-weight: 650; font-size: .92rem; }
.ovrc-legend {
  display: flex; align-items: center; font-size: .68rem; color: hsl(var(--muted));
}
.ovrc-legend i {
  display: inline-block; width: .85rem; height: 0;
  border-top: 2px solid hsl(var(--gold1)); margin: 0 .25rem 0 .7rem;
}
.ovrc-legend i:first-child { margin-left: 0; }
.ovrc-legend i.lg-youth { border-top-style: dashed; border-top-color: hsl(var(--muted)); }
.ovrc-legend i.lg-peak {
  width: .45rem; height: .45rem; border: 0; border-radius: 50%;
  background: hsl(var(--gold1)); align-self: center;
}
.ovrc-svg { display: block; width: 100%; height: auto; }
.ovrc-s0 { stop-color: hsl(var(--gold1)); stop-opacity: .32; }
.ovrc-s1 { stop-color: hsl(var(--gold1)); stop-opacity: 0; }
.ovrc-grid { stroke: hsl(var(--border)); stroke-width: 1; }
.ovrc-mark { stroke: hsl(var(--border-strong)); stroke-width: 1; stroke-dasharray: 3 3; }
.ovrc-tick { fill: hsl(var(--faint)); font-size: 10px; font-family: var(--font); }
.ovrc-note { fill: hsl(var(--muted)); font-size: 9px; font-family: var(--font); }
.ovrc-line {
  fill: none; stroke: hsl(var(--gold1)); stroke-width: 2.2;
  stroke-linejoin: round; stroke-linecap: round;
}
.ovrc-line.youth {
  stroke: hsl(var(--muted)); stroke-width: 1.6; stroke-dasharray: 4 3;
}
.ovrc-dot { fill: hsl(var(--gold1)); }
.ovrc-dot.youth { fill: hsl(var(--muted)); }
.ovrc-peak { fill: hsl(var(--gold1)); stroke: hsl(var(--card)); stroke-width: 1.6; }
.ovrc-peak-t {
  fill: hsl(var(--gold1)); font-size: 11px; font-weight: 700; font-family: var(--font);
}
.ovrc-band { opacity: .9; }
.ovrc-band.youth { opacity: .38; }
/* 里程碑：第一座欧冠 / 金球 / 世界杯那几座，挂的是奖杯本身。
   引线要压得住 —— 它穿过整个绘图区，画实了会跟曲线抢眼睛。 */
.ovrc-mile-l { stroke: hsl(var(--gold1) / .38); stroke-width: 1; stroke-dasharray: 2 3; }
.ovrc-mile-d { fill: hsl(var(--gold1)); stroke: hsl(var(--card)); stroke-width: 1.4; }
/* 奖杯 PNG 本来是给一寸见方的陈列格画的，缩到 26px 挂在曲线上偏暗，
   提一点亮度和对比才压得住背景 */
.ovrc-mile-i { filter: brightness(1.08) contrast(1.04) drop-shadow(0 1px 2px hsl(var(--scrim) / .7)); }

.season-book {
  margin-top: 1.1rem; border: 1px solid hsl(var(--border));
  border-radius: var(--r-card); background: hsl(var(--card));
  box-shadow: 0 1px 3px hsl(var(--scrim) / .5);
}
.season-book > summary {
  cursor: pointer; padding: .75rem .9rem; font-weight: 650; font-size: .92rem;
  display: flex; align-items: baseline; gap: .6rem; list-style: none;
}
.season-book > summary::-webkit-details-marker { display: none; }
/* 自己画三角，跟着展开转 —— 默认的 marker 在各家浏览器里长得都不一样 */
.season-book > summary::before {
  content: "▸"; color: hsl(var(--muted)); transition: transform .18s ease;
  display: inline-block;
}
.season-book[open] > summary::before { transform: rotate(90deg); }
.sb-note { font-size: .72rem; font-weight: 400; color: hsl(var(--muted)); }
.season-book .timeline { padding: 0 .6rem .6rem; }
/* 这条年表在结算页是「翻档案」，不该再限高滚动 —— 那是生涯页为了给决策区
   让位置才做的 */
.season-book .tl-scroll { max-height: none; overflow: visible; }
/* 数据压在一条深色带里，三列均分 */
.club-card-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  width: 100%; margin-top: auto; padding: .55rem .2rem;
  background: hsl(var(--bg) / .55); border-radius: var(--r-row);
}
.club-card-stats span { font-size: .64rem; color: hsl(var(--muted));
  display: flex; flex-direction: column; align-items: center; gap: .05rem; }
.club-card-stats b { font-size: 1.15rem; font-weight: 750; color: hsl(var(--text));
  font-variant-numeric: tabular-nums; }
.club-card-tro { display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: .35rem .7rem; margin-top: .55rem; width: 100%; min-height: 1.7rem; }

/* 结局是整段生涯的落点，得是这一页最亮的一块。
   以前它跟俱乐部卡、奖杯陈列共用同一套「card 底 + 1px 描边」，
   滚到最后根本认不出这行字就是结果。现在四层一起上：
   金色描边、中心往外散的暖光、渐变字面、字后面一圈光晕。
   颜色仍然只用既有的 --gold1/--gold2（全站的金就这一套，跟满屏的绿拉开）。 */
.ending {
  position: relative; overflow: hidden;
  text-align: center; padding: 2.4rem 1.2rem 2rem; margin-top: .5rem;
  border-radius: var(--r-card);
  background:
    radial-gradient(120% 140% at 50% 0%, hsl(var(--gold1) / .16), transparent 62%),
    linear-gradient(hsl(var(--row-hi)), hsl(var(--card)));
  border: 1px solid hsl(var(--gold1) / .5);
  box-shadow:
    0 0 0 1px hsl(var(--gold1) / .12),
    0 0 34px -6px hsl(var(--gold1) / .34),
    inset 0 1px 0 hsl(var(--gold1) / .22);
}
/* 顶边那道金线：中间最亮、两头淡出，像一束光打在这张卡上 */
.ending::before {
  content: ""; position: absolute; top: 0; left: 12%; right: 12%; height: 1px;
  background: linear-gradient(90deg, transparent, hsl(var(--gold1) / .95), transparent);
}
.ending-eyebrow {
  font-size: .66rem; letter-spacing: .24em; text-transform: uppercase;
  color: hsl(var(--gold1) / .85); font-weight: 750;
}
/* 结算页顶上那行「第 N 世」。整行都是拉开字距的小字，
   所以这一枚得靠底色跳出来，不然混进「生涯结束 · 41 岁 · …」里根本看不见。 */
.gen-chip {
  display: inline-block; margin-right: .5rem;
  padding: .08rem .4rem; border-radius: 5px; letter-spacing: .08em;
  background: hsl(var(--gold1) / .18); color: hsl(var(--gold1));
  box-shadow: inset 0 0 0 1px hsl(var(--gold1) / .45);
}
.ending-title {
  margin-top: .5rem;
  font-size: 2.6rem; font-weight: 800; letter-spacing: -.035em; line-height: 1.15;
  background: linear-gradient(180deg, hsl(48 92% 78%), hsl(var(--gold1)) 55%, hsl(var(--gold2)));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: hsl(var(--gold1));
  /* 渐变字自己不吃 text-shadow，光晕靠底下垫一层同样的字（.ending-glow） */
}
/* 字后面的那圈光。用同一串文字绝对定位垫在下面，只留模糊的金色。
   直接给渐变字加 text-shadow 是没有效果的 —— 字面已经被 clip 成透明了。 */
/* z-index: 0 不是多余的 —— 它让 wrap 自己成为一个层叠上下文，
   底下那层 z-index:-1 的光晕才只沉到 wrap 后面。不写的话 -1 会一路往上冒，
   沉到 .ending 的背景**之下**，光晕就被卡片底色整个盖掉，一点看不见。 */
.ending-title-wrap { position: relative; display: inline-block; z-index: 0; }
.ending-glow {
  position: absolute; inset: 0; z-index: -1;
  color: hsl(var(--gold1) / .55); filter: blur(14px);
  font-size: 2.6rem; font-weight: 800; letter-spacing: -.035em; line-height: 1.15;
  pointer-events: none; user-select: none;
}
.ending-desc { margin-top: .9rem; font-size: .92rem; color: hsl(var(--text) / .82); }
@media (max-width: 420px) {
  .ending-title, .ending-glow { font-size: 2.1rem; }
}

/* 分区之间的呼吸拉开一档：线撤掉以后，留白就是「这是另一组内容」的唯一信号 */
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 1.9rem 0 .6rem; }
/* .18em 那个字距是照全大写英文定的，中文按它撑开会散成一个个孤字
   （「奖 杯 陈 列」）。收到 .1em。 */
.section-head h2 { font-size: .68rem; font-weight: 750; letter-spacing: .1em;
  text-transform: uppercase; color: hsl(var(--faint)); }
.section-head span { font-size: .74rem; color: hsl(var(--faint)); }

/* ================= 弹窗 ================= */
.overlay {
  position: fixed; inset: 0; z-index: 70;
  background: hsl(var(--scrim) / .65); backdrop-filter: blur(4px);
  display: flex; align-items: flex-end; justify-content: center;
}
.modal {
  position: relative; width: 100%; max-width: var(--maxw);
  max-height: 86vh; overflow-y: auto;
  background: hsl(var(--card)); border: 1px solid hsl(var(--border));
  border-radius: var(--r-card) var(--r-card) 0 0;
  padding: 1.4rem 1.2rem calc(1.4rem + env(safe-area-inset-bottom, 0px));
}
.modal h2 { font-size: 1.15rem; font-weight: 750; margin-bottom: .7rem; }
.modal h3 { font-size: .78rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase;
  color: hsl(var(--faint)); margin: 1.1rem 0 .4rem; }
.modal p { font-size: .87rem; color: hsl(var(--muted)); margin-bottom: .6rem; }
.modal ul { padding-left: 1.05rem; }
.modal li { font-size: .85rem; color: hsl(var(--muted)); margin-bottom: .3rem; }
.modal strong { color: hsl(var(--text)); font-weight: 700; }
.modal-close {
  position: absolute; top: .9rem; right: .9rem;
  width: 1.75rem; height: 1.75rem; line-height: 1;
  border: 1px solid hsl(var(--border)); border-radius: var(--r-row);
  background: transparent; color: hsl(var(--faint)); cursor: pointer; font-size: .78rem;
}
/* 宽屏把弹窗从底部抽屉改成居中的卡片 —— 桌面上没有拇指区这回事，
   贴着屏幕最下沿反而离视线最远。断点跟生涯页两栏那条对齐（820px）。
   窄屏不动，还是从下往上推的抽屉。 */
@media (min-width: 820px) {
  .overlay { align-items: center; padding: 1.5rem 1rem; }
  .modal {
    max-height: min(86vh, 44rem);
    border-radius: var(--r-card);
    padding-bottom: 1.4rem;   /* 居中之后 safe-area 那圈留白没意义了 */
  }
}

/* ---- 更新公告 ----
   正文不吃 .modal li 那个 --muted：公告是进游戏前唯一要人读完的一屏，
   63% 亮度的灰在深底上糊成一片。用 --text 拉到正常正文的对比度，
   字号和行距也一起放大一档。 */
.news-list li {
  /* 十来条一句话的更新，行距从 1.8 收到 1.6、间距从 .7 收到 .45 ——
     原来那套是给「三五条、每条两行」定的，条目一多整栏就散了 */
  margin-bottom: .45rem; line-height: 1.6;
  font-size: .88rem; color: hsl(var(--text) / .92);
}
/* 条目里的链接跟着正文一起提亮，用主色标出来 */
.news-list a { color: hsl(var(--accent)); text-decoration: none;
  border-bottom: 1px solid hsl(var(--accent) / .45); }

/* ---- 首页开始按钮下面那一行更新公告 ----
   「更新公告  8/17  更新联赛奖杯  →」。分量压得比「开始生涯」低一档：
   那个是实心主色，这行只是暗底上的一条。第一次来的人该径直点上面那个按钮，
   这儿是给回访的人「刚才那个弹窗关掉了，想再看一眼」用的。 */
/* 它是 .btn-stack 里的第四个 .btn，颜色、圆角、内边距、间距、hover 全从 .btn 来。
   这儿只改一件事：.btn 是 block + 文字居中，而这一格里有四段东西要排开。
   别在这儿重写背景和边框 —— 「和上面三个一样」得是同一份样式，不是抄一份像的。 */
.home-news {
  display: flex; align-items: center; gap: .5rem;
  /* .btn 是居中的；窄屏下 .intro-start 整栏也居中。两条都要扳回来，
     不然三段文字会挤成一坨 */
  text-align: left;
}

/* 「更新公告」是这行的名字，留在左边并且给足亮度 —— 它得先被认出来是什么，
   再看右边更新了什么。日期和浓缩句连同箭头整体靠右：那三样是一句话
   （「8/17 更新联赛奖杯 →」），中间被拉开的话读起来就断了。 */
.home-news-label { flex: 0 0 auto; color: hsl(var(--text)); font-weight: 700; }
.home-news-day {
  /* 靠这个把后面三样一起推到右边，不用额外套一层 span */
  margin-left: auto; flex: 0 0 auto;
  color: hsl(var(--accent)); font-variant-numeric: tabular-nums;
}
.home-news-sum {
  /* 浓缩句写长了就省略号，不换行 —— 这一行的长相必须是稳定的 */
  flex: 0 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: hsl(var(--text) / .92);
}
.home-news-arrow { flex: 0 0 auto; color: hsl(var(--muted)); }
.home-news:hover .home-news-arrow { color: hsl(var(--accent)); }

/* ---- 弹窗里每次更新一行，长相照首页那行来（也是挂 .btn）----
   跟首页那行的差别只有一处：首页最左边是「更新公告」四个字、日期靠右；
   这儿弹窗标题已经写着「更新公告」了，所以日期回到最左边，浓缩句占中间，
   箭头留在最右。 */
.news-group { margin-bottom: .4rem; }
.news-row {
  display: flex; align-items: center; gap: .6rem;
  text-align: left;      /* .btn 是居中的，得扳回来 */
}
.news-row-day { flex: 0 0 auto; color: hsl(var(--accent)); font-variant-numeric: tabular-nums; }
.news-row-sum {
  flex: 1 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: hsl(var(--text)); font-weight: 700;
}
.news-row-arrow {
  flex: 0 0 auto; color: hsl(var(--muted));
  transition: transform .18s ease-out, color .15s;
}
/* 展开的那条：箭头转下来，指着自己底下的内容 */
.news-row.open .news-row-arrow { transform: rotate(90deg); color: hsl(var(--accent)); }
/* 「发布」那条没有详细内容，点不开，别做成能按的样子。
   .btn:hover 会提亮边框、抬底色、上浮 1px，三样都得按住 —— 只按住颜色的话
   鼠标划过去它还是会动一下，看着像能点。 */
.news-row-flat { cursor: default; opacity: .75; }
.news-row-flat:hover, .news-row-flat:active {
  border-color: hsl(var(--border-strong));
  background: hsl(var(--btn-bg));
  transform: none; box-shadow: none;
}

/* 展开出来的条目缩进一格，看得出是挂在上面那行下面的 */
#news-body .news-list {
  margin: .5rem 0 .2rem; padding-left: 1.4rem;
}

/* 种子那两处的「复制」 */
.mini-btn {
  padding: .3rem .7rem; border-radius: var(--r-row);
  border: 1px solid hsl(var(--border)); background: transparent;
  color: hsl(var(--muted)); font-size: .76rem; font-weight: 650; cursor: pointer;
}
.mini-btn:active { background: hsl(var(--border) / .5); }

/* 公告置顶那条刷新提示。原来这个位置是交流群群号 ——
   换掉的原因很实在：拿着旧缓存的人，下面列的东西一样都看不到。

   所以它不能只是「一行绿字」，得是整个弹窗里最亮的一块：实心主色底 + 深色字，
   和「开始生涯」那个主按钮一个量级。外面再套一圈会呼吸的光晕，
   让眼睛在读标题的时候就先被它勾过去一次。 */
/* 选择器要带上 .modal：上面那条 .modal p 的权重是 0-1-1，
   光写 .news-refresh（0-1-0）赢不了它 —— 字号和颜色会被压回正文那一档，
   写在后面也没用，权重不看先后。 */
.modal .news-refresh {
  margin: 0 0 1.1rem; padding: .85rem 1rem;
  border-radius: var(--r-row); text-align: center;
  font-size: 1.05rem; font-weight: 800; letter-spacing: .06em;
  color: hsl(var(--accent-on));
  background: hsl(var(--accent));
  animation: refresh-pulse 1.9s ease-out infinite;
}
@keyframes refresh-pulse {
  0%   { box-shadow: 0 0 0 0 hsl(var(--accent) / .65); }
  70%  { box-shadow: 0 0 0 12px hsl(var(--accent) / 0); }
  100% { box-shadow: 0 0 0 0 hsl(var(--accent) / 0); }
}
/* 系统里关了动效的就别闪，静态也已经够亮了 */
@media (prefers-reduced-motion: reduce) {
  .modal .news-refresh { animation: none; box-shadow: 0 0 0 3px hsl(var(--accent) / .3); }
}

.toast {
  position: fixed; left: 50%; bottom: 6rem; transform: translateX(-50%); z-index: 90;
  padding: .5rem 1.1rem; border-radius: var(--r-row);
  background: hsl(var(--accent)); color: hsl(var(--accent-on));
  font-size: .82rem; font-weight: 650;
}

.footer {
  max-width: var(--maxw-wide); margin: 2.5rem auto 0; padding: 1.2rem 1rem;
  font-size: .74rem; color: hsl(var(--faint)); text-align: center;
}
/* 署名照姊妹站 D:\guessplayer 的 #credit：两行、字距撑开、行高松一点。
   一处不同：那边署名用正文色，这边顶栏页脚本来就是灰的，保持 --muted 不刺眼。 */
.footer-by {
  margin-top: .55rem; color: hsl(var(--muted));
  letter-spacing: .08em; line-height: 1.9;
}
.footer-by a {
  display: inline-block; margin-top: 2px;
  color: hsl(var(--muted)); text-decoration: none;
  border-bottom: 1px solid hsl(var(--border-strong)); padding-bottom: 1px;
  word-break: break-all;         /* 窄屏上这串网址一行装不下，得允许断开 */
  transition: color .15s, border-color .15s;
}
.footer-by a:hover { color: hsl(var(--accent)); border-color: hsl(var(--accent)); }
/* 爱发电入口：网址 + 绿胶囊同一排，排版照姊妹站 D:\guess 的页脚。
   胶囊直接复用顶栏的 .brand-link + .bl-dot —— 呼吸圆点和 prefers-reduced-motion 都是白拿的，
   颜色跟着 --accent 走，不用另配一套。
   ⚠️ .footer-by a 的特异性 (0,1,1) 压得过 .brand-link (0,1,0)：不覆盖的话胶囊会继承
   display:inline-block + border-bottom + padding-bottom，变成"绿块底下拖一条线"，
   而且圆点和文字不再垂直居中。padding 要整条写回来，只清 padding-bottom 会把胶囊压扁。
   窄屏 flex-wrap 让胶囊自己折到第二行，别改成 nowrap —— 360px 下会撑出横向滚动。 */
.footer-by .afd-row {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: .6rem; margin-bottom: .7rem;
}
.footer-by .afd-url { margin-top: 0; }
.footer-by .afd-pill {
  display: inline-flex; margin-top: 0;
  padding: .3rem .6rem; border-bottom: 0;
  color: hsl(var(--accent-on));
}
.footer-by .afd-pill:hover { color: hsl(var(--accent-on)); border-color: transparent; }
/* 页脚最后一行：感谢支持。坐在 B 站链接下面，一个框都不加 ——
   这行字在页脚最底下，围个框就成了整个页脚里最重的一块，比站名还抢眼。
   只印昵称，留言和金额都不上页面（理由见 game.js 的 renderThanks）。
   名字之间的「 · 」由 game.js 拼在 span 外面，那也是这行字唯一的换行点。 */
.thanks {
  margin-top: .9rem; font-size: .72rem; line-height: 1.9;
  color: hsl(var(--faint)); letter-spacing: .04em;
}
/* nowrap：昵称里有空格（「无名球迷 RMeh」），不写这行的话窄屏会从空格处断开，
   上一行留个「无名球迷」下一行接个「RMeh」，看着像两个人。 */
.thanks .thx { color: hsl(var(--muted)); white-space: nowrap; }

.empty { font-size: .8rem; color: hsl(var(--faint)); padding: .4rem 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ================= 手机版生涯页 =================
   目标是一屏装完：身份卡 → 属性 → 时间线 → 决策，做一次决策不用上下找。
   照 copero 的手机版量的 —— 那一屏是 45(顶栏) + 72(身份卡) + 210(时间线) +
   190(决策) ≈ 680，正好落在一屏里。这边多出属性条和奖杯柜两块，
   所以能压的都压：属性条从竖着三行改成横着三列，奖杯柜空着就整块不占位，
   时间线限高、内部滚动，页脚在生涯页收起来。 */
@media (max-width: 819px) {
  /* 只收生涯页：首页、身份三步、结算页的留白照旧，那几屏本来就不挤 */
  body.in-career #app { padding: .55rem .7rem 0; }
  body.in-career.no-actionbar { padding-bottom: .7rem; }
  body.in-career .footer { display: none; }
  body.in-career .topbar { padding: .5rem 3rem; }
  /* 手机版生涯页要一屏装完，顶栏不能为两个姊妹站入口再多占一行 */
  body.in-career .brand-links { display: none; }
  .career-grid { gap: .55rem; }

  /* 徽章 + 身份 + 三格数据合成一张卡，跟分享卡是同一个读法。
     里面的 .club-bar 就不能再是「卡中卡」了，去掉它自己的底和边。 */
  .player-card {
    background: hsl(var(--card)); border: 1px solid hsl(var(--border));
    border-radius: var(--r-card); padding: .6rem .65rem;
  }
  .player-card .club-bar { background: none; border: 0; padding: 0 0 0 .1rem; }
  .player-card .ovr-badge { min-width: 4.2rem; padding: .45rem .6rem; }
  .player-card .ovr-badge-v { font-size: 1.75rem; }
  .player-card .player-name { font-size: 1.05rem; }
  .player-card .club-name-big { font-size: .86rem; }
  .player-card .club-line .crest { width: 1.4rem; height: 1.4rem; }
  .player-card .cr-v { font-size: .95rem; }
  .player-card .tag-row { margin-bottom: .15rem; }
  .player-card .stat-row {
    margin-top: .45rem; padding: .4rem 0 0; border-bottom: 0;
  }
  .player-card .stat-l { font-size: .56rem; letter-spacing: .1em; }
  .player-card .stat-v { font-size: 1rem; }

  /* 三条属性横过来铺，一行装下：标签和数值一排，条压在下面。
     竖着三行要 80px，横过来 34px —— 省下来的正好够决策区多一行说明。 */
  /* 三条属性 + 财富挤成一行：标签和数值一排，条压在下面，钱贴右边。
     竖着排要 110px，横过来 38px —— 省下来的正好够时间线多露两年 */
  .meters { display: flex; align-items: center; gap: .55rem; margin-top: .45rem; }
  .bars { flex: 1; min-width: 0; grid-template-columns: repeat(3, 1fr); gap: .1rem .5rem; margin-top: 0; }
  /* 行列都写死。只写 grid-column 的话，源码顺序是「标签 → 条 → 数值」，
     条占满整行只能落到第二行，数值再被自动排版推到第三行去 —— 一条属性占三行高 */
  .bar { grid-template-columns: 1fr auto; gap: .05rem .25rem; }
  .bar-l { grid-row: 1; grid-column: 1; font-size: .66rem; }
  .bar-v { grid-row: 1; grid-column: 2; font-size: .66rem; }
  .bar-t { grid-row: 2; grid-column: 1 / -1; }
  .money-row {
    flex-direction: column; align-items: flex-end; gap: 0;
    margin-top: 0; padding: .15rem .45rem; font-size: .62rem; white-space: nowrap;
  }
  .money-row b { font-size: .8rem; line-height: 1.2; }
  /* 手机上这两格压扁：标签在上、值在下，跟 money-row 一个读法 */
  .status-row { gap: .3rem; margin: .45rem 0 0; }
  .st-cell { flex-direction: column; align-items: flex-start; gap: 0; padding: .15rem .45rem; }
  .st-l { font-size: .62rem; }
  .st-v { font-size: .76rem; line-height: 1.2; }

  /* 奖杯柜：有奖杯才占一行，横着滚；空的时候整块收掉（时间线上本来就有荣誉徽标） */
  .trophy-block { margin-top: .45rem; padding-top: .45rem; }
  .trophy-block .chip { font-size: .68rem; padding: .16rem .5rem; }
  .trophy-block.empty { display: none; }
  .trophy-block .shelf {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .trophy-block .shelf::-webkit-scrollbar { display: none; }
  .trophy-block .chip { white-space: nowrap; }

  /* 窄屏一屏就那么高：收紧留白，说明那句话也压小一档 */
  .restart-row { margin-top: .45rem; padding-top: .45rem; gap: .45rem; }
  .restart-row span { font-size: .64rem; }
  .restart-row .mini-btn { padding: .22rem .55rem; font-size: .7rem; }

  /* 时间线限高 + 内部滚动。表头和国家队那行留在外面不跟着滚，
     长模式二十五行也只占这么高，决策永远在这块下面 */
  .timeline { padding: .4rem; }
  .tl-head { padding: .15rem .45rem .3rem; }
  .tl-scroll {
    max-height: min(30vh, 18rem); overflow-y: auto;
    scrollbar-width: thin; -webkit-overflow-scrolling: touch;
  }
  .tl-row { padding: .28rem .45rem; font-size: .78rem; }
  .age-chip { height: 1.4rem; font-size: .72rem; }
  .mini-badge { font-size: .6rem; }
  /* 荣誉/伤病徽标只吃剩下的那点宽度，且不换行：一换行这一行就变三行高，
     时间线的行高参差不齐，限高的滚动区里更显乱。放不下的用渐变吃掉尾巴，
     反正奖杯在上面那条 chip 里是全的。队名优先，徽标让位。 */
  .tl-club-name { flex: 0 1 auto; }
  .tl-badges {
    flex: 1 1 0; flex-wrap: nowrap; overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, #000 78%, transparent);
    mask-image: linear-gradient(90deg, #000 78%, transparent);
  }

  /* 决策区：这一屏的主角，但也不能自己占掉半屏 */
  .col-c .event { margin-top: 0; padding-top: 0; border-top: 0; }
  .ev-icon { width: 2.3rem; height: 2.3rem; font-size: 1.2rem; }
  .ev-title { font-size: 1.05rem; }
  .ev-desc { margin-top: .35rem; font-size: .82rem; line-height: 1.45; }
  .opts { gap: .4rem; margin-top: .6rem; }
  .opt { min-height: 4rem; padding: .55rem .5rem; }
  .opt-label { font-size: .86rem; }
  .opt-hint { font-size: .68rem; }
  .opt .crest { width: 1.5rem; height: 1.5rem; margin: 0; }
  /* 青训营卡例外：这张卡上队徽是主视觉，窄屏也不能缩成图标 */
  .youth-opt .crest { width: 2.4rem; height: 2.4rem; margin: .15rem 0 .05rem; }
  /* 落单占满整行的那张卡改成横着排：竖着排它一个人就占掉一整张卡的高度 */
  .opts:not([data-n="3"]) > .opt:last-child:nth-child(odd) {
    flex-flow: row wrap; align-items: center; justify-content: center;
    min-height: 0; padding: .5rem .55rem; gap: .1rem .45rem;
  }
  .opts:not([data-n="3"]) > .opt:last-child:nth-child(odd) .opt-lead { width: 100%; }
  /* 手机上三列每格只有一百出头，字都得再收一档，不然队名和联赛档次挤成两三行 */
  .opts[data-n="3"] { gap: .35rem; }
  .opts[data-n="3"] .opt { padding: .5rem .3rem; gap: .2rem; }
  .opts[data-n="3"] .opt-lead { font-size: .6rem; }
  .opts[data-n="3"] .opt-label { font-size: .78rem; line-height: 1.25; }
  .opts[data-n="3"] .opt-hint { font-size: .62rem; line-height: 1.3; }
  .opts[data-n="3"] .crest { width: 1.3rem; height: 1.3rem; }
  .opts-alt { margin-top: .4rem; }
  .opts-alt .opt { padding: .5rem .55rem; }
  .roulette { margin-top: .7rem; }
  .slot { min-height: 3.8rem; padding: .55rem .5rem; }
  .result { margin-top: .7rem; padding: .65rem .7rem; font-size: .84rem; }
}

@media (max-width: 380px) {
  .hero-title { font-size: 1.65rem; }
  .ending-title { font-size: 1.85rem; }
  .tl-cols { grid-template-columns: 2.2rem minmax(0,1fr) 2.3rem 2.2rem 2.2rem; }
  .tl-cols > .hide-xs { display: none; }
  .player-card { padding: .5rem .55rem; }
  .player-card .ovr-badge { min-width: 3.7rem; }
  .player-card .ovr-badge-v { font-size: 1.6rem; }
  /* 小屏一屏更矮，时间线再让一点，决策还是得整块看得见 */
  .tl-scroll { max-height: min(25vh, 15rem); }
  .opt { min-height: 3.7rem; }
}

/* 统计小图标 */
.mi { width: .95rem; height: .95rem; vertical-align: -.14em; margin-right: .28rem; }
.tl-head .mi, .tl-cols .mi { margin-right: 0; width: .88rem; height: .88rem; }

/* 结算页第一行：主卡 + 国家队 + 个人奖项三栏并排（照 copero） */
@media (min-width: 780px) {
  .sum-top { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: .5rem; align-items: stretch; }
  .sum-top > * { margin: 0 !important; }
}
.sum-main { display: flex; flex-direction: column; background: hsl(var(--card));
  border: 1px solid hsl(var(--border)); border-radius: var(--r-card); padding: 1rem 1.1rem; }
.sum-main .stat-row { margin-top: auto; border-bottom: 0; padding-bottom: 0; }
/* 俱乐部卡在宽屏一行四张 */
@media (min-width: 1000px) { .club-grid { grid-template-columns: repeat(4, 1fr); } }

/* 结算顶部：名字不许断行，主卡在三栏里要留够宽度 */
.sum-main .ending-eyebrow { margin-bottom: .5rem; letter-spacing: .1em; }
.sum-name { white-space: nowrap; }
.sum-hero { align-items: center; gap: .6rem; }
.sum-hero-main { min-width: 0; }
@media (min-width: 780px) {
  .sum-top { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); }
}
/* 队徽默认什么都不加 —— 绝大多数是彩色徽，直接摆在深色面板上最干净。
   纯黑/极深的那几支（.plate，名单在 crests.js）描一圈白光晕：
   drop-shadow 跟着 alpha 的形状走，圆徽出圆边、盾徽出盾边，
   比垫一块白方框强 —— 方框在圆徽后面看着就像背景没抠干净。 */
img.crest.plate {
  filter: drop-shadow(0 0 1.2px rgba(255,255,255,.9))
          drop-shadow(0 0 2.6px rgba(255,255,255,.35));
}
.club-card-wash img.crest.plate { filter: grayscale(.35); }

/* ================= 分享弹窗 =================
   照 copero 那张分享卡：橙色小标题 + 大标题 + 一张可以存下来的卡 +
   一个开关 + 一排圆按钮。卡片整个画在 canvas 上 ——
   屏幕上看到的和存下来的是同一张图，不用维护两套排版。 */
.share-modal { text-align: center; }
.share-eyebrow {
  font-size: .66rem; font-weight: 800; letter-spacing: .22em;
  color: hsl(24 78% 58%); margin-bottom: .35rem;
}
.share-title { font-size: 1.4rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: 1.1rem; }
.share-card-wrap { display: flex; justify-content: center; }
#share-canvas, #share-img {
  width: 100%; max-width: 340px; height: auto; display: block;
  border-radius: var(--r-card);
}
/* 微信里长按这张图才会弹「发送给朋友 / 保存图片」。这两条是显式写死的保险：
   一旦哪天给弹窗加了 user-select: none 或 -webkit-touch-callout: none，
   长按菜单会连带被吃掉，而且不报任何错。上面也不能盖透明层 ——
   长按落在遮挡元素上，微信就不认这是一张图。 */
#share-img {
  -webkit-touch-callout: default;
  -webkit-user-select: auto; user-select: auto;
  pointer-events: auto;
}
.share-tip {
  margin-top: .7rem; text-align: center;
  font-size: .78rem; color: hsl(var(--muted)); letter-spacing: .02em;
}

/* 开关：整块可点，方块滑轨照全站的小圆角来，不用胶囊 */
.share-toggle {
  display: inline-flex; align-items: center; gap: .7rem; cursor: pointer;
  margin: 1.2rem auto .2rem; padding: .5rem .9rem;
  border: 1px solid hsl(var(--border)); border-radius: 999px;
  background: hsl(var(--row)); font-size: .84rem; font-weight: 650;
}
.share-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.share-toggle i {
  position: relative; width: 2.1rem; height: 1.15rem; border-radius: 999px;
  background: hsl(var(--btn-bg)); transition: background .18s;
}
.share-toggle i::after {
  content: ""; position: absolute; top: .17rem; left: .2rem;
  width: .8rem; height: .8rem; border-radius: 999px;
  background: hsl(var(--faint)); transition: transform .18s, background .18s;
}
.share-toggle input:checked + i { background: hsl(var(--accent) / .45); }
.share-toggle input:checked + i::after {
  transform: translateX(.9rem); background: hsl(var(--accent));
}

.share-actions { display: flex; justify-content: center; gap: .7rem; margin-top: 1.1rem; }

/* 分享卡上印哪一条结局。够到过两条以上才出现（见 renderEndingPick）。
   摆在「显示姓名」下面，跟它是同一类东西：都是「这张图上放什么」。 */
.share-ending-pick { margin-top: .9rem; }
.share-ending-pick .sep-label {
  font-size: .74rem; color: hsl(var(--faint)); margin-bottom: .4rem;
}
.ep-list { display: flex; flex-wrap: wrap; gap: .35rem; }
.ep-btn {
  padding: .3rem .6rem; border-radius: 999px;
  border: 1px solid hsl(var(--border)); background: transparent;
  color: hsl(var(--muted)); font-family: inherit; font-size: .76rem; cursor: pointer;
}
.ep-btn.selected {
  border-color: hsl(var(--gold1) / .6); color: hsl(var(--gold1));
  background: hsl(var(--gold1) / .1);
}

/* 档案卡最上面那一条「接着这一世投胎」。跟下面的卡和分享键之间拉一条分隔线：
   这一条是「从这一世继续」，下面那排是「把这一世发出去」，不是同一件事。 */
.share-nextlife {
  margin-bottom: 1.1rem; padding-bottom: 1rem;
  border-bottom: 1px solid hsl(var(--border));
}
.share-nextlife .btn { width: 100%; margin-bottom: .5rem; }
.share-nextlife .legacy-note { margin: 0; }
.share-btn {
  display: grid; place-items: center; width: 3rem; height: 3rem;
  border: 1px solid hsl(var(--border-strong)); border-radius: 999px;
  background: transparent; color: hsl(var(--muted)); cursor: pointer; transition: all .15s;
}
.share-btn:hover { border-color: hsl(var(--accent)); color: hsl(var(--accent)); }
.share-btn svg {
  width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
/* 不支持的按钮直接不显示，别给一个点了没反应的东西 */
.share-btn.hidden { display: none; }

/* ================= 生涯历史档案 =================
   退役过的每一段生涯在本机存一条摘要。列表默认全收着，点开一条才展开细节 ——
   翻过五十段生涯的人，全展开是一屏也放不下的墙。 */

.arc-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  margin-bottom: .8rem; overflow: hidden;
  border-radius: var(--r-card); background: hsl(var(--border));
}
.arc-stats > div {
  display: flex; flex-direction: column; align-items: center; gap: .1rem;
  padding: .7rem .4rem; background: hsl(var(--card));
}
.arc-stats b {
  font-size: 1.15rem; font-weight: 800; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.arc-stats span { font-size: .66rem; letter-spacing: .06em; color: hsl(var(--faint)); }

.arc-list { display: grid; gap: .4rem; }
.arc-item {
  border-radius: var(--r-card); cursor: pointer;
  background: hsl(var(--card)); border: 1px solid hsl(var(--border));
  transition: border-color .15s, background .15s;
}
.arc-item:hover { border-color: hsl(var(--border-strong)); }
.arc-item:active { border-color: hsl(var(--accent) / .5); background: hsl(var(--row)); }

.arc-head { display: flex; align-items: center; gap: .7rem; padding: .6rem .7rem; }
/* 列表里的徽章要比结算页那颗小一圈，不然一条记录半屏高 */
.ovr-badge.sm { min-width: 3.1rem; padding: .35rem .4rem; border-radius: 9px; }
.ovr-badge.sm .ovr-badge-l { font-size: .48rem; letter-spacing: .12em; }
.ovr-badge.sm .ovr-badge-v { font-size: 1.3rem; }

.arc-main { min-width: 0; flex: 1; }
.arc-name {
  display: flex; align-items: baseline; gap: .4rem;
  font-size: .95rem; font-weight: 750; line-height: 1.3;
}
.arc-gen {
  flex-shrink: 0; font-size: .62rem; font-weight: 800; letter-spacing: .04em;
  padding: .04rem .35rem; border-radius: 5px;
  background: hsl(var(--gold1) / .14); color: hsl(var(--gold1));
}
/* 结局是翻档案的人真正在找的东西，给它金色 —— 和结算页、总结卡是同一套读法 */
.arc-ending { font-size: .8rem; font-weight: 700; color: hsl(var(--gold1)); line-height: 1.4; }
.arc-meta { font-size: .68rem; color: hsl(var(--faint)); }
.arc-right {
  flex-shrink: 0; align-self: stretch;
  display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between;
}
.arc-when { font-size: .66rem; color: hsl(var(--faint)); }
/* 手机上没有 hover，得直说点了会发生什么 */
.arc-more { font-size: .66rem; font-weight: 700; color: hsl(var(--accent)); white-space: nowrap; }

.arc-empty {
  padding: 2.4rem 1rem; text-align: center; line-height: 1.9;
  font-size: .85rem; color: hsl(var(--faint));
  background: hsl(var(--card)); border: 1px solid hsl(var(--border));
  border-radius: var(--r-card);
}
/* 清空是不可逆的，做成最不显眼的一个 —— 但也别藏起来 */
.btn.arc-clear {
  background: transparent; color: hsl(var(--faint));
  border-color: hsl(var(--border)); font-size: .78rem;
}
.btn.arc-clear:hover {
  color: hsl(var(--failure)); border-color: hsl(var(--failure) / .55); box-shadow: none;
}

/* ================= 种子 =================
   首页的输入框（留空随机）、结算页和历史档案里印出来的那一串。
   全部用等宽数字：种子是要被人一位一位念给朋友、或者比对两串一不一样的东西。 */

.seed-box {
  display: flex; align-items: center; gap: .6rem;
  margin-top: .9rem; padding: .5rem .7rem;
  border-radius: var(--r-row);
  background: hsl(var(--card)); border: 1px solid hsl(var(--border));
}
.seed-box label {
  flex: 0 0 auto; font-size: .72rem; font-weight: 700; letter-spacing: .1em;
  color: hsl(var(--faint));
}
.seed-box input {
  flex: 1; min-width: 0;
  border: 0; background: transparent; color: hsl(var(--text));
  font-family: inherit; font-size: .86rem; font-variant-numeric: tabular-nums;
  letter-spacing: .04em; outline: none;
}
.seed-box input::placeholder { color: hsl(var(--faint) / .8); letter-spacing: normal; }
.seed-box:focus-within { border-color: hsl(var(--accent) / .55); }

/* 结算页那一行。放在按钮下面，不跟「下一世」抢位置 */
/* ================= 还够到过的其它结局 =================
   结局那一块下面的折叠区。刻意做得比结局本身淡：那一条是这一世的定性，
   这一堆是「你还差一点走成的另外几种人生」，不能抢它的位置。
   排版跟「逐赛季表现」那个折叠区同一套，读起来是同一类东西。 */
.also-endings {
  margin-top: .7rem; border: 1px solid hsl(var(--border));
  border-radius: var(--r-row); background: hsl(var(--card));
}
.also-endings > summary {
  cursor: pointer; padding: .7rem .9rem; font-size: .86rem; font-weight: 650;
  display: flex; align-items: baseline; gap: .6rem; list-style: none;
}
.also-endings > summary::-webkit-details-marker { display: none; }
.also-endings > summary::before {
  content: "▸"; color: hsl(var(--muted)); transition: transform .18s ease;
  display: inline-block;
}
.also-endings[open] > summary::before { transform: rotate(90deg); }
.ae-note { font-size: .72rem; font-weight: 400; color: hsl(var(--muted)); }
.ae-list { padding: 0 .9rem .2rem; }
.ae-item {
  display: flex; align-items: baseline; gap: .6rem;
  padding: .42rem 0; border-top: 1px solid hsl(var(--border) / .6);
}
.ae-title {
  flex-shrink: 0; font-size: .84rem; font-weight: 650; color: hsl(var(--gold1));
}
.ae-hint { min-width: 0; font-size: .74rem; color: hsl(var(--faint)); line-height: 1.5; }
.ae-foot {
  margin: 0; padding: .2rem .9rem .8rem;
  font-size: .72rem; color: hsl(var(--faint)); line-height: 1.6;
}

.seed-row {
  display: flex; align-items: center; flex-wrap: wrap; gap: .5rem;
  margin-top: 1rem; padding: .55rem .75rem;
  border-radius: var(--r-row);
  background: hsl(var(--card)); border: 1px solid hsl(var(--border));
}
.seed-l {
  font-size: .68rem; font-weight: 700; letter-spacing: .1em; color: hsl(var(--faint));
}
.seed-v {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .82rem; color: hsl(var(--text));
  padding: .1rem .4rem; border-radius: 5px;
  background: hsl(var(--row-hi));
  user-select: all;                 /* 长按一下整串选中，不用自己拖 */
  word-break: break-all;
}
/* 说明文字排到最后，窄屏时整个换行到第二行，别把「复制」挤没 */
.seed-note { flex: 1 0 100%; font-size: .68rem; color: hsl(var(--faint)); }
@media (min-width: 420px) { .seed-note { flex: 1 1 auto; } }

/* 档案里每条记录下面那一行 */
.arc-seed {
  display: flex; align-items: center; gap: .45rem;
  margin: 0 .7rem; padding: .45rem 0;
  border-top: 1px solid hsl(var(--border));
}
/* 种子按内容宽，别铺满整行 —— 铺满看着像个输入框，会被当成能在这儿改 */
.arc-seed .seed-v { font-size: .74rem; min-width: 0; }
.arc-seed .mini-btn { margin-left: auto; flex: 0 0 auto; padding: .18rem .55rem; font-size: .68rem; }

/* ================= 首页：宽屏两栏 =================

   首页原来在 PC 上锁死 460px 居中 —— 而生涯页和结算页是 1180，
   于是同一个站，首页看起来像一张手机页面被摆到了屏幕正中间，两边各空一大块。

   860 往上拆成两栏：左边「这是什么」（标题 + 球场），右边「怎么开始」
   （说明 + 家底 + 模式 + 种子 + 开始）。宽度用 --maxw-intro（920）而不是
   1180 —— 首页统共就这么点东西，铺到 1180 两栏各 560，一行字能排四十个,
   反而比窄栏更难读。

   #app 的宽度由 game.js 的 show() 挂 class 切换（.intro-wide），
   但**放宽这件事必须跟两栏一起生效**，不能单独提前 ——
   860 以下还是一列，容器一放开，球场插图就按 4:3 铺满整个宽度：
   实测 760 的平板上它变成一张 570px 高的巨图，把下面的东西全顶出屏幕。 */
@media (min-width: 860px) {
  #app.intro-wide { max-width: var(--maxw-intro); }
  .intro { text-align: left; }
  .intro-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.4rem;
    align-items: center;                 /* 两栏高度不等，居中对齐比顶对齐稳 */
    padding-top: 1.4rem;
  }
  /* 球场插图压扁一档。窄屏那个 4:3 放到半栏里，左栏会比右栏高出一百多像素，
     两栏底部差一大截 —— 16:10 之后两边的高度就接近了。 */
  .intro-lead .hero-art { aspect-ratio: 16 / 10; margin-top: 1.5rem; }
  .intro-start .hero-sub { margin-top: 0; font-size: .95rem; }
  .hero-title { font-size: 2.6rem; margin-top: 1.1rem; }
  /* 段落别横着拉满 —— 一行超过三十来个字，眼睛回行就容易串行 */
  .intro-start .hero-sub { max-width: 26rem; }
  .segmented, .seed-box, .btn-stack { margin-left: 0; margin-right: 0; }
}
