:root {
  --bg: #f7f6f3;
  --card: #ffffff;
  --text: #1d1f22;
  --sub: #7c8087;
  --faint: #b3b7bd;
  --line: #e7e5e0;
  --line-soft: #f0eeea;
  --accent: #1f6f5c;
  --accent-soft: #e4f1ec;
  --accent-text: #ffffff;
  --danger: #c2413a;
  --hover: #faf9f7;
  --shadow: 0 1px 2px rgba(20, 20, 20, .04), 0 4px 14px rgba(20, 20, 20, .05);
  --radius: 14px;
  --top-h: 0px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16171a;
    --card: #1f2125;
    --text: #e8e9eb;
    --sub: #9a9ea6;
    --faint: #62666e;
    --line: #2e3036;
    --line-soft: #282a2f;
    --accent: #4fbf9f;
    --accent-soft: #1d3530;
    --accent-text: #0f1d19;
    --danger: #ef6b63;
    --hover: #24262b;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ---------- top bar + tabs ---------- */
.top {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.top-inner { max-width: 820px; margin: 0 auto; padding: 10px 16px 4px; display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; color: var(--text); text-decoration: none; letter-spacing: .5px; }
.logo { width: 26px; height: 26px; border-radius: 8px; background: var(--accent); color: var(--accent-text); display: grid; place-items: center; font-size: 15px; }
.user { margin-left: auto; }
.user button { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 5px 14px; font-size: 14px; cursor: pointer; }
.user button.me { display: flex; align-items: center; gap: 6px; max-width: 46vw; }
.user button.me span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 20px; height: 20px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }

.tabs { max-width: 820px; margin: 0 auto; display: flex; gap: 4px; overflow-x: auto; padding: 4px 12px 0; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none; display: flex; align-items: baseline; gap: 6px; padding: 8px 10px 10px; color: var(--sub);
  text-decoration: none; font-size: 15px; border-bottom: 2.5px solid transparent; white-space: nowrap;
}
.tab .cnt { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.tab.on { color: var(--text); font-weight: 600; border-bottom-color: var(--accent); }
.tab.on .cnt { color: var(--accent); font-weight: 500; }
.tab .soon { font-size: 11px; padding: 0 6px; border-radius: 99px; background: var(--line-soft); color: var(--sub); font-weight: 400; }

/* ---------- layout ---------- */
.wrap { max-width: 820px; margin: 0 auto; padding: 16px 14px calc(48px + env(safe-area-inset-bottom)); }
.hero { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 16px; box-shadow: var(--shadow); }
.hero h1 { margin: 0; font-size: 21px; letter-spacing: .3px; }
.hero h1 small { font-size: 13px; color: var(--sub); font-weight: 400; margin-left: 8px; }
.hero .meta { color: var(--sub); font-size: 13px; margin-top: 2px; }
.prog { margin-top: 14px; }
.prog-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--sub); margin-bottom: 7px; }
.prog-top b { color: var(--text); font-size: 18px; font-variant-numeric: tabular-nums; margin-right: 2px; }
.bar { height: 8px; border-radius: 99px; background: var(--line-soft); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width .3s ease; }
.soon-card { text-align: center; padding: 34px 10px 22px; }
.soon-card .big { font-size: 40px; }
.soon-card p { color: var(--sub); margin: 8px 0 0; }

.guest-note { margin-top: 12px; font-size: 13px; color: var(--sub); background: var(--accent-soft); border-radius: 10px; padding: 9px 12px; }
.linkish { border: 0; background: none; padding: 0 2px; color: var(--accent); font-weight: 600; cursor: pointer; }

/* ---------- toolbar ---------- */
.toolbar {
  position: sticky; top: var(--top-h); z-index: 20; margin: 12px -14px 0; padding: 10px 14px 8px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.tb-row { display: flex; align-items: center; gap: 10px; }
.search { flex: 1; display: flex; align-items: center; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; min-width: 0; }
.search:focus-within { border-color: var(--accent); }
.search svg { width: 17px; height: 17px; fill: var(--faint); flex: none; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 16px; padding: 9px 0; }
.switch { display: flex; align-items: center; gap: 7px; font-size: 14px; white-space: nowrap; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 38px; height: 23px; border-radius: 99px; background: var(--line); position: relative; transition: background .2s; flex: none; }
.switch .track i { position: absolute; top: 2.5px; left: 2.5px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track i { transform: translateX(15px); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }
.tb-actions { margin-top: 8px; overflow-x: auto; scrollbar-width: none; gap: 6px; }
.tb-actions::-webkit-scrollbar { display: none; }
.tb-actions button { flex: none; border: 1px solid var(--line); background: var(--card); border-radius: 99px; padding: 4px 12px; font-size: 13px; cursor: pointer; }
.tb-actions button:active { background: var(--accent-soft); }
.found { margin-left: auto; font-size: 12px; color: var(--sub); white-space: nowrap; padding-left: 6px; }

/* ---------- list ---------- */
.list { margin-top: 6px; }
.year { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; box-shadow: var(--shadow); }
.year > summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 12px 16px; cursor: pointer; user-select: none; font-weight: 600; }
.year > summary::-webkit-details-marker { display: none; }
.year > summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--faint); border-bottom: 2px solid var(--faint); transform: rotate(-45deg); transition: transform .15s; margin-right: 2px; }
.year[open] > summary::before { transform: rotate(45deg); }
.year .ycount { font-size: 12px; font-weight: 500; color: var(--accent); background: var(--accent-soft); padding: 1px 8px; border-radius: 99px; }
.year .yprog { margin-left: auto; font-size: 12px; color: var(--sub); font-weight: 400; font-variant-numeric: tabular-nums; }
.year .yprog.full { color: var(--accent); }

.row { display: flex; align-items: flex-start; gap: 10px; padding: 9px 14px 9px 8px; border-top: 1px solid var(--line-soft); }
@media (hover: hover) { .row:hover { background: var(--hover); } a.ttl:hover { color: var(--accent); } }
.chk {
  flex: none; width: 40px; height: 40px; margin: -8px -4px -8px 0; border: 0; background: none; padding: 0; cursor: pointer;
  display: grid; place-items: center; -webkit-tap-highlight-color: transparent;
}
.chk i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--faint); display: grid; place-items: center; transition: all .15s; }
.chk i::after { content: ""; width: 9px; height: 5px; border-left: 2px solid var(--accent-text); border-bottom: 2px solid var(--accent-text); transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.row.done .chk i { background: var(--accent); border-color: var(--accent); }
.row.done .chk i::after { opacity: 1; }
.chk:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; border-radius: 10px; }
.body { flex: 1; min-width: 0; }
.ttl { color: var(--text); text-decoration: none; font-size: 15px; line-height: 1.5; word-break: break-word; }

.nolink { color: var(--sub); }
.nolink em { font-style: normal; font-size: 11px; color: var(--sub); background: var(--line-soft); padding: 1px 7px; border-radius: 99px; margin-left: 6px; white-space: nowrap; }
.sub { display: flex; gap: 10px; margin-top: 2px; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.sub .seq { color: var(--sub); }
.row.done .ttl { color: var(--faint); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--faint) 70%, transparent); }
.row.done .sub .seq { color: var(--faint); }
.row.hide, .year.hide { display: none; }
.empty { text-align: center; color: var(--sub); padding: 40px 10px; font-size: 14px; }
.foot { text-align: center; color: var(--faint); font-size: 12px; margin-top: 22px; }
.skeleton { height: 280px; border-radius: var(--radius); background: linear-gradient(90deg, var(--line-soft), var(--card), var(--line-soft)); background-size: 200% 100%; animation: sk 1.2s infinite linear; margin-top: 12px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- dialogs ---------- */
.dlg { border: 0; border-radius: 18px; padding: 20px; width: min(380px, calc(100vw - 28px)); background: var(--card); color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.dlg::backdrop { background: rgba(10, 12, 14, .42); }
.dlg h3 { margin: 0 0 6px; }
.seg { display: flex; background: var(--line-soft); border-radius: 10px; padding: 3px; margin-bottom: 14px; }
.seg button { flex: 1; border: 0; background: none; border-radius: 8px; padding: 7px; cursor: pointer; color: var(--sub); }
.seg button.on { background: var(--card); color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.fld { display: block; margin-bottom: 12px; }
.fld span { display: block; font-size: 13px; color: var(--sub); margin-bottom: 4px; }
.fld input { width: 100%; font-size: 16px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); outline: 0; }
.fld input:focus { border-color: var(--accent); }
.hint-sm { font-size: 12px; color: var(--sub); margin: 0 0 6px; }
.err { color: var(--danger); font-size: 13px; min-height: 1.3em; margin: 4px 0 8px; }
.dlg-actions { display: flex; gap: 8px; justify-content: flex-end; }
.dlg-actions button, .menu button { border-radius: 10px; padding: 9px 16px; cursor: pointer; border: 1px solid var(--line); background: var(--card); }
.primary { background: var(--accent) !important; color: var(--accent-text); border-color: var(--accent) !important; font-weight: 600; }
.primary:disabled { opacity: .6; }
.ghost { background: transparent !important; }
.danger-fill { background: var(--danger) !important; border-color: var(--danger) !important; color: #fff; font-weight: 600; }
.menu { display: flex; flex-direction: column; gap: 8px; }
.menu-user { margin: 0 0 6px; font-weight: 600; }
.menu .danger { color: var(--danger); }

.toast {
  position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--text); color: var(--bg); padding: 9px 16px; border-radius: 99px; font-size: 14px; z-index: 50;
  box-shadow: 0 6px 20px rgba(0,0,0,.2); max-width: calc(100vw - 32px); text-align: center;
}

@media (min-width: 640px) {
  .wrap { padding-top: 22px; }
  .hero { padding: 22px 24px 20px; }
  .row { padding-right: 20px; padding-left: 12px; }
  .toolbar { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
}
.foot a{color:inherit;font-weight:600;text-decoration:underline;text-underline-offset:2px}

/* ---------- 段位: hero card + sticky rank bar ---------- */
.rank-hero {
  margin-top: 14px; width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer;
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--bg); -webkit-tap-highlight-color: transparent;
}
.rank-hero:active { transform: scale(.99); }
.rh-badge { flex: none; width: 58px; height: 58px; display: grid; place-items: center; filter: drop-shadow(0 3px 6px rgba(0,0,0,.18)); }
.rh-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rh-k { font-size: 11px; color: var(--sub); letter-spacing: .5px; }
.rh-label { font-size: 18px; font-weight: 700; line-height: 1.3; }
.rh-next { font-size: 13px; color: var(--sub); }
.rh-next b { color: var(--accent); font-variant-numeric: tabular-nums; }
.rh-stat { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.rh-stat b { color: var(--sub); font-weight: 600; }
.rh-more { flex: none; align-self: center; font-size: 12px; color: var(--accent); font-weight: 600; white-space: nowrap; }
.rh-more i { font-style: normal; font-size: 16px; margin-left: 2px; }

.rankbar {
  width: 100%; display: flex; align-items: center; gap: 8px; margin: 0 0 8px; padding: 4px 10px 4px 6px; cursor: pointer;
  border: 1px solid var(--line); background: var(--card); border-radius: 12px; -webkit-tap-highlight-color: transparent; --tc: var(--accent);
}
.rb-badge { flex: none; width: 26px; height: 26px; display: grid; place-items: center; }
.rb-badge.pop { animation: rbpop .6s cubic-bezier(.3,1.6,.5,1); }
@keyframes rbpop { 0% { transform: scale(.4); } 100% { transform: scale(1); } }
.rb-label { flex: none; font-size: 13px; font-weight: 700; white-space: nowrap; }
.rb-track { flex: 1; min-width: 40px; height: 7px; border-radius: 99px; background: var(--line-soft); overflow: hidden; }
.rb-track i {
  display: block; height: 100%; width: 0; border-radius: 99px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--tc) 55%, #fff), var(--tc));
  transition: width .7s cubic-bezier(.2,.9,.3,1.2);
}
.rb-nums { flex: none; font-size: 12px; color: var(--sub); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- 个人页 ---------- */
.mepage { padding-top: 2px; }
.mepage .back { border: 0; background: none; color: var(--accent); font-weight: 600; padding: 4px 0 10px; cursor: pointer; font-size: 14px; }
.me-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.avatar.big { width: 48px; height: 48px; font-size: 22px; }
.me-name { font-size: 20px; font-weight: 800; word-break: break-all; }
.me-sub { font-size: 12.5px; color: var(--sub); }
.me-actions, .me-acct { display: flex; gap: 8px; margin: 0 0 14px; }
.me-actions button, .me-acct button { flex: 1; border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 10px; cursor: pointer; font-size: 15px; }
.me-actions .primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
.me-acct { margin-top: 22px; }
.me-acct .danger { color: var(--danger); }
.mepage h4 { margin: 20px 0 8px; font-size: 15px; }
.mepage h4 small { font-weight: 400; color: var(--sub); font-size: 12px; margin-left: 6px; }
.rk-main { flex: 1; min-width: 0; }
.rk-bar { margin: 6px 0 4px; height: 7px; }
.rk-bar i { background: var(--tc); }
.mcs { display: flex; flex-direction: column; gap: 8px; }
.mc { display: block; padding: 10px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); text-decoration: none; color: var(--text); }
.mc-top { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; }
.mc-top span { color: var(--sub); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.mc .bar { display: block; height: 6px; }
.skeleton.sm { height: 52px; margin: 0; }
.medal em.lk { color: var(--faint); }

/* ---------- 全站段位 bar (header) ---------- */
.ovbar {
  max-width: 820px; margin: 2px auto 0; display: flex; align-items: center; gap: 7px; padding: 3px 16px 2px;
  text-decoration: none; color: var(--text); -webkit-tap-highlight-color: transparent; --tc: var(--accent);
}
.ov-badge { flex: none; width: 24px; height: 24px; display: grid; place-items: center; }
.ov-badge.pop { animation: rbpop .6s cubic-bezier(.3,1.6,.5,1); }
.ov-k { flex: none; font-size: 11px; color: var(--sub); }
.ov-label { flex: none; font-size: 13px; font-weight: 700; white-space: nowrap; }
.ov-track { flex: 1; min-width: 30px; height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.ov-track i { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--tc); transition: width .7s cubic-bezier(.2,.9,.3,1.2); }
.ov-nums { flex: none; font-size: 12px; color: var(--sub); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ov-more { flex: none; color: var(--faint); font-size: 16px; line-height: 1; }
@media (max-width: 360px) { .ov-k { display: none; } }
.user { display: flex; align-items: center; gap: 6px; }
.user a.me { display: flex; align-items: center; gap: 6px; max-width: 46vw; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 5px 12px 5px 6px; font-size: 14px; color: var(--text); text-decoration: none; }
.user a.me span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user a.me.guest { padding: 4px; }
.user a.me.guest .avatar { width: 22px; height: 22px; font-size: 11px; }
.dlg:not([open]) { display: none; }
.rk-card { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; margin-bottom: 8px;
  background: color-mix(in srgb, var(--tc) 12%, var(--card)); border: 1px solid color-mix(in srgb, var(--tc) 30%, var(--line)); }
.rk-card svg { flex: none; filter: drop-shadow(0 3px 6px rgba(0,0,0,.15)); }
.rk-k { font-size: 12px; color: var(--sub); }
.rk-name { font-size: 18px; font-weight: 800; }
.rk-sub { font-size: 12.5px; color: var(--sub); }
.rk-sub b { color: var(--text); }
.sheet h4 { margin: 18px 0 8px; font-size: 15px; }
.sheet h4 small { font-weight: 400; color: var(--sub); font-size: 12px; margin-left: 6px; }
.ladder { list-style: none; margin: 0; padding: 0; }
.lad { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line-soft); opacity: .55; }
.lad.hit { opacity: 1; }
.lad-b { flex: none; width: 34px; }
.lad-t { flex: none; width: 70px; display: flex; flex-direction: column; line-height: 1.25; }
.lad-t b { font-size: 13px; }
.lad-t em { font-style: normal; font-size: 11px; color: var(--faint); }
.lad-steps { flex: 1; display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.lad-step { display: flex; flex-direction: column; align-items: center; min-width: 34px; padding: 2px 4px; border-radius: 8px; background: var(--line-soft); font-size: 12px; font-weight: 700; color: var(--sub); line-height: 1.2; }
.lad-step small { font-size: 10px; font-weight: 400; color: var(--faint); font-variant-numeric: tabular-nums; }
.lad-step.on { background: var(--accent-soft); color: var(--accent); }
.lad-step.cur { background: var(--accent); color: var(--accent-text); }
.lad-step.cur small { color: inherit; opacity: .8; }
.medals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 480px) { .medals { grid-template-columns: repeat(4, 1fr); } }
.medal { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 10px 4px 8px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line-soft); }
.medal b { font-size: 13px; margin-top: 4px; }
.medal small { font-size: 11px; color: var(--sub); line-height: 1.3; }
.medal em { font-style: normal; font-size: 10px; color: var(--accent); margin-top: 2px; }
.medal:not(.got) b { color: var(--sub); }
.medal-ico {
  --s: 48px; position: relative; width: var(--s); height: var(--s); border-radius: 50%; display: grid; place-items: center;
  font-size: calc(var(--s) * .5); line-height: 1;
  background: radial-gradient(circle at 35% 30%, #fff8d6, #ffd447 45%, #e19a00 100%);
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.15), 0 0 0 3px #ffe58a, 0 4px 10px rgba(225,154,0,.35);
}
.medal-ico.locked { background: var(--line-soft); box-shadow: inset 0 0 0 2px var(--line); }
.medal-ico.locked > span { filter: grayscale(1); opacity: .35; }
.medal-ico .lock { position: absolute; right: -3px; bottom: -3px; font-size: calc(var(--s) * .28); font-style: normal; }

/* ---------- celebration overlay (Duolingo-ish) ---------- */
html.cel-open { overflow: hidden; }
.cel {
  position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--glow, #ffc800) 30%, var(--card)), var(--card) 65%);
  padding: env(safe-area-inset-top) 20px env(safe-area-inset-bottom); animation: celfade .25s ease;
}
.cel canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.cel-card { position: relative; text-align: center; max-width: 420px; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.cel-rays {
  position: absolute; top: 50%; left: 50%; width: 520px; height: 520px; margin: -340px 0 0 -260px; border-radius: 50%; pointer-events: none; opacity: .35;
  background: repeating-conic-gradient(from 0deg, var(--glow, #ffc800) 0deg 10deg, transparent 10deg 24deg);
  -webkit-mask: radial-gradient(circle, #000 0, transparent 62%); mask: radial-gradient(circle, #000 0, transparent 62%);
  animation: spin 18s linear infinite;
}
.cel-badge { position: relative; width: 156px; height: 160px; display: grid; place-items: center; filter: drop-shadow(0 10px 22px rgba(0,0,0,.25)); }
.cel-badge .medal-ico { overflow: hidden; }
.cel-badge .medal-ico::after {
  content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.85) 50%, transparent 65%);
  transform: translateX(-120%); pointer-events: none;
}
.badge-svg .sh { transform: translateX(-30px); }
.cel-kicker { margin: 22px 0 0; font-size: 14px; font-weight: 800; letter-spacing: 2px; color: color-mix(in srgb, var(--glow, #ffc800) 70%, var(--text)); }
.cel-title { margin: 6px 0 0; font-size: 28px; font-weight: 900; line-height: 1.25; letter-spacing: .5px; }
.cel-sub { margin: 10px 0 0; color: var(--sub); font-size: 15px; }
.cel-foot { width: 100%; max-width: 420px; padding: 0 0 calc(22px + env(safe-area-inset-bottom)); }
.cel-btn {
  width: 100%; border: 0; border-radius: 16px; padding: 14px; font-size: 17px; font-weight: 800; letter-spacing: 2px; cursor: pointer;
  color: #fff; background: #58cc02; box-shadow: 0 5px 0 #46a302; transform: translateY(0); transition: transform .06s, box-shadow .06s;
  -webkit-tap-highlight-color: transparent;
}
.cel-btn:active { transform: translateY(5px); box-shadow: 0 0 0 #46a302; }
.cel-btn:focus-visible { outline: 3px solid #1cb0f6; outline-offset: 3px; }
.cel-card.in .cel-badge { animation: badgein .75s cubic-bezier(.25,1.6,.45,1) both; }
.cel-card.in .cel-badge .medal-ico::after { animation: shine 1.1s .55s ease-out both; }
.cel-card.in .cel-badge .sh { animation: svgshine 1.1s .55s ease-out both; }
.cel-card.in .cel-kicker { animation: rise .45s .35s both; }
.cel-card.in .cel-title { animation: rise .45s .45s both; }
.cel-card.in .cel-sub { animation: rise .45s .55s both; }
@keyframes badgein { 0% { transform: scale(0) rotate(-25deg); opacity: 0; } 60% { transform: scale(1.18) rotate(6deg); opacity: 1; } 80% { transform: scale(.94) rotate(-2deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes shine { to { transform: translateX(120%); } }
@keyframes svgshine { from { transform: translateX(-30px); } to { transform: translateX(110px); } }
@keyframes rise { from { transform: translateY(14px); opacity: 0; } }
@keyframes celfade { from { opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .cel-rays, .cel-card.in .cel-badge, .cel-card.in .cel-badge .medal-ico::after, .cel-card.in .cel-badge .sh, .cel-card.in .cel-kicker, .cel-card.in .cel-title, .cel-card.in .cel-sub, .ov-badge.pop { animation: none !important; }
  .cel { animation: celfade .3s ease; }
  .ov-track i { transition: none; }
}

/* ---------- 分类 chips ---------- */
.cats { display: flex; gap: 6px; overflow-x: auto; margin: 8px -14px 0; padding: 0 14px; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-behavior: smooth; }
.cats::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: flex; align-items: baseline; gap: 5px; border: 1px solid var(--line); background: var(--card);
  border-radius: 99px; padding: 4px 11px; font-size: 13px; cursor: pointer; white-space: nowrap; color: var(--text);
  -webkit-tap-highlight-color: transparent;
}
.chip .n { font-size: 11.5px; color: var(--sub); font-variant-numeric: tabular-nums; }
.chip.full .n { color: var(--accent); }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
.chip.on .n { color: var(--accent-text); opacity: .85; }
.chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sub .tags { color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
