:root{color-scheme:dark;--bg:#050e21;--panel:#101e3d;--text:#f4f9ff;--muted:#b9cee8;--gold:#ffd64a;--line:#27486e;font:16px/1.5 system-ui,sans-serif}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text)}[hidden]{display:none!important}header,footer{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;padding:15px max(5vw,16px);border-bottom:1px solid var(--line)}footer{border-top:1px solid var(--line);border-bottom:0;color:var(--muted)}.brand{display:flex;gap:8px;align-items:center;color:inherit;text-decoration:none;font-weight:900;letter-spacing:.05em}.brand span{color:var(--gold)}main{width:min(1100px,92vw);margin:24px auto 48px}.hero{display:grid;grid-template-columns:1.15fr 1fr;align-items:center;overflow:hidden;background:radial-gradient(ellipse at 85% 35%,#634583,#32264f 54%,#26203b);border:1px solid #226799;border-radius:26px;padding:clamp(22px,5vw,60px);min-height:340px}.hero h1,#play h1{font-size:clamp(2.4rem,7vw,5.7rem);line-height:.93;letter-spacing:-.06em;margin:0}.hero em{color:var(--gold);font-style:normal}.hero p,article p{color:var(--muted)}.hero-art{font-size:clamp(84px,23vw,280px);line-height:1;text-align:center;color:var(--gold);text-shadow:0 0 44px #ffc86f88,28px 24px #a562ed80;transform:rotate(-12deg)}.cta,button{display:inline-block;border:1px solid var(--line);border-radius:10px;padding:9px 14px;background:#10294e;color:inherit;cursor:pointer;font:inherit;font-weight:650;text-decoration:none}.cta,button[aria-pressed=true]{color:#131e33;background:var(--gold);border-color:var(--gold)}:focus-visible{outline:3px solid #65e7ff;outline-offset:3px}h2{margin-bottom:12px}nav{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}.games{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:16px}article{border:1px solid var(--line);background:var(--panel);border-radius:17px;overflow:hidden}article .detail{padding:16px}article h3,article p{margin:0 0 8px}.cover{height:140px;display:grid;place-items:center;font-size:66px;color:white;background:radial-gradient(circle at 53% 55%,var(--tile),#0b1937 78%);text-shadow:0 6px 16px #141326}.tag{color:var(--gold);font-size:.85rem}#play h1{margin-top:20px;font-size:clamp(2rem,6vw,4rem)}#board{margin:16px 0;min-height:110px;max-width:720px}#board canvas{width:100%;display:block;border-radius:14px;touch-action:none;background:#101e3d}.choices{display:flex;flex-wrap:wrap;gap:12px}.choices button{min-width:72px;min-height:56px;font-size:1.2rem}dialog{max-width:min(90vw,430px);border:1px solid var(--line);border-radius:18px;background:var(--panel);color:var(--text);padding:24px}dialog::backdrop{background:#030d20d9}label{display:block;margin:10px 0}input{font:inherit;border:1px solid var(--line);border-radius:6px;padding:5px;max-width:130px}@media(max-width:540px){.hero{min-height:260px;grid-template-columns:1fr auto}.hero-art{font-size:70px}.brand{font-size:.8rem}header button{padding:6px 8px}}
.pattern{display:flex;flex-wrap:wrap;gap:8px;padding:0;list-style:none}.pattern li{display:grid;place-items:center;width:44px;height:44px;border:1px solid var(--line);border-radius:10px;background:var(--panel);font-size:1.35rem;color:var(--gold)}

/* Distinct visuals for the learning games and the arcade collection. */
:root {
  --cyan: #65e7ff;
}
body { background: radial-gradient(ellipse at 85% 0, #08315c, transparent 45rem), var(--bg); }
header { background: #061326; }
.hero {
  isolation: isolate;
  position: relative;
  background: radial-gradient(ellipse at 78% 40%, #0756a4, #0a2b60 62%, #071a39);
  min-height: 370px;
}
.hero > div:first-child { position: relative; z-index: 1; }
.hero p { max-width: 34ch; }
.hero-art { position: relative; display: grid; place-items: center; min-height: 230px; transform: none; }
.hero-art span {
  position: relative;
  z-index: 1;
  transform: rotate(-14deg);
  text-shadow: 0 0 40px #eaaa6d8c, 10px 14px #043370;
}
.hero-art i, .hero-art b {
  position: absolute;
  width: 90%;
  aspect-ratio: 2.2;
  border: 2px solid #5ee6ffc9;
  border-radius: 50%;
  transform: rotate(-35deg);
  box-shadow: 0 0 22px #19c7ff77;
}
.hero-art b { width: 68%; transform: rotate(35deg); border-color: #ceeaffaa; }
#library { margin-top: 28px; }
#filters button { border-radius: 999px; min-height: 44px; }
article .cover { position: relative; overflow: hidden; isolation: isolate; height: 150px; }
article .cover::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: .25;
  background: repeating-linear-gradient(135deg, transparent 0 17px, #ffffff44 18px 19px);
  mask-image: radial-gradient(ellipse, transparent 25%, black);
}
article[data-category="Kids"] { background: #263443; border-color: #47666b; }
article[data-category="Kids"] .cover {
  background: radial-gradient(circle at 52% 50%, var(--tile), #273c40 90%);
  text-shadow: 0 4px 0 #19263788;
}
article[data-category="Kids"] .cover::before {
  background: radial-gradient(circle, #ffeab6 1.5px, transparent 2.5px) 0 0 / 21px 21px;
}
article[data-category="Kids"] .tag { color: #b8f5ce; }
article[data-category="Kids"] button, #play[data-category="Kids"] .choices button {
  color: #172a29;
  background: #b8f5ce;
  border-color: #b8f5ce;
  min-height: 48px;
}
article[data-category="Premium Elite"] { border-color: #a67a29; }
article button:disabled { opacity: .7; cursor: default; }
#play[data-category="Kids"] .choices button { min-width: 88px; min-height: 60px; }
#play[data-category="Kids"] .pattern li { background: #263443; border-color: #47666b; }
@media (max-width: 540px) {
  .hero { min-height: 270px; }
  .hero-art { min-height: 110px; width: clamp(64px, 19vw, 100px); }
  .hero-art span { font-size: clamp(48px, 14vw, 80px); }
  .hero h1 { font-size: clamp(2rem, 9vw, 3rem); }
}
.brand img{display:block;width:clamp(116px,18vw,180px);height:auto}

header { border-bottom-color: #225481; }
.hero em { color: var(--cyan); }
#filters button:not([aria-pressed="true"]):hover,
header button:hover { border-color: var(--cyan); }
article[data-category="General"] { border-color: #286da2; }
article[data-category="General"] .tag { color: var(--cyan); }
article[data-category="Premium Elite"] .tag { color: var(--gold); }
.courier-maze {
  display: grid;
  grid-template-columns: repeat(var(--maze-size), 1fr);
  width: min(100%, 410px);
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid #286da2;
  border-radius: 12px;
  background: #08152e;
}
.courier-maze span { display: grid; place-items: center; aspect-ratio: 1; min-width: 0; line-height: 1; }
.courier-wall { background: #163356; box-shadow: inset 0 0 0 1px #214467; }
.courier-floor { background: #08162d; }
.courier-goal { color: var(--gold); }
.courier-player::after { content: ''; width: 62%; aspect-ratio: 1; border-radius: 25%; background: var(--cyan); box-shadow: 0 0 8px #65e7ffb0; }

#play[data-category="Kids"] .choices .paint-swatch {
  min-width: 54px;
  min-height: 48px;
  background: var(--paint-color);
  border: 2px solid #080f20;
}
#play[data-category="Kids"] .choices .paint-swatch[aria-pressed="true"] { outline: 2px solid white; outline-offset: 2px; }
.paint-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
  width: min(100%, 420px);
  margin-top: 16px;
}
.paint-grid > * { aspect-ratio: 1; }
.paint-grid button { padding: 0; background: #102b47; border: 1px solid #527898; border-radius: 6px; }
.paint-grid .painted { background: var(--paint-color); color: #091629; cursor: default; }

.sort-shape {
  display: grid;
  place-items: center;
  width: min(100%, 220px);
  height: 114px;
  margin-bottom: 16px;
  border: 1px solid #47666b;
  border-radius: 18px;
  color: #b8f5ce;
  background: #263443;
  font-size: 4rem;
}
.hoop-meter {
  position: relative;
  width: min(100%, 420px);
  height: 28px;
  margin-bottom: 16px;
  border: 1px solid #286da2;
  border-radius: 999px;
  background: #122c48;
}
.hoop-meter::before {
  content: '';
  position: absolute;
  inset: 0;
  width: var(--hoop-zone-width);
  margin-inline: auto;
  background: var(--gold);
}
.hoop-meter span {
  position: absolute;
  top: 2px;
  left: 0;
  width: 20px;
  aspect-ratio: 1;
  border: 2px solid #091a33;
  border-radius: 50%;
  background: #ff9454;
  transform: translateX(-50%);
}

.count-flowers {
  width: min(100%, 340px);
  padding: 14px;
  margin-bottom: 16px;
  border: 1px solid #47666b;
  border-radius: 15px;
  color: #ffd390;
  background: #263443;
  font-size: 2.25rem;
  line-height: 1.3;
}
.neon-switch {
  width: min(100%, 350px);
  display: grid;
  grid-template-columns: repeat(var(--switch-size), minmax(0, 1fr));
  gap: 5px;
}
.neon-switch button { aspect-ratio: 1; padding: 0; font-size: clamp(1rem, 5vw, 1.6rem); }
.neon-switch button[aria-pressed="true"] { background: #65e7ff; border-color: #65e7ff; color: #0b1937; }

.turbo-track {
  position: relative;
  width: min(100%, 560px);
  height: 84px;
  margin: 18px 0;
  border: 2px solid #286da2;
  border-radius: 12px;
  background: repeating-linear-gradient(90deg, #14274a 0 40px, #10223e 40px 74px);
}
.turbo-track::before {
  content: '';
  position: absolute;
  inset-block: 0;
  left: 62%;
  width: var(--turbo-zone);
  transform: translateX(-50%);
  border-inline: 3px solid #ffd64a;
  background: #ffd64a38;
}
.turbo-track span {
  position: absolute;
  top: 20px;
  left: 0;
  transform: translateX(-50%) scaleX(-1);
  font-size: 2rem;
}
