.ps-button {
  position: relative;
}
.ps-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 99px;
  background: var(--rojo);
  color: var(--claro);
  font-size: 0.75rem;
  line-height: 20px;
  text-align: center;
}
.ps-badge[hidden] {
  display: none;
}
.ps-dialog {
  width: min(780px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  overflow: hidden;
}
.ps-dialog[open] {
  display: flex;
  flex-direction: column;
}
.ps-in {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  padding: 16px 18px 14px;
}
.ps-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.ps-head__text {
  min-width: 0;
}
.ps-title {
  margin: 0;
}
.ps-subtitle {
  margin: 4px 0 0;
  color: var(--apagado);
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}
.ps-subtitle[hidden] {
  display: none;
}
.ps-close {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: -6px -8px 0 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--claro);
  cursor: pointer;
}
.ps-close:hover {
  background: rgba(255, 255, 255, 0.16);
}
.ps-close svg {
  width: 20px;
  height: 20px;
}
.ps-close:focus-visible,
.ps-tab:focus-visible,
.ps-body:focus-visible,
.ps-dialog .sw-btn:focus-visible {
  outline: 3px solid var(--oro);
  outline-offset: 2px;
}
.ps-loading,
.ps-error {
  margin: 24px 0;
  color: var(--apagado);
  text-align: center;
}
.ps-loading[hidden],
.ps-error[hidden],
.ps-content[hidden],
.ps-tabs[hidden],
.ps-hero[hidden],
.ps-banner[hidden],
.ps-confirm[hidden],
.ps-actions[hidden] {
  display: none;
}
.ps-error__text {
  margin: 0 0 12px;
  color: var(--claro);
}
.ps-content {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}
.ps-banner {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--oro-hondo);
  border-radius: 10px;
  background: rgba(255, 194, 26, 0.12);
  color: var(--oro-claro);
  font-size: 0.9rem;
  font-weight: 700;
}
.ps-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "level meter"
    "elite meter";
  align-items: center;
  gap: 8px 14px;
  padding: 10px 12px;
  border: 2px solid var(--madera-clara);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
}
.ps-level {
  grid-area: level;
  display: flex;
  align-items: center;
  gap: 10px;
}
.ps-level__badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  flex: none;
}
.ps-level__star {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.ps-level__n {
  position: relative;
  color: var(--tinta);
  font: 700 1.1rem/1 var(--f-num);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}
.ps-level__text {
  font: 700 0.95rem/1.2 var(--f-display);
  color: var(--oro-claro);
}
.ps-elite {
  grid-area: elite;
  justify-self: start;
  padding: 3px 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 99px;
  color: var(--apagado);
  font-size: 0.78rem;
  font-weight: 700;
}
.ps-elite[data-active="1"] {
  border-color: var(--oro-hondo);
  background: rgba(255, 194, 26, 0.16);
  color: var(--oro-claro);
}
.ps-meter {
  grid-area: meter;
  min-width: 0;
}
.ps-bar {
  height: 14px;
  overflow: hidden;
  border: 2px solid var(--tinta);
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.45);
}
.ps-bar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(180deg, var(--oro-claro), var(--oro) 50%, var(--oro-hondo));
  transition: width 0.4s ease;
}
.ps-bar--small {
  height: 8px;
  border-width: 1px;
}
.ps-meter__line,
.ps-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2px 12px;
  margin-top: 4px;
  font-size: 0.8rem;
}
.ps-meter__next {
  color: var(--claro);
  font-weight: 700;
}
.ps-meter__total,
.ps-stat {
  color: var(--apagado);
}
.ps-tabs {
  display: flex;
  gap: 6px;
}
.ps-tab {
  flex: 1 1 0;
  min-height: 44px;
  padding: 0 12px;
  border: 2px solid transparent;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--apagado);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.ps-tab:hover {
  background: rgba(255, 255, 255, 0.13);
}
.ps-tab[aria-selected="true"] {
  border-color: var(--oro-hondo);
  background: rgba(255, 194, 26, 0.14);
  color: var(--oro-claro);
}
.ps-body {
  position: relative;
  flex: 1 1 auto;
  min-height: 150px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 2px solid var(--madera-clara);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
}
.ps-body:empty {
  display: none;
}
.ps-tiers,
.ps-sources {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ps-tier {
  display: grid;
  grid-template-columns: 84px 1fr 1fr;
  gap: 8px;
  align-items: stretch;
  padding: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.ps-tier:last-child {
  border-bottom: 0;
}
.ps-tier[data-current="1"] {
  background: rgba(255, 194, 26, 0.08);
}
.ps-tier__head {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}
.ps-tier__n {
  color: var(--oro-claro);
  font: 700 0.95rem/1.2 var(--f-display);
}
.ps-tier[data-reached="0"] .ps-tier__n {
  color: var(--apagado);
}
.ps-tier__xp {
  color: var(--apagado);
  font-size: 0.75rem;
}
.ps-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 8px 10px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
}
.ps-cell--elite {
  border-color: rgba(217, 142, 0, 0.55);
  background: rgba(255, 194, 26, 0.07);
}
.ps-cell[data-state="claimable"] {
  border-color: var(--oro);
  box-shadow: 0 0 0 1px rgba(255, 194, 26, 0.35);
}
.ps-cell[data-state="claimed"] {
  opacity: 0.72;
}
.ps-cell[data-state="locked"] .ps-reward {
  opacity: 0.7;
}
.ps-cell__track {
  color: var(--apagado);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ps-cell--elite .ps-cell__track {
  color: var(--oro-claro);
}
.ps-reward {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 4px;
}
.ps-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  min-height: 26px;
  padding: 2px 8px 2px 4px;
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.35);
  font: 700 0.82rem/1.1 var(--f-num);
  color: var(--claro);
  font-variant-numeric: tabular-nums;
}
.ps-chip__icon {
  width: 20px;
  height: 20px;
  flex: none;
}
.ps-thumb {
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 6px;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.3);
}
.ps-chip__name {
  min-width: 0;
  overflow-wrap: anywhere;
}
.ps-cell__action {
  display: flex;
  align-items: center;
  min-height: 44px;
}
.ps-cell__action .sw-btn {
  min-height: 44px;
  width: 100%;
}
.ps-done,
.ps-lock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--apagado);
  font-size: 0.82rem;
  font-weight: 700;
}
.ps-done {
  color: var(--ok);
}
.ps-done__mark {
  font-weight: 900;
}
.ps-lock__icon {
  width: 16px;
  height: 16px;
}
.ps-intro {
  margin: 0;
  padding: 10px 12px 4px;
  color: var(--claro);
  font-size: 0.9rem;
}
.ps-source {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.ps-source:last-child {
  border-bottom: 0;
}
.ps-source__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 12px;
}
.ps-source__name {
  color: var(--oro-claro);
  font: 700 0.98rem/1.2 var(--f-display);
}
.ps-source__reward {
  color: var(--claro);
  font-size: 0.82rem;
  font-weight: 700;
}
.ps-source__desc {
  margin: 2px 0 6px;
  color: var(--apagado);
  font-size: 0.85rem;
}
.ps-source__today {
  margin: 4px 0 0;
  color: var(--apagado);
  font-size: 0.8rem;
}
.ps-source__today--full {
  color: var(--ok);
}
.ps-status {
  min-height: 1.3em;
  margin: 0;
  color: var(--oro-claro);
  font-size: 0.88rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.ps-status[role="alert"] {
  color: var(--error);
}
.ps-actions,
.ps-confirm__buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}
.ps-actions .sw-btn,
.ps-confirm__buttons .sw-btn {
  min-height: 44px;
}
.ps-confirm {
  padding: 12px 14px;
  border: 2px solid var(--oro-hondo);
  border-radius: 12px;
  background: rgba(255, 194, 26, 0.08);
}
.ps-confirm__title {
  margin: 0 0 6px;
  color: var(--oro);
  font: 700 1.05rem/1.2 var(--f-display);
}
.ps-confirm__text {
  margin: 0 0 8px;
  color: var(--claro);
  font-size: 0.92rem;
  line-height: 1.45;
}
.ps-confirm__short {
  margin: 0 0 8px;
  color: var(--error);
  font-size: 0.9rem;
  font-weight: 700;
}
.ps-in[data-busy="1"] {
  cursor: progress;
}
@media (max-width: 600px) {
  .ps-in {
    padding: 14px 14px 12px;
  }
  .ps-hero {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "level elite"
      "meter meter";
    gap: 8px 10px;
  }
  .ps-level__badge {
    width: 44px;
    height: 44px;
  }
  .ps-elite {
    justify-self: end;
    text-align: center;
  }
  .ps-tier {
    grid-template-columns: 1fr 1fr;
  }
  .ps-tier__head {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
  }
  .ps-actions .sw-btn,
  .ps-confirm__buttons .sw-btn {
    flex: 1 1 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ps-bar i {
    transition: none;
  }
}
