/* Fantasy league service — roster diamond */

body.fantasy-app {
  background:
    radial-gradient(1200px 520px at 50% -10%, rgba(42, 61, 102, 0.16), transparent 60%),
    radial-gradient(900px 420px at 100% 20%, rgba(28, 126, 214, 0.08), transparent 55%),
    linear-gradient(180deg, #f5f7fa 0%, #ffffff 42%, #f0f2f6 100%);
}

.fantasy-header .league-switch-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.fantasy-nav a.on {
  background: rgba(27, 42, 74, 0.12);
  border-color: rgba(27, 42, 74, 0.35);
  color: var(--navy);
  font-weight: 700;
}

.fantasy-main {
  padding: 18px 0 48px;
}

.roster-stage-head {
  text-align: center;
  margin-bottom: 14px;
  animation: roster-fade-up 0.55s ease;
}

.roster-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.2vw, 2.2rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--navy);
}

.lineup-summary {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.lineup-summary li {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(27, 42, 74, 0.22);
  background: rgba(27, 42, 74, 0.08);
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 300;
  white-space: nowrap;
}

.lineup-summary strong {
  color: var(--navy);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.lineup-summary-cap {
  color: var(--muted);
  font-weight: 500;
}

.roster-hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
}

.slot.is-filled .slot-box {
  border-style: solid;
  border-color: rgba(27, 42, 74, 0.7);
  background: linear-gradient(180deg, #ffffff, #eef7f0);
}

.slot-player-name {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.2;
  word-break: keep-all;
}

.slot-player-meta {
  font-size: 0.62rem;
  color: var(--muted);
}

.slot-player-pts-mobile {
  display: none;
}

.slot-player-salary {
  font-size: 0.58rem;
  font-weight: 500;
  color: #0f6a3a;
  line-height: 1.2;
}

/* Acquire page */
.acquire-stage {
  animation: roster-fade-up 0.55s ease;
}

.acquire-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.acquire-link {
  color: var(--navy);
  font-weight: 500;
  margin-left: 6px;
}

.acquire-summary {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(27, 42, 74, 0.12);
  color: var(--navy);
  font-weight: 500;
  white-space: nowrap;
}

.acquire-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.acquire-side-title {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.pos-chips {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pos-chip {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.pos-chip span {
  font-weight: 500;
  font-size: 0.92rem;
}

.pos-chip em {
  font-style: normal;
  color: var(--muted);
  font-size: 0.78rem;
}

.pos-chip:hover {
  border-color: rgba(27, 42, 74, 0.45);
  transform: translateY(-1px);
}

.pos-chip.on {
  border-color: rgba(27, 42, 74, 0.65);
  background: rgba(27, 42, 74, 0.1);
}

.pos-chip.filled em {
  color: var(--navy);
  font-weight: 500;
}

.current-slot {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.current-slot-label {
  font-size: 0.78rem;
  color: var(--muted);
}

.acquire-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.acquire-toolbar input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 14px;
  font: inherit;
  background: var(--bg-elevated);
}

.acquire-toolbar input:focus {
  outline: 2px solid rgba(27, 42, 74, 0.35);
  border-color: rgba(27, 42, 74, 0.55);
}

.acquire-count {
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

.player-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: min(62vh, 640px);
  overflow: auto;
  padding-right: 2px;
}

.player-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.player-row.is-current {
  border-color: rgba(27, 42, 74, 0.55);
  background: rgba(27, 42, 74, 0.06);
}

.player-photo {
  width: 48px;
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  border: 2px dashed rgba(26, 35, 50, 0.22);
  background: linear-gradient(180deg, #f8fafc, #eef2f6);
}

.player-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.player-info strong {
  font-size: 0.98rem;
}

.player-info span {
  color: var(--muted);
  font-size: 0.8rem;
}

.player-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  min-width: 5.5rem;
}

.player-points {
  font-weight: 500;
  color: var(--ink);
  font-size: 1.05rem;
  text-align: right;
  line-height: 1.15;
}

.player-points small {
  margin-left: 2px;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 500;
}

.player-salary {
  font-size: 0.78rem;
  font-weight: 500;
  color: #0f6a3a;
  text-align: right;
  white-space: nowrap;
}

.btn-sm {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
}

.foreign-box {
  margin-top: 14px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(28, 126, 214, 0.08);
  border: 1px solid rgba(28, 126, 214, 0.18);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.86rem;
}

.foreign-box strong {
  margin-right: 4px;
}

.foreign-box span,
.foreign-total {
  color: var(--muted);
  font-size: 0.8rem;
}

.foreign-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.45;
}

.nat-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 500;
  vertical-align: middle;
}

.badge-foreign {
  background: rgba(230, 57, 70, 0.12);
  color: var(--stitch);
}

.badge-asia {
  background: rgba(28, 126, 214, 0.12);
  color: var(--schedule-blue-deep);
}

.player-row.is-blocked {
  opacity: 0.55;
}

.acquire-toast {
  position: sticky;
  bottom: 10px;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #1a2332;
  color: #fff;
  font-size: 0.88rem;
  box-shadow: 0 10px 24px rgba(26, 35, 50, 0.25);
}

@media (max-width: 860px) {
  .acquire-layout {
    grid-template-columns: 1fr;
  }

  .pos-chips {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .acquire-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .player-list {
    max-height: none;
  }
}

@media (max-width: 520px) {
  .pos-chips {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .player-row {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    grid-template-areas:
      "photo info stats"
      "photo info action";
  }

  .player-photo { grid-area: photo; width: 40px; }
  .player-info { grid-area: info; }
  .player-stats { grid-area: stats; }
  .player-row .btn { grid-area: action; justify-self: end; }
}

.diamond-wrap {
  width: min(760px, 100%);
  margin: 0 auto;
  animation: roster-fade-up 0.7s ease 0.08s;
}

.ballpark {
  position: relative;
  width: 100%;
  aspect-ratio: 400 / 440;
  border-radius: 28px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(8, 18, 12, 0.12) 0%, rgba(8, 18, 12, 0.05) 40%, rgba(8, 18, 12, 0.18) 100%),
    url("./assets/lineup-field.png?v=20260813an") center center / cover no-repeat;
  border: 1px solid rgba(26, 35, 50, 0.12);
  box-shadow:
    0 18px 40px rgba(26, 35, 50, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

/* Photo field replaces the drawn diamond; keep SVG for layout fallback only */
.ballpark-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
}

.bp-infield-grass {
  fill: #34a853;
}

.bp-foul {
  stroke: rgba(255, 255, 255, 0.85);
  stroke-width: 2.4;
  stroke-linecap: round;
}

.bp-arc {
  stroke: rgba(255, 255, 255, 0.55);
  stroke-width: 3;
}

.bp-warning {
  opacity: 0.55;
}

.bp-mound {
  fill: #c9975c;
  stroke: rgba(255, 255, 255, 0.35);
  stroke-width: 1.5;
}

.bp-rubber {
  fill: #f5f5f5;
}

.bp-base {
  fill: #ffffff;
  stroke: rgba(26, 35, 50, 0.12);
  stroke-width: 0.8;
}

.bp-home {
  fill: #ffffff;
  stroke: rgba(26, 35, 50, 0.16);
  stroke-width: 0.8;
}

.slot {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  z-index: 2;
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: clamp(58px, 12vw, 78px);
  text-decoration: none;
  color: inherit;
  font: inherit;
  transition: transform 0.18s ease;
}

.slot:hover,
.slot:focus-visible {
  transform: translate(-50%, -50%) scale(1.05);
  outline: none;
}

.slot:focus-visible .slot-box {
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.85),
    0 8px 18px rgba(26, 35, 50, 0.22);
}

.slot-box {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(245, 247, 250, 0.9));
  /* Always-visible navy border (same as hover) */
  border: 2px solid rgba(27, 42, 74, 0.7);
  box-shadow:
    0 8px 18px rgba(26, 35, 50, 0.28),
    0 1px 0 rgba(255, 255, 255, 0.65) inset;
  backdrop-filter: blur(2px);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px;
  text-align: center;
}

.slot:hover .slot-box {
  border-color: rgba(27, 42, 74, 0.7);
  border-style: solid;
  background: #fff;
}

.slot-mound .slot-box {
  border-style: solid;
  border-color: rgba(28, 126, 214, 0.4);
}

.slot-label {
  font-size: 0.72rem;
  font-weight: 500;
  color: #fff;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.55),
    0 0 8px rgba(0, 0, 0, 0.35);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.slot-bench .slot-box {
  border-style: solid;
  border-color: rgba(27, 42, 74, 0.7);
  /* Lock DH / RP / CL / MGR card size to the same footprint */
  aspect-ratio: 3 / 4;
  width: 100%;
  min-height: 0;
  overflow: hidden;
  box-sizing: border-box;
}

/* MGR: always-visible vivid gold border */
.slot-mgr .slot-box {
  border-style: solid;
  border-color: rgba(184, 130, 20, 1);
  background:
    linear-gradient(180deg, rgba(255, 250, 235, 0.96), rgba(245, 238, 220, 0.92));
  box-shadow:
    0 0 0 2px rgba(184, 130, 20, 0.45),
    0 8px 16px rgba(26, 35, 50, 0.16);
  aspect-ratio: 3 / 4;
  width: 100%;
  min-height: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.slot-mgr.is-filled .slot-box {
  border-style: solid;
  border-color: rgba(168, 118, 12, 1);
}

.slot-mgr:hover .slot-box {
  border-color: rgba(150, 105, 8, 1);
  border-style: solid;
  background:
    linear-gradient(180deg, #fff, rgba(255, 248, 230, 0.96));
  box-shadow:
    0 0 0 2px rgba(184, 130, 20, 0.55),
    0 8px 16px rgba(26, 35, 50, 0.18);
}

.slot.is-selected .slot-box {
  border-style: solid;
  border-color: var(--navy);
  box-shadow:
    0 0 0 3px rgba(42, 61, 102, 0.35),
    0 10px 20px rgba(26, 35, 50, 0.18);
}

.slot.is-captain .slot-box {
  border-style: solid;
  border-color: rgba(28, 110, 120, 1);
  box-shadow:
    0 0 0 2px rgba(28, 110, 120, 0.45),
    0 8px 16px rgba(26, 35, 50, 0.16);
}

/* Keep captain teal on hover (don't fall back to default navy) */
.slot.is-captain:hover .slot-box,
.slot.is-captain:focus-visible .slot-box {
  border-color: rgba(20, 96, 106, 1);
  border-style: solid;
  box-shadow:
    0 0 0 2px rgba(28, 110, 120, 0.55),
    0 8px 16px rgba(26, 35, 50, 0.18);
}

.slot-captain-btn {
  position: absolute;
  top: 3px;
  left: 3px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  padding: 1px 4px;
  border-radius: 4px;
  border: 1px solid rgba(26, 35, 50, 0.16);
  background: rgba(255, 255, 255, 0.78);
  color: rgba(26, 35, 50, 0.42);
  line-height: 1.2;
  cursor: pointer;
  user-select: none;
  transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.slot-captain-btn.is-on {
  color: #fff;
  border-color: rgba(20, 96, 106, 0.75);
  background: rgba(28, 110, 120, 0.96);
}

/* MGR role marker — same corner as 주장, gold, non-interactive */
.slot-mgr-badge {
  position: absolute;
  top: 3px;
  left: 3px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  padding: 1px 4px;
  border-radius: 4px;
  line-height: 1.2;
  user-select: none;
  pointer-events: none;
  cursor: default;
  color: #fff;
  border: 1px solid rgba(150, 105, 8, 0.75);
  background: rgba(184, 130, 20, 0.96);
}

.slot-captain-btn.is-faded {
  opacity: 0.18;
}

.slot-captain-btn.is-faded:hover,
.slot-captain-btn.is-faded:focus-visible {
  opacity: 0.55;
}

#picker-captain.is-captain-on {
  border-color: rgba(28, 110, 120, 0.75);
  color: #1a5c66;
  background: rgba(220, 240, 244, 0.95);
}

/* Stub pages shared */
.fantasy-stub {
  margin-top: 28px;
  text-align: center;
  animation: roster-fade-up 0.5s ease;
}

.fantasy-stub h1 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--navy);
}

.fantasy-stub p {
  margin: 0;
  color: var(--muted);
}

/* Ranking boards */
.rank-board {
  padding: 18px 16px 28px;
  animation: roster-fade-up 0.45s ease;
}

.rank-head h1 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  font-weight: 700;
  color: var(--navy);
}

.rank-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.rank-note {
  margin: 10px 0 0 !important;
  color: var(--ink-soft) !important;
  font-size: 0.88rem !important;
}

.rank-scope-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 12px;
}

.rank-scope-tab {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 10px 18px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
}

.rank-scope-tab.on {
  border-color: rgba(47, 158, 68, 0.45);
  background: rgba(47, 158, 68, 0.12);
  color: var(--grass);
}

.rank-period-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.rank-period-nav {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
}

.rank-period-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.rank-period-select {
  flex: 1;
  min-width: 0;
}

.rank-period-select select {
  width: 100%;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
  font-weight: 500;
}

.rank-period-caption {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: baseline;
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

.rank-period-caption strong {
  color: var(--ink);
  font-size: 1.02rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.rank-table {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
}

.rank-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1.4fr) minmax(0, 1fr) 96px;
  gap: 8px;
  align-items: center;
  padding: 11px 14px;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}

.rank-row:first-child {
  border-top: none;
}

.rank-row-head {
  background: linear-gradient(180deg, #f3faf5, #eaf6ee);
  font-weight: 500;
  color: var(--ink);
  font-size: 0.84rem;
}

.rank-num {
  font-weight: 300;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
}

.rank-num small {
  font-size: 0.72em;
  font-weight: 300;
  margin-left: 1px;
}

.rank-team {
  font-weight: 500;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.rank-owner {
  color: var(--muted);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-points {
  text-align: right;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--navy);
}

.rank-points small {
  margin-left: 2px;
  font-size: 0.75em;
  font-weight: 500;
  color: var(--muted);
}

.rank-me-tag {
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(27, 42, 74, 0.14);
  color: var(--navy);
}

.rank-bot-tag {
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(30, 58, 95, 0.12);
  color: #1e3a5f;
}

.lineup-lock-banner {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.45;
  border: 1px solid var(--line);
}

.lineup-lock-banner.is-open {
  background: rgba(27, 42, 74, 0.08);
  border-color: rgba(27, 42, 74, 0.28);
  color: var(--ink-soft);
}

.lineup-lock-banner.is-locked {
  background: rgba(176, 72, 48, 0.08);
  border-color: rgba(176, 72, 48, 0.3);
  color: var(--ink-soft);
}

.lineup-lock-banner strong {
  color: var(--ink);
}

.lineup-lock-banner em {
  font-style: normal;
  font-weight: 500;
  color: #9a4030;
}

.rank-row.is-me {
  background: rgba(27, 42, 74, 0.1);
}

.rank-row.is-me .rank-num {
  color: var(--navy);
}

.rank-row.is-pin {
  background: rgba(27, 42, 74, 0.14);
  box-shadow: inset 3px 0 0 var(--navy);
}

.rank-pager {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.rank-pager-nums {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
}

.rank-pager-arrow,
.rank-pager-num {
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
}

.rank-pager-arrow:hover:not(:disabled),
.rank-pager-num:hover:not(.is-current) {
  border-color: rgba(27, 42, 74, 0.45);
  background: rgba(27, 42, 74, 0.06);
}

.rank-pager-num.is-current {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
  cursor: default;
}

.rank-pager-arrow:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.rank-pager-meta {
  margin: 8px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
}

.rank-foot {
  margin: 12px 2px 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.schedule-board {
  padding: 18px 16px 28px;
}

.schedule-list {
  margin-top: 12px;
  display: grid;
  gap: 14px;
}

.schedule-day h2 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  color: var(--ink);
}

.schedule-day h2 small {
  margin-left: 8px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
}

.schedule-games {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.schedule-games li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}

.schedule-games li:first-child {
  border-top: none;
}

.sg-match {
  font-weight: 500;
  color: var(--ink);
}

.sg-meta {
  color: var(--muted);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .rank-row {
    grid-template-columns: 40px minmax(0, 1fr) 72px;
    grid-template-areas: "num team points";
    row-gap: 0;
    align-items: center;
    padding: 10px 12px;
    font-size: 0.82rem;
  }

  .rank-row-head {
    display: none;
  }

  .rank-num {
    grid-area: num;
  }

  .rank-team {
    grid-area: team;
    font-size: 0.84rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .rank-owner {
    display: none;
  }

  .rank-points {
    grid-area: points;
    font-size: 0.84rem;
  }
}

@keyframes roster-fade-up {
  from {
    transform: translateY(12px);
  }
  to {
    transform: translateY(0);
  }
}

@media (max-width: 860px) {
  .fantasy-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .roster-title {
    font-size: 1.25rem;
  }

  .roster-hint {
    font-size: 0.72rem;
    padding: 0 4px;
  }

  .lineup-summary li {
    font-size: 0.68rem;
    padding: 4px 8px;
  }

  .lineup-lock-banner {
    display: none !important;
  }

  .ballpark {
    aspect-ratio: 360 / 520;
    border-radius: 18px;
  }

  .slot {
    width: clamp(46px, 12.5vw, 62px);
    gap: 3px;
  }

  .slot-label {
    font-size: 0.58rem;
  }

  .slot-box {
    border-radius: 8px;
    padding: 2px;
    gap: 1px;
    justify-content: flex-start;
    overflow: hidden;
  }

  .slot-captain-btn,
  .slot-mgr-badge {
    position: static;
    flex: 0 0 auto;
    font-size: 0.48rem;
    font-weight: 700;
    line-height: 1.1;
  }

  .slot-player-name {
    font-size: 0.56rem;
    font-weight: 600;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .slot-player-meta-desktop {
    display: none;
  }

  .slot-player-pts-mobile {
    display: block;
  }

  .slot-player-meta,
  .slot-player-salary {
    font-size: 0.45rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .rank-head > p.rank-period-desc,
  .rank-period-caption .rank-period-desc,
  .rank-foot {
    display: none;
  }

  .rank-head h1 {
    font-size: 1.3rem;
  }
}

@media (max-width: 480px) {
  .ballpark {
    border-radius: 16px;
    aspect-ratio: 340 / 520;
  }

  .slot-box {
    border-radius: 8px;
  }

  .slot {
    width: clamp(42px, 11.5vw, 54px);
  }
}

/* Lineup picker overlay (above lineup ground) */
.roster-stage {
  position: relative;
}

.lineup-picker {
  position: absolute;
  inset: 0 0 auto;
  z-index: 30;
  padding: 0 0 12px;
  animation: roster-fade-up 0.25s ease;
}

.lineup-picker[hidden] {
  display: none !important;
}

.lineup-picker-panel {
  margin: 0 auto;
  width: min(760px, 100%);
  max-height: min(58vh, 520px);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 40px rgba(26, 35, 50, 0.18);
  overflow: hidden;
}

.lineup-picker-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line);
}

.lineup-picker-head h2 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--navy);
}

.lineup-picker-current {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.lineup-picker-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex-shrink: 0;
}

.lineup-picker-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
}

.lineup-picker-toolbar input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
}

.lineup-picker-list {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow: auto;
  padding: 0 12px 14px;
}

body.lineup-picker-open .diamond-wrap {
  filter: saturate(0.85);
  opacity: 0.55;
  pointer-events: none;
}

@media (max-width: 640px) {
  .lineup-picker-panel {
    max-height: min(64vh, 560px);
  }

  .lineup-picker-head {
    flex-direction: column;
  }
}

/* Game guide */
.guide-hub {
  padding: 18px 16px 32px;
}

.guide-hub-grid {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

@media (min-width: 720px) {
  .guide-hub-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.guide-hub-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.guide-hub-card:hover {
  border-color: var(--schedule-blue);
  transform: translateY(-1px);
}

.guide-hub-card strong {
  font-size: 1.05rem;
  color: var(--schedule-blue-deep);
}

.guide-hub-card span {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.4;
}

.guide-page .guide-panel {
  margin-top: 14px;
}

.guide-page .guide-panel h2 {
  margin: 0 0 12px;
  font-size: 1.05rem;
  color: var(--schedule-blue-deep);
}

.guide-list {
  margin: 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 8px;
  color: var(--ink);
  line-height: 1.45;
  font-size: 0.92rem;
}

.guide-note {
  margin: 10px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.guide-table-wrap {
  overflow-x: auto;
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.guide-table th,
.guide-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.guide-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.78rem;
}

.guide-table td:nth-child(even) {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--schedule-blue-deep);
  width: 4.5rem;
}

/* My page */
.mp-page {
  padding: 18px 16px 36px;
}

.mp-head h1 {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  font-weight: 700;
  color: var(--navy);
}

.mp-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 1fr);
  gap: 16px;
  align-items: stretch;
}

.mp-stats {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 18px 16px;
}

.mp-stat-block {
  margin-bottom: 12px;
  padding: 8px 2px 14px;
  border-bottom: 1px solid var(--line);
}

.mp-k {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.mp-v {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}

.mp-v small {
  margin-left: 2px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
}

.mp-team {
  font-size: 1.26rem;
  line-height: 1.3;
}

.mp-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.mp-stat-grid-3 {
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 0;
}

.mp-stat {
  background: rgba(27, 42, 74, 0.04);
  border-radius: 12px;
  padding: 8px 10px 6px;
}

.mp-stat .mp-k {
  margin-bottom: 2px;
  font-size: 0.8rem;
}

.mp-stat .mp-v {
  font-size: 1.22rem;
  line-height: 1.25;
}

.mp-mvp {
  background: linear-gradient(160deg, rgba(27, 42, 74, 0.94), rgba(27, 42, 74, 0.82));
  color: #f5f7fa;
  border-radius: 16px;
  padding: 18px 16px 16px;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.mp-mvp-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.mp-mvp-label {
  margin: 6px 0 14px;
  font-size: 0.8rem;
  opacity: 0.75;
}

.mp-mvp-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  flex: 1;
}

.mp-mvp-role {
  margin: 0 0 8px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  opacity: 0.72;
}

.mp-mvp-empty {
  margin: auto 0;
  font-size: 0.9rem;
  line-height: 1.5;
  opacity: 0.8;
}

.mp-mvp-card {
  margin-top: 0;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  padding: 16px 12px 14px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mp-mvp-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
  word-break: keep-all;
}

.mp-mvp-meta {
  margin: 6px 0 12px;
  font-size: 0.88rem;
  opacity: 0.8;
}

.mp-mvp-points {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.mp-mvp-points span {
  margin-left: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0.75;
}

@media (max-width: 720px) {
  .mp-layout {
    grid-template-columns: 1fr;
  }

  .mp-stat-grid-3 {
    grid-template-columns: 1fr;
  }

  .mp-mvp {
    min-height: 0;
  }
}
