.bf-container.sp-main { max-width: none; padding: 0; }
.bf-page:has(.sp-main) .bf-footer { margin-top: 0; }

.sp {
  --sp-void: #03050b;
  --sp-bg: #060912;
  --sp-panel: #0d1322;
  --sp-panel-2: #131a2c;
  --sp-panel-3: #1a2338;
  --sp-line: rgba(150, 170, 215, 0.14);
  --sp-line-2: rgba(150, 170, 215, 0.28);
  --sp-text: #eef2fa;
  --sp-text-2: #b9c2d6;
  --sp-muted: #8f9ab1;
  --sp-live: #4fe39a;
  --sp-attack: #ff7a85;
  --sp-gold: #ffc65e;
  --sp-focus: #ff9b70;
  --sp-gutter: clamp(16px, 4vw, 56px);
  --sp-max: 1840px;

  --bg: var(--sp-bg);
  --surface: var(--sp-panel);
  --surface-2: var(--sp-panel-2);
  --surface-3: var(--sp-panel-3);
  --border: var(--sp-line);
  --border-strong: var(--sp-line-2);
  --text: var(--sp-text);
  --text-2: var(--sp-text-2);
  --muted: var(--sp-muted);
  --link: #93b4ff;
  --accent-text: #1a0a03;
  --accent-soft: #2b1a12;
  --warn-bg: #33270b;
  --warn-text: #ffd98a;
  --ok-bg: #0f2a1f;
  --ok-text: #8fe0b8;
  --err-bg: #2a1119;
  --err-text: #ffb0b3;
  --info-bg: #17213b;
  --info-text: #a9c1ff;
  --shadow-sm: none;
  --shadow: none;

  color-scheme: dark;
  position: relative;
  isolation: isolate;
  min-height: calc(100vh - var(--nav-h));
  padding-bottom: clamp(48px, 7vw, 112px);
  background: linear-gradient(180deg, var(--sp-void) 0, var(--sp-bg) 520px);
  color: var(--sp-text);
}
.sp::before, .sp::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
}
.sp::before {
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(255, 255, 255, 0.55), transparent 60%),
    radial-gradient(1px 1px at 68% 7%, rgba(204, 216, 255, 0.45), transparent 60%),
    radial-gradient(1.2px 1.2px at 38% 62%, rgba(255, 244, 222, 0.5), transparent 60%),
    radial-gradient(1px 1px at 88% 44%, rgba(255, 255, 255, 0.35), transparent 60%),
    radial-gradient(1px 1px at 24% 86%, rgba(204, 216, 255, 0.4), transparent 60%),
    radial-gradient(1px 1px at 55% 33%, rgba(255, 255, 255, 0.3), transparent 60%),
    radial-gradient(1.4px 1.4px at 79% 78%, rgba(255, 226, 186, 0.45), transparent 60%);
  background-size: 420px 380px;
}
.sp::after {
  background-image:
    radial-gradient(1px 1px at 8% 64%, rgba(255, 255, 255, 0.3), transparent 60%),
    radial-gradient(1px 1px at 47% 12%, rgba(255, 255, 255, 0.4), transparent 60%),
    radial-gradient(1px 1px at 73% 52%, rgba(168, 190, 255, 0.4), transparent 60%),
    radial-gradient(1px 1px at 31% 39%, rgba(255, 246, 228, 0.3), transparent 60%),
    radial-gradient(1.2px 1.2px at 93% 91%, rgba(255, 255, 255, 0.45), transparent 60%);
  background-size: 613px 547px;
}

.sp :focus-visible { outline: 3px solid var(--sp-focus); outline-offset: 2px; }
.sp ::selection { background: rgba(255, 155, 112, 0.35); }
.sp a { color: var(--link); }
.sp .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.sp-wrap {
  width: 100%; max-width: var(--sp-max); margin-inline: auto;
  padding-left: max(var(--sp-gutter), env(safe-area-inset-left));
  padding-right: max(var(--sp-gutter), env(safe-area-inset-right));
}

.sp .btn, .sp .sm-btn { font-family: var(--font); font-size: 14px; font-weight: 700; }
.sp .btn-sm { font-size: 13px; }
.sp .sm-chip { font-family: var(--font); font-size: 13px; font-weight: 600; }
.sp .sp-lens { font-family: var(--font); font-size: 14px; font-weight: 600; }
.sp .btn.sp-btn { background: rgba(255, 255, 255, 0.04); border-color: var(--sp-line-2); color: var(--sp-text) !important; }
.sp .btn.sp-btn:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(190, 205, 240, 0.5); }
.sp .btn-primary { box-shadow: none; }
.sp .loading { color: var(--sp-text-2); }
.sp .pager { margin-top: 28px; }

.sp-head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 24px 56px;
  padding-top: clamp(32px, 5.5vw, 88px); padding-bottom: clamp(24px, 3vw, 40px);
}
.bf .sp-title {
  margin: 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(46px, 6.6vw, 104px);
  line-height: 0.9; letter-spacing: -0.035em; color: #fff;
}
.sp-lede { margin: 16px 0 0 !important; max-width: 60ch; font-size: clamp(15px, 1.1vw, 18px); line-height: 1.55; color: var(--sp-text-2); }
.sp-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.sp-actions .btn { min-height: 44px; }

.sp-readout {
  display: grid; grid-template-columns: repeat(4, minmax(0, auto)); margin: 0;
  border: 1px solid var(--sp-line); border-radius: 16px; background: rgba(13, 19, 34, 0.7);
}
.sp-readout-wrap { min-width: 0; }
.sp-readout-note { margin: 8px 2px 0 !important; font-size: 13px; color: var(--sp-muted); }
.sp-readout-note[hidden] { display: none; }
.sp-fig { min-width: 120px; padding: 16px 22px 18px; border-left: 1px solid var(--sp-line); }
.sp-fig:first-child { border-left: 0; }
.sp-fig dt { font-size: 13px; font-weight: 600; color: var(--sp-muted); white-space: nowrap; }
.sp-fig dd {
  display: flex; align-items: center; gap: 10px; margin: 6px 0 0;
  font-family: var(--font-display); font-size: clamp(28px, 2.3vw, 40px); font-weight: 700; line-height: 1;
  color: #fff; font-variant-numeric: tabular-nums;
}
.sp-fig.live dd { color: var(--sp-live); }
.sp-fig.live dd::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.sp-fig.gold dd { color: var(--sp-gold); }
.sp-fig.attack dd { color: var(--sp-attack); }

.sm { position: relative; border-block: 1px solid var(--sp-line); background: var(--sp-void); }
.sm-stage {
  position: relative; height: clamp(380px, 72vh, 900px); overflow: hidden; overflow: clip;
  cursor: grab; outline: none; touch-action: none; user-select: none; -webkit-user-select: none;
}
@supports (height: 1svh) { .sm-stage { height: clamp(380px, 72svh, 900px); } }
.sm-stage:focus-visible { outline: 3px solid var(--sp-focus); outline-offset: -3px; }
.sm-stage.dragging { cursor: grabbing; }
.sm-canvas { position: absolute; inset: 0; display: block; }
.sm-layer { position: absolute; inset: 0; }
.sm-world { position: absolute; left: 0; top: 0; }
.sm-planet {
  position: absolute; left: 0; top: 0; width: 100px; height: 100px; border-radius: 50%; transform-origin: 50px 50px;
  display: block; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.sm-planet:focus-visible { outline: 6px solid var(--sp-focus); outline-offset: 8px; }
.sm-label {
  position: absolute; left: 0; top: 0; display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 3px 9px 4px; border-radius: 8px; background: rgba(3, 5, 11, 0.84); white-space: nowrap; pointer-events: none;
  transition: opacity 0.2s; will-change: transform;
}
.sm-label.off { opacity: 0; visibility: hidden; transition: opacity 0.2s, visibility 0s 0.2s; }
.sm-label b { color: #fff; font-size: 12px; font-weight: 700; }
.sm-label .uv-live { font-size: 12px; }
.sm-held { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: color-mix(in srgb, var(--hc, #fff) 55%, #fff); }
.sm-fight { font-size: 12px; font-weight: 700; color: var(--sp-attack); }
.sm-layer .uv-menu { left: 0; top: 0; will-change: transform; }

.sm .uv-mi { background: var(--sp-panel); border-color: rgba(150, 170, 215, 0.34); color: var(--sp-text); }
.sm .uv-mi:hover, .sm .uv-mi:focus-visible { background: var(--sp-panel-3); border-color: var(--sp-focus); }
.sm .uv-mi.play { background: var(--accent); border-color: var(--accent); color: #1a0a03; }
.sm .uv-mi.close { background: var(--sp-bg); }
.sm .uv-mi::after { background: var(--sp-void); color: var(--sp-text); }
.sm .uv-menu-name { background: var(--sp-void); }
.sm .gx-fight { animation: none; padding: 0; background: none; color: var(--sp-attack); font-size: 12px; letter-spacing: 0; text-transform: none; }

.sm-ui { position: absolute; z-index: 4; display: flex; align-items: center; gap: 8px; pointer-events: none; }
.sm-ui > * { pointer-events: auto; }
.sm-top { top: 14px; left: max(14px, env(safe-area-inset-left)); right: max(14px, env(safe-area-inset-right)); }
.sm-side { right: max(14px, env(safe-area-inset-right)); bottom: 14px; }
.sm-bottom { left: max(14px, env(safe-area-inset-left)); right: calc(max(14px, env(safe-area-inset-right)) + 200px); bottom: 14px; }

.sm-find {
  display: flex; align-items: center; gap: 8px; flex: 0 1 360px; min-width: 0; height: 44px; padding: 0 14px;
  border-radius: 12px; border: 1px solid var(--sp-line-2); background: rgba(3, 5, 11, 0.86); color: var(--sp-muted); cursor: text;
}
.sm-find:focus-within { border-color: var(--sp-focus); }
.sm-search { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; color: var(--sp-text); font: inherit; font-size: 15px; }
.sm-search::placeholder { color: var(--sp-muted); }
.sm-search::-webkit-search-cancel-button { filter: invert(0.8); }

.sm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; min-width: 44px; padding: 0 14px;
  border-radius: 12px; border: 1px solid var(--sp-line-2); background: rgba(3, 5, 11, 0.86); color: var(--sp-text);
  font: inherit; font-size: 14px; font-weight: 700; white-space: nowrap; cursor: pointer;
}
.sm-btn:hover { border-color: rgba(190, 205, 240, 0.55); }
.sm-btn[aria-pressed="true"] { background: var(--sp-text); border-color: var(--sp-text); color: var(--sp-bg); }
.sm-live i { display: none; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--sp-live); }
.sm-live.has-live i { display: block; }
.sm-live-short { display: none; }
.sm-minus { display: block; width: 12px; height: 2px; border-radius: 1px; background: currentColor; }
.sm-move { display: none; }
.sm-zoom { display: inline-flex; border-radius: 12px; border: 1px solid var(--sp-line-2); background: rgba(3, 5, 11, 0.86); overflow: hidden; }
.sm-zoom .sm-btn { border: 0; border-radius: 0; background: transparent; }
.sm-zoom .sm-btn + .sm-btn { border-left: 1px solid var(--sp-line-2); }
.sm-zoom .sm-btn:hover { background: rgba(255, 255, 255, 0.08); }

.sm-chips {
  display: flex; gap: 6px; min-width: 0; overflow-x: auto; padding: 2px; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
}
.sm-chips::-webkit-scrollbar { display: none; }
.sm-chip {
  flex: none; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 13px;
  border-radius: 999px; border: 1px solid var(--sp-line-2); background: rgba(3, 5, 11, 0.86); color: var(--sp-text-2);
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.sm-chip:last-child { margin-right: 24px; }
.sm-chip i { flex: none; width: 9px; height: 9px; border-radius: 50%; }
.sm-chip span { color: var(--sp-muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.sm-chip:hover { color: #fff; border-color: rgba(190, 205, 240, 0.55); }
.sm-chip[aria-pressed="true"] { background: var(--sp-text); border-color: var(--sp-text); color: var(--sp-bg); }
.sm-chip[aria-pressed="true"] span { color: #4a5266; }

.sm-hint {
  position: absolute; z-index: 3; top: 70px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 28px); margin: 0 !important;
  padding: 6px 12px; border-radius: 999px; background: rgba(3, 5, 11, 0.8); color: var(--sp-text-2);
  font-size: 13px; text-align: center; pointer-events: none; transition: opacity 0.4s;
}
.sm-hint.done { opacity: 0; }
.sm-hint-touch { display: none; }
.sm-note {
  position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(3, 5, 11, 0.5); color: #fff; font-size: 16px; font-weight: 700; text-align: center;
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.sm-note.show { opacity: 1; }
.sm-state {
  position: absolute; z-index: 3; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(440px, calc(100% - 32px)); margin: 0 !important;
  padding: 16px 20px; border-radius: 14px; border: 1px solid var(--sp-line-2); background: rgba(3, 5, 11, 0.9);
  color: var(--sp-text-2); font-size: 15px; line-height: 1.5; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.sm-state[hidden], .sm-state .btn[hidden] { display: none; }
.sm-state .btn { min-height: 44px; }

.sp-key {
  list-style: none; display: flex; flex-wrap: wrap; gap: 10px 32px; margin-top: 0; margin-bottom: 0;
  padding-top: 18px; padding-bottom: 4px; font-size: 13px; line-height: 1.4; color: var(--sp-text-2);
}
.sp-key li { display: inline-flex; align-items: center; gap: 10px; }
.sp-key-mark { position: relative; flex: none; width: 22px; height: 22px; }
.k-held .sp-key-mark { border-radius: 50%; border: 2px solid var(--sp-gold); }
.k-held .sp-key-mark::after { content: ""; position: absolute; right: -1px; top: -7px; width: 7px; height: 6px; background: var(--sp-gold); clip-path: polygon(0 0, 100% 50%, 0 100%); }
.k-attack .sp-key-mark { border-radius: 50%; border: 2px dashed var(--sp-attack); }
.k-live .sp-key-mark { border-radius: 50%; border: 2px solid rgba(80, 230, 140, 0.8); }
.k-live .sp-key-mark::after { content: ""; position: absolute; right: -3px; top: 6px; width: 5px; height: 5px; border-radius: 50%; background: #a0ffc8; }
.k-route .sp-key-mark { width: 26px; height: 0; border-top: 2px dotted #a9bce8; }
.k-comet .sp-key-mark { width: 26px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, rgba(255, 214, 120, 0), #ffe7a8); }
.k-comet .sp-key-mark::after { content: ""; position: absolute; right: -3px; top: -2px; width: 7px; height: 7px; border-radius: 50%; background: #fff; }

.sp-section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 28px; margin-bottom: 20px; }
.bf .sp-section-head h2 { margin: 0; font-family: var(--font-display); font-size: clamp(28px, 2.6vw, 44px); font-weight: 800; letter-spacing: -0.02em; color: #fff; }
.sp-season { margin: 8px 0 0 !important; font-size: 15px; color: var(--sp-text-2); }
.sp-mine:empty { display: none; }
.sp-my {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 16px; border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--m, #8f9ab1) 55%, transparent); background: color-mix(in srgb, var(--m, #8f9ab1) 14%, transparent);
  color: var(--sp-text) !important; font-size: 14px; text-decoration: none !important;
}
.sp-my b { color: #fff; }
.sp-my:hover { background: color-mix(in srgb, var(--m, #8f9ab1) 24%, transparent); }
.sp-my.none { border-color: var(--sp-line-2); background: transparent; color: var(--sp-text-2) !important; }

.sp-war { padding-top: clamp(44px, 5.5vw, 88px); }
.sp-war-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.sp-block { min-width: 0; padding: 20px 22px 22px; border: 1px solid var(--sp-line); border-radius: 16px; background: rgba(13, 19, 34, 0.74); }
.bf .sp-block h3 { margin: 0; font-family: var(--font); font-size: 17px; font-weight: 700; letter-spacing: 0; color: #fff; }
.sp-block-note { margin: 4px 0 16px !important; font-size: 13px; line-height: 1.45; color: var(--sp-muted); }

.sp-note { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 4px 0; }
.sp-note p { margin: 0 !important; max-width: 62ch; font-size: 14px; line-height: 1.55; color: var(--sp-text-2); }
.sp-note-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sp-note-actions .btn { min-height: 40px; }
.sp-results > .sp-note { align-items: center; padding: 56px 16px; border: 1px dashed var(--sp-line-2); border-radius: 16px; text-align: center; }
.sp-results > .sp-note p { font-size: 15px; }

.sp-moon {
  display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; padding: 3px 10px 3px 8px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--m) 55%, transparent); background: color-mix(in srgb, var(--m) 20%, var(--sp-panel));
  color: #fff !important; font-size: 13px; font-weight: 700; text-decoration: none !important;
}
.sp-moon svg { flex: none; }
.sp-moon span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-moon:hover { background: color-mix(in srgb, var(--m) 34%, var(--sp-panel)); }
.sp-moon.attacker { border-color: var(--sp-attack); }

.sp-fronts { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.sp-front { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 14px; border-radius: 12px; border: 1px solid var(--sp-line); background: var(--sp-panel-2); }
.sp-front.fight { border-color: rgba(255, 122, 133, 0.55); }
.sp-front-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sp-front-orb {
  flex: none; width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--c) 40%, #fff), var(--c) 55%, color-mix(in srgb, var(--c) 40%, #000));
}
.sp-front-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff !important; font-size: 15px; font-weight: 700; }
.sp-front-top .uv-live { flex: none; font-size: 12px; font-weight: 600; }
.sp-front-state { margin: -2px 0 0 !important; font-size: 13px; font-weight: 700; color: var(--sp-attack); }
.sp-front-who { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-height: 26px; min-width: 0; }
.sp-free { font-size: 13px; color: var(--sp-muted); }
.sp-vs { font-size: 12px; font-weight: 700; color: var(--sp-attack); }
.sp-bar { display: flex; gap: 2px; height: 6px; border-radius: 999px; overflow: hidden; background: var(--sp-panel-3); }
.sp-bar i { display: block; height: 100%; }
.sp-front-go { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.sp-front-go .btn { flex: 1 1 auto; min-height: 40px; }

.sp-standings { list-style: none; margin: 0; padding: 0; }
.sp-standings li {
  display: grid; grid-template-columns: 26px minmax(0, 1fr) auto auto; align-items: center; gap: 10px;
  min-height: 46px; padding: 6px 0; border-top: 1px solid var(--sp-line);
}
.sp-standings li:first-child { border-top: 0; }
.sp-rank { font-family: var(--font-display); font-size: 16px; font-weight: 800; color: var(--sp-muted); text-align: center; font-variant-numeric: tabular-nums; }
.top1 .sp-rank { color: var(--sp-gold); }
.top2 .sp-rank { color: #d6deef; }
.top3 .sp-rank { color: #e8a87c; }
.sp-held { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 700; color: var(--sp-gold); font-variant-numeric: tabular-nums; }
.sp-hours { min-width: 44px; font-size: 13px; color: var(--sp-muted); text-align: right; font-variant-numeric: tabular-nums; }

.sp-feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.sp-feed li { display: flex; align-items: flex-start; gap: 12px; }
.sp-feed-ic { flex: none; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--m); }
.sp-feed .k-contest .sp-feed-ic, .sp-feed .k-heist .sp-feed-ic { background: #d9455a; }
.sp-feed .k-lost .sp-feed-ic { background: #4b5470; }
.sp-feed-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 14px; line-height: 1.45; color: var(--sp-text); }
.sp-feed-t a { color: var(--sp-text) !important; }
.sp-feed-t a:hover { color: #fff !important; }
.sp-feed-t time { font-size: 12px; color: var(--sp-muted); }

.sp-rules { margin-top: 16px; border: 1px solid var(--sp-line); border-radius: 16px; background: rgba(13, 19, 34, 0.5); }
.sp-rules[hidden] { display: none; }
.sp-rules summary {
  display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 22px; list-style: none; cursor: pointer;
  font-size: 15px; font-weight: 700; color: #fff; border-radius: 16px;
}
.sp-rules summary::-webkit-details-marker { display: none; }
.sp-rules summary::before {
  content: ""; flex: none; width: 7px; height: 7px; margin-top: -3px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform 0.15s;
}
.sp-rules[open] summary::before { margin-top: 3px; transform: rotate(-135deg); }
.sp-rules ol {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px 44px; margin: 0; padding: 0 22px 22px 44px;
  font-size: 14px; line-height: 1.55; color: var(--sp-text-2);
}
.sp-rules li { padding-left: 4px; }
.sp-rules li::marker { color: var(--sp-text-2); font-family: var(--font-display); font-weight: 700; }
.sp-rules strong { color: #fff; }

.sp-list { padding-top: clamp(48px, 6vw, 96px); scroll-margin-top: calc(var(--nav-h) + 8px); }
.sp-lenses { position: relative; display: flex; flex-wrap: wrap; gap: 6px; }
.sp-lens {
  flex: none; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--sp-line-2); background: transparent;
  color: var(--sp-text-2); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.sp-lens:hover { color: #fff; border-color: rgba(190, 205, 240, 0.55); }
.sp-lens[aria-selected="true"] { background: var(--sp-text); border-color: var(--sp-text); color: var(--sp-bg); }

.sp-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.sp-filters:empty { display: none; }
.sp-tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 3px 3px 14px; border-radius: 999px;
  border: 1px solid var(--sp-line-2); background: var(--sp-panel-2); color: var(--sp-text); font-size: 14px;
}
.sp-tag button {
  display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--sp-text-2); cursor: pointer;
}
.sp-tag button:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

.sp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 224px), 1fr)); gap: clamp(14px, 1.3vw, 24px); }
.sp-card {
  display: flex; flex-direction: column; min-width: 0; overflow: hidden; border-radius: 14px;
  border: 1px solid var(--sp-line); background: var(--sp-panel); color: var(--sp-text) !important; text-decoration: none !important;
  transition: border-color 0.15s, background-color 0.15s;
}
.sp-card:hover { border-color: color-mix(in srgb, var(--c) 65%, var(--sp-line-2)); background: #10172a; }
.sp-card.held { border-color: color-mix(in srgb, var(--hc) 45%, var(--sp-line)); }
.sp-card.fight { border-color: rgba(255, 122, 133, 0.6); }
.sp-card:focus-visible { outline-offset: 3px; }
.sp-card-art {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  background: radial-gradient(120% 90% at 72% 18%, color-mix(in srgb, var(--c) 26%, transparent), transparent 62%), var(--sp-void);
}
.sp-card-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s; }
.sp-card:hover .sp-card-art img { transform: scale(1.04); }
.sp-card-art.no-shot {
  background:
    radial-gradient(1px 1px at 18% 26%, rgba(255, 255, 255, 0.7), transparent 60%),
    radial-gradient(1px 1px at 82% 68%, rgba(255, 255, 255, 0.55), transparent 60%),
    radial-gradient(1px 1px at 64% 14%, rgba(204, 216, 255, 0.6), transparent 60%),
    radial-gradient(1px 1px at 36% 84%, rgba(255, 244, 222, 0.5), transparent 60%),
    radial-gradient(120% 90% at 72% 18%, color-mix(in srgb, var(--c) 26%, transparent), transparent 62%), var(--sp-void);
}
.sp-orb {
  position: absolute; left: 12px; bottom: 10px; z-index: 1; width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 34% 30%, color-mix(in srgb, var(--c) 40%, #fff), var(--c) 52%, color-mix(in srgb, var(--c) 40%, #000));
  box-shadow: 0 0 0 3px rgba(3, 5, 11, 0.8);
}
.sp-orb svg { position: relative; z-index: 1; }
.sp-orb.ringed::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 170%; height: 42%; border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--c) 45%, #fff); transform: translate(-50%, -50%) rotate(-18deg); opacity: 0.8;
}
.no-shot .sp-orb { left: 50%; top: 46%; bottom: auto; width: 76px; height: 76px; transform: translate(-50%, -50%); box-shadow: none; }
.no-shot .sp-orb svg { width: 34px; height: 34px; }
.no-shot .sp-orb.ringed::before { border-width: 3px; }
.sp-chip {
  position: absolute; z-index: 2; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px; background: rgba(3, 5, 11, 0.86); color: var(--sp-text-2); font-size: 12px; font-weight: 700;
}
.sp-chip.live { color: var(--sp-live); }
.sp-chip.live i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.sp-chip.attack { top: auto; left: auto; right: 10px; bottom: 10px; border: 1px solid rgba(255, 122, 133, 0.6); color: var(--sp-attack); }
.sp-card-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 12px 14px 14px; }
.sp-card-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 700; color: #fff; }
.sp-card-by { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--sp-muted); }
.sp-card-flag { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 13px; font-weight: 600; color: var(--sp-text); }
.sp-card-flag svg { flex: none; }
.sp-card-flag span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-card-flag.free { font-weight: 500; color: var(--sp-muted); }
.sp-card-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; font-size: 13px; color: var(--sp-muted); }
.sp-card-meta span { display: inline-flex; align-items: center; gap: 5px; }
.sp-card-meta .liked { color: var(--sp-text); font-weight: 600; }

@media (min-width: 720px) {
  .sp-war-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sp-block-fronts { grid-column: 1 / -1; }
  .sp-rules ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
  .sp-war-grid { grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr); }
  .sp-block-fronts { grid-column: 1; grid-row: 1 / span 2; }
}
@media (min-width: 1680px) {
  .sp-war-grid { grid-template-columns: minmax(0, 2.1fr) minmax(320px, 1fr) minmax(320px, 1fr); }
  .sp-block-fronts { grid-row: auto; }
  .sp-rules ol { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sp-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
}
@media (min-width: 2200px) {
  .sp { --sp-max: 2320px; }
  .sm-stage { height: clamp(640px, 74vh, 1080px); }
  @supports (height: 1svh) { .sm-stage { height: clamp(640px, 74svh, 1080px); } }
  .sp-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .sp-card-name { font-size: 16px; }
}

@media (max-width: 1100px) {
  .sp-head { grid-template-columns: minmax(0, 1fr); }
  .sp-readout { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 760px; }
  .sp-fig { min-width: 0; }
}
@media (max-width: 899px) {
  .sm-stage { height: clamp(400px, 66vh, 720px); }
  @supports (height: 1svh) { .sm-stage { height: clamp(400px, 66svh, 720px); } }
  .sm-bottom { right: max(14px, env(safe-area-inset-right)); bottom: 14px; }
  .sm-side { top: 50%; bottom: auto; transform: translateY(-50%); flex-direction: column; align-items: flex-end; }
  .sm-zoom { flex-direction: column; }
  .sm-zoom .sm-btn + .sm-btn { border-left: 0; border-top: 1px solid var(--sp-line-2); }
  .sm-hint { top: 68px; }
  .sp-section-head { align-items: flex-start; }
  .sp-list .sp-section-head { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
  .sp-lenses {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    margin-left: calc(max(var(--sp-gutter), env(safe-area-inset-left)) * -1); margin-right: calc(max(var(--sp-gutter), env(safe-area-inset-right)) * -1);
    padding-left: max(var(--sp-gutter), env(safe-area-inset-left)); padding-right: max(var(--sp-gutter), env(safe-area-inset-right));
    scroll-padding-inline: var(--sp-gutter);
  }
  .sp-lenses::-webkit-scrollbar { display: none; }
}
@media (max-width: 599px) {
  .sp-lede { font-size: 15px; }
  .sp-actions .btn { flex: 1 1 auto; }
  .sp-readout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sp-fig { padding: 14px 16px 16px; }
  .sp-fig:nth-child(3) { border-left: 0; }
  .sp-fig:nth-child(n + 3) { border-top: 1px solid var(--sp-line); }
  .sm-stage { height: clamp(380px, 64vh, 620px); }
  @supports (height: 1svh) { .sm-stage { height: clamp(380px, 64svh, 620px); } }
  .sm-top { top: 10px; left: max(10px, env(safe-area-inset-left)); right: max(10px, env(safe-area-inset-right)); }
  .sm-find { flex: 1 1 auto; }
  .sm-live-long { display: none; }
  .sm-live-short { display: inline; }
  .sm-live { padding: 0 12px; }
  .sm-side { right: max(10px, env(safe-area-inset-right)); }
  .sm-bottom { left: max(10px, env(safe-area-inset-left)); right: max(10px, env(safe-area-inset-right)); bottom: 10px; }
  .sm-hint { top: 62px; font-size: 12px; border-radius: 12px; }
  .sp-key { gap: 10px 20px; font-size: 12px; }
  .sp-key li { flex: 1 1 100%; }
  .sp-block { padding: 16px 16px 18px; border-radius: 14px; }
  .sp-fronts {
    display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px;
  }
  .sp-fronts::-webkit-scrollbar { display: none; }
  .sp-front { flex: 0 0 min(84%, 320px); scroll-snap-align: start; }
  .sp-rules summary { padding: 0 16px; }
  .sp-rules ol { padding: 0 16px 18px 36px; }
  .sp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .sp-card { border-radius: 12px; }
  .sp-card-body { padding: 10px 11px 12px; gap: 3px; }
  .sp-card-name { font-size: 14px; }
  .sp-card-by, .sp-card-flag, .sp-card-meta { font-size: 12px; }
  .sp-card-meta { gap: 2px 10px; }
  .sp-orb { left: 8px; bottom: 8px; width: 32px; height: 32px; }
  .sp-orb svg { width: 18px; height: 18px; }
  .no-shot .sp-orb { width: 58px; height: 58px; }
  .no-shot .sp-orb svg { width: 26px; height: 26px; }
  .sp-chip { top: 8px; left: 8px; padding: 2px 8px; font-size: 12px; }
  .sp-chip.attack { right: 8px; bottom: 8px; }
}
@media (max-width: 360px) {
  .sp-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-height: 520px) and (orientation: landscape) {
  .sm-stage { height: calc(100vh - var(--nav-h) - 16px); min-height: 280px; }
  @supports (height: 1svh) { .sm-stage { height: calc(100svh - var(--nav-h) - 16px); } }
  .sm-side { top: auto; bottom: 64px; transform: none; }
  .sm-hint { display: none; }
}

@media (pointer: fine) and (min-width: 900px) {
  .sm-chips { flex-wrap: wrap; overflow: visible; -webkit-mask-image: none; mask-image: none; }
  .sm-chip:last-child { margin-right: 0; }
}

@media (any-pointer: coarse) {
  .sm-stage { touch-action: pan-y; }
  .sm-stage.sm-free { touch-action: none; }
  .sm-move { display: inline-flex; }
  .sp-front-go .btn, .sp-note-actions .btn { min-height: 44px; }
  .sp-tag button { width: 44px; height: 44px; }
  .sp-moon { min-height: 44px; }
  .sm .uv-mi.close { width: 44px; height: 44px; }
}
@media (any-pointer: coarse) and (min-width: 900px) {
  .sm-bottom { right: calc(max(14px, env(safe-area-inset-right)) + 340px); }
}

@media (pointer: coarse) {
  .sm-search { font-size: 16px; }
  .sm-hint-mouse { display: none; }
  .sm-hint-touch { display: inline; }
  .sp .sp-lens { min-height: 44px; }
  .sm-chip { height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .sp *, .sp *::before, .sp *::after { transition: none !important; }
  .sp-card:hover .sp-card-art img { transform: none; }
}
@media (forced-colors: active) {
  .sp-card, .sp-block, .sm-btn, .sm-chip, .sp-lens { border: 1px solid CanvasText; }
}

.sp-cell { position: relative; display: flex; flex-direction: column; min-width: 0; }
.sp-cell > .sp-card { flex: 1 1 auto; }
.sp-play {
  position: absolute; z-index: 3; top: 10px; right: 10px; display: inline-flex; align-items: center; gap: 6px;
  min-height: 32px; padding: 0 14px 0 11px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--accent, #ff5a1f); color: #fff; font: inherit; font-size: 13px; font-weight: 800;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}
.sp-play:hover { background: var(--accent-hover, #ff7340); }
.sp-play:focus-visible { outline: 2px solid var(--sp-focus); outline-offset: 2px; }
.sp-play:disabled { opacity: 0.7; cursor: default; }

@media (max-width: 720px) {
  .sp { display: flex; flex-direction: column; }
  .sp > .sp-head { order: 0; }
  .sp > .sp-list { order: 1; }
  .sp > .sm { order: 2; }
  .sp > .sp-key { order: 3; }
  .sp > .sp-war { order: 4; }
  .sm-stage { touch-action: pan-y; }
  .sm-stage.sm-free { touch-action: none; }
  .sm-move { display: inline-flex; }
}

.sp-readout-wrap { min-height: 112px; }
.sp-season { min-height: 1.5em; }
.sp-results { min-height: 1100px; }
.sp-block-body { min-height: 190px; }
.sp-war .sp-block { min-height: 270px; }
.sm-stage { min-height: 380px; }
@media (max-width: 720px) {
  .sp-readout-wrap { min-height: 150px; }
  .sp-results { min-height: 1500px; }
  .sp-war .sp-block { min-height: 240px; }
}

.sp-tag button, .sm-chip, .sp-lens, .sm-btn { min-width: 24px; min-height: 24px; }
.sp-tag button { position: relative; }
.sp-tag button::after, .sm-chip::after, .sp-lens::after { content: ""; position: absolute; inset: -6px; }
.sm-chip, .sp-lens { position: relative; }
@media (max-width: 640px), (pointer: coarse) {
  .sp-tag button { width: 32px; height: 32px; }
  .sp-tag button::after { inset: -6px; }
  .sm-chip::after, .sp-lens::after { inset: -3px 0; }
  .sm-chip, .sp-lens { min-height: 44px; }
  .sm-btn { min-height: 44px; min-width: 44px; }
}
