:root{
  --navy: #12284B;
  --gold: #FFC52F;
  --cream: #FFF3D1;

  --bg: #08152F;
  --panel: #0E234B;

  --ink: #F4F1E6;
  --muted: rgba(244,241,230,.75);

  --shadow: 0 18px 40px rgba(0,0,0,.45);
  --radius: 16px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  color: var(--ink);
  background: var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}

/* subtle vintage texture */
body::before{
  content:"";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .10;
  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(255,255,255,.05) 0px,
      rgba(255,255,255,.05) 1px,
      transparent 1px,
      transparent 3px
    );
  mix-blend-mode: overlay;
}

.wrap{
  max-width: 860px;
  margin: 0 auto;
  padding: 14px 14px 20px;
}

/* Header */
.header{ padding: 10px 6px 12px; }

.brand{
  display:flex;
  align-items:center;
  gap:12px;
}

.logo{
  width:46px;
  height:46px;
  display:block;
}

.title{
  font-family: "Copperplate", "Copperplate Gothic Light", "Rockwell", "American Typewriter", Georgia, serif;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--cream);
  text-shadow: 0 2px 0 rgba(0,0,0,.40);
}

/* Tabs: full-width segmented control */
.tabs{
  margin: 0 6px 12px;
  display: flex;
  width: calc(100% - 12px);

  border: 1px solid rgba(255,197,47,.22);
  background: rgba(14,35,75,.92);
  border-radius: 999px;
  padding: 6px;
  overflow: hidden;
}

.tab{
  flex: 1 1 0;
  border: 0;
  background: transparent;
  color: rgba(244,241,230,.80);
  font-weight: 950;
  border-radius: 999px;
  padding: 10px 8px;
  white-space: nowrap;
}

.tab.active{
  background: rgba(255,197,47,.16);
  color: var(--cream);
  box-shadow: inset 0 0 0 1px rgba(255,197,47,.30);
}

/* Stingers section */
.stingers{
  margin: 0 6px 12px;
  padding: 8px 0 2px;
}

/* Single horizontal row + stop anchored right */
.stingers-row{
  display:flex;
  align-items:center;
  gap:10px;
  width:100%;
}

/* stingers stay in one row; scroll horizontally if needed */
#stingers{
  display:flex;
  gap:10px;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}

#stingers::-webkit-scrollbar{ height: 0; }

/* stinger buttons */
.stinger-btn{
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(255,197,47,.35);
  background: rgba(255,197,47,.12);
  color: var(--cream);
  display: grid;
  place-items: center;
  font-size: 20px;
  flex: 0 0 auto;
}
.stinger-btn:active{ transform: translateY(1px); }

/* stop button */
.stop-all-btn{
  width:46px;
  height:46px;
  border-radius:999px;
  border:1px solid rgba(255,80,80,.55);
  background:rgba(255,80,80,.15);
  display:grid;
  place-items:center;
  padding:0;
  flex: 0 0 auto;
  margin-left: auto;
}
.stop-all-btn svg{
  width:22px;
  height:22px;
  fill:#ff6b6b;
}
.stop-all-btn:active{ transform: translateY(1px); }

/* Panel */
.card{
  background: rgba(14,35,75,.92);
  border: 1px solid rgba(255,197,47,.25);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
  position: relative;
}

.card::before{
  content:"";
  position:absolute;
  inset: 10px;
  border-radius: calc(var(--radius) - 8px);
  border: 2px dashed rgba(255,197,47,.22);
  pointer-events:none;
}

.card-top{
  padding: 14px 14px 12px;
  border-bottom: 1px solid rgba(255,197,47,.18);
}

/* Scoreboard header row */
.score-head{
  display:grid;
  grid-template-columns: auto 1fr auto;
  align-items:center;
  gap: 10px;
}

/* Hide inning label + inning badge per your latest request */
.score-left{ display:none; }
.inning-badge{ display:none; }

/* Centered NOW BATTING */
.score-center{
  display:flex;
  justify-content:center;
  align-items:center;
  min-width: 0;
}

.nowbatting{
  text-align:center;
  font-family: "Rockwell", "American Typewriter", Georgia, serif;
  font-weight: 950;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--cream);

  padding: 2px 6px;
  max-width: 70vw;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nowbatting::before{
  content: "NOW BATTING";
  display:block;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(244,241,230,.70);
  margin-bottom: 10px; /* extra space between label and name */
}

/* Right side: preload button only */
.score-right{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:10px;
}

/* Preload button (circle like play) */
.preload-btn{
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,197,47,.40);
  background: rgba(255,197,47,.12);
  color: var(--cream);
  font-weight: 950;
  display:grid;
  place-items:center;
  font-size: 18px;
  flex: 0 0 auto;
}
.preload-btn.busy{
  background: rgba(255,197,47,.22);
  border-color: rgba(255,197,47,.70);
}
.preload-btn:active{ transform: translateY(1px); }

.hint{
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

/* List */
.list{
  list-style:none;
  margin:0;
  padding: 14px 16px 16px;
  display:flex;
  flex-direction:column;
  gap:10px;
}

/* Row pills */
.row{
  width: 100%;
  display:flex;
  align-items:center;
  gap:12px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(244,241,230,.14);
  background: rgba(0,0,0,.18);
  box-shadow: 0 10px 18px rgba(0,0,0,.18);
}

.row.playing{
  border-color: rgba(255,197,47,.60);
}

/* Grip badge */
.grip{
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255,197,47,.45);
  background: rgba(0,0,0,.22);
  display:grid;
  place-items:center;
  color: rgba(255,197,47,.95);
  flex: 0 0 auto;
  font-weight: 950;
  font-family: "American Typewriter", "Rockwell", Georgia, serif;

  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

.meta{ flex: 1 1 auto; min-width:0; }
.name{
  font-weight: 950;
  font-size: 18px;
  color: var(--cream);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.sub{
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* Circle play/stop */
.play{
  margin-left: auto;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(255,197,47,.40);
  background: rgba(255,197,47,.12);
  color: var(--cream);
  font-weight: 950;
  display:grid;
  place-items:center;
  flex: 0 0 auto;
}
.play.stop{
  background: rgba(255,197,47,.20);
  border-color: rgba(255,197,47,.60);
}
.play:active{ transform: translateY(1px); }

/* Footer */
.footer{
  padding: 10px 14px 12px;
  display:flex;
  justify-content:flex-end;
}
.status{
  font-size: 12px;
  font-weight: 950;
  color: var(--cream);
}

@media (max-width: 420px){
  .title{ font-size: 30px; }
  .tab{ padding: 10px 6px; }
  .name{ font-size: 17px; }
  .stinger-btn, .stop-all-btn{ width: 44px; height: 44px; }
  .preload-btn{ width: 40px; height: 40px; }
}
