/* Spielrahmen-Kachel (AP2-63): Startknopf, Rahmen und Vollbild-Knopf der
   Spielseiten. Nur vorhandene Tokens aus styles.css, damit beide Themes ohne
   eigene Farbwerte stimmen. Keine Bewegung, daher kein reduced-motion-Block. */

.thomaschristl-game-frame {
  display: grid;
  gap: 12px;
}

/* Mobil zuerst: Ein 16:9-Streifen wäre auf dem Handy im Hochformat nur rund
   200 px hoch und für das Spiel zu klein. */
.thomaschristl-game-frame__stage {
  display: grid;
  place-items: center;
  height: 70vh;
  min-height: 320px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--card-bg);
}

.thomaschristl-game-frame__iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.thomaschristl-game-frame__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.thomaschristl-game-frame__toolbar[hidden],
.thomaschristl-game-frame__fullscreen[hidden] {
  display: none;
}

.thomaschristl-game-frame__start,
.thomaschristl-game-frame__fullscreen {
  min-width: 48px;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid var(--accent-solid);
  border-radius: 5px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.thomaschristl-game-frame__start {
  background: var(--accent-solid);
  color: var(--accent-contrast);
}

.thomaschristl-game-frame__fullscreen {
  background: var(--card-bg);
  color: var(--ink);
}

.thomaschristl-game-frame__fullscreen[aria-pressed="true"] {
  background: var(--accent-soft-strong);
}

.thomaschristl-game-frame__start:focus-visible,
.thomaschristl-game-frame__fullscreen:focus-visible,
.thomaschristl-game-frame__iframe:focus-visible {
  outline: 2px solid var(--accent-solid);
  outline-offset: 2px;
}

.thomaschristl-game-frame__links {
  margin: 0;
}

/* Im Vollbild füllt der Rahmen den Bildschirm; die Knopfleiste bleibt unten
   sichtbar, damit sich der Modus auch ohne Esc verlassen lässt. */
.thomaschristl-game-frame:fullscreen {
  display: flex;
  flex-direction: column;
  padding: 8px;
  background: var(--paper);
}

.thomaschristl-game-frame:fullscreen .thomaschristl-game-frame__stage {
  flex: 1;
  height: auto;
  min-height: 0;
}

@media (min-width: 768px) {
  .thomaschristl-game-frame__stage {
    height: auto;
    max-height: 80vh;
    aspect-ratio: 16 / 9;
  }

  .thomaschristl-game-frame:fullscreen .thomaschristl-game-frame__stage {
    max-height: none;
    aspect-ratio: auto;
  }
}
