/* Local visual layer for the original mini-games lobby and 13 toddler pages. */
body {
  background: #fff8ed !important;
  color: #294246 !important;
  font-family: "Arial Rounded MT Bold", "PingFang SC", "Microsoft YaHei", sans-serif !important;
}

/* Collection lobby */
body > header {
  background: #ffedd5 !important;
  box-shadow: 0 6px 0 #f7e1c6 !important;
  padding: 25px 16px 21px !important;
}
body > header h1 {
  background: none !important;
  color: #283f43 !important;
  -webkit-text-fill-color: currentColor !important;
  font-size: clamp(25px, 6vw, 38px) !important;
}
body > header p { color: #5e7778 !important; }
.portal-back {
  display: inline-flex;
  align-items: center;
  margin: 15px 0 0 15px;
  padding: 10px 15px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 0 #ead8c5;
  color: #4e6466;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
}
.section-title {
  border-color: #f2dfc8 !important;
  color: #d75f47 !important;
  font-weight: 900;
  letter-spacing: 0 !important;
  font-size: 18px !important;
}
.grid { gap: 12px !important; }
.card {
  background: #fffefa !important;
  color: #30484b !important;
  border: 2px solid #f2e4d4 !important;
  border-radius: 19px !important;
  box-shadow: 0 5px 0 #eee0cf;
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}
.card h3 { color: #30484b !important; font-size: 16px !important; }
.card p { color: #667b7c !important; }
.card .tag {
  background: #ffe3c5 !important;
  color: #a75338 !important;
  padding: 4px 11px !important;
}

/* Toddler learning pages */
#header {
  flex: none;
  background: #fff0dc;
  border-bottom: 2px solid #f5dfc6;
  padding: 18px 12px 12px !important;
}
#header h1 {
  color: #df694e !important;
  font-size: clamp(21px, 5vw, 29px) !important;
  font-weight: 900;
  line-height: 1.2;
}
.back {
  top: 12px !important;
  left: 10px !important;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 7px 11px !important;
  background: #fffefa !important;
  color: #415e62 !important;
  border-radius: 12px !important;
  box-shadow: 0 3px 0 #eadcc8;
  font-weight: 800;
}
#modeBar { gap: 9px !important; margin-top: 10px !important; }
#modeBtn, #shuffleBtn {
  min-height: 43px;
  padding: 8px 15px !important;
  border: 2px solid #e8d7c5 !important;
  border-radius: 14px !important;
  background: #fffefa !important;
  color: #405d62 !important;
  box-shadow: 0 3px 0 #e9d9c5;
  font-size: 14px !important;
}
#modeBtn.active {
  background: #e76c51 !important;
  color: #fff !important;
  border-color: #d75b44 !important;
}
#countWrap {
  color: #405a5f !important;
  font-size: clamp(15px, 4vw, 22px) !important;
  font-weight: 800;
  line-height: 1.35;
  padding: 8px 12px 0 !important;
}
#grid {
  align-content: start !important;
  min-height: 0;
  overflow-y: auto;
  padding: clamp(26px, 5vh, 46px) 14px 22px !important;
}
.item-btn, .shape-btn, .sound-btn, .num-btn, .comp-item {
  background: #fffefa !important;
  border: 3px solid #f1e1d0 !important;
  border-radius: 20px !important;
  box-shadow: 0 5px 0 #e9ddcc;
}
.item-btn:active, .shape-btn:active, .sound-btn:active, .num-btn:active, .comp-item:active {
  box-shadow: 0 2px 0 #e9ddcc;
}
.item-name, .shape-name, .s-name, .num-name {
  color: #344d51 !important;
  text-shadow: none !important;
  font-size: clamp(12px, 3vw, 17px) !important;
  line-height: 1.2 !important;
}
.item-img { background: #fff !important; }
#questionText { color: #bc6046 !important; }
#scoreBadge {
  background: #fff !important;
  color: #d07832 !important;
  border-radius: 14px !important;
  box-shadow: 0 3px 0 #eadcc8;
}
@media (max-width: 420px) {
  #header h1 { padding: 0 68px; }
  .card h3 { font-size: 14px !important; }
  #compWrap { min-width: 0; gap: 12px !important; padding: 8px !important; }
  .comp-item { min-width: 0; overflow: hidden; }
  .comp-item canvas { max-width: 100%; height: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .card { animation-duration: .01ms !important; }
}
