:root {
  --bg: #f3f4f6;
  --text: #1f2937;
  --muted: #6b7280;
  --white: #ffffff;
  --primary: #111827;
  --accent: var(--entity-color, #16a34a);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  --radius: 18px;

  --header-gradient-start: var(--accent);
  --header-gradient-end: color-mix(in srgb, var(--accent) 48%, #052e16);
  --header-accent-soft: color-mix(in srgb, var(--accent) 72%, white);

  --fav-accent: #ef4444;
  --fav-accent-dark: #dc2626;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

img {
  max-width: 100%;
  display: block;
}

a { color: inherit; }

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.container {
  width: min(100% - 32px, 980px);
  margin: 0 auto;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* =========================
   HEADER
========================= */

.site-header {
  position: relative;
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--header-accent-soft) 24%, transparent), transparent 42%),
    linear-gradient(135deg, var(--header-gradient-start), var(--header-gradient-end));
  color: white;
  padding: 44px 0 30px;
}

.header-layout {
  display: flex;
  align-items: center;
  gap: 20px;
}

.site-logo {
  width: 76px;
  height: auto;
  object-fit: contain;
  flex: 0 0 auto;
}

.header-copy {
  min-width: 0;
}

.brand-label {
  margin: 0 0 8px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #bbf7d0;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 8vw, 4rem);
  line-height: 1;
}

.header-text {
  max-width: 700px;
  margin: 16px 0 0;
  color: #e5e7eb;
  font-size: 1.05rem;
}

.calendar-intro {
  padding: 18px 0 0;
}

.calendar-intro p {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

/* =========================
   MENÚ
========================= */

.menu-toggle {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 80;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #111827;
  font-size: 1.5rem;
  font-weight: 900;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

.mobile-menu {
  position: fixed;
  inset: 0 auto 0 0;
  width: min(84vw, 340px);
  background: #fff;
  color: #111827;
  z-index: 100;
  transform: translateX(-105%);
  transition: transform 220ms ease;
  padding: 20px;
  box-shadow: 12px 0 30px rgba(0, 0, 0, 0.22);
  overflow-y: auto;
}

.mobile-menu.is-open { transform: translateX(0); }

.menu-close {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: #f3f4f6;
  color: #111827;
  font-size: 1.6rem;
  font-weight: 900;
}

.menu-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.menu-logo {
  width: 72px;
  height: auto;
}

.menu-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 900;
}

.menu-subtitle {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 700;
}

.menu-section-title {
  margin: 18px 0 8px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.month-nav {
  display: grid;
  gap: 12px;
}

.month-nav-year {
  display: grid;
  gap: 6px;
}

.month-nav-year > strong {
  color: var(--muted);
  font-size: .78rem;
  letter-spacing: .08em;
}

.month-nav a,
.menu-region,
.menu-favorites,
.menu-contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  padding: 10px 13px;
  border-radius: 14px;
  background: #f3f4f6;
  text-decoration: none;
  font-weight: 800;
}

.month-nav a:hover,
.menu-region:hover,
.menu-favorites:hover {
  background: #e5e7eb;
}

.nav-count,
.menu-favorites [data-favorites-count] {
  min-width: 1.55rem;
  height: 1.55rem;
  padding: 0 .42rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: .75rem;
  font-weight: 900;
}

.menu-region,
.menu-favorites {
  margin-top: 12px;
}

.menu-contact {
  margin-top: 12px;
  background: #111827;
  color: #fff;
}

.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .42);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.menu-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

body.menu-open { overflow: hidden; }

/* =========================
   LAYOUT PRINCIPAL
========================= */

.calendar-layout {
  padding: 22px 0 34px;
}

.calendar-primary {
  min-width: 0;
}

/* =========================
   PANEL DE ESTADO
========================= */

.calendar-status {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  margin-bottom: 18px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-left: 5px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.calendar-status-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 22px;
}

.calendar-status-stats span {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 800;
}

.calendar-status-stats strong {
  display: block;
  color: #111827;
  font-size: 1.15rem;
  line-height: 1.1;
}

.calendar-status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.favorites-link,
.share-calendar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #fff;
  color: #111827;
  text-decoration: none;
  font-weight: 800;
}

.favorites-link:hover,
.share-calendar:hover {
  border-color: var(--accent);
  color: color-mix(in srgb, var(--accent) 76%, #111827);
}

.calendar-updated {
  grid-column: 1 / -1;
  margin: -4px 0 0;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
}

/* =========================
   NUEVAS
========================= */

.calendar-new {
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, #fff);
  border-left: 5px solid var(--accent);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 9%, #fff);
  box-shadow: var(--shadow);
}

.calendar-new h2 {
  margin: 0 0 10px;
  font-size: 1rem;
  color: color-mix(in srgb, var(--accent) 76%, #111827);
}

.calendar-new-list {
  display: grid;
  gap: 8px;
}

.calendar-new-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,.7);
  text-decoration: none;
}

.calendar-new-item:hover {
  background: #fff;
}

.new-label {
  padding: .25rem .5rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: .68rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.new-name {
  font-weight: 900;
}

.calendar-new time {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
}

/* =========================
   BUSCADOR + CHIPS
========================= */

.calendar-search {
  margin-bottom: 20px;
  padding: 16px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.search-box {
  display: flex;
  gap: 10px;
}

.search-box input {
  flex: 1;
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid #d1d5db;
  border-radius: 14px;
  font-weight: 700;
}

.search-box input:focus {
  outline: 3px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-color: var(--accent);
}

.search-clear {
  padding: 10px 14px;
  border: 0;
  border-radius: 14px;
  background: #111827;
  color: #fff;
  font-weight: 900;
}

.quick-filters {
  display: flex;
  gap: 8px;
  margin-top: 11px;
  overflow: hidden;
  white-space: nowrap;
}

.quick-filter {
  flex: 0 0 auto;
  padding: 7px 11px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #fff;
  color: #374151;
  font-size: .78rem;
  font-weight: 900;
}

.quick-filter.is-active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, #fff);
  color: color-mix(in srgb, var(--accent) 76%, #111827);
}

.search-results {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: .88rem;
  font-weight: 700;
}

/* =========================
   AÑOS Y MESES
========================= */

.calendar-content {
  display: grid;
  gap: 18px;
}

.year-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: center;
  margin: 18px 0 0;
}

.year-divider::before,
.year-divider::after {
  content: "";
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--accent));
  opacity: .45;
}

.year-divider::after {
  background: linear-gradient(90deg, var(--accent), transparent);
}

.year-divider span {
  padding: 8px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow);
  font-size: 1.3rem;
  font-weight: 900;
}

.month-block {
  display: grid;
  gap: 14px;
  scroll-margin-top: 24px;
}

.month-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px;
}

.month-header h2 {
  margin: 0;
  font-size: 1.45rem;
}

.month-count {
  min-width: 2rem;
  height: 2rem;
  padding: 0 .55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-size: .82rem;
  font-weight: 900;
}

.month-days {
  display: grid;
  gap: 14px;
}

/* =========================
   BLOQUES DE DÍA
========================= */

.day-block {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 12px;
  align-items: stretch;
}

.day-header {
  align-self: stretch;
  position: relative;
  min-height: 96px;
  padding: 0;
  text-align: center;
  color: #fff;
  border-radius: var(--radius);
  background: var(--accent);
  box-shadow: var(--shadow);
}

.day-header-sticky {
  position: sticky;
  top: 76px;
  min-height: 96px;
  padding: 12px 8px;
  margin-bottom: var(--day-date-stop-offset, 0px);
  display: grid;
  place-content: center;
}

.day-block-single .day-header-sticky {
  position: static;
  margin-bottom: 0;
}

.day-month {
  display: block;
  font-size: .82rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.day-weekday {
  display: block;
  margin-top: 7px;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1;
  text-transform: lowercase;
}

.day-number {
  display: block;
  margin-top: 6px;
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
}

.day-races {
  display: grid;
  gap: 12px;
}

/* Colores mensuales */
.month-block[data-month="1"] .day-header { background: #0083CB; }
.month-block[data-month="2"] .day-header { background: #01AAAD; }
.month-block[data-month="3"] .day-header { background: #00A652; }
.month-block[data-month="4"] .day-header { background: #8EC63D; }
.month-block[data-month="5"] .day-header { background: #FFE700; color: #111827; }
.month-block[data-month="6"] .day-header { background: #FDB813; color: #111827; }
.month-block[data-month="7"] .day-header { background: #F48222; }
.month-block[data-month="8"] .day-header { background: #F15A21; }
.month-block[data-month="9"] .day-header { background: #EC1D25; }
.month-block[data-month="10"] .day-header { background: #C5168D; }
.month-block[data-month="11"] .day-header { background: #6F2B90; }
.month-block[data-month="12"] .day-header { background: #005BAA; }

/* =========================
   TARJETAS
========================= */

.race-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  scroll-margin-top: 50px;
  transition: background-color .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.race-card.is-open {
  background: #f8fafc;
  border-color: #dbe4f0;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  position: relative;
}

/* Acento mensual de la tarjeta desplegada, recuperado de V2 */
.race-card.is-open::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 4px;
  border-radius: 999px;
}

.month-block[data-month="1"] .race-card.is-open::before { background: #0083CB; }
.month-block[data-month="2"] .race-card.is-open::before { background: #01AAAD; }
.month-block[data-month="3"] .race-card.is-open::before { background: #00A652; }
.month-block[data-month="4"] .race-card.is-open::before { background: #8EC63D; }
.month-block[data-month="5"] .race-card.is-open::before { background: #FFE700; }
.month-block[data-month="6"] .race-card.is-open::before { background: #FDB813; }
.month-block[data-month="7"] .race-card.is-open::before { background: #F48222; }
.month-block[data-month="8"] .race-card.is-open::before { background: #F15A21; }
.month-block[data-month="9"] .race-card.is-open::before { background: #EC1D25; }
.month-block[data-month="10"] .race-card.is-open::before { background: #C5168D; }
.month-block[data-month="11"] .race-card.is-open::before { background: #6F2B90; }
.month-block[data-month="12"] .race-card.is-open::before { background: #005BAA; }

.race-card-toggle {
  width: 100%;
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 14px;
  padding: 12px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.race-card-media {
  width: 86px;
  height: 86px;
  border-radius: 14px;
  overflow: hidden;
  background: #e5e7eb;
}

.race-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.race-card-summary {
  min-width: 0;
}

.race-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 3px;
}

.race-time {
  color: var(--accent);
  font-weight: 900;
}

.race-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.race-title {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
  color: #111827;
}

.race-distances {
  display: flex;
  flex-wrap: wrap;
  gap: .44rem;
  margin-top: .36rem;
}

.race-distance {
  position: relative;
  padding-left: .78rem;
  color: #4b5563;
  font-size: .78rem;
  font-weight: 700;
}

.race-distance::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: .48rem;
  height: .48rem;
  border-radius: 999px;
  background: #6b7280;
  transform: translateY(-50%);
}

.race-distance:nth-child(2)::before { background: #22c55e; }
.race-distance:nth-child(3)::before { background: #3b82f6; }
.race-distance:nth-child(4)::before { background: #f97316; }
.race-distance:nth-child(5)::before { background: #a855f7; }

/* En el calendario compacto solo se muestran las tres primeras distancias. */
.race-distance:nth-child(n + 4) {
  display: none;
}

.race-editorial-badge {
  display: block;
  margin-top: .7rem;
}

.race-card-detail {
  padding: 0 14px 16px 112px;
}

.race-card-detail[hidden] {
  display: none;
}

.race-detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin: .55rem 0 .9rem;
}

.race-detail-list {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
}

.race-detail-list > div {
  display: grid;
  grid-template-columns: minmax(105px, auto) 1fr;
  gap: 10px;
}

.race-detail-list dt {
  font-weight: 700;
  color: #111827;
}

.race-detail-list dd {
  margin: 0;
}

.race-details-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
}

/* =========================
   BADGES
========================= */

.race-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .65rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1;
  background: #f1f1f1;
  color: #222;
}

/* Editoriales */
.race-badge-patrocinada { background: #fff1d6; color: #8a4b00; }
.race-badge-recomendada { background: #e8f3ff; color: #064d8c; }
.race-badge-destacada { background: #ffe3e3; color: #a31313; }
.race-badge-gratuita { background: #dcfce7; color: #166534; }

/* Características */
.race-badge-premiacion { background: #fff7cc; color: #765800; }
.race-badge-conCausa { background: #fce7f3; color: #9d174d; }
.race-badge-soloMujeres { background: #ffe4f1; color: #a61e5c; }
.race-badge-equipos { background: #dbeafe; color: #1e40af; }
.race-badge-nocturna { background: #1f2544; color: #dbe4ff; }
.race-badge-serial { background: #ede9fe; color: #6d28d9; }
.race-badge-petFriendly { background: #f0e8ff; color: #553098; }
.race-badge-infantiles { background: #ecfdf3; color: #16713b; }

/* Tipo */
.race-badge-trail { background: #e8f5e9; color: #2e7d32; }
.race-badge-ruta { background: #e0f2fe; color: #075985; }
.race-badge-campo { background: #ecfccb; color: #3f6212; }
.race-badge-resistencia { background: #f3f4f6; color: #374151; }
.race-badge-pista { background: #ede9fe; color: #5b21b6; }
.race-badge-ocr { background: #fee2e2; color: #991b1b; }

/* =========================
   ESTADOS
========================= */

.race-state-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  font-size: 1rem;
  line-height: 1;
}

.race-state-label {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin: 0 0 .75rem;
  padding: .42rem .7rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 900;
}

.race-state-agotada {
  background: #fee2e2;
  color: #991b1b;
}

.race-state-proximamente {
  background: #e0f2fe;
  color: #075985;
}

.race-state-cancelada {
  background: #fecaca;
  color: #7f1d1d;
}

.race-state-reprogramada {
  background: #fef3c7;
  color: #92400e;
}

.race-state-finalizada {
  background: #e5e7eb;
  color: #374151;
}

.race-state-icon.race-state-agotada,
.race-state-icon.race-state-proximamente,
.race-state-icon.race-state-cancelada,
.race-state-icon.race-state-reprogramada,
.race-state-icon.race-state-finalizada {
  background: transparent;
  padding: 0;
}

/* =========================
   FAVORITOS EN TARJETA
========================= */

.favorite-slot {
  display: inline-flex;
}

.favorite-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  min-width: 34px;
  padding: .45rem .6rem;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #fff;
  color: #374151;
  font-size: .82rem;
  font-weight: 800;
}

.favorite-button:hover {
  border-color: var(--fav-accent);
  color: var(--fav-accent);
}

.favorite-button.is-favorite {
  background: var(--fav-accent);
  border-color: var(--fav-accent);
  color: #fff;
}

/* =========================
   SEO / FOOTER
========================= */

.calendar-seo-content {
  margin-top: 26px;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.7;
}

.site-footer {
  padding: 20px 0 40px;
  color: var(--muted);
  font-size: .9rem;
  text-align: center;
}

.site-footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 12px;
}

.footer-links a {
  text-decoration: none;
  font-weight: 700;
}

/* =========================
   FOCUS
========================= */

.menu-toggle:focus-visible,
.menu-close:focus-visible,
.race-card-toggle:focus-visible,
.quick-filter:focus-visible,
.share-calendar:focus-visible,
.search-clear:focus-visible,
.race-details-link:focus-visible,
.favorites-link:focus-visible,
.month-nav a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent);
  outline-offset: 3px;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 760px) {
  .calendar-status {
    grid-template-columns: 1fr;
  }

  .calendar-status-actions {
    justify-content: flex-start;
  }

  .calendar-new-item {
    grid-template-columns: auto 1fr;
  }

  .calendar-new time {
    grid-column: 2;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding-top: 70px;
  }

  .header-layout {
    align-items: flex-start;
  }

  .site-logo {
    width: 62px;
  }

  .calendar-layout {
    padding-top: 18px;
  }

  .calendar-status {
    padding: 14px;
  }

  .calendar-status-stats {
    gap: 12px 16px;
  }

  .calendar-status-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .favorites-link,
  .share-calendar {
    width: 100%;
  }

  .day-block {
    grid-template-columns: 70px 1fr;
  }

  .day-header {
    min-height: 88px;
  }

  .day-header-sticky {
    min-height: 88px;
    padding: 10px 7px;
  }

  .day-number {
    font-size: 1.75rem;
  }

  .race-card-toggle {
    grid-template-columns: 76px 1fr;
    gap: 12px;
  }

  .race-card-media {
    width: 76px;
    height: 76px;
  }

  .race-card-detail {
    padding: 0 14px 16px;
  }

  .race-detail-list > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .race-card-topline {
    align-items: flex-start;
  }

 .race-title {
    font-size: 1rem;
  }
}

@media (max-width: 520px) {
  .container {
    width: min(100% - 20px, 980px);
  }

  .calendar-status-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .calendar-status-stats span {
    font-size: .7rem;
  }

  .calendar-status-stats strong {
    font-size: 1rem;
  }

  .search-box {
    flex-direction: column;
  }

  .calendar-status-actions {
    grid-template-columns: 1fr;
  }

  .year-divider {
    gap: 8px;
  }

  .year-divider span {
    padding: 7px 12px;
    font-size: 1.15rem;
  }

  .day-block {
    grid-template-columns: 64px 1fr;
    gap: 9px;
  }

  .race-card-toggle {
    grid-template-columns: 72px 1fr;
    gap: 10px;
    padding: 10px;
  }

  .race-card-media {
    width: 72px;
    height: 72px;
  }

  .race-card-actions {
    gap: 4px;
  }

  .favorite-button {
    min-width: 30px;
    min-height: 30px;
    padding: .35rem .45rem;
  }

  .quick-filter {
    padding: 6px 10px;
  }

  .calendar-new-item {
    padding: 8px;
  }
}
