/* Organização visual das três categorias de jogos. */
/* Three editorial groups inside the established game navigation. Cards remain
   direct children so routes, information buttons and active artwork stay intact. */
#main > .games > .game-section-title {
  grid-column: 1/-1;
  margin: 14px 0 0;
  padding: 0 0 9px;
  border-bottom: 1px solid #c5cfbd;
  color: #405e49;
  font: 600 17px/1.4 var(--font-ui);
  letter-spacing: .08em;
}
#main > .games > .game-section-title:first-child {
  margin-top: 0;
}
@media(max-width:760px) {
  #main > .games > .game-section-title {
    font-size: 14px;
    letter-spacing: .06em;
    margin-top: 12px;
    padding-bottom: 8px;
  }
}
/* Category landing: reveal only the selected family; existing cards stay intact. */
#main > .games[hidden],#main > .games > [hidden],.category-choices[hidden],.category-heading > [hidden] {
  display: none!important;
}
.category-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  margin: 0 0 20px;
}
.category-heading:has(> [hidden]):not(:has(> :not([hidden]))) {
  display: none;
}
.category-heading h2 {
  font-size: 24px;
  font-weight: 650;
  color: #405e49;
}
.category-choices {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 18px;
  margin: 26px 0 38px;
}
.category-choices button {
  position: relative;
  text-align: left;
  min-height: 112px;
  padding: 24px 44px 24px 24px;
  border: 1px solid #c3ceba;
  border-radius: 13px;
  background: #fffefa;
  color: #405e49;
  font-size: 22px;
  line-height: 1.3;
  box-shadow: inset 0 -3px #e8ede3;
}
.category-choices small {
  display: block;
  font-size: 12px;
  line-height: 1.6;
  font-weight: 400;
  margin-top: 9px;
  color: #62634f;
}
.category-choices button > span {
  position: absolute;
  right: 18px;
  top: calc(50% - 14px);
  font-size: 24px;
}
.category-choices button:hover {
  background: #eef3e5;
  border-color: #405e49;
}
@media(max-width:760px) {
  .category-choices {
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 20px 0 28px;
  }
  .category-choices button {
    min-height: 86px;
    padding: 18px 42px 18px 18px;
    font-size: 20px;
  }
  .category-choices small {
    margin-top: 5px;
  }
  .category-heading {
    gap: 12px;
  }
  .category-heading h2 {
    font-size: 21px;
  }
}
/* A prominent, comfortably sized return shared by all three categories. */
#category-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 56px;
  padding: 13px 20px;
  border: 1px solid #405e49;
  border-radius: 12px;
  background: #e9f0dc;
  color: #304c38;
  font-size: 17px;
  font-weight: 750;
  line-height: 1.35;
  box-shadow: 0 2px 0 #c3ceba;
  max-width: 100%;
  text-align: left;
}
#category-back .category-back-arrow {
  font-size: 28px;
  font-weight: 600;
  line-height: 1;
  flex: none;
}
#category-back:hover {
  background: #dce8cc;
  border-color: #304c38;
}
#category-back:focus-visible {
  outline: 3px solid #405e49;
  outline-offset: 4px;
}
#category-back:active {
  box-shadow: inset 0 2px 0 #c3ceba;
}
@media(max-width:420px) {
  #category-back {
    width: 100%;
    padding: 13px 14px;
    font-size: 16px;
    gap: 10px;
  }
}
/* Equal breathing room around the return/title block, without collapsing margins. */
#main > .category-heading {
  margin: 0;
  padding-block: 24px;
}
#main > .category-heading + .games {
  margin-top: 0;
}
@media(max-width:760px) {
  #main > .category-heading {
    padding-block: 20px;
  }
}
.category-choices>.category-prompt {
  grid-column: 1/-1;
  margin: 0;
  font: 650 16px/1.5 var(--font-ui);
  letter-spacing: .04em;
  color: #405e49;
}
