/* One-tap Glaze Games launch. Porcelain portal from the Games control into play. */
:root {
  --glz-play-x: 50%;
  --glz-play-y: 78%;
}
html.glz-play-on,
html.glz-play-on body {
  overflow: hidden !important;
}

.glz-play {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: none;
  color: var(--glz-ink, #3a2a22);
}
.glz-play.is-on { display: block; }

.glz-play-veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 50% 0%, #fffaf3 0%, #fbf6ee 52%, #f4eadc 100%);
  clip-path: circle(0 at var(--glz-play-x) var(--glz-play-y));
  transition: clip-path 0.72s cubic-bezier(0.22, 0.8, 0.24, 1);
}
.glz-play.is-in .glz-play-veil {
  clip-path: circle(150vmax at var(--glz-play-x) var(--glz-play-y));
}
.glz-play-ring {
  position: absolute;
  left: var(--glz-play-x);
  top: var(--glz-play-y);
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  border: 1.5px solid rgba(184, 144, 45, 0.85);
  box-shadow: 0 0 0 6px rgba(251, 246, 238, 0.35);
  pointer-events: none;
  opacity: 0.9;
  transform: scale(1);
  transition: transform 0.72s cubic-bezier(0.22, 0.8, 0.24, 1), opacity 0.45s ease;
}
.glz-play.is-in .glz-play-ring {
  transform: scale(70);
  opacity: 0;
}

.glz-play-stage {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition: opacity 0.45s ease 0.22s, transform 0.55s cubic-bezier(0.22, 0.8, 0.24, 1) 0.18s;
}
.glz-play.is-in .glz-play-stage {
  opacity: 1;
  transform: none;
}

.glz-play-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 10px;
  z-index: 2;
}
.glz-play-close,
.glz-play-pop {
  flex: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 250, 243, 0.92);
  color: var(--glz-plum, #5b2a4a);
  box-shadow: 0 0 0 1px rgba(91, 42, 74, 0.12), 0 8px 20px rgba(58, 42, 34, 0.08);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.glz-play-close svg,
.glz-play-pop svg { width: 18px; height: 18px; display: block; }
.glz-play-close:hover,
.glz-play-pop:hover { background: #fff; }
.glz-play-close:focus-visible,
.glz-play-pop:focus-visible,
.glz-play-pill:focus-visible {
  outline: 2px solid var(--glz-gold-deep, #b8902d);
  outline-offset: 3px;
}
.glz-play-heading {
  flex: 1;
  min-width: 0;
  text-align: center;
}
.glz-play-kicker {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(91, 42, 74, 0.62);
  font-weight: 620;
}
.glz-play-heading h2 {
  margin: 2px 0 0;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 1.15rem;
  font-weight: 560;
  letter-spacing: -0.02em;
  color: var(--glz-plum, #5b2a4a);
  line-height: 1.15;
}

.glz-play-device {
  position: relative;
  flex: 1;
  min-height: 0;
  margin: 0 10px;
  border-radius: 22px;
  overflow: hidden;
  background: #1a1218;
  box-shadow:
    0 0 0 1px rgba(91, 42, 74, 0.1),
    0 18px 40px rgba(58, 42, 34, 0.14);
}
.glz-play-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fbf6ee;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.glz-play.is-ready .glz-play-frame { opacity: 1; }

.glz-play-wait {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: radial-gradient(circle at 50% 42%, #fffaf3, #fbf6ee 70%);
  z-index: 1;
  transition: opacity 0.35s ease;
}
.glz-play.is-ready .glz-play-wait {
  opacity: 0;
  pointer-events: none;
}
.glz-play-bonbon {
  width: 92px;
  height: 92px;
  object-fit: contain;
  filter: drop-shadow(0 10px 16px rgba(58, 42, 34, 0.16));
  animation: glz-play-bob 1.6s ease-in-out infinite;
}
.glz-play-wait p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--glz-plum, #5b2a4a);
  font-weight: 560;
}

.glz-play-dock {
  display: flex;
  gap: 8px;
  flex: none;
  overflow-x: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 10px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  scrollbar-width: none;
}
.glz-play-dock::-webkit-scrollbar { display: none; }
.glz-play-pill {
  flex: none;
  appearance: none;
  border: 0;
  cursor: pointer;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 250, 243, 0.9);
  color: var(--glz-plum, #5b2a4a);
  box-shadow: inset 0 0 0 1px rgba(91, 42, 74, 0.1);
  font: 620 13px/1.1 system-ui, -apple-system, sans-serif;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.glz-play-pill[aria-pressed="true"] {
  background: var(--glz-plum, #5b2a4a);
  color: #fffaf3;
  box-shadow: none;
}

@keyframes glz-play-bob {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-6deg); }
  50% { transform: translate3d(0, -7px, 0) rotate(4deg); }
}

@media (min-width: 960px) {
  .glz-play-stage {
    display: grid;
    grid-template-rows: auto 1fr auto;
    justify-items: center;
  }
  .glz-play-bar {
    width: min(460px, calc(100vw - 48px));
    padding-top: 22px;
  }
  .glz-play-device {
    width: min(420px, calc(100vw - 80px));
    height: min(780px, calc(100vh - 168px));
    flex: none;
    border-radius: 28px;
    box-shadow:
      0 0 0 1px rgba(91, 42, 74, 0.1),
      0 0 0 10px rgba(255, 250, 243, 0.55),
      0 28px 60px rgba(58, 42, 34, 0.16);
  }
  .glz-play-dock {
    justify-content: center;
    width: min(720px, calc(100vw - 48px));
    padding-bottom: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .glz-play-veil,
  .glz-play-ring,
  .glz-play-stage,
  .glz-play-frame,
  .glz-play-wait,
  .glz-play-bonbon {
    animation: none !important;
    transition: none !important;
  }
  .glz-play-veil { clip-path: none; opacity: 0; }
  .glz-play.is-in .glz-play-veil { opacity: 1; clip-path: none; }
  .glz-play-ring { display: none; }
  .glz-play-stage { transform: none; }
}
html.glz-static .glz-play-veil,
html.glz-static .glz-play-ring,
html.glz-static .glz-play-stage,
html.glz-static .glz-play-frame,
html.glz-static .glz-play-wait,
html.glz-static .glz-play-bonbon,
html.glz-play-calm .glz-play-veil,
html.glz-play-calm .glz-play-ring,
html.glz-play-calm .glz-play-stage,
html.glz-play-calm .glz-play-frame,
html.glz-play-calm .glz-play-wait,
html.glz-play-calm .glz-play-bonbon {
  animation: none !important;
  transition: none !important;
}
html.glz-static .glz-play-veil,
html.glz-play-calm .glz-play-veil {
  clip-path: none;
}
html.glz-static .glz-play-ring,
html.glz-play-calm .glz-play-ring { display: none; }
