/* Wizzymoon brand: purple and moon-yellow on cream by day, on night-sky
   purple in the dark. */
:root {
  --purple: #5b30b0;
  --purple-deep: #43208c;
  --yellow: #fcc838;
  --yellow-deep: #e9a90f;
  --bg: #fbf6f0;
  --surface: #ffffff;
  --ink: #2a1b5c;
  --muted: #6e6390;
  --line: #ece4f7;
  --chip: #efe7fb;
  --shadow: 0 6px 0 #e7dcf6, 0 18px 30px rgba(67, 32, 140, 0.08);
  --logo-blend: multiply;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #22164c;
    --surface: #2e2166;
    --ink: #f6f0ff;
    --muted: #b9addf;
    --line: #3e2f80;
    --chip: #3a2b7a;
    --shadow: 0 6px 0 #170e38, 0 18px 30px rgba(0, 0, 0, 0.25);
    --logo-blend: normal;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  padding-inline: max(16px, env(safe-area-inset-left, 0px));
}

body.playing { overflow: hidden; }

h1, strong, .wordmark, .surprise, .chip { font-family: "Fredoka", "Nunito", system-ui, sans-serif; }

a { color: inherit; }

:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 12px; }

/* ---------- Top bar ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1120px;
  margin: 0 auto;
  padding-block: calc(env(safe-area-inset-top, 0px) + 14px) 6px;
}

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { border-radius: 11px; }

.wordmark { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.01em; color: var(--purple); }
.wordmark em { font-style: normal; color: var(--yellow-deep); }

@media (prefers-color-scheme: dark) {
  .wordmark { color: #fff; }
  .wordmark em { color: var(--yellow); }
}

.surprise {
  padding: 0.5rem 1rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--purple-deep);
  background: var(--yellow);
  border-radius: 999px;
  box-shadow: 0 4px 0 var(--yellow-deep);
  transition: transform 0.08s, box-shadow 0.08s;
}

.surprise:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--yellow-deep); }

.topbar-actions { display: flex; align-items: center; gap: 8px; }

.account { position: relative; }

.account-btn {
  max-width: 11rem;
  padding: 0.5rem 1rem;
  overflow: hidden;
  font: 600 1rem "Fredoka", "Nunito", system-ui, sans-serif;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--purple);
  background: var(--chip);
  border: none;
  border-radius: 999px;
  cursor: pointer;
}

@media (prefers-color-scheme: dark) {
  .account-btn { color: #fff; }
}

.account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 5;
  width: 15rem;
  padding: 14px;
  background: var(--surface);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.account-menu[hidden] { display: none; }
.account-menu p { margin: 0 0 10px; font-size: 0.95rem; line-height: 1.35; color: var(--muted); }
.account-menu strong { color: var(--ink); }

.account-menu button {
  width: 100%;
  padding: 0.5rem;
  font: 600 1rem "Fredoka", system-ui, sans-serif;
  color: #c62828;
  background: #fdecea;
  border: none;
  border-radius: 999px;
  cursor: pointer;
}

.account-link {
  display: block;
  margin-bottom: 8px;
  padding: 0.5rem;
  font: 600 1rem "Fredoka", system-ui, sans-serif;
  text-align: center;
  text-decoration: none;
  color: var(--purple-deep);
  background: var(--yellow);
  border-radius: 999px;
}

/* ---------- Languages ---------- */

.lang-menu { position: relative; }

.lang-menu summary {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0.45rem 0.8rem;
  font: 600 0.95rem "Fredoka", system-ui, sans-serif;
  color: var(--purple);
  list-style: none;
  background: var(--chip);
  border-radius: 999px;
  cursor: pointer;
}

.lang-menu summary::-webkit-details-marker { display: none; }

.lang-menu ul {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 6;
  min-width: 10rem;
  margin: 0;
  padding: 8px;
  list-style: none;
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.lang-menu a { display: block; padding: 8px 12px; font-weight: 800; color: var(--ink); text-decoration: none; border-radius: 10px; }
.lang-menu a:hover { background: var(--chip); }
.lang-menu a[aria-current] { color: #fff; background: var(--purple); }

@media (prefers-color-scheme: dark) {
  .lang-menu summary { color: #fff; }
}

.lang-offer {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 10px 12px 10px 18px;
  font-weight: 800;
  color: #fff;
  background: #22164c;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  translate: -50% 0;
}

.lang-offer a { padding: 0.35rem 0.9rem; color: #22164c; text-decoration: none; background: var(--yellow); border-radius: 999px; }
.lang-offer button { padding: 0.35rem 0.6rem; font: inherit; color: #d9d0f5; background: none; border: none; cursor: pointer; }

/* ---------- Hero ---------- */

.hero {
  max-width: 1120px;
  margin: 0 auto;
  padding-block: 4px 12px;
  text-align: center;
}

.hero-logo {
  display: block;
  width: min(100%, 560px);
  height: auto;
  margin: 0 auto;
  mix-blend-mode: var(--logo-blend);
}

.hero-text {
  max-width: 34rem;
  margin: 0.25rem auto 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--muted);
  text-wrap: balance;
}

/* ---------- Catalogue ---------- */

.catalogue { max-width: 1120px; margin: 0 auto; padding-block: 24px 40px; }

.catalogue-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: 18px;
}

.catalogue h1 { margin: 0; font-size: 1.9rem; font-weight: 700; color: var(--purple); line-height: 1.1; }

@media (prefers-color-scheme: dark) {
  .catalogue h1 { color: #fff; }
}

#count {
  display: inline-grid;
  place-items: center;
  min-width: 2rem;
  height: 2rem;
  margin-left: 4px;
  padding: 0 0.5rem;
  font-size: 1rem;
  vertical-align: middle;
  color: var(--purple-deep);
  background: var(--yellow);
  border-radius: 999px;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  padding: 0.4rem 0.95rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--purple);
  background: var(--chip);
  border: none;
  border-radius: 999px;
  cursor: pointer;
}

@media (prefers-color-scheme: dark) {
  .chip { color: #e6dcff; }
}

.chip[aria-selected="true"] { color: #fff; background: var(--purple); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 100%;
  padding: 16px;
  text-decoration: none;
  background: var(--surface);
  border-radius: 26px;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover { transform: translateY(-3px); }
.card:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--line); }

.card img {
  flex: none;
  width: 96px;
  height: 96px;
  border-radius: 22px;
  box-shadow: 0 6px 14px color-mix(in srgb, var(--tint) 35%, transparent);
  transition: transform 0.2s cubic-bezier(0.3, 1.6, 0.5, 1);
}

.card:hover img { transform: rotate(-6deg) scale(1.05); }

.card-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding-right: 26px; }

.card-tag {
  align-self: flex-start;
  padding: 0 0.55rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tint);
  background: color-mix(in srgb, var(--tint) 14%, transparent);
  border-radius: 999px;
  filter: saturate(1.2) brightness(0.8);
}

@media (prefers-color-scheme: dark) {
  .card-tag { filter: saturate(1.1) brightness(1.25); }
}

.card strong { font-size: 1.35rem; font-weight: 600; line-height: 1.15; }
.card-blurb { font-size: 0.95rem; line-height: 1.35; color: var(--muted); }

.card-plays { margin-top: 2px; font-size: 0.8rem; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }

.card-play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding-left: 3px;
  font-size: 0.8rem;
  color: var(--purple-deep);
  background: var(--yellow);
  border-radius: 50%;
}

/* ---------- Player ---------- */

.player {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  background: #22164c;
}

.player[hidden] { display: none; }

.player-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) max(12px, env(safe-area-inset-right, 0px)) 8px max(12px, env(safe-area-inset-left, 0px));
  color: #fff;
  background: linear-gradient(90deg, #22164c, color-mix(in srgb, var(--tint, #5b30b0) 55%, #22164c));
}

.player-back, .player-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  font: 600 1rem "Fredoka", system-ui, sans-serif;
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.14);
  border: none;
  border-radius: 999px;
  cursor: pointer;
}

.player-btn { width: 38px; padding: 0; font-size: 1.1rem; }
.player-back:hover, .player-btn:hover { background: rgba(255, 255, 255, 0.24); }
.player-actions { display: flex; gap: 8px; }

.player-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font: 600 1.15rem "Fredoka", system-ui, sans-serif;
}

.player-title img { flex: none; border-radius: 8px; }
.player-title span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.player-stage { position: relative; flex: 1; min-height: 0; }

.player-stage iframe { display: block; width: 100%; height: 100%; border: 0; background: #22164c; }

.player-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  font: 600 1.1rem "Fredoka", system-ui, sans-serif;
  color: #fff;
  pointer-events: none;
}

.player-loading[hidden] { display: none; }
.player-loading img { border-radius: 24px; animation: bob 1.4s ease-in-out infinite; }
.player-loading p { margin: 0; }

@keyframes bob {
  50% { transform: translateY(-10px) rotate(-4deg); }
}

/* ---------- Profile and account pages ---------- */

.back-link { font: 600 1rem "Fredoka", system-ui, sans-serif; text-decoration: none; color: var(--muted); }

.profile {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 640px;
  margin: 0 auto;
  padding-block: 16px calc(env(safe-area-inset-bottom, 0px) + 40px);
}

#logged-in { display: flex; flex-direction: column; gap: 16px; }
#logged-in[hidden], .profile [hidden] { display: none; }

.panel {
  padding: 20px;
  background: var(--surface);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.panel h1, .panel h2 { margin: 0; font-family: "Fredoka", "Nunito", system-ui, sans-serif; line-height: 1.15; }
.panel h1 { font-size: 1.8rem; font-weight: 700; color: var(--purple); }
.panel h2 { margin-bottom: 8px; font-size: 1.25rem; font-weight: 600; }
.center { text-align: center; }
.center .actions, .actions.center { justify-content: center; }
.moon { border-radius: 24px; }
.muted { margin: 0; color: var(--muted); }
.small { font-size: 0.9rem; }

@media (prefers-color-scheme: dark) {
  .panel h1 { color: #fff; }
}

.profile-head { display: flex; align-items: center; gap: 16px; }

.avatar {
  display: grid;
  flex: none;
  place-items: center;
  width: 72px;
  height: 72px;
  font: 700 2.2rem "Fredoka", system-ui, sans-serif;
  color: #fff;
  background: linear-gradient(135deg, #7a4ae0, var(--purple-deep));
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--yellow);
}

.rows { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 0; padding: 0; list-style: none; }

.rows li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: 16px;
}

.rows img { flex: none; border-radius: 10px; }
.rows .empty { display: block; color: var(--muted); }
.grow { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.grow strong { overflow: hidden; text-overflow: ellipsis; }
.score { font: 700 1.4rem "Fredoka", system-ui, sans-serif; color: var(--purple); font-variant-numeric: tabular-nums; }
.device-flag { font-size: 1.6rem; line-height: 1; }

@media (prefers-color-scheme: dark) {
  .score { color: var(--yellow); }
}

.tag {
  padding: 2px 10px;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--purple-deep);
  background: var(--yellow);
  border-radius: 999px;
}

.stack { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; text-align: left; }
.stack label { display: flex; flex-direction: column; gap: 4px; font-weight: 700; }

.stack input {
  padding: 11px 14px;
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 2px solid var(--line);
  border-radius: 14px;
}

.stack input:focus { border-color: var(--purple); outline: none; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.btn-yellow, .btn-plain, .btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.2rem;
  font: 600 1rem "Fredoka", system-ui, sans-serif;
  text-decoration: none;
  border: none;
  border-radius: 999px;
  cursor: pointer;
}

.btn-yellow { color: var(--purple-deep); background: var(--yellow); box-shadow: 0 4px 0 var(--yellow-deep); }
.btn-yellow:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--yellow-deep); }
.btn-plain { color: var(--purple); background: var(--chip); }
.btn-danger, .btn-plain.danger { color: #c62828; background: #fdecea; }
.btn-plain.small { padding: 0.35rem 0.9rem; font-size: 0.9rem; }
.panel .btn-yellow { margin-top: 12px; }
.stack .btn-yellow { margin-top: 0; }
button:disabled { opacity: 0.6; cursor: default; }

@media (prefers-color-scheme: dark) {
  .btn-plain { color: #e6dcff; }
}

.form-note { margin: 0; padding: 8px 12px; font-size: 0.9rem; font-weight: 700; color: #c62828; background: #fdecea; border-radius: 12px; }
.form-note.ok { color: #1b6e46; background: #e3f7ec; }

.email-box {
  display: flex;
  padding: 12px 14px;
  background: var(--bg);
  border: 2px dashed var(--line);
  border-radius: 16px;
}

.email-box.verified { border: 2px solid #3fbf7f; }
.email-box .small { color: var(--muted); }

details summary { list-style: none; cursor: pointer; }
details summary::-webkit-details-marker { display: none; }
details summary h2 { display: inline; }
details[open] summary { margin-bottom: 8px; }

/* ---------- Home page extras ---------- */

.hero-title {
  margin: 0.25rem 0 0;
  font: 700 1.6rem "Fredoka", "Nunito", system-ui, sans-serif;
  color: var(--purple);
  text-wrap: balance;
}

@media (prefers-color-scheme: dark) {
  .hero-title { color: #fff; }
}

.grid li { position: relative; }

.card-info {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  font: italic 700 0.95rem "Fredoka", system-ui, sans-serif;
  text-decoration: none;
  color: var(--purple);
  background: var(--chip);
  border-radius: 50%;
}

.card-info:hover { color: #fff; background: var(--purple); }

@media (prefers-color-scheme: dark) {
  .card-info { color: #e6dcff; }
}

.why {
  max-width: 1120px;
  margin: 0 auto 32px;
  padding: 22px 24px;
  background: var(--surface);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.why h2 { margin: 0 0 8px; font: 600 1.4rem "Fredoka", system-ui, sans-serif; }
.why ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px 24px; margin: 0; padding-left: 1.1rem; }
.why p { margin: 12px 0 0; }
.why a { color: var(--purple); font-weight: 800; }

@media (prefers-color-scheme: dark) {
  .why a { color: var(--yellow); }
}

.browse .chip-links { margin-top: 6px; }
.browse-label { margin: 12px 0 0 !important; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* ---------- Footer: a night-sky panel, the same in both themes ---------- */

.site-footer {
  position: relative;
  max-width: 1120px;
  margin: 24px auto calc(env(safe-area-inset-bottom, 0px) + 20px);
  padding: 32px 32px 20px;
  overflow: hidden;
  color: #d9d0f5;
  background:
    radial-gradient(circle at 12% 18%, rgba(252, 200, 56, 0.9) 0 2px, transparent 3px),
    radial-gradient(circle at 78% 12%, rgba(255, 255, 255, 0.7) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 92% 64%, rgba(252, 200, 56, 0.7) 0 2px, transparent 3px),
    radial-gradient(circle at 46% 88%, rgba(255, 255, 255, 0.5) 0 1.5px, transparent 2.5px),
    linear-gradient(160deg, #2e1f6b, #1a1140 70%);
  border-radius: 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr 1.75fr 0.9fr;
  gap: 28px;
}

.site-footer .wordmark { color: #fff; }
.site-footer .wordmark em { color: var(--yellow); }
.footer-brand p { margin: 12px 0; line-height: 1.5; }

.footer-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }

.footer-badges li {
  padding: 2px 10px;
  font-size: 0.8rem;
  font-weight: 800;
  color: #22164c;
  background: var(--yellow);
  border-radius: 999px;
}

.footer-col h2 {
  margin: 4px 0 12px;
  font: 600 0.8rem "Fredoka", system-ui, sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--yellow);
}

.footer-col ul { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.footer-games ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; }

.footer-col a {
  display: inline-flex;
  white-space: nowrap;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
}

.footer-col a:hover { color: var(--yellow); }
.footer-col img { flex: none; border-radius: 6px; }
.footer-emoji { width: 22px; text-align: center; }

.footer-ages { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 24px; font-weight: 800; }
.footer-ages span { margin-right: 4px; font: 600 0.8rem "Fredoka", system-ui, sans-serif; letter-spacing: 0.1em; text-transform: uppercase; color: var(--yellow); }

.footer-ages a {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
}

.footer-ages a:hover { color: #22164c; background: var(--yellow); }

.chip-links a[aria-current="page"] { color: #fff; background: var(--purple); }

.footer-langs { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 14px; }
.footer-langs a { font-weight: 800; color: #fff; text-decoration: none; }
.footer-langs a:hover { color: var(--yellow); }

.footer-bottom {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  padding-top: 16px;
  font-size: 0.9rem;
  font-weight: 700;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-bottom img { border-radius: 12px; }
.footer-bottom p { margin: 0; }
.footer-bottom a { color: #fff; }

/* ---------- Game info, category and about pages ---------- */

.info {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 820px;
  margin: 0 auto;
  padding-block: 8px 16px;
}

.info.wide { max-width: 1120px; }

.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 0.85rem; font-weight: 800; }
.crumbs li { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.crumbs li + li::before { content: "›"; }
.crumbs a { padding: 2px 10px; color: var(--purple); text-decoration: none; background: var(--chip); border-radius: 999px; }

@media (prefers-color-scheme: dark) {
  .crumbs a { color: #e6dcff; }
}

/* The hero takes the game's own colours, darkened towards the night sky so
   white text reads on every game. */
.info-hero {
  --hero-a: color-mix(in srgb, var(--tint-dark, #5b30b0) 82%, #22164c);
  --hero-b: color-mix(in srgb, var(--tint-dark, #5b30b0) 45%, #22164c);
  position: relative;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 32px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 88% 20%, rgba(252, 200, 56, 0.85) 0 2px, transparent 3px),
    radial-gradient(circle at 70% 85%, rgba(255, 255, 255, 0.6) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 96% 70%, rgba(255, 255, 255, 0.5) 0 1.5px, transparent 2.5px),
    radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--tint, #7a4ae0) 70%, transparent), transparent 60%),
    linear-gradient(135deg, var(--hero-a), var(--hero-b));
  border-radius: 32px;
  box-shadow: 0 10px 30px color-mix(in srgb, var(--tint-dark, #5b30b0) 35%, transparent);
}

.info-icon {
  flex: none;
  width: 168px;
  height: 168px;
  border-radius: 38px;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.18), 0 14px 30px rgba(0, 0, 0, 0.3);
  transform: rotate(-5deg);
}

.info-hero-text { min-width: 0; }

.eyebrow { margin: 0 0 6px; font: 600 0.9rem "Fredoka", system-ui, sans-serif; letter-spacing: 0.04em; color: var(--yellow); }
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }

.info-hero h1 {
  margin: 0;
  font: 700 2.8rem "Fredoka", "Nunito", system-ui, sans-serif;
  line-height: 1.02;
  text-wrap: balance;
}

.info-hero .lead { margin: 10px 0 0; max-width: 52ch; font-size: 1.1rem; font-weight: 700; line-height: 1.45; color: rgba(255, 255, 255, 0.88); }
.info-hero .actions { margin-top: 18px; }

.btn-ghost-light {
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 1.2rem;
  font: 600 1rem "Fredoka", system-ui, sans-serif;
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.14);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
}

.btn-ghost-light:hover { background: rgba(255, 255, 255, 0.24); }

.category-emoji {
  display: grid;
  flex: none;
  place-items: center;
  width: 140px;
  height: 140px;
  font-size: 4.5rem;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 36px;
  transform: rotate(-5deg);
}

.badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; padding: 0; list-style: none; }

.badges li {
  padding: 3px 12px;
  font-size: 0.85rem;
  font-weight: 800;
  color: #22164c;
  background: var(--yellow);
  border-radius: 999px;
}

.btn-yellow.big { padding: 0.8rem 1.6rem; font-size: 1.2rem; }
.btn-yellow.small, .btn-plain.small { margin: 0; padding: 0.45rem 1rem; font-size: 0.95rem; }
.info .actions .btn-yellow { margin-top: 0; }

/* Four quick facts, always in one even row (two on phones). */
.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.facts li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.facts span { font-size: 1.5rem; line-height: 1; margin-bottom: 4px; }
.facts strong { font: 600 1.1rem "Fredoka", system-ui, sans-serif; line-height: 1.2; }
.facts small { font-size: 0.85rem; line-height: 1.3; color: var(--muted); }

/* Phone-shaped screenshots, side by side. */
.shots { display: flex; justify-content: center; gap: 20px; }
.shots figure { flex: 0 1 260px; margin: 0; text-align: center; }

.shots img {
  display: block;
  width: 100%;
  height: auto;
  border: 7px solid #1a1140;
  border-radius: 30px;
  box-shadow: 0 14px 30px rgba(26, 17, 64, 0.3);
}

.shots figcaption { margin-top: 8px; font: 600 0.95rem "Fredoka", system-ui, sans-serif; color: var(--muted); }

.info .panel h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 1.45rem;
}

.h-badge {
  display: grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 40px;
  font-size: 1.25rem;
  background: color-mix(in srgb, var(--tint, #7a4ae0) 18%, var(--bg));
  border-radius: 12px;
}

.prose { line-height: 1.65; }
.prose p { margin: 0 0 12px; max-width: 68ch; }
.prose p:last-child { margin-bottom: 0; }
.prose a { color: var(--purple); font-weight: 800; }

@media (prefers-color-scheme: dark) {
  .prose a { color: var(--yellow); }
}

/* How to play: numbered steps, since the order matters. */
.steps { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: step; }

.steps li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 14px;
  line-height: 1.5;
  background: var(--bg);
  border-radius: 16px;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: grid;
  flex: none;
  place-items: center;
  width: 30px;
  height: 30px;
  font: 700 1rem "Fredoka", system-ui, sans-serif;
  color: #fff;
  background: color-mix(in srgb, var(--tint-dark, #5b30b0) 85%, #22164c);
  border-radius: 50%;
}

.skill-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }

.skill-grid li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  line-height: 1.45;
  background: var(--bg);
  border-radius: 16px;
}

.skill-grid strong { font: 600 1.1rem "Fredoka", system-ui, sans-serif; color: var(--purple); }
.skill-grid span { color: var(--muted); }

@media (prefers-color-scheme: dark) {
  .skill-grid strong { color: var(--yellow); }
}

.tips { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.tips li { display: flex; gap: 10px; line-height: 1.5; }
.tips li::before { content: "✦"; flex: none; color: var(--yellow-deep); }

.faq { display: flex; flex-direction: column; gap: 8px; }
.faq details { background: var(--bg); border-radius: 16px; }

.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  font-weight: 800;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  flex: none;
  font: 700 1.3rem/1 "Fredoka", system-ui, sans-serif;
  color: var(--purple);
}

.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0; padding: 0 16px 16px; line-height: 1.55; color: var(--muted); }

@media (prefers-color-scheme: dark) {
  .faq summary::after { color: var(--yellow); }
}

.cta {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
  color: #fff;
  background: linear-gradient(135deg, color-mix(in srgb, var(--tint-dark, #5b30b0) 80%, #22164c), #22164c);
  border-radius: 28px;
}

.cta img { flex: none; border-radius: 18px; }
.cta div { flex: 1; min-width: 0; }
.cta h2 { margin: 0; font: 600 1.4rem "Fredoka", system-ui, sans-serif; }
.cta p { margin: 4px 0 0; color: rgba(255, 255, 255, 0.8); }

.section-title { margin: 8px 0 12px; font: 600 1.5rem "Fredoka", system-ui, sans-serif; }

.game-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.game-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: var(--surface);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.game-card-head { display: flex; align-items: center; gap: 14px; color: var(--ink); text-decoration: none; }
.game-card-head img { flex: none; border-radius: 16px; box-shadow: 0 6px 14px color-mix(in srgb, var(--tint) 35%, transparent); }
.game-card-head strong { display: block; font: 600 1.3rem "Fredoka", system-ui, sans-serif; line-height: 1.15; }
.game-card-head:hover strong { text-decoration: underline; }
.game-card-meta { font-size: 0.85rem; font-weight: 800; color: var(--muted); }
.game-card p { flex: 1; margin: 0; font-size: 0.95rem; line-height: 1.45; color: var(--muted); }
.game-card-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.guide-emoji {
  display: grid;
  flex: none;
  place-items: center;
  width: 64px;
  height: 64px;
  font-size: 2rem;
  background: var(--chip);
  border-radius: 16px;
}

.info-hero .updated { margin: 12px 0 0; font-size: 0.9rem; font-weight: 700; color: rgba(255, 255, 255, 0.75); }

.article h2 { margin: 28px 0 10px; font-size: 1.4rem; }
.article h2:first-child { margin-top: 0; }
.article ul { display: flex; flex-direction: column; gap: 4px; margin: 0 0 12px; }

.chip-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }

.chip-links a {
  display: inline-flex;
  gap: 6px;
  padding: 0.45rem 1rem;
  font-weight: 800;
  color: var(--purple);
  text-decoration: none;
  background: var(--chip);
  border-radius: 999px;
}

.chip-links a:hover { color: #fff; background: var(--purple); }

@media (prefers-color-scheme: dark) {
  .chip-links a { color: #e6dcff; }
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Phones ---------- */

@media (max-width: 560px) {
  .wordmark { font-size: 1.35rem; }
  .surprise { padding: 0.4rem 0.8rem; font-size: 0.95rem; }
  .surprise-label { display: none; }
  .account-btn { max-width: 8rem; padding: 0.4rem 0.8rem; font-size: 0.95rem; }
  .hero-text { font-size: 1rem; }
  .catalogue h1 { font-size: 1.5rem; }
  .grid { grid-template-columns: 1fr; gap: 14px; }
  .card { padding: 12px; gap: 12px; border-radius: 22px; }
  .card img { width: 76px; height: 76px; border-radius: 18px; }
  .card strong { font-size: 1.2rem; }
  .player-back span { display: none; }
  .hero-title { font-size: 1.3rem; }
  .info-hero { flex-direction: column; align-items: flex-start; gap: 16px; padding: 22px; border-radius: 26px; }
  .info-icon { width: 104px; height: 104px; border-radius: 26px; }
  .category-emoji { width: 96px; height: 96px; font-size: 3rem; border-radius: 26px; }
  .info-hero h1 { font-size: 2.1rem; }
  .info-hero .actions .btn-yellow { width: 100%; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skill-grid { grid-template-columns: 1fr; }
  .shots { gap: 12px; }
  .shots figure { flex-basis: 165px; }
  .shots img { border-width: 5px; border-radius: 22px; }
  .cta { flex-direction: column; text-align: center; }
  .cta .btn-yellow { width: 100%; }
  .game-cards { grid-template-columns: 1fr; }
  .site-footer { padding: 26px 20px 18px; border-radius: 26px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
