footer {
  grid-template-columns: 1fr 1fr 1fr;
  padding: 0 10px;
  gap: 7px;
}
.restart {
  padding: 9px 8px;
}
.menu-card {
  padding: 20px 18px;
}
.menu-card h1 {
  font-size: 28px;
}
.menu-card p {
  margin: 5px;
}
.level-grid {
  grid-template-columns: repeat(5, 1fr);
  max-height: 34dvh;
  overflow: auto;
  padding: 3px;
}
.level-grid button {
  position: relative;
  min-height: 53px;
}
.level-grid button.locked {
  filter: grayscale(1);
  opacity: 0.58;
}
.level-grid button.completed:after {
  content: attr(data-stars);
  position: absolute;
  right: 2px;
  top: 1px;
  color: #e5a90d;
  font-size: 9px;
  letter-spacing: -2px;
}
.level-grid button:disabled {
  cursor: not-allowed;
}
.chapter-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin: -5px 0 9px;
}
.chapter-nav button {
  margin: 0;
  padding: 7px;
  font-size: 20px;
}
.chapter-nav button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.legal-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px 13px;
  margin-top: 12px;
}
.legal-links a {
  color: #56756d;
  font-size: 12px;
  font-weight: 700;
}
.operator {
  display: block;
  margin-top: 8px;
  color: #68827b;
  font-size: 11px;
  line-height: 1.35;
}
.shop-entry {
  margin-top: 9px;
  background: #f0b72e !important;
  color: #3b310f !important;
  box-shadow: 0 5px 0 #c78a16 !important;
}
.stars {
  font-size: 31px;
  letter-spacing: 5px;
  color: #f2b928;
  text-shadow: 0 2px 0 #c68110;
}
.shop-balance {
  font-size: 22px;
  margin: 6px !important;
}
.outfit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 15px 0;
}
.outfit-grid button {
  min-height: 82px;
  padding: 10px !important;
  background: #fff !important;
  color: #21564c !important;
  box-shadow: 0 3px 0 #bad7ce !important;
  border: 2px solid #d9ece6;
}
.outfit-grid button.selected {
  border-color: #ff7254;
  background: #fff2de !important;
}
.outfit-grid button.locked {
  background: #eef3ef !important;
}
.outfit-grid .outfit-icon {
  display: block;
  font-size: 29px;
  margin-bottom: 5px;
}
.outfit-grid small {
  margin: 0;
  font-size: 11px;
}
.preview-capy {
  font-size: 58px;
  position: relative;
}
.tutorial-visual {
  font-size: 40px;
  margin: 4px 0 14px;
}
.tutorial-card h2 {
  font-size: 28px;
}
.tutorial-card p {
  min-height: 48px;
}
.tutorial-dots {
  color: #15917c;
  letter-spacing: 5px;
  margin: 12px;
}
.capy[data-outfit="flower"] b:before,
.capy[data-outfit="glasses"] b:before,
.capy[data-outfit="brazil"] b:before {
  position: absolute;
  z-index: 4;
  font-size: 27px;
  left: 25px;
  top: -30px;
}
.capy[data-outfit="flower"] b:before {
  content: "🌺";
}
.capy[data-outfit="glasses"] b:before {
  content: "🕶️";
  top: -8px;
  left: 18px;
  font-size: 31px;
}
.capy[data-outfit="brazil"] b:before {
  content: "🇧🇷";
}
.goal-chip {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.goal-card {
  position: absolute;
  z-index: 3;
  top: 10px;
  left: 12px;
  min-width: 190px;
  max-width: 76%;
  padding: 7px 11px 8px;
  border-radius: 17px;
  background: #06483fe8;
  color: #fff7c8;
  box-shadow: 0 4px 10px #06483f55;
  transition: 0.2s;
}
.goal-card.complete {
  background: #0b7b5f;
  transform: scale(1.03);
}
.goal-card .goal-chip {
  position: static;
  max-width: none;
  padding: 0;
  background: none;
  box-shadow: none;
  font-size: 13px;
}
.goal-card small {
  display: block;
  margin: 2px 0 5px;
  font-size: 10px;
  color: #d6f3e8;
}
.goal-bars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}
.goal-bars::before,
.goal-bars::after {
  content: "";
  grid-row: 1;
  position: relative;
  height: 4px;
  border-radius: 9px;
  background: #ffffff38;
}
.goal-bars i {
  z-index: 1;
  grid-row: 1;
  height: 4px;
  width: 0;
  border-radius: 9px;
  transition: width 0.25s;
}
.goal-bars i:first-of-type {
  grid-column: 1;
  background: #ffbd4a;
}
.goal-bars i:last-of-type {
  grid-column: 2;
  background: #75e0bd;
}
.goal-bars::before {
  grid-column: 1;
}
.goal-bars::after {
  grid-column: 2;
}
.chapter-title {
  grid-column: 1 / -1;
  text-align: left;
  font-size: 12px;
  font-weight: 900;
  color: #47766d;
  padding: 0 3px;
}
.danger::after {
  content: "";
  position: absolute;
  left: 7px;
  right: 7px;
  bottom: 3px;
  height: 3px;
  border-radius: 4px;
  background: linear-gradient(90deg, #fff var(--danger), #ffffff45 0);
}
@keyframes dropPulse {
  50% { filter: brightness(1.1); }
}
#game.drop-pulse {
  animation: dropPulse 0.18s ease;
}
.toast {
  position: absolute;
  z-index: 40;
  left: 50%;
  bottom: 70px;
  transform: translateX(-50%);
  padding: 10px 15px;
  border-radius: 20px;
  background: #173f38;
  color: white;
  font-weight: 900;
  animation: toastIn 0.25s ease;
}
@keyframes toastIn {
  from {
    opacity: 0;
    transform: translate(-50%, 10px);
  }
}
@media (max-height: 680px) {
  .level-grid {
    max-height: 29dvh;
  }
  .level-grid button {
    min-height: 46px;
  }
  .menu-card {
    padding: 14px;
  }
  .menu-card .capy-logo {
    font-size: 34px;
  }
  .outfit-grid button {
    min-height: 68px;
  }
  .goal-card {
    top: 6px;
    transform: scale(0.92);
    transform-origin: left top;
  }
}

/* V12: keep every interactive-looking element outside the fruit drop zone. */
.app {
  grid-template-rows: 58px 70px 58px 1fr 54px;
}
.missionbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 12px 7px;
  background: #0b7567;
}
.missionbar .goal-card {
  position: relative;
  inset: auto;
  z-index: 1;
  flex: 1;
  min-width: 0;
  max-width: none;
  padding: 6px 11px 7px;
  border-radius: 15px;
  transform: none;
}
.missionbar .goal-card .goal-chip {
  font-size: 14px;
}
.missionbar .goal-card small {
  font-size: 12px;
}
.capy.capy-help {
  position: relative;
  right: auto;
  bottom: auto;
  flex: 0 0 58px;
  width: 58px;
  height: 49px;
  margin: 0 2px 0 0;
  border-width: 3px;
  font-size: 17px;
  transform: rotate(-5deg);
  box-shadow: 0 4px 0 #075d51aa;
  pointer-events: auto;
  cursor: pointer;
}
.stage > .capy,
#capy[hidden] {
  display: none !important;
}
.help-button {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #ffd75b;
  color: #174b3f;
  border: 2px solid #fff7dc;
  box-shadow: 0 3px 0 #b88718;
  font-size: 22px;
  font-weight: 950;
}
.help-button:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #b88718;
}
.help-button:focus-visible {
  outline: 3px solid white;
  outline-offset: 2px;
}
.capy.capy-help:before,
.capy.capy-help:after {
  top: -7px;
  width: 17px;
  height: 18px;
  border-width: 3px;
}
.capy.capy-help i {
  width: 9px;
  height: 7px;
  left: 11px;
  top: 15px;
  box-shadow: 28px 0 0 #fff;
}
.capy-help:focus-visible {
  outline: 3px solid #ffd75b;
  outline-offset: 3px;
}
.help-badge {
  position: absolute;
  top: -9px;
  right: -7px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ffd75b;
  color: #174b3f;
  border: 2px solid #fff7dc;
  font-size: 13px;
  font-weight: 950;
}
.scorebar small {
  font-size: 12px;
}
.restart {
  min-height: 40px;
  font-size: 14px;
}
.toast {
  width: max-content;
  max-width: 90%;
  text-align: center;
}
@media (max-height: 680px) {
  .app {
    grid-template-rows: 48px 58px 52px 1fr 45px;
  }
  .missionbar .goal-card {
    padding-block: 5px;
    transform: none;
  }
  .capy.capy-help {
    transform: scale(0.9) rotate(-5deg);
  }
}
