.history-root .hidden {
  display: none !important;
}

.history-root .hs-search {
  margin-bottom: 1.25rem;
}

.history-root .search-title {
  margin: 0 0 0.35rem;
  font-size: 1.45rem;
  letter-spacing: 0.02em;
}

.history-root .hs-search-hint {
  margin: 0 0 1.1rem;
  color: var(--px-ink-muted);
  font-size: 0.95rem;
}

.history-root .hs-games {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.history-root .hs-game-tab {
  min-height: 40px;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.history-root .hs-game-tab:hover {
  background: rgba(255, 255, 255, 0.16);
}

.history-root .hs-game-tab.is-active {
  background: var(--px-accent);
  border-color: var(--px-accent);
  color: #1b1408;
}

.history-root .hs-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}

.history-root .font-controls {
  justify-content: flex-start;
}

.history-root #font-decrease,
.history-root #font-increase {
  min-width: 52px;
}

.history-root .hs-summary {
  margin-bottom: 1.25rem;
}

.history-root .hs-summary-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.history-root #header-game-logo {
  width: 132px;
  height: 44px;
  object-fit: contain;
  object-position: left center;
  border-radius: 8px;
  background: #072c46;
}

.history-root .hs-summary-head h3 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}

.history-root .hs-summary-hint {
  margin: 0.2rem 0 0;
  color: var(--px-ink-muted);
  font-size: 0.88rem;
}

.history-root .hs-summary-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.history-root .hs-info-pill {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  background: rgba(191, 147, 58, 0.18);
  border: 1px solid rgba(191, 147, 58, 0.35);
}

.history-root .hs-info-pill span {
  font-size: 0.78rem;
  color: var(--px-ink-muted);
}

.history-root .hs-info-pill strong {
  font-size: 0.98rem;
  font-weight: 700;
  word-break: break-word;
}

.history-root .hs-summary-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: flex-start;
}

.history-root #header-grid-container .draw-data-container {
  display: none;
}

.history-root .hs-legend {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 220px;
}

.history-root .hs-legend .px-pill {
  width: fit-content;
}

.history-root .circle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex: 0 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.history-root .hs-draws {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.history-root .hs-card {
  background: rgba(7, 44, 40, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-left: 6px solid var(--px-accent);
  border-radius: 14px;
  padding: 1rem 1.05rem 1.1rem;
  box-shadow: var(--px-shadow);
}

.history-root[data-game="tzoker"] .hs-card {
  border-left-color: #3d7dff;
}

.history-root[data-game="lotto"] .hs-card {
  border-left-color: #ffee07;
}

.history-root[data-game="kino"] .hs-card {
  border-left-color: #ff7f00;
}

.history-root[data-game="extra5"] .hs-card {
  border-left-color: #c060ff;
}

.history-root[data-game="proto"] .hs-card {
  border-left-color: #ff4d63;
}

.history-root[data-game="super3"] .hs-card {
  border-left-color: #f15a21;
}

.history-root .draw-data-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.45rem 1rem;
  margin-bottom: 0.85rem;
  font-weight: 700;
}

.history-root .draw-number {
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.85rem;
}

.history-root .draw-date {
  color: var(--px-ink-muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.history-root table.coupon-area {
  border: none !important;
  border-collapse: separate;
  border-spacing: 0.32rem;
  margin: 0 0 0.65rem;
  width: auto;
}

.history-root table.coupon-area:last-child {
  margin-bottom: 0;
}

.history-root table.coupon-area td {
  width: 2.15em;
  height: 2.15em;
  padding: 0 !important;
  text-align: center;
  vertical-align: middle;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  font-weight: 800;
  font-size: 0.78em;
  color: #0f2433;
  background: radial-gradient(circle at 30% 28%, #fff 0%, #dce7f2 42%, #9bb4c9 100%);
  box-shadow: inset 0 -3px 6px rgba(15, 36, 51, 0.18);
}

.history-root table.coupon-area.is-bonus td {
  color: #fff;
  background: radial-gradient(circle at 30% 28%, #ff8ad4 0%, #c2185b 55%, #7b0d38 100%);
  border-color: #ffd0e8;
}

.history-root table.coupon-area.is-digits td {
  border-radius: 10px;
}

.history-root .matched {
  color: #fff !important;
  background: radial-gradient(circle at 30% 28%, #6ea2ff 0%, #0076b6 62%, #0c3fa5 100%) !important;
  border-color: #fff !important;
}

.history-root .matched-bonus {
  color: #1b1408 !important;
  background: radial-gradient(circle at 30% 28%, #ffe08a 0%, #e3a008 55%, #bf933a 100%) !important;
  border-color: #fff4c8 !important;
}

.history-root .maxmatched {
  color: #fff !important;
  background: radial-gradient(circle at 30% 28%, #7dff8a 0%, #218900 62%, #0d4a00 100%) !important;
  border-color: #c8ffd0 !important;
}

.history-root .avgmatched {
  color: #fff !important;
  background: radial-gradient(circle at 30% 28%, #7eb6ff 0%, #1a5fd0 62%, #0c3fa5 100%) !important;
  border-color: #d0e6ff !important;
}

.history-root .minmatched {
  color: #1b1408 !important;
  background: radial-gradient(circle at 30% 28%, #fff4c4 0%, #c4b44a 62%, #8a7a20 100%) !important;
  border-color: #fff4c8 !important;
}

.history-root .notmatched {
  color: #fff !important;
  background: radial-gradient(circle at 30% 28%, #ff8a7a 0%, #a21502 62%, #5c0c02 100%) !important;
  border-color: #ffd0c8 !important;
}

.history-root .circle.maxmatched {
  background: #218900;
}

.history-root .circle.avgmatched {
  background: #1a5fd0;
}

.history-root .circle.minmatched {
  background: #c4b44a;
}

.history-root .circle.notmatched {
  background: #a21502;
}

@media (max-width: 800px) {
  .history-root .hs-summary-grid {
    flex-direction: column;
  }

  .history-root .hs-draws {
    grid-template-columns: 1fr;
  }
}
