/* ===========================
   Chessboard (Шахматка)
   =========================== */

.chess-page{
  padding: 28px 0 46px;
}

.chess-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  margin: 6px 0 18px;
}

.chess-title{
  margin:0;
  font-family: Montserrat, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight:600;
  color:#303442;
  font-size: 28px;
  line-height: 1.15;
}

.chess-note{
  margin:0;
  color:#6b7280;
  font-size: 14px;
}

/* Sections layout: 3 per row on desktop, adaptive */
.chess-sections{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.chess-section{
  background:#fff;
  border-radius: 16px;
  box-shadow: 0 20px 28px rgba(117,117,117,.18);
  padding: 18px;
  margin-bottom: 0;
  overflow-x: auto;
}

.chess-section__title{
  margin:0 0 12px;
  font-family: Montserrat, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight:600;
  color:#303442;
  font-size: 20px;
}

.chess-house-title{
  margin: 32px 0 16px;
  font-family: 'Mulish', sans-serif;
  font-weight: 300;
  font-size: 32px;
  color: #C3B29E;
}

.chess-house-title:first-child{
  margin-top: 0;
}

.chess-table{
  width: max-content;
  border-collapse: separate;
  border-spacing: 8px 8px;
}

.chess-floor{
  text-align:right;
  vertical-align: middle;
  color:#6b7280;
  font-weight: 600;
  padding-right: 6px;
  white-space: nowrap;
}

.chess-cell{
  width: 44px;
  height: 44px;
  background: #fff;
  border: 1px solid #d9dbe1;
  border-radius: 10px;
  text-align: center;
  vertical-align: middle;
  font-family: Montserrat, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 600;
  color:#303442;
  user-select: none;
}

.chess-cell a,
.chess-cell span{
  width: 100%;
  height: 100%;
  display:flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  color: inherit;
  border-radius: 9px;
}

.chess-cell a{
  cursor: pointer;
}

.chess-cell a:hover{
  filter: brightness(.98);
}

.chess-cell.is-unavailable{
  opacity: .35;
}

/* Highlight the currently viewed flat (embedded chessboard on flat page) */
.chess-cell.is-current{
  opacity: 1;
  border: 2px solid #F9B250;
  box-shadow: 0 0 0 3px rgba(249,178,80,.22);
}

.chess-cell.is-current a,
.chess-cell.is-current span{
  background: rgba(249,178,80,.12);
}

.chess-cell.is-empty{
  background: transparent;
  border: 1px dashed rgba(217,219,225,.8);
  opacity: .25;
}

.chess-cell.is-empty span{
  color: transparent;
}

/* Small screens */
@media (max-width: 1199.98px){
  .chess-sections{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767.98px){
  .chess-sections{ grid-template-columns: 1fr; }
}

@media (max-width: 991.98px){
  .chess-cell{ width: 40px; height: 40px; border-radius: 10px; }
}
