:root {
  --bg0: #f5f6fa;
  --ink: #1a1a1e;
  --muted: #8b8b95;
  --line: rgba(26, 26, 30, 0.08);
  --accent: #6b4eff;
  --accent-soft: rgba(107, 78, 255, 0.12);
  --panel: #ffffff;
  --radius: 16px;
  --font-display: "Archivo Black", Impact, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --content-w: 1080px;
  --tabbar-h: 64px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  font-family: var(--font-body);
  background: #e8e9ef;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, #fff 0%, #e8e9ef 70%);
}

.phone {
  width: 100%;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg0);
  position: relative;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 0.85rem 1.5rem 0.35rem;
  max-width: var(--content-w);
  margin: 0 auto;
}

.brand {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.55rem;
  letter-spacing: 0.02em;
  color: var(--accent);
  text-transform: lowercase;
}

.icon-btn {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: none;
  color: var(--ink);
  padding: 0.35rem;
  cursor: pointer;
  border-radius: 999px;
}

.icon-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.page {
  padding: 0.35rem 1.5rem calc(var(--tabbar-h) + 1.25rem);
  max-width: var(--content-w);
  margin: 0 auto;
  width: 100%;
  flex: 1 1 auto;
}

.page[hidden] {
  display: none !important;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.page-head h1 {
  margin: 0 0 0.25rem;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.lede {
  margin: 0;
  max-width: 16rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.follow-summary {
  border: 1.5px solid rgba(107, 78, 255, 0.35);
  background: #fff;
  border-radius: 14px;
  padding: 0.45rem 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 7.6rem;
  cursor: pointer;
  font: inherit;
  text-align: left;
  color: var(--ink);
  box-shadow: 0 2px 10px rgba(26, 26, 30, 0.04);
}

.follow-summary:hover {
  border-color: rgba(107, 78, 255, 0.55);
  background: var(--accent-soft);
}

.follow-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.follow-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.follow-avatars {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  min-height: 1.45rem;
}

.follow-avatars img,
.follow-avatars .slot {
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 999px;
  object-fit: cover;
  object-position: top center;
  background: #f0f1f6;
  border: 1px solid #fff;
  box-shadow: 0 0 0 1px rgba(107, 78, 255, 0.12);
}

.follow-avatars .slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  border-style: dashed;
  border-color: rgba(107, 78, 255, 0.35);
  box-shadow: none;
}

.follow-avatars .logo {
  border-radius: 6px;
  object-fit: contain;
  padding: 0.1rem;
  background: #fff;
}

.follow-avatars img.ig-avatar {
  object-fit: cover;
  object-position: center;
  padding: 0;
}

.follow-avatars .more {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--accent);
  margin-left: 0.1rem;
}

.btn-outline,
.btn-primary,
.btn-soft {
  font: inherit;
  cursor: pointer;
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.btn-outline {
  border: 1.5px solid var(--accent);
  background: #fff;
  color: var(--accent);
}

.btn-outline.on {
  background: var(--accent-soft);
}

.btn-primary {
  border: 0;
  background: var(--accent);
  color: #fff;
}

.btn-soft {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  border: 0;
  background: var(--accent-soft);
  color: var(--accent);
}

.btn-soft[hidden] {
  display: none !important;
}

.league-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-bottom: 0.9rem;
}

.league-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 0.5rem;
  border-radius: 14px;
  border: 1.5px solid transparent;
  background: #ececf2;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.league-tab.on {
  background: var(--accent-soft);
  border-color: rgba(107, 78, 255, 0.45);
  color: var(--accent);
}

.league-tab:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.league-logo {
  width: 1.35rem;
  height: 1.35rem;
  object-fit: contain;
  flex-shrink: 0;
}

.league-ico {
  font-size: 1rem;
}

.date-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1.1rem;
}

.date-scroll {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
  padding-bottom: 0.15rem;
}

.date-scroll::-webkit-scrollbar {
  display: none;
}

.date-chip {
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.25rem 0;
  white-space: nowrap;
  cursor: pointer;
}

.date-chip.on {
  color: var(--accent);
  font-weight: 700;
}

.block {
  margin-bottom: 1.5rem;
}

.block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.block-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.block-head .meta {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.block-hint {
  margin: -0.4rem 0 0.75rem;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.4;
}

.match-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.match-card {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 0.9rem 0.95rem 0.75rem;
  box-shadow: 0 4px 16px rgba(26, 26, 30, 0.04);
  border: 1px solid var(--line);
}

.match-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.7rem;
}

.match-date {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
}

.phase-tag {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 0.18rem 0.5rem;
}

.phase-tag.playoff {
  color: #fff;
  background: var(--accent);
}

.match-body {
  display: grid;
  grid-template-columns: 3.4rem 1fr;
  gap: 0.65rem;
  align-items: center;
}

.match-time {
  font-size: 1.15rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.match-time.done {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}

.match-teams {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
}

.team-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.team-row img,
.team-row .ph {
  width: 1.4rem;
  height: 1.4rem;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 4px;
}

.team-row .ph {
  background: #f0f1f6;
  display: inline-block;
}

.team-row .name {
  font-size: 0.95rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-row.hl .name {
  color: var(--accent);
}

.team-row .score {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--muted);
}

.team-row .score.on {
  color: var(--ink);
}

.match-footer {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--line);
  font-size: 0.75rem;
  color: var(--muted);
}

.match-footer img {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  object-fit: cover;
  background: #f0f1f6;
}

.match-footer .footer-avatars {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.match-footer .footer-avatars img,
.match-footer .footer-avatars .ph-avatar {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  object-fit: cover;
  background: #f0f1f6;
  border: 1.5px solid #fff;
  margin-left: -0.35rem;
}

.match-footer .footer-avatars img:first-child,
.match-footer .footer-avatars .ph-avatar:first-child {
  margin-left: 0;
}

.match-footer .footer-avatars .ph-avatar {
  display: grid;
  place-items: center;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--muted);
}

.match-footer .footer-avatars .more {
  margin-left: 0.25rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
}

.empty {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.rec-scroll {
  display: flex;
  gap: 0.65rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 0.25rem;
}

.rec-scroll::-webkit-scrollbar {
  display: none;
}

.rec-card {
  flex: 0 0 5.4rem;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 0.55rem 0.4rem 0.5rem;
  text-align: center;
  cursor: pointer;
  font: inherit;
  color: var(--ink);
  position: relative;
}

.rec-card .avatar {
  width: 3.4rem;
  height: 3.4rem;
  margin: 0 auto 0.35rem;
  border-radius: 999px;
  overflow: hidden;
  background: #f0f1f6;
  position: relative;
}

.rec-card .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.rec-card .heart {
  position: absolute;
  right: 0.45rem;
  bottom: 2.15rem;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(107, 78, 255, 0.35);
}

.rec-card:not(.on) .heart {
  background: #d8d8e0;
}

.rec-card .pname {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rec-card .pteam {
  display: block;
  font-size: 0.62rem;
  color: var(--muted);
}

.rec-more {
  flex: 0 0 5.4rem;
  border: 1.5px dashed rgba(107, 78, 255, 0.35);
  background: var(--accent-soft);
  border-radius: 14px;
  color: var(--accent);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-height: 6.6rem;
}

.rec-more .plus {
  font-size: 1.4rem;
  line-height: 1;
}

.tabbar {
  position: sticky;
  bottom: 0;
  z-index: 20;
  margin-top: auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 9rem));
  justify-content: center;
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 0.45rem 0.25rem calc(0.45rem + env(safe-area-inset-bottom));
  min-height: var(--tabbar-h);
  width: 100%;
}

.tab {
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.62rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.25rem;
  cursor: pointer;
}

.tab:disabled {
  opacity: 0.45;
  cursor: default;
}

.tab.on {
  color: var(--accent);
  font-weight: 700;
}

.tab-ico {
  font-size: 1.05rem;
  line-height: 1;
  display: grid;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  color: inherit;
}

.tab-ico svg {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
}

.inj-section {
  margin-bottom: 1.25rem;
}

.inj-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.inj-section-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.inj-section-head .meta {
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted);
}

.leader-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.leader-row {
  display: grid;
  grid-template-columns: 1.6rem 2.1rem 1fr auto;
  align-items: center;
  gap: 0.55rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.55rem 0.75rem;
}

.leader-row.hl {
  border-color: rgba(107, 78, 255, 0.35);
  background: var(--accent-soft);
}

.leader-row .rank {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
}

.leader-row .rank.top {
  color: var(--accent);
}

.leader-row .avatar {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  overflow: hidden;
  background: #ececf2;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
}

.leader-row .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.leader-row .who .name {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
}

.leader-row .who .team {
  margin: 0.08rem 0 0;
  font-size: 0.7rem;
  color: var(--muted);
}

.leader-row .stat {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.inj-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.inj-card {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
}

.inj-card-top {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.inj-card .avatar {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  overflow: hidden;
  background: #ececf2;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--muted);
}

.inj-card .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.inj-card .who {
  flex: 1;
  min-width: 0;
}

.inj-card .who .name {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}

.inj-card .who .team {
  margin: 0.1rem 0 0;
  font-size: 0.72rem;
  color: var(--muted);
}

.inj-card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.55rem;
}

.inj-tag {
  display: inline-block;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  background: rgba(26, 26, 30, 0.06);
  color: var(--ink);
}

.inj-tag.status-out,
.inj-tag.status-ofs {
  background: rgba(255, 90, 95, 0.14);
  color: #c0393e;
}

.inj-tag.status-gtd {
  background: rgba(230, 160, 40, 0.18);
  color: #9a6b00;
}

.inj-card .comment {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #4a4a52;
}

.inj-card .return {
  margin: 0.45rem 0 0;
  font-size: 0.68rem;
  font-weight: 400;
  color: var(--muted);
}

.sheet {
  border: 0;
  padding: 0;
  /* 水平居中；移动端贴底，避免宽屏时整框贴左 */
  margin: auto auto 0;
  inset-inline: 0;
  width: min(26rem, 100%);
  max-height: 85dvh;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -12px 40px rgba(26, 26, 30, 0.15);
}

.boxscore-sheet {
  /* 比分表需要更宽，但仍水平居中，不贴左 */
  width: min(52rem, 100%);
}

.sheet::backdrop {
  background: rgba(26, 26, 30, 0.35);
}

.sheet-inner {
  padding: 1rem 1rem 1.25rem;
  overflow: auto;
  max-height: 85dvh;
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.sheet-head h3 {
  margin: 0;
  font-size: 1.1rem;
}

.sheet-head .icon-btn {
  position: static;
  transform: none;
}

.follow-only-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}

.follow-only-row input {
  accent-color: var(--accent);
  width: 1rem;
  height: 1rem;
}

.sheet-section {
  margin-bottom: 1rem;
}

.sheet-section h4 {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.sheet-search {
  width: 100%;
  margin-bottom: 0.65rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
  outline: none;
}

.sheet-search:focus {
  border-color: rgba(107, 78, 255, 0.45);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.sheet-search[hidden],
.player-grid[hidden],
.star-picker[hidden],
.star-picker-panel[hidden] {
  display: none;
}

.star-picker {
  position: relative;
}

.star-picker-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
}

.star-picker.open .star-picker-btn {
  border-color: rgba(107, 78, 255, 0.45);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.star-picker-caret {
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-2px);
  flex: none;
}

.star-picker.open .star-picker-caret {
  transform: rotate(225deg) translateY(-1px);
}

.star-picker-panel {
  margin-top: 0.4rem;
  max-height: 16rem;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.star-picker-empty {
  margin: 0;
  padding: 0.85rem 0.9rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.star-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.star-option:last-child {
  border-bottom: 0;
}

.star-option.on {
  background: var(--accent-soft);
}

.star-option .avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  overflow: hidden;
  background: #f0f1f6;
  flex: none;
}

.star-option .avatar img,
.star-option .avatar .ph {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.star-option .avatar .ph {
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
}

.star-option .meta {
  min-width: 0;
  flex: 1;
}

.star-option .pname {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.star-option .pteam {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.72rem;
  color: var(--muted);
}

.star-option .check {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  flex: none;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  color: transparent;
}

.star-option.on .check {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chip {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.chip img {
  width: 1rem;
  height: 1rem;
  object-fit: contain;
}

.chip.on {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: rgba(107, 78, 255, 0.4);
  font-weight: 600;
}

.player-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr));
  gap: 0.45rem;
  max-height: 14rem;
  overflow: auto;
}

.player-card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 0.45rem 0.3rem;
  font: inherit;
  cursor: pointer;
  text-align: center;
}

.player-card.on {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.player-card .avatar {
  width: 3rem;
  height: 2.2rem;
  margin: 0 auto 0.25rem;
  overflow: hidden;
  border-radius: 6px;
  background: #f0f1f6;
}

.player-card .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.player-card .pname {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-card .pteam {
  display: block;
  font-size: 0.58rem;
  color: var(--muted);
}

.player-card .inj-badge,
.inj-badge {
  display: inline-block;
  margin-top: 0.2rem;
  padding: 0.08rem 0.35rem;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 700;
  color: #fff;
  background: #ff5a5f;
}

.inj-inline {
  color: #ff5a5f;
  font-weight: 700;
  font-size: 0.7rem;
}

.match-footer.injury-line {
  color: #9a3b3e;
}

.player-card.injured {
  border-color: rgba(255, 90, 95, 0.35);
}

.sheet-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
  padding-top: 0.5rem;
}

.match-card.clickable {
  cursor: pointer;
}

.match-card.clickable:hover {
  border-color: rgba(107, 78, 255, 0.35);
}

.boxscore-sheet .sheet-head {
  justify-content: flex-end;
  margin-bottom: 0.25rem;
}

.box-scoreline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 0.35rem;
  min-height: 2rem;
}

.box-scoreline .side {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.box-scoreline .side img,
.box-scoreline .side .ph {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 999px;
  object-fit: contain;
  background: #f0f1f6;
  flex-shrink: 0;
}

.box-scoreline .side .ph {
  display: grid;
  place-items: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--muted);
}

.box-scoreline .score {
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  padding: 0 0.15rem;
}

.box-scoreline .sep {
  color: var(--muted);
  font-weight: 600;
}

.box-meta {
  text-align: center;
  max-width: none;
  margin-bottom: 0.25rem;
}

.boxscore-sheet .sheet-inner {
  max-height: 90dvh;
}

.box-tabs {
  display: flex;
  gap: 0.45rem;
  justify-content: center;
  margin: 0.65rem 0 0.75rem;
}

.box-table-wrap {
  overflow: auto;
  max-height: calc(90dvh - 8rem);
  -webkit-overflow-scrolling: touch;
}

.box-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.72rem;
  white-space: nowrap;
}

.box-table th,
.box-table td {
  padding: 0.45rem 0.4rem;
  text-align: center;
  border-bottom: 1px solid var(--line);
}

.box-table th {
  position: sticky;
  top: 0;
  background: #fff;
  color: var(--muted);
  font-weight: 600;
  z-index: 1;
}

.box-table .col-player {
  text-align: left;
  min-width: 7.5rem;
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 2;
}

.box-table th.col-player {
  z-index: 3;
}

.box-player {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  text-align: left;
}

.box-player img,
.box-player .ph {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  object-fit: cover;
  background: #ececf2;
  flex-shrink: 0;
}

.box-player .ph {
  display: grid;
  place-items: center;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--muted);
}

.box-player .name {
  font-weight: 600;
  font-size: 0.75rem;
}

.box-table tr.hl td,
.box-table tr.hl .col-player {
  background: var(--accent-soft);
}

.box-table td.pts {
  font-weight: 700;
  color: var(--accent);
}

.ig-card .match-date {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.ig-card .match-date img.logo {
  width: 22px;
  height: 22px;
}

.ig-card .match-date img.logo.headshot,
.ig-card .match-date img.logo.ig-avatar {
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
}

.ig-card img.cover,
.ig-card video.cover {
  width: 100%;
  border-radius: 12px;
  display: block;
  margin-top: 0.65rem;
  background: #ececf1;
}

.ig-gallery {
  position: relative;
  margin-top: 0.65rem;
}

.ig-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border-radius: 12px;
}

.ig-track::-webkit-scrollbar {
  display: none;
}

.ig-track > .cover {
  flex: 0 0 100%;
  width: 100%;
  margin-top: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.ig-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 1.8rem;
  height: 1.8rem;
  border: 0;
  border-radius: 999px;
  background: rgba(26, 26, 30, 0.55);
  color: #fff;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.ig-nav.prev {
  left: 0.45rem;
}

.ig-nav.next {
  right: 0.45rem;
}

.ig-nav:disabled {
  opacity: 0.28;
}

.ig-count {
  position: absolute;
  right: 0.55rem;
  bottom: 0.55rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: rgba(26, 26, 30, 0.55);
  color: #fff;
  font-size: 0.68rem;
}

.ig-card .caption {
  margin: 0.55rem 0 0;
  font-size: 0.92rem;
  line-height: 1.45;
}

.migrate {
  border: 0;
  padding: 0;
  margin: auto;
  width: min(22rem, calc(100% - 2rem));
  border-radius: 20px;
  color: var(--ink);
  box-shadow: 0 16px 48px rgba(26, 26, 30, 0.18);
}

.migrate::backdrop {
  background: rgba(26, 26, 30, 0.45);
}

.migrate-inner {
  padding: 1.25rem 1.15rem 1.15rem;
}

.migrate h2 {
  margin: 0 0 0.45rem;
  font-size: 1.15rem;
}

.migrate p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: #4a4a52;
}

.migrate-url {
  margin-top: 0.65rem !important;
  font-weight: 700;
  color: var(--ink) !important;
}

.migrate-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 1.1rem;
}

@media (min-width: 760px) {
  .match-list,
  .inj-list,
  .leader-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .league-tabs {
    max-width: 28rem;
  }

  .sheet {
    margin: 6vh auto;
    border-radius: 20px;
    max-height: 88dvh;
  }
}
