/* Extracted from kid.html inline <style> */
/* Scratch grid polish */
#scratchGridKid { background: var(--card-bg, #f8fafc); border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.06) inset; }
#scratchGridKid .cell { background: rgba(255,255,255,0.85); border-radius: 8px; display:flex; align-items:center; justify-content:center; }
#scratchGridKid .sym { line-height: 1; user-select: none; }
@media (max-width: 360px) {
  #scratchGridKid { gap: 4px !important; padding: 4px !important; }
  #scratchGridKid .sym { font-size: clamp(18px, 7vw, 36px) !important; }
}

/* Force chest/hangman buttons to stay on one line, even inside <td> */
.header-card .chest-wrap{
  display: flex !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
  gap: 8px;
  align-items: center;
  min-width: max-content; /* avoid table squeezing to wrap */
  overflow: visible;      /* allow overflow instead of wrapping */
}
.header-card .chest-wrap .treasure-btn{
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto !important;
  padding: 0;
  margin: 0;
  background: none;
  border: none;
}
.header-card .chest-wrap .treasure-btn img{
  display: inline-block !important;
  width: 40px; height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border-color, #ccc);
  vertical-align: middle;
}
.header-card td .chest-wrap{ display: inline-flex !important; }

/* Reduce kid title size and keep Level text on one line */
.header-card #kidTitle.greeting{
  font-size: clamp(20px, 6vw, 28px) !important; /* smaller than default */
  line-height: 1.1 !important;
}
.header-card #kidLevel{
  white-space: nowrap !important;   /* prevent 'Level' and number from splitting */
  display: inline-block !important;  /* keep inline without wrapping quirks */
  line-height: 1.1 !important;
}

/* Reduce points label and badge size by ~30% in header */
.header-card .points-stack .section-title{
  font-size: 0.7em !important;
  display: none !important; /* hide label 'Poeng' */
}
.header-card .points-stack .points-badge{
  transform: scale(0.7) !important;
  transform-origin: top right !important;
}
