/* Playground v0 — aligned with homepage / businesses v0 design */
/* Page shell background + padding come from businesses_v0.css
   (body:has(.mv-biz-v0) page shell + .mv-biz-v0 token background). */

.mv-playground-v0 .mv-biz-v0-hero-media-wrap {
  align-self: center;
  width: 100%;
  max-width: 21rem;
  margin-inline: auto;
}

.mv-playground-v0-hero-frame {
  border-radius: 1.5rem;
  border: 1px solid #e5e0d6;
  background: #fcfaf6;
  box-shadow: 0 24px 50px -28px rgba(27, 67, 50, 0.3);
  padding: 0.75rem;
  overflow: hidden;
}

.mv-playground-v0-hero-mosaic {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.mv-playground-v0-hero-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 0.85rem;
}

.mv-playground-v0-hero-mosaic .mv-playground-v0-hero-image:nth-child(2),
.mv-playground-v0-hero-mosaic .mv-playground-v0-hero-image:nth-child(4) {
  transform: translateY(0.5rem);
}

@media (min-width: 1024px) {
  .mv-playground-v0 .mv-biz-v0-hero-media-wrap {
    max-width: 26rem;
    margin-inline: 0;
  }

  .mv-playground-v0-hero-frame {
    padding: 1rem 1rem 1.5rem;
  }

  .mv-playground-v0-hero-mosaic {
    gap: 0.75rem;
  }
}

.mv-playground-v0-section {
  margin-top: 3.5rem;
}

.mv-playground-v0-section:first-of-type {
  margin-top: 0;
}

.mv-playground-v0-section-kicker {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mv-biz-accent);
}

.mv-playground-v0-section-title {
  margin: 0.5rem 0 0;
  font-family: "Fraunces", "Playfair Display", Georgia, serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--mv-biz-foreground);
}

.mv-playground-v0-section-lead {
  margin: 0.75rem 0 0;
  max-width: 40rem;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--mv-biz-muted-fg);
}

.mv-playground-v0-grid {
  margin-top: 1.5rem;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

/* Game cards: screenshot on top, two columns on phones so the list stays short. */
.mv-playground-v0-grid--games {
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 640px) {
  .mv-playground-v0-grid--games {
    gap: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .mv-playground-v0-grid--scores {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .mv-playground-v0-grid--games {
    gap: 1.25rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .mv-playground-v0-grid--scores {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.mv-biz-v0.mv-playground-v0 .mv-playground-v0-game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: 1rem;
  border: 1px solid #e5e0d6;
  background: #ffffff;
  box-shadow: 0 10px 26px -22px rgba(27, 67, 50, 0.4);
  text-decoration: none;
  color: #2a3d34;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.mv-biz-v0.mv-playground-v0 a.mv-playground-v0-game-card {
  cursor: pointer;
}

.mv-biz-v0.mv-playground-v0 a.mv-playground-v0-game-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, #c4663c 45%, #e5e0d6);
  box-shadow: 0 20px 40px -22px rgba(27, 67, 50, 0.4);
  text-decoration: none;
  color: #2a3d34;
}

.mv-biz-v0.mv-playground-v0 a.mv-playground-v0-game-card:active {
  transform: scale(0.98);
}

.mv-biz-v0.mv-playground-v0 a.mv-playground-v0-game-card:focus-visible {
  outline: 3px solid #c4663c;
  outline-offset: 2px;
}

.mv-biz-v0.mv-playground-v0 .mv-playground-v0-game-card.is-disabled {
  opacity: 0.65;
  cursor: default;
}

.mv-playground-v0-game-card__media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  background: #ede9e0;
  overflow: hidden;
}

.mv-playground-v0-game-card__shot {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.mv-biz-v0.mv-playground-v0 a.mv-playground-v0-game-card:hover .mv-playground-v0-game-card__shot {
  transform: scale(1.04);
}

.mv-playground-v0-game-card__emoji {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 2.5rem;
  line-height: 1;
}

.mv-playground-v0-game-card__play {
  position: absolute;
  right: 0.5rem;
  bottom: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding-left: 2px;
  border-radius: 9999px;
  background: #1b4332;
  color: #f7f5f0;
  box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.45);
  transition: background 0.2s ease, transform 0.2s ease;
}

.mv-biz-v0.mv-playground-v0 a.mv-playground-v0-game-card:hover .mv-playground-v0-game-card__play {
  background: #c4663c;
  transform: scale(1.08);
}

.mv-playground-v0-game-card__soon {
  position: absolute;
  left: 0.5rem;
  bottom: 0.5rem;
  border-radius: 9999px;
  padding: 0.2rem 0.55rem;
  background: #f7f5f0;
  color: #6b7b72;
  font-size: 0.6875rem;
  font-weight: 700;
}

.mv-playground-v0-game-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.6rem 0.7rem 0.75rem;
}

.mv-playground-v0-game-card__title {
  margin: 0;
  font-family: "Fraunces", "Playfair Display", Georgia, serif;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  color: #2a3d34;
}

.mv-playground-v0-game-card__desc {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: #6b7b72;
}

@media (min-width: 640px) {
  .mv-playground-v0-game-card__body {
    padding: 0.75rem 0.9rem 0.9rem;
  }

  .mv-playground-v0-game-card__title {
    font-size: 1.125rem;
  }

  .mv-playground-v0-game-card__desc {
    font-size: 0.875rem;
  }
}

.mv-biz-v0.mv-playground-v0 .mv-playground-v0-leaderboard-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 100%;
  padding: 1.25rem;
  border-radius: 1.25rem;
  border: 1px solid #e5e0d6;
  background: #ffffff;
  box-shadow: 0 12px 30px -24px rgba(27, 67, 50, 0.28);
}

.mv-playground-v0-leaderboard-card__head {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.mv-playground-v0-leaderboard-card__emoji {
  font-size: 1.25rem;
  line-height: 1;
}

.mv-playground-v0-leaderboard-card__title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--mv-biz-foreground);
}

.mv-playground-v0-leaderboard-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mv-playground-v0-leaderboard-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.875rem;
}

.mv-playground-v0-leaderboard-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.mv-playground-v0-leaderboard-rank {
  width: 1.25rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: color-mix(in srgb, var(--mv-biz-muted-fg) 70%, transparent);
}

.mv-playground-v0-leaderboard-name {
  font-weight: 500;
  color: var(--mv-biz-foreground);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mv-playground-v0-leaderboard-meta {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--mv-biz-muted-fg);
}

.mv-playground-v0-leaderboard-score {
  font-weight: 700;
  color: var(--mv-biz-primary);
  font-variant-numeric: tabular-nums;
}

.mv-playground-v0-leaderboard-empty {
  margin: 0;
  font-size: 0.875rem;
  color: var(--mv-biz-muted-fg);
}

.mv-playground-v0-village-cta {
  margin-top: 3rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem 1.5rem;
  border-radius: 1.25rem;
  border: 1px solid color-mix(in srgb, var(--mv-biz-primary) 20%, transparent);
  background: color-mix(in srgb, var(--mv-biz-primary) 6%, var(--mv-biz-card));
}

.mv-playground-v0-village-cta__icon {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  background: color-mix(in srgb, var(--mv-biz-primary) 12%, transparent);
  color: var(--mv-biz-primary);
}

.mv-playground-v0-village-cta__title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--mv-biz-foreground);
}

.mv-playground-v0-village-cta__text {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--mv-biz-muted-fg);
}

.mv-biz-v0.mv-playground-v0 a.mv-playground-v0-leaderboard-card__play {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: auto;
  border-radius: 0.75rem;
  padding: 0.7rem 1rem;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid #1b4332;
  background: #ffffff;
  color: #1b4332;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.mv-biz-v0.mv-playground-v0 a.mv-playground-v0-leaderboard-card__play:hover,
.mv-biz-v0.mv-playground-v0 a.mv-playground-v0-leaderboard-card__play:focus-visible {
  background: #1b4332;
  border-color: #1b4332;
  color: #f7f5f0;
  text-decoration: none;
}

/* ── Dark appearance (global Light / Dark / System) ── */
/* Light card rules above stay hardcoded so light mode is unchanged. */
/* Dark: use shared .mv-biz-v0 tokens (set in businesses_v0.css). */
/* Page shell dark background is handled by businesses_v0.css
   (dark theme body:has(.mv-biz-v0) page shell + token redefinition on .mv-biz-v0). */

[data-theme="myvillage-dark"] .mv-playground-v0-hero-frame {
  border-color: var(--mv-biz-border);
  background: var(--mv-biz-card);
  box-shadow: 0 24px 50px -28px rgba(0, 0, 0, 0.55);
}

[data-theme="myvillage-dark"] .mv-biz-v0.mv-playground-v0 .mv-playground-v0-game-card {
  border-color: var(--mv-biz-border);
  background: var(--mv-biz-card);
  box-shadow: 0 10px 26px -22px rgba(0, 0, 0, 0.55);
  color: var(--mv-biz-foreground);
}

[data-theme="myvillage-dark"] .mv-biz-v0.mv-playground-v0 a.mv-playground-v0-game-card:hover {
  border-color: color-mix(in srgb, var(--mv-biz-accent) 45%, var(--mv-biz-border));
  box-shadow: 0 20px 40px -22px rgba(0, 0, 0, 0.6);
  color: var(--mv-biz-foreground);
}

[data-theme="myvillage-dark"] .mv-playground-v0-game-card__media {
  background: var(--mv-biz-secondary);
}

[data-theme="myvillage-dark"] .mv-playground-v0-game-card__play {
  background: var(--mv-biz-primary);
  color: var(--mv-biz-primary-fg);
}

[data-theme="myvillage-dark"] .mv-playground-v0-game-card__soon {
  background: var(--mv-biz-secondary);
  color: var(--mv-biz-muted-fg);
}

[data-theme="myvillage-dark"] .mv-playground-v0-game-card__title {
  color: var(--mv-biz-foreground);
}

[data-theme="myvillage-dark"] .mv-playground-v0-game-card__desc {
  color: var(--mv-biz-muted-fg);
}

[data-theme="myvillage-dark"] .mv-biz-v0.mv-playground-v0 .mv-playground-v0-leaderboard-card {
  border-color: var(--mv-biz-border);
  background: var(--mv-biz-card);
  box-shadow: 0 12px 30px -24px rgba(0, 0, 0, 0.5);
}

[data-theme="myvillage-dark"] .mv-biz-v0.mv-playground-v0 a.mv-playground-v0-leaderboard-card__play {
  border-color: var(--mv-biz-primary);
  background: transparent;
  color: var(--mv-biz-primary);
}

[data-theme="myvillage-dark"] .mv-biz-v0.mv-playground-v0 a.mv-playground-v0-leaderboard-card__play:hover,
[data-theme="myvillage-dark"] .mv-biz-v0.mv-playground-v0 a.mv-playground-v0-leaderboard-card__play:focus-visible {
  background: var(--mv-biz-primary);
  border-color: var(--mv-biz-primary);
  color: var(--mv-biz-primary-fg);
}

/* Soften village CTA edge on small screens; keep bottom safe-area clear of home indicator */
@media (max-width: 639px) {
  .mv-playground-v0 .mv-biz-v0-directory {
    padding-bottom: calc(6rem + env(safe-area-inset-bottom, 0px));
  }

  /* The mobile shell removes the directory gutter (businesses list runs edge to
     edge); the games grid needs it back so cards don't touch the screen edge. */
  body.mv-mobile-shell-on .mv-playground-v0 .mv-biz-v0-directory {
    padding-inline: 1rem;
  }

  .mv-playground-v0-village-cta {
    padding: 1.1rem 1.15rem;
  }
}
