/* Feinschliff: weiche Übergänge, klickbare Bibliothekszeilen, Handy-Ansicht. */
.btn, .pill, .tab, .lang, .set-choice, table.games td, input.search, select, .tview .move, .palette button {
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn.accent:focus-visible, .btn:focus-visible { outline-offset: 3px; }
input.search:focus { box-shadow: 0 0 0 3px var(--accent-soft); border-color: var(--accent); }

/* Bibliothek: ganze Zeile öffnet die Partie; Ergebnis als ruhige Marke */
table.games tbody tr { cursor: pointer; }
table.games tbody tr:hover td:first-child a { color: var(--accent); }
table.games td.res { font-variant-numeric: tabular-nums; color: var(--text2); }
.library .drop { transition: border-color .15s, background-color .15s; }
.library .drop:hover { border-color: var(--text); }

/* Karten: gleiche Höhe in einer Reihe (Foto-Schritte), Überschriften mit Luft */
.photo .steps { align-items: stretch; }
.empty { text-align: center; padding: 48px 0; }

/* nur Deckkraft, keine Verschiebung: chessground merkt sich die Brettposition beim Einfügen */
main > * { animation: enter .2s ease-out; }
@keyframes enter { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Handy */
@media (max-width: 700px) {
  header.top .bar, .inner, main { padding-left: 16px; padding-right: 16px; }
  header.top .bar:first-child { height: 52px; }
  .wordmark { font-size: 18px; }
  .util { gap: 8px; }
  .lang { padding: 5px 4px; font-size: 12px; }
  .pill { padding: 4px 12px; font-size: 12.5px; }
  nav.bar { gap: 22px; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  nav.bar::-webkit-scrollbar { display: none; }
  .tab { white-space: nowrap; flex: none; }
  nav.bar .tab:last-child { padding-right: 40px; }
  .band .inner { padding-top: 20px; padding-bottom: 18px; }
  .band h1 { font-size: 26px; padding-left: 14px; border-left-width: 6px; }
  .band .lead { margin: 8px 0 0 20px; font-size: 14px; }
  .band.compact h1 { font-size: 19px; }
  .band.compact .lead { font-size: 12.5px; margin: 0; }
  main { padding-top: 16px; padding-bottom: 32px; }
  .foot .inner { flex-direction: column; align-items: flex-start; gap: 6px; }

  /* Bibliothek als Liste statt abgeschnittener Tabelle: Namen links, Jahr und Ergebnis rechts, Ereignis darunter */
  .table-wrap { padding: 2px 14px 10px; }
  table.games thead { display: none; }
  table.games, table.games tbody { display: block; }
  table.games tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1px 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
  table.games td { display: block; padding: 0; border: 0; white-space: normal; }
  table.games td:nth-child(1), table.games td:nth-child(2), table.games td:nth-child(5) { grid-column: 1; }
  table.games td:nth-child(3) { grid-column: 2; grid-row: 1; text-align: right; color: var(--muted); }
  table.games td:nth-child(4) { grid-column: 2; grid-row: 2; text-align: right; }
  table.games td:nth-child(5) { font-size: 13px; color: var(--muted); }
  table.games td:nth-child(n+6) { display: none; }
  table.games tr:hover td { background: none; }
}

/* Gegnerwahl im Spielmodus: drei gleich breite Schaltflächen, gesperrt während der Partie */
.bot-pick { border: 0; margin: 0; padding: 0; min-width: 0; }
.bot-pick:disabled { opacity: .55; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.seg-btn { padding: 7px 4px; font-size: 13px; }
.seg-btn.active { border-color: var(--accent); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
