.history-card { min-width: 0; padding: 1.6rem 1.9rem; margin-bottom: 3rem; scroll-margin-top: 1rem; }
.history-area > #winner-history { margin-bottom: 1rem; }
.history-backup-link { color: var(--wine); text-underline-offset: .15em; }
.history-toolbar { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: .9rem 1.5rem; }
.history-export-block { display: grid; justify-items: end; gap: .25rem; }
.history-export-scope, .history-export-status { font-size: .89rem; }
.history-export-status:not(:empty) { margin-top: .75rem; padding: .6rem .78rem; background: #f8f6f0; border-radius: .35rem; }
.history-backup-panel { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .55rem 1rem; padding: .75rem .9rem; margin-top: 1rem; border: 1px solid var(--line); border-radius: .4rem; background: #fbf9f4; }
.history-backup-status { display: flex; flex: 1 1 22rem; flex-wrap: wrap; align-items: baseline; gap: .15rem .55rem; font-size: .93rem; }
.history-backup-status strong { color: var(--ink); }
.history-backup-feedback { flex-basis: 100%; font-size: .89rem; overflow-wrap: anywhere; }
.history-backup-feedback:empty { display: none; }
.history-search-form { display: grid; grid-template-columns: minmax(0, 25rem) minmax(9rem, 12rem); gap: .85rem 1rem; margin: 1.15rem 0 1.3rem; }
.history-search-form input[type="search"] { appearance: none; }
.history-results { min-width: 0; padding-top: .95rem; border-top: 1px solid var(--line); }
.history-subheading, .history-person-name { color: var(--ink); font-size: 1.17rem; line-height: 1.28; letter-spacing: -.023em; margin: 0 0 .65rem; }
.history-empty { background: #f8f6f0; border-radius: .36rem; padding: .85rem 1rem; }
.history-table { width: 100%; border-collapse: collapse; font-size: .95rem; text-align: left; font-variant-numeric: tabular-nums; }
.history-table thead th { background: #f8f6f0; padding: .57rem .72rem; color: var(--ink); font-size: .88rem; font-weight: 650; vertical-align: bottom; }
.history-table tbody td, .history-table tbody th { border-bottom: 1px solid var(--line); padding: .67rem .72rem; font-weight: 400; }
.history-person-link { display: inline-flex; flex-direction: column; align-items: flex-start; background: transparent; color: var(--wine); padding: .15rem .05rem; text-align: left; min-height: 2.65rem; gap: .1rem; }
.history-person-link strong { font-size: 1rem; overflow-wrap: anywhere; text-decoration: underline; text-underline-offset: .16em; text-decoration-color: #c7a6b0; }
.history-person-link small, .history-person-id { color: var(--coal); font-weight: 400; font-size: .88rem; overflow-wrap: anywhere; }
.history-person-link:hover strong { text-decoration-color: var(--wine); }
.history-pagination, .history-page-controls { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; }
.history-pagination { margin-top: .8rem; justify-content: space-between; font-size: .9rem; }
.history-back { margin-bottom: .55rem; }
.history-person-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.history-person-name { font-size: 1.3rem; margin: 0 0 .2rem; overflow-wrap: anywhere; }
.history-metrics { display: flex; gap: .85rem 1.25rem; flex-wrap: wrap; }
.history-metrics > div { padding-left: .65rem; border-left: 2px solid var(--mmr-canvas); }
.history-metrics dt { font-size: .88rem; }
.history-metrics dd { color: var(--wine); font-size: 1.3rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.history-dates-table td { overflow-wrap: anywhere; }
.history-draw-label { white-space: pre-wrap; }
#history-more { margin-top: .8rem; }
@media (max-width: 820px) {
  .history-card { padding: 1.25rem; }
}
@media (max-width: 560px) {
  .history-card { padding: 1rem; }
  .history-export-block { justify-items: start; }
  .history-search-form { grid-template-columns: minmax(0, 1fr); margin-bottom: 1rem; }
  .history-table thead th, .history-table tbody td, .history-table tbody th { padding: .55rem .4rem; }
  .history-search-table tr > :nth-child(2) { display: none; }
  .history-search-table tr > :last-child { width: 6.6rem; text-align: right; }
  .history-dates-table { table-layout: fixed; }
  .history-dates-table tr > :first-child { width: 39%; }
  .history-dates-table tr > :nth-child(2) { width: 28%; }
  .history-backup-panel { align-items: flex-start; }
  .history-metrics { width: 100%; }
  .history-back, .history-person-link { min-height: 2.75rem; }
}
