/* Календарь игровых слотов клуба */
.cal { max-width: 1380px; }
.cal-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: var(--space-4); margin-bottom: var(--space-4); }
.cal-head h1 { margin: 0 0 var(--space-1); }
.cal-head p { margin: 0; }
.cal-head__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.cal-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-3); padding: var(--space-3) 0; border-bottom: 1px solid var(--frame-line); }
.cal-nav { display: flex; align-items: center; gap: var(--space-3); }
.cal-nav h2 { margin: 0; min-width: 9em; text-align: center; font-size: 1.4rem; }
.icon-link { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--ink-600); color: var(--text); text-decoration: none; font-size: 1.3rem; }
.icon-link:hover { border-color: var(--wine-bright); color: var(--bone-50); background: rgba(167, 102, 106, .14); }
.cal-today { font-size: var(--fs-sm); }
.cal-filter { display: inline-flex; border: 1px solid var(--ink-600); border-radius: 99px; overflow: hidden; }
.cal-filter a { padding: .4em .9em; font-size: var(--fs-xs); font-weight: 700; color: var(--text-muted); text-decoration: none; }
.cal-filter a + a { border-left: 1px solid var(--ink-600); }
.cal-filter a.is-active { color: var(--bone-50); background: var(--wine); }

.cal-legend { display: flex; flex-wrap: wrap; gap: var(--space-4); margin: var(--space-3) 0; color: var(--text-muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--ink-600); }
.lg--free { border-style: dashed; }
.lg--game { background: var(--wine); border-color: var(--wine-bright); }
.lg--event { background: #2c4f86; border-color: var(--arcane); }
.lg--closed { background: var(--ink-600); }
.lg--tech { background: #3d5560; border-color: var(--steel); }

.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-wd { padding: 4px 8px; font: 700 .72rem/1 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.cal-day {
  display: grid; align-content: start; gap: 4px; min-height: 150px; padding: 6px; border-radius: var(--radius-sm);
  background: linear-gradient(170deg, rgba(35, 53, 67, .85), rgba(27, 36, 55, .92)); border: 1px solid rgba(236, 233, 221, .08);
}
.cal-day.is-other { opacity: .45; }
.cal-day.is-past { filter: saturate(.6); }
.cal-day.is-today { border-color: var(--wine-bright); box-shadow: 0 0 0 1px var(--wine-bright) inset; }
.cal-day__head { display: flex; align-items: baseline; gap: 6px; padding: 0 2px 2px; }
.cal-day__head b { font: 700 1.15rem/1 var(--font-heading); color: var(--bone-50); }
.cal-day__head span { font-size: .7rem; color: var(--text-faint); text-transform: uppercase; }
.cal-day__month { display: none; }
.cal-day.is-today .cal-day__head b { color: var(--rose-light); }

.slot {
  position: relative; display: grid; gap: 1px; padding: 5px 7px; border-radius: 4px; text-decoration: none; color: var(--text);
  font-size: .78rem; line-height: 1.3; border: 1px solid transparent; min-width: 0;
}
.slot__time { font-size: .64rem; letter-spacing: .03em; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot__title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot__meta { font-size: .68rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot--free { border: 1px dashed var(--ink-600); color: var(--text-faint); }
.slot--free .slot__title { font-weight: 400; }
details.slot--free summary { list-style: none; cursor: pointer; display: grid; gap: 1px; }
details.slot--free summary::-webkit-details-marker { display: none; }
details.slot--free:hover, details.slot--free[open] { border-color: var(--steel-dim); color: var(--text); }
details.slot--free:hover .slot__title { color: var(--steel-bright); }
.slot__menu { display: grid; gap: 2px; margin-top: 4px; }
.slot__menu a { padding: 4px 6px; border-radius: 3px; font-size: .74rem; font-weight: 700; background: rgba(11, 15, 28, .6); text-decoration: none; }
.slot__menu a:hover { background: var(--wine); color: var(--bone-50); }
.slot--game { background: rgba(143, 65, 72, .38); border-color: rgba(167, 102, 106, .6); }
.slot--game:hover { background: rgba(143, 65, 72, .6); color: var(--bone-50); }
.slot--event { background: rgba(44, 79, 134, .4); border-color: rgba(134, 162, 212, .55); }
.slot--closed { background: rgba(52, 72, 90, .55); border-color: var(--ink-600); color: var(--text-muted); }
.slot--tech { background: rgba(61, 85, 96, .55); border-color: rgba(164, 191, 195, .55); }
a.slot--event:hover, a.slot--closed:hover, a.slot--tech:hover { filter: brightness(1.2); }
.slot.is-hidden { visibility: hidden; }
.cal-ics { margin-top: var(--space-5); }

/* Телефон и узкие экраны: список дней вместо сетки */
@media (max-width: 900px) {
  .cal-grid { grid-template-columns: 1fr; gap: var(--space-2); }
  .cal-wd { display: none; }
  .cal-day { min-height: 0; grid-template-columns: 70px repeat(2, minmax(0, 1fr)); align-items: stretch; }
  .cal-day.is-other { display: none; }
  .cal-day__head { flex-direction: column; align-items: flex-start; gap: 2px; }
  .cal-day__month { display: inline; }
  .slot.is-hidden { visibility: visible; opacity: .35; }
}
@media (max-width: 520px) {
  .cal-day { grid-template-columns: 1fr; }
  .cal-day__head { flex-direction: row; align-items: baseline; }
  .cal-day.is-past { display: none; }
}
/* анонс на проверке: посторонним — просто занятый слот */
.slot--draft { background: rgba(52, 72, 90, .35); border-style: dashed; border-color: var(--steel-dim); color: var(--text-muted); }
.slot--draft .slot__title { color: var(--text-muted); }

.slot--online { background: rgba(127, 174, 143, .16); border-color: rgba(127, 174, 143, .5); border-style: dashed; }
a.slot--online:hover { filter: brightness(1.2); }

/* своё время: небольшой баннер поверх верха ячейки дня; задетые слоты — «Занято» */
.cal-banner {
  display: flex; align-items: baseline; gap: 6px; min-width: 0; margin: -2px -2px 0; padding: 3px 7px; border-radius: 99px;
  font-size: .7rem; line-height: 1.25; text-decoration: none; color: var(--bone-50);
  background: linear-gradient(90deg, rgba(167, 102, 106, .85), rgba(143, 65, 72, .75)); box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}
.cal-banner b { flex: none; font-weight: 700; }
.cal-banner span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-banner--event { background: linear-gradient(90deg, rgba(64, 104, 168, .9), rgba(44, 79, 134, .8)); }
.cal-banner--tech { background: linear-gradient(90deg, rgba(110, 120, 135, .9), rgba(80, 90, 105, .8)); }
.cal-banner:hover { filter: brightness(1.15); color: var(--bone-50); }
.slot--blocked { border: 1px dashed rgba(167, 102, 106, .5); color: var(--text-faint); background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(167, 102, 106, .08) 6px 12px); }
.slot--blocked .slot__title { font-weight: 400; }
