.btn-c { transition: transform 0.08s ease; }
.btn-c:active { transform: scale(0.9); }

/* History & Summary Strip */
.history-bar { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; padding-top: 2px; }
.history-title-row { display: flex; justify-content: space-between; align-items: center; }
.history-title-row h3 { margin: 0; font-size: 1rem; }
.view-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.view-btn {
  padding: 5px 12px; border: none; background: var(--soft); color: var(--muted);
  font-size: 0.78rem; font-weight: 800; cursor: pointer;
}
.view-btn.active { background: #2c3e50; color: #fff; }
:root[data-theme="dark"] .view-btn.active { background: var(--accent); color: #0c1014; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .view-btn.active { background: var(--accent); color: #0c1014; } }

.history-bar .controls { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.filter-row { display: flex; gap: 8px; width: 100%; align-items: center; }
.filter-row select { flex: 1; padding: 8px 10px; font-size: 0.88rem; }

.summary-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 10px; }
@media (min-width: 640px) {
  .summary-strip { grid-template-columns: repeat(6, 1fr); }
  .history-bar .controls { flex-direction: row; }
  .filter-row { flex: 1; }
}
.sum-card { background: var(--card); border-radius: 10px; padding: 8px 6px; text-align: center; box-shadow: var(--shadow); border: 1px solid var(--line); }
.sum-card-val { font-size: 1rem; font-weight: 800; color: var(--accent); }
.sum-card-lbl { font-size: 0.65rem; font-weight: 700; color: var(--muted); text-transform: uppercase; margin-top: 2px; }

/* Portrait Game Cards View */
.history-cards { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.g-card {
  background: var(--card); border-radius: 12px; padding: 11px 12px;
  box-shadow: var(--shadow); border: 1px solid var(--line);
}
.g-card.trashed { opacity: 0.45; }
.g-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.g-card-opp { font-weight: 800; font-size: 0.95rem; color: var(--text); }
.g-card-meta { font-size: 0.75rem; color: var(--muted); margin-top: 2px; }
.g-card-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.g-card-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.stat-pill {
  background: var(--soft); border: 1px solid var(--line); border-radius: 6px;
  padding: 4px 8px; font-size: 0.75rem; font-weight: 800; color: var(--text-2);
}
.stat-pill.pts { background: var(--c-pts); }
.stat-pill.money { background: var(--c-money); color: var(--money); }

.history-container { overflow: auto; max-height: 68vh; background: var(--card); border-radius: 12px; box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: 0.75rem; }
th, td { padding: 10px 6px; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-weight: 800; background: var(--th-bg); border-bottom: 2px solid var(--th-border); position: sticky; top: 0; z-index: 10; }
.sticky-3 { position: sticky; left: 0; background: var(--card); z-index: 5; border-right: 1px solid var(--sticky-border); font-weight: bold; }
th.sticky-3 { background: var(--th-bg); z-index: 15; }
@media (min-width: 768px) {
  .sticky-1, .sticky-2 { position: sticky; background: var(--card); z-index: 5; border-right: 1px solid var(--sticky-border); }
  .sticky-1 { left: 0; } .sticky-2 { left: 44px; } .sticky-3 { left: 118px; }
  th.sticky-1, th.sticky-2 { background: var(--th-bg); z-index: 15; }
}