/* Pulse v2 — premium leaderboard, scorecard, weekly rating.
   Theme-safe: uses the app's surface/border/text/accent tokens only. */

/* ---------------------------------------------------------------- period bar */
.p2-period { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.p2-period .seg.p2-mode button { font-weight: 650; }
.p2-nav { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-dim); display: grid; place-items: center; cursor: pointer;
  transition: .15s; }
.p2-nav:hover { color: var(--text); border-color: var(--brand); background: var(--surface-2); }
.p2-nav.flip svg { transform: rotate(180deg); }
.p2-period-now { text-align: center; min-width: 150px; line-height: 1.2; }
.p2-period-now b { display: block; font-size: 15px; font-weight: 700; color: var(--text); }
.p2-period-now span { font-size: 11.5px; color: var(--text-faint); }
.p2-weeks { display: flex; gap: 5px; }
.p2-weeks button { width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--border-soft);
  background: var(--surface); color: var(--text-dim); font-size: 12px; font-weight: 650; cursor: pointer; transition: .15s; }
.p2-weeks button:hover { border-color: var(--brand); color: var(--text); }
.p2-weeks button.on { background: var(--brand); border-color: var(--brand); color: #fff; }

.p2-warn { display: flex; gap: 9px; align-items: center; background: var(--amber-soft); color: var(--text);
  border: 1px solid var(--amber); border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 14px; font-size: 13px; }
.p2-warn svg { color: var(--amber); flex: none; }
.p2-live { display: flex; gap: 8px; align-items: center; color: var(--text-dim); font-size: 12.5px;
  background: var(--surface-2); border: 1px dashed var(--border); border-radius: var(--radius-sm); padding: 8px 13px; margin-bottom: 14px; }
.p2-live svg { color: var(--brand); }

/* ---------------------------------------------------------------- hero strip */
.p2-hero { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.p2-ht { display: flex; align-items: center; gap: 14px; padding: 15px 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); position: relative; overflow: hidden; }
.p2-ht::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--c); opacity: .85; }
.p2-ht-ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; flex: none; }
.p2-ht-ring { position: relative; width: 46px; height: 46px; flex: none; }
.p2-ht-body { min-width: 0; }
.p2-ht-label { font-size: 11.5px; font-weight: 650; color: var(--text-faint); text-transform: uppercase; letter-spacing: .04em; }
.p2-ht-big { font-size: 26px; font-weight: 800; color: var(--text); line-height: 1.05; margin-top: 1px; }
.p2-ht-big i { font-size: 15px; font-weight: 700; color: var(--text-dim); font-style: normal; }
.p2-ht-sub { font-size: 12px; color: var(--text-dim); margin-top: 2px; }

/* ---------------------------------------------------------------- podium (size ladder: #1 biggest) */
.p2-podium { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 14px; align-items: end; margin-bottom: 18px; }
.p2-podium-card { position: relative; text-align: center; padding: 16px 12px 14px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); cursor: pointer;
  animation: p2fade .5s ease both;
  transition: transform .2s, box-shadow .2s, border-color .2s; }
.p2-podium-card.silver { animation-delay: .06s; } .p2-podium-card.bronze { animation-delay: .14s; }
@keyframes p2fade { from { opacity: 0; } }
.p2-podium-card:hover { transform: translateY(-3px); border-color: var(--sc); box-shadow: 0 12px 30px -16px var(--sc); }
.p2-podium-card .avatar { margin: 8px auto 7px; width: 50px; height: 50px; font-size: 17px; }
.p2-podium-name { font-weight: 700; font-size: 14px; color: var(--text); }
.p2-podium-title { font-size: 11px; color: var(--text-faint); margin-bottom: 6px; }
.p2-podium-medal { font-size: 24px; line-height: 1; }
.p2-podium-score { font-size: 23px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.p2-podium-score span { font-size: 12px; opacity: .7; }
.p2-podium-move { margin-top: 6px; min-height: 18px; }
.p2-podium-plinth { position: absolute; top: 11px; right: 11px; font-size: 12px; font-weight: 800;
  color: var(--text-faint); background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 8px; padding: 1px 7px; }
.p2-podium-card.silver { background: linear-gradient(180deg, color-mix(in srgb, #b8c0cc 14%, var(--surface)), var(--surface)); }
.p2-podium-card.bronze { background: linear-gradient(180deg, color-mix(in srgb, #cd7f43 12%, var(--surface)), var(--surface)); transform: translateY(10px); }
.p2-podium-card.bronze .avatar { width: 44px; height: 44px; font-size: 15px; }
.p2-podium-card.bronze .p2-podium-score { font-size: 20px; }
.p2-podium-card.bronze:hover { transform: translateY(7px); }
/* the champion — biggest, raised, crowned, spotlit + a live glow that breathes */
.p2-podium-card.champ { padding: 30px 14px 20px; transform: translateY(-20px); overflow: visible;
  background:
    radial-gradient(130% 75% at 50% -8%, color-mix(in srgb, #f5c518 26%, transparent), transparent 62%),
    linear-gradient(180deg, color-mix(in srgb, #f5c518 15%, var(--surface)), var(--surface) 74%);
  border-color: color-mix(in srgb, #f5c518 62%, var(--border));
  animation: p2fade .5s ease both, p2glow 2.6s ease-in-out .55s infinite; }
@keyframes p2glow {
  0%, 100% { box-shadow: 0 16px 44px -22px color-mix(in srgb, #f5c518 78%, transparent); }
  50%      { box-shadow: 0 24px 66px -18px color-mix(in srgb, #f5c518 100%, transparent),
                         0 0 0 1px color-mix(in srgb, #f5c518 34%, transparent); } }
.p2-podium-card.champ:hover { transform: translateY(-23px); }
.p2-podium-card.champ .avatar { width: 78px; height: 78px; font-size: 26px;
  box-shadow: 0 0 0 3px color-mix(in srgb, #f5c518 58%, transparent), 0 8px 20px -6px rgba(0, 0, 0, .45); }
.p2-podium-card.champ .p2-podium-name { font-size: 18px; }
.p2-podium-card.champ .p2-podium-score { font-size: 38px; }
.p2-podium-card.champ .p2-podium-medal { font-size: 30px; }
.p2-crown { font-size: 28px; line-height: 1; filter: drop-shadow(0 3px 6px color-mix(in srgb, #f5c518 60%, transparent));
  animation: p2crown 2.6s ease-in-out infinite; }
@keyframes p2crown { 0%, 100% { transform: translateY(0) rotate(-5deg); } 50% { transform: translateY(-4px) rotate(5deg); } }
.p2-leading { display: inline-block; margin-top: 4px; font-size: 10px; font-weight: 800; letter-spacing: .09em;
  color: var(--text); background: color-mix(in srgb, #f5c518 34%, transparent); border-radius: 6px; padding: 3px 10px;
  box-shadow: 0 0 0 1px color-mix(in srgb, #f5c518 42%, transparent); }
/* twinkling sparkles around the champion */
.p2-spk { position: absolute; font-size: 14px; pointer-events: none; animation: p2twinkle 1.9s ease-in-out infinite; }
.p2-spk.s1 { top: 16px; left: 22px; animation-delay: .2s; }
.p2-spk.s2 { top: 34px; right: 24px; animation-delay: 1s; }
@keyframes p2twinkle { 0%, 100% { opacity: 0; transform: scale(.5); } 50% { opacity: 1; transform: scale(1.15); } }

/* champion banner (energetic, shine sweep) + humility strip (grounding) */
.p2-hero-champ { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; padding: 13px 18px;
  position: relative; overflow: hidden; border-radius: var(--radius); color: var(--text);
  background: linear-gradient(100deg, color-mix(in srgb, #f5c518 20%, var(--surface)),
              color-mix(in srgb, var(--brand) 9%, var(--surface)) 68%, var(--surface));
  border: 1px solid color-mix(in srgb, #f5c518 46%, var(--border)); }
.p2-hero-champ::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 34%, rgba(255, 255, 255, .16) 47%, transparent 60%);
  transform: translateX(-120%); animation: p2sweep 4s ease-in-out 1s infinite; }
@keyframes p2sweep { 0% { transform: translateX(-120%); } 45%, 100% { transform: translateX(220%); } }
.p2-hc-flames { font-size: 26px; line-height: 1; animation: p2crown 1.7s ease-in-out infinite; }
.p2-hc-text { flex: 1; min-width: 0; }
.p2-hc-kicker { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--text-faint); }
.p2-hc-name { font-size: 16px; font-weight: 700; margin-top: 1px; } .p2-hc-name b { font-weight: 800; }
.p2-hc-cta { font-size: 12.5px; font-weight: 700; white-space: nowrap; padding: 6px 13px; border-radius: 20px;
  background: color-mix(in srgb, #f5c518 26%, transparent); }
.p2-humble { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 16px;
  padding: 10px 16px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border-soft);
  font-size: 13px; font-style: italic; color: var(--text-dim); text-align: center; }
.p2-humble-em { font-style: normal; font-size: 16px; }
@media (max-width: 720px) { .p2-hc-cta { display: none; } }

/* ---------------------------------------------------------------- callouts */
.p2-callouts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.p2-call { display: flex; align-items: center; gap: 11px; padding: 12px 13px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border); }
.p2-call-em { font-size: 20px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px;
  background: color-mix(in srgb, var(--c) 14%, transparent); }
.p2-call-body { min-width: 0; flex: 1; }
.p2-call-label { font-size: 10.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint); }
.p2-call-name { font-size: 13.5px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p2-call-val { font-size: 12.5px; font-weight: 750; color: var(--c); white-space: nowrap; }

/* ---------------------------------------------------------------- board grid */
.p2-board-wrap { overflow-x: auto; padding: 2px; }
.p2-board { --m: 6; display: flex; flex-direction: column; gap: 7px; min-width: 860px; }
.p2-board.narrow { --m: 5; min-width: 780px; }
.p2-head, .p2-row { display: grid; align-items: center; gap: 10px;
  grid-template-columns: 48px 34px minmax(128px, 1.5fr) repeat(var(--m), minmax(54px, 1fr)) 78px 132px; }
.p2-head { padding: 2px 16px 10px; }
.p2-col-h { font-size: 11px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: .03em;
  text-align: center; line-height: 1.25; }
.p2-col-h i { display: block; font-size: 9.5px; font-weight: 600; color: var(--text-faint); font-style: normal; text-transform: none; letter-spacing: 0; }
.p2-col-h.right { text-align: right; } .p2-col-h.center { text-align: center; }
.p2-name-h { font-size: 11px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: .03em; }
.p2-h-rank { font-size: 12px; font-weight: 700; color: var(--text-faint); text-align: center; }

.p2-row { position: relative; padding: 12px 16px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--border); cursor: pointer; overflow: hidden;
  animation: p2in .4s both; animation-delay: calc(var(--i) * 32ms); transition: transform .16s, border-color .16s, box-shadow .16s; }
@keyframes p2in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.p2-row::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--sc); opacity: .8; }
.p2-row:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--sc) 55%, var(--border));
  box-shadow: 0 12px 26px -16px var(--sc); }
.p2-row.medal { border-color: color-mix(in srgb, var(--sc) 32%, var(--border)); }
.p2-row.gold::before { width: 4px; }

.p2-rank { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 15px; font-weight: 800; color: var(--text-dim); }
.p2-rank.gold { color: #f5c518; } .p2-rank.silver { color: #9aa4b2; } .p2-rank.bronze { color: #cd7f43; }
.p2-move { font-size: 9.5px; font-weight: 800; padding: 0 5px; border-radius: 6px; line-height: 15px; letter-spacing: .02em; }
.p2-move.up { color: var(--green); background: color-mix(in srgb, var(--green) 15%, transparent); }
.p2-move.down { color: var(--red); background: color-mix(in srgb, var(--red) 15%, transparent); }
.p2-move.flat { color: var(--text-faint); }
.p2-move.new { color: var(--brand); background: var(--brand-soft); }

.p2-name { min-width: 0; line-height: 1.25; }
.p2-name span { display: block; font-size: 11px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p2-row .avatar, .p2-row .p2-av { flex: none; }

/* metric cell: value + micro progress bar */
.p2-cell { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.p2-cv { font-size: 15px; font-weight: 750; color: var(--text); display: inline-flex; align-items: baseline; gap: 2px; }
.p2-cell.zero .p2-cv { color: var(--text-faint); font-weight: 600; }
.p2-cell.hit .p2-cv { color: var(--green); }
.p2-cell.over .p2-cv { color: var(--mc); }
.p2-over { font-size: 8px; color: var(--mc); font-style: normal; }
.p2-frac { font-size: 9px; color: var(--text-faint); font-style: normal; }
.p2-cbar { width: 82%; max-width: 60px; height: 4px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.p2-cbar i { display: block; height: 100%; border-radius: 3px; background: var(--mc); transition: width .5s cubic-bezier(.2,.7,.3,1); }
.p2-cell.hit .p2-cbar i { box-shadow: 0 0 7px color-mix(in srgb, var(--mc) 70%, transparent); }

.p2-trend { display: grid; place-items: center; }
.p2-spark { display: block; }

.p2-score { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.p2-score-ring { position: relative; width: 40px; height: 40px; flex: none; }
.p2-score-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: var(--text); }
.p2-score-meta { text-align: right; min-width: 44px; }
.p2-pct { font-size: 17px; font-weight: 800; line-height: 1; }
.p2-pct span { font-size: 10px; opacity: .7; }
.p2-gap { font-size: 10px; color: var(--text-faint); margin-top: 2px; white-space: nowrap; }
.p2-gap.lead { color: var(--green); font-weight: 700; }

.p2-ring-fg { transition: stroke-dashoffset .7s cubic-bezier(.2,.7,.3,1); }

.p2-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-top: 16px; padding-top: 14px;
  border-top: 1px solid var(--border-soft); font-size: 12px; color: var(--text-dim); }
.p2-legend-lbl { font-weight: 700; color: var(--text-faint); text-transform: uppercase; font-size: 10.5px; letter-spacing: .04em; }
.p2-legend span { display: inline-flex; align-items: center; gap: 6px; }
.p2-legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.p2-legend b { color: var(--text); }

/* ---------------------------------------------------------------- scorecard */
.p2-detail { display: flex; flex-direction: column; gap: 4px; }
.p2-detail-hero { display: flex; align-items: center; gap: 16px; padding: 4px 0 14px; margin-bottom: 6px; border-bottom: 1px solid var(--border-soft); }
.p2-dh-ring { position: relative; width: 76px; height: 76px; flex: none; }
.p2-dh-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 20px; font-weight: 800; color: var(--text); }
.p2-dh-ring b i { font-size: 11px; font-weight: 700; color: var(--text-dim); font-style: normal; }
.p2-dh-rank { font-size: 16px; font-weight: 800; color: var(--text); display: flex; align-items: center; gap: 8px; }
.p2-dh-title { font-size: 12.5px; color: var(--text-faint); margin-top: 2px; }
.p2-sec-h { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint); margin: 14px 0 8px; }

.p2-funnel { display: flex; align-items: flex-end; gap: 0; padding: 6px 4px 2px; }
.p2-fn-stage { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.p2-fn-bar { width: 62%; max-width: 54px; border-radius: 7px 7px 4px 4px; transition: height .5s cubic-bezier(.2,.7,.3,1); }
.p2-fn-v { font-size: 16px; font-weight: 800; color: var(--text); }
.p2-fn-k { font-size: 10.5px; color: var(--text-faint); font-weight: 600; }
.p2-fn-arrow { align-self: center; font-size: 10.5px; font-weight: 700; color: var(--text-dim); padding: 0 3px 22px;
  position: relative; white-space: nowrap; }
.p2-fn-arrow::before { content: "→"; display: block; text-align: center; font-size: 13px; color: var(--text-faint); }

.p2-line { display: grid; grid-template-columns: 1fr; gap: 5px; padding: 9px 0; border-bottom: 1px solid var(--border-soft); }
.p2-line:last-child { border-bottom: 0; }
.p2-lh { display: flex; justify-content: space-between; align-items: baseline; }
.p2-lh b { font-size: 13.5px; color: var(--text); font-weight: 650; }
.p2-lh span { font-size: 11px; color: var(--text-faint); }
.p2-lbar { position: relative; height: 8px; border-radius: 5px; background: var(--surface-3); overflow: visible; }
.p2-lbar span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; transition: width .6s cubic-bezier(.2,.7,.3,1); }
.p2-lbar em { position: absolute; top: -3px; width: 2px; height: 14px; background: var(--text-faint); opacity: .5; transform: translateX(-1px); }
.p2-lbar em { font-size: 0; }
.p2-lbar.over span { box-shadow: 0 0 8px currentColor; }
.p2-lv { font-size: 12.5px; color: var(--text-dim); }
.p2-lv b { font-weight: 800; } .p2-lv span { font-size: 11px; color: var(--text-faint); }
.p2-lv em { color: var(--text-faint); font-style: italic; }

.p2-streams { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.p2-stream { display: flex; align-items: center; gap: 10px; font-size: 12.5px; padding: 8px 12px;
  background: var(--surface-2); border-radius: var(--radius-sm); }
.p2-stream span { flex: 1; color: var(--text); } .p2-stream b { color: var(--text); font-weight: 700; } .p2-stream i { color: var(--text-faint); font-style: normal; min-width: 42px; text-align: right; }

.p2-trend-big { padding: 4px 0 2px; } .p2-trend-caption { font-size: 11px; color: var(--text-faint); margin-top: 4px; }

/* ---------------------------------------------------------------- rating */
.p2-rate-list { display: flex; flex-direction: column; gap: 4px; }
.p2-rate-row { display: grid; grid-template-columns: 34px minmax(140px, 1.3fr) 1fr 62px 34px 30px; align-items: center;
  gap: 12px; padding: 10px 8px; border-radius: var(--radius-sm); transition: background .15s; }
.p2-rate-row:hover { background: var(--surface-2); }
.p2-rate-id { min-width: 0; } .p2-rate-name { font-weight: 650; color: var(--text); font-size: 14px; }
.p2-rate-sub { font-size: 11.5px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p2-slider { position: relative; height: 30px; border-radius: 9px; background: var(--surface-3); cursor: pointer; touch-action: none; }
.p2-slider:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.p2-slider-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 9px;
  background: linear-gradient(90deg, var(--brand), var(--green)); transition: width .1s linear; }
.p2-slider.bonus .p2-slider-fill { background: linear-gradient(90deg, var(--green), #f5c518); }
/* the "20 = a full standard week" line the fill has to cross to enter bonus territory */
.p2-slider-mark { position: absolute; top: -3px; bottom: -3px; width: 2px; transform: translateX(-50%);
  background: repeating-linear-gradient(var(--text-faint) 0 3px, transparent 3px 6px); opacity: .65; pointer-events: none; }
.p2-slider-thumb { position: absolute; top: 50%; left: 0; width: 16px; height: 16px; border-radius: 50%;
  transform: translate(-50%, -50%); background: #fff; border: 2px solid var(--brand);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .3); pointer-events: none; transition: left .1s linear; }
.p2-slider.bonus .p2-slider-thumb { border-color: #f5c518; }
.p2-rate-val { font-size: 20px; font-weight: 800; color: var(--text-faint); text-align: right; }
.p2-rate-val.set { color: var(--text); } .p2-rate-val.bonus { color: #d9a400; }
.p2-rate-val i { font-size: 11px; font-weight: 600; color: var(--text-faint); font-style: normal; }
.p2-note-btn, .p2-clear { width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-faint); display: grid; place-items: center; cursor: pointer; transition: .15s; }
.p2-note-btn:hover, .p2-clear:hover { color: var(--text); border-color: var(--brand); }
.p2-note-btn.has { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }
.p2-rate-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border-soft); }
.p2-rate-count { font-size: 12.5px; color: var(--text-dim); }
.p2-rate-actions { display: flex; gap: 8px; }

/* ---------------------------------------------------------------- classify */
.p2-acts { display: flex; gap: 6px; }
.p2-acts .btn.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.tag-violet { background: var(--violet-soft); color: var(--violet); }

@media (max-width: 720px) {
  .p2-hero, .p2-callouts { grid-template-columns: repeat(2, 1fr); }
  .p2-podium { grid-template-columns: 1fr; }
  .p2-podium-card.gold { transform: none; }
}

/* ---------------------------------------------------------------- champion + race + on-leave */
.p2-champ-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; padding: 12px 16px;
  border-radius: var(--radius); border: 1px solid color-mix(in srgb, #f5c518 42%, var(--border));
  background: linear-gradient(90deg, color-mix(in srgb, #f5c518 15%, var(--surface)), var(--surface) 60%); font-size: 14px; color: var(--text); }
.p2-champ-line svg { color: #e0a800; flex: none; }
.p2-champ-line b { font-weight: 800; } .p2-champ-line span { font-weight: 500; }
.p2-champ-line i { font-style: normal; color: var(--text-dim); font-size: 12.5px; margin-left: auto; }

.p2-race-card .card-head h3 { display: flex; align-items: center; gap: 8px; }
.p2-race { display: flex; flex-direction: column; gap: 9px; padding: 8px 2px 4px; }
.p2-lane { display: grid; grid-template-columns: 26px minmax(72px, 108px) 1fr 62px; align-items: center; gap: 12px; cursor: default; }
.p2-lane-rank { font-size: 14px; font-weight: 800; color: var(--text-dim); text-align: center; }
.p2-lane.champ .p2-lane-rank { color: #f5c518; }
.p2-lane-id { font-size: 13px; font-weight: 650; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p2-lane-track { position: relative; height: 34px; border-radius: 17px; background: var(--surface-2); border: 1px solid var(--border-soft); }
.p2-lane-track::after { content: "🏁"; position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-size: 15px; opacity: .5; }
.p2-lane.champ .p2-lane-track { border-color: color-mix(in srgb, #f5c518 55%, var(--border)); }
.p2-lane-trail { position: absolute; left: 0; top: 0; bottom: 0; width: var(--pos); border-radius: 17px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--col) 10%, transparent), color-mix(in srgb, var(--col) 42%, transparent));
  animation: p2trail 1.1s cubic-bezier(.2, .7, .3, 1) both; animation-delay: calc(var(--i) * 70ms); }
@keyframes p2trail { from { width: 0; } }
.p2-lane-runner { position: absolute; top: 50%; left: var(--pos); width: 30px; height: 30px; margin: -15px 0 0 -15px;
  animation: p2runin 1.1s cubic-bezier(.2, .7, .3, 1) both, p2bob 1.5s ease-in-out infinite;
  animation-delay: calc(var(--i) * 70ms), calc(1.1s + var(--i) * 70ms); }
.p2-lane-runner .avatar { width: 30px; height: 30px; font-size: 11px; box-shadow: 0 3px 9px -2px rgba(0, 0, 0, .38); }
@keyframes p2runin { from { left: 0; opacity: .25; } }
@keyframes p2bob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-4px) rotate(4deg); } }
.p2-run-crown { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); font-size: 15px; z-index: 2; }
.p2-lane-score { font-size: 15px; font-weight: 800; text-align: right; }
.p2-lane-score span { font-size: 10px; opacity: .7; }

.p2-paused { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; padding: 10px 14px;
  background: var(--surface-2); border: 1px dashed var(--border); border-radius: var(--radius-sm); }
.p2-paused-h { font-size: 11.5px; font-weight: 650; color: var(--text-dim); text-transform: uppercase; letter-spacing: .03em; display: inline-flex; align-items: center; gap: 6px; }
.p2-paused-h svg { color: var(--text-faint); }
.p2-paused-item { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px 4px 4px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--border-soft); font-size: 12.5px; color: var(--text-dim); opacity: .78; transition: .15s; }
.p2-paused-item[data-uid] { cursor: pointer; }
.p2-paused-item[data-uid]:hover { opacity: 1; border-color: var(--brand); color: var(--text); }
.p2-paused-item .avatar { width: 22px; height: 22px; font-size: 9px; filter: grayscale(.4); }
.p2-paused-item i { font-style: normal; font-weight: 700; color: var(--text-faint); }
.p2-paused-hint { font-size: 11px; color: var(--text-faint); margin-left: auto; }

@media (prefers-reduced-motion: reduce) {
  .p2-lane-runner { animation: p2runin 1.1s both; }
}

/* ---------------------------------------------------------------- rating: pending weeks */
.p2-week-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.p2-week { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 6px 11px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-dim); cursor: pointer; transition: .15s; line-height: 1.2; }
.p2-week b { font-size: 12.5px; font-weight: 700; }
.p2-week i { font-size: 10px; font-style: normal; color: var(--text-faint); }
.p2-week:hover { border-color: var(--brand); color: var(--text); }
.p2-week.done { border-color: color-mix(in srgb, var(--green) 32%, var(--border)); }
.p2-week.done b { color: var(--green); }
.p2-week.pending b { color: var(--amber); }
.p2-week.on { border-color: var(--brand); background: var(--brand-soft); color: var(--text); box-shadow: 0 0 0 1px var(--brand) inset; }
.p2-pending-note { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text); margin-bottom: 14px;
  padding: 9px 13px; background: var(--amber-soft); border: 1px solid var(--amber); border-radius: var(--radius-sm); }
.p2-pending-note svg { color: var(--amber); flex: none; }
