.form-switch .form-check-input {
  --sw-w: 2.125rem;
  --sw-h: 1.25rem;
  width: var(--sw-w) !important;
  height: var(--sw-h) !important;
  padding: 0 !important;
  border: 1px solid transparent !important;
  border-radius: 999px !important;
  background-color: #d9dfec !important;
  box-shadow: inset 0 1px 2px rgba(10, 26, 65, .08) !important;
  flex-shrink: 0;
  cursor: pointer;
  transition: background-color .2s var(--mbs-ease);
}
.form-switch .form-check-input:before {
  width: calc(var(--sw-h) - 6px) !important;
  height: calc(var(--sw-h) - 6px) !important;
  left: 2px;
  margin-left: 0 !important;
  background: #fff !important;
  box-shadow: 0 1px 2px rgba(10, 26, 65, .25) !important;
  transition: transform .2s var(--mbs-ease) !important;
}
.form-switch .form-check-input:checked { background-color: var(--mbs-lime-500) !important; }
.form-switch .form-check-input:checked:before { margin-left: 0 !important; transform: translateX(calc(var(--sw-w) - var(--sw-h))); }
/* =====================================================================
   My Baseball Stats — App Design System v2 ("Clean Diamond")
   Loaded after dist/css/app.css on every page. Presentation only:
   every class / id hook used by app.js and the ASP pages is untouched.
   Palette from the public site: navy · gold · lime · crimson · cream.
   Type: Inter (UI) + Oswald (display / numerals), self-hosted.
   ===================================================================== */

/* ---------- 0. Fonts (SIL OFL — see fonts/mbs/OFL.txt) -------------- */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/mbs/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/mbs/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/mbs/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/mbs/inter-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 800; font-display: swap; src: url('../fonts/mbs/inter-latin-800-normal.woff2') format('woff2'); }
@font-face { font-family: 'Oswald'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/mbs/oswald-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Oswald'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/mbs/oswald-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Oswald'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/mbs/oswald-latin-700-normal.woff2') format('woff2'); }

/* ---------- 1. Tokens ------------------------------------------------ */
:root {
  --color-primary: 14 34 84;
  --color-secondary: 230 234 243;
  --color-success: 138 203 69;
  --color-info: 77 103 172;
  --color-warning: 242 146 26;
  --color-pending: 219 115 17;
  --color-danger: 220 38 38;
  --color-light: 241 244 250;
  --color-dark: 10 26 65;
  --color-slate-50: 248 249 252;
  --color-slate-100: 242 244 249;
  --color-slate-200: 229 233 242;
  --color-slate-300: 203 211 228;
  --color-slate-400: 146 158 188;
  --color-slate-500: 98 111 145;
  --color-slate-600: 72 86 122;
  --color-slate-700: 51 68 103;
  --color-slate-800: 21 38 87;
  --color-slate-900: 10 26 65;

  --mbs-navy-950: #060f28;
  --mbs-navy-900: #0a1a41;
  --mbs-navy-800: #0E2254;
  --mbs-navy-700: #152657;
  --mbs-navy-600: #1b2f6b;
  --mbs-navy-500: #2c4488;
  --mbs-navy-400: #4d67ac;
  --mbs-navy-300: #7f93cb;
  --mbs-navy-200: #aebbdf;
  --mbs-navy-100: #d6ddef;
  --mbs-navy-50:  #eef1f8;
  --mbs-gold-600: #db7311;
  --mbs-gold-500: #f2921a;
  --mbs-gold-400: #ffa61f;
  --mbs-gold-100: #ffedc7;
  --mbs-gold-50:  #fff8ec;
  --mbs-lime-700: #4d7c0f;
  --mbs-lime-500: #8acb45;
  --mbs-lime-400: #a6dd5c;
  --mbs-lime-300: #b8e680;
  --mbs-lime-100: #dcefc0;
  --mbs-lime-50:  #f3fae8;
  --mbs-gold-btn: #ffb547;
  --mbs-gold-btn-hover: #ffc266;
  --mbs-red-btn: #e5484d;
  --mbs-red-btn-hover: #d63c41;
  --mbs-crimson:  #DC2626;
  --mbs-crimson-600: #c41f1f;

  --mbs-canvas:   #F4F6FB;
  --mbs-card:     #FFFFFF;
  --mbs-line:     #E6EAF2;
  --mbs-line-strong: #D5DCEA;
  --mbs-text:     #13224d;
  --mbs-muted:    #64708f;
  --mbs-faint:    #98a2bd;

  --mbs-radius-sm: .5rem;
  --mbs-radius:    .75rem;
  --mbs-radius-lg: 1rem;
  --mbs-radius-xl: 1.375rem;
  --mbs-shadow-xs: 0 1px 2px rgba(16, 24, 48, .05);
  --mbs-shadow:    0 1px 2px rgba(16, 24, 48, .04), 0 1px 3px rgba(16, 24, 48, .04);
  --mbs-shadow-md: 0 2px 4px rgba(16, 24, 48, .04), 0 12px 28px -12px rgba(16, 24, 48, .18);
  --mbs-shadow-lg: 0 24px 64px -20px rgba(6, 15, 40, .40);
  --mbs-ease: cubic-bezier(.2, .7, .2, 1);

  --mbs-sidebar: 16.5rem;
  --mbs-appbar: 4rem;
  --mbs-gutter: 2rem;

  --mbs-font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mbs-display: 'Oswald', 'Inter', sans-serif;
  --mbs-stitch: radial-gradient(circle, rgba(255, 255, 255, .06) 1.2px, transparent 1.3px);
}

/* ---------- 2. Base & large-screen scaling --------------------------- */
html { font-size: 16px; }
/* The template is rem-based, so this scales the whole UI on 2K / 4K. */
@media (min-width: 2200px) { html { font-size: 17px; } }
@media (min-width: 2500px) { html { font-size: 18px; } }
@media (min-width: 3000px) { html { font-size: 20px; } }
@media (min-width: 3600px) { html { font-size: 23px; } }

html, html body {
  font-family: var(--mbs-font);
  color: var(--mbs-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body { letter-spacing: -0.006em; font-size: .875rem; line-height: 1.45; }
::selection { background: var(--mbs-gold-100); color: var(--mbs-navy-900); }
a:focus-visible, button:focus-visible, .btn:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--mbs-gold-500);
  outline-offset: 2px;
}

/* Remove the template's staggered fly-in animations (pages looked
   blank / broken for up to a second while they played). */
.intro-x, .-intro-x, .intro-y, .-intro-y,
.wrapper .wrapper-box, .top-nav, .top-nav > ul > li > a {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
}
@keyframes mbs-fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.content { animation: mbs-fade-in .35s var(--mbs-ease) both; }

/* Display type */
.content h2.text-primary,
.content h2.text-lg.font-medium,
.content h2.text-2xl,
.content h2.text-xl,
.content h3.text-lg.font-medium,
.modal h2.font-medium,
.modal .modal-header h2,
.login h2.font-bold {
  font-family: var(--mbs-display);
  font-weight: 500;
  letter-spacing: .015em;
  color: var(--mbs-navy-800);
}
.content h2.text-2xl { font-size: 1.4rem; line-height: 1.85rem; }
.content h2.text-lg.text-primary { font-size: 1.1rem; line-height: 1.5rem; }
/* Page title = first heading row of the page */
.content > .grid > div > .grid > div:first-child h2.text-lg.text-primary,
.content > .grid > div > .grid > div:first-child h2.text-2xl { font-size: 1.45rem; line-height: 1.9rem; }
.content > .intro-y.flex:first-child { margin-left: 0 !important; margin-right: 0 !important; padding-left: 0 !important; }
.content > .intro-y.flex:first-child > h2.text-lg.text-primary { font-size: 1.45rem; line-height: 1.9rem; margin-left: 0 !important; padding-left: 0 !important; }
.font-bold { font-weight: 600 !important; }
strong, b { font-weight: 600; }
.text-base { font-size: .9rem; }
.font-medium { font-weight: 500; }
.font-display { font-family: var(--mbs-display); }

/* ---------- 3. App shell --------------------------------------------- */
body.main {
  background: var(--mbs-canvas) !important;
  background-image: none !important;
  padding: 0 !important;
  min-height: 100vh;
}
body.main::before, body.main::after { display: none !important; }

.wrapper { position: relative; z-index: 1; padding: 1.75rem var(--mbs-gutter) 2rem; }
.wrapper .wrapper-box,
.wrapper.wrapper--top-nav .wrapper-box {
  display: block;
  background: transparent !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
}
.wrapper .wrapper-box::before { display: none !important; }
.content {
  max-width: 120rem;
  margin: 0 auto;
  min-height: 0;
  background: transparent !important;
  border-radius: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
}
.content:before { display: none; }

/* Footer (scripts/footer.asp) — aligned to the content's left edge */
.mbs-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: .35rem .6rem;
  max-width: calc(120rem + 2 * var(--mbs-gutter));
  margin: 0 auto;
  padding: 1.25rem var(--mbs-gutter) 1.75rem;
  font-size: .75rem;
  color: var(--mbs-faint);
}
.wrapper .mbs-footer { max-width: 120rem; padding: 1.25rem 0 0; margin-top: 2.5rem; border-top: 1px solid var(--mbs-line); }
body > .mbs-footer { position: relative; }
body > .mbs-footer::before {
  content: ""; position: absolute; top: 0; left: var(--mbs-gutter); right: var(--mbs-gutter);
  border-top: 1px solid var(--mbs-line);
}
.mbs-footer__links { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .35rem .6rem; }
.mbs-footer__sep { color: var(--mbs-line-strong); }
.mbs-footer a { color: var(--mbs-muted); font-weight: 500; transition: color .15s; }
.mbs-footer a:hover { color: var(--mbs-navy-800); }
.mbs-footer__build { color: var(--mbs-faint); }
.mbs-footer__build strong { font-weight: 500; color: var(--mbs-muted); }
@media (pointer: coarse) and (orientation: portrait), (pointer: coarse) and (max-height: 600px) { .mbs-footer__links { flex-basis: 100%; } }

/* App bar */
.top-bar-boxed {
  position: sticky !important;
  top: 0;
  z-index: 50 !important;
  height: var(--mbs-appbar) !important;
  margin: 0 !important;
  padding: 0 var(--mbs-gutter) !important;
  background: rgba(244, 246, 251, .82);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--mbs-line);
}
.top-bar-boxed > .h-full { gap: 1rem; }
.top-bar-boxed > .h-full > a:first-child { display: none !important; }
.top-bar-boxed .DesktopView.text-warning { margin: 0 !important; font-size: .75rem !important; }
.top-bar-boxed .text-warning strong,
.mobile-menu-bar .text-warning strong {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .3rem .7rem;
  border-radius: 999px;
  background: var(--mbs-gold-50);
  border: 1px solid #ffd98a;
  color: #924417;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.top-bar-boxed .text-warning strong::before,
.mobile-menu-bar .text-warning strong::before {
  content: ""; width: .45rem; height: .45rem; border-radius: 50%;
  background: var(--mbs-gold-500); box-shadow: 0 0 0 3px rgba(242, 146, 26, .2);
}

/* Avatar + account dropdown */
.top-bar-boxed .dropdown.w-8 { width: 2.5rem; height: 2.5rem; margin-left: auto; }
.top-bar-boxed .dropdown-toggle {
  width: 2.5rem !important;
  height: 2.5rem !important;
  transform: none !important;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--mbs-navy-100) !important;
  transition: box-shadow .2s var(--mbs-ease);
}
.top-bar-boxed .dropdown-toggle:hover { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--mbs-gold-500) !important; }
.dropdown-menu .dropdown-content {
  border-radius: var(--mbs-radius) !important;
  padding: .4rem !important;
  box-shadow: var(--mbs-shadow-lg) !important;
  border: 1px solid var(--mbs-line);
}
.top-bar-boxed .dropdown-menu { width: 16rem !important; }
.top-bar-boxed .dropdown-menu .dropdown-content,
.dropdown-content.bg-primary\/80 { background: #fff !important; color: var(--mbs-text) !important; }
.dropdown-content.bg-primary\/80::before { display: none !important; }
.dropdown-content.bg-primary\/80 > li:first-child { padding: .75rem .75rem .6rem !important; }
.dropdown-content.bg-primary\/80 .font-medium { font-weight: 600; color: var(--mbs-navy-900); }
.dropdown-content.bg-primary\/80 .text-white\/60 { color: var(--mbs-muted) !important; }
.dropdown-content.bg-primary\/80 .text-success { color: var(--mbs-lime-300) !important; font-weight: 400 !important; }
.dropdown-content.bg-primary\/80 > li:first-child .flex.text-xs { font-weight: 400 !important; font-size: .75rem; align-items: center; margin-top: .3rem; }
.dropdown-content.bg-primary\/80 > li:first-child .flex.text-xs svg { width: .85rem; height: .85rem; margin-right: .4rem; }
.dropdown-content.bg-primary\/80 .dropdown-item { font-size: .8rem; padding: .45rem .7rem !important; }
.dropdown-content.bg-primary\/80 .dropdown-item svg { width: .9rem !important; height: .9rem !important; }
.dropdown-content.bg-primary\/80 .dropdown-divider { border-color: var(--mbs-line) !important; margin: .3rem 0; }
.dropdown-content.bg-primary\/80 .dropdown-item { color: var(--mbs-navy-700) !important; }
.top-bar-boxed .dropdown-menu .dropdown-content::before { display: none !important; }
.top-bar-boxed .dropdown-menu .dropdown-content > li:first-child { padding: .75rem .75rem .6rem !important; }
.top-bar-boxed .dropdown-menu .dropdown-content .font-medium { font-weight: 600; color: var(--mbs-navy-900); }
.top-bar-boxed .dropdown-menu .dropdown-content .text-white\/60 { color: var(--mbs-muted) !important; }
.top-bar-boxed .dropdown-menu .dropdown-content .text-success { color: var(--mbs-lime-700) !important; font-weight: 600; }
.top-bar-boxed .dropdown-divider { border-color: var(--mbs-line) !important; margin: .3rem 0; }
.dropdown-item {
  border-radius: var(--mbs-radius-sm) !important;
  padding: .55rem .75rem !important;
  font-weight: 500;
  color: var(--mbs-navy-700);
  transition: background .15s, color .15s;
}
.top-bar-boxed .dropdown-item:hover,
.dropdown-item:hover { background: var(--mbs-navy-50) !important; color: var(--mbs-navy-900); }
.dropdown-item svg { color: var(--mbs-navy-400); }

/* Player / team context (shared) */
#playername1, #teamname1, #playername2, #teamname2 { align-items: center; }
#playername1 > div, #teamname1 > div, #playername2 > div, #teamname2 > div {
  display: flex; align-items: center; gap: .4rem; margin: 0 !important; min-width: 0;
}
#playername1 button, #teamname1 button, #playername2 button, #teamname2 button,
button[title="Switch Player"], button[title="Switch Team"] {
  width: auto !important;
  height: 1.6rem !important;
  margin: 0 0 0 auto !important;
  padding: 0 .65rem !important;
  border-radius: 999px !important;
  font-size: .66rem !important;
  font-weight: 700 !important;
  letter-spacing: .06em;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* Display modes. Mobile mode is for phones (any orientation) and tablets in
   portrait; everything else, including tablets in landscape and narrow
   desktop windows, gets desktop mode:
     mobile  = (pointer: coarse) and (orientation: portrait),
               (pointer: coarse) and (max-height: 600px)
     desktop = (pointer: fine), (pointer: none),
               (pointer: coarse) and (orientation: landscape) and (min-height: 601px)
   scripts/mobile-panel-dock.asp uses the same mobile query. */
@media (pointer: fine), (pointer: none), (pointer: coarse) and (orientation: landscape) and (min-height: 601px) {
  .DesktopView { display: inline; }
  .MobileView { display: none; }
}

/* ---- 3a. Desktop mode: computers and tablets in landscape ----------- */
.mbs-brand { display: none; }
@media (pointer: fine), (pointer: none), (pointer: coarse) and (orientation: landscape) and (min-height: 601px) {
  body.main { padding-left: var(--mbs-sidebar) !important; }
  .mobile-menu { display: none !important; }
  .top-bar-boxed nav.MobileView { display: none !important; }

  .top-nav {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    position: fixed !important;
    z-index: 60 !important;
    inset: 0 auto 0 0;
    width: var(--mbs-sidebar);
    margin: 0 !important;
    padding: 0 0 1rem !important;
    background:
      var(--mbs-stitch) 0 0 / 1.1rem 1.1rem,
      radial-gradient(28rem 18rem at 0% 0%, rgba(77, 103, 172, .35), transparent 70%),
      linear-gradient(180deg, var(--mbs-navy-900) 0%, var(--mbs-navy-950) 100%);
    border-right: 1px solid rgba(255, 255, 255, .06);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .15) transparent;
  }
  .mbs-brand {
    display: flex;
    align-items: center;
    height: var(--mbs-appbar);
    padding: 0 1.4rem;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
  }
  .mbs-brand img { height: 2.35rem; width: auto; }

  .top-nav > ul {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 1px;
    padding: 1rem .75rem;
  }
  .top-nav > ul li { position: relative; }
  .top-nav > ul li .top-menu,
  .top-nav > ul li ul li .top-menu {
    height: 2.5rem;
    margin: 0 !important;
    padding: 0 .75rem !important;
    border-radius: var(--mbs-radius-sm);
    color: rgba(226, 232, 248, .72) !important;
    font-weight: 400;
    font-size: .8125rem;
    background: transparent;
    box-shadow: none;
    transition: background .15s, color .15s;
  }
  .top-nav > ul li .top-menu .top-menu__icon { color: rgba(174, 187, 223, .75); }
  .top-nav > ul li .top-menu .top-menu__icon svg { width: 1.1rem; height: 1.1rem; }
  .top-nav > ul li .top-menu .top-menu__title { margin-left: .75rem; width: 100%; }
  .top-nav > ul li .top-menu:hover { background: rgba(255, 255, 255, .06); color: #fff !important; }
  .top-nav > ul li .top-menu:hover .top-menu__icon { color: #fff; }
  .top-nav > ul li .top-menu .top-menu__sub-icon { display: none !important; }

  /* Groups with children render as an always-open section */
  .top-nav > ul > li:has(> ul) { margin-top: .9rem; }
  .top-nav > ul > li:first-child:has(> ul) { margin-top: 0; }
  .top-nav > ul > li:has(> ul) > .top-menu {
    height: 1.9rem;
    pointer-events: none;
    color: rgba(174, 187, 223, .55) !important;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    background: transparent !important;
  }
  .top-nav > ul > li:has(> ul) > .top-menu .top-menu__icon { display: none; }
  .top-nav > ul > li:has(> ul) > .top-menu .top-menu__title { margin-left: 0; }
  .top-nav > ul > li:has(> ul) > .top-menu.top-menu--active { color: var(--mbs-gold-400) !important; }
  .top-nav > ul > li:has(> ul) > .top-menu.top-menu--active::before { display: none !important; }

  .top-nav > ul li ul,
  .top-nav > ul li:hover > ul {
    display: block !important;
    position: static;
    width: auto;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .top-nav > ul li ul::before, .top-nav > ul li ul::after { display: none !important; }
  .top-nav > ul li ul li { padding: 0; margin-bottom: 1px; }

  /* Active page */
  .top-nav > ul li ul li > .top-menu.top-menu--active,
  .top-nav > ul > li:not(:has(> ul)) > .top-menu.top-menu--active {
    background: rgba(255, 255, 255, .1) !important;
    color: #fff !important;
    font-weight: 500;
  }
  .top-nav > ul li ul li > .top-menu.top-menu--active::before,
  .top-nav > ul > li:not(:has(> ul)) > .top-menu.top-menu--active::before {
    content: "";
    display: block;
    position: absolute;
    top: .55rem; bottom: .55rem; left: -.75rem; right: auto;
    width: 3px;
    border: 0;
    border-radius: 0 3px 3px 0;
    background: var(--mbs-gold-500);
  }
  .top-nav > ul li ul li > .top-menu.top-menu--active .top-menu__icon,
  .top-nav > ul > li:not(:has(> ul)) > .top-menu.top-menu--active .top-menu__icon { color: var(--mbs-gold-400) !important; }
  .top-nav > ul li .top-menu.top-menu--active::after { display: none !important; }
  .top-nav .top-menu__icon.text-success { color: var(--mbs-lime-300) !important; }

  /* Player / team context pinned to the bottom of the sidebar */
  .top-nav > .ml-auto {
    margin: auto .75rem 0 !important;
    padding: .85rem;
    border-radius: var(--mbs-radius);
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .08);
    flex-shrink: 0;
  }
  .top-nav > .ml-auto > .flex { flex-direction: column; gap: .75rem; }
  .top-nav > .ml-auto form { width: 100%; }
  .top-nav > .ml-auto .text-white,
  .top-nav > .ml-auto .text-base { color: #fff !important; font-size: .82rem !important; line-height: 1.25rem; }
  .top-nav > .ml-auto #playername2 > div > span,
  .top-nav > .ml-auto #teamname2 > div > span { display: flex; flex-direction: column; min-width: 0; }
  .top-nav > .ml-auto .font-medium.text-base.text-white {
    color: rgba(174, 187, 223, .7) !important;
    font-size: .62rem !important;
    font-weight: 700 !important;
    letter-spacing: .12em;
    text-transform: uppercase;
  }
  .top-nav > .ml-auto #playername2 > div,
  .top-nav > .ml-auto #teamname2 > div { width: 100%; }
  .top-nav > .ml-auto #playerdropdown2,
  .top-nav > .ml-auto #teamdropdown2 { flex-direction: column; gap: .35rem; }
  .top-nav > .ml-auto #playerdropdown2 > div,
  .top-nav > .ml-auto #teamdropdown2 > div { width: 100% !important; margin: 0 !important; }
  .top-nav > .ml-auto .form-control { width: 100%; min-width: 0 !important; font-size: .82rem; padding: .45rem .65rem; }
}

/* ---- 3b. Phone / tablet (< 1280px) ---------------------------------- */
@media (pointer: coarse) and (orientation: portrait), (pointer: coarse) and (max-height: 600px) {
  :root { --mbs-gutter: 1.25rem; }
  body.main { padding-top: var(--mbs-appbar) !important; }
  .top-nav { display: none !important; }
  .mobile-menu {
    display: block !important;
    position: fixed !important;
    z-index: 60 !important;
    top: 0; left: 0; right: 0;
    width: 100%;
    margin: 0 !important;
    background: rgba(255, 255, 255, .9) !important;
    -webkit-backdrop-filter: saturate(1.6) blur(14px);
    backdrop-filter: saturate(1.6) blur(14px);
    border-bottom: 1px solid var(--mbs-line) !important;
  }
  .mobile-menu .mobile-menu-bar { height: var(--mbs-appbar); padding: 0 var(--mbs-gutter); gap: .75rem; }
  .mobile-menu .mobile-menu-bar > a:first-child img { height: 2.1rem !important; width: auto; }
  .mobile-menu .mobile-menu-bar .MobileView.text-warning { margin: 0 !important; font-size: .7rem !important; }
  .mobile-menu .mobile-menu-bar > .mobile-menu-toggler {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2.75rem; height: 2.75rem; border-radius: var(--mbs-radius);
    background: var(--mbs-navy-800);
    box-shadow: var(--mbs-shadow-xs);
  }
  .mobile-menu .mobile-menu-bar > .mobile-menu-toggler svg { width: 1.35rem; height: 1.35rem; color: #fff !important; }

  /* Drawer */
  .mobile-menu .scrollable {
    width: min(20rem, 86vw);
    background:
      var(--mbs-stitch) 0 0 / 1.1rem 1.1rem,
      linear-gradient(180deg, var(--mbs-navy-900), var(--mbs-navy-950)) !important;
    box-shadow: 24px 0 60px -20px rgba(0, 0, 0, .55);
    padding-top: 4.5rem;
  }
  .mobile-menu .scrollable::before {
    content: "";
    position: absolute; top: 1.15rem; left: 1.5rem;
    width: 9.5rem; height: 2.3rem;
    background: url('../images/my-baseball-stats-logo.png') left center / contain no-repeat;
  }
  .mobile-menu:before { background: rgba(6, 15, 40, .55) !important; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
  .mobile-menu .scrollable .mobile-menu-toggler { margin: 1rem 1rem 0 0; }
  .mobile-menu .scrollable .mobile-menu-toggler svg { color: rgba(255, 255, 255, .8); }
  .mobile-menu .menu {
    height: 2.9rem;
    margin: 1px .75rem;
    padding: 0 .85rem;
    border-radius: var(--mbs-radius-sm);
    color: rgba(226, 232, 248, .8);
    font-weight: 500;
  }
  .mobile-menu .menu:hover { background: rgba(255, 255, 255, .06); color: #fff; }
  .mobile-menu .menu.menu--active { background: rgba(255, 255, 255, .1); color: #fff; font-weight: 600; }
  .mobile-menu .menu.menu--active .menu__icon { color: var(--mbs-gold-400); }
  .mobile-menu .menu .menu__icon { color: rgba(174, 187, 223, .8); }
  .mobile-menu .menu .menu__icon svg { width: 1.15rem; height: 1.15rem; }
  .mobile-menu ul li ul { margin: .1rem .75rem .4rem 1.6rem; background: transparent; border-left: 1px solid rgba(255, 255, 255, .1); border-radius: 0; padding: 0; }
  .mobile-menu ul li ul .menu { margin: 1px 0 1px .5rem; height: 2.6rem; }
  .mobile-menu .menu__devider { margin: .6rem 1.5rem; width: auto; background: rgba(255, 255, 255, .08); }

  /* Context row (player / team / avatar) */
  .top-bar-boxed {
    position: relative !important;
    height: auto !important;
    padding: 1rem var(--mbs-gutter) 0 !important;
    background: transparent;
    -webkit-backdrop-filter: none; backdrop-filter: none;
    border-bottom: 0;
  }
  .top-bar-boxed > .h-full { align-items: flex-start; }
  .top-bar-boxed nav.MobileView { display: block; flex: 1; min-width: 0; height: auto !important; margin: 0 !important; }
  .top-bar-boxed nav.MobileView > div { display: flex; flex-wrap: wrap; gap: .5rem; }
  .top-bar-boxed nav .mt-6, .top-bar-boxed nav .mt-3, .top-bar-boxed nav .mt-1 { margin-top: 0 !important; }
  .top-bar-boxed nav .mr-4, .top-bar-boxed nav .mr-6 { margin-right: 0 !important; }
  .top-bar-boxed nav .text-white { color: var(--mbs-navy-800) !important; font-weight: 600; }
  #playername1, #teamname1 {
    display: inline-flex;
    max-width: 100%;
    padding: .3rem .3rem .3rem .85rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--mbs-line);
    box-shadow: var(--mbs-shadow-xs);
  }
  .top-bar-boxed nav.MobileView form { max-width: 100%; min-width: 0; }
  #playername1 > div, #teamname1 > div { max-width: 100%; }
  #playername1 span, #teamname1 span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #playerdropdown1, #teamdropdown1 { gap: .5rem; align-items: center; }
  #playerdropdown1 .form-control, #teamdropdown1 .form-control { min-width: 14rem; }
  .top-bar-boxed .DesktopView.text-warning { display: none !important; }
  .wrapper { padding-top: 1.1rem; }
}
@media (max-width: 639px) {
  :root { --mbs-gutter: .9rem; }
  .mobile-menu .mobile-menu-bar .text-warning strong { font-size: .58rem; padding: .25rem .55rem; letter-spacing: .05em; }
  .mobile-menu .mobile-menu-bar .text-warning strong::before { display: none; }
  .top-bar-boxed .dropdown.w-8, .top-bar-boxed .dropdown-toggle { width: 2.25rem !important; height: 2.25rem !important; }
}

/* ---- 3c. Pages without the app menu (onboarding, shared dashboard) --- */
body.main:not(:has(> .top-nav > ul)) { padding-left: 0 !important; padding-top: 0 !important; }
body.main:not(:has(> .top-nav > ul)) > .top-nav { display: none !important; }
body.main:not(:has(> .top-nav > ul)) > .mobile-menu {
  display: block !important;
  position: static !important;
  background:
    var(--mbs-stitch) 0 0 / 1.1rem 1.1rem,
    linear-gradient(180deg, var(--mbs-navy-900), var(--mbs-navy-800)) !important;
  border-bottom: 0 !important;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
body.main:not(:has(> .top-nav > ul)) > .mobile-menu {
  width: min(120rem, calc(100% - 2 * var(--mbs-gutter)));
  margin: 1.25rem auto 0 !important;
  padding: 0 !important;
  border-radius: var(--mbs-radius-lg, 1rem);
  box-shadow: 0 10px 30px -12px rgba(10, 26, 65, .35);
  overflow: hidden;
}
body.main:not(:has(> .top-nav > ul)) > .mobile-menu .mobile-menu-bar {
  display: flex; align-items: center;
  height: calc(var(--mbs-appbar) + 1rem) !important;
  margin: 0 !important;
  padding: 0 1.75rem !important;
  border: 0 !important;
}
body.main:not(:has(> .top-nav > ul)) > .mobile-menu .mobile-menu-bar > a { display: flex; align-items: center; margin: 0 !important; }
body.main:not(:has(> .top-nav > ul)) > .mobile-menu .mobile-menu-bar img { height: 2.6rem !important; width: auto; display: block; }
body.main:not(:has(> .top-nav > ul)):has(> .mobile-menu) { display: flow-root; }
body.main:not(:has(> .top-nav > ul)):not(:has(.top-bar-boxed)) > .wrapper { padding-top: 2rem; }
@media (max-width: 639px) {
  body.main:not(:has(> .top-nav > ul)) > .mobile-menu { margin-top: .9rem !important; }
  body.main:not(:has(> .top-nav > ul)) > .mobile-menu .mobile-menu-bar { height: var(--mbs-appbar) !important; padding: 0 1.1rem !important; }
  body.main:not(:has(> .top-nav > ul)) > .mobile-menu .mobile-menu-bar img { height: 2.2rem !important; }
  body.main:not(:has(> .top-nav > ul)):not(:has(.top-bar-boxed)) > .wrapper { padding-top: 1.5rem; }
}
body.main:not(:has(> .top-nav > ul)) .top-bar-boxed {
  position: relative !important;
  height: auto !important;
  padding: 1rem var(--mbs-gutter) 0 !important;
  background: transparent;
  border: 0;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
body.main:not(:has(> .top-nav > ul)) .top-bar-boxed nav.MobileView { display: block !important; }
body.main:not(:has(> .top-nav > ul)) .top-bar-boxed nav .text-white { color: var(--mbs-navy-800) !important; }
body.main:not(:has(> .top-nav > ul)) #teamname1 {
  display: inline-flex; padding: .45rem 1rem; border-radius: 999px;
  background: #fff; border: 1px solid var(--mbs-line); box-shadow: var(--mbs-shadow-xs);
}
body.main:not(:has(> .top-nav > ul)) #teamname1 > div { margin: 0 !important; }
/* No mobile menu either: the page's own top bar becomes the brand bar */
body.main:not(:has(> .top-nav)):not(:has(> .mobile-menu)) .top-bar-boxed {
  height: var(--mbs-appbar) !important;
  margin: 0 !important;
  padding: 0 var(--mbs-gutter) !important;
  background:
    var(--mbs-stitch) 0 0 / 1.1rem 1.1rem,
    linear-gradient(180deg, var(--mbs-navy-900), var(--mbs-navy-800));
}
body.main:not(:has(> .top-nav)):not(:has(> .mobile-menu)) .top-bar-boxed > .h-full > a:first-child { display: flex !important; margin: 0 !important; }
body.main:not(:has(> .top-nav)):not(:has(> .mobile-menu)) .top-bar-boxed img { height: 2.3rem !important; margin: 0 !important; }

/* ---------- 4. Profile side menu (scripts/side-menu.asp) -------------- */
.mbs-side-menu .box { overflow: hidden; }
.mbs-side-menu .box > .relative.flex {
  padding: 1.25rem;
  background: linear-gradient(135deg, var(--mbs-navy-50), #fff 70%);
  border-bottom: 1px solid var(--mbs-line);
}
.mbs-side-menu .box > .relative.flex .font-medium.text-base { font-weight: 600; color: var(--mbs-navy-900); }
.mbs-side-menu .box > .relative.flex .text-success { font-size: .68rem; font-weight: 700; letter-spacing: .06em; }
.mbs-side-menu .box > .p-5 { padding: .5rem !important; border-color: var(--mbs-line) !important; }
.mbs-side-link {
  margin-top: 1px !important;
  padding: .6rem .75rem;
  border-radius: var(--mbs-radius-sm);
  color: var(--mbs-navy-700);
  font-weight: 500;
  transition: background .15s, color .15s;
}
.mbs-side-link:hover { background: var(--mbs-navy-50); color: var(--mbs-navy-900); }
.mbs-side-link svg { color: var(--mbs-navy-300); }
.mbs-side-link.text-primary { background: var(--mbs-navy-50); color: var(--mbs-navy-900) !important; font-weight: 600; box-shadow: none; }
.mbs-side-link.text-primary svg { color: var(--mbs-gold-600); }

/* ---------- 5. Cards ------------------------------------------------- */
.box {
  background: var(--mbs-card);
  border: 1px solid var(--mbs-line) !important;
  border-radius: var(--mbs-radius-lg) !important;
  box-shadow: var(--mbs-shadow) !important;
}
.report-box:before { display: none !important; }
.zoom-in, .zoom-in:hover { transform: none !important; }
.report-box .box { transition: box-shadow .2s var(--mbs-ease), border-color .2s, transform .2s var(--mbs-ease); }
.report-box:hover .box { box-shadow: var(--mbs-shadow-md) !important; border-color: var(--mbs-line-strong) !important; transform: translateY(-2px); }
.report-box .box h2.text-lg {
  font-family: var(--mbs-font) !important;
  font-size: .72rem !important;
  line-height: 1.1rem;
  font-weight: 700 !important;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--mbs-muted) !important;
}
.report-box .text-3xl,
.box .text-3xl.font-medium,
[id^="chart-"][id*="-total"] {
  font-family: var(--mbs-display);
  font-weight: 500;
  letter-spacing: .01em;
  color: var(--mbs-navy-900);
}
.report-box .text-3xl { font-size: 2.35rem; line-height: 1.05; }
[id^="chart-"][id*="-total"] { font-size: 1.5rem !important; line-height: 1.8rem; }
.widget-tickers { color: var(--mbs-muted) !important; font-weight: 500; font-size: .8rem !important; }
.border-dashed.border-slate-200 { border-color: var(--mbs-line) !important; border-style: solid !important; }
.box:has(#season-field-image-frame) { padding-top: 3.5rem !important; }
.box:has(#season-field-image-frame) > .DesktopView[style*="absolute"] { top: 1.1rem; left: 1.25rem; }

/* Fixed-pixel chart heights -> rem so charts scale on 2K / 4K */
.report-chart .h-\[275px\] { height: 17.2rem !important; }
.report-chart .h-\[290px\] { height: 18.1rem !important; }
.report-chart .h-\[300px\] { height: 18.75rem !important; }

/* Stat-card tickers must stay inside their card */
.report-box .box { overflow: hidden; }

/* Virtual Coach: search bar flows in the page instead of floating over the intro */
@media (pointer: fine), (pointer: none), (pointer: coarse) and (orientation: landscape) and (min-height: 601px) { .content > .DesktopView:has(#searchform) { display: block; } }
.content > .DesktopView:has(#searchform) > .absolute {
  position: static !important;
  margin: 0 0 -2.5rem !important;
  justify-content: flex-end;
}
.content > .DesktopView:has(#searchform) > .absolute > .mx-auto { margin-right: 0; position: relative; z-index: 2; }

/* ---------- 6. Page header rows ------------------------------------- */
.content .intro-y.flex.items-center.h-10 { gap: .75rem; }
.content .intro-y.flex.items-center.h-10 > h2.truncate { overflow: visible; flex-shrink: 0; }
/* Phones draw a grey tap-highlight box over whatever is tapped; on the
   switch rows it covered the switch and part of its label. */
html { -webkit-tap-highlight-color: transparent; }
.form-check, .form-check *, .form-switch label, .btn, a { -webkit-tap-highlight-color: transparent; }
.content .form-switch .form-check-label { white-space: nowrap; }
.form-check.form-switch > form { display: flex; align-items: center; gap: .55rem; }
.form-check.form-switch > form .form-check-label { margin-left: 0; }

/* ---------- 7. Buttons ----------------------------------------------- */
.btn {
  border-radius: var(--mbs-radius-sm) !important;
  font-weight: 500;
  font-size: .8125rem;
  line-height: 1.25rem;
  padding: .45rem .9rem;
  white-space: nowrap;
  box-shadow: var(--mbs-shadow-xs);
  transition: background-color .15s var(--mbs-ease), border-color .15s, color .15s, box-shadow .15s, transform .1s;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:focus { --tw-ring-color: rgb(242 146 26 / .3); }
.btn-sm { padding: .3rem .6rem; font-size: .75rem; }
.btn svg { width: 1rem; height: 1rem; }
.btn-lg { padding: .7rem 1.25rem; }
.btn.w-44 { width: auto !important; min-width: 10rem; }
.btn svg.lucide, .btn i[data-lucide] { stroke-width: 2; }

.btn-primary { background-color: var(--mbs-navy-800) !important; border-color: var(--mbs-navy-800) !important; color: #fff !important; }
.btn-primary:hover:not(:disabled) { background-color: var(--mbs-navy-600) !important; border-color: var(--mbs-navy-600) !important; }
.btn-success { background-color: var(--mbs-lime-400) !important; border-color: var(--mbs-lime-400) !important; color: var(--mbs-navy-900) !important; }
.btn-success.text-white, .btn-success .text-white { color: var(--mbs-navy-900) !important; }
.btn-success:hover:not(:disabled) { background-color: var(--mbs-lime-300) !important; border-color: var(--mbs-lime-300) !important; }
.btn-warning, .btn-pending { background-color: var(--mbs-gold-btn) !important; border-color: var(--mbs-gold-btn) !important; color: var(--mbs-navy-900) !important; }
.btn-warning:hover:not(:disabled), .btn-pending:hover:not(:disabled) { background-color: var(--mbs-gold-btn-hover) !important; border-color: var(--mbs-gold-btn-hover) !important; }
.btn-danger { background-color: var(--mbs-red-btn) !important; border-color: var(--mbs-red-btn) !important; color: #fff !important; }
.btn-danger:hover:not(:disabled) { background-color: var(--mbs-red-btn-hover) !important; border-color: var(--mbs-red-btn-hover) !important; }
.btn-secondary, .btn-secondary.text-white { background-color: #fff !important; border-color: var(--mbs-line-strong) !important; color: var(--mbs-navy-700) !important; }
.btn-secondary:hover:not(:disabled) { background-color: var(--mbs-navy-50) !important; }
.btn-dark { background-color: var(--mbs-navy-900) !important; border-color: var(--mbs-navy-900) !important; color: #fff !important; }
.btn-outline-secondary { background: #fff; border-color: var(--mbs-line-strong) !important; color: var(--mbs-navy-700) !important; }
.btn-outline-secondary:hover:not(:disabled) { background: var(--mbs-navy-50) !important; }
.btn-outline-primary { border-color: var(--mbs-navy-800) !important; color: var(--mbs-navy-800) !important; background: #fff; }
.btn-outline-primary:hover:not(:disabled) { background: var(--mbs-navy-50) !important; }
.btn-outline-success { border-color: var(--mbs-lime-300) !important; color: var(--mbs-lime-700) !important; background: #fff; }
.btn-outline-success:hover:not(:disabled) { background: var(--mbs-lime-50) !important; border-color: var(--mbs-lime-500) !important; }
.btn-outline-warning, .btn-outline-pending { border-color: #ffd98a !important; color: #b55712 !important; background: #fff; }
.btn-outline-warning:hover:not(:disabled), .btn-outline-pending:hover:not(:disabled) { background: var(--mbs-gold-50) !important; }
.btn-outline-danger { border-color: #fecaca !important; color: var(--mbs-crimson) !important; background: #fff; }
.btn-outline-danger:hover:not(:disabled) { background: #fef2f2 !important; border-color: var(--mbs-crimson) !important; }

/* ---------- 8. Forms ------------------------------------------------- */
.form-control, .form-select, .tom-select .ts-control {
  border-radius: var(--mbs-radius-sm) !important;
  border: 1px solid var(--mbs-line-strong) !important;
  background-color: #fff;
  color: var(--mbs-navy-900);
  padding: .45rem .75rem;
  font-size: .8125rem;
  line-height: 1.25rem;
  box-shadow: none !important;
  transition: border-color .15s, box-shadow .15s;
}
.form-control::placeholder { color: var(--mbs-faint); }
.form-control:hover:not(:focus):not(:disabled), .form-select:hover:not(:focus):not(:disabled) { border-color: var(--mbs-navy-200) !important; }
.form-control:focus, .form-select:focus, .tom-select.focus .ts-control {
  border-color: var(--mbs-navy-400) !important;
  box-shadow: 0 0 0 4px rgba(77, 103, 172, .14) !important;
  outline: none;
}
.form-control:disabled, .form-control[readonly], .form-select:disabled { background-color: #f7f8fc !important; color: var(--mbs-muted); box-shadow: none !important; }
.form-label { font-weight: 500; font-size: .75rem; color: var(--mbs-muted); margin-bottom: .35rem; }
.form-help { color: var(--mbs-muted); }
.input-group .input-group-text { background: var(--mbs-navy-50); border-color: var(--mbs-line-strong); color: var(--mbs-navy-600); }
.form-check-input { border-color: var(--mbs-line-strong) !important; border-radius: .3rem; width: 1rem; height: 1rem; }
.form-check-input[type="radio"] { border-radius: 999px; }
.form-check-input:checked { background-color: var(--mbs-navy-800) !important; border-color: var(--mbs-navy-800) !important; }
.form-check-input:focus { box-shadow: 0 0 0 4px rgba(77, 103, 172, .16) !important; }
.form-switch .form-check-input {
  width: 2.6rem; height: 1.5rem;
  border-radius: 999px !important;
  background-color: var(--mbs-navy-100) !important;
  border-color: var(--mbs-navy-100) !important;
}
.form-switch .form-check-input:before { box-shadow: 0 1px 3px rgba(10, 26, 65, .25) !important; }
.form-switch .form-check-input:checked { background-color: var(--mbs-lime-500) !important; border-color: var(--mbs-lime-500) !important; }
.form-check-label { color: var(--mbs-navy-700); font-weight: 400; font-size: .8125rem; }
@media (pointer: coarse) {
  .form-control, .form-select { font-size: 16px; min-height: 2.6rem; }
}

/* ---------- 9. Tables ------------------------------------------------ */
.table { color: var(--mbs-navy-800); }
.table th, .table thead th {
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--mbs-muted);
  border-bottom: 1px solid var(--mbs-line-strong) !important;
}
.table td { font-size: .8125rem; }
.table td { border-bottom-color: var(--mbs-line) !important; }
.table thead.table-light th, .table .table-light th { background: #f7f8fc !important; color: var(--mbs-navy-600); }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover > td { background-color: rgba(238, 241, 248, .5); }
.table-report:not(.table-report--bordered):not(.table-report--tabulator) td {
  box-shadow: none;
  border-top: 1px solid var(--mbs-line);
  border-bottom: 1px solid var(--mbs-line) !important;
}
.table-report td:first-child { border-left: 1px solid var(--mbs-line); border-radius: var(--mbs-radius) 0 0 var(--mbs-radius); }
.table-report td:last-child { border-right: 1px solid var(--mbs-line); border-radius: 0 var(--mbs-radius) var(--mbs-radius) 0; }
.overflow-x-auto, .overflow-auto { scrollbar-width: thin; scrollbar-color: var(--mbs-navy-200) transparent; }
.overflow-x-auto::-webkit-scrollbar, .overflow-auto::-webkit-scrollbar { height: 8px; width: 8px; }
.overflow-x-auto::-webkit-scrollbar-thumb, .overflow-auto::-webkit-scrollbar-thumb { background: var(--mbs-navy-200); border-radius: 8px; }

/* ---------- 10. Modals, tabs, accordion, alerts ---------------------- */
.modal { background: rgba(6, 15, 40, .5); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.modal .modal-content {
  border-radius: var(--mbs-radius-xl) !important;
  border: 1px solid var(--mbs-line);
  box-shadow: var(--mbs-shadow-lg) !important;
  overflow: hidden;
}
.modal .modal-header { border-bottom: 1px solid var(--mbs-line) !important; padding: 1.1rem 1.4rem; }
.modal .modal-footer { border-top: 1px solid var(--mbs-line) !important; background: #fafbfd; }
.modal.modal-slide-over .modal-content { border-radius: var(--mbs-radius-xl) 0 0 var(--mbs-radius-xl) !important; }
.modal .text-3xl { font-family: var(--mbs-display); font-weight: 600; color: var(--mbs-navy-800); }

.nav.nav-tabs { border: 0 !important; background: #eceff7; padding: 4px; border-radius: var(--mbs-radius); gap: 4px; }
.nav.nav-tabs .nav-item { margin: 0 !important; }
.nav.nav-tabs .nav-link {
  border: 0 !important;
  border-radius: .55rem !important;
  color: var(--mbs-muted) !important;
  font-weight: 600;
  font-size: .85rem;
  background: transparent !important;
  padding-top: .55rem !important;
  padding-bottom: .55rem !important;
  transition: background .15s, color .15s, box-shadow .15s;
}
.nav.nav-tabs .nav-link:hover { color: var(--mbs-navy-800) !important; }
.nav.nav-tabs .nav-link.active { background: #fff !important; color: var(--mbs-navy-900) !important; box-shadow: 0 1px 2px rgba(10, 26, 65, .08), 0 2px 8px -4px rgba(10, 26, 65, .2); }
.nav.nav-tabs .nav-link .bg-warning { background: var(--mbs-crimson) !important; color: #fff; }

.accordion .accordion-item { border-color: var(--mbs-line) !important; }
.accordion.accordion-boxed .accordion-item { border-radius: var(--mbs-radius) !important; background: #fff; }
.accordion .accordion-item .accordion-header .accordion-button { color: var(--mbs-navy-800); font-weight: 600; }

.alert { border-radius: var(--mbs-radius) !important; font-weight: 500; }
.alert-success { background: var(--mbs-lime-50) !important; border-color: var(--mbs-lime-100) !important; color: #365314 !important; }
.alert-pending, .alert-warning { background: var(--mbs-gold-50) !important; border-color: #ffd98a !important; color: #924417 !important; }
.alert-danger, .alert-danger-soft { background: #fef2f2 !important; border-color: #fecaca !important; color: #991b1b !important; }
.alert-primary { background: var(--mbs-navy-50) !important; border-color: var(--mbs-navy-100) !important; color: var(--mbs-navy-800) !important; }
.alert-outline-warning { border-color: var(--mbs-gold-500) !important; color: #924417 !important; background: #fffcf5; }

.toastify { border-radius: var(--mbs-radius) !important; box-shadow: var(--mbs-shadow-lg) !important; }
.toastify-content { border-radius: var(--mbs-radius) !important; border: 1px solid var(--mbs-line) !important; }
.tippy-box { border-radius: var(--mbs-radius-sm) !important; font-family: var(--mbs-font); }

#cookiesnotification {
  background: var(--mbs-navy-900) !important;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: var(--mbs-radius-lg) !important;
  box-shadow: var(--mbs-shadow-lg);
  max-width: 60rem;
  margin: 0 auto 1rem !important;
  color: rgba(255, 255, 255, .85);
}

/* ---------- 11. At Bat Builder (visual tokens only) ------------------- */
:root {
  --tile-blue: #0E2254;
  --tile-blue-hover: #1b2f6b;
  --delete-badge: #DC2626;
  --dash-border: #c3cde4;
  --chip-foul: #db7311; --chip-foul-bg: #fff8ec; --chip-foul-border: #ffd98a;
  --chip-hit: #2c4488;  --chip-hit-bg: #eef1f8;  --chip-hit-border: #aebbdf;
  --chip-out: #DC2626;
  --chip-rbi: #924417;  --chip-rbi-bg: rgba(242, 146, 26, .18);
}
.hp-btn {
  border-color: var(--mbs-line-strong) !important;
  border-radius: .6rem !important;
  color: var(--mbs-navy-800) !important;
  box-shadow: var(--mbs-shadow-xs) !important;
  transition: background .15s, border-color .15s, color .15s, transform .1s;
}
.hp-btn:hover { background: var(--mbs-navy-50) !important; border-color: var(--mbs-navy-400) !important; }
.hp-btn:active { background: var(--mbs-navy-800) !important; color: #fff !important; transform: translateY(1px); }
.tile-btn { border-radius: .75rem !important; box-shadow: 0 4px 12px -6px rgba(10, 26, 65, .5); }
.field-modal, .page-modal { border-radius: var(--mbs-radius-lg) !important; box-shadow: var(--mbs-shadow-lg) !important; }
.field-modal-backdrop, .page-modal-backdrop { background: rgba(6, 15, 40, .45) !important; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.field-image-frame img { filter: drop-shadow(0 16px 24px rgba(10, 26, 65, .16)); }
/* At Bat Builder: Reset / Delete / Save sit above the field image (the
   image's drop-shadow filter would otherwise paint over them and swallow
   the click as a hit). */
.field-image-frame > div[style*="position: absolute"]:not(.marker) { z-index: 20; }
.field-image-frame > div[style*="position: absolute"]:not(.marker) .btn { position: relative; z-index: 1; cursor: pointer; }

/* ---------- 12. Utility colour refinements ---------------------------- */
.text-primary { color: var(--mbs-navy-800) !important; }
.text-success { color: var(--mbs-lime-700) !important; }
.text-warning { color: #c46a10 !important; }
.text-pending { color: #b55712 !important; }
.text-danger { color: var(--mbs-crimson) !important; }
.bg-primary { background-color: var(--mbs-navy-800) !important; }
.text-slate-500 { color: var(--mbs-muted) !important; }
.border-slate-200\/60 { border-color: var(--mbs-line) !important; }
hr { border-color: var(--mbs-line); }

/* ---------- 13. Sign-in / onboarding pages (body.login) --------------- */
body.login { background: var(--mbs-canvas) !important; padding: 0 !important; min-height: 100vh; }
body.login { overflow-x: hidden !important; overflow-y: auto !important; height: auto !important; touch-action: pan-y pinch-zoom; -webkit-overflow-scrolling: touch; }
html:has(> body.login) { overflow-y: auto !important; height: auto !important; }
body.login::before, body.login::after { display: none !important; }
body.login > .container { max-width: none !important; width: 100%; padding: 0 !important; margin: 0 !important; }
body.login > .container > .xl\:grid.grid-cols-2 { min-height: 100vh; gap: 0 !important; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
body.login .container > div > .hidden.xl\:flex.flex-col {
  position: sticky; top: 0; height: 100vh; min-height: 0 !important;
  padding: 2.5rem clamp(2rem, 5vw, 5rem);
  background:
    linear-gradient(180deg, rgba(10, 26, 65, .35), rgba(10, 26, 65, .94) 72%),
    url('../images/hero-baseball-game-2.png') center 38% / cover no-repeat,
    var(--mbs-navy-900);
  color: #fff;
  overflow: hidden;
}
body.login .container > div > .hidden.xl\:flex.flex-col::before {
  content: ""; position: absolute; inset: 0; background: var(--mbs-stitch) 0 0 / 1.1rem 1.1rem; pointer-events: none;
}
body.login .container > div > .hidden.xl\:flex.flex-col > * { position: relative; z-index: 1; }
body.login .container > div > .hidden.xl\:flex.flex-col img.h-16 { height: 3.1rem !important; margin: 0 !important; }
body.login .container > div > .hidden.xl\:flex.flex-col img[src*="login-hat"] {
  width: 14rem !important; margin-top: 0 !important;
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .45));
  animation: mbs-float 7s ease-in-out infinite !important;
}
body.login .container > div > .hidden.xl\:flex.flex-col .text-4xl {
  font-family: var(--mbs-display); font-weight: 600;
  font-size: clamp(2.5rem, 3.6vw, 4rem) !important; line-height: 1.02 !important;
  letter-spacing: .01em; max-width: 13ch;
}
body.login .container > div > .hidden.xl\:flex.flex-col .text-lg { color: rgba(214, 221, 239, .85) !important; max-width: 38ch; }
body.login .container > div > div:not(.hidden) {
  display: flex; align-items: center; justify-content: center;
  height: auto !important; min-height: 100vh; margin: 0 !important; padding: 3rem 1.5rem !important;
  overflow: visible !important;
}
body.login .container > div > div:not(.hidden) > div {
  width: 100% !important; max-width: 28rem; margin: auto !important; padding: 0 !important;
  background: transparent !important; border: 0; box-shadow: none !important;
}
body.login h2.font-bold { color: var(--mbs-navy-900); font-size: 2.1rem !important; text-align: left !important; }
body.login .login__input { min-width: 0 !important; width: 100%; }
body.login .intro-x.mt-2.text-slate-400 { text-align: left !important; color: var(--mbs-muted) !important; }
body.login .text-center.xl\:text-left { text-align: left !important; }
body.login .intro-x span.DesktopView { display: none !important; }
body.login a:not(.btn) { color: var(--mbs-navy-500); font-weight: 500; }
body.login a:not(.btn):hover { color: var(--mbs-crimson); }
body.login .btn { padding-top: .8rem !important; padding-bottom: .8rem !important; }
body.login .btn.w-full, body.login .btn.xl\:w-32 { width: 100% !important; margin-right: 0 !important; }
body.login .btn + .btn, body.login .btn + form .btn { margin-left: .5rem !important; }
body.login .btn-primary { background: #fff !important; color: var(--mbs-navy-800) !important; border: 1px solid var(--mbs-line-strong) !important; }
body.login .btn-primary:hover:not(:disabled) { background: var(--mbs-navy-50) !important; border-color: var(--mbs-navy-300) !important; }
body.login .btn-success { box-shadow: 0 10px 24px -12px rgba(138, 203, 69, .7); }
body.login .xl\:mt-24 { margin-top: 2.5rem !important; }
body.login .text-slate-600 { color: var(--mbs-muted) !important; }
body.login .form-control { padding: .75rem .95rem; }

@media (max-width: 1279px) {
  body.login {
    background:
      var(--mbs-stitch) 0 0 / 1.1rem 1.1rem,
      linear-gradient(180deg, var(--mbs-navy-900) 0, var(--mbs-navy-800) 15rem, var(--mbs-canvas) 15rem) !important;
  }
  body.login .container > div > div:not(.hidden) { position: relative; padding: 6rem 1rem 2rem !important; align-items: flex-start; }
  body.login .container > div > div:not(.hidden)::before {
    content: ""; position: absolute; top: 1.75rem; left: 50%; transform: translateX(-50%);
    width: 12rem; height: 3.2rem;
    background: url('../images/my-baseball-stats-logo.png') center / contain no-repeat;
  }
  body.login .container > div > div:not(.hidden) > div {
    padding: 2rem 1.5rem !important;
    background: #fff !important;
    border: 1px solid var(--mbs-line);
    border-radius: var(--mbs-radius-xl) !important;
    box-shadow: var(--mbs-shadow-md) !important;
  }
}

@keyframes mbs-float { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-12px) rotate(1deg); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------- 14. Print -------------------------------------------------- */
@media print {
  body.main { padding: 0 !important; }
  .mobile-menu, .top-nav, .top-bar-boxed { display: none !important; }
}

/* =====================================================================
   15. Dashboard components (v3)
   ===================================================================== */

/* ---- 15a. Player / Team profile card --------------------------------- */
/* Card = the .box holding the profile photo or team logo. The two inner
   columns are re-flowed into "media on top, facts below". */
.box.p-5:has(> .grid > div > img[src*="member-profile-uploads"]),
.box.p-5:has(> .grid > div > #teamimage) {
  padding: 0 !important;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.box.p-5:has(> .grid > div > img[src*="member-profile-uploads"]) > .grid,
.box.p-5:has(> .grid > div > #teamimage) > .grid {
  display: flex !important;
  flex-direction: column;
  gap: 0 !important;
  flex: 1;
}
/* media: player photo and team logo share one framed, contained treatment,
   so any uploaded size / shape renders at the same on-screen scale */
.box.p-5 > .grid > div:has(> img[src*="member-profile-uploads"]),
.box.p-5 > .grid > div:has(> #teamimage) {
  order: -2;
  margin: 0 !important;
  display: grid;
  place-items: center;
  height: 11.5rem;
  padding: 1.5rem;
  flex-shrink: 0;
  background:
    radial-gradient(circle at 50% 45%, #fff 0, #fff 38%, transparent 70%),
    linear-gradient(180deg, var(--mbs-navy-50), #f8f9fc);
  border-bottom: 1px solid var(--mbs-line);
}
.box.p-5 > .grid > div > img[src*="member-profile-uploads"],
.box.p-5 > .grid > div > #teamimage {
  display: block;
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 100% !important;
  min-height: 0;
  aspect-ratio: auto;
  object-fit: contain !important;
  object-position: center !important;
  border: 0 !important;
  border-radius: .75rem !important;
  box-shadow: none !important;
  transform: none !important;
  filter: drop-shadow(0 8px 16px rgba(10, 26, 65, .15));
}
/* small uploads are scaled up to the same frame size */
.box.p-5 > .grid > div > img[src*="member-profile-uploads"],
.box.p-5 > .grid > div > #teamimage { height: 8.5rem !important; }

/* facts */
.box.p-5:has(> .grid > div > img[src*="member-profile-uploads"]) > .grid > div:not(:has(> img)),
.box.p-5:has(> .grid > div > #teamimage) > .grid > div:not(:has(> img)) {
  padding: 1.1rem 1.25rem 0;
}
.box.p-5:has(> .grid > div > img[src*="member-profile-uploads"]) > .grid > div:not(:has(> img)) {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 1rem;
  row-gap: .7rem;
  align-content: start;
  padding-bottom: 1.25rem;
}
.box.p-5:has(> .grid > div > #teamimage) > .grid > div:not(:has(> img)):last-of-type,
.box.p-5:has(> .grid > div > #teamimage) > .grid > div:nth-child(2) {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 1rem;
  row-gap: .7rem;
  padding-bottom: 1.25rem;
}
.box.p-5:has(> .grid > div > img[src*="member-profile-uploads"]) > .grid > div:not(:has(> img)) > div,
.box.p-5:has(> .grid > div > #teamimage) > .grid > div:not(:has(> img)) > div { margin: 0 !important; min-width: 0; }
/* name block + number span the full width */
.box.p-5:has(> .grid > div > img[src*="member-profile-uploads"]) > .grid > div:not(:has(> img)) > div:first-child { grid-column: 1 / -1; }
.box.p-5:has(> .grid > div > img[src*="member-profile-uploads"]) .text-2xl.text-warning,
.box.p-5:has(> .grid > div > #teamimage) .text-2xl.text-warning {
  font-family: var(--mbs-display);
  font-size: 1.3rem !important;
  line-height: 1.6rem !important;
  font-weight: 500 !important;
  color: var(--mbs-navy-900) !important;
  letter-spacing: .01em;
}
.box.p-5:has(> .grid > div > img[src*="member-profile-uploads"]) .text-sm.text-slate-500,
.box.p-5:has(> .grid > div > #teamimage) .text-sm.text-slate-500 {
  font-size: .65rem !important;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--mbs-gold-600) !important;
  margin-top: .2rem !important;
  align-items: center;
}
.box.p-5:has(> .grid > div > img[src*="member-profile-uploads"]) .text-sm.text-slate-500 a { margin-left: .5rem !important; }
/* jersey number -> badge */
.box.p-5:has(> .grid > div > img[src*="member-profile-uploads"]) .text-2xl.text-primary,
.box.p-5:has(> .grid > div > img[src*="member-profile-uploads"]) .mt-3 > .text-2xl.text-warning {
  display: inline-flex;
  align-items: center;
  height: 1.75rem;
  padding: 0 .6rem;
  border-radius: .45rem;
  background: var(--mbs-navy-800);
  color: #fff !important;
  font-family: var(--mbs-display);
  font-size: .95rem !important;
  font-weight: 500 !important;
  letter-spacing: .04em;
}
.box.p-5:has(> .grid > div > img[src*="member-profile-uploads"]) > .grid > div:not(:has(> img)) > div:nth-child(2):has(.text-2xl) { grid-column: 1 / -1; }
/* fact value / label */
.box.p-5:has(> .grid > div > img[src*="member-profile-uploads"]) .text-base.font-medium,
.box.p-5:has(> .grid > div > #teamimage) .text-base.font-medium {
  font-size: .8125rem !important;
  line-height: 1.2rem !important;
  font-weight: 500;
  color: var(--mbs-navy-900);
  overflow-wrap: anywhere;
}
.box.p-5:has(> .grid > div > img[src*="member-profile-uploads"]) .text-xs.text-slate-500,
.box.p-5:has(> .grid > div > #teamimage) .text-xs.text-slate-500 {
  order: -1;
  margin: 0 0 .1rem !important;
  font-size: .62rem !important;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--mbs-faint) !important;
}
.box.p-5:has(> .grid > div > img[src*="member-profile-uploads"]) > .grid > div:not(:has(> img)) > div:has(> .text-xs),
.box.p-5:has(> .grid > div > #teamimage) > .grid > div:not(:has(> img)) > div:has(> .text-xs) { display: flex; flex-direction: column; }
/* team card: name row on top, logo, facts */
.box.p-5:has(> .grid > div > #teamimage) > .grid > div.col-span-12:first-child { order: -1; padding-bottom: 0; }
.box.p-5:has(> .grid > div > #teamimage) > .grid > div.col-span-12:first-child .text-2xl { font-size: 1.2rem !important; }

/* Profile column + stat grid share one height on desktop */
@media (pointer: fine), (pointer: none), (pointer: coarse) and (orientation: landscape) and (min-height: 601px) {
  .col-span-12.sm\:col-span-6.xl\:col-span-3:has(img[src*="member-profile-uploads"]),
  .col-span-12.sm\:col-span-6.xl\:col-span-3:has(#teamimage) { display: flex; flex-direction: column; }
  .col-span-12.sm\:col-span-6.xl\:col-span-3:has(img[src*="member-profile-uploads"]) > .box,
  .col-span-12.sm\:col-span-6.xl\:col-span-3:has(#teamimage) > .box { flex: 1; }
  .col-span-12.sm\:col-span-6.lg\:col-span-9 > .grid { height: 100%; grid-auto-rows: 1fr; }
  .col-span-12.sm\:col-span-6.lg\:col-span-9 > .grid > div > .report-box,
  .col-span-12.sm\:col-span-6.lg\:col-span-9 > .grid > div > .report-box > .box { height: 100%; }
}

/* ---- 15b. Stat tiles -------------------------------------------------- */
.report-box .box {
  display: flex;
  flex-direction: column;
  padding: 1.1rem 1.25rem !important;
}
.report-box .box > .flex:first-child { align-items: flex-start; gap: .5rem; min-height: 1.1rem; }
.report-box .box h2.text-lg {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  margin-right: auto !important;
  line-height: 1rem !important;
  letter-spacing: .08em !important;
  font-weight: 600 !important;
  font-size: .66rem !important;
}
.report-box .box img[src*="stars-"] { height: .8rem; width: auto; flex-shrink: 0; opacity: .9; margin-top: .05rem; }
.report-box .text-3xl {
  margin-top: auto !important;
  padding-top: 1rem;
  font-size: 2rem !important;
  line-height: 2.2rem !important;
  font-weight: 500 !important;
}
.report-box .box > .text-base,
.report-box .box > .text-slate-500,
.report-box .widget-tickers {
  font-size: .75rem !important;
  line-height: 1.1rem;
  margin-top: .35rem !important;
  color: var(--mbs-muted) !important;
  font-weight: 400 !important;
}
.report-box .box > div:last-child:not(.flex) {
  display: block;
  height: 2.25rem !important;
  overflow: hidden;
  white-space: normal !important;
  font-size: .75rem !important;
  line-height: 1.125rem !important;
  font-weight: 500 !important;
  letter-spacing: .02em;
  color: var(--mbs-muted) !important;
}
.report-box .scrolltext span,
.report-box .scrolltext .text-sm,
.report-box .widget-tickers span,
.report-box .widget-tickers .text-sm {
  font-size: inherit !important;
  line-height: inherit !important;
  font-weight: inherit !important;
  letter-spacing: inherit;
}
@media (pointer: coarse) and (orientation: portrait), (pointer: coarse) and (max-height: 600px) {
  .report-box .text-3xl { font-size: 1.6rem !important; line-height: 1.85rem !important; }
  .report-box .box > div:last-child:not(.flex) { height: 3.4rem !important; }
}
.report-box .widget-tickers .text-success,
.report-box .widget-tickers span { font-weight: 500; }

/* ---- 15c. Chart widgets: title on top, KPIs underneath ----------------- */
.box:has(> .report-chart) { padding: 1.1rem 1.25rem .75rem !important; }
.box:has(> .report-chart) > .flex.flex-col:first-child {
  flex-direction: column-reverse !important;
  align-items: flex-start !important;
  gap: .9rem;
}
.box:has(> .report-chart) > .flex.flex-col:first-child > .text-lg {
  margin: 0 !important;
  font-family: var(--mbs-display);
  font-size: 1.02rem !important;
  line-height: 1.35rem;
  font-weight: 500 !important;
  color: var(--mbs-navy-900) !important;
  white-space: normal;
}
.box:has(> .report-chart) > .flex.flex-col:first-child > .flex { gap: 0; flex-wrap: wrap; row-gap: .5rem; }
.box:has(> .report-chart) > .flex.flex-col:first-child > .flex > div:not(.w-px) {
  padding: .45rem .8rem;
  border-radius: var(--mbs-radius-sm);
  background: #f6f7fb;
  margin-right: .5rem;
}
.box:has(> .report-chart) > .flex.flex-col:first-child > .flex > .w-px { display: none; }
.box:has(> .report-chart) [id^="chart-"][id*="-total"] { font-size: 1.15rem !important; line-height: 1.4rem; color: var(--mbs-navy-900) !important; }
.box:has(> .report-chart) .mt-0\.5.text-slate-500 { font-size: .68rem; margin-top: 0 !important; }
.report-chart canvas { margin-top: 1rem !important; }

/* ---- 15d. Approvals / Chat / Notes panel ------------------------------ */
.mt-5:has(> ul.nav.nav-tabs) {
  overflow: visible !important;
  padding: 0 !important;
  margin-top: 0 !important;
  background: #fff;
  border: 1px solid var(--mbs-line);
  border-radius: var(--mbs-radius-lg);
  box-shadow: var(--mbs-shadow);
}
.mt-5:has(> ul.nav.nav-tabs) > ul.nav.nav-tabs {
  margin: 0;
  padding: 0 .5rem;
  gap: 0;
  background: transparent;
  border-radius: 0;
  border-bottom: 1px solid var(--mbs-line) !important;
}
.mt-5:has(> ul.nav.nav-tabs) > ul.nav.nav-tabs .nav-link {
  position: relative;
  padding: .85rem .5rem .8rem !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--mbs-muted) !important;
  font-size: .8125rem;
  font-weight: 500;
}
.mt-5:has(> ul.nav.nav-tabs) > ul.nav.nav-tabs .nav-link > .flex { align-items: center; gap: .45rem; }
.mt-5:has(> ul.nav.nav-tabs) > ul.nav.nav-tabs .nav-link > .flex::before {
  content: "";
  width: 1rem; height: 1rem;
  background: currentColor;
  -webkit-mask: var(--mbs-tab-icon) center / contain no-repeat;
  mask: var(--mbs-tab-icon) center / contain no-repeat;
  opacity: .85;
}
#approvals .nav-link { --mbs-tab-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpolyline points='16 11 18 13 22 9'/%3E%3C/svg%3E"); }
#chat .nav-link { --mbs-tab-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E"); }
#notes .nav-link { --mbs-tab-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='16' y1='13' x2='8' y2='13'/%3E%3Cline x1='16' y1='17' x2='8' y2='17'/%3E%3C/svg%3E"); }
.mt-5:has(> ul.nav.nav-tabs) > ul.nav.nav-tabs .nav-link:hover { color: var(--mbs-navy-800) !important; }
.mt-5:has(> ul.nav.nav-tabs) > ul.nav.nav-tabs .nav-link.active { color: var(--mbs-navy-900) !important; font-weight: 600; }
.mt-5:has(> ul.nav.nav-tabs) > ul.nav.nav-tabs .nav-link::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--mbs-lime-400);
  transform: scaleX(0);
  transition: transform .2s var(--mbs-ease);
}
.mt-5:has(> ul.nav.nav-tabs) > ul.nav.nav-tabs .nav-link.active::after { transform: scaleX(1); }
.mt-5:has(> ul.nav.nav-tabs) > ul.nav.nav-tabs .nav-link [id^="new"] {
  margin: 0 0 0 -.2rem !important;
  align-self: flex-start;
  transform: translateY(-.45rem);
  line-height: 0;
}
.mt-5:has(> ul.nav.nav-tabs) > ul.nav.nav-tabs .nav-link [id^="new"] span {
  display: inline-flex; align-items: center; height: .75rem; padding: 0 .28rem !important; margin: 0 !important;
  font-size: .5rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; line-height: 1;
  background: var(--mbs-gold-500) !important; color: #fff !important;
}
.mt-5:has(> ul.nav.nav-tabs) > .tab-content {
  border: 0 !important;
  border-radius: 0 0 var(--mbs-radius-lg) var(--mbs-radius-lg);
}
.mt-5:has(> ul.nav.nav-tabs) > .tab-content > .tab-pane { padding: .25rem 1rem 1rem !important; }
.mt-5:has(> ul.nav.nav-tabs) .tab-pane .intro-x.flex.items-center.h-10 { height: 2.5rem; }
.mt-5:has(> ul.nav.nav-tabs) .tab-pane h2.text-lg { font-size: .95rem !important; }
.mt-5:has(> ul.nav.nav-tabs) .tab-pane [id^="expand"] a { font-size: .75rem; color: var(--mbs-muted) !important; }
.mt-5:has(> ul.nav.nav-tabs) .tab-pane [id^="expand"] a:hover { color: var(--mbs-navy-800) !important; }
.mt-5:has(> ul.nav.nav-tabs) [style*="overflow-y: scroll"] { overflow-y: auto !important; scrollbar-width: thin; scrollbar-color: var(--mbs-navy-200) transparent; }
.mt-5:has(> ul.nav.nav-tabs) .tab-pane .box {
  box-shadow: none !important;
  background: #f8f9fc;
  border-color: var(--mbs-line) !important;
  border-radius: var(--mbs-radius) !important;
}
.mt-5:has(> ul.nav.nav-tabs) .tab-pane .box .font-medium { font-weight: 500; font-size: .8125rem; }
#chatiframe { border: 0; border-radius: 0; background: #fff; }

/* ---- 15e. Mobile dashboard action stack -> tidy two-column grid ------- */
@media (pointer: coarse) and (orientation: portrait), (pointer: coarse) and (max-height: 600px) {
  .content div:has(> a.btn.w-full ~ a.btn.w-full) {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
    gap: .5rem;
  }
  .content div:has(> a.btn.w-full ~ a.btn.w-full) > a.btn.w-full {
    margin: 0 !important;
    justify-content: flex-start;
    padding: .65rem .85rem;
    background: #fff !important;
    border-color: var(--mbs-line) !important;
    color: var(--mbs-navy-800) !important;
    box-shadow: var(--mbs-shadow-xs);
  }
  .content div:has(> a.btn.w-full ~ a.btn.w-full) > a.btn.w-full svg { color: var(--mbs-lime-700); margin-right: .6rem !important; }
  .content div:has(> a.btn.w-full ~ a.btn.w-full) > a.btn.w-full:first-of-type {
    background: var(--mbs-lime-400) !important;
    border-color: var(--mbs-lime-400) !important;
    color: var(--mbs-navy-900) !important;
  }
  .content div:has(> a.btn.w-full ~ a.btn.w-full) > a.btn.w-full:first-of-type svg { color: var(--mbs-navy-900); }
  .content div:has(> a.btn.w-full ~ a.btn.w-full) > :not(a.btn) { grid-column: 1 / -1; }
}

/* ---- 15f. Chat / notes inline actions -> quiet icon buttons ----------- */
html[style*="#f1f5f9"], html[style*="#f1f5f9"] body { background-color: #fff !important; }
html[style*="#f1f5f9"] [style*="background-color: #f1f5f9"] { background-color: transparent !important; }
.btn-sm.chat-line-deletes,
.btn-sm.btn-primary.ml-2.tooltip,
.btn-sm.btn-secondary.ml-2.tooltip {
  width: 1.85rem; height: 1.85rem;
  padding: 0 !important;
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  color: var(--mbs-faint) !important;
}
.btn-sm.chat-line-deletes:hover { background: #fef2f2 !important; color: var(--mbs-crimson) !important; }
.btn-sm.btn-primary.ml-2.tooltip:hover,
.btn-sm.btn-secondary.ml-2.tooltip:hover { background: var(--mbs-navy-50) !important; color: var(--mbs-navy-800) !important; }
.btn-sm.chat-line-deletes svg, .btn-sm.btn-primary.ml-2.tooltip svg, .btn-sm.btn-secondary.ml-2.tooltip svg { width: .95rem; height: .95rem; }

/* ---- 15g. Cookie notice ------------------------------------------------ */
#cookiesnotification .text-base { font-size: .8125rem !important; line-height: 1.25rem; color: rgba(226, 232, 248, .85) !important; }
#cookiesnotification .btn { padding: .5rem 1rem !important; }
@media (pointer: fine), (pointer: none), (pointer: coarse) and (orientation: landscape) and (min-height: 601px) {
  #cookiesnotification > .grid { display: flex; align-items: center; gap: 1.5rem; padding: .9rem 1rem .9rem 1.4rem; }
  #cookiesnotification > .grid > .DesktopView { display: block; padding: 0 !important; }
  #cookiesnotification > .grid > .DesktopView:last-child { order: -1; flex: 1; text-align: left; }
  body:has(> .top-nav > ul) #cookiesnotification { left: var(--mbs-sidebar) !important; }
}

/* ---- 15h. Batting-stat tables: totals rows ----------------------------- */
.table tr[style*="background-color: #d6ddef"],
.table tr[style*="background-color: #eef7dc"] { background: transparent !important; }
.table tr[style*="background-color: #d6ddef"] > td {
  background: var(--mbs-navy-50) !important;
  border-top: 1px solid var(--mbs-navy-100) !important;
  border-bottom: 1px solid var(--mbs-navy-100) !important;
  color: var(--mbs-navy-900) !important;
  font-weight: 600;
}
.table tr[style*="background-color: #eef7dc"] > td {
  background: var(--mbs-lime-50) !important;
  border-top: 1px solid var(--mbs-lime-100) !important;
  border-bottom: 1px solid var(--mbs-lime-100) !important;
  color: #365314 !important;
  font-weight: 600;
}
.table tr[style*="background-color: #d6ddef"] > td:first-child,
.table tr[style*="background-color: #eef7dc"] > td:first-child { font-family: var(--mbs-display); font-weight: 500; letter-spacing: .02em; }
.table tr:hover > td[style*="background-color: #eef1f8"] { background-color: #e6eaf4 !important; }

/* =====================================================================
   16. Collapsible sidebar (toggle in scripts/header-menu.asp)
   ===================================================================== */
.mbs-nav-toggle { display: none; }
@media (pointer: fine), (pointer: none), (pointer: coarse) and (orientation: landscape) and (min-height: 601px) {
  /* no sliding: the page and menu snap to their collapsed/expanded widths */
  body.main, .top-nav, .wrapper, .wrapper-box, .content { transition: none !important; }

  /* « / » toggle: top of the menu, right-aligned on the first heading row */
  .mbs-nav-toggle {
    display: grid;
    place-items: center;
    position: absolute;
    z-index: 2;
    top: calc(var(--mbs-appbar) + 1rem);
    right: .75rem;
    width: 1.9rem;
    height: 1.9rem;
    padding: 0;
    border-radius: var(--mbs-radius-sm);
    color: rgba(174, 187, 223, .7);
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
  }
  .mbs-nav-toggle:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .1); color: #fff; }
  .mbs-nav-toggle svg { width: 1rem; height: 1rem; transition: transform .25s var(--mbs-ease); }
  /* if the first menu item isn't a heading, make room for the toggle */
  .top-nav > ul:not(:has(> li:first-child > ul)) { padding-top: 3.25rem; }

  /* ---- collapsed ---- */
  html.mbs-nav-collapsed { --mbs-sidebar: 4.5rem; }
  html.mbs-nav-collapsed .top-nav { overflow: visible; }
  html.mbs-nav-collapsed .mbs-brand { justify-content: center; padding: 0; }
  html.mbs-nav-collapsed .mbs-brand img { display: none; }
  html.mbs-nav-collapsed .mbs-brand::before {
    content: "";
    width: 2.1rem; height: 2.1rem;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Ccircle cx='20' cy='20' r='18.5' fill='%23FBF6E8' stroke='%23ffffff' stroke-opacity='.6'/%3E%3Cg fill='none' stroke='%23DC2626' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 4.5c4 4.5 4 26.5 0 31'/%3E%3Cpath d='M28 4.5c-4 4.5-4 26.5 0 31'/%3E%3Cpath d='M10.5 10l3.5-1.5M11.5 15l3.5-1M12 20h3.5M11.5 25l3.5 1M10.5 30l3.5 1.5M29.5 10l-3.5-1.5M28.5 15l-3.5-1M28 20h-3.5M28.5 25l-3.5 1M29.5 30l-3.5 1.5'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  }
  html.mbs-nav-collapsed .top-nav > ul { padding: .75rem .65rem; }
  html.mbs-nav-collapsed .top-nav > ul li .top-menu,
  html.mbs-nav-collapsed .top-nav > ul li ul li .top-menu { justify-content: center; padding: 0 !important; }
  html.mbs-nav-collapsed .top-nav > ul li .top-menu .top-menu__icon svg { width: 1.2rem; height: 1.2rem; }

  /* group headings become a thin divider */
  html.mbs-nav-collapsed .top-nav > ul > li:has(> ul) { margin-top: .5rem; padding-top: .5rem; border-top: 1px solid rgba(255, 255, 255, .07); }
  html.mbs-nav-collapsed .top-nav > ul > li:first-child:has(> ul) { margin-top: 0; padding-top: 0; border-top: 0; }
  html.mbs-nav-collapsed .top-nav > ul > li:has(> ul) > .top-menu { display: none; }
  html.mbs-nav-collapsed .top-nav > ul > li:not(:has(> ul)) { margin-top: 0; }

  /* labels become hover flyouts */
  html.mbs-nav-collapsed .top-nav > ul li .top-menu .top-menu__title {
    position: absolute;
    left: calc(100% + .9rem);
    top: 50%;
    width: auto;
    margin: 0;
    padding: .4rem .7rem;
    border-radius: var(--mbs-radius-sm);
    background: var(--mbs-navy-900);
    color: #fff;
    font-size: .78rem;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: var(--mbs-shadow-lg);
    opacity: 0;
    pointer-events: none;
    transform: translate(-.35rem, -50%);
    transition: opacity .15s, transform .15s var(--mbs-ease);
    z-index: 80;
  }
  html.mbs-nav-collapsed .top-nav > ul li .top-menu .top-menu__title::before {
    content: "";
    position: absolute; left: -4px; top: 50%;
    width: 8px; height: 8px;
    background: var(--mbs-navy-900);
    transform: translateY(-50%) rotate(45deg);
  }
  html.mbs-nav-collapsed .top-nav > ul li .top-menu:hover .top-menu__title,
  html.mbs-nav-collapsed .top-nav > ul li .top-menu:focus-visible .top-menu__title { opacity: 1; transform: translate(0, -50%); }
  html.mbs-nav-collapsed .top-nav > ul li ul li > .top-menu.top-menu--active::before,
  html.mbs-nav-collapsed .top-nav > ul > li:not(:has(> ul)) > .top-menu.top-menu--active::before { left: -.65rem; }

  /* player/team context and toggle text hide; toggle icon flips */
  html.mbs-nav-collapsed .top-nav > .ml-auto { display: none; }
  html.mbs-nav-collapsed .mbs-nav-toggle {
    top: calc(var(--mbs-appbar) + .6rem);
    right: auto;
    left: 50%;
    width: 2.5rem;
    height: 2rem;
    transform: translateX(-50%);
    border-color: rgba(255, 255, 255, .08);
  }
  html.mbs-nav-collapsed .mbs-nav-toggle svg { transform: scaleX(-1); }
  html.mbs-nav-collapsed .top-nav > ul { padding-top: 3.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  body.main, .top-nav { transition: none !important; }
}

/* =====================================================================
   17. Image upload panels (My Profile, My Team, New Team)
   ===================================================================== */
.content .border-2.border-dashed {
  border: 1px dashed var(--mbs-line-strong) !important;
  border-radius: var(--mbs-radius-lg) !important;
  background: linear-gradient(180deg, #fbfcfe, #f6f8fc);
  box-shadow: none !important;
}
.content .border-2.border-dashed strong { font-weight: 600; color: var(--mbs-navy-800); font-size: .8125rem; }
.content .border-2.border-dashed .text-xs { color: var(--mbs-faint); }
/* team logo + profile photo previews: framed and contained like the dashboards */
.border-dashed div:has(> #teamimage),
.border-dashed div:has(> #profileimage) {
  border-radius: .9rem !important;
  padding: .65rem;
  background:
    radial-gradient(circle at 50% 45%, #fff 0, #fff 40%, transparent 72%),
    linear-gradient(180deg, var(--mbs-navy-50), #f8f9fc) !important;
  border: 1px solid var(--mbs-line);
  box-shadow: var(--mbs-shadow-xs) !important;
  display: grid;
  place-items: center;
  width: 9rem !important;
  height: 9rem !important;
}
.border-dashed div:has(> #teamimage) > #teamimage,
.border-dashed div:has(> #profileimage) > #profileimage {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  border-radius: .55rem;
  filter: drop-shadow(0 6px 12px rgba(10, 26, 65, .14));
}
/* profile photo: portrait frame the same height as the round avatar */
.border-dashed div:has(> #profileimage) {
  width: 6.4rem !important;
  height: 8rem !important;
  padding: .4rem;
  display: block;
}
.border-dashed div:has(> #profileimage) > #profileimage {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  border-radius: .55rem;
}
/* round avatar preview */
div:has(> #avatarimage) { box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--mbs-line), var(--mbs-shadow-md) !important; }
.content .border-2.border-dashed .btn { margin-left: .25rem !important; margin-right: .25rem !important; }
.content .border-2.border-dashed > .flex.mt-6 { flex-wrap: wrap; justify-content: center; gap: .4rem; }
.content .border-2.border-dashed > .flex.mt-6 > div { margin: 0 !important; }
.content .border-2.border-dashed > .flex.mt-6 .btn { margin: 0 !important; }

/* =====================================================================
   18. Player / Team context in the app bar (desktop >= 1280px)
   Re-uses the existing selector forms in the top bar; the sidebar copy
   is hidden. Mobile keeps its chip row.
   ===================================================================== */
@media (pointer: fine), (pointer: none), (pointer: coarse) and (orientation: landscape) and (min-height: 601px) {
  .top-nav > .ml-auto { display: none !important; }
  .top-bar-boxed > .h-full { max-width: 120rem; margin: 0 auto; }
  .top-bar-boxed > .h-full > .dropdown { margin-left: 0 !important; }

  /* Player / Team on the left, environment badge + avatar on the right */
  .top-bar-boxed nav.MobileView {
    order: -1;
    display: flex !important;
    align-items: center;
    height: 100%;
    margin: 0 auto 0 0 !important;
    padding: 0;
    border: 0;
  }
  .top-bar-boxed > .h-full > .DesktopView.text-warning { margin-right: 1rem !important; }
  .top-bar-boxed nav.MobileView > div { display: flex; align-items: center; height: 100%; }
  .top-bar-boxed nav.MobileView form {
    display: flex;
    align-items: center;
    height: 2.4rem;
    padding: 0 1.1rem;
  }
  .top-bar-boxed nav.MobileView form:first-child { padding-left: 0; }
  .top-bar-boxed nav.MobileView form + form { border-left: 0; padding-left: .6rem; }

  /* label above value, switch icon to the right */
  #playername1, #teamname1 { display: flex; align-items: center; }
  #playername1 > div, #teamname1 > div {
    display: grid !important;
    grid-template-columns: max-content 1fr;
    grid-template-rows: auto auto;
    column-gap: .4rem;
    row-gap: .1rem;
    align-items: center;
    margin: 0 !important;
  }
  #playername1 > div::before, #teamname1 > div::before {
    grid-column: 1; grid-row: 1;
    align-self: center;
    font-size: .6rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--mbs-faint);
    line-height: .9rem;
  }
  #playername1 > div::before { content: "Player"; }
  #teamname1 > div::before { content: "Team"; }
  #playername1 > div > span, #teamname1 > div > span {
    grid-column: 1 / -1; grid-row: 2;
    max-width: 22rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--mbs-navy-900) !important;
    font-size: .8125rem !important;
    font-weight: 500;
    line-height: 1.2rem;
  }
  /* "switch" text control (keeps its "Switch Player/Team" tooltip) */
  #playername1 > div > button, #teamname1 > div > button {
    grid-column: 2; grid-row: 1;
    align-self: center;
    justify-self: start;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: auto !important;
    height: .95rem !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 .35rem !important;
    border-radius: .25rem !important;
    font-size: .6rem !important;
    font-weight: 500 !important;
    line-height: 1 !important;
    letter-spacing: 0;
    text-transform: none;
    color: #fff !important;
    background: var(--mbs-navy-500) !important;
    border: 1px solid var(--mbs-navy-500) !important;
    box-shadow: 0 1px 2px rgba(10, 26, 65, .15) !important;
  }
  #playername1 > div > button:hover, #teamname1 > div > button:hover {
    background: var(--mbs-navy-700) !important;
    border-color: var(--mbs-navy-700) !important;
    color: #fff !important;
  }
  /* open selector state */
  #playerdropdown1, #teamdropdown1 { align-items: center; gap: .6rem; margin: 0 !important; }
  #playerdropdown1 > div, #teamdropdown1 > div { margin: 0 !important; width: auto !important; }
  #playerdropdown1 .DesktopView span, #teamdropdown1 .DesktopView span {
    font-size: .6rem !important; font-weight: 600 !important; letter-spacing: .1em; text-transform: uppercase;
    color: var(--mbs-faint) !important;
  }
  #playerdropdown1 .form-control, #teamdropdown1 .form-control { min-width: 14rem; height: 2.1rem; padding-top: .3rem; padding-bottom: .3rem; }
}

/* =====================================================================
   19. Data tables — consistent backgrounds, borders and mobile behaviour
   ===================================================================== */
/* Free-standing tables (not already inside a card) get a card surface */
.content .overflow-x-auto:not(.box *):has(> table.table) {
  background: #fff;
  border: 1px solid var(--mbs-line);
  border-radius: var(--mbs-radius-lg);
  box-shadow: var(--mbs-shadow);
}
.content .overflow-x-auto:has(> table.table) { -webkit-overflow-scrolling: touch; }
.table { border-collapse: separate; border-spacing: 0; width: 100%; }

/* Column header row */
.table thead th {
  background: #f7f8fc !important;
  border-bottom: 1px solid var(--mbs-line-strong) !important;
  border-top: 0 !important;
  padding-top: .65rem !important;
  padding-bottom: .65rem !important;
  vertical-align: middle;
}

/* Action / spacer column ("gutter" cells styled #f1f5f9 + no border):
   always neutral so row and band backgrounds stop at the last data column */
.table tr > th[style*="background-color: #f1f5f9"],
.table tr > td[style*="background-color: #f1f5f9"] {
  background: #fff !important;
  border-color: transparent !important;
}

/* Group header band (Regular Season / Finals): spans the data columns */
.table tr:has(> td.bg-slate-100) > td {
  background: #fff !important;
  border-top: 0 !important;
  border-bottom: 1px solid var(--mbs-line) !important;
  padding-top: .9rem !important;
  padding-bottom: .75rem !important;
}
.table tr:has(> td.bg-slate-100) > td.bg-slate-100 .mb-4 { margin-bottom: 0 !important; }
.table tr:has(> td.bg-slate-100) > td.bg-slate-100 img { width: 1.6rem; height: 1.6rem; object-fit: contain; transform: none !important; }
.table tr:has(> td.bg-slate-100) > td.bg-slate-100 .text-lg {
  font-family: var(--mbs-display);
  font-size: 1.05rem !important;
  font-weight: 500 !important;
  color: var(--mbs-navy-900) !important;
  margin-left: .65rem !important;
}
.table tr:has(> td.bg-slate-100) > td.bg-slate-100 > .flex { align-items: center; }
.table tr:has(> td.bg-slate-100) > td.bg-slate-100 > .flex > div { margin-top: 0 !important; margin-bottom: 0 !important; display: flex; align-items: center; }
.table tr:has(> td.bg-slate-100) > td.bg-slate-100 [style*="margin-top"] { margin-top: 0 !important; }
.table tr:has(> td.bg-slate-100) + tr > th { border-top: 0 !important; }

/* Body rows */
.table tbody td { background-color: #fff; }
.table tbody td[style*="background-color: #eef1f8"] { background-color: #f3f5fa !important; }
.table tbody tr:hover > td:not([style*="background-color: #f1f5f9"]) { background-color: #f7f9fd !important; }
.table tbody tr:hover > td[style*="background-color: #eef1f8"] { background-color: #eceff7 !important; }

/* Totals rows: band covers the data columns only */
.table tr[style*="background-color: #d6ddef"]:not(:has(> td.bg-slate-100)) > td:not([style*="background-color: #f1f5f9"]) {
  background: var(--mbs-navy-50) !important;
}
.table tr[style*="background-color: #eef7dc"] > td:not([style*="background-color: #f1f5f9"]) {
  background: var(--mbs-lime-50) !important;
}
.table tr[style*="background-color: #d6ddef"]:not(:has(> td.bg-slate-100)) > td[style*="background-color: #f1f5f9"],
.table tr[style*="background-color: #eef7dc"] > td[style*="background-color: #f1f5f9"] {
  background: #fff !important;
  border-color: transparent !important;
}

/* Stats tables on every page match My Dashboard: the value wrapper
   (strong/span with its own size or colour class) takes the cell's size
   and the row's colour, so team, virtual team and career tables read
   the same as the player tables. */
.table.table-medium tbody td :is(strong, span, b):is(.text-base, .text-lg, .text-xl, .text-sm) { font-size: inherit !important; line-height: inherit; }
.table.table-medium tbody td :is(strong, span, b).text-primary { color: inherit !important; }
.table.table-medium tbody tr:not([style*="background-color"]) td :is(strong, span, b):is(.text-base, .text-lg, .text-xl).font-medium { font-weight: 500 !important; }
.table.table-medium tbody tr[style*="background-color: #d6ddef"] td :is(strong, span, b):is(.text-base, .text-lg, .text-xl),
.table.table-medium tbody tr[style*="background-color: #eef7dc"] td :is(strong, span, b):is(.text-base, .text-lg, .text-xl) { font-weight: 600 !important; }

/* A game row followed by its "At Bats" detail row reads as one block */
.table tbody tr:has(+ tr > td[style*="border-top: none"]) > td { border-bottom: 0 !important; }

/* Last row of a card-table: no double border against the card edge */
.content .overflow-x-auto:not(.box *) > .table > tbody:last-child > tr:last-child > td { border-bottom: 0 !important; }

/* Mobile / tablet: compact cells; tables scroll sideways inside their card */
@media (max-width: 1023px) {
  .table th, .table td { padding: .5rem .55rem !important; }
  .table td { font-size: .78rem; }
  .table th { font-size: .6rem; }
  .table.table-medium td, .table.table-medium th { white-space: nowrap; }
  .table.table-medium td .force-line-break { display: none; }
}

/* =====================================================================
   20. Spacing between side-by-side buttons (min 0.5rem, like ml-2)
   ===================================================================== */
.btn:not(.w-full) + .btn:not(.w-full),
.btn:not(.w-full) + input[type="hidden"] + .btn:not(.w-full) { margin-left: .5rem !important; }
.btn.mr-1 { margin-right: .5rem !important; }
.btn.ml-1 { margin-left: .5rem !important; }
/* buttons wrapped in their own form/div/span next to each other */
.flex > :is(form, div, span):has(> .btn:only-child) + :is(form, div, span):has(> .btn:only-child) { margin-left: .5rem; }
.hp-buttons-row { gap: .5rem !important; }

/* ---------- 21. Mobile panel dock (scripts/mobile-panel-dock.asp) ----- */
.mbs-dock { display: none; }
@media (pointer: coarse) and (orientation: portrait), (pointer: coarse) and (max-height: 600px), (pointer: coarse) and (orientation: landscape) and (min-height: 601px) {
  .mbs-dock-src { display: none !important; }
  .mbs-dock:not([hidden]) {
    position: fixed;
    right: max(.75rem, env(safe-area-inset-right));
    bottom: calc(1.25rem + env(safe-area-inset-bottom));
    z-index: 70;
    display: flex;
    flex-direction: column;
    gap: .4rem;
    padding: .4rem;
    border-radius: 999px;
    background:
      var(--mbs-stitch) 0 0 / 1.1rem 1.1rem,
      linear-gradient(180deg, rgba(14, 34, 84, .6), rgba(10, 26, 65, .6));
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 14px 34px -12px rgba(6, 15, 40, .55);
  }
  html.mbs-sheet-open .mbs-dock { display: none !important; }
}
.mbs-dock__btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 999px;
  color: rgba(226, 232, 248, .85);
  background: transparent;
  border: 0;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color .15s, color .15s, transform .15s;
}
.mbs-dock__btn[hidden] { display: none; }
.mbs-dock__btn svg { width: 1.2rem; height: 1.2rem; }
.mbs-dock__btn:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.mbs-dock__btn:active { transform: scale(.94); }
.mbs-dock__btn:focus-visible { outline: 2px solid var(--mbs-gold-400); outline-offset: 2px; }
.mbs-dock__btn.is-active { background: var(--mbs-lime-400); color: var(--mbs-navy-900); box-shadow: 0 4px 12px -4px rgba(138, 203, 69, .7); }
.mbs-dock__label {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.mbs-dock__dot {
  display: none;
  position: absolute; top: .35rem; right: .35rem;
  width: .55rem; height: .55rem; border-radius: 999px;
  background: var(--mbs-gold-400);
  box-shadow: 0 0 0 2px var(--mbs-navy-900);
}
.mbs-dock__btn.has-new .mbs-dock__dot { display: block; }

.mbs-sheet[hidden] { display: none; }
.mbs-sheet {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(.9rem, env(safe-area-inset-top)) max(.9rem, env(safe-area-inset-right)) max(.9rem, env(safe-area-inset-bottom)) max(.9rem, env(safe-area-inset-left));
  background: rgba(6, 15, 40, .5);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity .18s var(--mbs-ease);
}
.mbs-sheet.is-open { opacity: 1; }
.mbs-sheet__dialog {
  display: flex;
  flex-direction: column;
  width: min(40rem, 100%);
  max-height: 100%;
  background: #fff;
  border: 1px solid var(--mbs-line);
  border-radius: var(--mbs-radius-xl);
  box-shadow: var(--mbs-shadow-lg);
  overflow: hidden;
  transform: translateY(10px) scale(.985);
  transition: transform .2s var(--mbs-ease);
}
.mbs-sheet.is-open .mbs-sheet__dialog { transform: none; }
.mbs-sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1rem 1rem 1.4rem;
  border-bottom: 1px solid var(--mbs-line);
  flex-shrink: 0;
}
.mbs-sheet__title {
  margin: 0;
  font-family: var(--mbs-display);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: .015em;
  color: var(--mbs-navy-800);
}
.mbs-sheet__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  border: 0;
  background: #eef1f8;
  color: var(--mbs-navy-800);
  cursor: pointer;
  transition: background-color .15s;
}
.mbs-sheet__close:hover { background: #e2e7f3; }
.mbs-sheet__close svg { width: 1.1rem; height: 1.1rem; }
.mbs-sheet__body {
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 1rem;
}
.mbs-sheet .mbs-dock-src { display: block !important; margin: 0 !important; width: 100%; }
.mbs-sheet .mbs-dock-src > div[style*="overflow-y"] { margin: 0 !important; padding: 0 !important; overflow: visible !important; }
.mbs-sheet .mbs-dock-src .box:has(#season-field-image-frame) {
  padding: .5rem !important;
  margin: 0 !important;
  box-shadow: none !important;
  border: 0 !important;
}
.mbs-sheet .mbs-dock-src .box:has(#season-field-image-frame) > .DesktopView,
.mbs-sheet .mbs-dock-src .box:has(#season-field-image-frame) > .MobileView,
.mbs-sheet .mbs-dock-src > .intro-x.DesktopView { display: none !important; }
.mbs-sheet .mbs-dock-src .field-image-frame { max-width: 30rem; }
.mbs-sheet[data-kind="spray"] .mbs-sheet__dialog { width: min(34rem, 100%); }
html.mbs-sheet-open, html.mbs-sheet-open body { overflow: hidden !important; }
.mbs-sheet[data-kind="panel"] .mbs-sheet__body { padding: .6rem; }
.mbs-sheet .tab-content > .tab-pane { padding: .85rem !important; }
.mbs-sheet #seasonnotesdiv, .mbs-sheet #approvalsdiv { padding: 4px !important; }
.mbs-sheet #seasonnotesdiv .box.flex-1 { min-width: 0; padding-left: .75rem !important; padding-right: .75rem !important; }
.mbs-dock {
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.mbs-dock__btn { touch-action: none; }
.mbs-dock { transition: transform .18s var(--mbs-ease), box-shadow .18s var(--mbs-ease); }
.mbs-dock.is-dragging {
  transform: scale(1.06);
  cursor: grabbing;
  box-shadow: 0 22px 44px -14px rgba(6, 15, 40, .6), 0 0 0 3px rgba(166, 221, 92, .55);
}
.mbs-dock.is-dragging .mbs-dock__btn { pointer-events: none; }
html.mbs-dock-dragging, html.mbs-dock-dragging body { overscroll-behavior: none; }

/* ---------- 22. Desktop mode below 1280px wide ----------------------- */
/* Tablets in landscape and narrow desktop windows keep the desktop layout.
   The template restyles its menu below 1280px; keep the sidebar's colours. */
@media (pointer: fine), (pointer: none), (pointer: coarse) and (orientation: landscape) and (min-height: 601px) {
  .top-nav > ul li .top-menu.top-menu--active .top-menu__title { color: inherit !important; }
  .top-nav > ul li .top-menu.top-menu--active .top-menu__icon { color: rgba(174, 187, 223, .75); }
}
@media (pointer: fine) and (max-width: 1279px), (pointer: none) and (max-width: 1279px), (pointer: coarse) and (orientation: landscape) and (min-height: 601px) and (max-width: 1279px) {
  .content .intro-y.flex.h-10:has(> .DesktopView) { flex-wrap: wrap; height: auto; min-height: 2.5rem; row-gap: .6rem; margin-bottom: 1rem; }
  .content .intro-y.flex.h-10:has(> .DesktopView) > h2 { margin-bottom: 0 !important; }
  .content .intro-y.flex.h-10:has(> .DesktopView) > .DesktopView { margin-top: 0 !important; }
  .content .intro-y.h-10.sm\:flex { flex-wrap: wrap; height: auto; row-gap: .75rem; margin-bottom: 1.25rem; }
  .content .intro-y.h-10.sm\:flex > h2 { margin-bottom: 0 !important; }
  .content .intro-y.h-10.sm\:flex > .sm\:ml-auto { margin-bottom: 0 !important; flex-wrap: wrap; row-gap: .5rem; }
  .content .intro-y.h-10.sm\:flex > .sm\:ml-auto > .flex { flex-wrap: wrap; gap: .5rem; }
  .content .intro-y.h-10.sm\:flex > .sm\:ml-auto > .flex > *, .content .intro-y.h-10.sm\:flex > .sm\:ml-auto > .flex form > * { margin-left: 0 !important; }
  .content .box > .flex.items-center.p-5.border-b { flex-wrap: wrap; row-gap: .5rem; }
}

/* ---------- 23. Tablet landscape -------------------------------------- */
/* Touch tablets held sideways use desktop mode, tuned for their width:
   heading controls sit under the heading, dashboards keep the normal-view
   panel layout, the spray chart and panel use the dock (section 21), and
   profile / team forms keep their normal-view columns. */
@media (pointer: coarse) and (orientation: landscape) and (min-height: 601px) {
  .content .intro-y.flex.h-10:has(> .DesktopView) {
    flex-wrap: wrap; height: auto; min-height: 0; align-items: center;
    gap: .6rem; margin-bottom: 1.25rem;
  }
  .content .intro-y.flex.h-10:has(> .DesktopView) .btn.w-44 { width: auto !important; min-width: 0 !important; padding-left: .65rem !important; padding-right: .65rem !important; }
  .content .intro-y.flex.h-10:has(> .DesktopView) > .DesktopView .flex > .btn:last-child { margin-right: 0 !important; }
  .report-box .text-3xl { font-size: 1.55rem !important; line-height: 1.85rem !important; }
  .content .intro-y.flex.h-10:has(> .DesktopView) > h2 { flex-basis: 100%; margin: 0 !important; }
  .content .intro-y.flex.h-10:has(> .DesktopView) > .DesktopView { margin: 0 !important; }
  .content .intro-y.h-10.sm\:flex { flex-wrap: wrap; height: auto; gap: .75rem; margin-bottom: 1.25rem; }
  .content .intro-y.h-10.sm\:flex > h2 { flex-basis: 100%; margin: 0 !important; }
  .content .intro-y.h-10.sm\:flex > .sm\:ml-auto { margin: 0 !important; flex-wrap: wrap; gap: .5rem; }
  .content .intro-y.h-10.sm\:flex > .sm\:ml-auto > .flex { flex-wrap: wrap; gap: .5rem; }
  .content .intro-y.h-10.sm\:flex > .sm\:ml-auto > .flex > *, .content .intro-y.h-10.sm\:flex > .sm\:ml-auto > .flex form > * { margin-left: 0 !important; }

  .content .grid > .col-span-12.sm\:col-span-6.xl\:col-span-3 { grid-column: span 4 / span 4; }
  .content .grid > .col-span-12.sm\:col-span-6.lg\:col-span-9 { grid-column: span 8 / span 8; }
  .content .grid > .col-span-12.sm\:col-span-6.xl\:col-span-4.intro-y { grid-column: span 4 / span 4; }
  .content .grid > .col-span-12.sm\:col-span-6.lg\:col-span-6:has(.report-box) { grid-column: span 8 / span 8; }
  .content .grid > .col-span-12.sm\:col-span-6.lg\:col-span-6:has(.report-box) .grid > .col-span-12.sm\:col-span-6.xl\:col-span-6.intro-y { grid-column: span 4 / span 4; }

  .content:has(#avatarimage) form .grid > .\32xl\:col-span-6:not(.text-center),
  .content:has(#teamimage) form .grid > .\32xl\:col-span-6 { grid-column: span 6 / span 6; }
  .content:has(#avatarimage) form .grid > .\32xl\:col-span-3,
  .content:has(#teamimage) form .grid > .\32xl\:col-span-3 { grid-column: span 3 / span 3; }
  .content:has(#avatarimage) form .grid > .\32xl\:col-span-2,
  .content:has(#teamimage) form .grid > .\32xl\:col-span-2 { grid-column: span 2 / span 2; }
  .content:has(#avatarimage) form .grid > .\32xl\:col-span-4,
  .content:has(#teamimage) form .grid > .\32xl\:col-span-4 { margin-top: 2rem !important; padding-top: 1.75rem; border-top: 1px solid var(--mbs-line); }
  .content:has(#avatarimage) form .grid > .\32xl\:col-span-4 > .grid { max-width: 40rem; }
  .content:has(#teamimage) form .grid > .\32xl\:col-span-4 > .grid { max-width: 26rem; }
  .content:has(#avatarimage) form .grid > .\32xl\:col-span-4 > .grid > .\32xl\:col-span-6.text-center > * { height: 100%; }
  .content:has(#avatarimage) form .grid > .\32xl\:col-span-4 > .grid > .\32xl\:col-span-6.text-center { grid-column: span 6 / span 6; margin-top: 0 !important; }
}

/* 24. Page top aligned with the DASHBOARDS heading in the side menu (desktop + tablet landscape) */
@media (pointer: fine), (pointer: none), (pointer: coarse) and (orientation: landscape) and (min-height: 601px) {
  body:has(.top-nav) .content { margin-top: -33px; }
  body:has(.top-nav) .content > .grid > .col-span-12 > .grid > .col-span-12:first-child > .flex.h-20:first-child { margin-top: -4px; }
  body:has(.top-nav) .content > .intro-y.flex.mt-6:first-child { margin-top: calc(1.5rem - 3px) !important; }
  body:has(.top-nav) .content .DesktopView > .mt-8:has(> h2:first-child):not(.mt-8 ~ .mt-8) { margin-top: calc(2rem - 15px) !important; }
}

/* 24b. Team & Career dashboards: Approvals/Chat/Notes panel level with the first row of stat boxes */
@media (min-width: 1536px) and (pointer: fine), (min-width: 1536px) and (pointer: none) {
  .content:has(.report-box) .grid > #tabsection:first-child + div { margin-top: 43px !important; }
}

/* 25. My Profile nickname row (tablet landscape) */
@media (pointer: coarse) and (orientation: landscape) and (min-height: 601px) {
  .content:has(#avatarimage) div:has(> .\32xl\:col-span-3 #nickname) > .\32xl\:col-span-3 { display: flex; flex-direction: column; }
  .content:has(#avatarimage) div:has(> .\32xl\:col-span-3 #nickname) > .\32xl\:col-span-3 > :last-child { margin-top: auto; }
  .content:has(#avatarimage) div:has(> .\32xl\:col-span-3 #nickname) > .\32xl\:col-span-3:has(#heightfeet) > .flex { flex: 1; align-items: stretch; }
  .content:has(#avatarimage) div:has(> .\32xl\:col-span-3 #nickname) > .\32xl\:col-span-3:has(#heightfeet) > .flex > div { display: flex; flex-direction: column; }
  .content:has(#avatarimage) div:has(> .\32xl\:col-span-3 #nickname) > .\32xl\:col-span-3:has(#heightfeet) > .flex > div > select { margin-top: auto; }
  .content:has(#avatarimage) .\32xl\:col-span-3:has(> #nickname) > .flex:first-child { flex-direction: column; align-items: flex-start; }
  .content:has(#avatarimage) .\32xl\:col-span-3:has(> #nickname) > .flex:first-child > .ml-auto { margin-left: 0 !important; margin-bottom: .5rem; display: flex; align-items: center; gap: .4rem; }
  .content:has(#avatarimage) .\32xl\:col-span-3:has(> #nickname) > .flex:first-child > .ml-auto .form-check-label { margin-left: 0; }
}

/* 26. Dashboards: Update Batting Stats button on a white background */
.content:has(.report-box) .MobileView a.btn.btn-success[href$="update-batting-stats"]:not(#mbs-none) {
  background: #fff !important;
  border-color: var(--mbs-line) !important;
  color: var(--mbs-navy-900) !important;
  box-shadow: 0 1px 2px rgba(10, 26, 65, .08) !important;
}
.content:has(.report-box) .MobileView a.btn.btn-success[href$="update-batting-stats"]:not(#mbs-none) svg {
  color: var(--mbs-lime-500) !important;
  stroke: var(--mbs-lime-500) !important;
}

/* 27. Green icons app-wide use the same green as the Update Batting Stats icon */
.text-success svg.lucide, svg.lucide.text-success, .btn-outline-success svg.lucide,
.text-success svg.lucide *, svg.lucide.text-success * {
  color: var(--mbs-lime-500) !important;
  stroke: var(--mbs-lime-500) !important;
}

/* 28. Dashboards: icons in the mobile action button group match the Update Batting Stats icon */
.content:has(.report-box) .MobileView a.btn.w-full:not(#mbs-none) svg {
  color: var(--mbs-lime-500) !important;
  stroke: var(--mbs-lime-500) !important;
}

/* 29. Top bar Player / Team: label, value and switch on one line (desktop + tablet landscape) */
@media (pointer: fine), (pointer: none), (pointer: coarse) and (orientation: landscape) and (min-height: 601px) {
  #playername1 > div, #teamname1 > div {
    display: flex !important;
    align-items: baseline;
    gap: .45rem;
  }
  #playername1 > div::before, #teamname1 > div::before { line-height: 1; }
  #playername1 > div > span, #teamname1 > div > span { line-height: 1.2rem; }
  #playername1 > div > button, #teamname1 > div > button { flex-shrink: 0; align-self: center; }
  form:has(#playername1) { padding-right: 1rem !important; }
  form:has(#teamname1) { border-left: 1px solid rgba(10, 26, 65, .15) !important; padding-left: 1rem !important; }
}

/* 30. Mobile: consistent vertical rhythm (matches Update Team Fixture) */
@media (pointer: coarse) and (orientation: portrait), (pointer: coarse) and (max-height: 600px) {
  .content > .grid > .col-span-12 > .grid > .col-span-12:first-child:not(:has(select)) + .col-span-12.-mt-6:has(form) { margin-top: -36px !important; }
  .content:has(#teamimage) > .intro-y.flex.mt-6:first-child + .grid > .col-span-12:first-child > .box { margin-top: 37px !important; }
  .content .box > .p-5 > .grid.grid-cols-12.mt-6:not(:has(*)) { display: none !important; }
  .content .box .p-5 .flex.flex-col-reverse > .grid.mt-6:first-child { margin-top: 0 !important; }
  .content .box .p-5 .flex.flex-col-reverse > .grid.mt-6:first-child > .col-span-12:first-child > .grid > .col-span-12:first-child > .intro-x.mt-5:first-child { margin-top: 0 !important; }
  .content .box .p-5 > .grid > .col-span-12.mt-8:has(> .intro-y > .overflow-x-auto > table) { margin-top: 0 !important; }
  .content .box .p-5 > .grid > .col-span-12.mt-8 > .intro-y:has(> .overflow-x-auto > table) { margin-top: 24px !important; }
  .content:has(#teamimage) .box > .col-span-12.p-5:has(> .intro-x) { padding-bottom: 0 !important; }
  .content:has(#teamimage) .box > .col-span-12.p-5:has(> .intro-x) + .p-5 { padding-top: 4px !important; }
}

/* 31. Footer sits at the bottom of the screen on short pages (all modes) */
body.main { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
body.main > .wrapper { flex: 1 0 auto; display: flex; flex-direction: column; }
body.main > .wrapper > .wrapper-box { flex: 1 0 auto; margin-bottom: 2.5rem !important; }
body.main > .wrapper > .mbs-footer { width: 100%; margin-top: auto !important; flex-shrink: 0; }
body.main > .mbs-footer { width: 100%; flex-shrink: 0; }
body.main > .wrapper:not(:has(> .mbs-footer)) { padding-bottom: 0 !important; }
body.main > .mbs-footer { padding-bottom: 1rem !important; }
body.main > .wrapper:has(> .mbs-footer) { padding-bottom: 1rem !important; }

/* 32. Chat window (iframe): message and new-message cards match Approvals / Notes */
body:has(#form-add-message-to-chat) .box.zoom-in {
  box-shadow: none !important;
  background: #f8f9fc !important;
  border-color: var(--mbs-line) !important;
  border-radius: var(--mbs-radius) !important;
}
body:has(#form-add-message-to-chat) .box.zoom-in .font-medium { font-weight: 500; font-size: .8125rem; }

/* 33. Mobile pages: My Subscriptions (mysubscriptions) and Join a Team (jointeam) */
.mbs-sub-value, .mbs-jt-value {
  color: var(--mbs-text);
  font-weight: 500;
  overflow-wrap: anywhere;
}
.mbs-sub-value {
  min-height: 2.5rem;
  display: flex;
  align-items: center;
  padding: .5rem .75rem;
  background: #f8f9fc;
  border: 1px solid var(--mbs-line);
  border-radius: var(--mbs-radius-sm);
}
.mbs-sub-badge {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: .25rem .625rem;
  border-radius: 9999px;
  font-size: .75rem;
  font-weight: 600;
}
.mbs-sub-badge--on { background: var(--mbs-lime-400); color: var(--mbs-navy-900); }
.mbs-sub-badge--off { background: #fdecec; color: var(--mbs-crimson); }
.mbs-sub-badge--free { background: #eef1f7; color: var(--mbs-muted); }
.mbs-jt-card {
  background: var(--mbs-card);
  border: 1px solid var(--mbs-line);
  border-radius: var(--mbs-radius);
  box-shadow: var(--mbs-shadow);
  padding: 1rem;
}
.mbs-jt-label {
  color: var(--mbs-muted);
  font-size: .75rem;
  margin-bottom: .125rem;
}
.mbs-jt-joined {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: .25rem .625rem;
  border-radius: 9999px;
  background: #eef1f7;
  border: 1px solid var(--mbs-line-strong);
  color: var(--mbs-navy-900);
  font-size: .75rem;
  font-weight: 600;
}
.mbs-jt-joined svg.lucide,
.mbs-jt-joined svg.lucide * {
  color: var(--mbs-lime-500) !important;
  stroke: var(--mbs-lime-500) !important;
  stroke-width: 3;
}
.mbs-jt-empty {
  padding: 2rem 1rem;
  background: #f8f9fc;
  border: 1px dashed var(--mbs-line-strong);
  border-radius: var(--mbs-radius);
}

/* 34. Player Profile card: jersey tile beside the profile photo (all dashboards) */
.box.p-5 > .grid > div:has(> .mbs-profile-shirt) {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
.box.p-5 > .grid > div:has(> .mbs-profile-shirt) > img[src*="member-profile-uploads"] {
  max-width: calc(50% - .5rem) !important;
  flex: 0 1 auto;
}
.mbs-profile-shirt {
  position: relative;
  flex: 0 0 auto;
  height: 8.5rem;
  aspect-ratio: 3 / 4;
  max-width: calc(50% - .5rem);
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  border-radius: .75rem;
  filter: drop-shadow(0 8px 16px rgba(10, 26, 65, .15));
  overflow: hidden;
}
.mbs-profile-shirt > img {
  width: 84%;
  height: 84%;
  object-fit: contain;
  pointer-events: none;
}
.mbs-profile-shirt__number {
  position: absolute;
  left: 0;
  right: 0;
  top: 38%;
  transform: translateY(-50%);
  text-align: center;
  font-family: var(--mbs-display);
  font-size: 1.56rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .02em;
  color: var(--mbs-navy-900);
  pointer-events: none;
}
.mbs-profile-shirt__number--long { font-size: 1.14rem; }

/* 35. Tablet landscape: one chart per row on the dashboards, team logo centred in its box */
@media (pointer: coarse) and (orientation: landscape) and (min-height: 601px) {
  .content .grid > .col-span-12.lg\:col-span-6:has(canvas[id^="report-"]) { grid-column: span 12 / span 12; }
  .content:has(#teamimage) form .border-dashed .grid > .\32xl\:col-span-6 { grid-column: span 12 / span 12; }
  .content:has(#teamimage) form .border-dashed .grid > .\32xl\:col-span-6 > .flex { margin-top: 1.5rem; }
}

/* 36. Page heading + card pages (Manage Teammates, Join a Team, Team Fixtures, Update Batting Stats,
   My Profile > Subscriptions): page title above a bordered white card, as on My Profile, in every view */
.content .mbs-page-card {
  margin-top: 1.25rem;
  row-gap: 1.25rem;
  padding: 0 1.25rem 1.25rem;
  background: var(--mbs-card);
  border: 1px solid var(--mbs-line);
  border-radius: var(--mbs-radius-lg);
  box-shadow: var(--mbs-shadow);
}
@media (min-width: 1024px) {
  .content .mbs-page-card { margin-top: 1.5rem; }
}
.content .mbs-page-card > .col-span-12:first-child > .flex.h-20:first-child {
  height: auto;
  min-height: 65px;
  margin: 0 -1.25rem 1.25rem;
  padding: .625rem 1.25rem;
  border-bottom: 1px solid var(--mbs-line);
}
.content .mbs-page-card > .col-span-12:first-child > .flex.h-20:first-child > h2 {
  font-family: var(--mbs-font) !important;
  font-size: .9rem !important;
  line-height: 1.5rem !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  color: var(--mbs-navy-900) !important;
}
.content .mbs-page-card > .col-span-12:first-child > .flex.h-20:first-child > .ml-auto,
.content .mbs-page-card > .col-span-12:first-child > .flex.h-20:first-child > .ml-auto > form { display: flex; align-items: center; gap: .5rem; }
.content .mbs-page-card > .col-span-12:first-child > .flex.h-20:first-child .btn { margin: 0 !important; }
@media (pointer: coarse) and (orientation: portrait), (pointer: coarse) and (max-height: 600px) {
  .mbs-mobile-page .mbs-side-menu + div > .mbs-page-card { margin-top: 0; }
}

/* 37. Shared player dashboard: clean header, just the dark logo (as on the marketing site) */
body.main:not(:has(> .top-nav > ul)) > .mobile-menu.mbs-shared-header {
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  overflow: visible;
}
body.main:not(:has(> .top-nav > ul)) > .mobile-menu.mbs-shared-header .mobile-menu-bar {
  height: auto !important;
  padding: .75rem 0 0 !important;
  background: transparent !important;
}
body.main:not(:has(> .top-nav > ul)) > .mobile-menu.mbs-shared-header .mobile-menu-bar img { height: 3rem !important; }
@media (max-width: 639px) {
  body.main:not(:has(> .top-nav > ul)) > .mobile-menu.mbs-shared-header .mobile-menu-bar { height: auto !important; padding: .5rem 0 0 !important; }
  body.main:not(:has(> .top-nav > ul)) > .mobile-menu.mbs-shared-header .mobile-menu-bar img { height: 2.5rem !important; }
}

/* 39. Dashboard stats tables: stacked layout in every view (normal, tablet, mobile).
   Each game / player / season is a block: its identity line (stays in view when scrolling
   sideways), then the stat headings, the stats and the plate appearances on their own rows.
   Built by dist/js/mbs-stats-stack.js; the original table is kept, hidden. */
.content .overflow-x-auto:has(> table.mbs-stacked) { display: none; }
.mbs-stack-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--mbs-card);
  border: 1px solid var(--mbs-line);
  border-radius: var(--mbs-radius-lg);
  box-shadow: var(--mbs-shadow);
}
.mbs-stack-wrap:empty { display: none; }
.mbs-stack-table { width: 100%; min-width: calc(var(--mbs-stack-cols, 23) * 2.1rem); border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.mbs-stack-table td, .mbs-stack-table th { padding: .45rem .1rem; text-align: center; border: 0; }
.mbs-stack-table col.mbs-stack-col-wide { width: 2.9rem; }
.mbs-stack-table col.mbs-stack-col-gp { width: 8.75rem; }
.mbs-stack-table .mbs-stack-gpcol { text-align: left !important; padding-left: 1rem !important; white-space: nowrap; }
.mbs-stack-vals td.mbs-stack-gpcol { font-weight: 400; vertical-align: top; }
.mbs-stack-total-vals td.mbs-stack-gpcol { vertical-align: middle; }
.mbs-stack-gpcol .flex { gap: .5rem; align-items: flex-start; }
.mbs-stack-vals .mbs-stack-gpcol * { line-height: 1.35rem !important; }
.mbs-stack-gpcol .w-10 { width: auto; min-width: 1.1rem; text-align: left; }
.mbs-stack-gpcol strong, .mbs-stack-gpcol .text-lg { font-size: .8rem !important; font-weight: 600; line-height: 1.35rem; }
.mbs-stack-gpcol .text-base { font-size: .74rem !important; line-height: 1.35rem; color: var(--mbs-muted); }
.mbs-stack-table td[colspan] { padding: 0; text-align: left; }
.mbs-stack-sticky {
  position: sticky;
  left: 0;
  box-sizing: border-box;
  width: var(--mbs-stack-w, 100%);
  padding: .75rem 1rem;
}
.mbs-stack-sticky .force-line-break { display: none; }
.mbs-stack-section > td { background: #f1f5f9; border-bottom: 1px solid var(--mbs-line) !important; }
.mbs-stack-section .mbs-stack-sticky { padding: .6rem 1rem; }
.mbs-stack-section .mbs-stack-sticky .mb-4 { margin-bottom: 0; }
.mbs-stack-section .mbs-stack-sticky img { height: 1.75rem; width: auto; }
.mbs-stack-section .mbs-stack-sticky > .flex { align-items: center; }
.mbs-stack-section .mbs-stack-sticky > .flex > div { margin-top: 0 !important; }
.mbs-stack-game > td { border-top: 1px solid var(--mbs-line) !important; }
.mbs-stack-section + .mbs-stack-game > td { border-top: 0 !important; }
.mbs-stack-game .mbs-stack-sticky { display: flex; align-items: center; gap: .75rem; padding-bottom: .4rem; }
.mbs-stack-info { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: .75rem; row-gap: .1rem; min-width: 0; }
.mbs-stack-game-no { font-family: var(--mbs-display); font-size: 1.05rem; font-weight: 600; color: var(--mbs-navy-900); letter-spacing: .01em; }
.mbs-stack-date, .mbs-stack-date a { color: var(--mbs-muted) !important; font-size: .8rem; white-space: nowrap; }
.mbs-stack-vs a { color: var(--mbs-navy-900); }
.mbs-stack-vs-label { margin-right: .3rem; font-size: .8rem; font-weight: 500; color: var(--mbs-muted); }
.mbs-stack-season .mbs-stack-info { column-gap: 1rem; }
.mbs-stack-jersey .mr-6 { margin-right: 0 !important; }
.mbs-stack-vs .text-base { font-size: .9rem; }
.mbs-stack-vs .text-success, .mbs-stack-vs .text-danger, .mbs-stack-vs .text-warning { font-size: .8rem; }
.mbs-stack-game .mbs-stack-sticky > .btn { margin-left: auto; flex-shrink: 0; padding: .35rem .5rem; }
.mbs-stack-game .mbs-stack-sticky > .btn svg { width: 1rem; height: 1rem; }
.mbs-stack-heads th {
  background: #f8f9fc;
  color: var(--mbs-muted);
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
}
.mbs-stack-heads th:first-child, .mbs-stack-vals td:first-child { padding-left: 1rem; text-align: left; }
.mbs-stack-heads th:last-child, .mbs-stack-vals td:last-child { padding-right: .5rem; }
.mbs-stack-vals td { font-size: .8rem; line-height: 1.35rem; font-weight: 600; letter-spacing: -.01em; color: var(--mbs-navy-900); white-space: nowrap; }
.mbs-stack-vals td:not(.mbs-stack-gpcol) * { font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: inherit !important; }
.mbs-stack-player .mbs-stack-id .text-base { font-family: var(--mbs-display); font-size: 1.05rem; font-weight: 600; letter-spacing: .01em; color: var(--mbs-navy-900); }
.mbs-stack-player .mbs-stack-id a { color: var(--mbs-navy-900); }
.mbs-stack-vs-label { display: inline !important; visibility: visible !important; }
.mbs-player-id { display: inline-flex; align-items: center; gap: .6rem; }
.mbs-player-shirt { position: relative; flex: none; display: inline-block; width: 2.75rem; height: 2.75rem; }
.mbs-player-shirt img { width: 100%; height: 100%; object-fit: contain; display: block; }
.mbs-player-shirt span { position: absolute; left: 0; right: 0; top: 27%; text-align: center; font-family: var(--mbs-font); font-size: .72rem; font-weight: 600; line-height: 1; color: var(--mbs-navy-900); pointer-events: none; }
.mbs-player-name { display: inline-flex; align-items: baseline; }
.mbs-player-name a { text-decoration: underline; text-underline-offset: 2px; }
.mbs-stack-season .mbs-stack-game .mbs-stack-info { align-items: center; flex-wrap: nowrap; }
.mbs-stack-season .mbs-stack-game .mbs-stack-sticky { padding-top: .75rem; padding-bottom: .75rem; }
.mbs-stack-season .mbs-stack-id .text-base { font-family: var(--mbs-display); font-size: 1.05rem; font-weight: 600; letter-spacing: .01em; color: var(--mbs-navy-900); line-height: 1.3rem; }
.mbs-stack-season .mbs-stack-id a { color: var(--mbs-navy-900); }
.mbs-stack-season .mbs-stack-id .text-xs { font-family: var(--mbs-font); font-size: .72rem; font-weight: 400; letter-spacing: 0; line-height: 1.1rem; color: var(--mbs-muted); }
.mbs-stack-table .mbs-stack-sum { background: #f4f6fb; }
.mbs-stack-heads th.mbs-stack-sum { background: #eef1f7; }
.mbs-stack-pa .mbs-stack-sticky { padding-top: .5rem; padding-bottom: .9rem; font-size: .78rem; color: var(--mbs-muted); }
.mbs-pa { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .6rem; }
.mbs-pa-label { font-weight: 500; color: var(--mbs-navy-900); }
.mbs-pa-group { display: inline-flex; gap: .6rem; white-space: nowrap; }
.mbs-stack-info > a:first-child:empty { position: absolute; }
.mbs-stack-total-empty > td { padding-bottom: .25rem; }
.mbs-stack-id { display: inline-flex; align-items: center; color: var(--mbs-navy-900); }
.mbs-stack-id .text-base { font-size: .95rem; font-weight: 600; }
.mbs-stack-id .text-xs { font-size: .72rem; color: var(--mbs-muted); }
.mbs-stack-id > .flex, .mbs-stack-id .flex.items-center { align-items: center; }
.mbs-stack-id .mr-6 { margin-right: .25rem; }
.mbs-stack-gp { display: inline-flex; align-items: baseline; gap: .35rem; font-size: .8rem; color: var(--mbs-muted); }
.mbs-stack-gp .flex { align-items: baseline; gap: .35rem; }
.mbs-stack-gp .w-10 { width: auto; }
.mbs-stack-gp strong, .mbs-stack-gp .text-base { font-size: .9rem; }
.mbs-stack-gp-label { text-transform: uppercase; letter-spacing: .04em; font-size: .62rem; font-weight: 600; }
.mbs-stack-total .mbs-stack-info { align-items: baseline; }
.mbs-stack-total > td { border-top: 2px solid var(--mbs-line-strong) !important; background: #fbfcfe; }
.mbs-stack-total-label { font-family: var(--mbs-display); font-size: 1rem; font-weight: 600; color: var(--mbs-navy-900); }
.mbs-stack-total-vals td { padding-bottom: .9rem; }

/* 40. Reset Search button: one clear, consistent control on every search form */
.mbs-reset-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  height: 2.25rem;
  padding: 0 .95rem;
  font-family: var(--mbs-font);
  font-size: .8rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  color: var(--mbs-navy-900) !important;
  background: #fff;
  border: 1px solid var(--mbs-line-strong);
  border-radius: 9999px;
  box-shadow: var(--mbs-shadow-xs);
  cursor: pointer;
  text-decoration: none !important;
  transition: background-color .15s var(--mbs-ease), border-color .15s var(--mbs-ease), color .15s var(--mbs-ease);
}
.mbs-reset-btn svg { width: 1rem; height: 1rem; flex-shrink: 0; color: var(--mbs-muted); stroke: currentColor; transition: transform .35s var(--mbs-ease), color .15s var(--mbs-ease); }
.mbs-reset-btn:hover, .mbs-reset-btn:focus-visible { background: #eef1f7; border-color: #c4cde0; outline: none; }
.mbs-reset-btn:hover svg, .mbs-reset-btn:focus-visible svg { color: var(--mbs-navy-900); transform: rotate(-200deg); }
.mbs-reset-btn:active { background: #e4e9f3; }
.mbs-reset-btn--block { display: flex; width: 100%; }

/* 41. Stats stack: highlight the whole game or totals block on hover */
.mbs-stack-table tr[data-mbs-block] > :is(td, th) { transition: background-color .15s ease; }
.mbs-stack-table tr.mbs-stack-hover > :is(td, th) { background-color: var(--mbs-navy-50); }
.mbs-stack-table tr.mbs-stack-hover > :is(td, th).mbs-stack-sum,
.mbs-stack-table tr.mbs-stack-hover.mbs-stack-heads > th { background-color: #e5eaf5; }

/* 42. Player dashboards: view/update batting stats button keeps its white background with a green icon */
table.mbs-stack-game tr.mbs-stack-game .mbs-stack-sticky > .btn svg,
table.mbs-stack-game tr.mbs-stack-game .mbs-stack-sticky > .btn:hover svg { color: var(--mbs-lime-400); stroke: var(--mbs-lime-400); }

/* 43. Dashboard tickers: on-palette green and amber that stay readable (WCAG AA on white) */
.report-box .widget-tickers .text-success { color: #47821a !important; }
.report-box .widget-tickers .text-warning { color: #b85c0a !important; }

/* 44. Share Dashboard card: a clean popover with the link, a copy button and a copied state */
.mbs-share {
  z-index: 60;
  box-sizing: border-box;
  padding: 1rem 1rem 1.1rem;
  background: var(--mbs-card);
  border: 1px solid var(--mbs-line);
  border-radius: var(--mbs-radius-lg);
  box-shadow: 0 18px 40px -12px rgba(10, 26, 65, .28), 0 2px 6px rgba(10, 26, 65, .06);
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  text-align: left;
  animation: mbs-share-in .18s var(--mbs-ease);
}
@keyframes mbs-share-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateZ(0); } }
.mbs-share__head { display: flex; align-items: flex-start; gap: .75rem; }
.mbs-share__icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: .7rem;
  color: var(--mbs-lime-700);
  background: var(--mbs-lime-50);
}
.mbs-share__text { flex: 1; min-width: 0; }
.mbs-share__title { font-family: var(--mbs-display); font-size: 1rem; font-weight: 600; line-height: 1.3; color: var(--mbs-navy-900); }
.mbs-share__hint { margin-top: .15rem; font-size: .75rem; line-height: 1.35; color: var(--mbs-muted); }
.mbs-share__close {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  margin: -.2rem -.2rem 0 0;
  border-radius: 999px;
  color: var(--mbs-faint);
  transition: background-color .15s, color .15s;
}
.mbs-share__close:hover { color: var(--mbs-navy-800); background: var(--mbs-navy-50); }
.mbs-share__row { display: flex; gap: .5rem; margin-top: .9rem; }
.mbs-share .mbs-share__url {
  flex: 1;
  min-width: 0;
  height: 2.5rem;
  margin: 0 !important;
  padding: 0 .75rem;
  font-size: .8rem;
  color: var(--mbs-text);
  text-overflow: ellipsis;
  background: #f8f9fc;
  border: 1px solid var(--mbs-line-strong);
  border-radius: .65rem;
  cursor: text;
}
.mbs-share .mbs-share__url:focus { background: #fff; border-color: var(--mbs-lime-500); box-shadow: 0 0 0 3px rgba(138, 203, 69, .2); }
.mbs-share .mbs-share__copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  flex-shrink: 0;
  min-width: 7.25rem;
  height: 2.5rem;
  margin: 0 !important;
  padding: 0 1rem;
  font-weight: 600;
  white-space: nowrap;
  border-radius: .65rem;
}
.mbs-share__done-icon { display: none; }
.mbs-share__copy.is-copied .mbs-share__copy-icon { display: none; }
.mbs-share__copy.is-copied .mbs-share__done-icon { display: inline-block; }
.mbs-share .btn.mbs-share__copy.is-copied { background-color: var(--mbs-lime-500) !important; border-color: var(--mbs-lime-500) !important; }
.mbs-share--desktop { position: absolute; right: 0; top: 100%; width: 25rem; margin-top: .6rem; }
.mbs-share-anchor { position: relative; z-index: 60; grid-column: 1 / -1; height: 0; }
.mbs-share-anchor:has(> .mbs-share[style*="none"]) { display: none; }
.mbs-share--mobile { position: absolute; left: 0; right: 0; top: 0; }

/* 45. Tablet portrait dashboards: full-width profile banner above the stat cards, 2 across (3 across for nine cards) */
@media (pointer: coarse) and (orientation: portrait) and (min-width: 600px) {
  .mbs-dash-profile, .mbs-dash-cards, div:not(.grid):has(> .mbs-dash-cards) { grid-column: 1 / -1 !important; }
  .mbs-dash-profile > .box.intro-y.p-5:not(#mbs-profile) > .grid.grid-cols-12 {
    display: grid !important;
    grid-template-columns: calc((100% - 1.5rem) / 2) minmax(0, 1fr);
    grid-template-rows: 1fr auto auto 1fr;
  }
  .mbs-dash-profile > .box.intro-y.p-5:not(#mbs-profile) > .grid.grid-cols-12 > div:has(> img) {
    grid-column: 1;
    grid-row: 1 / -1;
    height: auto !important;
    padding: 1.5rem !important;
    border-bottom: 0;
    border-right: 1px solid var(--mbs-line);
  }
  .mbs-dash-profile > .box.intro-y.p-5:not(#mbs-profile) > .grid.grid-cols-12 > div:not(:has(> img)) { grid-column: 2; grid-row: 2; padding: 1.5rem 1.75rem !important; }
  .mbs-dash-profile > .box.intro-y.p-5:not(#mbs-profile) > .grid.grid-cols-12 > div:not(:has(> img)) ~ div:not(:has(> img)) { grid-row: 3; }
  .mbs-dash-profile > .box.intro-y.p-5:not(#mbs-profile):has(#teamimage) > .grid.grid-cols-12 > div:not(:has(> img)):first-child { padding-bottom: 0 !important; }
  .mbs-dash-profile > .box.intro-y.p-5:not(#mbs-profile):has(#teamimage) > .grid.grid-cols-12 > div:not(:has(> img)) ~ div:not(:has(> img)) { padding-top: .9rem !important; }
  .mbs-dash-cards > .grid { grid-auto-rows: 1fr; }
  .mbs-dash-cards > .grid > div { grid-column: span 6 / span 6 !important; }
  .mbs-dash-cards > .grid:has(> div:nth-child(7)) > div { grid-column: span 4 / span 4 !important; }
  .mbs-dash-cards > .grid > div > .report-box,
  .mbs-dash-cards > .grid > div > .report-box > .box { height: 100%; }
}

/* 46. Tablet landscape dashboards: full-width profile banner above the stat cards, 3 across */
@media (pointer: coarse) and (orientation: landscape) and (min-height: 601px) {
  .mbs-dash-profile, .mbs-dash-cards, div:not(.grid):has(> .mbs-dash-cards) { grid-column: 1 / -1 !important; }
  .mbs-dash-profile > .box.intro-y.p-5:not(#mbs-profile) > .grid.grid-cols-12 {
    display: grid !important;
    grid-template-columns: calc((100% - 3rem) / 3) minmax(0, 1fr);
    grid-template-rows: 1fr auto auto 1fr;
  }
  .mbs-dash-profile > .box.intro-y.p-5:not(#mbs-profile) > .grid.grid-cols-12 > div:has(> img) {
    grid-column: 1;
    grid-row: 1 / -1;
    height: auto !important;
    padding: 1.5rem !important;
    border-bottom: 0;
    border-right: 1px solid var(--mbs-line);
  }
  .mbs-dash-profile > .box.intro-y.p-5:not(#mbs-profile) > .grid.grid-cols-12 > div:not(:has(> img)) { grid-column: 2; grid-row: 2; padding: 1.5rem 2rem !important; }
  .mbs-dash-profile > .box.intro-y.p-5:not(#mbs-profile) > .grid.grid-cols-12 > div:not(:has(> img)) ~ div:not(:has(> img)) { grid-row: 3; }
  .mbs-dash-profile > .box.intro-y.p-5:not(#mbs-profile) > .grid.grid-cols-12 > div:not(:has(> img)):is(:has(> div > .text-xs), :has(> div:nth-child(2))) {
    display: grid !important;
    grid-template-columns: repeat(4, max-content) !important;
    justify-content: start;
    column-gap: 2.5rem !important;
    row-gap: .7rem;
  }
  .mbs-dash-profile > .box.intro-y.p-5:not(#mbs-profile) > .grid.grid-cols-12 > div:not(:has(> img)) > div { margin-top: 0 !important; }
  .mbs-dash-profile > .box.intro-y.p-5:not(#mbs-profile):has(#teamimage) > .grid.grid-cols-12 > div:not(:has(> img)):is(:has(> div > .text-xs), :has(> div:nth-child(2))) { grid-template-columns: repeat(2, max-content) !important; }
  .mbs-dash-profile > .box.intro-y.p-5:not(#mbs-profile):has(#teamimage) > .grid.grid-cols-12 > div:not(:has(> img)):first-child { padding-bottom: 0 !important; }
  .mbs-dash-profile > .box.intro-y.p-5:not(#mbs-profile):has(#teamimage) > .grid.grid-cols-12 > div:not(:has(> img)) ~ div:not(:has(> img)) { padding-top: .9rem !important; }
  .mbs-dash-cards > .grid { height: auto !important; grid-auto-rows: 1fr; }
  .mbs-dash-cards > .grid > div { grid-column: span 4 / span 4 !important; }
}

/* 47. Dashboard tickers: initials on the first line, ticker text on its own line beneath */
.mbs-dash-cards .report-box .box > div:last-child:not(.flex) > span { display: block; }
.mbs-dash-cards .report-box .box > div:last-child:not(.flex) > span::first-letter { text-transform: uppercase; }
.mbs-dash-cards .report-box .box > div:last-child:not(.flex) { height: auto !important; min-height: 0; overflow: visible; }

/* 48. Dashboard stat cards: value, initials and ticker sit together on the card's bottom edge */
.mbs-dash-cards .report-box .box { padding-top: 1.55rem !important; padding-bottom: 1.5rem !important; }
.mbs-dash-cards .report-box .box > div:last-child:not(.flex) {
  display: flex !important;
  flex-direction: column;
  justify-content: flex-end;
}

/* 49. Dashboard stat cards: a card with no ticker text lifts its value and initials level with the cards beside it */
.mbs-dash-cards .report-box .box > div:last-child:not(.flex):not(:has(> span))::after {
  content: "";
  display: block;
  height: var(--mbs-ticker-match, 0px);
}

/* 51. Inline row editing (Team Fixtures, Teammates): the save button keeps its space but only shows once the row has changed */
button[id^="fixture-line-save-"]:not(.mbs-row-dirty),
button[id^="teammate-line-save-"]:not(.mbs-row-dirty) { visibility: hidden; }

/* 52. Share Dashboard card: its own layer so animated cards can't paint over it (iOS Safari) */
.MobileView:has(#mobileshowshareurl) { position: relative; z-index: 60; }
.intro-y:has(#desktopshowshareurl) { z-index: 61 !important; }
