/* Cyclic puzzle surfaces. The 16 × 16 canvas contains 128 raised buttons. */
.play-layout { grid-template-columns: minmax(0, 690px) minmax(210px, 1fr); gap: 40px; }
.game-card { min-width: 0; }
.mode-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; padding: 5px; margin-bottom: 24px; background: #edf0e4; border-radius: 13px; }
.mode-tabs button { min-height: 54px; border: 0; border-radius: 10px; background: transparent; color: #647064; font-size: 14px; font-weight: 600; }
.mode-tabs button span { font-size: 21px; vertical-align: middle; margin-right: 5px; }
.mode-tabs button[aria-pressed=true] { color: #176b5e; background: #fcfff6; box-shadow: 0 2px 5px #23332112; }
.stats span { font-size: 11px; }
#board-scroll { overflow: auto; border-radius: 16px; }
.board-wrap { width: 100%; }
#board.cyclic-board { position: relative; isolation: isolate; display: grid; grid-template-columns: repeat(16,minmax(0,1fr)); grid-template-rows: repeat(16,minmax(0,1fr)); aspect-ratio: 1; width: 100%; border: 2px solid #dce1cd; border-radius: 16px; background: #e5e7d4; overflow: hidden; }
.region-layer { position: absolute; width: 100%; height: 100%; inset: 0; z-index: 0; pointer-events: none; }
.raised-cell { position: relative; z-index: 1; align-self: center; justify-self: center; width: 82%; height: 82%; min-width: 0; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 6px; background: #eef0df; color: #1c6f63; font-size: clamp(12px,1.8vw,22px); line-height: 1; font-weight: 600; box-shadow: 0 1px 1px #5863300d; }
.raised-cell.fixed { color: #303c30; font-weight: 700; }
.raised-cell.same-row { background: #cce2e7; }
.raised-cell.same-column { background: #bfe4ce; }
.raised-cell.same-number { background: #b0d7c1; }
.raised-cell.selected { background: #a5d4c0; box-shadow: inset 0 0 0 2px #145d53; }
.raised-cell.error { color: #b22c39; background: #f8dfe0; }
.raised-cell.note { white-space: normal; font-size: clamp(7px,.75vw,10px); line-height: 1.1; word-spacing: 1px; padding: 1px; }
.raised-cell:focus-visible { outline: 2px solid #145d53; outline-offset: 1px; }
.raised-cell:disabled { opacity: 1; }
#board-scroll.zoomed .board-wrap { min-width: 740px; }
#board-scroll.zoomed .raised-cell { font-size: 24px; }
#board-scroll.zoomed .raised-cell.note { font-size: 12px; }
.board-caption { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 14px 0 8px; color: #697660; font-size: 12px; }
#zoom { flex-shrink: 0; padding: 8px 12px; min-height: 40px; background: #f8fbf3; border: 1px solid #dbe2cf; color: #315e4e; border-radius: 24px; font-size: 12px; }
#board-rule { color: #56664f; font-size: 13px; margin-bottom: 8px; }
.game-tools { gap: 6px; margin: 18px 0; }
.game-tools button { flex: 1; border: 1px solid #edf0e6; background: #fafcf6; padding: 10px 2px; }
.game-tools button:disabled { opacity: .4; cursor: default; }
.game-tools span { font-size: 12px; }
#number-pad { grid-template-columns: repeat(4,1fr); gap: 10px; }
#number-pad button { min-height: 70px; background: #f6f9ef; color: #176b5e; box-shadow: 0 2px 0 #dce2ce; }
#number-pad button span { display: block; font-size: 30px; font-weight: 700; }
#number-pad button small { display: block; font-size: 11px; color: #819079; margin-top: 4px; }
#number-pad button:disabled { opacity: .45; }
.challenge-level { display: grid; grid-template-columns: 1fr auto; padding: 16px; border: 1px solid #bfccb5; border-radius: 8px; }
.challenge-level span { font-size: 14px; }
.challenge-level strong { font-size: 16px; }
.challenge-level small { grid-column: 1/-1; font-size: 12px; margin-top: 7px; color: #61725a; }
.session-note { font-size: 12px; margin-top: 20px; }
.variant-mini { position: relative; display: grid; grid-template-columns: repeat(16,1fr); grid-template-rows: repeat(16,1fr); width: 140px; height: 140px; margin: 24px 0; border-radius: 6px; overflow: hidden; background: #e4e8d8; }
.variant-mini span { z-index: 1; background: #e4ebd8; font-size: 6px; line-height: 1; align-self: center; justify-self: center; width: 80%; height: 80%; border-radius: 2px; text-align: center; }
@media(max-width:1000px) {
  .play-layout { grid-template-columns: minmax(0,1fr); gap: 30px; }
  .game-card { width: 100%; max-width: 720px; margin: auto; }
  .play-sidebar { max-width: 720px; width: 100%; margin: auto; }
  .play-sidebar > p { max-width: none; }
  .raised-cell { font-size: clamp(14px,2.8vw,22px); }
  .intro-note { display: none; }
}
@media(max-width:640px) {
  .mode-tabs { margin-bottom: 20px; }
  .mode-tabs button { font-size: 12px; min-height: 46px; }
  .mode-tabs button span { font-size: 17px; margin-right: 2px; }
  .game-card { padding: 12px; }
  .raised-cell { border-radius: 4px; font-size: clamp(11px,3.3vw,20px); }
  .raised-cell.note { font-size: 7px; line-height: 1; }
  .stats span { font-size: 10px; letter-spacing: .4px; }
  .stats strong { font-size: 16px; }
  .board-caption { font-size: 11px; gap: 8px; }
  #zoom { font-size: 11px; padding: 6px 9px; }
  #board-rule { font-size: 12px; }
  .game-tools span { font-size: 11px; }
  .puzzle-card { grid-template-columns: 1fr 100px; }
  .variant-mini { grid-column: 2; grid-row: 1/5; margin: 0; width: 100px; height: 100px; }
  .variant-mini span { font-size: 4px; }
  .filters button { padding: 8px 11px; }
}
