body {
  font-family: 'Comic Sans MS', 'Arial Rounded MT Bold', cursive, sans-serif;
  background-color: #c2e7ff;
  color: #1a1a4b;
  margin: 2em;
  font-size: 18px;
  line-height: 1.6;
}

a {
  color: #1a1a4b;
  text-decoration: none;
  background-color: #ffde59;
  padding: 0.2em 0.4em;
  border-radius: 0.25em;
  font-weight: bold;
}

a:hover {
  background-color: #ffe97a;
}

header {
  background-color: #ffffff;
  padding: 1.5em;
  border: 3px solid #1a1a4b;
  border-radius: 1em;
  margin-bottom: 2em;
  text-align: center;
  box-shadow: 4px 4px 0 #ffde59;
}

main {
  background: #ffffff;
  padding: 2em;
  border-radius: 1em;
  border: 3px solid #1a1a4b;
  box-shadow: 4px 4px 0 #ffde59;
}

.nav-menu {
  list-style-type: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 1.5em;
  justify-content: center;
}

.nav-menu > li {
  position: relative;
}

.navbar a {
  display: inline-block;
  padding: 0.5em 1em;
  color: #1a1a4b;
  background-color: #ffde59;
  border: 2px solid #1a1a4b;
  border-radius: 1em;
  font-weight: bold;
  transition: transform 0.1s ease;
}

.navbar a:hover {
  background-color: #ffe97a;
  transform: scale(1.05);
}

.navbar a.active {
  background-color: #ffb347;
  border-color: #e08000;
}

.dropdown-content,
.dropdown-content-sub {
  display: none;
  position: absolute;
  background: #ffffff;
  border: 2px solid #1a1a4b;
  box-shadow: 3px 3px 0 #ffde59;
  padding: 0.5em 0;
  border-radius: 1em;
  z-index: 1000;
  min-width: 200px;
  list-style-type: none; 
}


.dropdown-content-sub {
  left: 100%;
  top: 0;
}

.dropdown-content li,
.dropdown-content-sub li {
  white-space: nowrap;
  margin: 0.25em 0;
}

.dropdown-content a,
.dropdown-content-sub a {
  display: block;
  padding: 0.5em 1em;
  background-color: #ffde59;
  color: #1a1a4b;
  border-radius: 0.5em;
}

.dropdown-content a:hover,
.dropdown-content-sub a:hover {
  background-color: #ffe97a;
}

.dropdown:hover > .dropdown-content,
.dropdown-sub:hover > .dropdown-content-sub {
  display: block;
}

.rubber-button {
  background-color: #ffde59;
  color: #1a1a4b;
  font-family: 'Comic Sans MS', cursive, sans-serif;
  font-size: 18px;
  font-weight: bold;
  border: 3px solid #1a1a4b;
  border-radius: 1em;
  padding: 0.75em 1.5em;
  cursor: pointer;
  transition: transform 0.2s ease-in-out;
  box-shadow: 3px 3px 0 #1a1a4b;
}


.rubber-button:active {
  transform: scale(0.95);
  box-shadow: 1px 1px 0 #1a1a4b;
}

.activity-box {
  width: 1300px;
  height: 650px;
  border: 3px solid #1a1a4b;
  background-color: #fffbe0;
  position: relative; 
  margin: 2em auto;
  overflow: hidden;
}

.activity-box-large {
  width: 1300px;
  height: 1200px;
  border: 3px solid #1a1a4b;
  background-color: #fffbe0;
  position: relative; 
  margin: 2em auto;
  overflow: hidden;
}

.activity-box-med {
  width: 1300px;
  height: 300px;
  border: 3px solid #1a1a4b;
  background-color: #fffbe0;
  position: relative;
  margin: 2em auto;
  overflow: hidden;
}

.activity-box-medish {
  width: 1300px;
  height: 350px;
  border: 3px solid #1a1a4b;
  background-color: #fffbe0;
  position: relative;
  margin: 2em auto;
  overflow: hidden;
}

.activity-box-short {
  width: 1300px;
  height: 150px;
  border: 3px solid #1a1a4b;
  background-color: #fffbe0;
  position: relative; 
  margin: 2em auto;
  overflow: hidden;
}


#question-text {
  text-align: center;
  font-weight: bold;
  font-size: 20px;
  margin: 1em 0;
}

.button-container {
  text-align: center;
  margin-top: 1em;
}

.column {
  position: absolute;
  width: 110px;
  height: 560px;
  background-color: #fffbe0;
  border: 3px solid #1a1a4b;
  border-radius: 1em;
  padding: 0.5em;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.column-label {
  font-weight: bold;
  margin-bottom: 0.25em;
}

.regroup-zone {
  width: 100%;
  background-color: #f0f0f0;
  border-bottom: 2px dashed #1a1a4b;
  text-align: center;
  font-size: 12px;
  font-weight: bold;
  line-height: normal;
  margin-bottom: 0.25em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.regroup-tens {
  height: 120px;
}

.regroup-ones {
  height: 30px;
}


.block-stack {
  flex: 1;
  width: 100%;
  background-color: #e9e9e9;
  border: 2px dashed #aaa;
  border-radius: 0.5em;
  margin-bottom: 0.25em;
}

.block-count {
  font-weight: bold;
}

.activity-text {
  position: absolute;
  font-size: 18px;
  color: #1a1a4b;
  font-family: 'Comic Sans MS', cursive, sans-serif;
  font-weight: bold;
}

.activity-text-large {
  position: absolute;
  font-size: 30px;
  color: #1a1a4b;
  font-family: 'Comic Sans MS', cursive, sans-serif;
  font-weight: bold;
}

.activity-text-huge {
  position: absolute;
  font-size: 60px;
  color: #1a1a4b;
  font-family: 'Comic Sans MS', cursive, sans-serif;
  font-weight: bold;
}

.draggable-block {
  position: absolute;
  border: 2px solid #1a1a4b;
  border-radius: 2px;
  box-shadow: 2px 2px 0 #1a1a4b;
  cursor: grab;
}

.block-ones {
  width: 10px;
  height: 10px;
  background-color: #ffd966;
}

.block-tens {
  width: 100px;
  height: 10px;
  background-color: #f5a623;
}

.block-hundreds {
  width: 100px;
  height: 100px;
  background-color: #4dd0e1;
}

.block-tens.basefive {
  width: 50px;
  height: 10px;
  background-color: #f5a623;
}

.block-hundreds.basefive {
  width: 50px;
  height: 50px;
  background-color: #4dd0e1;
}



.valid-hover {
  background-color: rgba(144, 238, 144, 0.4); 
}

.invalid-hover {
  background-color: rgba(255, 99, 71, 0.4); 
}

.zone-count {
  
}


.non-draggable {
  cursor: default !important;
}


.blank-exponent {
  display: inline-block;
  width: 40px;
  text-align: center;
  border-bottom: 2px solid #1a1a4b;
  font-size: 32px;
}


.exponent-box {
  width: 80px;
  height: 80px;
  border: 3px solid #1a1a4b;
  border-radius: 0.5em;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: bold;
  font-family: 'Comic Sans MS', cursive, sans-serif;
  position: absolute;
  background-color: #ffde59;
  box-shadow: 2px 2px 0 #1a1a4b;
}

.draggable-exponent {
  cursor: grab;
}

.exponent-slot {
  background-color: #fff;
  border-style: dashed;
}

.exponent-slot.valid-hover {
  background-color: rgba(144, 238, 144, 0.4); 
}

.center-feedback {
  text-align: center;
  font-size: 20px;
  font-weight: bold;
  margin-top: 20px;
}

.styled-checkbox-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25em 1.5em;
  margin-bottom: 1.5em;
  font-size: 18px;
}

.styled-checkbox {
  appearance: none;
  width: 1.1em;
  height: 1.1em;
  border: 2px solid #1a1a4b;
  border-radius: 0.25em;
  margin-right: 0.5em;
  vertical-align: middle;
  cursor: pointer;
  background-color: white;
}

.styled-checkbox:checked {
  background-color: #ffde59;
  border-color: #1a1a4b;
}

#mascot {
  position: fixed;
  bottom: 16px;
  right: 16px;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  z-index: 10000;
  font-family: system-ui, sans-serif;
}
#mascot[hidden] { display: none; }

#mascot-img {
  width: 180px; 
  height: auto;
  pointer-events: none;
}

.mascot-bubble {
  max-width: 280px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.15);
  border: 2px solid #111;
}

#mascot-close {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid #111;
  background: #fff;
  cursor: pointer;
}

#help-link.active {
  background-color: #ffde59 !important;
  border-color: #1a1a4b !important;
}

/* Draggable token wrapper */
.shape-token {
  position: absolute;
  width: 60px; height: 60px;         /* default size (2-set) */
  display: flex; align-items: center; justify-content: center;
  cursor: grab; user-select: none;
}
.shape-token:active { cursor: grabbing; }
/* Size variants for 3-set mode */
.shape-token.small { width: 48px; height: 48px; }
.shape-token.large { width: 74px; height: 74px; }

/* The visible shape body */
.shape-body { width: 100%; height: 100%; position: relative; }
.shape-body.square { border-radius: 10px; }
.shape-body.triangle { clip-path: polygon(50% 0%, 0% 100%, 100% 100%); }

/* Centered black number label */
.shape-label {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  color: #000; font-weight: 700; font-size: 14px; line-height: 1;
  pointer-events: none;
}
.shape-token.small .shape-label { font-size: 12px; }
.shape-token.large .shape-label { font-size: 15px; }


.hint-popup {
  position: absolute;
  background: #fff;
  border: 2px solid #000;
  border-radius: 10px;
  padding: 8px 12px 10px 12px;
  max-width: 260px;
  font-size: 14px;
  box-shadow: 0 6px 20px rgba(0,0,0,.15);
  z-index: 10000;
}
.hint-popup.hidden { display: none; }
.hint-popup .hint-close {
  position: absolute; right: 8px; top: 4px;
  font-weight: 700; cursor: pointer; user-select: none;
}
.hint-popup .hint-title { font-weight: 700; margin-right: 16px; }
.hint-popup .hint-desc  { margin-top: 4px; }



