:root {
  color-scheme: light;
  font-family: "Segoe UI", Arial, sans-serif;
  line-height: 1.4;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f5f7fb;
  color: #1f2937;
}

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

.header h1 {
  margin: 0;
  font-size: 1.9rem;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.theme-toggle-btn {
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 8px 12px;
  color: #111827;
  font-weight: 600;
  cursor: pointer;
}

.theme-toggle-btn:hover {
  background: #f8fafc;
}

.header p {
  margin-top: 6px;
  color: #4b5563;
}

.tabs {
  margin-top: 18px;
  display: flex;
  gap: 8px;
}

.tab-btn {
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 9px 12px;
  background: #ffffff;
  color: #1f2937;
  font-weight: 600;
  cursor: pointer;
}

.tab-btn:hover {
  background: #f8fafc;
}

.tab-btn.active {
  border-color: #3b82f6;
  background: #eff6ff;
}

.tab-panel {
  display: none;
  margin-top: 12px;
}

.tab-panel.active {
  display: block;
}

body.dark-mode {
  background: #1e293b;
  color: #f1f5f9;
}

body.dark-mode .header p,
body.dark-mode .map-attribution,
body.dark-mode .explorer-subtitle,
body.dark-mode .country-header p,
body.dark-mode .country-flag-source,
body.dark-mode .data-term,
body.dark-mode .bonus-question-prompt,
body.dark-mode .train-label,
body.dark-mode .train-fieldset legend,
body.dark-mode .train-inline-check,
body.dark-mode .train-hint-list,
body.dark-mode .train-hardest-list,
body.dark-mode .train-hint-list-empty {
  color: #dbe7f5;
}

body.dark-mode .train-status,
body.dark-mode #trainStatus,
body.dark-mode #trainPrompt,
body.dark-mode #trainSummaryMetrics,
body.dark-mode #trainSummaryHardest {
  color: #f8fbff;
}

body.dark-mode .country-header h2,
body.dark-mode .category-card h3,
body.dark-mode .data-value {
  color: #f8fbff;
}

body.dark-mode .country-flag-source a,
body.dark-mode .data-rank {
  color: #93c5fd;
}

body.dark-mode .data-toggle-btn {
  background: #35548f;
  border-color: #7fb2ff;
  color: #eff6ff;
}

body.dark-mode .data-toggle-btn:hover {
  background: #46649b;
}

body.dark-mode .data-info-btn {
  background: #334155;
  border-color: #64748b;
  color: #94a3b8;
}

body.dark-mode .data-info-btn:hover {
  background: #3b4f6b;
  border-color: #7fb2ff;
  color: #93c5fd;
}

body.dark-mode .data-info-btn-active {
  background: #2d4466;
  border-color: #60a5fa;
  color: #93c5fd;
}

body.dark-mode .field-info-overlay {
  background: rgba(0, 0, 0, 0.6);
}

body.dark-mode .field-info-modal {
  background: #263447;
  border-color: #4b5f79;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

body.dark-mode .field-info-header {
  border-bottom-color: #4b5f79;
}

body.dark-mode .field-info-title {
  color: #f8fbff;
}

body.dark-mode .field-info-close {
  color: #94a3b8;
}

body.dark-mode .field-info-close:hover {
  background: #334155;
  color: #f1f5f9;
}

body.dark-mode .field-info-desc {
  color: #dbe7f5;
}

body.dark-mode .field-info-source {
  color: #a5b4fc;
}

body.dark-mode .theme-toggle-btn,
body.dark-mode .tab-btn,
body.dark-mode .search-panel,
body.dark-mode .game-panel,
body.dark-mode .country-header,
body.dark-mode .category-card,
body.dark-mode .empty-state,
body.dark-mode .game-map-panel,
body.dark-mode .bonus-question-card,
body.dark-mode .game-fact,
body.dark-mode .explorer-table,
body.dark-mode .explorer-select,
body.dark-mode .search-input,
body.dark-mode .search-results,
body.dark-mode .train-fieldset,
body.dark-mode .country-flag,
body.dark-mode .train-flag {
  background: #263447;
  border-color: #4b5f79;
  color: #f1f5f9;
}

body.dark-mode .tab-btn.active {
  border-color: #7fb2ff;
  background: #35548f;
  color: #eff6ff;
}

body.dark-mode .tab-btn:hover,
body.dark-mode .theme-toggle-btn:hover,
body.dark-mode .search-result-item:hover,
body.dark-mode .search-result-item.active,
body.dark-mode .explorer-table tbody tr:hover {
  background: #32465f;
}

body.dark-mode .game-btn {
  background: #263447;
  border-color: #3b82f6;
  color: #eff6ff;
}

body.dark-mode #startGameBtn {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  border-color: #1d4ed8;
}

body.dark-mode .game-rules-panel {
  background: #2c4575;
  border-color: #3b82f6;
  color: #e0e7ff;
}

body.dark-mode .game-score {
  background: #35548f;
  border-color: #2563eb;
  color: #eff6ff;
}

body.dark-mode #gameScore {
  background: transparent;
  border: 0;
  color: #dbeafe;
}

body.dark-mode .world-map {
  background: linear-gradient(180deg, #2a3b53 0%, #243447 100%);
  border-color: #4b5f79;
}

body.dark-mode .map-country {
  stroke: #1f2937;
}

body.dark-mode .map-country.is-highlighted {
  fill: #3b82f6;
}

body.dark-mode .map-country.is-dimmed {
  fill: #4b5f79;
}

body.dark-mode .explorer-table th {
  background: #32465f;
  color: #f1f5f9;
}

body.dark-mode .explorer-sort-btn {
  color: #f1f5f9;
}

body.dark-mode .explorer-sort-btn:hover {
  color: #93c5fd;
}

body.dark-mode .explorer-table th,
body.dark-mode .explorer-table td {
  border-bottom-color: #4b5f79;
}

body.dark-mode .train-hint-remove-btn {
  border-color: #be123c;
  background: #3f0f1c;
  color: #fecdd3;
}

body.dark-mode .game-fact-meta {
  color: #bfdbfe;
}

body.dark-mode .game-fact-value {
  color: #f8fbff;
}

body.dark-mode .game-fact-rank {
  background: #59421a;
  border-color: #d4a857;
  color: #fde68a;
}

body.dark-mode .game-guess-title {
  color: #dbeafe;
}

body.dark-mode .game-guess-mode-toggle .game-btn.active {
  background: #35548f;
  border-color: #7fb2ff;
}

.search-panel {
  margin-top: 20px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
}

.game-panel {
  margin-top: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #dbe4f0;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.08);
}

#gameScore {
  display: block;
  margin: 14px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: center;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #1e3a8a;
}

.game-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.game-top-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.game-top h2 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: 0.01em;
}

.game-btn {
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 10px 12px;
  background: #ffffff;
  color: #0f172a;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.game-btn:hover:not(:disabled) {
  background: #eff6ff;
  border-color: #60a5fa;
  transform: translateY(-1px);
}

.game-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#startGameBtn {
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  border-color: #2563eb;
  color: #ffffff;
  min-width: 120px;
}

#startGameBtn:hover:not(:disabled) {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  border-color: #1d4ed8;
}

.game-rules-panel {
  margin: 10px 0 0;
  color: #475569;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 10px 12px;
}

.game-rules-panel p {
  margin: 0;
}

#gameRulesBtn {
  padding: 8px 10px;
}

#closeGameRulesBtn {
  margin-top: 10px;
}

.game-score {
  margin: 12px 0 0;
  font-weight: 700;
  color: #1d4ed8;
  background: #dbeafe;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  display: inline-block;
  padding: 6px 12px;
}

.game-map-panel {
  margin-top: 12px;
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  padding: 10px;
}

.game-map-panel h3 {
  margin: 0;
  font-size: 0.98rem;
  color: #1e3a8a;
}

.world-map {
  margin-top: 8px;
  width: 100%;
  min-height: 240px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: linear-gradient(180deg, #f8fbff 0%, #f1f5f9 100%);
  overflow: hidden;
}

.world-map svg {
  width: 100%;
  height: 100%;
  display: block;
}

.map-country {
  fill: #93c5fd;
  stroke: #ffffff;
  stroke-width: 0.45;
  transition: fill 0.15s ease, opacity 0.15s ease;
}

.map-country.is-highlighted {
  fill: #60a5fa;
}

.map-country.is-guessed {
  fill: #f59e0b;
}

.map-country.is-dimmed {
  fill: #cbd5e1;
  opacity: 0.45;
}

.map-country.is-target {
  fill: #10b981;
}

.map-country.flash-correct {
  fill: #22c55e !important;
}

.map-country.flash-incorrect {
  fill: #ef4444 !important;
}

.map-attribution {
  margin: 8px 0 0;
  font-size: 0.78rem;
  color: #64748b;
}

.bonus-question-card {
  margin-top: 12px;
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  padding: 10px;
}

.bonus-question-card h3 {
  margin: 0;
  font-size: 0.98rem;
  color: #1e3a8a;
}

.bonus-question-prompt {
  margin: 8px 0 0;
  color: #334155;
}

.bonus-question-card.is-active {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}

.game-bonus-question-actions {
  grid-template-columns: repeat(2, minmax(170px, 1fr));
}

.game-facts {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px;
}

.game-fact {
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-left: 4px solid #3b82f6;
  border-radius: 10px;
  padding: 11px 12px;
  box-shadow: 0 4px 10px rgba(30, 64, 175, 0.06);
}

.game-fact-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #1d4ed8;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.game-fact-meta .data-info-btn {
  margin-left: 0;
}

.game-fact-value {
  margin-top: 6px;
  color: #0f172a;
  line-height: 1.45;
}

.game-fact-rank {
  margin-top: 8px;
  display: inline-block;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  color: #92400e;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.78rem;
  font-weight: 700;
}

.game-actions {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(170px, 1fr));
  gap: 10px;
}

#guessInput {
  grid-column: 1 / span 2;
}

.game-guess-wrap {
  grid-column: 1 / span 2;
}

.game-bonus-actions {
  grid-template-columns: minmax(220px, 1fr) auto;
}

.game-primary-guess-actions {
  grid-template-columns: minmax(220px, 1fr) auto;
}

.game-primary-guess-actions .game-guess-wrap,
.game-primary-guess-actions .game-region-select {
  grid-column: 1;
}

.game-primary-guess-actions #submitGuessBtn {
  grid-column: 2;
}

.game-guess-section {
  margin-top: 12px;
}

.game-guess-title {
  margin: 0;
  text-align: center;
  font-size: 1.2rem;
  color: #1e3a8a;
}

.game-guess-mode-toggle {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.game-guess-mode-toggle .game-btn.active {
  background: #dbeafe;
  border-color: #60a5fa;
}

#regionGuessSelect {
  grid-column: 1;
}

#submitGuessBtn {
  grid-column: 3;
  background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
  border-color: #0f766e;
  color: #ffffff;
}

#submitGuessBtn:hover:not(:disabled) {
  background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
  border-color: #0f766e;
}

#nextRoundBtn {
  grid-column: 1 / -1;
}

#nextRoundBtn:hover:not(:disabled) {
  background: #f8fafc;
  border-color: #cbd5e1;
}

#bonusAboveBtn:hover:not(:disabled),
#bonusUnderBtn:hover:not(:disabled),
#guessModeRegionBtn:hover:not(:disabled),
#guessModeCountryBtn:hover:not(:disabled),
#gameRulesBtn:hover:not(:disabled) {
  background: #f8fafc;
  border-color: #cbd5e1;
}

body.dark-mode #nextRoundBtn:hover:not(:disabled) {
  background: #2b3c52;
  border-color: #4b5f79;
}

body.dark-mode #bonusAboveBtn:hover:not(:disabled),
body.dark-mode #bonusUnderBtn:hover:not(:disabled),
body.dark-mode #guessModeRegionBtn:hover:not(:disabled),
body.dark-mode #guessModeCountryBtn:hover:not(:disabled),
body.dark-mode #gameRulesBtn:hover:not(:disabled) {
  background: #2b3c52;
  border-color: #4b5f79;
}

.game-status {
  margin: 12px 0 0;
  color: #334155;
  font-weight: 600;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
}

.game-status.success {
  color: #166534;
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.game-status.error {
  color: #991b1b;
  background: #fef2f2;
  border-color: #fecaca;
}

@media (max-width: 860px) {
  .game-actions {
    grid-template-columns: 1fr;
  }

  #guessInput,
  #submitGuessBtn {
    grid-column: auto;
  }
}

.search-label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}

.search-wrap {
  position: relative;
}

.search-input {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 1rem;
}

.search-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.search-results {
  list-style: none;
  margin: 6px 0 0;
  padding: 6px;
  position: absolute;
  width: 100%;
  max-height: 260px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
  z-index: 10;
}

.search-results:empty {
  display: none;
}

.search-result-item {
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.search-result-item:hover,
.search-result-item.active {
  background: #eff6ff;
}

.country-header {
  margin-top: 18px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
}

.country-header-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.country-flag {
  width: 56px;
  height: 42px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  object-fit: cover;
  background: #f8fafc;
  flex-shrink: 0;
}

.country-header h2 {
  margin: 0;
}

.country-header p {
  margin: 5px 0 0;
  color: #4b5563;
}

.country-flag-source {
  margin-top: 8px;
  font-size: 0.82rem;
  color: #6b7280;
}

.country-flag-source a {
  color: #1d4ed8;
}

.content-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}

.category-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px;
}

.category-card h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

.data-list {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(120px, 160px) 1fr;
  row-gap: 8px;
  column-gap: 8px;
}

.data-term {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  font-weight: 600;
  color: #374151;
}

.data-term-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.data-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.7rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.data-info-btn:hover {
  background: #e0e7ff;
  border-color: #93c5fd;
  color: #2563eb;
}

.data-info-btn-active {
  background: #dbeafe;
  border-color: #60a5fa;
  color: #1d4ed8;
}

/* Field Info Modal Overlay */
.field-info-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  animation: fadeInOverlay 0.15s ease-out;
}

@keyframes fadeInOverlay {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.field-info-modal {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  width: 90%;
  max-width: 420px;
  overflow: hidden;
  animation: scaleInModal 0.18s ease-out;
}

@keyframes scaleInModal {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

.field-info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 10px;
  border-bottom: 1px solid #e5e7eb;
}

.field-info-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #111827;
}

.field-info-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #6b7280;
  font-size: 1.3rem;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.field-info-close:hover {
  background: #f3f4f6;
  color: #111827;
}

.field-info-body {
  padding: 14px 18px 18px;
}

.field-info-desc {
  margin: 0 0 10px;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #374151;
}

.field-info-source {
  margin: 0;
  font-size: 0.82rem;
  color: #6366f1;
  font-weight: 600;
}

.data-value {
  margin: 0;
  color: #111827;
  overflow-wrap: anywhere;
}

.data-value-collapsible .data-value-text {
  display: -webkit-box;
  line-clamp: 3;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.data-value-collapsible.expanded .data-value-text {
  display: block;
  overflow: visible;
}

.data-toggle-btn {
  margin-top: 0;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
  font-size: 0.82rem;
  padding: 4px 8px;
  cursor: pointer;
}

.data-toggle-btn:hover {
  background: #dbeafe;
}

.data-rank {
  margin-top: 3px;
  font-size: 0.84rem;
  color: #2563eb;
}

.empty-state {
  margin-top: 14px;
  background: #ffffff;
  border: 1px dashed #d1d5db;
  border-radius: 12px;
  padding: 18px;
  color: #4b5563;
}

.explorer-title {
  margin: 0;
  font-size: 1.2rem;
}

.explorer-subtitle {
  margin: 6px 0 0;
  color: #4b5563;
}

.explorer-controls {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 12px;
}

.explorer-select {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 8px;
  font-size: 0.95rem;
  background: #ffffff;
}

.explorer-filter-input {
  margin: 6px 0 8px;
}

.explorer-table-wrap {
  margin-top: 14px;
  overflow-x: auto;
}

.explorer-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}

.explorer-table th,
.explorer-table td {
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  padding: 10px;
  vertical-align: top;
}

.explorer-table th {
  background: #f8fafc;
  font-weight: 700;
  white-space: nowrap;
}

.explorer-sort-btn {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  width: 100%;
  text-align: left;
  font: inherit;
  font-weight: 700;
  color: inherit;
  cursor: pointer;
}

.explorer-sort-btn:hover {
  color: #1d4ed8;
}

.explorer-sort-indicator {
  font-size: 0.78rem;
  margin-left: 4px;
  opacity: 0.85;
}

.explorer-table tbody tr:hover {
  background: #f8fafc;
}

.train-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 12px;
}

.train-fieldset {
  margin: 0;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  padding: 12px;
  min-width: 0;
}

.train-fieldset legend {
  padding: 0 6px;
  font-weight: 700;
  color: #1e3a8a;
}

.train-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 8px;
}

.train-inline-check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #1f2937;
  font-size: 0.95rem;
}

.train-label {
  margin-top: 6px;
  margin-bottom: 4px;
  display: block;
  font-weight: 600;
  color: #374151;
}

.train-conditional {
  margin-top: 10px;
}

.train-play {
  margin-top: 14px;
}

.train-hints-config {
  margin-top: 12px;
}

.train-hints-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(260px, 2fr) auto;
  gap: 10px;
  align-items: end;
}

.train-add-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.train-hints-create-wrap {
  display: flex;
  align-items: center;
}

.train-hint-list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: #0f172a;
}

.train-hint-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.train-hint-remove-btn {
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff1f2;
  color: #be123c;
  padding: 4px 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.train-hint-remove-btn:hover {
  background: #ffe4e6;
}

.train-hint-list-empty {
  color: #64748b;
  list-style: none;
  margin-left: -18px;
}

.train-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.train-flag {
  width: 56px;
  height: 42px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  object-fit: cover;
  background: #f8fafc;
}

.train-hardest-list {
  margin: 8px 0 0;
  padding-left: 18px;
  color: #0f172a;
}

.train-hardest-list li {
  margin-bottom: 4px;
}

@media (max-width: 860px) {
  .explorer-controls {
    grid-template-columns: 1fr;
  }

  .train-grid {
    grid-template-columns: 1fr;
  }

  .train-checkbox-grid {
    grid-template-columns: 1fr;
  }

  .train-hints-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}
