/* Injected into proxied Sports Pulse — left league rail, full-width board */
:root {
  --pulse-rail: #12161c;
  --pulse-rail-tile: #1a2028;
  --pulse-accent: #00ffa3;
  --pulse-text: #f0f2f5;
  --pulse-muted: #8b939e;
  --pulse-line: rgba(255, 255, 255, 0.08);
  --pulse-bad: #ff5c7a;
}

html.pulse-embed-host,
body.pulse-embed-host {
  margin: 0;
  background: #0b0e11;
}

body.pulse-embed-host {
  display: block;
  min-height: 100dvh;
}

.pulse-embed-layout {
  display: grid;
  grid-template-columns: 17.5rem minmax(0, 1fr);
  align-items: stretch;
  min-height: 100dvh;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.pulse-embed-main {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

/* Upstream was centered / phone-capped — fill the pane */
body.pulse-embed-host main,
body.pulse-embed-host .mode-nav,
body.pulse-embed-host .sport-nav,
body.pulse-embed-host .board-bar,
body.pulse-embed-host .footer {
  max-width: none !important;
  width: 100%;
  box-sizing: border-box;
}

body.pulse-embed-host[data-view="detail"] main {
  max-width: none !important;
}

/* Left rail owns league pick — hide the duplicate center sport chips */
body.pulse-embed-host.pulse-league-picked #sport-nav {
  display: none !important;
}

/* Pixel / tablet: rail chips are the league picker — don't stack Pulse's row too */
@media (max-width: 980px) {
  body.pulse-embed-host #sport-nav {
    display: none !important;
  }
}

/* StreamHeath mark replaces ← Home in Pulse / Racing chrome */
body.pulse-embed-host .sh-bar-logo,
.pulse-app-bar .sh-bar-logo {
  display: inline-grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

body.pulse-embed-host .sh-logo,
.pulse-app-bar .sh-logo {
  width: 1.85rem;
  height: 1.85rem;
  display: grid;
  place-items: center;
}

body.pulse-embed-host .sh-logo .logo-mark,
.pulse-app-bar .sh-logo .logo-mark {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

body.pulse-embed-host .sh-logo .logo-plate,
.pulse-app-bar .sh-logo .logo-plate {
  fill: #12161c;
}

body.pulse-embed-host .sh-logo .logo-ring,
.pulse-app-bar .sh-logo .logo-ring {
  fill: none;
  stroke: #00ffa3;
  stroke-width: 1.35;
}

body.pulse-embed-host .sh-logo .logo-play,
body.pulse-embed-host .sh-logo .logo-eq .bar,
.pulse-app-bar .sh-logo .logo-play,
.pulse-app-bar .sh-logo .logo-eq .bar {
  fill: #00ffa3;
}

body.pulse-embed-host .sh-bar-logo:hover .logo-ring,
.pulse-app-bar .sh-bar-logo:hover .logo-ring {
  stroke-opacity: 1;
}

.pulse-rail {
  position: sticky;
  top: 0;
  align-self: start;
  max-height: 100dvh;
  overflow: auto;
  padding: 0.85rem 0.75rem 1.25rem;
  background: var(--pulse-rail);
  border-right: 1px solid var(--pulse-line);
  scrollbar-width: thin;
  z-index: 30;
  box-sizing: border-box;
}

.pulse-rail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
}

.pulse-tile {
  display: grid;
  justify-items: center;
  gap: 0.28rem;
  padding: 0.55rem 0.2rem 0.45rem;
  border-radius: 10px;
  background: var(--pulse-rail-tile);
  color: var(--pulse-text);
  text-decoration: none;
  border: 1px solid transparent;
  min-height: 3.6rem;
  box-sizing: border-box;
}

.pulse-tile:hover {
  border-color: rgba(0, 255, 163, 0.28);
}

.pulse-tile.is-on {
  background: rgba(0, 255, 163, 0.18);
  border-color: rgba(0, 255, 163, 0.45);
  box-shadow: inset 3px 0 0 var(--pulse-accent);
}

.pulse-tile-ico {
  width: 1.15rem;
  height: 1.15rem;
  color: var(--pulse-accent);
  display: grid;
  place-items: center;
}

.pulse-tile-ico svg {
  width: 100%;
  height: 100%;
  display: block;
}

.pulse-tile-label {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.1;
  color: rgba(240, 242, 245, 0.92);
}

.pulse-rail-section {
  margin-top: 1.1rem;
}

.pulse-rail-head {
  margin: 0 0 0.45rem 0.15rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pulse-muted);
}

.pulse-rail-list {
  display: grid;
  gap: 0.15rem;
}

.pulse-rail-link {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  color: var(--pulse-text);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
}

.pulse-rail-link:hover,
.pulse-rail-link.is-on {
  background: rgba(0, 255, 163, 0.12);
}

.pulse-rail-link.is-live {
  box-shadow: inset 3px 0 0 var(--pulse-bad);
}

.pulse-rail-ico {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--pulse-accent);
}

.pulse-rail-empty {
  padding: 0.55rem 0.65rem;
  color: var(--pulse-muted);
  font-size: 0.8rem;
}

/* Phone / tablet: league strip only — no nested phone column */
@media (max-width: 980px) {
  html.pulse-embed-host,
  body.pulse-embed-host {
    overflow-x: clip;
    max-width: 100%;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  body.pulse-embed-host input,
  body.pulse-embed-host select,
  body.pulse-embed-host textarea {
    font-size: 16px;
  }

  .pulse-embed-layout {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    width: 100%;
    max-width: 100%;
  }

  .pulse-rail {
    position: sticky;
    top: 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    max-height: none;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--pulse-line);
    padding: 0.45rem 0 0.5rem;
    background: rgba(18, 22, 28, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 40;
  }

  .pulse-rail-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.4rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 0 max(0.55rem, env(safe-area-inset-right, 0px)) 0.15rem max(0.55rem, env(safe-area-inset-left, 0px));
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: max(0.55rem, env(safe-area-inset-left, 0px));
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    scrollbar-width: none;
    /* Hint that more leagues sit off-screen */
    mask-image: linear-gradient(90deg, #000 0%, #000 calc(100% - 1.25rem), transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 calc(100% - 1.25rem), transparent 100%);
  }

  .pulse-rail-grid::-webkit-scrollbar {
    display: none;
  }

  .pulse-tile {
    flex: 0 0 auto;
    flex-shrink: 0;
    width: 3.85rem;
    scroll-snap-align: start;
    min-height: 3.15rem;
    padding: 0.4rem 0.15rem 0.35rem;
  }

  .pulse-tile.is-on {
    box-shadow: inset 0 -3px 0 var(--pulse-accent);
  }

  .pulse-tile-label {
    font-size: 0.58rem;
  }

  .pulse-rail-section {
    display: none;
  }

  /* Compact game-odds strip under league chips (Popular/Kalshi sections stay hidden) */
  .pulse-kalshi-strip {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.4rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 0.35rem max(0.55rem, env(safe-area-inset-right, 0px)) 0.15rem
      max(0.55rem, env(safe-area-inset-left, 0px));
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .pulse-kalshi-strip::-webkit-scrollbar {
    display: none;
  }

  .pulse-kalshi-strip[hidden] {
    display: none !important;
  }

  .pulse-kalshi-chip {
    flex: 0 0 auto;
    scroll-snap-align: start;
    display: grid;
    gap: 0.1rem;
    min-width: 6.5rem;
    padding: 0.4rem 0.65rem;
    border-radius: 8px;
    background: rgba(0, 255, 163, 0.08);
    border: 1px solid rgba(0, 255, 163, 0.22);
    color: var(--pulse-text);
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.15;
  }

  .pulse-kalshi-chip-match {
    color: var(--pulse-muted);
    font-weight: 600;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
  }

  .pulse-kalshi-chip-odds {
    color: var(--pulse-accent);
  }
}

/* Desktop: strip unused — rail already shows Game odds */
.pulse-kalshi-strip {
  display: none;
}

@media (max-width: 980px) {
  .pulse-kalshi-strip:not([hidden]) {
    display: flex;
  }
}

.pulse-embed-host .bet-cell-kalshi {
  border-color: rgba(0, 255, 163, 0.35);
}
.pulse-embed-host .bet-cell-kalshi .bet-k {
  color: var(--pulse-accent);
}
