.chesswood-wrap{
  max-width: 720px;
  margin: 20px auto;
  background: #5a3b1e;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(0,0,0,.4);
  padding: 16px;
  color: #f7e7c6;
  font-family: Georgia, 'Times New Roman', serif;
  border: 6px solid #3b2714;
}
.chesswood-title{
  text-align: center;
  margin: 6px 0 10px;
  font-weight: 700;
  letter-spacing: .5px;
}
.chesswood-toolbar{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  margin-bottom:10px;
}
.chesswood-toolbar label{
  display:flex;
  gap:6px;
  align-items:center;
  background: rgba(0,0,0,.15);
  padding:6px 10px;
  border-radius:10px;
}
.chesswood-board{
  position: relative !important;
  width: 560px;
  height: 560px;
  margin: 0 auto;
  border-radius: 10px;
  overflow: hidden;
  border: 6px solid #2b1b0e;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.06);
}
.white-1e1d7 { background: #e6c49a; }
.black-3c85d { background: #8b5e34; }
.chesswood-controls{ text-align:center; margin-top: 12px; position: relative; }
.chesswood-btn{
  background: #d1b287;
  color: #2b1b0e;
  border: none;
  padding: 8px 20px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
}
.chesswood-btn:hover{ filter: brightness(1.05); }
.chesswood-status{ margin-top: 10px; font-weight: 700; }

/* Endgame banner */
.chesswood-banner{
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: -12px;
  background: #fff3cd;
  color: #522;
  padding: 10px 16px;
  border-radius: 10px;
  border: 2px solid rgba(0,0,0,.15);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  font-weight: 800;
  letter-spacing: .5px;
  z-index: 5;
}
.chesswood-banner.show{ display:block; }

.chesswood-clocks{
  display:flex;
  justify-content:space-between;
  margin: 6px 8px 10px;
  font-weight: 700;
}

/* Hints & selection */
.chesswood-hint{ position: relative; }
.chesswood-hint::after{
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 34%;
  height: 34%;
  border-radius: 50%;
  background: rgba(255,255,255,0.65);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.35);
}
.chesswood-selected{ outline: 3px solid rgba(255,255,255,0.7); outline-offset: -3px; }

@media (max-width:760px){
  .chesswood-board{
  position: relative !important; width: 92vw; height: 92vw; }
  .chesswood-clocks{ flex-direction: column; gap: 6px; text-align: center; }
}


/* Centered checkmate overlay on the board itself */
.chesswood-overlay{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.55);
  z-index: 9999;
  pointer-events: auto;
}
.chesswood-overlay .chesswood-overlay-text{
  background: rgba(255,255,255,0.95);
  color: #2b1b0e;
  padding: 14px 18px;
  border-radius: 12px;
  border: 2px solid rgba(0,0,0,0.15);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: .4px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.35);
}

/* Overlay shape modifiers */
.chesswood-overlay .chesswood-overlay-text.is-rounded{ border-radius: 12px; }
.chesswood-overlay .chesswood-overlay-text.is-square{ border-radius: 0px; }
