/* Blue Wave Baseball — leaderboard page, entry popup, batting-practice
   top five and the logo team tiles. Reuses the career panel language. */

.board-page {
  --cr-line: rgba(67, 177, 230, 0.42);
  --cr-panel: rgba(0, 41, 78, 0.72);
  --cr-inset: rgba(1, 29, 58, 0.66);
  --cr-text-dim: rgba(255, 255, 255, 0.66);
  flex: 1 1 auto;
  min-height: 0;
  padding: 0 1rem 0.9rem;
  overflow-y: auto;
  color: white;
}

.lb-head { align-items: center; }

.lb-pills { display: flex; gap: 0.4rem; }

.lb-pills button {
  padding: 0.45rem 0.95rem;
  border: 1px solid rgba(105, 193, 238, 0.5);
  border-radius: 999px;
  background: var(--cr-inset);
  color: rgba(255, 255, 255, 0.8);
  font: inherit;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

.lb-pills button:hover { border-color: var(--yellow); }
.lb-pills button.active { border-color: var(--yellow); color: var(--yellow); box-shadow: inset 0 0 0 1px rgba(243, 199, 68, 0.55); }

.lb-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 0.75rem;
  align-items: stretch;
}

/* Every card on this page wears the career hub's header bar: title on the
   left, the week (or a chevron through to the full result) on the right. */
.lb-table-card,
.lb-prize-card,
.lb-winner-card.compact {
  padding: 0;
  gap: 0;
  overflow: hidden;
  overflow: clip;
}

.lb-table-card .club-card-head h4,
.lb-prize-card .club-card-head h4,
.lb-winner-card .club-card-head h4 {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
}

.lb-head-right {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--cr-text-dim);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.club-card-head:not(.static):hover .lb-head-right { color: var(--yellow); }

.lb-card-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0.6rem;
  min-height: 0;
  padding: 0.7rem 0.8rem 0.75rem;
}

.lb-cols,
.lb-row,
.practice-list li {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
}

.lb-cols {
  padding: 0 0.6rem 0.3rem;
  border-bottom: 1px solid rgba(105, 193, 238, 0.3);
  color: var(--cr-text-dim);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lb-cols span:last-child { text-align: right; }

.lb-list, .practice-list { display: grid; gap: 0.3rem; margin: 0; padding: 0; list-style: none; }

/* Five rows visible, the rest scroll inside the table so the page stays one screen. */
.lb-list {
  max-height: calc(5 * 3.35rem + 4 * 0.3rem);
  padding-right: 0.25rem;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(123, 205, 244, 0.6) transparent;
}

.lb-list > li { min-height: 3.35rem; }
.lb-list .lb-row { height: 100%; }

.lb-row {
  width: 100%;
  padding: 0.3rem 0.6rem;
  border: 1px solid rgba(105, 193, 238, 0.32);
  border-radius: 0.4rem;
  background: var(--cr-inset);
  color: white;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.lb-row:hover, .lb-row:focus-visible { border-color: var(--yellow); background: rgba(16, 65, 99, 0.92); }
.lb-row.top { border-color: var(--yellow); box-shadow: inset 0 0 0 1px rgba(243, 199, 68, 0.5); background: linear-gradient(90deg, rgba(243, 199, 68, 0.16), rgba(1, 29, 58, 0.66) 60%); }
.lb-row.me { border-color: #4fb3e8; box-shadow: inset 0 0 0 1px rgba(79, 179, 232, 0.6); background: rgba(6, 74, 115, 0.6); }

.lb-rank {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 2px solid rgba(123, 205, 244, 0.8);
  border-radius: 50%;
  background: var(--cr-inset);
  color: white;
  font-size: 0.85rem;
  font-weight: 800;
}

.lb-rank.r1 { border-color: var(--yellow); background: var(--yellow); color: #082b45; }
.lb-rank.r2 { border-color: #c9d1da; background: #c9d1da; color: #10232d; }
.lb-rank.r3 { border-color: #e28b4a; background: #e28b4a; color: #2b1409; }

.lb-player { display: flex; flex-wrap: wrap; align-items: center; gap: 0.15rem 0.5rem; min-width: 0; }
.lb-player strong { font-size: 0.95rem; }
.lb-player small { flex-basis: 100%; color: var(--cr-text-dim); font-size: 0.7rem; }
.lb-player .you { padding: 0.1rem 0.5rem; border-radius: 999px; background: #56c1ff; color: #052a42; font-size: 0.6rem; font-style: normal; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.lb-score { font-size: 1.05rem; font-weight: 800; letter-spacing: 0.02em; }
.lb-row.npc { cursor: default; opacity: 0.82; }
.lb-row.npc:hover { border-color: rgba(105, 193, 238, 0.32); background: var(--cr-inset); }
.lb-player .you.island { background: rgba(255, 255, 255, 0.16); color: rgba(255, 255, 255, 0.85); }

.lb-empty { padding: 0.9rem 0.6rem; color: var(--cr-text-dim); font-size: 0.82rem; text-align: center; }
.lb-me { margin: 0; color: #9fdcff; font-size: 0.78rem; font-weight: 700; text-align: center; }

/* winner card */

.lb-winner-card {
  background:
    radial-gradient(circle at 25% 20%, color-mix(in srgb, var(--team, #0f5fbf) 32%, transparent), transparent 50%),
    var(--cr-panel);
}

.lb-winner-card.champion { border-color: rgba(243, 199, 68, 0.75); }

/* Compact: badge, who won it, the score. Squad and earnings live behind the
   header bar, on the full result. */
.lb-winner-card.compact .lb-card-body { justify-content: center; }
.lb-winner-card.compact .lb-winner { gap: 0.9rem; }
.lb-winner-card.compact .lb-winner-badge { width: 4.6rem; }
/* Room to breathe on the Last week tab: a bigger badge, a bigger squad. */
.lb-winner-card.champion .lb-card-body { justify-content: center; gap: 0.9rem; }
.lb-winner-card.champion .lb-winner { gap: 1.1rem; }
.lb-winner-card.champion .lb-winner-badge { width: 7.5rem; }
.lb-winner-card.champion .lb-winner-copy strong { font-size: clamp(1.3rem, 2.1vw, 1.8rem); }
.lb-winner-card.champion .lb-winner-copy b { font-size: clamp(1.8rem, 3vw, 2.5rem); }
.lb-winner-card.champion .lb-squad-card small { font-size: 0.6rem; }
.lb-winner-card.champion .lb-squad-card b { font-size: 0.78rem; }
.lb-winner-card.champion .lb-squad.named .lb-squad-card { padding: 0.5rem 0.35rem; }
.lb-winner-card.compact .lb-winner-copy strong { font-size: clamp(1.05rem, 1.7vw, 1.4rem); }
.lb-winner-card.compact .lb-winner-copy em { margin-top: 0.3rem; }
.lb-winner-card.compact .lb-winner-copy b { font-size: clamp(1.5rem, 2.4vw, 2rem); }
.lb-winner-card.compact .lb-winner-empty { padding: 0.5rem 0.25rem; }

.lb-winner { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0.8rem; }

.lb-winner-badge { position: relative; width: 6.5rem; }
.lb-winner-badge.big { width: 8rem; }
.lb-winner-badge img { display: block; width: 100%; filter: drop-shadow(0 0 22px rgba(243, 199, 68, 0.45)) drop-shadow(0 10px 16px rgba(0, 0, 0, 0.45)); }

.lb-crown {
  display: inline-block;
  width: 1.6rem;
  height: 1.2rem;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 24' fill='%23f3c744'%3E%3Cpath d='M2 20 L4 6 L11 12 L16 2 L21 12 L28 6 L30 20 Z'/%3E%3Crect x='3' y='21' width='26' height='3' rx='1'/%3E%3C/svg%3E");
}

.lb-winner-badge .lb-crown { position: absolute; top: -0.9rem; left: 50%; transform: translateX(-50%); }

.lb-winner-copy { display: grid; gap: 0.1rem; min-width: 0; }
.lb-winner-copy strong { font-family: "Playfair Display", Georgia, serif; font-size: clamp(1.3rem, 2vw, 1.7rem); line-height: 1.05; overflow-wrap: anywhere; }
.lb-winner-copy small { color: #9fdcff; font-size: 0.72rem; font-weight: 700; }
.lb-winner-copy em { margin-top: 0.4rem; color: var(--yellow); font-size: 0.62rem; font-style: normal; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.lb-winner-copy b { color: var(--yellow); font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 800; line-height: 1; letter-spacing: 0.02em; }
.lb-champ { color: rgba(255, 255, 255, 0.85); font-family: "Playfair Display", Georgia, serif; font-size: 0.95rem; }

.lb-earn {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0 0.5rem;
  width: max-content;
  margin-top: 0.5rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid rgba(243, 199, 68, 0.6);
  border-radius: 0.4rem;
  background: var(--cr-inset);
}

.lb-earn i, .lb-modal-stats i {
  display: inline-grid;
  place-items: center;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 50%;
  background: var(--yellow);
  color: #082b45;
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 900;
}

.lb-earn i { grid-row: 1 / span 2; }
.lb-earn small { color: var(--cr-text-dim); font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; }
.lb-earn strong { font-size: 1.15rem; font-weight: 800; }

.lb-sub { margin: 0.2rem 0 0; color: rgba(255, 255, 255, 0.8); font-size: 0.66rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }

.lb-winner-empty { display: grid; justify-items: center; gap: 0.4rem; padding: 1rem 0.5rem; text-align: center; }
.lb-winner-empty strong { font-family: "Playfair Display", Georgia, serif; font-size: 1.2rem; line-height: 1.15; }
.lb-winner-empty p { margin: 0; color: var(--cr-text-dim); font-size: 0.8rem; }
.lb-note { color: var(--cr-text-dim); font-size: 0.72rem; text-align: center; }

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

.lb-squad-card {
  display: grid;
  justify-items: center;
  gap: 0.15rem;
  padding: 0.3rem;
  border: 1px solid rgba(105, 193, 238, 0.4);
  border-radius: 0.4rem;
  background: var(--cr-inset);
  text-align: center;
}

.lb-squad-card img, .lb-squad-blank { display: block; width: 100%; aspect-ratio: 1; border: 2px solid rgba(243, 199, 68, 0.75); border-radius: 0.35rem; object-fit: cover; }
.lb-squad-blank { border-style: dashed; border-color: rgba(255, 255, 255, 0.3); background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.08) 0 6px, transparent 6px 12px); }
.lb-squad-card small { color: var(--yellow); font-size: 0.58rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.lb-squad-card b { font-size: 0.72rem; line-height: 1.15; overflow-wrap: anywhere; }
.lb-squad.named .lb-squad-card { padding: 0.4rem 0.3rem; }

.lb-footer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  margin-top: 0.8rem;
  padding-top: 0.7rem;
  border-top: 1px solid rgba(105, 193, 238, 0.36);
}

.lb-footer p { margin: 0; color: var(--cr-text-dim); font-size: 0.78rem; font-weight: 600; text-align: center; }

.lb-reset {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid rgba(243, 199, 68, 0.6);
  border-radius: 999px;
  background: var(--cr-inset);
}

.lb-reset small { color: var(--yellow); font-size: 0.62rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.lb-reset b { font-size: 0.9rem; font-weight: 800; }

/* entry popup */

.lb-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(2, 20, 40, 0.7);
  backdrop-filter: blur(4px);
}

.lb-modal-card {
  position: relative;
  width: min(26rem, 100%);
  display: grid;
  gap: 0.7rem;
  padding: 1.1rem;
  border: 1px solid rgba(243, 199, 68, 0.7);
  border-radius: 0.5rem;
  background:
    radial-gradient(circle at 20% 0%, color-mix(in srgb, var(--team, #0f5fbf) 40%, transparent), transparent 55%),
    linear-gradient(180deg, #073a5b, #052a42);
  color: white;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}

.lb-modal-close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: transparent;
  color: white;
  font: inherit;
  font-size: 1.2rem;
  cursor: pointer;
}

.lb-modal-head { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 0.7rem; }
.lb-modal-head img { width: 3.6rem; height: 3.6rem; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45)); }
.lb-modal-head strong { display: block; font-family: "Playfair Display", Georgia, serif; font-size: 1.3rem; line-height: 1.1; }
.lb-modal-head small { color: #9fdcff; font-size: 0.74rem; font-weight: 700; }

.lb-modal-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr)); gap: 0.5rem; }
.lb-modal-stats > div { padding: 0.5rem 0.65rem; border: 1px solid rgba(105, 193, 238, 0.4); border-radius: 0.4rem; background: var(--cr-inset, rgba(1, 29, 58, 0.66)); }
.lb-modal-stats small { display: block; color: rgba(255, 255, 255, 0.66); font-size: 0.6rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.lb-modal-stats b { display: flex; align-items: center; gap: 0.4rem; font-size: 1.2rem; font-weight: 800; }
.lb-modal-stats em { display: block; color: rgba(255, 255, 255, 0.66); font-size: 0.66rem; font-style: normal; }

/* batting practice top five */

.practice-board { margin-top: 0.75rem; padding-top: 0.6rem; border-top: 1px solid rgba(105, 193, 238, 0.3); }
.practice-board h3 { margin: 0 0 0.4rem; color: rgba(255, 255, 255, 0.76); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; }
.practice-list li { padding: 0.3rem 0.5rem; border: 1px solid rgba(105, 193, 238, 0.3); border-radius: 0.35rem; background: rgba(1, 29, 58, 0.5); }
.practice-list li.me { border-color: #4fb3e8; }
.practice-list .lb-rank { width: 1.6rem; height: 1.6rem; font-size: 0.72rem; }
.practice-list strong { display: block; font-size: 0.82rem; line-height: 1.15; }
.practice-list small { display: block; color: rgba(255, 255, 255, 0.6); font-size: 0.66rem; }
.practice-list b { font-size: 0.88rem; font-weight: 800; }
.practice-me { display: block; margin-top: 0.4rem; color: #9fdcff; font-size: 0.72rem; font-weight: 700; text-align: center; }

/* island team logos on the batting practice tiles */

.team-option .team-logo-img {
  display: block;
  padding: 0.15rem;
  border: 0;
  border-radius: 0.3rem;
  background: transparent;
  object-fit: contain;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.45));
}

@media (max-width: 920px) {
  .board-page { overflow: visible; }
  .lb-grid { grid-template-columns: 1fr; }
  .lb-head { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .lb-footer { grid-template-columns: 1fr; justify-items: start; }
  .lb-footer p { text-align: left; }
}

/* ------------------------------------------------------------------ *
 * Weekly prizes
 *
 * The right-hand column is split: the prize rail on top, the last-week
 * winner card underneath. Three tiles scroll sideways rather than
 * shrinking, so a narrow column still reads.
 * ------------------------------------------------------------------ */

.lb-side {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.75rem;
  min-width: 0;
}

/* Last week: the champion card has the column to itself. */
.lb-side.solo { grid-template-rows: minmax(0, 1fr); }

.lb-prize-card .lb-card-body { gap: 0.45rem; }

.lb-prize-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(6.4rem, 1fr);
  align-items: start;
  gap: 0.5rem;
  margin: 0 -0.2rem;
  padding: 0.15rem 0.2rem 0.4rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: rgba(123, 205, 244, 0.5) transparent;
  overscroll-behavior-x: contain;
}
.lb-prize-rail::-webkit-scrollbar { height: 0.35rem; }
.lb-prize-rail::-webkit-scrollbar-thumb { border-radius: 999px; background: rgba(123, 205, 244, 0.5); }
.lb-prize-rail:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; border-radius: 0.4rem; }

.lb-prize {
  --glow: rgba(67, 177, 230, 0.55);
  display: grid;
  justify-items: center;
  gap: 0.15rem;
  padding: 0.4rem 0.45rem 0.5rem;
  border: 1px solid rgba(105, 193, 238, 0.4);
  border-radius: 0.45rem;
  background: rgba(1, 29, 58, 0.66);
  scroll-snap-align: start;
  text-align: center;
}
.lb-prize.tier-premium { --glow: rgba(160, 220, 255, 0.7); }
.lb-prize.tier-legendary { --glow: rgba(243, 199, 68, 0.75); }
.lb-prize.rank-1 { border-color: rgba(243, 199, 68, 0.7); background: linear-gradient(180deg, rgba(243, 199, 68, 0.14), rgba(1, 29, 58, 0.66) 62%); }

.lb-prize-rank {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}
.lb-prize.rank-1 .lb-prize-rank { color: var(--yellow); }
.lb-prize-rank .lb-crown { width: 1rem; height: 0.78rem; }

.lb-prize-art {
  display: grid;
  place-items: center;
  width: 100%;
  height: 4.8rem;
  overflow: hidden;
  border-radius: 0.4rem;
  background: radial-gradient(ellipse 66% 60% at 50% 52%, var(--glow), transparent 70%);
}
/* Sized off the image, not a percentage: a grid item's percentage height
   does not resolve against this box the way you would expect. */
.lb-prize-art img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 4.8rem;
  object-fit: contain;
  filter: drop-shadow(0 5px 9px rgba(0, 0, 0, 0.5));
}

.lb-prize-cash {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  color: var(--yellow);
  font-size: 0.86rem;
  font-weight: 900;
}
.lb-prize-cash i {
  display: grid;
  place-items: center;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--yellow);
  color: #082b45;
  font-size: 0.6rem;
  font-style: normal;
  font-weight: 900;
}

/* the prize on an entry popup */
.lb-modal-stats em {
  display: block;
  margin-top: 0.1rem;
  color: var(--cr-text-dim);
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 700;
}

@media (max-width: 920px) {
  .lb-side { grid-template-rows: auto auto; }
  .lb-prize-rail { grid-auto-columns: minmax(7.2rem, 1fr); }
}

/* The empty line of the practice top 3 is one sentence, not a grid row
   (it wrapped word by word in the rank column). */
.practice-list li.lb-empty { display: block; }

/* admins only: a resident (NPC) holding a place on the board */
.npc-chip {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.05rem 0.32rem;
  border-radius: 0.3rem;
  background: #b46cff;
  color: #1c0a33;
  font: 900 0.58rem/1.2 Inter, system-ui, sans-serif;
  font-style: normal;
  letter-spacing: 0.08em;
  vertical-align: 0.05rem;
}
