.wave-page {
  --wave-blue: #8fdcff;
  --wave-blue-soft: rgba(143, 220, 255, 0.12);
}

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

.wave-shell {
  max-width: 1420px;
}

.nav a.active {
  color: var(--text);
  border-color: var(--line-strong);
  background: var(--accent-soft);
}

.wave-main {
  display: grid;
  gap: 18px;
}

.wave-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  min-height: 330px;
  overflow: hidden;
  padding: clamp(28px, 5vw, 72px);
}

.wave-hero::after {
  content: "";
  position: absolute;
  inset: auto -12% -55% 35%;
  height: 370px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 214, 10, 0.19), transparent 67%);
  pointer-events: none;
}

.wave-hero-copy {
  position: relative;
  z-index: 2;
  align-self: center;
  max-width: 720px;
}

.wave-hero h1 {
  margin: 8px 0 12px;
  max-width: 780px;
  font-size: clamp(3.2rem, 8vw, 7.4rem);
  line-height: 0.82;
  letter-spacing: -0.07em;
  text-transform: uppercase;
}

.wave-hero-copy > p {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.3rem);
  line-height: 1.55;
}

.wave-event-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  color: var(--muted);
}

.wave-event-line strong {
  color: var(--text);
}

.wave-events {
  padding: 24px;
}

.wave-events-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.wave-events-head h2 {
  margin: 4px 0;
  letter-spacing: -.035em;
}

.wave-events-head p {
  margin: 0;
  color: var(--muted);
  font-size: .86rem;
}

.wave-events-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  color: var(--muted);
  font-size: .72rem;
}

.wave-events-legend span,
.wave-event-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.wave-events-legend i,
.wave-event-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #666;
}

.wave-events-legend i.is-live,
.wave-event-card.has-list .wave-event-status i {
  background: #7bea9b;
  box-shadow: 0 0 0 4px rgba(123,234,155,.1);
}

.wave-event-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.wave-event-card {
  display: grid;
  align-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 100px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  text-align: left;
  background: rgba(255,255,255,.022);
}

.wave-event-card:not(:disabled) {
  cursor: pointer;
}

.wave-event-card:not(:disabled):hover,
.wave-event-card:not(:disabled):focus-visible {
  border-color: rgba(255,214,10,.42);
  outline: none;
  background: rgba(255,214,10,.045);
}

.wave-event-card.is-selected {
  border-color: rgba(255,214,10,.48);
  background: linear-gradient(145deg, rgba(255,214,10,.11), rgba(255,255,255,.022));
}

.wave-event-card:disabled {
  color: var(--text);
  opacity: .67;
}

.wave-event-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.wave-event-card-top b {
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .72rem;
  letter-spacing: .08em;
}

.wave-event-card > strong {
  font-size: .98rem;
  line-height: 1.2;
}

.wave-event-loading {
  grid-column: 1 / -1;
  padding: 30px;
  color: var(--muted);
  text-align: center;
}

.wave-hero-visual {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  gap: 12px;
  perspective: 700px;
}

.wave-lane {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  padding: 0 20px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  background: linear-gradient(90deg, rgba(255,255,255,.08), rgba(255,255,255,.025));
  transform: rotateY(-7deg) translateX(var(--shift));
}

.wave-lane span {
  color: var(--muted-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.wave-lane i {
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.wave-lane b {
  color: var(--accent);
  font-size: .72rem;
  letter-spacing: .16em;
}

.lane-1 { --shift: 26px; opacity: .58; }
.lane-2 { --shift: 0px; }
.lane-3 { --shift: 36px; opacity: .78; }

.wave-finder {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(280px, .85fr) minmax(360px, 1.15fr);
  align-items: end;
  gap: 30px;
  padding: 24px;
}

.finder-copy h2,
.wave-controls h2,
.wave-explainer h2 {
  margin: 4px 0 6px;
  letter-spacing: -.035em;
}

.finder-copy p,
.wave-explainer p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.wave-search-wrap {
  position: relative;
}

.wave-search-field input {
  height: 58px;
  font-size: 1rem;
}

.wave-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 30;
  max-height: 360px;
  overflow-y: auto;
  padding: 6px;
  border-color: rgba(255,214,10,.24);
  background: rgba(18,18,18,.98);
  box-shadow: 0 20px 50px rgba(0,0,0,.52);
}

.wave-search-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 16px;
  width: 100%;
  padding: 13px 14px;
  border: 0;
  border-radius: 12px;
  color: var(--text);
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.wave-search-result:hover,
.wave-search-result:focus-visible {
  outline: none;
  background: var(--accent-soft);
}

.wave-search-result strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wave-search-result span,
.wave-search-result small {
  color: var(--muted);
}

.wave-search-result small {
  grid-column: 1 / -1;
}

.wave-dashboard {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.wave-controls {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 22px;
  padding: 22px;
}

.control-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.wave-clear {
  min-height: 36px;
  padding: 7px 10px;
  font-size: .78rem;
}

.selected-athlete {
  position: relative;
  width: 100%;
  padding: 17px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  color: var(--text);
  text-align: left;
  background: linear-gradient(135deg, rgba(255,214,10,.13), rgba(255,214,10,.025));
  cursor: pointer;
}

.selected-athlete:hover:not(:disabled),
.selected-athlete:focus-visible {
  border-color: rgba(255,214,10,.55);
  outline: none;
}

.selected-athlete:disabled {
  cursor: default;
}

.selected-athlete small,
.selected-athlete span {
  position: relative;
  z-index: 1;
  display: block;
}

.selected-athlete small {
  color: var(--accent);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.selected-athlete strong {
  position: relative;
  z-index: 1;
  display: block;
  margin: 4px 0;
  font-size: 1.2rem;
}

.selected-athlete span {
  color: var(--muted);
  font-size: .85rem;
}

.selected-athlete .selected-athlete-action {
  margin-top: 10px;
  color: var(--accent);
  font-size: .72rem;
  font-weight: 750;
}

.wave-filter-grid {
  display: grid;
  gap: 14px;
}

.scope-field {
  display: grid;
  gap: 8px;
}

.scope-field > span {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.wave-scope-toggle {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.025);
}

.wave-scope-toggle button {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 2px;
  min-height: 40px;
  padding: 6px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 700;
  background: transparent;
  cursor: pointer;
}

.wave-scope-toggle button small {
  color: inherit;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .64rem;
  opacity: .7;
}

.wave-scope-toggle button.active {
  color: #090909;
  background: var(--accent);
}

.wave-scope-toggle button:disabled {
  cursor: not-allowed;
  opacity: .42;
}

.wave-scope-toggle button:disabled.active {
  color: var(--muted);
  background: transparent;
}

.scope-helper {
  color: var(--muted-2);
  font-size: .73rem;
  line-height: 1.4;
}

.coverage-card {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255,255,255,.025);
}

.coverage-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: .84rem;
}

.coverage-head span {
  color: var(--muted);
}

.coverage-track {
  height: 7px;
  margin: 10px 0;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255,255,255,.08);
}

.coverage-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #fff095);
  transition: width 220ms ease;
}

.coverage-card p {
  margin: 0;
  color: var(--muted-2);
  font-size: .75rem;
  line-height: 1.45;
}

.wave-ranking {
  overflow: hidden;
}

.wave-ranking-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .82rem;
}

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

.wave-table {
  width: 100%;
}

.wave-table th:nth-child(1),
.wave-table td:nth-child(1) {
  width: 100px;
  text-align: center;
}

.wave-table th:nth-child(5),
.wave-table td:nth-child(5) {
  text-align: right;
}

.wave-row {
  cursor: pointer;
}

.wave-row:hover td {
  background: rgba(255,255,255,.025);
}

.wave-row.is-selected td {
  background: var(--accent-soft);
}

.wave-prerank {
  font-size: 1.05rem;
  font-weight: 850;
}

.wave-athlete-cell strong {
  display: block;
  max-width: 380px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wave-athlete-cell small {
  display: block;
  margin-top: 3px;
  color: var(--muted-2);
}

.wave-score {
  color: var(--accent);
  font-weight: 850;
}

.wave-score small {
  display: block;
  color: var(--muted-2);
  font-size: .66rem;
  font-weight: 600;
}

.unranked-label {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--muted-2);
  font-size: .68rem;
  white-space: nowrap;
}

.wave-ranking-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .82rem;
}

.wave-explainer {
  display: grid;
  grid-template-columns: minmax(230px, .7fr) minmax(0, 1.3fr);
  gap: 30px;
  padding: 28px;
}

.wave-explainer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.wave-explainer-grid article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.025);
}

.wave-explainer-grid article > span {
  display: block;
  margin-bottom: 24px;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .72rem;
}

.wave-explainer-grid strong {
  display: block;
  margin-bottom: 6px;
}

.wave-explainer-grid p {
  font-size: .84rem;
}

.wave-source-note {
  grid-column: 1 / -1;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: .78rem;
}

.wave-source-note a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.wave-footer {
  margin-bottom: 0;
}

.wave-empty {
  padding: 44px 18px !important;
  color: var(--muted);
  text-align: center !important;
}

body.wave-profile-open {
  overflow: hidden;
}

.wave-profile-shell {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  justify-content: flex-end;
}

.wave-profile-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  cursor: pointer;
}

.wave-profile-modal {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(590px, 100%);
  height: 100%;
  overflow: hidden;
  border-radius: 28px 0 0 28px;
  background: #10100f;
  box-shadow: -30px 0 80px rgba(0,0,0,.55);
  animation: wave-profile-slide-in 180ms ease-out;
}

@keyframes wave-profile-slide-in {
  from { transform: translateX(28px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.wave-profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 84px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(16,16,15,.96);
}

.wave-profile-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  font-size: 1.45rem;
  background: rgba(255,255,255,.05);
  cursor: pointer;
}

.wave-profile-close:hover,
.wave-profile-close:focus-visible {
  border-color: var(--line-strong);
  color: var(--accent);
  outline: none;
}

.wave-profile-content {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px;
}

.wave-profile-loading {
  display: grid;
  min-height: 280px;
  place-items: center;
  color: var(--muted);
}

.wave-profile-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.wave-profile-flag {
  font-size: 1.7rem;
}

.wave-profile-identity h3 {
  margin: 0;
  font-size: clamp(1.55rem, 4vw, 2.2rem);
  line-height: 1;
  letter-spacing: -.035em;
  text-transform: uppercase;
}

.wave-profile-identity p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: .82rem;
}

.wave-profile-elite {
  display: inline-flex;
  margin-left: 8px;
  padding: 4px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  color: var(--accent);
  font-size: .62rem;
  letter-spacing: .08em;
  vertical-align: middle;
}

.wave-profile-score-card {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) repeat(2, minmax(90px, .75fr));
  gap: 1px;
  overflow: hidden;
  margin-bottom: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: var(--line);
}

.wave-profile-score-card > div {
  min-height: 116px;
  padding: 16px;
  background: linear-gradient(145deg, rgba(255,214,10,.11), #141412 66%);
}

.wave-profile-score-card span,
.wave-profile-stat span,
.wave-profile-best span {
  display: block;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.wave-profile-score-card strong {
  display: block;
  margin-top: 9px;
  font-size: 1.7rem;
}

.wave-profile-score-card > div:first-child strong {
  color: var(--accent);
  font-size: 2.5rem;
  line-height: .95;
}

.wave-profile-penalty {
  display: block;
  margin-top: 7px;
  color: var(--accent);
  font-size: .7rem;
}

.wave-profile-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}

.wave-profile-stat,
.wave-profile-best {
  min-height: 88px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255,255,255,.025);
}

.wave-profile-stat strong,
.wave-profile-best strong {
  display: block;
  margin-top: 8px;
  font-size: .98rem;
}

.wave-profile-best-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 28px;
}

.wave-profile-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
}

.wave-profile-section-head h4 {
  margin: 0;
  font-size: 1rem;
}

.wave-profile-section-head span {
  color: var(--muted);
  font-size: .72rem;
}

.wave-profile-races {
  display: grid;
  gap: 9px;
}

.wave-profile-race-wrap {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255,255,255,.022);
}

.wave-profile-race {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 16px;
  width: 100%;
  padding: 14px;
  border: 0;
  border-radius: 0;
  color: var(--text);
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.wave-profile-race.is-selected {
  background: linear-gradient(135deg, rgba(255,214,10,.08), rgba(255,255,255,.02));
}

.wave-profile-race:hover,
.wave-profile-race:focus-visible,
.wave-profile-race.calculation-open {
  background-color: rgba(255,255,255,.04);
  outline: none;
}

.wave-profile-race-wrap:has(.wave-profile-race.is-selected) {
  border-color: rgba(255,214,10,.27);
}

.wave-profile-race-wrap:has(.wave-profile-race.calculation-open) {
  border-color: rgba(255,214,10,.4);
}

.wave-profile-race strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wave-profile-race-meta,
.wave-profile-race-time {
  color: var(--muted);
  font-size: .76rem;
}

.wave-profile-race-points {
  color: var(--accent);
  font-weight: 850;
  text-align: right;
}

.wave-profile-race-rank {
  color: var(--text);
  font-size: .78rem;
  text-align: right;
}

.wave-profile-race-badge {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  margin-left: 7px;
  padding: 0 7px;
  border-radius: 99px;
  color: #0a0a09;
  font-size: .6rem;
  font-weight: 850;
  background: var(--accent);
  vertical-align: middle;
}

.wave-profile-race-action {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  color: var(--accent);
  font-size: .7rem;
  font-weight: 800;
}

.wave-profile-race-action b {
  font-size: 1rem;
}

.wave-profile-calculation {
  padding: 0 14px 14px;
  border-top: 1px solid var(--line);
  background: rgba(255,214,10,.035);
}

.wave-profile-formula {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  padding: 13px 0;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .76rem;
}

.wave-profile-formula b {
  color: var(--muted-2);
}

.wave-profile-formula strong {
  color: var(--accent);
  font-size: .92rem;
}

.wave-profile-calculation-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.wave-profile-calculation-grid > div {
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0,0,0,.16);
}

.wave-profile-calculation-grid span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted-2);
  font-size: .58rem;
  font-weight: 750;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.wave-profile-calculation-grid strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: .78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wave-profile-error {
  margin: 20px 0;
  padding: 16px;
  border: 1px solid rgba(255,118,118,.3);
  border-radius: 14px;
  color: var(--danger);
  background: rgba(255,118,118,.06);
}

@media (max-width: 900px) {
  .wave-hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .wave-hero-visual {
    display: none;
  }

  .wave-finder,
  .wave-dashboard,
  .wave-explainer {
    grid-template-columns: 1fr;
  }

  .wave-controls {
    position: static;
  }

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

@media (max-width: 760px) {
  .wave-shell {
    padding-bottom: calc(82px + env(safe-area-inset-bottom));
  }

  .wave-main {
    gap: 10px;
  }

  .wave-events {
    padding: 18px 0 18px 16px;
    overflow: hidden;
  }

  .wave-events-head {
    display: grid;
    gap: 12px;
    padding-right: 16px;
  }

  .wave-events-legend {
    justify-content: flex-start;
  }

  .wave-event-list {
    display: flex;
    gap: 9px;
    overflow-x: auto;
    padding-right: 16px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .wave-event-list::-webkit-scrollbar {
    display: none;
  }

  .wave-event-card {
    flex: 0 0 min(76vw, 275px);
    min-height: 100px;
    scroll-snap-align: start;
  }

  .wave-hero {
    min-height: 295px;
    padding: 26px 20px;
    border-radius: 20px;
  }

  .wave-hero h1 {
    max-width: 310px;
    font-size: clamp(3.45rem, 18vw, 5.2rem);
    line-height: .86;
  }

  .wave-hero-copy > p {
    max-width: 345px;
    font-size: .96rem;
  }

  .wave-event-line {
    align-items: flex-start;
    margin-top: 22px;
    font-size: .8rem;
  }

  .wave-finder,
  .wave-controls,
  .wave-explainer {
    padding: 18px;
    border-radius: 18px;
  }

  .wave-finder {
    gap: 18px;
  }

  .finder-copy p {
    font-size: .86rem;
  }

  .wave-search-field input {
    height: 54px;
  }

  .wave-search-results {
    position: fixed;
    left: 10px;
    right: 10px;
    top: auto;
    bottom: calc(72px + env(safe-area-inset-bottom));
    max-height: min(430px, 54vh);
  }

  .wave-filter-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .wave-filter-grid .field:first-child {
    grid-column: 1 / -1;
  }

  .wave-scope-toggle button {
    font-size: .7rem;
  }

  .wave-ranking {
    border-radius: 18px;
  }

  .wave-ranking-head {
    padding: 18px 16px;
  }

  .wave-table th:nth-child(3),
  .wave-table td:nth-child(3),
  .wave-table th:nth-child(4),
  .wave-table td:nth-child(4) {
    display: none;
  }

  .wave-table {
    min-width: 0;
    table-layout: fixed;
  }

  .wave-table th:nth-child(1),
  .wave-table td:nth-child(1) {
    width: 64px;
    padding-left: 9px;
    padding-right: 9px;
  }

  .wave-table th:nth-child(2),
  .wave-table td:nth-child(2) {
    width: auto;
  }

  .wave-table th:nth-child(5),
  .wave-table td:nth-child(5) {
    width: 84px;
    padding-left: 6px;
    padding-right: 10px;
  }

  .wave-table th,
  .wave-table td {
    padding-top: 13px;
    padding-bottom: 13px;
  }

  .wave-athlete-cell strong {
    max-width: 44vw;
  }

  .wave-athlete-cell small {
    display: block;
  }

  .wave-score small {
    display: none;
  }

  .wave-ranking-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .wave-ranking-footer .button {
    width: 100%;
  }

  .wave-explainer-grid {
    grid-template-columns: 1fr;
  }

  .wave-explainer-grid article > span {
    margin-bottom: 12px;
  }

  .wave-footer {
    margin-bottom: 0;
  }

  .wave-profile-shell {
    align-items: flex-end;
  }

  .wave-profile-modal {
    width: 100%;
    height: min(94dvh, 940px);
    border-radius: 24px 24px 0 0;
    animation-name: wave-profile-rise-in;
  }

  @keyframes wave-profile-rise-in {
    from { transform: translateY(24px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
  }

  .wave-profile-header {
    min-height: 72px;
    padding: 13px 15px;
  }

  .wave-profile-content {
    padding: 16px 13px calc(22px + env(safe-area-inset-bottom));
  }

  .wave-profile-score-card {
    grid-template-columns: 1.25fr .75fr;
  }

  .wave-profile-score-card > div {
    min-height: 100px;
    padding: 14px;
  }

  .wave-profile-score-card > div:nth-child(3) {
    grid-column: 1 / -1;
    min-height: 76px;
  }

  .wave-profile-stat-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .wave-profile-stat {
    min-height: 82px;
    padding: 11px;
  }

  .wave-profile-stat strong {
    font-size: .82rem;
  }

  .wave-profile-calculation-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
