.history-entry-card,
.history-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 24px;
  padding: 26px;
  border: 1px solid rgba(100, 126, 255, 0.32);
  border-radius: var(--radius-card);
  background: radial-gradient(circle at 88% 5%, rgba(100, 38, 255, 0.28), transparent 52%), var(--surface-gradient);
  box-shadow: var(--glow), inset 0 1px rgba(255, 255, 255, 0.07);
}

.history-entry-card h2,
.history-entry-card p,
.history-hero p { margin-bottom: 8px; }
.history-entry-card p,
.history-hero > p { max-width: 760px; color: var(--text-secondary); line-height: 1.55; }
.history-entry-card .button { flex: 0 0 auto; }
.history-hero { display: block; padding: 34px; }
.history-hero.compact h1 { max-width: 900px; font-size: clamp(34px, 6vw, 58px); }
.history-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 22px; }
.source-link { padding: 12px 14px; color: #a9bdff; font-weight: 700; }
.source-link:hover { color: white; }

.history-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.history-anchor-nav { display: flex; gap: 8px; margin: 18px 0; overflow-x: auto; }
.history-anchor-nav a,
.source-badge,
.status-badge {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.history-anchor-nav a:hover { color: white; border-color: rgba(111, 134, 255, 0.48); }
.history-anchor-nav a.active { color: white; border-color: rgba(111, 134, 255, 0.55); background: rgba(69, 115, 255, 0.18); }
.history-toolbar { grid-template-columns: minmax(190px, 1fr) repeat(3, minmax(150px, 0.55fr)); }
.history-table td:nth-child(2) { text-align: left; }
.history-qualification { display: block; margin-top: 3px; color: var(--text-muted); }
.history-section { margin-top: 34px; }
.history-rating-season { margin-bottom: 12px; }
.panel-heading.bare { padding-inline: 0; border: 0; }
.history-tournament-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.history-tournament-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 18px; }
.history-overview-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr); gap: 16px; }
.history-overview-grid .panel-heading a { color: #a9bdff; font-size: 12px; font-weight: 800; }
.history-tournament-card {
  display: grid;
  gap: 10px;
  min-height: 170px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-gradient);
  transition: transform 160ms ease, border-color 160ms ease;
}
.history-tournament-card:hover { transform: translateY(-2px); border-color: rgba(111, 134, 255, 0.48); }
.history-tournament-card > strong { font-size: 18px; line-height: 1.25; }
.history-tournament-card > small { color: var(--text-muted); }
.history-tournament-card > span:last-child { color: var(--text-secondary); font-size: 12px; }
.history-card-top { display: flex; justify-content: space-between; gap: 8px; }
.status-badge.ongoing { color: #72e1c2; border-color: rgba(64, 209, 171, 0.3); background: rgba(64, 209, 171, 0.1); }
.history-hall { margin-top: 34px; }
.history-hall-list { display: grid; }
.history-hall-row { display: grid; grid-template-columns: minmax(0, 1fr) 90px 110px; gap: 14px; align-items: center; padding: 15px 22px; border-bottom: 1px solid var(--line); }
.history-hall-row:last-child { border: 0; }
.history-hall-row > div { display: grid; }
.history-hall-row small,
.history-hall-row span { color: var(--text-muted); font-size: 11px; }
.history-hall-row b { color: #a9bdff; font-size: 18px; }
.history-method-note { margin: 22px 4px 0; color: var(--text-muted); font-size: 12px; line-height: 1.55; }
.history-inline-metrics { display: flex; flex-wrap: wrap; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.history-inline-metrics span { color: var(--text-secondary); }
.history-inline-metrics strong { color: white; }
.history-club-links { display: grid; gap: 8px; padding: 18px 22px; }
.history-club-links a { display: grid; gap: 4px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,0.04); }
.history-club-links a:hover { background: rgba(69,115,255,0.1); }
.history-club-links small { color: var(--text-muted); }
.history-player-panel { margin-bottom: 24px; }
.history-detail-grid { grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.5fr); }
.history-side-list { display: grid; padding: 10px 20px 18px; }
.history-side-list > span { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.history-side-list > span:last-child { border: 0; }
.history-side-list small { color: var(--text-muted); }

@media (max-width: 850px) {
  .history-entry-card { align-items: flex-start; flex-direction: column; }
  .history-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .history-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .history-tournament-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .history-detail-grid { grid-template-columns: 1fr; }
  .history-overview-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .history-hero { padding: 24px 20px; }
  .history-toolbar,
  .history-tournament-grid { grid-template-columns: 1fr; }
  .history-hall-row { grid-template-columns: minmax(0, 1fr) 62px 78px; padding-inline: 15px; }
  .history-entry-card .button { width: 100%; text-align: center; }
}
