:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  --color-institutional: #022446;
  --color-base: #081b2d;
  --color-surface: #10263d;
  --color-blue: #123e69;
  --color-violet: #4736c8;
  --color-ball: #ddf542;
  --color-text-primary: #ffffff;
  --color-text-secondary: #aebfd0;
  --color-card: rgb(255 255 255 / 0.08);
  --color-card-strong: rgb(255 255 255 / 0.1);
  --color-border: rgb(255 255 255 / 0.14);
  --color-net: rgb(255 255 255 / 0.1);
  --color-shadow: rgb(0 0 0 / 0.28);
  --color-warning-bg: rgb(221 245 66 / 0.12);
  --color-warning-border: rgb(221 245 66 / 0.42);
  --color-medallion-border: rgb(71 54 200 / 0.8);
  --font-brand-sport: "Bahnschrift SemiCondensed", "Arial Narrow", "Segoe UI", sans-serif;
  --app-width: 600px;
  --header-visual-height: 84px;
  --brand-capsule-height: 48px;
  --bottom-nav-height: 78px;
  --radius-card: 18px;
  --shadow-card: 0 14px 32px var(--color-shadow);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  overflow-x: hidden;
  background: var(--color-base);
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  color: var(--color-text-primary);
  background:
    radial-gradient(circle at 84% -10%, var(--color-violet), transparent 31rem),
    var(--color-base);
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
}

.app-shell {
  position: relative;
  width: min(100%, var(--app-width));
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  overflow: clip;
  background:
    radial-gradient(circle at 12% 32%, rgb(18 62 105 / 0.38), transparent 24rem),
    var(--color-base);
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 1rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  color: var(--color-base);
  font-weight: 700;
  background: var(--color-ball);
  border-radius: 0.5rem;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.app-header,
.bottom-nav,
.loading-overlay {
  isolation: isolate;
}

.app-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(var(--header-visual-height) + env(safe-area-inset-top));
  padding: calc(0.5rem + env(safe-area-inset-top)) 0.75rem 0.5rem;
  overflow: hidden;
  border-radius: 24px 24px 0 0;
  background: linear-gradient(108deg, var(--color-institutional), var(--color-blue) 58%, var(--color-violet));
}

.app-header::before,
.app-header::after,
.bottom-nav::before,
.loading-overlay::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
}

.app-header::before,
.bottom-nav::before,
.loading-overlay::before {
  opacity: 0.32;
  background-image:
    linear-gradient(145deg, transparent 45%, var(--color-net) 45.5%, transparent 46%),
    linear-gradient(31deg, transparent 54%, var(--color-net) 54.5%, transparent 55%),
    linear-gradient(90deg, transparent 72%, var(--color-net) 72.5%, transparent 73%);
  background-size: 100% 100%;
  mask-image: linear-gradient(102deg, var(--color-text-primary), transparent 95%);
}

.app-header::after {
  inset: auto;
  top: calc(6px + env(safe-area-inset-top));
  left: -12px;
  z-index: 0;
  width: 58px;
  height: 3px;
  border-radius: 999px;
  background: var(--color-ball);
  box-shadow: 0 0 12px var(--color-ball);
  transform: rotate(-38deg);
}

.app-header::before {
  z-index: 0;
}

.brand-capsule {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(100%, 318px);
  height: var(--brand-capsule-height);
  overflow: hidden;
  border: 1px solid rgb(126 117 244 / 0.72);
  border-radius: 999px;
  background: linear-gradient(105deg, var(--color-institutional), #0b3158 62%, #172d52);
  box-shadow:
    0 0 0 1px rgb(2 36 70 / 0.5),
    0 8px 18px rgb(0 0 0 / 0.28),
    inset 0 0 15px rgb(71 54 200 / 0.2);
}

.brand-segment {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
}

.brand-segment-primary {
  position: relative;
  z-index: 2;
  flex: 0 0 58%;
  gap: 0.18rem;
  margin: 0 -18px 0 0;
  padding: 0.2rem 1.35rem 0.2rem 0.35rem;
  color: var(--color-institutional);
  background: var(--color-text-primary);
  border: 1px solid rgb(18 62 105 / 0.2);
  border-radius: 999px;
  box-shadow: 7px 0 14px rgb(2 36 70 / 0.22);
}

.brand-segment-secondary {
  flex: 1 1 auto;
  padding: 0.2rem 0.65rem 0.2rem 1.45rem;
  color: var(--color-text-primary);
  background: transparent;
}

.brand-logo-frame {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  overflow: hidden;
  place-items: center;
}

.header-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1.72);
  transform-origin: center;
}

.brand-name {
  overflow: hidden;
  font-family: var(--font-brand-sport);
  font-size: 1.02rem;
  font-stretch: semi-condensed;
  font-style: oblique 10deg;
  font-weight: 950;
  letter-spacing: -0.012em;
  paint-order: stroke fill;
  text-overflow: clip;
  transform: skewX(-3deg);
  -webkit-text-stroke: 0.45px var(--color-institutional);
  white-space: nowrap;
}

.brand-segment-secondary h1 {
  margin: 0;
  color: var(--color-text-primary);
  font-family: var(--font-brand-sport);
  font-size: clamp(0.92rem, 4vw, 1.05rem);
  font-stretch: condensed;
  font-style: oblique 10deg;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.045em;
  text-shadow: 0 1px 3px rgb(0 0 0 / 0.34);
  transform: skewX(-3deg);
  white-space: nowrap;
}

@media (max-width: 359px) {
  .app-header {
    --header-visual-height: 80px;
    --brand-capsule-height: 46px;
    padding-right: 0.65rem;
    padding-left: 0.65rem;
  }

  .brand-capsule {
    width: min(100%, 304px);
  }

  .brand-segment-primary {
    flex-basis: 57%;
    margin-right: -16px;
    padding-right: 1.15rem;
  }

  .brand-segment-secondary {
    padding-right: 0.5rem;
    padding-left: 1.25rem;
  }

  .brand-logo-frame {
    flex-basis: 39px;
    width: 39px;
    height: 39px;
  }

  .brand-name {
    font-size: 0.94rem;
  }

  .brand-segment-secondary h1 {
    font-size: 0.9rem;
  }
}

.app-main {
  width: 100%;
  padding: 1.6rem 1rem calc(var(--bottom-nav-height) + 2.25rem + env(safe-area-inset-bottom));
}

.intro {
  margin-bottom: 1.45rem;
}

.eyebrow {
  margin: 0 0 0.45rem;
  color: var(--color-ball);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.intro h2 {
  margin: 0;
  font-size: clamp(1.55rem, 7vw, 2.15rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.intro > p:last-child {
  max-width: 31rem;
  margin: 0.65rem 0 0;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.offline-banner {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  color: var(--color-text-primary);
  line-height: 1.4;
  border: 1px solid var(--color-warning-border);
  border-radius: 13px;
  background: var(--color-warning-bg);
}

.state-panel {
  display: grid;
  justify-items: center;
  min-height: 236px;
  padding: 2.3rem 1.25rem;
  text-align: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: linear-gradient(145deg, var(--color-card-strong), var(--color-card)), var(--color-surface);
  box-shadow: var(--shadow-card);
}

.state-panel[hidden],
.category-list[hidden],
#home-view[hidden],
#standings-view[hidden],
#matches-view[hidden],
#team-view[hidden],
#player-view[hidden],
.standings-table-region[hidden],
.team-profile[hidden],
.matches-list[hidden] {
  display: none;
}

.state-panel h3 {
  margin: 0.9rem 0 0.4rem;
  font-size: 1.2rem;
}

.state-panel p {
  max-width: 25rem;
  margin: 0;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.state-panel.is-error h3 {
  color: var(--color-ball);
}

.icon {
  display: block;
  flex: 0 0 auto;
}

.state-icon {
  width: 50px;
  height: 50px;
  color: var(--color-ball);
}

.retry-button {
  min-height: 44px;
  margin-top: 1.3rem;
  padding: 0.65rem 1.2rem;
  color: var(--color-base);
  font-weight: 800;
  border: 0;
  border-radius: 999px;
  background: var(--color-ball);
  cursor: pointer;
  transition: transform 150ms ease, filter 150ms ease;
}

.category-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.9rem;
}

.category-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-height: 76px;
  width: 100%;
  padding: 1rem 1.05rem;
  text-decoration: none;
  color: inherit;
  font: inherit;
  text-align: left;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: linear-gradient(135deg, var(--color-card-strong), var(--color-card)), var(--color-surface);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.category-card .icon-tennis-ball {
  width: 29px;
  height: 29px;
  color: var(--color-ball);
}

.category-card > span {
  min-width: 0;
}

.category-card strong,
.category-card small {
  display: block;
}

.category-card strong {
  overflow-wrap: anywhere;
  font-size: 1.04rem;
}

.category-card small {
  margin-top: 0.2rem;
  color: var(--color-text-secondary);
  font-size: 0.82rem;
}

.category-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.3rem;
  color: var(--color-text-secondary);
  font-size: 0.78rem;
}

.category-metric {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  white-space: nowrap;
}

.icon-metric {
  width: 16px;
  height: 16px;
  color: var(--color-ball);
}

.category-card::after {
  margin-left: auto;
  color: var(--color-text-secondary);
  font-size: 1.7rem;
  content: "›";
}

.category-card[aria-pressed="true"] {
  border-color: rgb(221 245 66 / 0.68);
}

.standings-intro {
  margin-bottom: 1.25rem;
}

.context-back {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 0.35rem;
  margin: -0.55rem 0 0.65rem -0.45rem;
  padding: 0.45rem;
  color: var(--color-text-secondary);
  font-weight: 700;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.context-back span {
  color: var(--color-ball);
  font-size: 1.65rem;
  line-height: 0.8;
}

.standings-category {
  margin: 0 0 0.2rem;
  overflow-wrap: anywhere;
  color: var(--color-text-primary);
  font-size: clamp(1.2rem, 5.2vw, 1.55rem);
  font-weight: 800;
  line-height: 1.18;
}

.standings-intro h2 {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 1rem;
  font-weight: 650;
}

.standings-state-panel {
  min-height: 218px;
}

.standings-table-region {
  width: 100%;
  margin-bottom: 0.75rem;
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: var(--color-surface);
  box-shadow: 0 12px 28px rgb(0 0 0 / 0.22);
  scrollbar-color: var(--color-violet) var(--color-base);
  scrollbar-width: thin;
  overscroll-behavior-inline: contain;
}

.standings-table {
  width: 100%;
  min-width: 584px;
  border-spacing: 0;
  border-collapse: separate;
  table-layout: fixed;
  font-size: 0.72rem;
}

.standings-table th,
.standings-table td {
  padding: 0.34rem 0.16rem;
  border-bottom: 1px solid rgb(255 255 255 / 0.09);
}

.standings-table th {
  height: 38px;
  color: var(--color-text-secondary);
  font-size: 0.59rem;
  font-weight: 750;
  line-height: 1.18;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.035em;
  background: #0d2943;
}

.standings-table th abbr {
  text-decoration: none;
}

.standings-table tbody tr {
  --table-row-bg: #10263d;
  height: 44px;
  cursor: pointer;
}

.standings-table tbody tr:nth-child(even) {
  --table-row-bg: #0d2237;
}

.standings-table tbody td {
  color: var(--color-text-primary);
  background: var(--table-row-bg);
  transition: filter 140ms ease, background 140ms ease;
}

.standings-table tbody tr:hover td {
  filter: brightness(1.12);
}

.standings-table tbody tr:focus-visible {
  outline: none;
}

.standings-table tbody tr:focus-visible td {
  box-shadow: inset 0 2px var(--color-ball), inset 0 -2px var(--color-ball);
}

.standings-table tbody tr:last-child td {
  border-bottom: 0;
}

.standings-table .column-position {
  position: sticky;
  left: 0;
  z-index: 3;
  width: 34px;
  text-align: center;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  box-shadow: 1px 0 rgb(255 255 255 / 0.09);
}

.standings-table .column-team {
  position: sticky;
  left: 34px;
  z-index: 2;
  width: 150px;
  box-shadow: 2px 0 rgb(255 255 255 / 0.11);
}

.standings-table th.column-position,
.standings-table th.column-team {
  z-index: 5;
  background: #0d2943;
}

.standings-table .column-number {
  width: 50px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  border-left: 1px solid rgb(255 255 255 / 0.035);
}

.standings-table .column-played {
  width: 50px;
}

.standings-table .column-unavailable {
  width: 50px;
}

.standings-table .column-pending {
  width: 50px;
}

.standing-position.is-top-six {
  color: #061807;
  background: #52b72f;
  box-shadow: inset 0 0 0 1px rgb(221 245 66 / 0.45);
}

.standing-position.is-ranked-neutral {
  color: var(--color-text-primary);
  background: rgb(255 255 255 / 0.04);
}

.standing-team-name {
  display: block;
  overflow: hidden;
  font-size: 0.74rem;
  font-weight: 780;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.standing-number {
  color: var(--color-text-primary);
  font-weight: 720;
}

.standing-number.is-unavailable {
  color: var(--color-text-secondary);
  font-weight: 600;
}

.matches-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 1rem 0;
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: var(--color-card);
}

.matches-filter {
  display: grid;
  min-width: 0;
  gap: 0.3rem;
  color: var(--color-text-secondary);
  font-size: 0.7rem;
  font-weight: 700;
}

.matches-filter select {
  width: 100%;
  min-height: 44px;
  padding: 0 1.8rem 0 0.55rem;
  overflow: hidden;
  color: var(--color-text-primary);
  font-size: 0.76rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: #102a44;
}

.matches-filter select:focus-visible,
.matches-clear-filters:focus-visible,
.match-team-link:focus-visible {
  outline: 3px solid var(--color-ball);
  outline-offset: 2px;
}

.matches-clear-filters {
  grid-column: 1 / -1;
  min-height: 44px;
  padding: 0.55rem 0.8rem;
  color: var(--color-ball);
  font-size: 0.78rem;
  font-weight: 750;
  border: 1px solid var(--color-warning-border);
  border-radius: 10px;
  background: var(--color-warning-bg);
  cursor: pointer;
}

.matches-current-player-note {
  margin: -0.35rem 0 1rem;
  padding: 0.65rem 0.75rem;
  color: var(--color-text-secondary);
  font-size: 0.78rem;
  line-height: 1.4;
  border-left: 3px solid var(--color-ball);
  border-radius: 0 10px 10px 0;
  background: rgb(46 75 104 / 0.42);
}

.matches-list {
  display: grid;
  gap: 0.85rem;
}

.confrontation-card {
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: var(--color-card);
  box-shadow: 0 10px 22px rgb(0 0 0 / 0.16);
}

.confrontation-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.5rem;
  padding: 0.72rem;
  background: linear-gradient(100deg, rgb(18 62 105 / 0.42), rgb(71 54 200 / 0.2));
}

.match-team {
  display: grid;
  min-width: 0;
  gap: 0.2rem;
}

.match-team.is-side-b {
  text-align: right;
}

.match-team-link {
  min-width: 44px;
  min-height: 44px;
  padding: 0.25rem;
  overflow: hidden;
  color: var(--color-text-primary);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.15;
  text-align: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.match-team.is-winner .match-team-link::after {
  display: block;
  margin-top: 0.18rem;
  color: var(--color-ball);
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  content: "Vencedora";
}

.confrontation-score {
  min-width: 64px;
  text-align: center;
}

.confrontation-score strong {
  display: block;
  font-size: 1rem;
}

.confrontation-score span {
  display: block;
  margin-top: 0.2rem;
  color: var(--color-text-secondary);
  font-size: 0.62rem;
  font-weight: 700;
}

.confrontation-status {
  display: flex;
  justify-content: center;
  padding: 0.42rem 0.65rem;
  color: var(--color-text-secondary);
  font-size: 0.68rem;
  font-weight: 750;
  border-top: 1px solid rgb(255 255 255 / 0.08);
  border-bottom: 1px solid rgb(255 255 255 / 0.08);
}

.confrontation-matches {
  display: grid;
}

.match-row {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  min-height: 62px;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid rgb(255 255 255 / 0.08);
}

.match-row:last-child {
  border-bottom: 0;
}

.match-type {
  color: var(--color-ball);
  font-size: 0.67rem;
  font-weight: 800;
  text-transform: uppercase;
}

.match-participants {
  display: grid;
  min-width: 0;
  gap: 0.28rem;
}

.match-participant-side {
  display: flex;
  min-width: 0;
  gap: 0.28rem;
  align-items: center;
  color: var(--color-text-secondary);
  font-size: 0.73rem;
}

.match-participant-side.is-winner {
  color: var(--color-text-primary);
  font-weight: 750;
}

.match-participant-side.is-winner::before {
  color: var(--color-ball);
  content: "✓";
}

.match-player-names {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-result {
  min-width: 78px;
  color: var(--color-text-primary);
  font-size: 0.72rem;
  font-weight: 750;
  text-align: right;
  white-space: nowrap;
}

.match-result.is-wo {
  color: var(--color-ball);
  font-size: 0.82rem;
}

.confrontation-empty-matches {
  margin: 0;
  padding: 0.85rem;
  color: var(--color-text-secondary);
  font-size: 0.76rem;
  text-align: center;
}

.matches-skeleton .skeleton-row {
  height: 112px;
}

.team-state-panel {
  min-height: 218px;
}

.team-profile {
  display: grid;
  gap: 0.75rem;
  padding-bottom: 0.5rem;
}

.team-profile-intro {
  display: grid;
  gap: 0.1rem;
  padding-inline: 0.1rem;
}

.team-profile-intro p,
.team-profile-intro small {
  margin: 0;
}

.team-profile-intro p {
  color: var(--color-accent);
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.team-profile-intro small {
  color: var(--color-text-secondary);
  font-size: 0.78rem;
}

.team-score-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1px 1fr 1px 1.25fr;
  min-height: 96px;
  overflow: hidden;
  border: 1px solid rgb(126 117 244 / 0.48);
  border-radius: var(--radius-card);
  background:
    linear-gradient(126deg, rgb(18 62 105 / 0.92), rgb(71 54 200 / 0.72)),
    var(--color-surface);
  box-shadow: var(--shadow-card);
}

.team-score-card::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(145deg, transparent 47%, rgb(255 255 255 / 0.07) 47.5%, transparent 48%),
    radial-gradient(circle at 88% 12%, rgb(221 245 66 / 0.16), transparent 36%);
  content: "";
}

.player-score-card {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-height: 92px;
  overflow: hidden;
  border: 1px solid rgb(126 117 244 / 0.48);
  border-radius: var(--radius-card);
  background:
    linear-gradient(126deg, rgb(18 62 105 / 0.92), rgb(71 54 200 / 0.72)),
    var(--color-surface);
  box-shadow: var(--shadow-card);
}

.player-score-card .team-score-item + .team-score-item {
  border-left: 1px solid rgb(255 255 255 / 0.16);
}

.player-score-card .team-score-item strong {
  font-size: clamp(1.25rem, 5.5vw, 1.8rem);
}

.player-score-card .team-score-item:first-child strong,
.player-score-card .team-score-item:last-child strong {
  color: var(--color-ball);
}

.player-profile-heading {
  gap: 0.12rem;
}

.player-team-name,
.player-current-role {
  margin: 0;
  color: var(--color-text-secondary);
}

.player-team-name {
  font-size: 0.78rem;
}

.player-current-role {
  color: var(--color-ball);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.team-score-item {
  position: relative;
  z-index: 1;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.12rem;
  padding: 0.72rem 0.35rem;
}

.team-score-item span {
  color: var(--color-text-secondary);
  font-size: clamp(0.56rem, 2vw, 0.68rem);
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.team-score-item strong {
  color: var(--color-text-primary);
  font-family: var(--font-brand-sport);
  font-size: clamp(1.55rem, 7vw, 2.15rem);
  font-style: oblique 7deg;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.team-score-item:first-child strong,
.team-score-item:last-child strong {
  color: var(--color-ball);
}

.team-score-divider {
  align-self: center;
  height: 58%;
  background: rgb(255 255 255 / 0.2);
}

.team-section {
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: linear-gradient(145deg, var(--color-card-strong), var(--color-card)), var(--color-surface);
  box-shadow: 0 10px 24px rgb(0 0 0 / 0.18);
}

.team-section-heading {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  list-style: none;
  padding: 0.65rem 0.85rem;
  background: rgb(2 36 70 / 0.42);
}

.team-section > summary.team-section-heading {
  cursor: pointer;
}

.team-section > summary.team-section-heading::-webkit-details-marker {
  display: none;
}

.team-section[open] > .team-section-heading,
.team-section:not(details) > .team-section-heading {
  border-bottom: 1px solid var(--color-border);
}

.team-section-heading h3,
.team-section-copy strong {
  margin: 0;
  font-size: 0.96rem;
}

.team-section-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 0.05rem;
}

.team-section-copy small {
  color: var(--color-text-secondary);
  font-size: 0.65rem;
  font-weight: 550;
}

.team-section-chevron {
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--color-text-secondary);
  border-bottom: 2px solid var(--color-text-secondary);
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.team-section[open] .team-section-chevron {
  transform: rotate(225deg);
}

.team-section-mark {
  display: block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-ball);
  border-radius: 50%;
  box-shadow: inset 7px 0 0 -5px var(--color-ball), inset -7px 0 0 -5px var(--color-ball);
}

.team-section-mark.is-players {
  position: relative;
  width: 21px;
  height: 17px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.team-section-mark.is-matches,
.team-section-mark.is-sets {
  border-radius: 5px;
  box-shadow: inset 0 -5px 0 -3px var(--color-ball);
}

.team-section-mark.is-sets {
  transform: rotate(45deg) scale(0.75);
}

.team-section-mark.is-wo {
  display: grid;
  width: 25px;
  height: 20px;
  place-items: center;
  color: var(--color-base);
  font-size: 0.55rem;
  font-weight: 950;
  border: 0;
  border-radius: 5px;
  background: var(--color-ball);
  box-shadow: none;
}

.team-section-mark.is-players::before,
.team-section-mark.is-players::after {
  position: absolute;
  bottom: 0;
  width: 9px;
  height: 9px;
  border: 1.5px solid var(--color-ball);
  border-radius: 50% 50% 4px 4px;
  content: "";
}

.team-section-mark.is-players::before {
  left: 1px;
}

.team-section-mark.is-players::after {
  right: 1px;
}

.team-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.team-metrics.is-four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.team-metrics.is-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.team-metric {
  display: flex;
  min-width: 0;
  min-height: 66px;
  flex-direction: column-reverse;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.55rem 0.2rem;
  text-align: center;
  border-top: 1px solid rgb(255 255 255 / 0.045);
  border-left: 1px solid rgb(255 255 255 / 0.065);
}

.team-metrics.is-four .team-metric:nth-child(4n + 1),
.team-metrics.is-three .team-metric:nth-child(3n + 1),
.team-metrics.is-wo .team-metric:nth-child(2n + 1) {
  border-left: 0;
}

.team-metrics:not(.is-four, .is-three, .is-wo) .team-metric:nth-child(2n + 1) {
  border-left: 0;
}

.team-metric dt {
  color: var(--color-text-secondary);
  font-size: clamp(0.56rem, 2vw, 0.67rem);
  line-height: 1.12;
}

.team-metric dd {
  margin: 0;
  color: var(--color-text-primary);
  font-size: 1.25rem;
  font-weight: 850;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.team-metric dd.balance-value.is-positive {
  color: #86ec8e;
}

.team-metric dd.balance-value.is-negative {
  color: #ffac80;
}

.team-metric dd.balance-value.is-neutral {
  color: var(--color-text-primary);
}

.team-section-body {
  display: grid;
}

.team-stat-groups {
  display: grid;
  border-top: 1px solid rgb(255 255 255 / 0.08);
}

.team-stat-group + .team-stat-group {
  border-top: 1px solid rgb(255 255 255 / 0.08);
}

.team-stat-group h4 {
  margin: 0;
  padding: 0.48rem 0.75rem 0.15rem;
  color: var(--color-ball);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.team-players {
  margin: 0;
  padding: 0;
  list-style: none;
}

.team-players li {
  border-bottom: 1px solid rgb(255 255 255 / 0.08);
}

.team-players li:last-child {
  border-bottom: 0;
}

.team-player-link {
  display: flex;
  width: 100%;
  min-height: 60px;
  align-items: center;
  gap: 0.75rem;
  padding: 0.62rem 0.85rem;
  color: var(--color-text-primary);
  text-align: left;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.team-player-link:hover {
  background: rgb(255 255 255 / 0.04);
}

.team-player-link:disabled {
  color: var(--color-text-secondary);
  cursor: default;
  opacity: 0.72;
}

.team-player-link:disabled .player-link-arrow {
  display: none;
}

.team-player-link:focus-visible,
.team-section > summary:focus-visible {
  outline: 3px solid var(--color-ball);
  outline-offset: -3px;
}

.player-link-arrow {
  margin-left: auto;
  color: var(--color-text-secondary);
  font-size: 1.5rem;
  line-height: 1;
}

.player-role {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--color-base);
  font-size: 0.75rem;
  font-weight: 900;
  border-radius: 50%;
  background: var(--color-ball);
  box-shadow: 0 0 0 3px rgb(221 245 66 / 0.12);
}

.player-copy {
  display: grid;
  min-width: 0;
  gap: 0.12rem;
}

.player-copy small {
  color: var(--color-text-secondary);
  font-size: 0.7rem;
}

.player-copy strong {
  overflow-wrap: anywhere;
  font-size: 0.92rem;
}

.standings-skeleton {
  display: grid;
  width: 100%;
  gap: 0.7rem;
}

.skeleton-row {
  height: 58px;
  border-radius: 13px;
  background: linear-gradient(100deg, var(--color-card) 30%, rgb(255 255 255 / 0.16) 50%, var(--color-card) 70%);
  background-size: 220% 100%;
  animation: skeleton-shimmer 1.2s ease-in-out infinite;
}

.state-panel .slow-loading-message {
  margin-top: 1rem;
  color: var(--color-text-secondary);
  font-size: 0.86rem;
  font-weight: 650;
}

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

@keyframes skeleton-shimmer {
  to {
    background-position-x: -220%;
  }
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 50%;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(84px, 120px);
  justify-content: center;
  width: min(100%, var(--app-width));
  min-height: var(--bottom-nav-height);
  padding: 0.35rem max(0.6rem, env(safe-area-inset-right)) calc(0.35rem + env(safe-area-inset-bottom)) max(0.6rem, env(safe-area-inset-left));
  overflow: hidden;
  border-top: 1px solid var(--color-border);
  background: linear-gradient(105deg, var(--color-institutional), var(--color-blue) 58%, var(--color-violet));
  box-shadow: 0 -10px 28px var(--color-shadow);
  transform: translateX(-50%);
}

.bottom-nav[data-context="category"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  justify-content: stretch;
}

.bottom-nav::before {
  opacity: 0.45;
  mask-image: linear-gradient(90deg, transparent, var(--color-text-primary) 25%, transparent);
}

.nav-item {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  min-width: 44px;
  min-height: 58px;
  gap: 0.2rem;
  padding: 0.2rem;
  color: var(--color-text-secondary);
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-item:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.nav-item::before {
  position: absolute;
  top: -0.35rem;
  width: 30px;
  height: 2px;
  border-radius: 999px;
  background: transparent;
  content: "";
}

.nav-item.is-active {
  color: var(--color-text-primary);
}

.nav-item.is-active::before {
  background: var(--color-ball);
}

.nav-icon,
.icon-navigation {
  width: 27px;
  height: 27px;
}

.retry-button:hover,
.category-card:hover {
  filter: brightness(1.08);
}

.retry-button:active,
.category-card:active {
  transform: scale(0.98);
}

.retry-button:focus-visible,
.category-card:focus-visible,
.nav-item:focus-visible,
.context-back:focus-visible,
.standings-table-region:focus-visible {
  outline: 3px solid var(--color-ball);
  outline-offset: 3px;
}

:is(#titulo-categorias, #titulo-classificacao, #titulo-jogos, #titulo-equipe, #titulo-jogador, .state-panel h3):focus {
  outline: none;
}

:is(#titulo-categorias, #titulo-classificacao, #titulo-jogos, #titulo-equipe, #titulo-jogador, .state-panel h3):focus-visible {
  outline: 3px solid var(--color-ball);
  outline-offset: 4px;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.3rem;
  width: min(100%, var(--app-width));
  margin: 0 auto;
  color: var(--color-text-primary);
  text-align: center;
  background: linear-gradient(128deg, var(--color-institutional), var(--color-blue) 60%, var(--color-violet));
  transition: opacity 260ms ease, visibility 260ms ease;
}

.loading-overlay::before {
  opacity: 0.6;
  mask-image: radial-gradient(circle at center, var(--color-text-primary), transparent 72%);
}

.loading-overlay img {
  width: clamp(126px, 38vw, 172px);
  height: auto;
  filter: drop-shadow(0 12px 20px var(--color-shadow));
  animation: logo-glow 1800ms ease-in-out infinite alternate;
}

.loading-overlay p {
  margin: 0.6rem 0 0;
  color: var(--color-text-secondary);
}

.loading-overlay noscript {
  max-width: 20rem;
  margin-top: 1rem;
  line-height: 1.45;
}

.loading-overlay.is-hidden {
  visibility: hidden;
  opacity: 0;
}

.spinner {
  width: 34px;
  height: 34px;
  margin-top: 0.85rem;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-ball);
  border-radius: 50%;
  animation: spin 850ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes logo-glow {
  to {
    filter: drop-shadow(0 12px 26px var(--color-ball));
    transform: scale(1.025);
  }
}

@media (max-width: 359px) {
  .app-main {
    padding-right: 0.8rem;
    padding-left: 0.8rem;
  }

  .standings-table .column-team {
    position: static;
    box-shadow: none;
  }

  .standings-table th.column-team {
    background: #0d2943;
  }
}

@media (min-width: 768px) {
  body {
    padding: 1.25rem;
    background:
      radial-gradient(circle at 12% 0%, rgb(71 54 200 / 0.24), transparent 38rem),
      radial-gradient(circle at 88% 100%, rgb(18 62 105 / 0.26), transparent 42rem),
      var(--color-base);
  }

  .app-shell {
    --app-width: min(calc(100vw - 2.5rem), 900px);
    min-height: calc(100vh - 2.5rem);
    min-height: calc(100dvh - 2.5rem);
    border: 1px solid var(--color-border);
    border-radius: 26px;
    box-shadow: 0 24px 65px var(--color-shadow);
  }

  .bottom-nav {
    bottom: 1.25rem;
    border-right: 1px solid var(--color-border);
    border-left: 1px solid var(--color-border);
    border-radius: 0 0 26px 26px;
  }

  .app-main {
    padding-right: 1.5rem;
    padding-left: 1.5rem;
  }

  #home-view {
    max-width: 900px;
    margin-inline: auto;
  }

  .category-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .team-profile,
  .player-profile {
    max-width: 880px;
    margin-inline: auto;
  }

  .matches-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    align-items: end;
  }

  .matches-clear-filters {
    grid-column: auto;
    min-width: 126px;
  }

  .standings-table {
    min-width: 760px;
  }

  .standings-table .column-team {
    width: 230px;
  }

  .standings-table .column-number,
  .standings-table .column-played,
  .standings-table .column-unavailable,
  .standings-table .column-pending {
    width: 58px;
  }
}

@media (min-width: 1100px) {
  body {
    padding: 1.5rem;
  }

  .app-shell {
    --app-width: min(calc(100vw - 3rem), 1180px);
    min-height: calc(100vh - 3rem);
    min-height: calc(100dvh - 3rem);
  }

  .bottom-nav {
    bottom: 1.5rem;
  }

  .app-main {
    padding-right: 2rem;
    padding-left: 2rem;
  }

  #home-view {
    max-width: 920px;
  }

  .standings-table {
    min-width: 0;
  }

  .standings-table .column-team {
    width: 300px;
  }

  .team-profile,
  .player-profile {
    max-width: 900px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
