/* v244 — new gold medallion challenge set; Room 1 only. */
body[data-room-id="1"] .medallion-hit{position:absolute!important;left:var(--mx)!important;top:var(--my)!important;transform:translate(-50%,-50%)!important;width:2.25%!important;height:3.5%!important;border:0!important;background:transparent!important;padding:0!important;min-height:0!important;min-width:0!important;box-shadow:none!important;border-radius:50%!important;z-index:260!important;cursor:pointer!important;touch-action:manipulation!important}
body[data-room-id="1"] .medallion-hit:focus-visible{outline:2px solid #ffdb72!important;outline-offset:2px!important}
body[data-room-id="1"] .medallion-modal{z-index:54000!important;display:grid!important;place-items:center!important;inset:0!important;background:transparent!important}
body[data-room-id="1"] .medallion-modal.hidden{display:none!important}
body[data-room-id="1"] .medallion-modal .puzzle-backdrop{position:absolute!important;inset:0!important;background:rgba(14,7,2,.35)!important}
body[data-room-id="1"] .medallion-card{position:relative!important;width:min(96vw, calc(96dvh * 1.77))!important;aspect-ratio:1672/941!important;max-height:96dvh!important;overflow:visible!important;z-index:2!important}
body[data-room-id="1"] .medallion-card .medallion-title{position:absolute!important;top:5.6%!important;left:23%!important;width:54%!important;margin:0!important;text-align:center!important;font:700 clamp(19px,3.1vw,38px) Georgia,serif!important;color:#2e1606!important;z-index:8!important}
body[data-room-id="1"] .medallion-card .medallion-instructions{position:absolute!important;top:15.2%!important;left:18%!important;width:64%!important;margin:0!important;text-align:center!important;font:700 clamp(9px,1.28vw,18px) Georgia,serif!important;z-index:8!important;color:#3b2108!important}
body[data-room-id="1"] .medallion-card .medallion-reward{position:absolute!important;top:19.9%!important;left:31%!important;width:38%!important;text-align:center!important;font:700 clamp(9px,1.18vw,16px) Georgia,serif!important;margin:0!important;color:#3b2108!important;z-index:8!important}
body[data-room-id="1"] .medallion-card .medallion-board-shell{z-index:10!important}
body[data-room-id="1"] .medallion-status{position:absolute!important;left:21%!important;width:58%!important;bottom:12.9%!important;font:700 clamp(10px,1.24vw,17px) Georgia,serif!important;text-align:center!important;color:#3b2108!important;z-index:11!important;text-shadow:0 1px 0 #ffe8ab!important}
body[data-room-id="1"] .medallion-status.wrong{color:#8d2118!important}
body[data-room-id="1"] .medallion-status.solved{color:#1e6025!important}
body[data-room-id="1"] .medallion-reset{position:absolute!important;bottom:6.8%!important;left:41%!important;width:18%!important;z-index:12!important;background:linear-gradient(#a16b27,#4b260e)!important;color:#ffdc74!important;font:700 clamp(12px,1.5vw,19px) Georgia,serif!important;border:2px solid #b17c36!important;cursor:pointer!important;border-radius:6px!important}
body[data-room-id="1"] .medallion-card .puzzle-square{touch-action:manipulation!important}
@media(max-width:700px){body[data-room-id="1"] .medallion-card .medallion-title{font-size:clamp(17px,4.5vw,25px)!important}body[data-room-id="1"] .medallion-card .medallion-instructions{font-size:clamp(8px,1.8vw,12px)!important}body[data-room-id="1"] .medallion-card .medallion-reward{font-size:clamp(8px,1.7vw,11px)!important}}

/* V245 — A dedicated layout on top of the existing antique frame.
   The background picture has Chess Problem 1 and sample pieces baked into it.
   We hide ONLY those printed elements under opaque parchment and the LIVE board. */
body[data-room-id="1"] .medallion-modal .medallion-card{
  position:relative!important;
  width:min(96vw,calc(95dvh * 1312 / 1199))!important;
  height:auto!important;
  aspect-ratio:1312 / 1199!important;
  max-width:96vw!important;
  max-height:95dvh!important;
  overflow:hidden!important;
  padding:0!important;
  margin:0!important;
  background:transparent url('vintage-puzzle-panel-v63.png?v=63.0.0') center/100% 100% no-repeat!important;
}
body[data-room-id="1"] .medallion-card .medallion-parchment-mask{
  position:absolute!important;
  z-index:5!important;
  left:24.4%!important;
  top:5.4%!important;
  width:51.2%!important;
  height:18.8%!important;
  border-radius:12px!important;
  background:linear-gradient(180deg,#edca8d 0%,#e8c48a 45%,#e5bd7d 100%)!important;
  box-shadow:0 0 13px 10px rgba(229,190,126,.98)!important;
  pointer-events:none!important;
}
body[data-room-id="1"] .medallion-card .medallion-title{
  z-index:8!important;
  top:8.3%!important;
  left:27%!important;
  width:46%!important;
  font:700 clamp(18px,2.25vw,32px)/1.05 Georgia,serif!important;
  margin:0!important;
  color:#2e1606!important;
}
body[data-room-id="1"] .medallion-card .medallion-instructions{
  z-index:8!important;
  top:13.3%!important;
  left:25%!important;
  width:50%!important;
  font:700 clamp(10px,1.18vw,15px)/1.18 Georgia,serif!important;
  margin:0!important;
  color:#382008!important;
}
body[data-room-id="1"] .medallion-card .medallion-reward{
  z-index:8!important;
  top:18.15%!important;
  left:30%!important;
  width:40%!important;
  font:700 clamp(10px,1.15vw,15px)/1.1 Georgia,serif!important;
  margin:0!important;
}
body[data-room-id="1"] .medallion-card .medallion-board-shell{
  position:absolute!important;
  z-index:12!important;
  left:24.18%!important;
  top:26.94%!important;
  width:52.55%!important;
  height:auto!important;
  aspect-ratio:1!important;
  border:0!important;
  background:#7d4d28!important;
  margin:0!important;
  padding:0!important;
  box-shadow:0 0 0 3px #42250e!important;
}
body[data-room-id="1"] .medallion-card #medallionBoard{
  position:relative!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;
  aspect-ratio:1!important;
  height:auto!important;
  padding:0!important;
  margin:0!important;
  overflow:hidden!important;
  border:0!important;
  box-shadow:none!important;
  background:#784727!important;
}
body[data-room-id="1"] .medallion-card #medallionBoard .puzzle-square{
  display:grid!important;
  place-items:center!important;
  position:relative!important;
  min-width:0!important;
  min-height:0!important;
  padding:0!important;
  border:0!important;
  box-shadow:none!important;
  overflow:visible!important;
  touch-action:manipulation!important;
}
body[data-room-id="1"] .medallion-card #medallionBoard .puzzle-square.light{
  background:linear-gradient(135deg,#edc58b,#d9a968)!important;
}
body[data-room-id="1"] .medallion-card #medallionBoard .puzzle-square.dark{
  background:linear-gradient(135deg,#80512f,#512c19)!important;
}
body[data-room-id="1"] .medallion-card #medallionBoard .puzzle-piece{
  position:absolute!important;
  left:50%!important;
  top:50%!important;
  transform:translate(-50%,-50%)!important;
  width:110%!important;
  height:110%!important;
  display:block!important;
  background-image:url('chess-problem-pieces-v186.webp?v=186.0.0')!important;
  background-size:300% 100%!important;
  background-repeat:no-repeat!important;
  margin:0!important;
  padding:0!important;
  pointer-events:auto!important;
  z-index:3!important;
  filter:drop-shadow(0 1px 2px #281306)!important;
}
body[data-room-id="1"] .medallion-card #medallionBoard .piece-wk{background-position:0% 50%!important;}
body[data-room-id="1"] .medallion-card #medallionBoard .piece-wq{background-position:50% 50%!important;}
body[data-room-id="1"] .medallion-card #medallionBoard .piece-bk{background-position:100% 50%!important;}
body[data-room-id="1"] .medallion-card .medallion-board-shell .board-files{display:none!important;}
body[data-room-id="1"] .medallion-card .medallion-status{
  z-index:17!important;
  position:absolute!important;
  left:24%!important;
  width:52%!important;
  top:81.9%!important;
  bottom:auto!important;
  margin:0!important;
  padding:0!important;
  color:#382006!important;
  background:transparent!important;
  text-shadow:0 1px #f8dfac!important;
  font:700 clamp(10px,1.12vw,15px)/1.1 Georgia,serif!important;
  text-align:center!important;
  white-space:nowrap!important;
}
body[data-room-id="1"] .medallion-card .medallion-reset{
  z-index:17!important;
  position:absolute!important;
  left:38.8%!important;
  top:87.25%!important;
  bottom:auto!important;
  width:22.4%!important;
  height:6.25%!important;
  border:0!important;
  border-radius:4px!important;
  padding:0!important;
  margin:0!important;
  background:linear-gradient(#71401e,#301808)!important;
  color:#f4cc77!important;
  box-shadow:inset 0 0 0 2px #b57735!important;
  font:700 clamp(11px,1.35vw,18px)/1 Georgia,serif!important;
}
body[data-room-id="1"] .medallion-card #medallionClose{
  z-index:25!important;
  position:absolute!important;
  right:2.6%!important;
  top:2.4%!important;
  width:7.3%!important;
  height:auto!important;
  aspect-ratio:1!important;
  border:0!important;
  padding:0!important;
  background:transparent!important;
  box-shadow:none!important;
  color:transparent!important;
  font-size:0!important;
}
@media(max-width:700px){
 body[data-room-id="1"] .medallion-card .medallion-title{font-size:clamp(14px,3.5vw,24px)!important;}
 body[data-room-id="1"] .medallion-card .medallion-instructions{font-size:clamp(7px,2vw,11px)!important;}
 body[data-room-id="1"] .medallion-card .medallion-reward{font-size:clamp(8px,1.9vw,11px)!important;}
 body[data-room-id="1"] .medallion-card .medallion-status{font-size:clamp(7px,1.9vw,11px)!important;}
}


/* V246: restore the EXACT vintage V63 art for the 20 medallion puzzles.
   Only its preprinted heading ink is cleaned, to let Mate in 3/4 replace it.
   Board squares, coordinates, carved frame and Reset are painted by vintage art. */
body[data-room-id="1"] .medallion-modal .medallion-card{
 background:transparent url('vintage-medallion-v246.png?v=246.0.0') center/100% 100% no-repeat!important;
 overflow:visible!important;
}
body[data-room-id="1"] .medallion-card .medallion-parchment-mask{display:none!important;}
body[data-room-id="1"] .medallion-card .medallion-title{
 top:10.5%!important;left:30%!important;width:40%!important;
 text-align:center!important;color:#1d0d03!important;
 font:italic 700 clamp(17px,2.7vw,34px)/1.05 Georgia,serif!important;
 text-shadow:none!important;
}
body[data-room-id="1"] .medallion-card .medallion-instructions{
 top:16.2%!important;left:27%!important;width:46%!important;
 color:#251003!important;text-align:center!important;
 font:700 clamp(10px,1.65vw,20px)/1.1 Georgia,serif!important;
}
body[data-room-id="1"] .medallion-card .medallion-reward{
 top:21.3%!important;left:35%!important;width:30%!important;
 color:#251003!important;text-align:center!important;
 font:italic 700 clamp(9px,1.4vw,17px)/1.05 Georgia,serif!important;
}
body[data-room-id="1"] .medallion-card .medallion-board-shell{
 left:23.26%!important;top:26.6%!important;
 width:52.95%!important;height:55.0%!important;
 aspect-ratio:auto!important;
 border:0!important;background:transparent!important;
 box-shadow:none!important;overflow:visible!important;
}
body[data-room-id="1"] .medallion-card #medallionBoard{
 width:100%!important;height:100%!important;aspect-ratio:auto!important;
 background:transparent!important;box-shadow:none!important;
 overflow:visible!important;
}
body[data-room-id="1"] .medallion-card #medallionBoard .puzzle-square,
body[data-room-id="1"] .medallion-card #medallionBoard .puzzle-square.light,
body[data-room-id="1"] .medallion-card #medallionBoard .puzzle-square.dark{
 background:transparent!important;background-image:none!important;
 box-shadow:none!important;border:0!important;outline:0!important;
}
body[data-room-id="1"] .medallion-card #medallionBoard .puzzle-square.selected{
 box-shadow:inset 0 0 0 2px #f7c53e!important;
}
body[data-room-id="1"] .medallion-card #medallionBoard .puzzle-square.legal-target::after{
 content:""!important;position:absolute!important;inset:37%!important;
 border-radius:50%!important;background:rgba(233,180,78,.6)!important;
 pointer-events:none!important;
}
body[data-room-id="1"] .medallion-card #medallionBoard .puzzle-piece{
 width:112%!important;height:112%!important;
}
body[data-room-id="1"] .medallion-card .medallion-status{
 left:25%!important;top:84.0%!important;bottom:auto!important;
 width:50%!important;white-space:nowrap!important;
 background:transparent!important;text-shadow:0 1px #f8dfac!important;
 font:700 clamp(9px,1.05vw,14px)/1 Georgia,serif!important;
}
body[data-room-id="1"] .medallion-card .medallion-reset{
 left:38.7%!important;top:88.05%!important;
 width:22.5%!important;height:7.1%!important;
 margin:0!important;padding:0!important;border:0!important;
 background:transparent!important;background-image:none!important;
 color:transparent!important;font-size:0!important;
 border-radius:0!important;box-shadow:none!important;
 cursor:pointer!important;
}
body[data-room-id="1"] .medallion-card #medallionClose{
 right:4.6%!important;top:5.6%!important;width:9.4%!important;
}
@media(max-width:700px){
 body[data-room-id="1"] .medallion-card .medallion-title{font-size:clamp(13px,3.4vw,20px)!important;}
 body[data-room-id="1"] .medallion-card .medallion-instructions{font-size:clamp(7px,2.0vw,11px)!important;}
 body[data-room-id="1"] .medallion-card .medallion-reward{font-size:clamp(7px,1.8vw,10px)!important;}
 body[data-room-id="1"] .medallion-card .medallion-status{font-size:clamp(7px,1.65vw,11px)!important;}
}
/* Precise grid-to-art registration; live status occupies the parchment strip
   above the board, leaving vintage file letters and Reset completely clear. */
body[data-room-id="1"] .medallion-card .medallion-board-shell{
 left:23.63%!important;top:26.36%!important;width:51.25%!important;height:55.32%!important;
}
body[data-room-id="1"] .medallion-card .medallion-status{
 left:25%!important;top:23.35%!important;width:50%!important;
 color:#30200e!important;z-index:19!important;
}

/* V247: preserve original V63 parchment and board art; separate all live text. */
body[data-room-id="1"] .medallion-card .medallion-title{
  top:11.0%!important; left:30%!important; width:40%!important;
  margin:0!important; padding:0!important;
  font:italic 700 clamp(17px,2.2vw,30px)/1.05 Georgia,serif!important;
}
body[data-room-id="1"] .medallion-card .medallion-instructions{
  top:17.25%!important;left:26%!important;width:48%!important;
  margin:0!important;padding:0!important;
  font:700 clamp(10px,1.02vw,14px)/1.1 Georgia,serif!important;
  white-space:normal!important;
}
body[data-room-id="1"] .medallion-card .medallion-reward{
  top:22.1%!important;left:36%!important;width:28%!important;
  margin:0!important;padding:0!important;
  font:italic 700 clamp(10px,1vw,14px)/1 Georgia,serif!important;
}
body[data-room-id="1"] .medallion-card .medallion-status{
  position:absolute!important;left:26.5%!important;top:85.05%!important;
  width:47%!important;height:2.1%!important;
  margin:0!important;padding:0!important;display:flex!important;
  align-items:center!important;justify-content:center!important;
  font:700 clamp(9px,.97vw,13px)/1 Georgia,serif!important;
  white-space:nowrap!important;z-index:19!important;
  color:#36200e!important;text-shadow:0 1px 1px #f9db9e!important;
}
body[data-room-id="1"] .medallion-card #medallionBoard .puzzle-piece{
  position:absolute!important;left:50%!important;top:50%!important;
  transform:translate(-50%,-50%)!important;
  width:100%!important;height:100%!important;
  margin:0!important;padding:0!important;
  background-repeat:no-repeat!important;
  pointer-events:none!important;
}
@media(max-width:700px){
 body[data-room-id="1"] .medallion-card .medallion-title{font-size:clamp(13px,2.3vw,18px)!important;}
 body[data-room-id="1"] .medallion-card .medallion-instructions{font-size:clamp(7px,1.6vw,10px)!important;}
 body[data-room-id="1"] .medallion-card .medallion-reward{font-size:clamp(7px,1.4vw,10px)!important;}
 body[data-room-id="1"] .medallion-card .medallion-status{font-size:clamp(7px,1.45vw,10px)!important;}
}

/* V248 — medallion type spacing only; preserve original vintage panel and board. */
body[data-room-id="1"] .medallion-card .medallion-instructions{
  top:15.55%!important;
  left:25%!important;
  width:50%!important;
  font:700 clamp(11px,1.04vw,15px)/1.12 Georgia,serif!important;
  white-space:normal!important;
  text-align:center!important;
}
body[data-room-id="1"] .medallion-card .medallion-reward{
  top:21.6%!important;
  left:35%!important;
  width:30%!important;
  font:italic 700 clamp(11px,1.02vw,14px)/1 Georgia,serif!important;
}
body[data-room-id="1"] .medallion-card .medallion-status{
  top:87.85%!important;
  left:24%!important;
  width:52%!important;
  height:1.7%!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
  font:700 clamp(10px,.91vw,12px)/1 Georgia,serif!important;
  background:transparent!important;
  white-space:nowrap!important;
  text-align:center!important;
  color:#36200e!important;
  text-shadow:0 1px 0 rgba(255,229,176,.85)!important;
}
@media(max-width:700px){
 body[data-room-id="1"] .medallion-card .medallion-instructions{font-size:clamp(7px,1.5vw,10px)!important;}
 body[data-room-id="1"] .medallion-card .medallion-reward{font-size:clamp(7px,1.4vw,10px)!important;}
 body[data-room-id="1"] .medallion-card .medallion-status{font-size:clamp(7px,1.35vw,10px)!important;}
}
