/* Keep the approved illustrations and controls; change only the game viewport. */
html:has(body.ejn-screen-playing) { margin-top:0!important; overflow:hidden!important; }
body.page-id-191.ejn-screen-playing { overflow:hidden!important; overscroll-behavior:none; }
body.page-id-191.ejn-screen-playing #ejn-play-header-shell,
body.page-id-191.ejn-screen-playing #wpadminbar { display:none!important; }
body.page-id-191.ejn-screen-playing #ejn-play-arcade,
body.page-id-191.ejn-screen-playing.ejna-color-open #ejn-coloring-app {
  position:fixed!important; inset:0!important; z-index:99990;
  width:100vw!important; height:var(--ejn-screen-height,100vh)!important; height:100dvh!important;
  max-width:none!important; min-height:0!important; margin:0!important; padding:0!important;
  transform:none!important; overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain;
}
body.page-id-191.ejn-screen-playing #ejn-play-arcade .ejna-tic {
  display:grid; place-items:center; width:100%; height:100%; max-width:none;
  background:#aa612c repeating-linear-gradient(0deg,#8d4b20 0 3px,#b46a30 4px 65px,#cc8040 68px 71px);
}
body.page-id-191.ejn-screen-playing:not(.ejn-handheld) #ejn-play-arcade .ejna-tic-scene {
  width:min(100vw,177.683dvh); flex:none;
}
body.page-id-191.ejn-screen-playing:not(.ejn-handheld) #ejn-play-arcade .ejna-match {
  width:100%; max-width:none;
}
body.page-id-191.ejn-screen-playing.ejna-color-open #ejn-coloring-app .ejn-stage-viewport {
  display:grid; place-items:center; width:100%; height:100%; overflow:hidden; background:#8d1c27;
}
body.page-id-191.ejn-screen-playing.ejna-color-open #ejn-coloring-app .ejn-sprite-stage {
  min-width:0!important; max-width:none!important; width:min(100vw,177.683dvh)!important;
  height:auto!important; aspect-ratio:1672/941; margin:auto;
}
body.page-id-191.ejn-screen-playing.ejna-color-open .ejna-color-back {
  position:fixed!important; z-index:100003; left:max(1%,env(safe-area-inset-left));
  top:max(1%,env(safe-area-inset-top)); width:min(16vw,150px); min-height:44px; margin:0!important;
}
body.page-id-191.ejn-screen-playing .ejn-mobile-tip { display:none!important; }
@media (orientation:portrait) and (max-width:500px) {
  body.page-id-191.ejn-screen-playing #ejn-handheld-rotate { top:0!important; height:100dvh!important; }
}

/* The lobby art remains whole. Its own forest continues to every screen edge. */
body.page-id-191 #ejn-play-arcade .ejna-picker {
  position:relative; isolation:isolate; overflow:hidden;
  display:grid; place-items:center;
  width:100%; height:var(--ejn-lobby-height,calc(100dvh - 82px)); min-height:0!important;
  background:#497835 url('playcade-final.webp') center/cover no-repeat!important;
}
body.page-id-191 #ejn-play-arcade .ejna-lobby-wide {
  width:var(--ejn-lobby-fit,min(100vw,177.777dvh))!important;
  max-width:100%; margin:auto;
}
body.page-id-191 #ejn-play-arcade .ejna-lobby-wide,
body.page-id-191 #ejn-play-arcade .ejna-lobby-narrow { z-index:1; }
@media (orientation:landscape) {
  body.page-id-191 #ejn-play-arcade .ejna-lobby-wide {
    -webkit-mask-image:linear-gradient(90deg,transparent,black 1.2%,black 98.8%,transparent);
    mask-image:linear-gradient(90deg,transparent,black 1.2%,black 98.8%,transparent);
  }
}

/* The same painted tabletop supplies the spare width around the intact board. */
body.page-id-191.ejn-screen-playing #ejn-play-arcade .ejna-tic {
  position:relative; isolation:isolate; overflow:hidden;
  background:#b97437!important;
}
body.page-id-191.ejn-screen-playing #ejn-play-arcade .ejna-tic::before {
  content:""; position:absolute; inset:-18px; pointer-events:none;
  background:url('tic-scene-original.png') center/cover no-repeat;
  filter:blur(15px) saturate(.95); transform:scale(1.035);
}
body.page-id-191.ejn-screen-playing #ejn-play-arcade .ejna-tic-scene {
  position:relative; z-index:1;
  -webkit-mask-image:linear-gradient(90deg,transparent,black 1.2%,black 98.8%,transparent);
  mask-image:linear-gradient(90deg,transparent,black 1.2%,black 98.8%,transparent);
}

/* Sketch Box continues its cream illustrated surround instead of red side bars. */
body.page-id-191.ejn-screen-playing.ejna-color-open #ejn-coloring-app {
  isolation:isolate; overflow:hidden!important; background:#fff0d5!important;
}
body.page-id-191.ejn-screen-playing.ejna-color-open #ejn-coloring-app::before {
  content:""; position:absolute; inset:-16px; pointer-events:none;
  background:url('ejn-sketch-box-shell.png') center/cover no-repeat;
  filter:blur(12px) saturate(.9); transform:scale(1.02);
}
body.page-id-191.ejn-screen-playing.ejna-color-open #ejn-coloring-app .ejn-stage-viewport {
  position:relative; z-index:1; background:transparent!important;
}

/* Twenty-four cards keep the same scale but sit centrally on the phone rug. */
@media (pointer:coarse) and (orientation:landscape) and (max-height:500px) {
  body.page-id-191.ejn-handheld #ejn-play-arcade .ejna-match-board[data-level-board="hard"] {
    left:50%!important;
  }
}
@media (pointer:coarse) and (orientation:landscape) and (max-height:500px) and (max-width:899px) {
  body.page-id-191.ejn-handheld #ejn-play-arcade .ejna-match-board[data-level-board="hard"] {
    left:48%!important;
  }
}
@media (pointer:coarse) and (orientation:landscape) and (max-height:500px) and (max-width:700px) {
  body.page-id-191.ejn-handheld #ejn-play-arcade .ejna-match-board[data-level-board="hard"] {
    left:46%!important;
  }
  body.page-id-191.ejn-handheld #ejn-play-arcade .ejna-match-score {
    left:80%!important;
  }
}
