/* UI audit fixes v1 — child learning surfaces.
   Scoped overrides only; authored art and game behaviour remain unchanged. */

/* Puzzle pack hero must not be flex-shrunk to a thin strip. */
.puzzle-pack-hero.puzzle-pack-hero-authored{
  flex:0 0 auto;
  height:auto!important;
}
@media (min-width:701px){
  .puzzle-pack-hero.puzzle-pack-hero-authored{min-height:clamp(180px,24vw,360px)}
}
.puzzle-word-dynamic section{padding-right:56px}
.puzzle-word-dynamic button{width:48px;height:48px;right:4px}

/* Stronger CTA contrast on ABC dashboard cards. */
.abc-card-footer button{background:linear-gradient(#2167B2,#174E91);color:#fff}

/* Repeated eyebrow/title groups need a real line break and spacing. */
.abd-title small,
.word-instruction small,
.parent-writing-head small{display:block;line-height:1.35;margin-bottom:4px}

/* Align HUD content on a common centre line. */
.word-dash-top,.word-game-top,.abc-mascot-strip,.phonics-game-top{align-items:center}

/* Keep card audio on the image, never over title copy. */
.puzzle-card-audio{left:62px;right:auto;top:8px;bottom:auto}

/* Tablet uses the same visible three-card Listening structure as desktop. */
@media (min-width:601px) and (max-width:1100px){
  .lc-picker{display:block}
  .lc-game-cards{width:100%;height:auto;min-height:0;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
  .lc-game-card,.lc-game-card.is-active{display:grid}
  .lc-arrow,.lc-dots{display:none}
  .lc-game-card figure img{min-height:170px}
}

@media (max-width:620px){
  /* Repeated child labels are never rendered below 12px. */
  .abd-title small,.word-instruction small,.parent-writing-head small,
  .writing-stage small,.puzzle-card-copy small,.puzzle-earned small,
  .abc-dashboard-title small,.abc-pick-card small,.phonics-instruction small,
  .phonics-mascot-strip small{font-size:12px!important;line-height:1.25}
  .lc-round-control{min-width:44px;min-height:44px}

  /* Keep profile controls readable and surface learning within the first view. */
  #s-home.child-home .home-profile{min-height:72px;height:72px}
  #s-home.child-home .home-avatar{width:56px;height:56px}
  #s-home.child-home .home-stats{
    min-height:86px;height:86px;flex-direction:row;align-items:center;padding:8px 12px
  }
  #s-home.child-home .home-stats>i{width:1px;height:48px}
  #s-home.child-home .home-actions{min-height:68px;height:68px}
  #s-home.child-home .home-actions button{height:68px}
  #s-home.child-home .home-actions button>span{font-size:1.65rem}
  #s-home.child-home .mission-label,
  #s-home.child-home #welcomeMissionProgress,
  #s-home.child-home #homeCollection{font-size:12px!important}
  #s-home.child-home .welcome-mission>b{font-size:12px}

  /* Parent settings controls must remain inside a 320px viewport. */
  #s-dash .skillrow{min-width:0;flex-wrap:wrap;align-items:flex-start;gap:10px}
  #s-dash .skillrow .langtoggle{width:100%;max-width:100%;display:flex}
  #s-dash .skillrow .langtoggle button{min-width:0;flex:1 1 0}

  /* Word dashboard header and summary. */
  #s-word-dashboard .word-dash-top{grid-template-columns:52px minmax(0,1fr) auto}
  #s-word-dashboard .word-dash-tools{min-width:0;gap:6px}
  #s-word-dashboard .word-dash-tools button{min-width:48px;width:48px}
  #s-word-dashboard .word-album-summary small{font-size:12px!important;line-height:1.15}

  /* ABC title decoration and game hierarchy. */
  #s-abc-dashboard .abc-malaysia{top:54px;right:13px;font-size:1.8rem}
  #s-abc-game .abc-hud-btn,
  #s-abc-game .abc-hud-btn.back{width:48px;height:48px;min-width:48px;min-height:48px}
  #s-abc-game .abc-game-tools{gap:8px}
  #s-abc-game .abc-game-heading small,
  #s-abc-game .abc-mascot-strip small,
  #s-abc-game .abc-round-progress strong{font-size:12px!important;line-height:1.15}

  /* Phonics controls follow the founder's 48px child-target rule. */
  #s-phonics-game .phonics-hud-btn,
  #s-phonics-game[data-game="hear-sound"] .phonics-hud-btn{width:48px;height:48px;min-width:48px;min-height:48px}
  #s-phonics-game .phonics-game-tools{gap:8px}
  #s-phonics-game .phonics-mascot-strip button{min-width:48px;min-height:48px}

  /* Printable worksheets: compact horizontal cards instead of a 6,800px stream. */
  #s-activities-library .activities-brand>span{font-size:12px}
  #s-activities-library .activities-grid{gap:14px}
  #s-activities-library .activities-card{
    display:grid;grid-template-columns:112px minmax(0,1fr);border-radius:18px
  }
  #s-activities-library .activities-card-art{padding:10px 0 10px 10px}
  #s-activities-library .activities-card-art img{height:150px;border-radius:14px}
  #s-activities-library .activities-card-art>span{top:18px;right:8px;padding:5px 7px;font-size:12px}
  #s-activities-library .activities-card-body{padding:11px 10px 12px}
  #s-activities-library .activities-card h2{font-size:20px;line-height:1.05}
  #s-activities-library .activities-card-kicker,
  #s-activities-library .activities-card-meta li,
  #s-activities-library .activities-card-skills{font-size:12px}
  #s-activities-library .activities-card-summary{margin:5px 0 7px;font-size:14px;line-height:1.3}
  #s-activities-library .activities-card-meta{margin-bottom:7px}
  #s-activities-library .activities-card-skills{margin-bottom:8px}
  #s-activities-library .activities-card-actions{grid-template-columns:1fr;gap:8px}
  #s-activities-library .activities-card-actions a{min-height:44px}
}
