.tc-app {
  --tc-bg: #1a2218;
  --tc-panel: #243022;
  --tc-ink: #e8efe4;
  --tc-muted: #9aab94;
  --tc-accent: #c4a35a;
  --tc-accent-2: #6f9b6f;
  --tc-danger: #c45c5c;
  --tc-line: rgba(232, 239, 228, 0.12);
  color: var(--tc-ink);
  background:
    radial-gradient(ellipse at top left, rgba(196, 163, 90, 0.12), transparent 50%),
    linear-gradient(160deg, #1a2218, #121810 60%, #1c281c);
  border: 1px solid var(--tc-line);
  border-radius: 12px;
  padding: 1.25rem;
  margin: 1rem 0;
  font-family: "Segoe UI", "PT Sans", sans-serif;
}

.tc-header h2 {
  margin: 0 0 0.35rem;
  font-family: "Georgia", "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--tc-accent);
}

.tc-muted, .tc-rating { color: var(--tc-muted); }
.tc-msg { color: var(--tc-muted); }

.tc-create-form {
  display: grid;
  gap: 0.75rem;
  max-width: 420px;
  margin-top: 1rem;
}

.tc-create-form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.92rem;
}

.tc-create-form input,
.tc-create-form select,
.tc-filters input,
.tc-filters select {
  background: var(--tc-panel);
  border: 1px solid var(--tc-line);
  color: var(--tc-ink);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
}

.tc-check {
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
  grid-template-columns: none !important;
}

.tc-btn {
  appearance: none;
  border: 1px solid var(--tc-line);
  background: var(--tc-panel);
  color: var(--tc-ink);
  border-radius: 8px;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  font: inherit;
}

.tc-btn:hover { border-color: var(--tc-accent); }
.tc-btn-primary {
  background: linear-gradient(180deg, #d4b56a, #b8923f);
  color: #1a160c;
  border: none;
  font-weight: 600;
}
.tc-btn-danger { background: var(--tc-danger); border: none; color: #fff; }

.tc-board-layout {
  display: grid;
  grid-template-columns: minmax(280px, 520px) minmax(200px, 1fr);
  gap: 1.25rem;
}

@media (max-width: 800px) {
  .tc-board-layout { grid-template-columns: 1fr; }
}

.tc-board { width: 100%; max-width: 520px; }
.tc-meta { margin-bottom: 0.75rem; line-height: 1.45; }
.tc-clock {
  margin-top: 0.75rem;
  font-variant-numeric: tabular-nums;
  color: var(--tc-accent);
  font-size: 1.1rem;
}

.tc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.tc-moves {
  max-height: 360px;
  overflow: auto;
  margin: 0;
  padding-left: 1.25rem;
  line-height: 1.6;
}

.tc-moves button {
  background: none;
  border: none;
  color: var(--tc-ink);
  cursor: pointer;
  padding: 0 0.2rem;
  font: inherit;
}

.tc-moves button.is-active {
  color: var(--tc-accent);
  text-decoration: underline;
}

.tc-side-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.tc-pgn {
  margin-top: 0.75rem;
  background: #0e140e;
  padding: 0.75rem;
  border-radius: 8px;
  white-space: pre-wrap;
  font-size: 0.85rem;
}

.tc-games {
  display: grid;
  gap: 0.6rem;
  margin-top: 1rem;
}

.tc-game-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  align-items: center;
  background: var(--tc-panel);
  border: 1px solid var(--tc-line);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  text-decoration: none;
  color: inherit;
}

.tc-game-row:hover { border-color: var(--tc-accent); }
.tc-badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(111, 155, 111, 0.25);
  color: #cfe3cf;
  font-size: 0.8rem;
}

.tc-badge.warn { background: rgba(196, 163, 90, 0.25); color: #f0e0b0; }
.tc-status { min-height: 1.2em; color: var(--tc-muted); }

.tc-achievements {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.6rem;
  margin-top: 1rem;
}

.tc-ach {
  background: var(--tc-panel);
  border: 1px solid var(--tc-line);
  border-radius: 10px;
  padding: 0.7rem;
  opacity: 0.45;
}
.tc-ach.is-unlocked { opacity: 1; border-color: var(--tc-accent); }

.tc-filters { display: flex; gap: 0.5rem; flex-wrap: wrap; }
