/* Breakthrough: keep the actual board and turn states interactive. */
.fg-stage.fg-variant-breakthrough {
  background: #dce9c8 url("../images/breakthrough-woodland.b45f5c6c0e2b.webp") center / cover no-repeat;
  color: #173c29;
  padding-top: 16px;
}
.fg-variant-breakthrough .fg-student-status { color: #173c29; background: #fff8e9; padding: 10px 16px; border-radius: 12px; }
.fg-variant-breakthrough .fg-student-board { background: #fff8e8ed; border: 4px solid #986c39; box-shadow: 0 12px 28px #4f382d38; }
.fg-variant-breakthrough .fg-board-grid { border: 9px solid #936238; border-radius: 16px; box-shadow: 0 8px 18px #60452938; }
.fg-variant-breakthrough .fg-cell { background: #fff7df; }
.fg-variant-breakthrough .fg-cell.dark { background: #dbe6bc; }
.fg-variant-breakthrough .fg-turn-seat { background: #fff9ed; border: 1px solid #d6bd92; border-radius: 12px; }
.fg-variant-breakthrough .fg-play-hint { color: #533f28; }
.fg-variant-breakthrough .fg-rule-action, .fg-variant-breakthrough .fg-more-controls summary { background: #fff8e8; color: #244f39; }
@media (min-width: 1000px) {
 html[data-classroom-playing] .fg-variant-breakthrough .fg-student-stage { max-width: 1130px; }
 html[data-classroom-playing] .fg-variant-breakthrough .fg-student-board { grid-template-columns: minmax(0, 1fr) 250px; }
}
html[data-classroom-playing] .fg-variant-breakthrough .fg-student-board { background: transparent; border: 0; box-shadow: none; }
.fg-stage.fg-variant-breakthrough .fg-board-grid { background: #936238; border: 9px solid #936238; }
.fg-stage.fg-variant-breakthrough .fg-disc-wrap { width: 100%; height: auto; aspect-ratio: 1; max-width: 100%; }
.fg-stage.fg-variant-breakthrough .fg-disc { width: 86%; height: 86%; max-width: 100%; max-height: 100%; }

.fg-variant-breakthrough #fg-flip-quick { border: 12px solid transparent; border-image: url("../images/breakthrough-button.dd7b7720e1c6.webp") 25% 14% fill / 12px / 0 stretch; color: #3d2b1d; min-height: 52px; padding: 6px 16px; }

/* A full-board overview remains available; large cells make narrow screens usable. */
.breakthrough-zoom, .breakthrough-scroll-hint { display: none; }
@media (max-width: 440px) {
  .fg-variant-breakthrough .breakthrough-zoom { display: block; min-height: 44px; margin: 0 auto 8px; padding: 6px 16px; border: 2px solid #80542e; border-radius: 12px; background: #fff8e8; color: #244f39; font-weight: 800; }
  .fg-variant-breakthrough .breakthrough-scroll-hint { display: block; margin: 0 0 8px; text-align: center; color: #294b32; font-size: 14px; font-weight: 700; }
  .fg-variant-breakthrough:has(.breakthrough-scroll:not(.is-zoomed)) .breakthrough-scroll-hint { display: none; }
  .fg-variant-breakthrough .breakthrough-scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
  .fg-variant-breakthrough .breakthrough-scroll:focus-visible { outline: 3px solid #244f39; outline-offset: 2px; }
  .fg-variant-breakthrough .breakthrough-scroll.is-zoomed .fg-board-grid { --fg-cell-size: 44px; width: max-content; max-width: none; margin-inline: 0; }
}

@media (orientation: landscape) and (min-width: 1000px) {
  html[data-classroom-playing] .fg-variant-breakthrough .fg-student-board { grid-template-rows: auto auto 1fr; align-items: start; }
  html[data-classroom-playing] .fg-variant-breakthrough .breakthrough-scroll { grid-column: 1; grid-row: 1 / 4; }
  html[data-classroom-playing] .fg-variant-breakthrough .fg-turn-rail { grid-column: 2; grid-row: 1; align-self: start; }
  html[data-classroom-playing] .fg-variant-breakthrough .fg-play-hint { grid-column: 2; grid-row: 2; margin: 0; padding: 16px; background: #fff8e9; border: 2px solid #d6bd92; border-radius: 14px; }
  html[data-classroom-playing] .fg-variant-breakthrough :is(#fg-extra-top, #fg-extra-bottom) { display: none; }
}

.fg-stage.fg-variant-breakthrough .fg-board-grid {
  border: 14px solid #936238;
  border-image: url("../images/breakthrough-frame.baf63809a021.webp") 12% / 14px stretch;
}

/* Keep both players readable beside the board on a classroom display. */
@media (orientation: landscape) and (min-width: 1000px) {
  html[data-classroom-playing] .fg-variant-breakthrough .fg-turn-rail {
    display: grid; grid-template-columns: 1fr; gap: 8px;
    padding: 10px; background: #fff8e9; border: 2px solid #d6bd92; border-radius: 16px;
    box-shadow: 0 5px 14px #60452930;
  }
  html[data-classroom-playing] .fg-variant-breakthrough .fg-turn-seat {
    min-height: 56px; padding: 9px 10px; font-size: 16px;
  }
  html[data-classroom-playing] .fg-variant-breakthrough .fg-turn-seat small { font-size: 13px; }
}
