/* Archive mode (archive.html): the list of past puzzles and its result panel. The board,
   keyboard, chips and buttons come from styles.css. */
.archive-main {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 12px 24px;
}
.archive-intro { margin: 0 0 12px; text-align: center; }
.archive-progress { margin: 14px 0 10px; font-size: 0.8rem; color: var(--text-dim); text-align: center; }

.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 8px;
}
.archive-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-elevated);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.1s ease, background 0.15s ease, border-color 0.15s ease;
}
.archive-chip:hover { background: var(--hover-bg); border-color: var(--border-soft); }
.archive-chip:active { transform: scale(0.96); }
.archive-chip-number { font-weight: 800; font-size: 1rem; }
.archive-chip-date { font-size: 0.68rem; color: var(--text-dim); }
.archive-chip-state { font-size: 0.72rem; font-weight: 700; min-height: 1.1em; color: var(--text-dim); }
.archive-chip.started { border-color: var(--accent); }
.archive-chip.started .archive-chip-state { color: var(--accent-hover); }
.archive-chip.won { border-color: var(--correct); }
.archive-chip.won .archive-chip-state { color: var(--text); }
.archive-chip.lost .archive-chip-state { color: var(--danger); }

.archive-result {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  padding: 16px;
  text-align: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  animation: modal-in 0.18s ease;
}
.archive-result h2 { margin: 0; }
.archive-btn { display: block; text-decoration: none; text-align: center; margin-bottom: 10px; }
#archive-giveup { text-align: center; }
