:root{
  --ms-height: 46px;      /* ticker bar height */
  --ms-bg: #0b0b0e;
  --ms-fg: #fff;
  --ms-accent: #1FA774;
}

/* Ticker bar pinned to bottom */
#ms-live-ticker{
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: var(--ms-height);
  z-index: 2147483000;
  background: var(--ms-bg);
  color: var(--ms-fg);
  border-top: 2px solid var(--ms-accent);
  font: 14px/1.2 system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
}

/* Ticker lane (NO animation here) */
#ms-tape{
  position: relative;       /* block-level container */
  overflow: hidden;         /* clip the moving track */
  white-space: nowrap;
  padding: 0 12px;
  margin: 0;
}

/* Moving track (JS sets transform here only) */
#ms-tape .ms-track{
  display: inline-flex;
  gap: 0;
  margin: 0; padding: 0;
  white-space: nowrap;
  will-change: transform;
}

/* The copies inside the track */
#ms-tape .ms-track > span{
  display: inline-block;
  margin: 0; padding: 0;
}

/* Goal feed fixed directly above ticker */
#ms-goal-feed{
  position: fixed;
  left: 0; right: 0;
  bottom: var(--ms-height);
  z-index: 2147483001;      /* above ticker */
  background: #0b0b0e;
  color: #fff;
  padding: 6px 10px;
  border-top: 2px solid var(--ms-accent);
  box-shadow: 0 -2px 8px rgba(0,0,0,.25);
}

#ms-goal-feed ul{
  margin: 0; padding: 0; list-style: none;
  display: flex; flex-wrap: wrap; gap: .6rem .9rem; align-items: center;
}
#ms-goal-feed li{
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: .4rem;
  padding: .2rem .55rem;
}

/* Badges */
.ms-badge{ font-size:.75em; padding:.05rem .35rem; border-radius:.35rem; background:rgba(255,255,255,.18); }
.ms-badge.goal{ background:#2e7d32; color:#fff; }
.ms-badge.pen{ background:#00695c; color:#fff; }
.ms-badge.red{ background:#c62828; color:#fff; }
.ms-badge.second_yellow{ background:#ef6c00; color:#fff; }
.ms-badge.kickoff     { background:#1565c0; color:#fff; }
.ms-badge.halftime    { background:#00838f; color:#fff; }
.ms-badge.fulltime    { background:#4e342e; color:#fff; }
.ms-badge.own         { background:#4527a0; color:#fff; }
.ms-badge.var_no_goal { background:#c62828; color:#fff; }

#ms-goal-feed li.ms-cancelled { opacity:.7; text-decoration:line-through; }

.ms-min{ opacity:.8; margin-left:.25rem; }
/* ====== FINAL STABILITY PATCH ====== */

/* make sure #ms-tape is the clipping container */
#ms-tape {
  position: relative !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  width: 100vw !important;           /* always full window width */
  max-width: 100vw !important;
  display: block !important;
}

/* the inner moving track */
#ms-tape > div {
  display: inline-flex !important;
  align-items: center;
  will-change: transform;
  white-space: nowrap;
  min-width: 100%;                   /* prevent premature shrink */
}

/* each repeated copy of text */
#ms-tape span {
  display: inline-block;
  white-space: nowrap;
  padding-right: 40px;
}

/* prevent scrollbar flash */
html, body {
  overflow-x: hidden;
}

/* ensure background fills edge-to-edge */
#ms-live-ticker {
  left: 0;
  right: 0;
  width: 100vw;
  overflow: hidden;
  background: #0b0b0e;
}
#ms-live-ticker * {
  max-width: none !important;
}

