*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #c9ecff;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: #23405a;
}
.island-bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  padding-top: calc(env(safe-area-inset-top, 0px) + 6px);
  background: #7ec8e3;
  border-bottom: 3px solid #4aa3df;
}
.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  min-width: 48px;
  padding: 6px 16px 6px 12px;
  border-radius: 999px;
  background: #ff8a3d;
  box-shadow: 0 4px 0 #d96a1f;
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  text-decoration: none;
  white-space: nowrap;
}
.back:active { transform: translateY(3px); box-shadow: 0 1px 0 #d96a1f; }
.back:focus-visible { outline: 4px solid #1d4ed8; outline-offset: 3px; }
.back .ico { font-size: 24px; line-height: 1; }
.lesson-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
  font-size: 15px;
}
.stage { flex: 1 1 auto; min-height: 0; position: relative; }
.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #c9ecff; }
.msg { margin: 24px 16px; font-size: 18px; text-align: center; }
/* Small phones: keep the button big but drop the lesson name; shorten the label visually only. */
@media (max-width: 420px) {
  .lesson-name { display: none; }
  .back { font-size: 17px; }
}
@media (max-width: 340px) {
  .back { font-size: 16px; padding: 6px 12px 6px 10px; }
}
