/* Hide the removed topbar info while keeping DOM hooks available for game logic. */
.sentence-rpg-page .lesson-select-top,
.sentence-rpg-page .top-stat-chip,
.sentence-rpg-page .sentence-sound-button,
.sentence-rpg-page .sentence-settings {
  display: none !important;
}

.sentence-rpg-page .topbar {
  grid-template-columns: minmax(220px, 1fr) auto !important;
}

.sentence-rpg-page .top-stats {
  display: flex !important;
  justify-content: flex-end !important;
  width: auto !important;
}

.sentence-rpg-page .sentence-guide-button {
  min-width: 86px !important;
}

.sentence-rpg-page .food-shortcut-grid::before,
.sentence-rpg-page .food-shortcut-grid::after {
  display: none !important;
  content: none !important;
}

.sentence-rpg-page .pet-compact-summary h2 {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  max-width: none !important;
  overflow: visible !important;
  white-space: normal !important;
}

.sentence-rpg-page #petName {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.sentence-rpg-page .pet-level-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 26px;
  padding: 0 10px;
  border: 2px solid rgba(100, 161, 231, 0.88);
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #dff2ff 100%);
  color: #2367b7;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(77, 138, 209, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.sentence-rpg-page #growthText {
  display: none !important;
}

.sentence-rpg-page .pet-picker {
  z-index: 1200 !important;
  place-items: center !important;
  padding: clamp(14px, 3vw, 30px) !important;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.44), transparent 30%),
    rgba(38, 82, 130, 0.36) !important;
  backdrop-filter: blur(6px);
}

.sentence-rpg-page .picker-card {
  width: min(760px, calc(100vw - 28px)) !important;
  max-height: min(720px, calc(100vh - 28px)) !important;
  padding: clamp(14px, 2.5vw, 24px) !important;
  overflow: auto !important;
  border: 2px solid rgba(126, 177, 235, 0.9) !important;
  border-radius: 24px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(229, 246, 255, 0.86)),
    rgba(245, 252, 255, 0.88) !important;
  box-shadow:
    0 22px 45px rgba(41, 92, 145, 0.26),
    inset 0 0 0 1px rgba(255, 255, 255, 0.92) !important;
  scrollbar-color: rgba(90, 143, 204, 0.62) rgba(255, 255, 255, 0.5);
}

.sentence-rpg-page .picker-head {
  position: sticky;
  top: 0;
  z-index: 2;
  align-items: flex-start !important;
  margin: -4px -2px 16px !important;
  padding: 4px 2px 10px !important;
  background: linear-gradient(180deg, rgba(248, 253, 255, 0.98), rgba(248, 253, 255, 0.72) 72%, transparent) !important;
}

.sentence-rpg-page .picker-head .eyebrow {
  margin: 0 0 4px !important;
  color: #3c82d9 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
  text-transform: uppercase;
  text-shadow: none !important;
}

.sentence-rpg-page .picker-head h2 {
  margin: 0 !important;
  color: #1f5ea9 !important;
  font-size: clamp(22px, 3.4vw, 30px) !important;
  line-height: 1.05 !important;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.95) !important;
}

.sentence-rpg-page .picker-head .soft-button {
  min-width: 64px !important;
  min-height: 38px !important;
  border: 2px solid rgba(82, 137, 202, 0.84) !important;
  border-radius: 14px !important;
  color: #1e5da6 !important;
  background: linear-gradient(180deg, #ffffff, #e4f4ff) !important;
  box-shadow: 0 5px 12px rgba(61, 116, 179, 0.16) !important;
}

.sentence-rpg-page .pet-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(136px, 1fr)) !important;
  gap: 12px !important;
}

.sentence-rpg-page .pet-option {
  display: grid !important;
  grid-template-rows: 92px auto 1fr !important;
  justify-items: center !important;
  min-height: 212px !important;
  padding: 12px 10px !important;
  border: 2px solid rgba(62, 94, 132, 0.86) !important;
  border-radius: 14px !important;
  color: #17345f !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 251, 218, 0.92) 48%, rgba(255, 224, 136, 0.9) 100%) !important;
  box-shadow:
    0 7px 0 rgba(30, 55, 84, 0.9),
    0 14px 18px rgba(41, 88, 137, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
  transform: none !important;
}

.sentence-rpg-page .pet-option:hover {
  transform: translateY(-2px) !important;
  box-shadow:
    0 9px 0 rgba(30, 55, 84, 0.9),
    0 18px 22px rgba(41, 88, 137, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
}

.sentence-rpg-page .pet-option.active {
  border-color: rgba(68, 151, 111, 0.95) !important;
  color: #143f3a !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(232, 255, 236, 0.94) 48%, rgba(151, 231, 171, 0.9) 100%) !important;
}

.sentence-rpg-page .pet-thumb {
  width: 90px !important;
  height: 90px !important;
  margin: 0 0 8px !important;
  background-size: contain !important;
  background-position: center bottom !important;
  background-repeat: no-repeat !important;
}

.sentence-rpg-page .pet-option-name {
  margin: 0 0 5px !important;
  color: #17345f !important;
  font-size: 17px !important;
  font-weight: 950 !important;
  line-height: 1.15 !important;
  text-align: center !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85) !important;
}

.sentence-rpg-page .pet-option-desc {
  min-height: 0 !important;
  margin: 0 !important;
  color: #2c69a9 !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  line-height: 1.42 !important;
  text-align: left !important;
}

.sentence-guide-dim {
  background: rgba(28, 68, 112, 0.44) !important;
  backdrop-filter: blur(2px);
}

.sentence-guide-spotlight {
  border: 2px solid rgba(255, 222, 99, 0.95) !important;
  border-radius: 18px !important;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.86),
    0 0 24px rgba(117, 179, 241, 0.72),
    inset 0 0 18px rgba(255, 255, 255, 0.34) !important;
}

.sentence-guide-arrow {
  width: 28px !important;
  height: 28px !important;
  filter: drop-shadow(0 4px 8px rgba(35, 92, 155, 0.24)) !important;
}

.sentence-guide-arrow.up::before {
  border-bottom-color: #6bb6ff !important;
}

.sentence-guide-arrow.down::before {
  border-top-color: #6bb6ff !important;
}

.sentence-guide-card {
  padding: 16px !important;
  border: 2px solid rgba(126, 177, 235, 0.95) !important;
  border-radius: 20px !important;
  color: #17345f !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(230, 247, 255, 0.92)) !important;
  box-shadow:
    0 18px 34px rgba(37, 92, 150, 0.24),
    inset 0 0 0 1px rgba(255, 255, 255, 0.92) !important;
}

.sentence-guide .sentence-guide-step {
  margin: 0 0 4px !important;
  color: #3b82d6 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  text-shadow: none !important;
}

.sentence-guide .sentence-guide-title {
  margin: 0 0 7px !important;
  color: #1f5ea9 !important;
  font-size: 21px !important;
  line-height: 1.16 !important;
  letter-spacing: 0 !important;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.9) !important;
}

.sentence-guide .sentence-guide-text {
  margin: 0 !important;
  color: #21476f !important;
  font-size: 15px !important;
  font-weight: 850 !important;
  line-height: 1.45 !important;
  text-shadow: none !important;
}

.sentence-guide-actions {
  gap: 10px !important;
  margin-top: 14px !important;
}

.sentence-guide-skip,
.sentence-guide-next {
  min-height: 36px !important;
  padding: 7px 14px !important;
  border: 2px solid rgba(96, 151, 216, 0.9) !important;
  border-radius: 12px !important;
  color: #1f5ea9 !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  box-shadow: 0 5px 12px rgba(61, 116, 179, 0.16) !important;
}

.sentence-guide-skip {
  background: linear-gradient(180deg, #ffffff, #e7f4ff) !important;
}

.sentence-guide-next {
  border-color: rgba(242, 178, 68, 0.95) !important;
  color: #7a4b00 !important;
  background: linear-gradient(180deg, #fff4bf, #ffd66f) !important;
}

@media (max-width: 620px) {
  .sentence-rpg-page .topbar {
    grid-template-columns: minmax(0, 1fr) auto !important;
  }

  .sentence-rpg-page .top-stats {
    display: flex !important;
    justify-content: flex-end !important;
    gap: 0 !important;
  }

  .sentence-rpg-page .sentence-guide-button {
    width: auto !important;
    min-width: 76px !important;
  }

  .sentence-rpg-page .pet-compact-summary h2 {
    gap: 6px !important;
  }

  .sentence-rpg-page .pet-level-badge {
    min-width: 42px;
    height: 23px;
    padding: 0 8px;
    font-size: 12px;
  }

  .sentence-rpg-page .pet-picker {
    align-items: start !important;
    padding: 10px !important;
  }

  .sentence-rpg-page .picker-card {
    width: min(330px, calc(100vw - 20px)) !important;
    max-height: calc(100vh - 20px) !important;
    padding: 14px !important;
    border-radius: 22px !important;
  }

  .sentence-rpg-page .picker-head {
    margin-bottom: 12px !important;
  }

  .sentence-rpg-page .pet-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .sentence-rpg-page .pet-option {
    grid-template-rows: 74px auto 1fr !important;
    min-height: 190px !important;
    padding: 10px 8px !important;
    border-radius: 12px !important;
  }

  .sentence-rpg-page .pet-thumb {
    width: 74px !important;
    height: 74px !important;
  }

  .sentence-rpg-page .pet-option-name {
    font-size: 16px !important;
  }

  .sentence-rpg-page .pet-option-desc {
    font-size: 11px !important;
    line-height: 1.38 !important;
  }

  .sentence-guide-card {
    padding: 13px !important;
    border-radius: 16px !important;
  }

  .sentence-guide .sentence-guide-title {
    font-size: 18px !important;
  }

  .sentence-guide .sentence-guide-text {
    font-size: 13px !important;
    line-height: 1.38 !important;
  }

  .sentence-guide-skip,
  .sentence-guide-next {
    min-height: 32px !important;
    padding: 6px 11px !important;
    font-size: 12px !important;
  }
}

/* Absolute final shared background lock for Sentence Practice. */
body.sentence-rpg-page,
body.sentence-rpg-page:has(.pet-app),
body.sentence-rpg-page .pet-app {
  background:
    linear-gradient(180deg, rgba(160, 222, 255, 0.14), rgba(255, 255, 255, 0.04)),
    url("assets/ui/cloud-kingdom-game-bg.png") center bottom / cover fixed no-repeat,
    #bdeeff !important;
}

body.sentence-rpg-page .playground,
body.sentence-rpg-page .quiz-card,
body.sentence-rpg-page .buddy-card,
body.sentence-rpg-page .buddy-stage,
body.sentence-rpg-page .stage-scene {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08)),
    url("assets/ui/cloud-kingdom-game-bg.png") center bottom / cover no-repeat,
    #dff6ff !important;
}

body.sentence-rpg-page .sentence-deck-bar {
  background:
    linear-gradient(180deg, rgba(238, 249, 255, 0.94), rgba(205, 235, 255, 0.9)),
    #d9efff !important;
  border-color: rgba(126, 181, 236, 0.82) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.76),
    0 8px 16px rgba(65, 129, 196, 0.12) !important;
}

body.sentence-rpg-page .quiz-card::before {
  background:
    linear-gradient(180deg, rgba(239, 248, 255, 0.16), rgba(255, 255, 255, 0.3)),
    url("assets/ui/cloud-kingdom-game-bg.png") center bottom / cover no-repeat !important;
  opacity: 0.72 !important;
}

@media (max-width: 720px) {
  body.sentence-rpg-page,
  body.sentence-rpg-page:has(.pet-app),
  body.sentence-rpg-page .pet-app {
    background:
      linear-gradient(180deg, rgba(160, 222, 255, 0.12), rgba(255, 255, 255, 0.04)),
      url("assets/ui/cloud-kingdom-game-bg.png") center bottom / cover scroll no-repeat,
      #bdeeff !important;
  }

  body.sentence-rpg-page .playground,
  body.sentence-rpg-page .quiz-card,
  body.sentence-rpg-page .buddy-card,
  body.sentence-rpg-page .buddy-stage,
  body.sentence-rpg-page .stage-scene {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06)),
      url("assets/ui/cloud-kingdom-game-bg.png") center bottom / cover no-repeat,
      #dff6ff !important;
  }

  body.sentence-rpg-page .sentence-deck-bar {
    background:
      linear-gradient(180deg, rgba(238, 249, 255, 0.95), rgba(205, 235, 255, 0.9)),
      #d9efff !important;
  }

  body.sentence-rpg-page .quiz-card::before {
    background:
      linear-gradient(180deg, rgba(239, 248, 255, 0.14), rgba(255, 255, 255, 0.28)),
      url("assets/ui/cloud-kingdom-game-bg.png") center bottom / cover no-repeat !important;
    opacity: 0.72 !important;
  }
}
