#as_modal.as-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(3, 9, 17, .78);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

#as_modal .as-modal-box {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(920px, 100%);
  max-height: min(900px, 92vh);
  max-height: min(900px, 92dvh);
  overflow: hidden;
  color: #eef4ff;
  background: #0c1727;
  border: 1px solid rgba(148, 171, 203, .2);
  border-radius: 26px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .55);
}

#as_modal .as-close {
  position: absolute;
  z-index: 2;
  top: 17px;
  right: 18px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #d5deeb;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 14px;
}

#as_modal .as-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, .14);
}

#as_modal .as-modal-head {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 18px;
  min-height: 128px;
  padding: 27px 76px 25px 30px;
  background:
    radial-gradient(ellipse at 8% 0%, rgba(49, 187, 146, .22), transparent 52%),
    linear-gradient(120deg, rgba(24, 48, 69, .92), rgba(12, 23, 39, .96));
  border-bottom: 1px solid rgba(148, 171, 203, .14);
}

#as_modal .as-player-avatar {
  display: grid;
  flex: 0 0 66px;
  width: 66px;
  height: 66px;
  place-items: center;
  font-size: 31px;
  background: linear-gradient(145deg, rgba(114, 228, 188, .2), rgba(87, 137, 232, .17));
  border: 1px solid rgba(114, 228, 188, .3);
  border-radius: 21px;
}

#as_modal .as-player-heading {
  min-width: 0;
}

#as_modal .as-kicker {
  display: block;
  margin-bottom: 5px;
  color: #80dfbd;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

#as_modal .as-modal-title {
  margin: 0;
  overflow: hidden;
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  font-weight: 750;
  letter-spacing: -.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#as_modal .as-player-username {
  margin: 5px 0 0;
  color: #9eacc0;
  font-size: .83rem;
}

#as_modal .as-modal-body {
  min-height: 0;
  padding: 22px 26px 24px;
  overflow: auto;
  overscroll-behavior: contain;
}

#as_modal .as-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
  margin-bottom: 15px;
}

#as_modal .as-stat-card {
  display: flex;
  min-width: 0;
  min-height: 112px;
  flex-direction: column;
  justify-content: center;
  padding: 15px 17px;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(148, 171, 203, .13);
  border-radius: 17px;
}

#as_modal .as-stat-card--primary {
  background: linear-gradient(145deg, rgba(49, 187, 146, .16), rgba(255, 255, 255, .04));
  border-color: rgba(114, 228, 188, .25);
}

#as_modal .as-stat-card > span {
  color: #aab8ca;
  font-size: .74rem;
  font-weight: 650;
}

#as_modal .as-stat-card strong {
  margin: 5px 0 1px;
  color: #f5f8ff;
  font-size: clamp(1.55rem, 4vw, 2rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.045em;
  line-height: 1.1;
}

#as_modal .as-stat-card small {
  color: #718198;
  font-size: .68rem;
}

#as_modal .as-panel {
  padding: 19px;
  background: rgba(255, 255, 255, .027);
  border: 1px solid rgba(148, 171, 203, .13);
  border-radius: 19px;
}

#as_modal .as-manual-league {
  margin-bottom: 14px;
}

#as_modal .as-manual-league summary {
  color: #f1f5fb;
  font-size: .92rem;
  font-weight: 700;
  cursor: pointer;
}

#as_modal .as-manual-league summary::marker {
  color: #80dfbd;
}

#as_modal .as-manual-league__hint,
#as_modal .as-manual-league__week {
  margin: 12px 0 0;
  color: #94a2b6;
  font-size: .78rem;
  line-height: 1.5;
}

#as_modal .as-manual-league__week {
  color: #b8c7d9;
  font-weight: 700;
}

#as_modal .as-manual-league__form {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

#as_modal .as-manual-league__form label {
  display: grid;
  min-width: 0;
  gap: 6px;
  color: #aab8ca;
  font-size: .73rem;
  font-weight: 650;
}

#as_modal .as-manual-league__form input,
#as_modal .as-manual-league__form select {
  width: 100%;
  min-height: 42px;
  padding: 9px 10px;
  color: #f5f8ff;
  font: inherit;
  font-size: .82rem;
  background: rgba(4, 10, 23, .5);
  border: 1px solid rgba(148, 171, 203, .2);
  border-radius: 11px;
}

#as_modal .as-manual-league__form input:focus,
#as_modal .as-manual-league__form select:focus {
  border-color: rgba(116, 206, 192, .7);
  outline: 2px solid rgba(75, 185, 164, .15);
}

#as_modal .as-manual-league__form button {
  grid-column: 1 / -1;
  min-height: 43px;
  color: #082017;
  font: inherit;
  font-size: .82rem;
  font-weight: 800;
  cursor: pointer;
  background: #80dfbd;
  border: 0;
  border-radius: 12px;
}

#as_modal .as-manual-league__form button:hover:not(:disabled) {
  background: #9aebcb;
}

#as_modal .as-manual-league__form button:disabled {
  cursor: wait;
  opacity: .65;
}

#as_modal .as-chart-panel {
  margin-bottom: 14px;
}

#as_modal .as-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}

#as_modal .as-section-heading .as-kicker {
  margin-bottom: 3px;
  font-size: .62rem;
}

#as_modal .as-section-heading h3 {
  margin: 0;
  color: #f1f5fb;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -.02em;
}

#as_modal .as-muted {
  color: #8291a7;
  font-size: .73rem;
  text-align: right;
}

#as_modal .as-chart-wrap {
  position: relative;
  height: 205px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-color: rgba(148, 171, 203, .4) transparent;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
}

#as_modal .as-chart-track {
  position: relative;
  width: 100%;
  min-width: 100%;
  height: 100%;
}

#as_modal .as-chart-hint {
  margin: -6px 0 11px;
  color: #8291a7;
  font-size: .72rem;
}

#as_modal .as-count-pill {
  padding: 6px 10px;
  color: #b8c7d9;
  font-size: .72rem;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(148, 171, 203, .14);
  border-radius: 999px;
}

#as_modal .as-scores-list {
  display: grid;
  gap: 8px;
}

#as_modal .as-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 13px;
}

#as_modal .as-page-button {
  min-height: 40px;
  padding: 0 13px;
  color: #d9e4f2;
  font: inherit;
  font-size: .76rem;
  font-weight: 650;
  cursor: pointer;
  background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(148, 171, 203, .18);
  border-radius: 12px;
}

#as_modal .as-page-button:hover:not(:disabled) {
  background: rgba(255, 255, 255, .11);
}

#as_modal .as-page-button:disabled {
  color: #68778c;
  cursor: default;
  opacity: .65;
}

#as_modal .as-page-info {
  color: #94a2b6;
  font-size: .74rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

#as_modal .as-score-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  padding: 12px 14px;
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(148, 171, 203, .11);
  border-radius: 15px;
}

#as_modal .as-score-card--league {
  background: linear-gradient(100deg, rgba(185, 142, 54, .13), rgba(255, 255, 255, .035) 64%);
  border-color: rgba(229, 188, 92, .23);
}

#as_modal .as-score-card__date {
  display: grid;
  min-width: 0;
  gap: 3px;
}

#as_modal .as-score-card__date > strong {
  color: #e8eef8;
  font-size: .84rem;
  font-weight: 650;
}

#as_modal .as-score-card__date > span {
  overflow: hidden;
  color: #8c9bb0;
  font-size: .73rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#as_modal .as-score-card__date .as-score-note {
  max-width: 440px;
  color: #adb9c9;
  white-space: normal;
  overflow-wrap: anywhere;
}

#as_modal .as-score-card__result {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

#as_modal .as-score-card__result > strong {
  color: #f6f8ff;
  font-size: 1.45rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.05em;
}

#as_modal .as-score-card__result > small {
  align-self: flex-end;
  margin-bottom: 3px;
  color: #8392a8;
  font-size: .65rem;
}

#as_modal .as-score-delete {
  min-height: 32px;
  margin-left: 5px;
  padding: 0 10px;
  color: #ffc0bd;
  font: inherit;
  font-size: .7rem;
  font-weight: 750;
  cursor: pointer;
  background: rgba(151, 35, 48, .16);
  border: 1px solid rgba(255, 121, 121, .28);
  border-radius: 10px;
}

#as_modal .as-score-delete:hover:not(:disabled) {
  background: rgba(151, 35, 48, .3);
}

#as_modal .as-score-delete:disabled {
  cursor: wait;
  opacity: .55;
}

#as_modal .as-delete-confirm-overlay {
  position: absolute;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 9, 17, .76);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: as-delete-fade-in .16s ease-out;
}

#as_modal .as-delete-confirm {
  width: min(460px, 100%);
  padding: 26px;
  color: #eef4ff;
  background: linear-gradient(145deg, #142338, #0c1727 72%);
  border: 1px solid rgba(148, 171, 203, .24);
  border-radius: 22px;
  box-shadow: 0 26px 80px rgba(0, 0, 0, .55);
  animation: as-delete-rise-in .2s ease-out;
}

#as_modal .as-delete-confirm__eyebrow {
  display: block;
  margin-bottom: 10px;
  color: #f0b1ac;
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .11em;
}

#as_modal .as-delete-confirm__title {
  margin: 0;
  color: #f7f9ff;
  font-size: clamp(1.2rem, 4vw, 1.55rem);
  line-height: 1.2;
}

#as_modal .as-delete-confirm__copy {
  margin: 12px 0 18px;
  color: #b4c0d1;
  font-size: .9rem;
  line-height: 1.55;
}

#as_modal .as-delete-confirm__score {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
  padding: 13px 15px;
  color: #aebcd0;
  font-size: .8rem;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(148, 171, 203, .14);
  border-radius: 13px;
}

#as_modal .as-delete-confirm__score strong {
  flex: 0 0 auto;
  color: #f7f9ff;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

#as_modal .as-delete-confirm__series {
  display: grid;
  gap: 8px;
  margin: 18px 0 22px;
}

#as_modal .as-delete-confirm__series[hidden] {
  display: none;
}

#as_modal .as-delete-confirm__series-game {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 14px;
  color: #b4c0d1;
  font-size: .82rem;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(148, 171, 203, .14);
  border-radius: 12px;
}

#as_modal .as-delete-confirm__series-game strong {
  color: #f7f9ff;
  font-variant-numeric: tabular-nums;
}

#as_modal .as-delete-confirm__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

#as_modal .as-delete-confirm__button {
  min-height: 42px;
  padding: 0 14px;
  color: #dce5f2;
  font: inherit;
  font-size: .78rem;
  font-weight: 750;
  cursor: pointer;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(148, 171, 203, .2);
  border-radius: 12px;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

#as_modal .as-delete-confirm__button:hover {
  background: rgba(255, 255, 255, .12);
  border-color: rgba(148, 171, 203, .38);
}

#as_modal .as-delete-confirm__button:active {
  transform: translateY(1px);
}

#as_modal .as-delete-confirm__button.is-destructive {
  color: #fff4f2;
  background: linear-gradient(135deg, #b83d46, #922d38);
  border-color: rgba(255, 151, 151, .35);
}

#as_modal .as-delete-confirm__button.is-destructive:hover {
  background: linear-gradient(135deg, #cc4851, #a23440);
}

#as_modal .as-delete-confirm__button:focus-visible {
  outline: 2px solid #82c7ff;
  outline-offset: 3px;
}

@keyframes as-delete-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes as-delete-rise-in {
  from { opacity: 0; transform: translateY(8px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

#as_modal .as-league-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 7px;
  color: #f0d28a;
  font-size: .67rem;
  font-weight: 700;
  background: rgba(205, 161, 67, .13);
  border: 1px solid rgba(229, 188, 92, .24);
  border-radius: 999px;
}

#as_modal .as-league-badge > span:first-child {
  font-size: .78rem;
}

#as_modal .as-empty-state {
  margin: 0;
  padding: 22px 12px;
  color: #94a2b6;
  font-size: .85rem;
  text-align: center;
}

#as_modal .as-modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

@media (max-width: 720px) {
  #as_modal.as-overlay {
    align-items: flex-end;
    padding: 0;
  }

  #as_modal .as-modal-box {
    width: 100%;
    max-height: 94vh;
    max-height: 94dvh;
    border-bottom: 0;
    border-radius: 24px 24px 0 0;
  }

  #as_modal .as-modal-head {
    min-height: 104px;
    gap: 13px;
    padding: 20px 65px 18px 18px;
  }

  #as_modal .as-player-avatar {
    flex-basis: 54px;
    width: 54px;
    height: 54px;
    font-size: 25px;
    border-radius: 17px;
  }

  #as_modal .as-close {
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
  }

  #as_modal .as-modal-body {
    padding: 15px 14px calc(18px + env(safe-area-inset-bottom));
  }

  #as_modal .as-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
  }

  #as_modal .as-stat-card {
    min-height: 91px;
    padding: 12px 14px;
    border-radius: 15px;
  }

  #as_modal .as-stat-card strong {
    font-size: 1.65rem;
  }

  #as_modal .as-panel {
    padding: 15px 13px;
    border-radius: 17px;
  }

  #as_modal .as-manual-league__form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  #as_modal .as-manual-league__form label:first-child {
    grid-column: 1 / -1;
  }

  #as_modal .as-chart-panel {
    margin-bottom: 10px;
  }

  #as_modal .as-chart-wrap {
    height: 180px;
    margin: 0 -4px;
  }

  #as_modal .as-score-card {
    gap: 8px;
    padding: 11px 10px;
    border-radius: 13px;
  }

  #as_modal .as-page-button {
    min-height: 42px;
    padding: 0 11px;
  }

  #as_modal .as-score-card__result {
    gap: 5px;
  }

  #as_modal .as-score-card__result > strong {
    font-size: 1.27rem;
  }

  #as_modal .as-league-badge {
    padding: 5px 6px;
  }

  #as_modal .as-league-badge > span:last-child {
    display: none;
  }

  #as_modal .as-modal-actions .btn {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  #as_modal .as-modal-box {
    scroll-behavior: auto;
  }
}
