.dashboard-tutorial-link {
  font-size: 0.8rem;
  font-weight: normal;
  margin-left: 0.8rem;
  vertical-align: middle;
}

.stat-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.insights-card {
  margin-bottom: 1.6rem;
  border-color: var(--accent);
}

.insights-card h2 {
  font-size: 1rem;
  margin: 0 0 0.6rem;
}

.insights-list {
  margin: 0;
  padding-left: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.stat-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.4rem;
  min-width: 180px;
  animation: grid-item-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.stat-tile:nth-child(2) {
  animation-delay: 0.04s;
}

.stat-tile:nth-child(3) {
  animation-delay: 0.08s;
}

.stat-tile:nth-child(4) {
  animation-delay: 0.12s;
}

.stat-tile:nth-child(5) {
  animation-delay: 0.16s;
}

.stat-tile:nth-child(6) {
  animation-delay: 0.2s;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.stat-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid var(--text-muted);
  color: var(--text-muted);
  font-size: 0.65rem;
  cursor: help;
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--text-primary);
}

.chart-section,
.history-section {
  margin-bottom: 2.2rem;
}

.chart-section h2,
.history-section h2 {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 0.6rem;
  font-weight: 600;
}

.history-section h2 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.history-see-all {
  font-size: 0.82rem;
  font-weight: 500;
}

.games-review-btn {
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
}

.game-thumb {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
  width: 44px;
  height: 44px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.game-thumb.empty {
  background: var(--surface-2);
}

.thumb-square {
  display: flex;
  align-items: center;
  justify-content: center;
}

.thumb-square.light {
  background: var(--square-light);
}

.thumb-square.dark {
  background: var(--square-dark);
}

.thumb-square img {
  width: 85%;
  height: 85%;
}

.chart-root {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
  position: relative;
  max-width: 560px;
}

.chart-root svg {
  display: block;
  width: 100%;
  height: auto;
}

.chart-empty {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 1.5rem;
  text-align: center;
}

.chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: #0b0713;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem 0.65rem;
  font-size: 0.78rem;
  color: var(--text-primary);
  line-height: 1.5;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.1s;
  z-index: 5;
}

.chart-tooltip .tt-muted {
  color: var(--text-secondary);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 1rem;
}

.game-card {
  display: flex;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  animation: grid-item-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.game-card:nth-child(2) {
  animation-delay: 0.04s;
}

.game-card:nth-child(3) {
  animation-delay: 0.08s;
}

.game-card:nth-child(4) {
  animation-delay: 0.12s;
}

.game-card .game-thumb {
  width: 88px;
  height: 88px;
  flex-shrink: 0;
}

.game-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.game-card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.game-card-result {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.85rem;
}

.game-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-flow: row;
  gap: 0.1rem 1.2rem;
  margin: 0;
}

.game-card-stats > div {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.15rem 0;
  font-size: 0.78rem;
  border-bottom: 1px solid var(--border);
  min-width: 0;
}

.game-card-stats dt {
  flex-shrink: 0;
}

.game-card-stats dt {
  color: var(--text-muted);
}

.game-card-stats dd {
  margin: 0;
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.3rem;
}

@media (max-width: 700px) {
  .games-grid {
    grid-template-columns: 1fr;
  }

  .game-card-stats {
    grid-template-columns: 1fr;
  }
}

.motif-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.motif-chip {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: #0b0713;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-size: 0.85rem;
  cursor: pointer;
}

.motif-chip .count {
  font-weight: 600;
  color: var(--accent-soft);
  font-variant-numeric: tabular-nums;
}
