.h2h-page,
.h2h-page * {
  box-sizing: border-box;
}

.h2h-page #appCapsule {
  min-height: 100vh;
  padding-bottom: 96px;
  background: #f5f7fb;
}

.h2h-shell {
  width: calc(100% - 24px);
  max-width: 760px;
  margin-right: auto;
  margin-left: auto;
  padding: 0 0 24px;
}

.h2h-intro {
  padding: 10px 2px 14px;
}

.h2h-intro h1 {
  margin: 0 0 4px;
  color: #141515;
  font-size: 1.35rem;
  line-height: 1.15;
  font-weight: 900;
}

.h2h-intro p {
  margin: 0;
  color: #56657a;
  font-size: .88rem;
  line-height: 1.4;
}

.h2h-controls,
.h2h-panel,
.h2h-hero {
  width: 100%;
  border: 1px solid rgba(18, 58, 104, .1);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(20, 21, 21, .055);
}

.h2h-controls,
.h2h-panel {
  padding: 14px;
}

.h2h-ad-slot {
  width: 100%;
}

.h2h-ad-slot .match-page-ad-card {
  display: grid;
  overflow: hidden;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(20, 21, 21, .055);
}

.h2h-ad-slot .match-page-ad-card picture,
.h2h-ad-slot .match-page-ad-image {
  display: block;
  width: 100%;
}

.h2h-ad-slot .match-page-ad-image {
  height: auto;
  object-fit: contain;
}

.h2h-ad-slot .match-page-ad-body {
  padding: 14px 16px 16px;
}

.h2h-ad-slot .match-page-ad-badge {
  display: inline-block;
  margin-bottom: 6px;
  color: #56657a;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.h2h-ad-slot .match-page-ad-title {
  margin: 0;
  color: #123a68;
  font-size: 1rem;
  line-height: 1.3;
  font-weight: 900;
}

.h2h-ad-slot .match-page-ad-description,
.h2h-ad-slot .match-page-ad-partner {
  margin: 6px 0 0;
  color: #39485e;
  font-size: .84rem;
  line-height: 1.45;
}

.h2h-ad-slot .match-page-ad-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 12px;
  padding: 10px 16px;
  border-radius: 9px;
  background: #1e74fd;
  color: #fff;
  font-size: .86rem;
  font-weight: 850;
  text-decoration: none;
}

.h2h-ad-slot .match-page-ad-cta:hover,
.h2h-ad-slot .match-page-ad-cta:focus-visible {
  background: #0d5ed7;
  color: #fff;
}

.h2h-controls h2,
.h2h-panel > h2 {
  margin: 0 0 12px;
  color: #123a68;
  font-size: .82rem;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.h2h-filter-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.h2h-field {
  min-width: 0;
}

.h2h-field[hidden],
.h2h-panel[hidden],
.h2h-hero[hidden] {
  display: none !important;
}

.h2h-field label {
  display: block;
  margin-bottom: 5px;
  color: #39485e;
  font-size: .78rem;
  font-weight: 800;
}

.h2h-page .form-select,
.h2h-page .form-control,
.h2h-page button,
.h2h-page .btn,
.h2h-player-option,
.h2h-history-item {
  min-height: 44px;
}

.h2h-page .form-select,
.h2h-page .form-control {
  border-color: #d9e1ec;
  border-radius: 9px;
  color: #141515;
  font-size: .9rem;
  font-weight: 650;
}

.h2h-player-selectors {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1fr);
  align-items: stretch;
  gap: 7px;
  margin-top: 14px;
}

.h2h-player-selector {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 18px;
  align-items: center;
  min-width: 0;
  padding: 8px;
  border: 1px solid #d9e1ec;
  border-radius: 10px;
  background: #fff;
  color: #141515;
  text-align: left;
}

.h2h-player-selector-label {
  grid-column: 1 / -1;
  margin-bottom: 3px;
  color: #56657a;
  font-size: .75rem;
  line-height: 1.15;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}

.h2h-player-selector:not(:disabled):hover {
  border-color: #1e74fd;
  background: #f7fbff;
}

.h2h-player-selector:disabled {
  opacity: .65;
}

.h2h-player-selector img,
.h2h-player-option img,
.h2h-avatar {
  display: block;
  width: 44px;
  height: 44px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #e8edf5;
  box-shadow: 0 0 0 1px #d9e1ec;
  object-fit: cover;
}

.h2h-player-copy,
.h2h-player-option-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
  padding: 0 6px;
}

.h2h-player-copy strong,
.h2h-player-option-copy strong {
  min-width: 0;
  color: #123a68;
  font-size: .84rem;
  line-height: 1.2;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.h2h-player-selector ion-icon {
  color: #56657a;
  font-size: 17px;
}

.h2h-versus {
  display: grid;
  place-items: center;
  color: #56657a;
  font-size: 1.05rem;
  font-weight: 900;
}

#h2hState {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.h2h-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(64px, .6fr) minmax(0, 1fr);
  align-items: center;
  min-height: 168px;
  padding: 18px 12px;
  border-color: #123a68;
  background: #123a68;
  color: #fff;
}

.h2h-hero-player {
  display: grid;
  min-width: 0;
  justify-items: center;
  gap: 7px;
  text-align: center;
}

.h2h-hero-player .h2h-avatar {
  width: 68px;
  height: 68px;
  border-color: rgba(255, 255, 255, .92);
  box-shadow: 0 0 0 3px rgba(30, 116, 253, .5);
}

.h2h-hero-avatar-wrap {
  position: relative;
  display: block;
  width: 68px;
  height: 68px;
}

.h2h-avatar-pro {
  position: absolute;
  right: -5px;
  bottom: -3px;
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  clip-path: polygon(50% 0, 61% 12%, 77% 7%, 82% 23%, 98% 28%, 90% 43%, 100% 56%, 85% 66%, 87% 83%, 70% 84%, 61% 100%, 48% 91%, 33% 100%, 25% 84%, 8% 83%, 12% 66%, 0 56%, 10% 42%, 2% 28%, 18% 22%, 23% 7%, 39% 12%);
  background: linear-gradient(145deg, #4c8dff, #0866ff);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .28));
}

.h2h-avatar-pro::after {
  width: 8px;
  height: 4px;
  border-bottom: 2px solid #fff;
  border-left: 2px solid #fff;
  content: "";
  transform: translateY(-1px) rotate(-45deg);
}

.h2h-hero-player strong {
  max-width: 100%;
  color: #fff;
  font-size: .92rem;
  line-height: 1.18;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.h2h-hero-player small {
  color: rgba(255, 255, 255, .78);
  font-size: .7rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.h2h-hero-score {
  display: grid;
  min-width: 0;
  justify-items: center;
  gap: 2px;
  margin-top: 2px;
}

.h2h-hero-score strong {
  color: #fff;
  font-size: 2.35rem;
  line-height: .95;
  font-weight: 950;
}

.h2h-hero-score span {
  color: #fff;
  font-size: .7rem;
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.h2h-hero-score small {
  color: rgba(255, 255, 255, .86);
  font-size: .67rem;
  line-height: 1.2;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.h2h-hero-center {
  display: grid;
  justify-items: center;
  gap: 5px;
  text-align: center;
}

.h2h-hero-center span {
  color: #70a8ff;
  font-size: 1.6rem;
  line-height: 1;
  font-weight: 900;
}

.h2h-hero-center strong {
  color: rgba(255, 255, 255, .86);
  font-size: .68rem;
  line-height: 1.25;
  font-weight: 800;
}

.h2h-panel-body {
  display: grid;
  gap: 8px;
}

.h2h-metric-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(7rem, 1.25fr) minmax(0, 1fr);
  align-items: center;
  min-height: 48px;
  padding: 8px 0;
  border-bottom: 1px solid #edf1f6;
}

.h2h-metric-row:last-child {
  border-bottom: 0;
}

.h2h-metric-row strong {
  color: #123a68;
  font-size: 1.05rem;
  line-height: 1;
  font-weight: 900;
}

.h2h-value-a {
  padding-right: 8px;
  text-align: right;
}

.h2h-value-b {
  padding-left: 8px;
  text-align: left;
}

.h2h-metric-label {
  color: #56657a;
  font-size: .74rem;
  line-height: 1.22;
  font-weight: 800;
  text-align: center;
  overflow-wrap: anywhere;
}

#h2hAchievements .h2h-metric-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.h2h-rarity-dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ef7558;
  order: -1;
}

.h2h-rarity-dot.rarity-rare { background: #29a869; }
.h2h-rarity-dot.rarity-epic { background: #3978e8; }
.h2h-rarity-dot.rarity-legendary { background: #7d8794; }
.h2h-rarity-dot.rarity-mythical { background: #e6b83f; }

.h2h-metric-row.is-dominant {
  min-height: 74px;
  margin-bottom: 3px;
  border-radius: 10px;
  border-bottom: 0;
  background: #edf4ff;
}

.h2h-metric-row.is-dominant strong {
  color: #0d5ed7;
  font-size: 2rem;
}

.h2h-metric-row.is-dominant .h2h-metric-label {
  color: #123a68;
  font-size: .8rem;
  text-transform: uppercase;
}

.h2h-last-match {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-width: 0;
  gap: 4px 10px;
  margin-top: 3px;
  padding: 12px;
  border-radius: 10px;
  background: #f7f9fc;
  overflow-wrap: anywhere;
}

.h2h-last-match small,
.h2h-last-match span {
  min-width: 0;
  color: #56657a;
  font-size: .75rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.h2h-last-match strong {
  grid-row: span 2;
  color: #123a68;
  font-size: 1rem;
  font-weight: 900;
}

.h2h-history-group {
  display: grid;
  gap: 7px;
}

.h2h-history-group + .h2h-history-group {
  margin-top: 9px;
  padding-top: 12px;
  border-top: 1px solid #edf1f6;
}

.h2h-history-group h3 {
  margin: 0;
  color: #39485e;
  font-size: .82rem;
  line-height: 1.25;
  font-weight: 900;
}

.h2h-history-item {
  display: grid;
  min-width: 0;
  gap: 4px;
  padding: 11px 12px;
  border: 1px solid #e4eaf2;
  border-radius: 9px;
  background: #fff;
  color: #39485e;
  text-decoration: none;
  overflow-wrap: anywhere;
}

a.h2h-history-item:hover {
  border-color: #1e74fd;
  color: #123a68;
}

.h2h-history-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.h2h-history-item-top span,
.h2h-history-item small,
.h2h-history-link-label {
  min-width: 0;
  color: #56657a;
  font-size: .74rem;
  line-height: 1.3;
}

.h2h-history-item-top strong {
  flex: 0 0 auto;
  color: #123a68;
  font-size: .9rem;
  font-weight: 900;
}

.h2h-history-item-top strong.h2h-wo {
  color: #9a6400;
}

.h2h-history-link-label {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 3px;
  color: #0d5ed7;
  font-weight: 850;
}

.h2h-achievement-links {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.h2h-achievement-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid #dbe7f7;
  border-radius: 9px;
  color: #0d5ed7;
  background: #f7fbff;
  font-size: .78rem;
  font-weight: 850;
  line-height: 1.3;
  text-decoration: none;
}

.h2h-achievement-link:hover,
.h2h-achievement-link:focus-visible {
  border-color: #1e74fd;
  color: #123a68;
}

.h2h-achievement-link ion-icon {
  flex: 0 0 auto;
  font-size: 1rem;
}

.h2h-loading,
.h2h-state-message {
  display: grid;
  min-height: 132px;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 18px;
  color: #56657a;
  text-align: center;
}

.h2h-loading {
  grid-template-columns: auto auto;
}

.h2h-state-message ion-icon {
  color: #1e74fd;
  font-size: 30px;
}

.h2h-state-message strong {
  color: #123a68;
  font-size: 1rem;
  line-height: 1.25;
  font-weight: 900;
}

.h2h-state-message p {
  max-width: 28rem;
  margin: 0;
  color: #56657a;
  font-size: .82rem;
  line-height: 1.4;
}

.h2h-state-message .btn {
  margin-top: 4px;
}

.h2h-modal-status {
  min-height: 18px;
  margin: 7px 0;
  color: #56657a;
  font-size: .75rem;
}

.h2h-player-modal-filters {
  display: grid;
  gap: 10px;
}

.h2h-player-modal-filters .form-label {
  margin-bottom: 5px;
}

.h2h-player-list {
  display: grid;
  gap: 7px;
  max-height: min(52vh, 430px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.h2h-player-option {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  width: 100%;
  padding: 8px;
  border: 1px solid #e4eaf2;
  border-radius: 9px;
  background: #fff;
  text-align: left;
}

.h2h-player-option:hover {
  border-color: #1e74fd;
  background: #f7fbff;
}

.h2h-player-option-copy small {
  color: #56657a;
  font-size: .72rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.h2h-premium-icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 2px auto 12px;
  border-radius: 50%;
  place-items: center;
  background: #edf4ff;
  color: #0d5ed7;
  font-size: 25px;
}

#h2hPremiumModal .modal-body p {
  color: #39485e;
  font-size: .9rem;
  line-height: 1.45;
  text-align: center;
}

.h2h-page :focus-visible,
#h2hPlayerModal :focus-visible,
#h2hPremiumModal :focus-visible {
  outline: 3px solid rgba(30, 116, 253, .72);
  outline-offset: 2px;
}

@media (max-width: 359px) {
  .h2h-shell {
    width: calc(100% - 16px);
  }

  .h2h-controls,
  .h2h-panel {
    padding: 12px 10px;
  }

  .h2h-player-selectors {
    grid-template-columns: minmax(0, 1fr) 14px minmax(0, 1fr);
    gap: 4px;
  }

  .h2h-player-selector {
    grid-template-columns: 36px minmax(0, 1fr);
    padding: 7px 5px;
  }

  .h2h-player-selector img {
    width: 36px;
    height: 36px;
  }

  .h2h-player-selector ion-icon {
    display: none;
  }

  .h2h-player-copy {
    padding: 0 4px;
  }

  .h2h-player-copy strong {
    font-size: .76rem;
  }

  .h2h-hero {
    grid-template-columns: minmax(0, 1fr) 58px minmax(0, 1fr);
    padding: 16px 8px;
  }

  .h2h-hero-player .h2h-avatar {
    width: 58px;
    height: 58px;
  }

  .h2h-hero-avatar-wrap {
    width: 58px;
    height: 58px;
  }

  .h2h-metric-row {
    grid-template-columns: minmax(0, 1fr) minmax(6.25rem, 1.25fr) minmax(0, 1fr);
  }
}

@media (min-width: 600px) {
  .h2h-filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .h2h-controls,
  .h2h-panel {
    padding: 18px;
  }

  .h2h-player-selector {
    grid-template-columns: 52px minmax(0, 1fr) 20px;
    padding: 10px 12px;
  }

  .h2h-player-selector img {
    width: 52px;
    height: 52px;
  }

  .h2h-player-modal-filters {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  }

  .h2h-hero-player .h2h-avatar {
    width: 82px;
    height: 82px;
  }

  .h2h-hero-avatar-wrap {
    width: 82px;
    height: 82px;
  }

  .h2h-ad-slot .match-page-ad-card {
    grid-template-columns: minmax(220px, 34%) minmax(0, 1fr);
    align-items: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .h2h-page *,
  .h2h-page *::before,
  .h2h-page *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
