/* Экран игры «Коты против собак»: рамка вокруг изолированного документа. */
.mx-cats-dogs-stage {
  position: relative;
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
  background: #0b0b10;
  box-shadow: 0 18px 50px rgba(20, 12, 40, 0.22);
}

.mx-cats-dogs-toolbar {
  display: flex;
  justify-content: flex-end;
  padding: 4px;
}

.mx-cats-dogs-toolbar[hidden] {
  display: none;
}

.mx-cats-dogs-expand {
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: #383444;
  font: inherit;
  cursor: pointer;
}

.mx-cats-dogs-expand:focus-visible {
  outline: 3px solid #fff;
  outline-offset: -4px;
}

.mx-cats-dogs-stage iframe {
  display: block;
  width: 100%;
  height: min(78vh, 760px);
  min-height: 420px;
  border: 0;
  background: #0b0b10;
}

@media (max-width: 720px) {
  .mx-cats-dogs-stage iframe {
    height: min(74vh, 640px);
    min-height: 380px;
  }
}

.mx-cats-dogs-stage.is-expanded {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  border-radius: 0;
  box-sizing: border-box;
  padding: env(safe-area-inset-top) env(safe-area-inset-right)
    env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.mx-cats-dogs-stage.is-expanded iframe {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
}

.mx-cats-dogs-overlay {
  overflow: hidden;
  overscroll-behavior: none;
}

/* Older Safari otherwise contains the fixed overlay inside the card. */
.mx-cats-dogs-overlay .mx-game-card--cats-vs-dogs {
  container-type: normal;
}

.mx-cats-dogs-stage.is-fallback {
  position: fixed;
  z-index: 2147483647;
  inset: 0;
  height: 100vh;
  height: 100dvh;
}
