/* GRAUMAENLEIN.TV · GTV Blocks V1.4.1
   Desktop board height fix: keep the original 10x20 square-cell ratio.
   Widen the entire 3-column layout, not the board beyond the viewport. */
@media (min-width:981px) {
  .app {
    width:100%; max-width:1680px;
    padding:clamp(12px,1.8vh,19px) clamp(20px,2.6vw,46px) 18px;
  }
  .header {padding-bottom:12px;}
  .headline {margin:11px auto 14px;}
  .layout {
    width:100%; max-width:1540px;
    grid-template-columns:minmax(245px,1fr) minmax(455px,1.45fr) minmax(265px,1.10fr);
    gap:clamp(16px,1.9vw,30px);
  }
  .playzone {gap:12px;}
  .side-rail {width:clamp(88px,7vw,106px);}
  /* IMPORTANT: the iframe height grows to content height. Using only 100dvh
     inside it creates a feedback loop. JS supplies the OUTER viewport height. */
  .frame {
    width:min(29vw,340px, max(245px, calc((var(--gtv-blocks-outer-height-v141, 900px) - 245px)/2)));
  }
  .left-panel, .right-panel {padding-top:22px;}
}
@media (min-width:981px) and (max-width:1170px) {
  .layout {grid-template-columns:minmax(175px,1fr) minmax(395px,1.65fr) minmax(205px,1fr); gap:13px;}
  .frame {width:min(27vw,305px, max(225px, calc((var(--gtv-blocks-outer-height-v141, 900px) - 245px)/2)));}
  .side-rail {width:88px;}
}
/* Preserve the shorter board in either form of fullscreen, including V1.4.0's
   iframe-native fullscreen. On mobile do not disturb the existing touch layout. */
@media(min-width:981px) {
  html.gtv-blocks-fullscreen-v140 .frame,
  html.gtv-blocks-parent-fullscreen-v141 .frame {
    width:min(29vw,350px,max(240px,calc((var(--gtv-blocks-outer-height-v141,900px) - 205px)/2)));
  }
  html.gtv-blocks-parent-fullscreen-v141 .app {padding-top:12px;}
  html.gtv-blocks-parent-fullscreen-v141 .headline {margin:7px auto 10px;}
}
/* Mobile native/fallback parent fullscreen – reuse the proven compact
   mobile play layout rather than enlarging the 10x20 board arbitrarily. */
@media(max-width:620px) {
  html.gtv-blocks-parent-fullscreen-v141 .app {padding:7px 8px 12px;}
  html.gtv-blocks-parent-fullscreen-v141 .header {padding:2px 2px 8px;}
  html.gtv-blocks-parent-fullscreen-v141 .headline {display:none;}
  html.gtv-blocks-parent-fullscreen-v141 .layout {gap:6px;}
  html.gtv-blocks-parent-fullscreen-v141 .left-panel {display:grid;grid-template-columns:1.3fr 1fr;gap:6px;}
  html.gtv-blocks-parent-fullscreen-v141 .left-panel .stat-card,
  html.gtv-blocks-parent-fullscreen-v141 .left-panel .mini-stat {padding:8px;}
  html.gtv-blocks-parent-fullscreen-v141 .score-value {font-size:21px;}
  html.gtv-blocks-parent-fullscreen-v141 .mini-stat .num {font-size:19px;margin-top:2px;}
  html.gtv-blocks-parent-fullscreen-v141 .arena-meta {margin-bottom:4px;}
  html.gtv-blocks-parent-fullscreen-v141 .frame {
    width:min(calc(100vw - 110px),calc((100dvh - 300px)/2),320px);
  }
  html.gtv-blocks-parent-fullscreen-v141 .controls {margin-top:6px;gap:6px;padding-bottom:max(6px,env(safe-area-inset-bottom));}
  html.gtv-blocks-parent-fullscreen-v141 .ctrl {min-height:52px;padding:3px 5px;}
  html.gtv-blocks-parent-fullscreen-v141 .ctrl-rotate {min-height:58px;}
  html.gtv-blocks-parent-fullscreen-v141 .right-panel,
  html.gtv-blocks-parent-fullscreen-v141 .footer {display:none;}
}
