/* Math challenge (Kangaroo-style) game: assets/play/kangaroo.js */
.kg { max-width: 820px; margin: 0 auto; }
.kg-loading { text-align: center; color: var(--muted); padding: 40px 0; }
.kg-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 0 0 10px; }
.kg-dots { display: flex; gap: 6px; }
.kg-dots i { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font: 700 .85rem var(--body);
  font-style: normal; color: var(--muted); box-shadow: inset 0 0 0 3px var(--line); background: #fff; }
.kg-dots i.now { box-shadow: inset 0 0 0 3px var(--blue); color: var(--blue); }
.kg-dots i.ok { background: var(--green); color: #fff; box-shadow: none; }
.kg-dots i.half { background: var(--yellow); color: var(--navy); box-shadow: none; }
.kg-dots i.miss { background: #ffd9d4; color: #c42a1e; box-shadow: none; }
.kg-score { font: 700 1rem var(--body); color: var(--navy); background: var(--soft); border-radius: 999px; padding: 6px 14px; white-space: nowrap; }
.kg-score b { font: 800 1.35rem var(--display); color: var(--navy); }
.kg-score.kg-bump { animation: pop .35s ease-out; }
.kg-card { background: #fff; border-radius: 18px; box-shadow: 0 0 0 3px var(--line); padding: 14px 16px 16px; }
.kg-card.kg-in { animation: kg-slide .3s ease-out; }
@keyframes kg-slide { 0% { opacity: 0; transform: translateX(24px); } 100% { opacity: 1; transform: none; } }
.kg-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.kg-num { width: 40px; height: 40px; border-radius: 12px; background: var(--navy); color: #fff; display: flex; align-items: center;
  justify-content: center; font: 800 1.4rem var(--display); flex: none; }
.kg-val { font: 700 .95rem var(--body); color: var(--muted); flex: 1; }
.kg-read { font-size: .9rem; }
.kg-q { font: 600 clamp(1.15rem, 3.2vw, 1.45rem)/1.4 var(--body); color: var(--navy); margin: 12px 0 10px; }
.kg-pic { display: flex; justify-content: center; margin: 4px 0 12px; }
.kg-pic svg { display: block; height: clamp(150px, 40vw, 210px); width: auto; max-width: 100%; }
.kg-pic.wide svg { width: min(100%, 520px); height: auto; }
.kg-ans { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 640px) { .kg-ans { grid-template-columns: repeat(5, 1fr); } }
.kg-ans button { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 12px; border: 0; border-radius: 16px; cursor: pointer;
  background: #fff; color: var(--navy); font: 800 clamp(1.15rem, 2.6vw, 1.4rem)/1.15 var(--display); text-align: left;
  box-shadow: 0 5px 0 #c9d3e2, inset 0 0 0 3px #d4dce8; transition: transform .1s, background .2s; touch-action: manipulation; }
@media (min-width: 640px) { .kg-ans button { flex-direction: column; justify-content: center; gap: 4px; min-height: 96px; text-align: center; padding: 10px 6px; } }
.kg-ans button b { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--soft); color: var(--blue); display: flex;
  align-items: center; justify-content: center; font: 800 1.05rem var(--display); }
.kg-ans button span { overflow-wrap: anywhere; }
@media (hover: hover) { .kg-ans button:hover:not(:disabled) { box-shadow: 0 5px 0 #c9d3e2, inset 0 0 0 3px var(--blue); } }
.kg-ans button:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 2px 0 #c9d3e2, inset 0 0 0 3px var(--blue); }
.kg-ans button:disabled { cursor: default; opacity: .6; }
.kg-ans button.ok { background: var(--green); color: #fff; box-shadow: 0 5px 0 #168a56; opacity: 1; animation: pop .3s ease-out; }
.kg-ans button.ok b { background: #fff; color: var(--green); }
.kg-ans button.no { background: #ffe1de; color: #c42a1e; box-shadow: 0 5px 0 #f3b9b2; opacity: 1; }
.kg-ans button.no b { background: #fff; color: #c42a1e; }
.kg-ans button.show { opacity: 1; box-shadow: 0 5px 0 #168a56, inset 0 0 0 4px var(--green); background: #e6f8ef; color: #12734a; animation: pop .3s ease-out; }
.kg-ans button.show b { background: var(--green); color: #fff; }
.kg-why { margin: 16px 0 0; background: var(--soft); border-radius: 16px; padding: 12px 16px; }
.kg-why > b { font: 800 1.1rem var(--display); color: var(--navy); }
.kg-why ol { margin: 6px 0 0; padding-left: 24px; }
.kg-why li { font: 600 1.05rem/1.4 var(--body); color: var(--navy); margin: 4px 0; animation: kg-fade .35s ease-out; }
.kg-why li.kg-final { list-style: none; margin-left: -24px; font-weight: 800; color: #12734a; }
@keyframes kg-fade { 0% { opacity: 0; transform: translateY(6px); } 100% { opacity: 1; transform: none; } }
.kg-foot { display: flex; gap: 10px; justify-content: flex-end; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.kg-foot:empty { display: none; }
@media (max-width: 600px) { .kg-card { padding: 10px 10px 12px; } .kg-dots i { width: 26px; height: 26px; } .kg-foot .g-btn.big { flex: 1; } }
