/* Colourful PlayMathsNow / PlayWordsNow activity cards. Original <style id=flynn-colourful-activity-cards>. */
/* Activity-card visual refresh only.
   The existing page markup, controls, event handlers and learning logic are unchanged. */

/* Shared visual language: bright subject colours, soft card surfaces and clear text. */
#view-maths #mathsObjectivesList,
#view-words #spellingRulesContainer {
  gap: 13px !important;
}
#view-maths #mathsObjectivesList > *,
#view-words #spellingRulesContainer > * {
  position: relative;
  overflow: hidden;
  border-radius: 18px !important;
  box-shadow: 0 5px 15px rgba(37, 42, 78, .055);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
#view-maths #mathsObjectivesList > *:hover,
#view-words #spellingRulesContainer > *:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(37, 42, 78, .10);
}

/* Maths topic cards: alternating mint, sky, lilac and sunshine tints. */
#view-maths #mathsObjectivesList > *:nth-child(4n+1) {
  background: linear-gradient(105deg, #e5f9ef 0%, #f7fffa 100%) !important;
  border: 1.5px solid #a8e8c7 !important;
}
#view-maths #mathsObjectivesList > *:nth-child(4n+2) {
  background: linear-gradient(105deg, #e6f5ff 0%, #f8fcff 100%) !important;
  border: 1.5px solid #b5ddf7 !important;
}
#view-maths #mathsObjectivesList > *:nth-child(4n+3) {
  background: linear-gradient(105deg, #f0eaff 0%, #fbf9ff 100%) !important;
  border: 1.5px solid #d3c3fa !important;
}
#view-maths #mathsObjectivesList > *:nth-child(4n+4) {
  background: linear-gradient(105deg, #fff3d8 0%, #fffdf7 100%) !important;
  border: 1.5px solid #f3d99b !important;
}
#view-maths #mathsObjectivesList > * > div:first-child {
  min-width: 0;
}
#view-maths #mathsObjectivesList > * .type-ui {
  color: #26324a !important;
  font-weight: 750 !important;
  line-height: 1.4;
}
#view-maths #mathsObjectivesList > * .type-meta:not(.uppercase) {
  color: #56647a !important;
  background: rgba(255,255,255,.72) !important;
  border: 1px solid rgba(89,110,145,.12);
  font-weight: 750;
}
#view-maths #mathsObjectivesList > * .uppercase {
  border-radius: 9px !important;
  letter-spacing: .045em;
  font-weight: 900 !important;
}
#view-maths #mathsObjectivesList > * button {
  border-radius: 12px !important;
  font-weight: 850 !important;
  padding: 9px 16px !important;
  box-shadow: 0 3px 0 rgba(20, 75, 57, .12);
  transition: transform .15s ease, filter .15s ease;
}
#view-maths #mathsObjectivesList > * button:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}
#view-maths #mathsObjectivesList > * button:not(.kid-btn-emerald) {
  background: #fff !important;
  color: #72500c !important;
  border: 1px solid #f0d18a !important;
}

/* Spelling pack cards: a coordinated mix of violet, apricot, aqua and blue. */
#view-words #spellingRulesContainer > *:nth-child(4n+1) {
  background: linear-gradient(145deg, #f0eaff 0%, #fcfaff 100%) !important;
  border: 1.5px solid #d0c1f5 !important;
}
#view-words #spellingRulesContainer > *:nth-child(4n+2) {
  background: linear-gradient(145deg, #fff0d9 0%, #fffaf2 100%) !important;
  border: 1.5px solid #f2d29b !important;
}
#view-words #spellingRulesContainer > *:nth-child(4n+3) {
  background: linear-gradient(145deg, #e1f7f2 0%, #f8fffd 100%) !important;
  border: 1.5px solid #a9e2d5 !important;
}
#view-words #spellingRulesContainer > *:nth-child(4n+4) {
  background: linear-gradient(145deg, #e7f2ff 0%, #f9fcff 100%) !important;
  border: 1.5px solid #bfd8f5 !important;
}
#view-words #spellingRulesContainer > * h3 {
  color: #30284f !important;
  font-weight: 800 !important;
  line-height: 1.25;
}
#view-words #spellingRulesContainer > * p {
  color: #5e5b70 !important;
  line-height: 1.55;
}
#view-words #spellingRulesContainer > * .type-meta:not(.uppercase) {
  color: #5a5570 !important;
  background: rgba(255,255,255,.72) !important;
  border: 1px solid rgba(94,82,139,.12);
  font-weight: 750;
}
#view-words #spellingRulesContainer > * .uppercase {
  border-radius: 9px !important;
  letter-spacing: .045em;
  font-weight: 900 !important;
}
#view-words #spellingRulesContainer > * button {
  border-radius: 12px !important;
  font-weight: 850 !important;
  box-shadow: 0 3px 0 rgba(55, 43, 105, .10);
  transition: transform .15s ease, filter .15s ease;
}
#view-words #spellingRulesContainer > * button:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}
#view-words #spellingRulesContainer > * button:not(.kid-btn-amber) {
  background: rgba(255,255,255,.88) !important;
  color: #5141a6 !important;
  border: 1px solid #d7cef2 !important;
}
#view-words #spellingRulesContainer > * button.kid-btn-amber {
  background: #ffc94d !important;
  color: #38264b !important;
  border: 1px solid #f1b832 !important;
}

/* The Maths practice area: make the question feel like the main event. */
#view-maths .lg\:col-span-2 {
  border-radius: 22px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}
#view-maths .lg\:col-span-2 #mathsObjectivesList > * {
  min-height: 68px;
}
#view-maths .lg\:col-span-2 h2 {
  letter-spacing: -.02em;
}
#view-maths .lg\:col-span-2 > div:first-child button {
  border-radius: 12px !important;
  background: #fff !important;
  color: #087c62 !important;
  border: 1px solid #a8e8c7 !important;
  font-weight: 800 !important;
}
#view-maths .lg\:col-span-2 + div {
  position: relative;
  overflow: hidden;
  border-radius: 23px !important;
  background: linear-gradient(155deg, #d9f7e9 0%, #effbf6 48%, #fff8df 100%) !important;
  border: 2px solid #9bdcbe !important;
  box-shadow: 0 12px 26px rgba(16, 125, 91, .10);
}
#view-maths .lg\:col-span-2 + div:before {
  content: "✦";
  position: absolute;
  right: 17px;
  top: 48px;
  color: rgba(16, 145, 105, .12);
  font-size: 92px;
  line-height: 1;
  pointer-events: none;
}
#view-maths #mathsQuestionText {
  display: block;
  padding: 16px 12px;
  border-radius: 18px;
  background: rgba(255,255,255,.82);
  border: 1px solid #b5e9d0;
  color: #087c62 !important;
  text-shadow: 0 1px 0 #fff;
}
#view-maths #mathsAnswerInput {
  background: #fff !important;
  color: #26324a !important;
  border-radius: 13px !important;
  font-weight: 800 !important;
}
#view-maths #mathsFeedback {
  font-weight: 750;
}

/* Activity panels keep the same colour language once a child opens an activity. */
#view-words #spellingActivityPanel {
  border-radius: 22px !important;
  box-shadow: 0 12px 28px rgba(66, 52, 133, .09);
}
#view-words #spellingActivityPanel > div:first-child {
  border-bottom-color: #d9d0f3 !important;
}
#view-words #spellingActivityBody .surface-card {
  border-radius: 17px !important;
  border-color: #d9d0f3 !important;
  background: rgba(255,255,255,.88) !important;
  box-shadow: 0 5px 15px rgba(66, 52, 133, .055);
}
#view-words #spellingActivityBody input {
  background: #fff !important;
  color: #30284f !important;
}
#view-words #spellingActivityBody button {
  border-radius: 12px !important;
  font-weight: 800 !important;
}
#view-maths #mathsObjectivesList > .p-4,
#view-words #spellingRulesContainer > .p-5 {
  padding: 17px !important;
}

/* Keep the richer colours comfortable on smaller screens and in reduced-motion mode. */
@media (max-width: 640px) {
  #view-maths #mathsObjectivesList > *,
  #view-words #spellingRulesContainer > * {
    padding: 15px !important;
  }
  #view-maths .lg\:col-span-2 + div:before {
    right: 8px;
    top: 58px;
    font-size: 66px;
  }
}
@media (prefers-reduced-motion: reduce) {
  #view-maths #mathsObjectivesList > *,
  #view-words #spellingRulesContainer > *,
  #view-maths #mathsObjectivesList > * button,
  #view-words #spellingRulesContainer > * button {
    transition: none !important;
  }
}
