/* 台球人生 —— 样式（设计体系照 career-sim.pages.dev：HSL 令牌 + 圆角单源派生 + 金/绿双色） */
:root {
  --font: -apple-system, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --radius: 14px;
  --r-card: var(--radius);
  --r-row: calc(var(--radius) - 5px);

  --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%;
  --scrim: 0 0% 0%;

  --felt: 152 55% 40%;          /* 台呢绿：主色 */
  --felt-strong: 152 60% 48%;
  --gold1: 43 74% 66%;          /* 金：留给「值得记住的东西」 */
  --gold2: 38 65% 52%;
  --failure: 13 55% 52%;
}

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

html, body {
  background: hsl(var(--bg));
  color: hsl(var(--text));
  font-family: var(--font);
  line-height: 1.7;
}
button { font: inherit; color: inherit; cursor: pointer; }

.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid hsl(var(--border));
  position: sticky; top: 0; background: hsl(var(--bg)); z-index: 10;
}
.brand { background: none; border: none; font-size: 18px; font-weight: 700; letter-spacing: 1px; display: flex; align-items: center; gap: 8px; }
.brand-mark { font-size: 20px; }
.topbar-sub { color: hsl(var(--muted)); font-size: 13px; }

#app { max-width: 460px; margin: 0 auto; padding: 18px 16px 80px; }
#app:has(.view.wide:not(.hidden)) { max-width: 1180px; }
#app:has(#view-intro:not(.hidden)) { max-width: 920px; }
.view.hidden, .hidden { display: none !important; }
.view { animation: fade .28s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- 通用按钮 ---------- */
.btn-stack { display: flex; flex-direction: column; gap: 10px; }
.btn {
  display: block; width: 100%;
  background: hsl(var(--card)); border: 1px solid hsl(var(--border-strong)); border-radius: var(--r-card);
  padding: 12px 16px; text-align: center;
  transition: border-color .15s, background .15s, transform .15s;
}
.btn:hover { border-color: hsl(var(--felt) / .8); background: hsl(var(--row-hi)); transform: translateY(-1px); }
.btn-primary { background: hsl(var(--felt) / .85); border-color: transparent; font-weight: 700; }
.btn-primary:hover { background: hsl(var(--felt-strong)); }
.btn-primary:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.btn-ghost { background: none; color: hsl(var(--muted)); }

/* ---------- 首页 ---------- */
.intro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 720px) { .intro-grid { grid-template-columns: 1fr; } }
.hero-brand { color: hsl(var(--felt-strong)); font-weight: 700; letter-spacing: 4px; font-size: 15px; }
.eyebrow { color: hsl(var(--muted)); letter-spacing: 6px; font-size: 13px; margin: 6px 0 10px; }
.hero-title { font-size: 34px; line-height: 1.4; font-weight: 800; letter-spacing: -.02em; }
.hero-sub { color: hsl(var(--muted)); margin-bottom: 18px; font-size: 15px; }

.hero-art { margin-top: 30px; display: flex; gap: 14px; align-items: center; }
.ball { width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; color: #111; background: radial-gradient(circle at 35% 30%, #fff 0 18%, #ddd 40%, #999); }
.ball.b8 { background: radial-gradient(circle at 35% 30%, #666 0 12%, #222 45%, #000); color: #fff; }
.ball.b9 { background: radial-gradient(circle at 35% 30%, #fff8dc 0 15%, hsl(var(--gold2)) 45%, #8a6d2a); }
.ball.br { background: radial-gradient(circle at 35% 30%, #e88 0 12%, #a33 45%, #511); }

.intro-facts { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 18px; margin-bottom: 22px; }
.intro-facts li { color: hsl(var(--faint)); font-size: 13px; }
.intro-facts b { color: hsl(var(--gold1)); font-size: 17px; margin-right: 3px; display: block; }

.segmented { display: inline-flex; border: 1px solid hsl(var(--border)); border-radius: 9px; overflow: hidden; }
.seg { background: none; border: none; padding: 8px 20px; color: hsl(var(--muted)); }
.seg.selected { background: hsl(var(--felt) / .8); color: #fff; }
.seg-note { color: hsl(var(--faint)); font-size: 12px; margin: 8px 0 18px; }

.seed-box { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.seed-box label { color: hsl(var(--faint)); font-size: 13px; }
.seed-box input { background: hsl(var(--card)); border: 1px solid hsl(var(--border)); border-radius: 9px; color: hsl(var(--text)); padding: 8px 12px; width: 180px; outline: none; }
.seed-box input:focus { border-color: hsl(var(--felt)); }

/* ---------- 出身/项目 ---------- */
.setup-title { margin: 26px 0 14px; font-size: 20px; letter-spacing: -.01em; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.pick-card {
  background: hsl(var(--card)); border: 1px solid hsl(var(--border-strong)); border-radius: var(--r-card);
  padding: 16px; text-align: left; box-shadow: 0 1px 3px hsl(var(--scrim) / .5);
  transition: border-color .15s, background .15s, transform .15s;
}
.pick-card:hover { border-color: hsl(var(--felt) / .8); background: hsl(var(--row-hi)); transform: translateY(-1px); }
.pick-card.selected { border-color: hsl(var(--felt)); background: hsl(var(--row-hi)); }
.pick-card h3 { font-size: 16px; margin-bottom: 6px; }
.pick-card p { color: hsl(var(--muted)); font-size: 13px; }
.pick-card.disabled { opacity: .45; cursor: not-allowed; }
.pick-card.disabled:hover { border-color: hsl(var(--border-strong)); transform: none; background: hsl(var(--card)); }
.soon-badge { margin-left: 8px; font-size: 11px; font-weight: 400; color: hsl(var(--faint)); border: 1px solid hsl(var(--border)); border-radius: 999px; padding: 1px 8px; vertical-align: 2px; }
.trait-tags { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.trait-tag { font-size: 11px; color: hsl(var(--felt-strong)); border: 1px solid hsl(var(--felt) / .6); border-radius: 999px; padding: 1px 8px; }
.setup-actions { margin-top: 28px; max-width: 320px; }

/* ========== 生涯页：三栏（照 career-sim）========== */
.career-grid { display: grid; gap: 16px; align-items: start; }
.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: 18px; }
  .col-a { grid-area: a; }
  .col-b { grid-area: b; }
  .col-c { grid-area: c; }
}

/* 左上：水平徽章 + 身份条 */
.hero-row { display: flex; gap: 12px; align-items: stretch; }
.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.t2 { background: linear-gradient(155deg, #c98a45, #8f5a22); }
.ovr-badge.t3 { background: linear-gradient(155deg, #cfd8de, #8d9aa6); }
.ovr-badge.t4 { background: linear-gradient(155deg, #ffd75e, #d99b1c); }
.ovr-badge.t5 {
  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(--felt) / .75); } to { box-shadow: 0 0 0 15px hsl(var(--felt) / 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;
  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.green { background: hsl(var(--felt) / .18); color: hsl(var(--felt-strong)); }
.tag.gold { background: hsl(var(--gold1) / .15); color: hsl(var(--gold1)); }
.player-name { font-size: 1.15rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; }
.club-line { margin-top: .1rem; }
.club-name-big { font-size: .82rem; color: hsl(var(--muted)); }
.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; font-variant-numeric: tabular-nums; }

/* 三格总数据 */
.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; }
.stat-v.gold { color: hsl(var(--gold1)); }

/* 属性条 */
.bars { display: grid; gap: .45rem; margin-top: .85rem; }
.bar { display: grid; grid-template-columns: 2.4rem 1fr 1.9rem; align-items: center; gap: .5rem; position: relative; }
.bar-l { font-size: .74rem; color: hsl(var(--faint)); }
.bar-t { height: 5px; border-radius: 999px; background: hsl(var(--row)); overflow: hidden; }
.bar-f { display: block; height: 100%; border-radius: 999px; background: hsl(var(--felt-strong)); transition: width .55s cubic-bezier(.22,1,.36,1); }
.bar-f.low { background: hsl(var(--failure)); }
.bar-v { font-size: .74rem; text-align: right; font-variant-numeric: tabular-nums; color: hsl(var(--muted)); }
.stat-delta { position: absolute; right: 2.2rem; top: -8px; font-size: 12px; font-weight: 700; pointer-events: none; animation: delta-float 1.4s ease-out forwards; }
.stat-delta.plus { color: hsl(var(--felt-strong)); }
.stat-delta.minus { color: hsl(var(--failure)); }
@keyframes delta-float { 0% { opacity: 0; transform: translateY(4px); } 15% { opacity: 1; } 100% { opacity: 0; transform: translateY(-16px); } }

/* 状态格 + 现金 */
.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.gold { color: hsl(var(--gold1)); }
.st-v.up { animation: ovrup .8s ease; }
.st-v.down { animation: ovrdn .8s ease; }

.age-track { height: 4px; background: hsl(var(--row)); border-radius: 999px; margin-top: 12px; overflow: hidden; }
.age-fill { display: block; height: 100%; background: hsl(var(--felt) / .8); border-radius: 999px; transition: width .5s ease; }

/* ========== 事件区（不装卡，直接长在栏里）========== */
.event { }
.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-tag { display: inline-block; font-size: .63rem; font-weight: 750; letter-spacing: .16em; color: hsl(var(--faint)); margin-bottom: .1rem; }
.ev-tag.t-decide { color: hsl(var(--felt-strong)); }
.ev-title { font-size: 1.2rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.3; }
.ev-desc { margin-top: .6rem; font-size: .92rem; color: hsl(var(--muted)); white-space: pre-line; }

.opts { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; margin-top: 1rem; }
@media (max-width: 560px) { .opts { grid-template-columns: 1fr; } }
.opts > .opt:last-child:nth-child(odd) { grid-column: 1 / -1; }
.opt {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem;
  width: 100%; min-height: 4.6rem; padding: .9rem .85rem;
  border: 1px solid hsl(var(--border-strong)); border-radius: var(--r-card);
  background: hsl(var(--card)); color: inherit; text-align: center;
  box-shadow: 0 1px 3px hsl(var(--scrim) / .5);
  transition: border-color .15s, background .15s, box-shadow .15s, transform .15s;
}
.opt:hover { border-color: hsl(var(--felt) / .8); background: hsl(var(--row-hi)); box-shadow: 0 3px 8px hsl(var(--scrim) / .5), 0 0 0 1px hsl(var(--felt) / .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; }
.opt-hint b { color: hsl(var(--gold1)); font-weight: 600; }

.event-result { color: hsl(var(--gold1)); margin: 16px 0; white-space: pre-line; animation: result-in .32s ease-out; }
@keyframes result-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
#btn-continue { max-width: 220px; }

/* 转盘 */
.roulette { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; }
.slot { display: flex; justify-content: space-between; align-items: center; background: hsl(var(--row)); border: 1px solid hsl(var(--border)); border-radius: var(--r-row); padding: 10px 14px; font-size: 14px; transition: background .1s, border-color .1s, opacity .3s; }
.slot .slot-pct { color: hsl(var(--faint)); font-size: 12px; font-variant-numeric: tabular-nums; }
.slot.active { background: hsl(var(--felt) / .14); border-color: hsl(var(--felt)); }
.slot.win { background: hsl(var(--felt) / .12); border-color: hsl(var(--felt)); box-shadow: inset 0 0 0 1px hsl(var(--felt)); 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 slot-land { 0% { transform: scale(1); } 45% { transform: scale(1.045); } 100% { transform: scale(1); } }

/* 比赛签表 */
.bracket { display: flex; flex-direction: column; gap: 6px; margin: 14px 0; }
.bracket-round { display: flex; justify-content: space-between; align-items: center; background: hsl(var(--row)); border: 1px solid hsl(var(--border)); border-radius: var(--r-row); padding: 8px 14px; font-size: 13px; color: hsl(var(--muted)); }
.bracket-round.current { border-color: hsl(var(--felt)); color: hsl(var(--text)); }
.bracket-round.won { border-color: hsl(var(--felt) / .5); }
.bracket-round.won .br-score { color: hsl(var(--felt-strong)); font-weight: 700; }
.bracket-round.lost { border-color: hsl(var(--failure) / .5); }
.bracket-round.lost .br-score { color: hsl(var(--failure)); font-weight: 700; }

/* 出杆小游戏 */
.match-box { margin: 14px 0; }
.match-bar { position: relative; height: 36px; background: hsl(var(--row)); border: 1px solid hsl(var(--border)); border-radius: var(--r-row); overflow: hidden; margin-bottom: 12px; }
.match-zone { position: absolute; top: 0; bottom: 0; background: hsl(var(--felt) / .28); border-left: 1px solid hsl(var(--felt)); border-right: 1px solid hsl(var(--felt)); }
.match-marker { position: absolute; top: 0; bottom: 0; width: 3px; background: #e8ede9; box-shadow: 0 0 8px rgba(232,237,233,.7); }
.match-bar.flash-hit { animation: bar-hit .3s ease; }
.match-bar.flash-miss { animation: bar-miss .3s ease; }
@keyframes bar-hit { 0% { box-shadow: inset 0 0 0 2px hsl(var(--felt-strong)); } 100% { box-shadow: none; } }
@keyframes bar-miss { 0% { box-shadow: inset 0 0 0 2px hsl(var(--failure)); } 100% { box-shadow: none; } }
.match-shots { display: flex; gap: 8px; margin-bottom: 14px; }
.shot-dot { width: 12px; height: 12px; border-radius: 50%; border: 1px solid hsl(var(--border)); background: hsl(var(--row)); }
.shot-dot.hit { background: hsl(var(--felt-strong)); border-color: hsl(var(--felt-strong)); }
.shot-dot.perfect { background: hsl(var(--gold1)); border-color: hsl(var(--gold1)); }
.shot-dot.miss { background: hsl(var(--failure)); border-color: hsl(var(--failure)); }
.match-shoot { max-width: 260px; margin: 0 auto; font-size: 17px; padding: 14px 16px; }

/* ========== 年度小结 / 履历（season-book）========== */
.season-book { margin-bottom: 12px; 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; }
.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)); }
.sb-body { padding: 0 .6rem .6rem; max-height: 46vh; overflow-y: auto; }

.settle-card { background: hsl(var(--row)); border: 1px solid hsl(var(--border)); border-radius: var(--r-row); padding: 8px 12px; margin-bottom: 6px; font-size: 13px; color: hsl(var(--muted)); animation: result-in .3s ease-out; }
.settle-card .sc-age { color: hsl(var(--faint)); font-weight: 700; margin-right: 8px; }
.settle-card.gold { border-color: hsl(var(--gold1) / .5); color: hsl(var(--text)); }
.settle-card.gold .sc-age { color: hsl(var(--gold1)); }
.settle-card.silver { border-color: hsl(var(--border-strong)); color: hsl(var(--text)); }

.cv-list { list-style: none; padding: 0 .9rem .8rem; max-height: 46vh; overflow-y: auto; }
.cv-list li { padding: 6px 0 6px 16px; position: relative; color: hsl(var(--muted)); font-size: 13px; border-left: 2px solid hsl(var(--border)); }
.cv-list li::before { content: ''; position: absolute; left: -5px; top: 13px; width: 8px; height: 8px; border-radius: 50%; background: hsl(var(--felt) / .8); }
.cv-list li.k-title::before { background: hsl(var(--gold1)); }
.cv-list li.k-final::before { background: hsl(var(--muted)); }
.cv-list li b { color: hsl(var(--gold1)); font-weight: 600; margin-right: 8px; }

/* toast */
#toast-root { position: fixed; top: 60px; right: 16px; z-index: 100; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { background: hsl(var(--row-hi)); border: 1px solid hsl(var(--felt)); border-radius: var(--r-row); padding: 10px 14px; max-width: 280px; box-shadow: 0 6px 24px hsl(var(--scrim) / .4); animation: toast-in .3s ease-out; }
.toast .t-title { font-size: 13px; font-weight: 700; color: hsl(var(--gold1)); }
.toast .t-desc { font-size: 12px; color: hsl(var(--muted)); margin-top: 2px; }
.toast.out { animation: toast-out .4s ease-in forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(20px); } }

/* ========== 结局页 ========== */
.ending {
  position: relative; overflow: hidden; text-align: center;
  border: 1px solid hsl(var(--gold1) / .55); border-radius: var(--r-card);
  background:
    radial-gradient(ellipse 60% 90% at 50% 110%, hsl(var(--gold2) / .28), transparent 70%),
    hsl(var(--card));
  padding: 34px 20px 30px; margin-bottom: 18px;
}
.ending-eyebrow { font-size: 13px; letter-spacing: 6px; color: hsl(var(--muted)); margin-bottom: 10px; }
.ending-title {
  font-size: 38px; font-weight: 900; letter-spacing: .02em;
  background: linear-gradient(160deg, #fff3d0 10%, hsl(var(--gold1)) 55%, hsl(var(--gold2)) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 26px hsl(var(--gold1) / .25);
}

.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; margin-bottom: 16px; }
.sum-hero-main { flex: 1; min-width: 0; }
.sum-name { font-size: 1.1rem; font-weight: 800; }
.sum-sub { font-size: .8rem; color: hsl(var(--muted)); margin-top: 2px; }
.sum-hero-side { display: flex; gap: 18px; }
.sum-hero-side .stat-cell { border: none; }

.ending-desc { color: hsl(var(--text)); margin: 14px 0 24px; max-width: 720px; }
.end-stats { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-bottom: 30px; }
.end-stats span { color: hsl(var(--faint)); font-size: 14px; }
.end-stats b { color: hsl(var(--text)); margin-left: 4px; }

.cv-title { margin: 24px 0 12px; font-size: 18px; }
.chart-box { background: hsl(var(--card)); border: 1px solid hsl(var(--border)); border-radius: var(--r-card); padding: 14px; margin-bottom: 24px; }
.chart-box svg { display: block; width: 100%; height: auto; }
.chart-legend { display: flex; gap: 16px; margin-top: 8px; font-size: 12px; color: hsl(var(--muted)); }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; }

.ach-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-bottom: 26px; }
.ach-item { background: hsl(var(--card)); border: 1px solid hsl(var(--gold1) / .4); border-radius: var(--r-row); padding: 10px 12px; }
.ach-item .a-t { font-size: 13px; font-weight: 700; color: hsl(var(--gold1)); }
.ach-item .a-d { font-size: 12px; color: hsl(var(--muted)); margin-top: 2px; }

/* ========== 图鉴 ========== */
.codex-progress { height: 6px; background: hsl(var(--row)); border-radius: 999px; overflow: hidden; margin-bottom: 8px; }
.codex-bar-fill { display: block; height: 100%; background: hsl(var(--gold1)); transition: width .5s; }
.codex-note { color: hsl(var(--muted)); font-size: 13px; margin-bottom: 20px; }
.codex-h { font-size: 16px; margin: 18px 0 10px; }
.codex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.codex-item { background: hsl(var(--card)); border: 1px solid hsl(var(--border)); border-radius: var(--r-row); padding: 12px; }
.codex-item.unlocked { border-color: hsl(var(--gold1) / .5); }
.codex-item .c-title { font-size: 14px; font-weight: 700; }
.codex-item.unlocked .c-title { color: hsl(var(--gold1)); }
.codex-item .c-desc { font-size: 12px; color: hsl(var(--muted)); margin-top: 4px; }
.codex-item.locked .c-title { color: hsl(var(--border-strong)); }
.codex-item .c-hint { font-size: 12px; color: hsl(var(--faint)); margin-top: 4px; font-style: italic; }

/* ========== 档案 ========== */
.archive-list { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-bottom: 26px; }
.archive-item { background: hsl(var(--card)); border: 1px solid hsl(var(--border)); border-radius: var(--r-row); padding: 14px 16px; font-size: 14px; }
.archive-item .a-title { color: hsl(var(--gold1)); font-weight: 700; }
.archive-item .a-meta { color: hsl(var(--muted)); font-size: 12px; margin-top: 4px; }
.archive-empty { color: hsl(var(--muted)); }

/* 减弱动效偏好 */
@media (prefers-reduced-motion: reduce) {
  .view, .settle-card, .event-result, .toast, .slot, .slot.win, .stat-delta,
  .ovr-badge.up, .ovr-badge.down, .st-v.up, .st-v.down {
    animation: none !important; transition: none !important;
  }
}
