/* Desarrollado por Bruno Dilaccio, 2026. Todos los derechos reservados. */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: #f9fdf5;
  min-height: 100vh;
  padding: 1.5rem 1.5rem 0.5rem;
}

.app {
  max-width: 1300px;
  margin: 0 auto;
}

.logos {
  text-align: center;
  margin-bottom: 1rem;
}

.logos img {
  display: block;
  margin: 0 auto;
  width: 100%;
  max-width: 640px;
  height: auto;
}

.header {
  text-align: center;
  margin-bottom: 1.25rem;
}

.header h1 {
  font-size: 22px;
  font-weight: 500;
  color: #1a3a0a;
  margin-bottom: 4px;
}

.header p {
  font-size: 13px;
  color: #666;
}

.legend {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.legend-note {
  font-size: 12px;
  font-style: italic;
  color: #555;
  text-align: center;
  margin-bottom: 0.75rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #555;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.year-block {
  display: flex;
  margin-bottom: 12px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #d4eab8;
}

.year-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  background: #3B6D11;
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  padding: 12px 7px;
  text-align: center;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
}

.year-content {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.row {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid #d4eab8;
}

.row:last-child {
  border-bottom: none;
}

.row-label {
  min-width: 105px;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 500;
  color: #3B6D11;
  background: #EAF3DE;
  padding: 8px 10px;
  text-align: center;
  line-height: 1.3;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid #d4eab8;
}

.cards-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
  padding: 10px;
  background: #fff;
}

.card {
  background: #fff;
  border: 0.5px solid #C0DD97;
  border-radius: 10px;
  padding: 8px 11px;
  cursor: pointer;
  transition: all 0.18s ease;
  font-size: 12px;
  line-height: 1.4;
  color: #222;
  user-select: none;
  max-width: 200px;
}

.card:hover {
  border-color: #639922;
  transform: translateY(-1px);
}

.card.highlight-self {
  background: #639922 !important;
  border: 1.5px solid #27500A !important;
  color: #fff !important;
  transform: translateY(-2px);
  opacity: 1 !important;
}

.card.highlight-prev {
  background: #F8EC9E !important;
  border: 1.5px solid #A88E0A !important;
  color: #3A3003 !important;
  opacity: 1 !important;
}

.card.highlight-next {
  background: #378ADD !important;
  border: 1.5px solid #185FA5 !important;
  color: #fff !important;
  opacity: 1 !important;
}

.card.faded {
  opacity: 0.22;
}

.hint {
  font-size: 11px;
  color: #999;
  text-align: center;
  margin-top: 12px;
}

.hint.hint-second {
  margin-top: 2px;
}

@media (max-width: 600px) {
  .year-label { writing-mode: horizontal-tb; transform: none; min-width: unset; padding: 6px 10px; }
  .year-block { flex-direction: column; }
  .row { flex-direction: column; }
  .row-label { min-width: unset; border-right: none; border-bottom: 1px solid #d4eab8; }
  .card { max-width: 100%; }
}

.footer {
  text-align: center;
  margin-top: 0.75rem;
  padding: 10px 14px;
  border-top: 1px solid #d4eab8;
  font-size: 12px;
  color: #888;
}

.footer span {
  color: #3B6D11;
  font-weight: 500;
}

/* Variantes de leyenda */
.legend-note-multi {
  line-height: 1.6;
}

.legend-v4 {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 0.75rem;
}

.legend-v4 .legend-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
}

.legend-v4 .legend-inline-note {
  font-style: italic;
}
