.playground-page {
  width: 100%;
  margin: 0 auto;
  padding: 0 0 1.5rem;
  color: #0f172a;
}

.playground-hero-card {
  border: 1px solid #d5deec;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  margin-bottom: 0.9rem;
}

.playground-hero-card__bar {
  background: #0a1931;
  padding: 0.45rem 0.9rem;
}

.playground-hero-card__tag {
  color: #e2e8f0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.playground-hero-card__body {
  padding: 0.95rem 1rem 1.05rem;
}

.playground-hero-card__title {
  margin: 0;
  font-size: clamp(1.2rem, 2.4vw, 1.7rem);
  line-height: 1.2;
}

.playground-hero-card__subtitle {
  margin: 0.45rem 0 0;
  color: #334155;
  font-size: 0.95rem;
  line-height: 1.45;
}

.playground-builder-shell {
  border: 1px solid #d5deec;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
  padding: 0.82rem;
}

.playground-guide-shell {
  border: 1px solid #d7e0ee;
  border-radius: 14px;
  background: #ffffff;
  padding: 0.78rem;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
  margin-bottom: 0.9rem;
}

.playground-guide-shell__header h2 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.2;
}

.playground-guide-shell__header p {
  margin: 0.24rem 0 0;
  font-size: 0.84rem;
  color: #475569;
}

.playground-guide-table-wrap {
  margin-top: 0.58rem;
  overflow-x: auto;
}

.playground-guide-table {
  width: max-content;
  min-width: 100%;
}

.playground-guide-notes {
  margin-top: 0.58rem;
  display: grid;
  gap: 0.34rem;
}

.playground-guide-notes p {
  margin: 0;
  font-size: 0.79rem;
  line-height: 1.35;
  color: #334155;
}

.playground-builder-form {
  display: flex;
  flex-direction: column;
  gap: 0.72rem;
}

.playground-section {
  border: 1px solid #dce4f0;
  border-radius: 12px;
  padding: 0.72rem;
  background: #ffffff;
}

.playground-section--setup {
  background: #f8fbff;
}

.playground-section--conditions {
  background: #f9fbff;
}

.playground-section--filters {
  background: #fcfdff;
}

.playground-section--season {
  background: #f8fbff;
}

.playground-section__header {
  display: flex;
  align-items: flex-start;
  gap: 0.58rem;
  margin-bottom: 0.62rem;
}

.playground-section__header-action {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.playground-section__header-action span {
  font-size: 0.72rem;
  font-weight: 700;
  color: #475569;
  white-space: nowrap;
}

.playground-section__icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #0a1931;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.73rem;
  font-weight: 800;
  flex-shrink: 0;
}

.playground-section__header h2 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.2;
}

.playground-section__header p {
  margin: 0.22rem 0 0;
  color: #475569;
  font-size: 0.84rem;
  line-height: 1.4;
}

.playground-grid {
  display: grid;
  gap: 0.58rem;
}

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

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

.playground-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.playground-field--wide {
  grid-column: 1 / -1;
}

.playground-label-row {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  width: fit-content;
}

.playground-label-row label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  color: #1e293b;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.playground-help-btn {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  border: 1px solid #0a1931;
  background: #ffffff;
  color: #0a1931;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.playground-help-btn:hover,
.playground-help-btn:focus-visible {
  background: #0a1931;
  color: #ffffff;
  border-color: #0a1931;
  outline: none;
}

.playground-help-popover {
  display: none;
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  width: min(280px, 88vw);
  z-index: 40;
  padding: 0.5rem 0.58rem;
  border: 1px solid #c7d2e3;
  border-radius: 9px;
  background: #ffffff;
  color: #334155;
  font-size: 0.77rem;
  font-weight: 600;
  line-height: 1.35;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
}

.playground-label-row.is-help-open .playground-help-popover {
  display: block;
}

.playground-field input,
.playground-field select,
.playground-field textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid #c7d2e3;
  border-radius: 10px;
  background: #ffffff;
  color: #0f172a;
  font-size: 0.9rem;
  padding: 0.53rem 0.62rem;
  line-height: 1.35;
}

.playground-field textarea {
  min-height: 84px;
  resize: vertical;
}

.playground-field input:focus,
.playground-field select:focus,
.playground-field textarea:focus {
  outline: none;
  border-color: #0a1931;
  box-shadow: 0 0 0 3px rgba(10, 25, 49, 0.14);
}

.playground-field--brand input,
.playground-field--brand select {
  border-color: rgba(15, 40, 82, 0.34);
  background: #f6f9ff;
}

.playground-condition-list {
  display: grid;
  gap: 0.62rem;
}

.playground-condition-row {
  border: 1px solid #d8e1ee;
  border-radius: 11px;
  background: #ffffff;
  padding: 0.58rem;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: end;
}

.playground-condition-row__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.playground-row-remove {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.45rem 0.62rem;
  min-height: 38px;
  cursor: pointer;
}

.playground-row-remove:hover:not(:disabled),
.playground-row-remove:focus-visible:not(:disabled) {
  border-color: #94a3b8;
  background: #f8fafc;
}

.playground-row-remove:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.playground-add-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #0a1931;
  background: #0a1931;
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.playground-add-btn:hover,
.playground-add-btn:focus-visible {
  background: #081226;
  border-color: #081226;
  outline: none;
}

.playground-add-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.playground-typeahead-shell {
  position: relative;
}

.playground-page .player-input {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.playground-page .player-input input {
  flex: 1;
}

.playground-page .clear-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #ced8e6;
  background: #ffffff;
  color: #64748b;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.playground-page .clear-btn:hover,
.playground-page .clear-btn:focus-visible {
  border-color: #0a1931;
  color: #0a1931;
  outline: none;
}

.playground-page .typeahead {
  position: absolute;
  top: calc(100% + 0.28rem);
  left: 0;
  right: 0;
  display: none;
  z-index: 25;
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid #d1dae8;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.14);
}

.playground-page .typeahead.is-open {
  display: block;
}

.playground-page .typeahead-item {
  display: flex;
  align-items: center;
  gap: 0.62rem;
  padding: 0.62rem 0.78rem;
  border-bottom: 1px solid #edf2f7;
  cursor: pointer;
}

.playground-page .typeahead-item:last-child {
  border-bottom: 0;
}

.playground-page .typeahead-item:hover,
.playground-page .typeahead-item.is-active {
  background: #eef3fb;
}

.playground-page .typeahead-item img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #dbe3ef;
  flex-shrink: 0;
}

.playground-page .typeahead-item .name {
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}

.playground-page .typeahead-item .meta {
  margin-top: 0.1rem;
  color: #64748b;
  font-size: 0.8rem;
  line-height: 1.2;
}

.playground-page .selected-player {
  margin-top: 0.42rem;
  border: 1px solid #d8e1ee;
  border-radius: 11px;
  background: #f6f9ff;
  padding: 0.62rem 0.72rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.62rem;
  align-items: center;
}

.playground-page .selected-player img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #d1dae8;
  background: #ffffff;
}

.playground-page .selected-player .selected-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}

.playground-page .selected-player .selected-meta {
  margin-top: 0.15rem;
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.25;
}

.playground-page .selected-player.is-empty {
  border-style: dashed;
  background: #fbfcff;
}

.playground-page .selected-player.is-empty img {
  filter: grayscale(100%);
  opacity: 0.75;
}

.playground-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.15rem;
}

.playground-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.58rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.playground-btn--primary {
  border-color: #0a1931;
  background: #0a1931;
  color: #ffffff;
}

.playground-btn--primary:hover,
.playground-btn--primary:focus-visible {
  background: #081226;
}

.playground-btn--ghost {
  background: #ffffff;
  color: #0f172a;
}

.playground-btn--ghost:hover,
.playground-btn--ghost:focus-visible {
  background: #f8fafc;
}

.playground-alert {
  border: 1px solid #fecaca;
  border-radius: 12px;
  background: #fff1f2;
  color: #991b1b;
  padding: 0.78rem 0.9rem;
  font-weight: 700;
}

.playground-dynamic-results {
  margin-top: 0.95rem;
  display: grid;
  gap: 0.95rem;
}

.playground-dynamic-results > * {
  min-width: 0;
  max-width: 100%;
}

.playground-summary-card {
  border: 1px solid var(--playground-summary-secondary, #12203f);
  border-radius: 13px;
  background: var(--playground-summary-primary, #0a1931);
  color: #ffffff;
  padding: 1rem 1.05rem;
  min-height: 184px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.playground-summary-card__label {
  margin: 0 0 0.22rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.74);
}

.playground-summary-card__query {
  margin: 0;
  font-size: clamp(1rem, 2.4vw, 1.3rem);
  line-height: 1.3;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.playground-summary-card__answer {
  margin: 0.45rem 0 0;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.92);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.playground-summary-card .banner-entity-link {
  white-space: normal;
  overflow-wrap: anywhere;
}

.playground-expectation-card {
  border: 1px solid #c7d2e3;
  border-radius: 12px;
  background: #f8fbff;
  padding: 0.72rem 0.86rem;
}

.playground-expectation-card__title {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0a1931;
}

.playground-expectation-card__body {
  margin: 0.34rem 0 0;
  font-size: 0.88rem;
  color: #1e293b;
  line-height: 1.42;
}

.playground-guide-table-shell,
.playground-table-shell {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.playground-guide-table-shell .stats-table-scroll-wrap,
.playground-table-shell .stats-table-scroll-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.playground-disambiguation {
  border: 1px solid #d7deea;
  border-radius: 13px;
  background: #ffffff;
  padding: 0.85rem;
}

.playground-disambiguation h3 {
  margin: 0 0 0.65rem;
  font-size: 1rem;
}

.playground-disambiguation__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.55rem;
}

.playground-disambiguation__item {
  border: 1px solid #dbe3f0;
  border-radius: 10px;
  background: #f8fafc;
  padding: 0.62rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.playground-disambiguation__item:hover,
.playground-disambiguation__item:focus-visible {
  border-color: #0a1931;
  background: #ffffff;
}

.playground-disambiguation__name {
  color: #0f172a;
  font-weight: 700;
  font-size: 0.9rem;
}

.playground-disambiguation__meta {
  color: #64748b;
  font-size: 0.78rem;
}

.playground-table-shell {
  margin-top: 0;
}

.playground-table-shell .profile-table-outer {
  margin-top: 0;
}

.playground-text-results {
  display: grid;
  gap: 0.6rem;
}

.playground-text-results__item {
  border: 1px solid #d7deea;
  border-radius: 11px;
  background: #ffffff;
  padding: 0.78rem 0.9rem;
  color: #1e293b;
  line-height: 1.45;
}

.playground-empty-state {
  border: 1px dashed #cbd5e1;
  border-radius: 13px;
  background: #ffffff;
  padding: 0.95rem;
  text-align: center;
}

.playground-btn--primary.is-loading {
  opacity: 0.86;
  pointer-events: none;
}

.playground-skeleton {
  border: 1px solid #d7deea;
  border-radius: 13px;
  background: #ffffff;
  padding: 0.9rem;
}

.playground-skeleton__line {
  height: 12px;
  border-radius: 8px;
  background: #dce5f1;
  animation: playgroundPulse 1.15s ease-in-out infinite;
}

.playground-skeleton__line + .playground-skeleton__line {
  margin-top: 0.42rem;
}

.playground-skeleton__line--title {
  width: min(68%, 420px);
  height: 16px;
}

.playground-skeleton__line--wide {
  width: 100%;
}

.playground-skeleton__line--medium {
  width: min(58%, 360px);
}

.playground-skeleton__table {
  margin-top: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 11px;
  padding: 0.55rem;
}

.playground-skeleton__table-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.42rem;
  margin-top: 0.4rem;
}

.playground-skeleton__table-row:first-child {
  margin-top: 0;
}

@keyframes playgroundPulse {
  0%, 100% {
    opacity: 0.52;
  }
  50% {
    opacity: 1;
  }
}

.playground-empty-state h3 {
  margin: 0;
  font-size: 1rem;
}

.playground-empty-state p {
  margin: 0.4rem 0 0;
  color: #64748b;
}

@media (max-width: 1080px) {
  .playground-grid--three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .playground-condition-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .playground-condition-row__actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .playground-page {
    padding-bottom: 1rem;
  }

  .playground-hero-card,
  .playground-builder-shell,
  .playground-summary-card {
    border-radius: 12px;
  }

  .playground-builder-shell {
    padding: 0.7rem;
  }

  .playground-guide-shell {
    padding: 0.66rem;
  }

  .playground-grid--two,
  .playground-grid--three {
    grid-template-columns: 1fr;
  }

  .playground-condition-row {
    grid-template-columns: 1fr;
  }

  .playground-actions .playground-btn {
    width: 100%;
  }

  .playground-help-popover {
    width: min(250px, 90vw);
  }

  .playground-section__header {
    flex-wrap: wrap;
  }

  .playground-section__header-action {
    width: 100%;
    justify-content: flex-start;
  }
}
