/* ==========================================================================
   ZZZ LATAM — SORTER STYLESHEET v4.0
   - Progressive 60fps OKLCH + Harmonic Spring Multi-Color Ambience
   - Slim Top Perimeter HUD Bar (100% clear of fighter heads)
   - Per-Agent Visual Scale Normalization (--char-scale, --char-x, --char-y)
   - Redesigned 4-Tier Editorial Final Ranking Bento (Zero overflow, zero broken imgs)
   ========================================================================== */

:root {
  --sr-cyan: #29e6ff;
  --sr-violet: #a855f7;
  --sr-magenta: #ec4899;
  --sr-ink: #070910;
  --sr-panel: rgba(10, 14, 24, 0.90);
}

/* --------------------------------------------------------------------------
   1. ZERO-SCROLL VIEWPORT LOCK & PROGRESSIVE MULTI-HARMONIC LIGHTING
   -------------------------------------------------------------------------- */
html[data-sorter-screen] body.sr-body {
  overflow: hidden;
  height: 100svh;
  background: #060811;
  user-select: none;
}

.sr-stage.stage {
  display: block !important;
  height: calc(100svh - 52px) !important;
  min-height: 540px;
  padding: clamp(6px, 1.1vh, 12px) clamp(12px, 2vw, 28px) !important;
  overflow: hidden;
  position: relative;
  --beam-left-x: 22%;
  --beam-left-y: 38%;
  --beam-right-x: 78%;
  --beam-right-y: 38%;
  --clash-accent: #7c3aed;
}

.sr-stage .stage__bg img {
  filter: saturate(1.18) contrast(1.08) brightness(0.46) hue-rotate(-8deg) !important;
}

/* Progressive Multi-Color Neo-Noir Ambience (Driven by 60fps OKLCH Spring Engine) */
.sr-neo-ambience {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(64% 68% at var(--beam-left-x, 22%) var(--beam-left-y, 38%), color-mix(in srgb, var(--left-accent, #29e6ff) 32%, transparent) 0%, transparent 72%),
    radial-gradient(64% 68% at var(--beam-right-x, 78%) var(--beam-right-y, 38%), color-mix(in srgb, var(--right-accent, #a855f7) 32%, transparent) 0%, transparent 72%),
    radial-gradient(46% 52% at 50% 48%, color-mix(in srgb, var(--clash-accent, #6366f1) 20%, transparent) 0%, transparent 76%),
    radial-gradient(55% 42% at 50% 8%, rgba(56, 189, 248, 0.14) 0%, transparent 70%),
    linear-gradient(180deg, rgba(6, 9, 18, 0.52) 0%, rgba(8, 12, 24, 0.20) 48%, rgba(5, 7, 14, 0.90) 100%);
  will-change: background;
}

.sr-mist.weather__mist {
  background:
    radial-gradient(60% 42% at 28% 82%, color-mix(in srgb, var(--left-accent, #29e6ff) 16%, transparent) 0%, transparent 70%),
    radial-gradient(60% 42% at 72% 82%, color-mix(in srgb, var(--right-accent, #a855f7) 16%, transparent) 0%, transparent 70%) !important;
}

.sr-stage #sr-wall-watermark {
  color: rgba(255, 255, 255, 0.028);
  -webkit-text-stroke: 1px rgba(148, 163, 184, 0.06);
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   2. TOPBAR CONTROLS: BILINGUAL SWITCHER (ES / EN) + EAR-SAFE AUDIO HUD
   -------------------------------------------------------------------------- */
.sr-topbar-controls {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.sr-lang-switch {
  display: inline-flex;
  align-items: center;
  background: rgba(9, 13, 24, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 2px;
  box-shadow: 2px 2px 0 #000;
}

.sr-lang-btn {
  appearance: none;
  background: transparent;
  border: 0;
  color: rgba(244, 247, 255, 0.65);
  font: 800 10.5px/1 var(--mono);
  letter-spacing: 0.06em;
  padding: 5px 9px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.sr-lang-btn:hover {
  color: #fff;
}

.sr-lang-btn.is-active {
  background: var(--sr-cyan);
  color: #060811;
  box-shadow: 1px 1px 0 #000;
}

.sr-audio-hud {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 9px;
  background: rgba(9, 13, 24, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 2px 2px 0 #000;
}

.sr-audio-btn {
  appearance: none;
  background: none;
  border: 0;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 700 9.5px/1 var(--mono);
  letter-spacing: 0.05em;
  cursor: pointer;
  padding: 2px 0;
}

.sr-eq {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 10px;
}

.sr-eq i {
  display: block;
  width: 2px;
  height: 3px;
  background: var(--sr-cyan);
  animation: sr-eq-bounce 0.8s ease-in-out infinite alternate;
}

.sr-eq i:nth-child(2) {
  animation-delay: 0.2s;
  height: 8px;
}

.sr-eq i:nth-child(3) {
  animation-delay: 0.4s;
  height: 5px;
}

.sr-audio-hud[data-playing="false"] .sr-eq i {
  animation-play-state: paused;
  height: 2px !important;
  background: #64748b;
}

@keyframes sr-eq-bounce {
  0% { height: 2px; }
  100% { height: 10px; }
}

.sr-audio-slider {
  width: 54px;
  height: 4px;
  accent-color: var(--sr-cyan);
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   3. FULL-SCREEN WORKSTATION & SLIM PERIMETER HUD BAR
      (Positioned cleanly at the top edge so it NEVER covers character heads)
   -------------------------------------------------------------------------- */
.sr-workstation {
  position: relative;
  z-index: 5;
  width: min(1460px, 100%);
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 0;
}

.sr-view-duel,
.sr-view-result {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 0;
}

.sr-view-duel[hidden],
.sr-view-result[hidden] {
  display: none !important;
}

/* Slim Top Perimeter HUD Bar (42px height, docked at top edge) */
.sr-hud-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 14px;
  background: rgba(8, 12, 22, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-left: 4px solid var(--left-accent, #29e6ff);
  border-right: 4px solid var(--right-accent, #a855f7);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65);
  position: relative;
  z-index: 12;
  flex-shrink: 0;
}

.sr-hud-bar__left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sr-hud-phase {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 4px 9px;
  font: 800 10.5px/1 var(--mono);
  color: #f8fafc;
  letter-spacing: 0.05em;
}

.sr-hud-duel {
  background: var(--left-accent, #29e6ff);
  color: #060811;
  font: 900 10.5px/1 var(--mono);
  padding: 4px 9px;
  letter-spacing: 0.05em;
  box-shadow: 2px 2px 0 #000;
  transition: background 0.3s ease;
}

.sr-hud-question {
  margin: 0 0 0 4px;
  font: 900 clamp(17px, 1.65vw, 23px)/1 var(--wide);
  letter-spacing: -0.01em;
  color: #ffffff;
  text-transform: uppercase;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  text-shadow: 0 2px 0 #000;
}

.sr-hud-question em {
  font-style: normal;
  color: #38bdf8;
}

.sr-hud-bar__right {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.sr-hud-sub {
  font: 700 10.5px/1 var(--mono);
  color: rgba(226, 232, 240, 0.75);
  letter-spacing: 0.02em;
}

.sr-hud-meter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sr-progress-track {
  width: clamp(120px, 14vw, 210px);
  height: 8px;
  background: rgba(9, 13, 24, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 1px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.8);
}

.sr-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--left-accent, #29e6ff) 0%, #ffffff 50%, var(--right-accent, #a855f7) 100%);
  transition: width 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.sr-hud-pct {
  font: 900 12px/1 var(--mono);
  color: #38bdf8;
  min-width: 34px;
  text-align: right;
}

.sr-hud-save {
  font: 800 10px/1 var(--mono);
  color: #34d399;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.32);
  padding: 4px 8px;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   4. FULL-WIDTH POP-OUT CHARACTER SHOWCASE ARENA (.sr-arena)
      (With Per-Agent Visual Scale Normalization: --char-scale, --char-x, --char-y)
   -------------------------------------------------------------------------- */
.sr-arena {
  position: relative;
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 108px minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
  margin-top: 4px;
}

.sr-fighter {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  cursor: pointer;
  text-align: left;
  color: var(--ink);
  outline: none;
  isolation: isolate;
  overflow: visible;
}

/* Compact Stylish Dossier Backdrop Square (Matches Lucy reference: character pops OUT of the box!) */
.sr-fighter__poster {
  position: absolute;
  top: 18%;
  bottom: 14%;
  width: clamp(270px, 46%, 365px);
  background: linear-gradient(165deg, rgba(16, 21, 33, 0.95) 0%, rgba(7, 9, 16, 0.98) 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.86), inset 0 0 48px rgba(0, 0, 0, 0.88);
  overflow: hidden;
  z-index: 0;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.28s ease, box-shadow 0.32s ease;
}

.sr-fighter__poster::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  pointer-events: none;
  z-index: 2;
}

.sr-fighter--left .sr-fighter__poster {
  left: 16%;
  transform: rotate(-2.2deg) skewX(-1.5deg);
  border-top: 3px solid var(--card-accent, #29e6ff);
}

.sr-fighter--right .sr-fighter__poster {
  right: 16%;
  transform: rotate(2.2deg) skewX(1.5deg);
  border-top: 3px solid var(--card-accent, #29e6ff);
}

.sr-fighter:hover .sr-fighter__poster,
.sr-fighter:focus-visible .sr-fighter__poster {
  border-color: rgba(255, 255, 255, 0.32);
  border-top-color: var(--card-accent, #29e6ff);
  box-shadow:
    0 26px 60px rgba(0, 0, 0, 0.94),
    0 0 38px color-mix(in srgb, var(--card-accent, #29e6ff) 32%, transparent);
}

.sr-fighter--left:hover .sr-fighter__poster {
  transform: rotate(-1.3deg) skewX(-1deg) scale(1.02);
}

.sr-fighter--right:hover .sr-fighter__poster {
  transform: rotate(1.3deg) skewX(1deg) scale(1.02);
}

.sr-fighter__closeup {
  position: absolute;
  inset: -16% -16% 0 -16%;
  width: 132%;
  height: 132%;
  object-fit: cover;
  object-position: 50% 14%;
  opacity: 0.20;
  filter: grayscale(1) contrast(1.42) brightness(0.88);
  transform: scale(1.10);
  pointer-events: none;
  transition: opacity 0.32s ease, transform 0.42s ease, filter 0.32s ease;
}

.sr-fighter:hover .sr-fighter__closeup {
  opacity: 0.30;
  filter: grayscale(0.55) contrast(1.30) brightness(0.95);
  transform: scale(1.16);
}

.sr-fighter__stamp {
  position: absolute;
  bottom: 14px;
  right: 10px;
  writing-mode: vertical-rl;
  font: 800 9.5px/1 var(--mono);
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.34);
  pointer-events: none;
  z-index: 3;
}

/* Subtle Hollow Outlined Watermark Name (Matches Lucy reference: tucked at top-left of compact square) */
.sr-fighter__bg-name {
  position: absolute;
  top: 19.5%;
  font: 900 clamp(48px, 6.2vw, 92px)/0.84 var(--tall);
  letter-spacing: 0.02em;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.13);
  text-transform: uppercase;
  pointer-events: none;
  z-index: 1;
  white-space: nowrap;
  transition: transform 0.32s ease, -webkit-text-stroke-color 0.32s ease;
}

.sr-fighter--left .sr-fighter__bg-name {
  left: 9%;
  transform: rotate(-2deg);
}

.sr-fighter--right .sr-fighter__bg-name {
  right: 9%;
  transform: rotate(2deg);
}

.sr-fighter:hover .sr-fighter__bg-name {
  -webkit-text-stroke-color: rgba(255, 255, 255, 0.24);
}

.sr-fighter__pedestal {
  position: absolute;
  bottom: 10%;
  width: 62%;
  height: 28%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, var(--card-accent, #29e6ff) 0%, transparent 70%);
  opacity: 0.26;
  filter: blur(22px);
  z-index: 1;
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.sr-fighter:hover .sr-fighter__pedestal {
  opacity: 0.52;
  transform: scale(1.12);
}

/* Heroic Pop-Out Character Art & Silhouette Shadow (Bursts out of the compact backdrop square!) */
.sr-fighter__shadow {
  position: absolute;
  bottom: 42px;
  height: clamp(410px, 68svh, 630px);
  width: auto;
  max-width: none;
  object-fit: contain;
  object-position: bottom center;
  filter: brightness(0) saturate(100%) drop-shadow(0 0 1px var(--card-accent, #29e6ff));
  opacity: 0.38;
  transform-origin: 50% 82%;
  transform: translate(calc(var(--char-x, 0%) + 16px), calc(var(--char-y, 0%) + 8px)) scale(var(--char-scale, 1));
  z-index: 1;
  pointer-events: none;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}

.sr-fighter__art {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 42px;
  pointer-events: none;
  overflow: visible;
}

.sr-fighter__figure {
  height: clamp(410px, 68svh, 630px);
  width: auto;
  max-width: none;
  object-fit: contain;
  object-position: bottom center;
  transform-origin: 50% 82%;
  transform: translate(var(--char-x, 0%), var(--char-y, 0%)) scale(var(--char-scale, 1));
  filter:
    drop-shadow(0 18px 34px rgba(0, 0, 0, 0.90))
    drop-shadow(0 0 24px color-mix(in srgb, var(--card-accent, #29e6ff) 24%, transparent));
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), filter 0.28s ease;
}

.sr-fighter:hover .sr-fighter__figure,
.sr-fighter:focus-visible .sr-fighter__figure {
  transform: translate(var(--char-x, 0%), calc(var(--char-y, 0%) - 6px)) scale(calc(var(--char-scale, 1) * 1.04));
  filter:
    drop-shadow(0 22px 40px rgba(0, 0, 0, 0.95))
    drop-shadow(0 0 32px color-mix(in srgb, var(--card-accent, #29e6ff) 46%, transparent));
}

.sr-fighter:hover .sr-fighter__shadow {
  transform: translate(calc(var(--char-x, 0%) + 22px), calc(var(--char-y, 0%) + 4px)) scale(calc(var(--char-scale, 1) * 1.045));
  opacity: 0.50;
}

/* Skewed Editorial Nameplate & Sticker Plaque (Matches Lucy reference) */
.sr-fighter__plaque {
  position: absolute;
  bottom: 8px;
  width: min(82%, 440px);
  background: rgba(8, 11, 19, 0.96);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  border-left: 5px solid var(--card-accent, #29e6ff);
  padding: 10px 16px 12px;
  box-shadow: 7px 7px 0 #000, 0 18px 38px rgba(0, 0, 0, 0.92);
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 4px;
  backdrop-filter: blur(8px);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.sr-fighter--left .sr-fighter__plaque {
  left: 11%;
  transform: rotate(-1deg);
}

.sr-fighter--right .sr-fighter__plaque {
  right: 11%;
  transform: rotate(1deg);
  border-left: 1.5px solid rgba(255, 255, 255, 0.18);
  border-right: 5px solid var(--card-accent, #29e6ff);
}

.sr-fighter:hover .sr-fighter__plaque {
  border-color: var(--card-accent, #29e6ff);
  transform: rotate(0deg) translateY(-3px);
  box-shadow: 9px 9px 0 #000, 0 22px 44px rgba(0, 0, 0, 0.95);
}

.sr-plaque__kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sr-key-badge {
  background: #f1f5f9;
  color: #060811;
  font: 900 10px/1 var(--mono);
  letter-spacing: 0.05em;
  padding: 4px 8px;
  box-shadow: 2px 2px 0 #000;
  transition: background 0.14s, color 0.14s;
}

.sr-fighter:hover .sr-key-badge {
  background: var(--card-accent, #29e6ff);
  color: #060811;
}

.sr-faction-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font: 800 9.5px/1 var(--mono);
  color: #7dd3fc;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sr-plaque__name {
  margin: 0;
  font: 900 clamp(23px, 2.4vw, 35px)/0.92 var(--wide);
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  text-shadow: 0 4px 0 #000;
}

.sr-plaque__stickers {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 2px;
  transform: rotate(-1deg);
  transform-origin: left;
}

.sr-sticker-spec {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f1f5f9;
  color: #060811;
  padding: 4px 9px;
  font: 800 10.5px/1 var(--wide);
  text-transform: uppercase;
}

.sr-sticker-spec em {
  font-style: normal;
  font-weight: 850;
}

.sr-sticker-cta {
  font: 400 15.5px/1 var(--tall);
  letter-spacing: 0.05em;
  background: var(--card-accent, #29e6ff);
  color: #060811;
  padding: 4px 12px 2px;
  box-shadow: 4px 4px 0 #000;
  transition: filter 0.14s, transform 0.14s;
}

.sr-fighter:hover .sr-sticker-cta {
  filter: brightness(1.18);
  transform: translateX(2px);
}

.sr-plaque__role {
  margin: 3px 0 0;
  font: 550 11.5px/1.32 var(--wide);
  color: #cbd5e1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================================================
   5. KINETIC HEXAGONAL VS EMBLEM (.sr-clash-divider)
   ========================================================================== */
.sr-clash-divider {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 6;
  pointer-events: none;
}

.sr-clash-beam {
  position: absolute;
  top: 3%;
  bottom: 5%;
  width: 2.5px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    var(--left-accent, #29e6ff) 22%,
    var(--clash-accent, #ffffff) 50%,
    var(--right-accent, #ff3b5c) 78%,
    transparent 100%
  );
  transform: rotate(7deg);
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.55);
}

.sr-vs-core {
  position: relative;
  width: 102px;
  height: 102px;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.92));
}

.sr-vs-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.sr-vs-letters {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  font: 900 35px/1 var(--tall);
  letter-spacing: -0.02em;
  transform: skewX(-8deg);
}

.sr-vs-v {
  color: #ffffff;
  text-shadow: -3px 2px 0 var(--left-accent, #29e6ff), 0 4px 12px rgba(0, 0, 0, 0.9);
}

.sr-vs-s {
  color: #ffffff;
  text-shadow: 3px 2px 0 var(--right-accent, #ff3b5c), 0 4px 12px rgba(0, 0, 0, 0.9);
  margin-left: 1px;
}

/* ==========================================================================
   6. INTEGRATED BOTTOM CONTROL DECK (.sr-deck-bar)
   ========================================================================== */
.sr-deck-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 16px;
  background: rgba(9, 13, 22, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-left: 4px solid var(--left-accent, #38bdf8);
  box-shadow: 5px 5px 0 #000;
  z-index: 7;
  flex-shrink: 0;
}

.sr-deck-bar__hints {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font: 600 11px/1.2 var(--mono);
  color: #94a3b8;
  flex-wrap: wrap;
}

.sr-deck-bar__hints kbd {
  display: inline-block;
  padding: 1px 5px;
  font: 800 10px/1.1 var(--mono);
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.sr-deck-bar__actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sr-deck-btn {
  appearance: none;
  background: #131929;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #f8fafc;
  font: 800 10.5px/1 var(--mono);
  letter-spacing: 0.04em;
  padding: 8px 14px;
  cursor: pointer;
  box-shadow: 3px 3px 0 #000;
  transition: all 0.14s ease;
}

.sr-deck-btn:hover:not(:disabled) {
  background: #38bdf8;
  color: #060811;
  border-color: #38bdf8;
  transform: translateY(-1px);
}

.sr-deck-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: none;
}

.sr-deck-btn--tie {
  border-color: rgba(56, 189, 248, 0.45);
  color: #7dd3fc;
}

.sr-deck-btn--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.14);
  color: #94a3b8;
}

/* ==========================================================================
   7. VIEW B: REDESIGNED 4-TIER EDITORIAL RANKING SHOWCASE (.sr-view-result)
      (100% matched selectors, strictly clipped frames, zero broken images)
   ========================================================================== */
.sr-res-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 6px 14px;
  background: rgba(8, 12, 22, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-left: 4px solid var(--left-accent, #29e6ff);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65);
  flex-shrink: 0;
}

.sr-res-topbar__titles {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.sr-res-topbar .kicker {
  margin: 0;
}

.sr-res-heading {
  margin: 0;
  font: 900 clamp(20px, 2.1vw, 30px)/1 var(--wide);
  color: #f8fafc;
  text-transform: uppercase;
  text-shadow: 0 3px 0 #000;
}

.sr-res-heading span {
  color: #38bdf8;
}

.sr-res-actions {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.sr-act-btn {
  appearance: none;
  background: #131929;
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #f8fafc;
  font: 800 10.5px/1 var(--mono);
  padding: 8px 12px;
  cursor: pointer;
  box-shadow: 3px 3px 0 #000;
  transition: all 0.14s;
}

.sr-act-btn:hover {
  background: #38bdf8;
  color: #060811;
  border-color: #38bdf8;
}

.sr-act-btn--primary {
  background: #29e6ff;
  color: #060811;
  border-color: #29e6ff;
  font-weight: 900;
  box-shadow: 3px 3px 0 #ec4899;
}

.sr-act-btn--primary:hover {
  background: #a5f3fc;
  border-color: #a5f3fc;
}

.sr-act-btn--ghost {
  background: transparent;
  color: #94a3b8;
  border-color: rgba(255, 255, 255, 0.14);
}

.sr-toast {
  font: 800 10.5px/1 var(--mono);
  color: #34d399;
  padding-left: 4px;
}

/* 4-Tier Full-Screen Bento Grid */
.sr-bento {
  display: grid;
  grid-template-columns: minmax(0, 1.34fr) minmax(0, 1fr);
  gap: 14px;
  flex: 1;
  min-height: 0;
  margin-top: 10px;
  overflow: hidden;
}

.sr-bento__podium-col {
  display: grid;
  grid-template-rows: minmax(0, 1fr) 168px;
  gap: 12px;
  min-height: 0;
  overflow: hidden;
}

.sr-top3-row {
  display: grid;
  grid-template-columns: minmax(0, 1.24fr) minmax(0, 0.96fr);
  gap: 12px;
  min-height: 0;
  overflow: hidden;
}

/* TIER 1: #01 CHAMPION HERO CARD */
.sr-top1-card {
  position: relative;
  background:
    radial-gradient(80% 80% at 78% 35%, color-mix(in srgb, var(--card-accent, #facc15) 34%, transparent) 0%, transparent 70%),
    linear-gradient(155deg, rgba(16, 23, 38, 0.96) 0%, rgba(7, 10, 18, 0.98) 100%);
  border: 2px solid var(--card-accent, #facc15);
  border-radius: 8px;
  overflow: hidden;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 0;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.88), 6px 6px 0 #000;
}

.sr-top1-card__wm {
  position: absolute;
  top: 8px;
  left: 14px;
  font: 900 clamp(72px, 8vw, 118px)/0.85 var(--tall);
  color: rgba(255, 255, 255, 0.05);
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.10);
  pointer-events: none;
  z-index: 0;
}

.sr-top1-card__art {
  position: absolute;
  right: -4%;
  bottom: -6%;
  height: 108%;
  width: auto;
  max-width: none;
  object-fit: contain;
  object-position: bottom right;
  transform-origin: 70% 85%;
  transform: scale(var(--char-scale, 1));
  pointer-events: none;
  z-index: 1;
  filter: drop-shadow(-10px 8px 22px rgba(0, 0, 0, 0.92));
}

.sr-top1-card__shade {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(90deg, rgba(7, 10, 18, 0.96) 0%, rgba(7, 10, 18, 0.78) 46%, rgba(7, 10, 18, 0.05) 85%),
    linear-gradient(180deg, transparent 45%, rgba(7, 10, 18, 0.94) 100%);
  pointer-events: none;
}

.sr-top1-card__info {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  max-width: 68%;
}

.sr-top1-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #facc15;
  color: #060811;
  font: 900 11px/1 var(--mono);
  padding: 5px 10px;
  box-shadow: 3px 3px 0 #000;
  letter-spacing: 0.04em;
}

.sr-top1-badge i,
.sr-top1-badge em {
  font-style: normal;
}

.sr-top1-name {
  margin: 4px 0 0;
  font: 900 clamp(24px, 2.5vw, 36px)/0.92 var(--wide);
  color: #ffffff;
  text-transform: uppercase;
  text-shadow: 0 4px 0 #000;
}

.sr-top1-fac {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 800 10.5px/1.2 var(--mono);
  color: var(--card-accent, #29e6ff);
  text-transform: uppercase;
}

.sr-top1-role {
  margin: 2px 0 0;
  font: 550 11.5px/1.32 var(--wide);
  color: #cbd5e1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sr-top1-links {
  margin-top: 6px;
}

.sr-top1-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 900 10.5px/1 var(--mono);
  color: #060811;
  background: var(--card-accent, #29e6ff);
  text-decoration: none;
  padding: 7px 12px;
  box-shadow: 3px 3px 0 #000;
  transition: filter 0.14s, transform 0.14s;
}

.sr-top1-link:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

/* TIER 2: #02 SILVER & #03 BRONZE STACK (Strictly Clipped, Zero Overflow!) */
.sr-top23-stack {
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-height: 0;
  overflow: hidden;
}

.sr-podium-sub {
  position: relative;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(75% 85% at 82% 40%, color-mix(in srgb, var(--card-accent, #38bdf8) 28%, transparent) 0%, transparent 72%),
    linear-gradient(155deg, rgba(14, 20, 34, 0.96) 0%, rgba(8, 11, 20, 0.98) 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  border-left: 5px solid var(--card-accent, #38bdf8);
  border-radius: 7px;
  padding: 12px 15px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 5px 5px 0 #000;
  transition: border-color 0.16s, transform 0.16s;
}

.sr-podium-sub:hover {
  border-color: var(--card-accent, #38bdf8);
  transform: translateY(-2px);
}

.sr-podium-sub__wm {
  position: absolute;
  top: 6px;
  left: 12px;
  font: 900 54px/0.85 var(--tall);
  color: rgba(255, 255, 255, 0.045);
  pointer-events: none;
  z-index: 0;
}

.sr-podium-sub__art {
  position: absolute;
  right: -4%;
  top: 0;
  width: 58%;
  height: 118%;
  object-fit: cover;
  object-position: 50% 10%;
  pointer-events: none;
  z-index: 1;
  filter: drop-shadow(-6px 4px 14px rgba(0, 0, 0, 0.88));
}

.sr-podium-sub__shade {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(90deg, rgba(8, 11, 20, 0.96) 0%, rgba(8, 11, 20, 0.80) 52%, rgba(8, 11, 20, 0.06) 92%);
  pointer-events: none;
}

.sr-podium-sub__info {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  height: 100%;
  max-width: 66%;
}

.sr-podium-sub__rank {
  display: inline-block;
  font: 900 11px/1 var(--mono);
  padding: 4px 9px;
  color: #060811;
  background: #e2e8f0;
  box-shadow: 2px 2px 0 #000;
}

.sr-podium-sub[data-rank="3"] .sr-podium-sub__rank {
  background: #f59e0b;
}

.sr-podium-sub__name {
  margin: auto 0 2px;
  font: 900 clamp(17px, 1.6vw, 22px)/0.96 var(--wide);
  color: #ffffff;
  text-transform: uppercase;
  text-shadow: 0 2px 0 #000;
}

.sr-podium-sub__meta {
  margin: 0 0 6px;
  font: 700 10px/1.2 var(--mono);
  color: var(--card-accent, #7dd3fc);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.sr-podium-sub__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font: 800 9.5px/1 var(--mono);
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.22);
  text-decoration: none;
  padding: 4px 8px;
  transition: background 0.14s, color 0.14s;
}

.sr-podium-sub__link:hover {
  background: var(--card-accent, #38bdf8);
  color: #060811;
}

/* TIER 3: #04 TO #10 ELITE 7-CARD STRIP (Verified Portraits, Upper-Bust Framing) */
.sr-top10-box {
  background: rgba(9, 13, 23, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  padding: 9px 12px 10px;
  box-shadow: 5px 5px 0 #000;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 0;
  overflow: hidden;
}

.sr-section-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font: 800 10.5px/1 var(--mono);
  color: #38bdf8;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.sr-section-hdr small {
  font: 600 9.5px/1 var(--mono);
  color: #94a3b8;
}

.sr-top10-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  flex: 1;
  min-height: 0;
}

.sr-elite-chip {
  position: relative;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(80% 70% at 50% 30%, color-mix(in srgb, var(--card-accent, #38bdf8) 28%, transparent) 0%, transparent 75%),
    #0d1322;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-top: 3px solid var(--card-accent, #38bdf8);
  border-radius: 6px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 6px 7px;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.sr-elite-chip:hover {
  border-color: var(--card-accent, #38bdf8);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.8);
}

.sr-elite-chip__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 115%;
  object-fit: cover;
  object-position: 50% 10%;
  pointer-events: none;
  z-index: 1;
  transition: transform 0.22s ease;
}

.sr-elite-chip:hover .sr-elite-chip__img {
  transform: scale(1.06);
}

.sr-elite-chip::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 10, 18, 0.15) 0%, rgba(7, 10, 18, 0.35) 45%, rgba(7, 10, 18, 0.95) 100%);
  z-index: 2;
  pointer-events: none;
}

.sr-elite-chip__rank {
  position: absolute;
  top: 5px;
  left: 5px;
  z-index: 3;
  background: rgba(7, 10, 18, 0.90);
  border: 1px solid var(--card-accent, #38bdf8);
  color: #f8fafc;
  font: 900 9.5px/1 var(--mono);
  padding: 3px 5px;
  border-radius: 3px;
}

.sr-elite-chip__name {
  position: relative;
  z-index: 3;
  font: 850 11.5px/1.1 var(--wide);
  color: #ffffff;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 2px 4px #000;
}

.sr-elite-chip__sub {
  position: relative;
  z-index: 3;
  font: 700 9px/1.1 var(--mono);
  color: var(--card-accent, #7dd3fc);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* TIER 4: #11 TO #62 SMART ADAPTIVE ROSTER PANEL (Crisp Dossier Pills) */
.sr-bento__rest-col {
  background: rgba(9, 13, 22, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  overflow: hidden;
  box-shadow: 5px 5px 0 #000;
}

.sr-rest-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.sr-rest-title {
  font: 800 11px/1 var(--mono);
  color: #f8fafc;
  letter-spacing: 0.04em;
}

.sr-rest-title b {
  color: #38bdf8;
}

.sr-rest-tabs {
  display: inline-flex;
  gap: 4px;
}

.sr-tab {
  appearance: none;
  background: #141b2d;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #cbd5e1;
  font: 800 10px/1 var(--mono);
  padding: 5px 8px;
  cursor: pointer;
  border-radius: 3px;
}

.sr-tab.is-active {
  background: #38bdf8;
  color: #060811;
  border-color: #38bdf8;
}

.sr-rest-search {
  width: 100%;
  background: #060811;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f8fafc;
  font: 600 11.5px/1.2 var(--wide);
  padding: 6px 10px;
  border-radius: 4px;
}

.sr-rest-search:focus {
  outline: none;
  border-color: #38bdf8;
}

.sr-rest-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 46px;
  gap: 6px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.35) transparent;
}

.sr-rest-pill {
  height: 46px;
  background: rgba(15, 21, 35, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-left: 3px solid var(--card-accent, #38bdf8);
  border-radius: 5px;
  padding: 4px 8px;
  display: grid;
  grid-template-columns: 28px 34px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  text-decoration: none;
  overflow: hidden;
  transition: background 0.14s, border-color 0.14s, transform 0.14s;
}

.sr-rest-pill:hover {
  background: rgba(25, 35, 56, 0.98);
  border-color: var(--card-accent, #38bdf8);
  transform: translateY(-1px);
}

.sr-rest-pill__rk {
  font: 900 10.5px/1 var(--mono);
  color: rgba(244, 247, 255, 0.62);
}

.sr-rest-pill__av {
  width: 34px !important;
  height: 34px !important;
  border-radius: 4px;
  object-fit: cover;
  object-position: 50% 12%;
  background: #070a14;
  border: 1px solid rgba(255, 255, 255, 0.16);
  display: block;
}

.sr-rest-pill__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  overflow: hidden;
}

.sr-rest-pill__nm {
  font: 800 11.5px/1.1 var(--wide);
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sr-rest-pill__fc {
  font: 600 9.5px/1 var(--mono);
  color: var(--card-accent, #94a3b8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   8. RESPONSIVE ADAPTATION (TABLETS & MOBILE SCREENS)
   ========================================================================== */
@media (max-width: 1120px) {
  .sr-bento {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
  .sr-hud-sub {
    display: none;
  }
}

@media (max-width: 780px) {
  html[data-sorter-screen] body.sr-body {
    overflow-y: auto;
    height: auto;
  }
  .sr-stage.stage {
    height: auto !important;
    min-height: calc(100svh - 52px);
  }
  .sr-hud-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .sr-hud-bar__right {
    width: 100%;
    justify-content: space-between;
  }
  .sr-arena {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 48px 1fr;
    gap: 6px;
    min-height: 580px;
  }
  .sr-fighter__figure,
  .sr-fighter__shadow {
    height: clamp(210px, 32svh, 290px);
  }
  .sr-clash-beam {
    width: 86%;
    height: 2px;
    top: 50%;
    bottom: auto;
    transform: rotate(0deg);
  }
  .sr-vs-core {
    width: 64px;
    height: 64px;
  }
  .sr-vs-letters {
    font-size: 24px;
  }
  .sr-deck-bar__hints {
    display: none;
  }
  .sr-deck-bar__actions {
    width: 100%;
    justify-content: space-between;
  }
  .sr-top3-row {
    grid-template-columns: 1fr;
  }
  .sr-top10-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .sr-rest-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
