/* V273: use the SAME numbered Chess Problem 1 artwork and generic board/grid structure.
   The 20 under-frame medallions keep their own solutions and reward logic.
   All old medallion layout layers have been disconnected at the template level. */
body[data-room-id="1"] #medallionModal.puzzle-modal { z-index:49000!important; }
body[data-room-id="1"] #medallionModal .medallion-rebuilt-card{
  position:relative!important;
  width:min(96vw,calc(94dvh * 1312 / 1199))!important;
  max-width:96vw!important;
  max-height:94dvh!important;
  aspect-ratio:1312 / 1199!important;
  padding:0!important;margin:0!important;border:0!important;
  overflow:visible!important;
  background:transparent url('vintage-puzzle-panel-v63.png?v=273.0.0') center/100% 100% no-repeat!important;
  box-shadow:none!important;
}
/* Hide the printed title/instructions of Chess Problem 1 with a parchment patch.
   The replacement text shows correct Mate in 3/4 heading and reward. */
body[data-room-id="1"] #medallionModal .medallion-rebuilt-card .medallion-rebuilt-header{
  position:absolute!important;left:26%!important;top:9.5%!important;width:48%!important;
  height:15.3%!important;z-index:12!important;text-align:center!important;
  background:radial-gradient(ellipse 70% 85% at 50% 43%,#e9bd77 10%,#eac589 50%,rgba(231,182,111,.03) 94%)!important;
  pointer-events:none!important;
}
body[data-room-id="1"] #medallionModal .medallion-rebuilt-header h2{
  position:relative!important;display:block!important;margin:0!important;padding:4.0% 0 0!important;
  font:italic 700 clamp(16px,2.0vw,29px)/1 Georgia,serif!important;
  color:#211208!important;text-align:center!important;
}
body[data-room-id="1"] #medallionModal .medallion-rebuilt-header p{
  position:relative!important;margin:4px 0 0!important;padding:0!important;
  font:700 clamp(9px,.95vw,13px)/1.1 Georgia,serif!important;
  color:#271509!important;text-align:center!important;
}
body[data-room-id="1"] #medallionModal .medallion-rebuilt-header #medallionReward{font-style:italic!important;margin-top:8px!important;}
/* Identical board geometry used by the numbered Chess Problem popup. */
body[data-room-id="1"] #medallionModal .medallion-rebuilt-card .exact-shell-board{
  position:absolute!important;left:24.18%!important;top:26.94%!important;width:52.55%!important;
  aspect-ratio:1/1!important;height:auto!important;display:block!important;
  margin:0!important;padding:0!important;border:0!important;overflow:visible!important;
  background:transparent!important;box-shadow:none!important;transform:none!important;z-index:10!important;
}
body[data-room-id="1"] #medallionModal .medallion-rebuilt-card #medallionBoard{
  position:relative!important;inset:auto!important;display:grid!important;
  grid-template-columns:repeat(8,minmax(0,1fr))!important;
  grid-template-rows:repeat(8,minmax(0,1fr))!important;
  width:100%!important;height:auto!important;aspect-ratio:1/1!important;
  gap:0!important;margin:0!important;padding:0!important;border:0!important;
  background:transparent!important;box-shadow:none!important;overflow:visible!important;
}
body[data-room-id="1"] #medallionModal .medallion-rebuilt-card #medallionBoard .puzzle-square{
  position:relative!important;display:grid!important;place-items:center!important;
  min-width:0!important;min-height:0!important;padding:0!important;margin:0!important;border:0!important;
  box-sizing:border-box!important;transform:none!important;overflow:visible!important;
  background:transparent!important;box-shadow:none!important;
}
body[data-room-id="1"] #medallionModal .medallion-rebuilt-card #medallionBoard .puzzle-square.light,
body[data-room-id="1"] #medallionModal .medallion-rebuilt-card #medallionBoard .puzzle-square.dark{background:transparent!important;}
/* Exact numbered-problem chess-piece sprite rendering, with no legacy centering overrides. */
body[data-room-id="1"] #medallionModal .medallion-rebuilt-card #medallionBoard .puzzle-piece{
  position:absolute!important;inset:auto!important;left:50%!important;top:50%!important;
  width:112%!important;height:112%!important;transform:translate(-50%,-50%)!important;
  margin:0!important;padding:0!important;border:0!important;box-sizing:border-box!important;
  display:block!important;background-image:url('chess-problem-pieces-v186.webp?v=273.0.0')!important;
  background-repeat:no-repeat!important;background-size:300% 100%!important;
  font-size:0!important;color:transparent!important;text-shadow:none!important;
  filter:drop-shadow(0 2px 1px rgba(0,0,0,.38))!important;pointer-events:none!important;
}
body[data-room-id="1"] #medallionModal .medallion-rebuilt-card #medallionBoard .piece-wk{background-position:0% 50%!important;}
body[data-room-id="1"] #medallionModal .medallion-rebuilt-card #medallionBoard .piece-wq{background-position:50% 50%!important;}
body[data-room-id="1"] #medallionModal .medallion-rebuilt-card #medallionBoard .piece-bk{background-position:100% 50%!important;}
body[data-room-id="1"] #medallionModal .medallion-rebuilt-card .board-files{display:none!important;}
body[data-room-id="1"] #medallionModal .medallion-rebuilt-card #medallionClose{
  position:absolute!important;left:auto!important;right:4%!important;top:5%!important;width:9%!important;height:9%!important;
  margin:0!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;
  border-radius:50%!important;color:transparent!important;font-size:0!important;z-index:40!important;cursor:pointer!important;
}
body[data-room-id="1"] #medallionModal .medallion-rebuilt-footer{
  position:absolute!important;left:0!important;top:0!important;width:100%!important;height:100%!important;
  background:transparent!important;margin:0!important;padding:0!important;border:0!important;
  box-shadow:none!important;pointer-events:none!important;z-index:22!important;
}
body[data-room-id="1"] #medallionModal .medallion-rebuilt-footer #medallionStatus{
  position:absolute!important;left:50%!important;right:auto!important;top:85.7%!important;bottom:auto!important;
  transform:translateX(-50%)!important;width:36%!important;height:auto!important;min-height:0!important;
  padding:2px 5px!important;margin:0!important;display:none!important;
  font:700 clamp(10px,1.05vw,14px)/1 Georgia,serif!important;text-align:center!important;
  color:#2c591b!important;background:rgba(244,221,173,.82)!important;border:0!important;border-radius:4px!important;
  box-shadow:none!important;white-space:nowrap!important;pointer-events:none!important;
}
body[data-room-id="1"] #medallionModal .medallion-rebuilt-footer #medallionStatus.solved{display:block!important;}
body[data-room-id="1"] #medallionModal .medallion-rebuilt-footer #medallionReset{
  position:absolute!important;left:38.7%!important;top:88.6%!important;width:22.6%!important;height:7%!important;
  margin:0!important;padding:0!important;border:0!important;box-shadow:none!important;
  background:transparent!important;color:transparent!important;font-size:0!important;
  pointer-events:auto!important;cursor:pointer!important;
}
@media(max-width:700px){
 body[data-room-id="1"] #medallionModal .medallion-rebuilt-card #medallionBoard .puzzle-piece{width:108%!important;height:108%!important;}
 body[data-room-id="1"] #medallionModal .medallion-rebuilt-header h2{font-size:clamp(13px,3vw,22px)!important;}
 body[data-room-id="1"] #medallionModal .medallion-rebuilt-header p{font-size:clamp(7px,1.5vw,11px)!important;}
}
