/* word-weave fullscreen (html.pip-immersive only). hd.js sets --fs-wheel / --fs-cell on #ww from the free space;
   they only exist while fullscreen is on, so the normal page keeps its own sizes. */
html.pip-immersive .ww { --wheel: var(--fs-wheel, min(72vw, 300px, 40vh)); --letter: max(44px, calc(var(--wheel) * 0.2)); max-width: none; }
html.pip-immersive .ww-grid { --cell: var(--fs-cell, 40px) !important; }
html.pip-immersive .ww-cell { font-size: calc(var(--cell) * 0.56); }
html.pip-immersive .article-section, html.pip-immersive .ad-rail { display: none; }
html.pip-immersive .ww-board { flex-shrink: 0; }
html.pip-immersive .ww details { display: none; }
html.pip-immersive .ww { padding-bottom: 0; } html.pip-immersive .ww-play { padding-bottom: 0; }
/* wave 3: fill the stage, no scroll, safe areas, landscape split. Native full screen gets the same rules. */
html.pip-immersive .hub-bar, html.pip-native .hub-bar, html.pip-native .ad-rail, html.pip-native .article-section, html.pip-native .ww details { display: none; }
html.pip-immersive .ww, html.pip-native .ww, .ww:fullscreen {
  max-width: none; width: 100%; min-height: 0; height: 100%; border-radius: 0; box-shadow: none; overflow: hidden;
  padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
}
html.pip-immersive .ww-board, html.pip-native .ww-board { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; }
html.pip-immersive .ww-tool, html.pip-native .ww-tool, html.pip-immersive .ww-hud__btn, html.pip-native .ww-hud__btn { min-width: 44px; min-height: 44px; }
html.pip-immersive .ww-wheel-wrap, html.pip-native .ww-wheel-wrap { flex-shrink: 0; }
@media (orientation: landscape) and (max-height: 560px) {
  html.pip-immersive .ww, html.pip-native .ww {
    display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr auto; column-gap: 8px;
  }
  html.pip-immersive .ww-hud, html.pip-native .ww-hud { grid-column: 1 / -1; grid-row: 1; }
  html.pip-immersive .ww-board, html.pip-native .ww-board { grid-column: 1; grid-row: 2 / 4; }
  html.pip-immersive .ww-ribbon, html.pip-native .ww-ribbon { grid-column: 2; grid-row: 3; align-self: end; }
  html.pip-immersive .ww-play, html.pip-native .ww-play { grid-column: 2; grid-row: 2; padding: 0; min-height: 0; }
}
