/* SvS Battle Pass tab (svs-pass.js), in the site theme. Item looks are prefixed
   bp-ne- (name effect), bp-ea- (entry), bp-cf- (card frame); they become the
   overlay renderers when the pass goes live. */
.svsr-views { margin: 0 0 1rem; }

/* Header */
.bp-head {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1rem; align-items: end;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.1rem 1.3rem; margin-bottom: 1rem; position: relative; overflow: hidden;
}
.bp-head::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--accent), var(--purple), transparent); }
.bp-season { font-size: 1.35rem; font-weight: 800; margin: .15rem 0 .3rem; }
.bp-rules { font-size: .88rem; color: #b5b5b5; }
.bp-rules b { color: var(--accent); }
.bp-note { margin-top: .4rem; max-width: 64ch; line-height: 1.5; }
.bp-head-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.bp-head-stats .svsr-stat { background: var(--surface2); }

/* Main split: progress + top | preview */
.bp-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 1rem; margin-bottom: 1.6rem; align-items: start; }
.bp-left { display: grid; gap: 1rem; }
.bp-lookup { display: flex; gap: .5rem; margin-bottom: .8rem; }
.bp-lookup input { flex: 1; min-width: 0; }
.bp-me-head { display: flex; gap: .8rem; align-items: center; }
.bp-level {
  flex: none; width: 3.4rem; height: 3.4rem; border-radius: 50%; display: grid; place-content: center; text-align: center;
  font-size: 1.35rem; font-weight: 800; color: #111; line-height: 1;
  background: radial-gradient(circle at 35% 30%, #ffe58a, var(--accent) 60%, var(--accent-d));
  box-shadow: 0 0 0 3px var(--surface2), 0 0 0 4px var(--accent);
}
.bp-level small { display: block; font-size: .5rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.bp-me-main { flex: 1; min-width: 0; display: grid; gap: .3rem; }
.bp-me-main b { font-size: 1rem; }
.bp-me-main small { font-size: .74rem; color: var(--svsr-soft); }
.bp-bar { height: 8px; border-radius: 99px; background: var(--surface2); overflow: hidden; border: 1px solid var(--border2); }
.bp-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #ffe58a); border-radius: 99px; transition: width .6s ease; }
.bp-today { display: grid; grid-template-columns: auto 1fr auto; gap: .2rem .6rem; align-items: center; margin-top: .75rem; font-size: .76rem; color: var(--svsr-soft); }
.bp-today b { color: var(--text); font-variant-numeric: tabular-nums; }
.bp-today small { grid-column: 1 / -1; color: var(--accent); }
.bp-bar--today { height: 6px; }
.bp-bar--today span { background: var(--purple); }
.bp-today.is-full .bp-bar--today span { background: var(--green); }
.bp-me-stats { display: flex; flex-wrap: wrap; gap: .3rem .9rem; margin: .8rem 0 .2rem; font-size: .82rem; color: var(--svsr-soft); }
.bp-me-stats b { color: var(--text); }
.bp-me-dyn { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .6rem; }
.bp-me-dyn span { font-size: .76rem; padding: .2rem .55rem; border-radius: 99px; background: var(--surface2); border: 1px solid var(--border2); }
.bp-top { list-style: none; margin: 0; padding: 0; }
.bp-top li { display: grid; grid-template-columns: 1.6rem 1fr auto auto; gap: .6rem; align-items: center; padding: .35rem 0; border-top: 1px solid var(--border); font-size: .85rem; }
.bp-top-pos { color: var(--svsr-soft); font-weight: 700; text-align: right; }
.bp-top-name { background: none; border: 0; padding: 0; text-align: left; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bp-top-name:hover { color: var(--accent); }
.bp-top-lvl { font-weight: 800; color: var(--accent); }
.bp-top-xp { color: var(--svsr-soft); font-size: .76rem; }

/* Preview stage */
.bp-preview-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .2rem; }
.bp-preview-head .svsr-h3 { margin: 0; }
.bp-stage {
  position: relative; height: 270px; border-radius: var(--radius); overflow: hidden; margin: .6rem 0 .8rem;
  background: radial-gradient(ellipse at 50% 60%, #1e1e1e, #0b0b0b 70%), repeating-linear-gradient(45deg, #111 0 12px, #0e0e0e 12px 24px);
  border: 1px solid var(--border2);
  display: grid; place-items: center;
}
.bp-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.bp-card {
  position: relative; z-index: 1; min-width: 230px; max-width: 86%; text-align: center;
  background: rgba(10, 10, 10, .82); border: 2px solid var(--border2); border-radius: 14px;
  padding: 1.2rem 1.8rem 1rem; backdrop-filter: blur(2px);
}
.bp-winner { display: block; font-size: .66rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: .2rem; }
.bp-name { position: relative; display: inline-block; font-size: 2rem; font-weight: 900; color: #fff; line-height: 1.15; overflow-wrap: anywhere; }
.bp-title { font-size: .82rem; font-weight: 700; color: #cfcfcf; margin-top: .2rem; min-height: 1.1em; letter-spacing: .02em; }
.bp-badge {
  position: absolute; top: -.75rem; right: -.6rem; font-size: .7rem; font-weight: 800; color: #fff;
  background: linear-gradient(90deg, #b8282d, #e05555); border: 1px solid #ff9c9c; border-radius: 99px; padding: .2rem .6rem;
  box-shadow: 0 0 12px rgba(224, 85, 85, .5); transform: rotate(4deg); white-space: nowrap;
}
.bp-detail-top { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; font-size: .75rem; color: var(--svsr-soft); }
.bp-detail h4 { font-size: 1.05rem; font-weight: 800; margin: .35rem 0 .2rem; }
.bp-detail p { font-size: .85rem; color: #b5b5b5; line-height: 1.5; }
.bp-detail-kind { font-weight: 700; color: var(--text); }
.bp-rarity { font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; padding: .12rem .5rem; border-radius: 99px; border: 1px solid currentColor; }
.bp-rarity--common { color: #94a3b8; } .bp-rarity--uncommon { color: #4ade80; } .bp-rarity--rare { color: #60a5fa; }
.bp-rarity--epic { color: #c084fc; } .bp-rarity--legendary { color: #fbbf24; }
.bp-ctl { display: flex; align-items: center; gap: .6rem; margin-top: .7rem; font-size: .82rem; color: var(--svsr-soft); }
.bp-ctl input { flex: 1; accent-color: var(--accent); }
.bp-ctl b { color: var(--text); min-width: 1.5rem; }

/* Track grid */
.bp-track { overflow-x: auto; padding-bottom: .4rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.bp-grid { display: grid; grid-template-columns: 5.2rem repeat(var(--levels), 6.4rem); min-width: max-content; }
.bp-corner, .bp-col-head, .bp-row-label { position: sticky; background: var(--surface); z-index: 2; }
.bp-corner { left: 0; top: 0; z-index: 3; font-size: .68rem; font-weight: 700; text-transform: uppercase; color: var(--svsr-soft); padding: .6rem .7rem; border-bottom: 1px solid var(--border); }
.bp-col-head { top: 0; text-align: center; font-size: .78rem; font-weight: 800; color: var(--svsr-soft); padding: .6rem 0; border-bottom: 1px solid var(--border); }
.bp-col-head.is-reached { color: var(--accent); }
.bp-col-head.is-current { background: var(--accent); color: #111; border-radius: 6px 6px 0 0; }
.bp-row-label { left: 0; display: flex; flex-direction: column; justify-content: center; padding: .5rem .7rem; font-size: .8rem; font-weight: 800; border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); }
.bp-row-label small { font-size: .62rem; font-weight: 700; color: var(--svsr-soft); text-transform: uppercase; }
.bp-row-label--free { color: var(--text); }
.bp-row-label--t1 { color: var(--blue); }
.bp-row-label--t2 { color: #c084fc; }
.bp-row-label--t3 { color: var(--accent); }
.bp-cell { min-height: 5.6rem; padding: .35rem; border-bottom: 1px solid var(--border); border-right: 1px solid rgba(36, 36, 36, .6); display: grid; gap: .3rem; align-content: start; }
.bp-cell.is-reached { background: rgba(245, 166, 35, .05); }
.bp-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem; width: 100%; min-height: 4.8rem;
  padding: .35rem .25rem; cursor: pointer; font: inherit; color: var(--text); text-align: center;
  background: var(--surface2); border: 1px solid var(--border2); border-bottom: 3px solid var(--rarity, var(--border2)); border-radius: 8px;
  transition: transform .12s, border-color .12s, box-shadow .12s;
}
.bp-tile:hover, .bp-tile:focus-visible { transform: translateY(-2px); border-color: var(--rarity); box-shadow: 0 4px 14px rgba(0, 0, 0, .4); }
.bp-tile.is-selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-glow), 0 0 14px rgba(245, 166, 35, .3); }
.bp-tile-icon { font-size: 1.3rem; line-height: 1; font-weight: 800; color: var(--rarity); }
.bp-tile-label { font-size: .66rem; font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
.bp-tile--common { --rarity: #94a3b8; } .bp-tile--uncommon { --rarity: #4ade80; } .bp-tile--rare { --rarity: #60a5fa; }
.bp-tile--epic { --rarity: #c084fc; } .bp-tile--legendary { --rarity: #fbbf24; }
.bp-tile--legendary { background: linear-gradient(180deg, rgba(251, 191, 36, .1), var(--surface2)); }
.bp-cell:not(.is-reached) .bp-tile { opacity: .72; }
.bp-legend { margin-top: .5rem; }

/* ── Name effects ── */
.bp-ne-svs_spark { text-shadow: 0 0 6px rgba(255, 229, 138, .8), 0 0 16px rgba(245, 166, 35, .5); animation: bp-spark-flicker 2.4s infinite; }
.bp-ne-svs_spark::before, .bp-ne-svs_spark::after {
  content: ""; position: absolute; top: 50%; width: 5px; height: 5px; border-radius: 50%; background: #ffe58a;
  box-shadow: 0 0 8px 2px #f5a623; animation: bp-spark-fly 1.6s infinite ease-out;
}
.bp-ne-svs_spark::before { left: -6px; }
.bp-ne-svs_spark::after { right: -6px; animation-delay: .8s; animation-name: bp-spark-fly-r; }
@keyframes bp-spark-flicker { 0%, 100% { filter: brightness(1); } 45% { filter: brightness(1.35); } 50% { filter: brightness(.9); } 55% { filter: brightness(1.3); } }
@keyframes bp-spark-fly { 0% { transform: translate(0, 0) scale(1); opacity: 1; } 100% { transform: translate(-26px, -22px) scale(.2); opacity: 0; } }
@keyframes bp-spark-fly-r { 0% { transform: translate(0, 0) scale(1); opacity: 1; } 100% { transform: translate(26px, -18px) scale(.2); opacity: 0; } }

.bp-ne-svs_duelist {
  color: transparent !important; -webkit-background-clip: text; background-clip: text;
  background-image: linear-gradient(90deg, #ff9f1c 0 calc(var(--split, 50%) - 2px), #fff calc(var(--split, 50%) - 2px) calc(var(--split, 50%) + 2px), #a98bff calc(var(--split, 50%) + 2px) 100%);
  animation: bp-duel 2.2s ease-in-out infinite;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, .15));
}
.bp-ne-svs_duelist::after {
  content: ""; position: absolute; top: -10%; bottom: -10%; left: var(--split, 50%); width: 2px; margin-left: -1px;
  background: #fff; box-shadow: 0 0 10px 3px rgba(255, 255, 255, .7); animation: bp-duel-line 2.2s ease-in-out infinite;
}
@property --split { syntax: "<percentage>"; inherits: true; initial-value: 50%; }
@keyframes bp-duel { 0%, 100% { --split: 42%; } 50% { --split: 58%; } }
@keyframes bp-duel-line { 0%, 100% { left: 42%; opacity: .7; } 25%, 75% { opacity: 1; } 50% { left: 58%; opacity: .7; } }

.bp-ne-svs_crystal {
  color: transparent !important; -webkit-background-clip: text; background-clip: text;
  background-image: linear-gradient(110deg, #7b3fd0 0%, #c86bff 30%, #ffffff 45%, #f1d6ff 50%, #c86bff 65%, #7b3fd0 100%);
  background-size: 250% 100%; animation: bp-crystal 3s linear infinite;
  filter: drop-shadow(0 0 10px rgba(200, 107, 255, .65));
}
@keyframes bp-crystal { from { background-position: 120% 0; } to { background-position: -120% 0; } }

/* ── Entry animations (replayed when picked) ── */
.bp-ea-svs_tug { animation: bp-tug 1.4s cubic-bezier(.3, 1.4, .5, 1) both; }
.bp-ea-svs_tug::before {
  content: ""; position: absolute; top: 55%; right: 100%; height: 3px; width: 140vw;
  background: repeating-linear-gradient(90deg, #c4831a 0 6px, #8c5a12 6px 12px); transform-origin: right;
  animation: bp-rope 1.4s ease-out both;
}
@keyframes bp-tug { 0% { transform: translateX(-120%) rotate(-6deg); opacity: 0; } 55% { transform: translateX(6%) rotate(2deg); opacity: 1; } 75% { transform: translateX(-3%) rotate(-1deg); } 100% { transform: none; } }
@keyframes bp-rope { 0%, 60% { opacity: 1; transform: scaleX(1); } 100% { opacity: 0; transform: scaleX(0); } }

.bp-ea-svs_headon { animation: bp-headon .9s cubic-bezier(.2, .9, .3, 1.2) both; }
.bp-ea-svs_headon::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%;
  border: 3px solid #ffe58a; animation: bp-shock .9s ease-out .35s both; pointer-events: none;
}
@keyframes bp-headon { 0% { transform: scale(3) translateX(30%); filter: blur(6px); opacity: 0; } 40% { transform: scale(.92); filter: blur(0); opacity: 1; } 55% { transform: scale(1.06) translateX(-2%); } 100% { transform: none; } }
@keyframes bp-shock { 0% { transform: scale(.2); opacity: 1; } 100% { transform: scale(7); opacity: 0; } }

/* ── Card frames ── */
.bp-notches { display: none; }
.bp-cf-svs_tally { border-color: #6b5434; }
.bp-cf-svs_tally .bp-notches { display: flex; justify-content: center; gap: 5px; position: absolute; top: -9px; left: 0; right: 0; }
.bp-cf-svs_tally .bp-notches i { width: 6px; height: 16px; border-radius: 2px; background: #2a2a2a; border: 1px solid #4a4a4a; transform: skewX(-12deg); }
.bp-cf-svs_tally .bp-notches i.on { background: linear-gradient(180deg, #ffe58a, var(--accent)); border-color: #ffe58a; box-shadow: 0 0 6px rgba(245, 166, 35, .6); }

.bp-cf-svs_crossed { border-color: #8a8a8a; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.bp-swords { position: absolute; left: 50%; top: -26px; width: 92px; transform: translateX(-50%); filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .8)); }

.bp-cf-svs_rival { border-color: transparent; background:
  linear-gradient(rgba(10, 10, 10, .9), rgba(10, 10, 10, .9)) padding-box,
  linear-gradient(90deg, #ff9f1c 0 50%, #3a3a3a 50% 100%) border-box;
  box-shadow: -10px 0 24px -8px rgba(245, 166, 35, .55); }

.bp-cf-svs_lattice {
  border: 0; padding: calc(1.2rem + 3px) calc(1.8rem + 3px) calc(1rem + 3px);
  clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 12px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 0 calc(100% - 12px), 0 12px);
  background:
    linear-gradient(rgba(16, 8, 26, .92), rgba(16, 8, 26, .92)) padding-box,
    conic-gradient(from var(--lattice, 0deg), #7b3fd0, #f1d6ff, #c86bff, #7b3fd0, #ffffff, #c86bff, #7b3fd0) border-box;
  border: 3px solid transparent; animation: bp-lattice 5s linear infinite;
}
@property --lattice { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes bp-lattice { to { --lattice: 360deg; } }

@media (prefers-reduced-motion: reduce) {
  .bp-ne-svs_spark, .bp-ne-svs_spark::before, .bp-ne-svs_spark::after, .bp-ne-svs_duelist, .bp-ne-svs_duelist::after,
  .bp-ne-svs_crystal, .bp-ea-svs_tug, .bp-ea-svs_tug::before, .bp-ea-svs_headon, .bp-ea-svs_headon::after, .bp-cf-svs_lattice { animation: none; }
}

@media (max-width: 900px) {
  .bp-head, .bp-main { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .bp-head-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bp-head-stats .svsr-stat b { font-size: 1.1rem; }
  .bp-stage { height: 230px; }
  .bp-name { font-size: 1.5rem; }
  .bp-card { min-width: 0; padding: 1rem 1.1rem .9rem; }
  .bp-grid { grid-template-columns: 4.2rem repeat(var(--levels), 5.6rem); }
}

/* Claiming (svs-pass.js claimBlock): your own pass, signed in. */
.bp-claim { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .7rem; margin-top: .75rem; padding-top: .7rem; border-top: 1px dashed var(--border2); }
.bp-claim small { color: var(--svsr-soft, #8f8f8f); font-size: .78rem; }
.bp-claim-msg { flex-basis: 100%; margin: 0; font-size: .8rem; color: var(--green); }
.bp-claim-msg:empty { display: none; }
.bp-claim-done { margin: .75rem 0 0; font-size: .82rem; color: var(--green); }
.bp-tile.is-claimed { opacity: .55; }
.bp-tile.is-claimed::after { content: "✓"; position: absolute; top: 2px; right: 4px; font-size: .7rem; color: var(--green); }
.bp-tile.is-locked::after { content: "🔒"; position: absolute; top: 2px; right: 3px; font-size: .62rem; }
.bp-tile.is-claimable { box-shadow: 0 0 0 2px var(--green); }
.bp-tile { position: relative; }
