/* Vista calendario (js/calendar.js). Escritorio: cuadrícula mensual. ≤860 px: agenda (solo días con torneos). */
.calendar { padding: 16px; overflow: auto; height: 100%; box-sizing: border-box; background: var(--bg, #f6f5f1); }
.cal-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px 12px; margin-bottom: 12px; }
.cal-title { margin: 0; text-align: center; font-family: var(--serif); font-size: 1.35rem; font-weight: 600; }
.cal-count { grid-column: 1 / -1; margin: 0; text-align: center; color: var(--ink-2, #565b61); font-size: .9rem; }
.cal-nav {
  min-width: 40px; min-height: 40px; border-radius: 999px; border: 1px solid #8a8f94; background: #fff;
  font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--ink);
}
.cal-nav:hover { background: var(--clasico-soft, #e3efe9); }

.cal-grid { width: 100%; border-collapse: separate; border-spacing: 4px; table-layout: fixed; }
.cal-grid th { font-size: .8rem; font-weight: 600; color: var(--ink-2, #565b61); text-transform: capitalize; padding: 4px; }
.cal-grid abbr { text-decoration: none; }
.cal-day {
  vertical-align: top; height: 96px; padding: 6px; background: #fff; border-radius: 10px;
  border: 1px solid #e4e2dc; overflow: hidden;
}
.cal-day.is-out { background: transparent; border-color: transparent; }
.cal-day.is-today { border: 2px solid var(--clasico); }
.cal-dayname { display: none; }
.cal-num { display: block; font-size: .8rem; font-weight: 600; color: var(--ink-2, #565b61); margin-bottom: 4px; }
.cal-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.cal-item {
  display: flex; align-items: center; gap: 4px; width: 100%; min-height: 24px; padding: 2px 6px;
  border: 0; border-radius: 6px; background: var(--clasico-soft, #e3efe9); color: var(--ink);
  font: inherit; font-size: .76rem; text-align: left; cursor: pointer;
}
.cal-item[data-ritmo="rapido"] { background: var(--rapido-soft, #fbeedd); }
.cal-item[data-ritmo="blitz"] { background: var(--blitz-soft, #f8e3e6); }
.cal-item.is-cont { opacity: .7; }
.cal-item:hover { filter: brightness(.95); }
.cal-item:focus-visible, .cal-nav:focus-visible { outline: 3px solid var(--clasico); outline-offset: 2px; }
.cal-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--clasico); }
.cal-dot[data-ritmo="rapido"] { background: var(--rapido); }
.cal-dot[data-ritmo="blitz"] { background: var(--blitz); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Agenda en móvil: la tabla se lee como lista y los días vacíos desaparecen */
@media (max-width: 860px) {
  .cal-grid, .cal-grid tbody, .cal-grid tr, .cal-grid td { display: block; width: auto; }
  .cal-grid thead, .cal-day.is-out, .cal-day:not(.has-items) { display: none; }
  .cal-grid { border-spacing: 0; }
  .cal-day { height: auto; margin-bottom: 8px; padding: 10px 12px; }
  .cal-n { display: none; }
  .cal-dayname { display: inline; }
  .cal-num { font-size: .95rem; color: var(--ink); text-transform: capitalize; }
  .cal-item { font-size: .9rem; min-height: 36px; }
  .cal-text { white-space: normal; }
}
