#play .grid.fill { align-content: start; }
/* Demo block: tabs on the left, one game panel on the right (quiz styles live in index.html). */
.demo { display: grid; }
.demo__panel { grid-area: 1 / 1; min-height: 600px; }
.demo-tabs { display: grid; gap: var(--s-3); margin-top: var(--s-6); }
.demo-tab { display: flex; align-items: center; gap: var(--s-4); width: 100%; padding: var(--s-3) var(--s-4); text-align: left; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--r-md); background: transparent; color: var(--ink); font: inherit;
  transition: background-color 180ms ease, border-color 180ms ease, transform 140ms var(--ease-out-strong); }
.demo-tab img { width: 48px; height: 48px; border-radius: 12px; flex: none; }
.demo-tab b { display: block; font-weight: 500; font-size: var(--t-card); }
.demo-tab span span { color: var(--muted); font-size: 15px; }
.demo-tab[aria-selected="true"] { background: var(--bg); border-color: var(--action); }
.demo-tab:active { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) { .demo-tab:hover { border-color: var(--line-strong); } }

/* A real game (Flutter web build in play/<game>/), loaded on click into a phone frame */
.embed { display: grid; justify-items: center; align-content: start; gap: var(--s-4); }
.embed[hidden] { display: none; }
.embed__phone { position: relative; height: min(640px, 72vh); aspect-ratio: 9 / 19.5; overflow: hidden; display: grid; place-items: center;
  border: 10px solid #2c3446; border-radius: 44px; background: #10131c; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6); }
.embed__poster { position: absolute; inset: -10px; width: calc(100% + 20px); height: calc(100% + 20px); object-fit: cover; filter: brightness(0.55); }
.embed__start { position: relative; z-index: 1; }
.embed__phone iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #10131c; animation: emoji-pop 400ms var(--ease-out-strong) both; }
@media (max-width: 639px) { .embed__phone { height: min(520px, 62vh); } }

@media (max-width: 639px) {
  .demo__panel { min-height: 0; }
  #play .section-head p { display: none; }
  #play .section-head { margin-bottom: 0; }
  .demo-tabs { grid-template-columns: repeat(3, 1fr); gap: var(--s-2); margin-top: var(--s-4); }
  .demo-tab { flex-direction: column; justify-content: center; gap: var(--s-2); padding: var(--s-2); text-align: center; }
  .demo-tab img { width: 40px; height: 40px; }
  .demo-tab b { font-size: 14px; }
  .demo-tab span span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
}
