:root {
  --nb-safe-top: env(safe-area-inset-top, 0px);
  --nb-safe-right: env(safe-area-inset-right, 0px);
  --nb-safe-bottom: env(safe-area-inset-bottom, 0px);
  --nb-safe-left: env(safe-area-inset-left, 0px);
}

html {
  min-height: 100%;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
}

:where(main, section, article, aside, nav, header, footer, form, fieldset, div) {
  min-width: 0;
}

:where(h1, h2, h3, h4, h5, h6, p, li, dt, dd, figcaption, label, legend, output, summary) {
  overflow-wrap: anywhere;
}

:where(button, [role="button"], input[type="button"], input[type="submit"]) {
  overflow-wrap: normal;
  word-break: keep-all;
  hyphens: none;
}

:where(img, video, canvas, svg) {
  max-width: 100%;
}

:where(button, input, select, textarea) {
  font: inherit;
}

:where(button, a, input, select, textarea, summary):focus-visible {
  outline: 3px solid color-mix(in srgb, #1ea8ff 80%, white);
  outline-offset: 3px;
}

/* Pesquisa principal: uma única linha compacta, sem ícones nativos duplicados. */
.nb-premium-hero-v33 .nb-hero-search-v32 {
  width: 100%;
  height: auto;
  min-height: 0;
  align-self: start;
}

.nb-premium-hero-v33 .nb-hero-search-v32 > div {
  width: 100%;
  height: 58px;
  min-height: 58px;
  max-height: 58px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) max-content;
  align-items: center;
  align-content: center;
  gap: 4px;
  padding: 4px;
  overflow: hidden;
  border-radius: 18px;
}

.nb-premium-hero-v33 .nb-hero-search-v32 input {
  width: 100%;
  height: 48px;
  min-height: 0;
  max-height: 48px;
  padding-block: 0;
  padding-inline: 2.65rem 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  appearance: none;
  -webkit-appearance: none;
}

.nb-premium-hero-v33 .nb-hero-search-v32 input::-webkit-search-decoration,
.nb-premium-hero-v33 .nb-hero-search-v32 input::-webkit-search-cancel-button,
.nb-premium-hero-v33 .nb-hero-search-v32 input::-webkit-search-results-button,
.nb-premium-hero-v33 .nb-hero-search-v32 input::-webkit-search-results-decoration {
  display: none;
  -webkit-appearance: none;
}

.nb-premium-hero-v33 .nb-hero-search-v32 button {
  width: auto;
  min-width: 116px;
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 17px;
  line-height: 1;
  white-space: nowrap;
}

#nbHomeSearch {
  background: transparent !important;
  border: 0;
  box-shadow: none;
}

#nbHomeSearch .nb-search-symbol-v33 {
  position: relative;
  inset: auto;
  transform: none;
  justify-self: center;
  width: 16px;
  height: 16px;
  min-width: 16px;
  padding: 0;
  margin: 0;
  background: transparent !important;
}

#nbHomeSearch #nbHeroSearch {
  min-width: 0;
  padding: 0 0.5rem !important;
  font-size: 1rem;
}

#nbHomeSearch button > span {
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0;
  overflow-wrap: normal;
}

.nb-search-submit-icon-v65 {
  display: none;
  font-size: 1.2rem;
  line-height: 1;
}

:where(dialog, [role="dialog"], [role="alertdialog"]) {
  max-width: min(94vw, 760px);
  max-height: calc(100dvh - var(--nb-safe-top) - var(--nb-safe-bottom) - 24px);
  overscroll-behavior: contain;
}

[hidden] {
  display: none !important;
}

.nb-ad-slot-v64 {
  width: min(100%, 1100px);
  min-height: 90px;
  margin: clamp(28px, 5vw, 64px) auto;
  padding: 18px;
  border: 1px solid color-mix(in srgb, currentColor 14%, transparent);
  border-radius: 16px;
  contain: layout paint;
  isolation: isolate;
}

.nb-ad-slot-v64::before {
  content: "PUBLICIDADE";
  display: block;
  margin-bottom: 10px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  opacity: 0.66;
}

[data-nb-game-mode="active"] .nb-ad-slot-v64,
.nb-game-mode-active .nb-ad-slot-v64 {
  display: none !important;
}

.nb-release-visual-v64 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0;
}

.nb-release-visual-v64 a {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: block;
  overflow: hidden;
  border-radius: 12px;
  background: #111827;
}

.nb-release-visual-v64 img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  transition: transform 180ms ease, filter 180ms ease;
}

.nb-release-visual-v64 a:hover img,
.nb-release-visual-v64 a:focus-visible img {
  transform: scale(1.025);
  filter: saturate(1.08);
}

/* Catálogo: capas horizontais com proporção reservada, sem altura herdada. */
.games-page .games-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.games-page .game-card { min-height: 0; padding: 16px; }
.games-page .game-card-cover {
  width: 100%; max-width: 100%; height: auto; min-height: 0; max-height: none;
  aspect-ratio: 16 / 9; object-fit: cover; object-position: center;
  flex: 0 0 auto; margin: 14px 0 16px; border-radius: 12px;
}
.games-page .game-card h3 { font-size: clamp(1.1rem, 1.55vw, 1.5rem); line-height: 1.25; }
.games-page .game-card p { min-height: 0; font-size: 1rem; }
.games-page .game-card > a { padding: 12px; line-height: 1.35; overflow-wrap: normal; }
.games-page .game-status { max-width: calc(100% - 44px); white-space: normal; font-size: .75rem; }
.salary-breakdown { display: grid; gap: 12px; }
.salary-breakdown > div { display: flex; gap: 12px; justify-content: space-between; align-items: baseline; flex-wrap: wrap; border-bottom: 1px solid #94a3b855; padding-block: 8px; }
.salary-breakdown dd { margin: 0; font-weight: 700; white-space: nowrap; }
@media (max-width: 1150px) { .games-page .games-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .games-page .games-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px) { .games-page .games-grid { grid-template-columns: minmax(0, 1fr); } }

@media (max-width: 760px) {
  :where(button, [role="button"], input[type="button"], input[type="submit"], select, summary) {
    min-height: 44px;
  }

  :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
    font-size: 16px;
  }

  :where(dialog, [role="dialog"], [role="alertdialog"]) {
    max-width: calc(100vw - var(--nb-safe-left) - var(--nb-safe-right) - 16px);
    max-height: calc(100dvh - var(--nb-safe-top) - var(--nb-safe-bottom) - 16px);
  }

  .nb-ad-slot-v64 {
    min-height: 100px;
    margin-inline: max(12px, var(--nb-safe-left));
  }

  .nb-release-visual-v64 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nb-premium-hero-v33 .nb-hero-search-v32 > div {
    height: 56px;
    min-height: 56px;
    max-height: 56px;
    grid-template-columns: 24px minmax(0, 1fr) 48px;
    border-radius: 17px;
  }

  .nb-premium-hero-v33 .nb-hero-search-v32 input,
  .nb-premium-hero-v33 .nb-hero-search-v32 button {
    height: 48px;
    min-height: 48px;
    max-height: 48px;
  }

  .nb-premium-hero-v33 .nb-hero-search-v32 button {
    width: 48px;
    min-width: 48px;
    padding: 0;
    color: #fff;
    font-size: 1rem;
  }

  .nb-premium-hero-v33 .nb-hero-search-v32 button::before {
    content: none;
  }

  .nb-search-submit-label-v65 {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .nb-search-submit-icon-v65 {
    display: inline;
  }

  /* Libertar a área de escrita sem esconder um painel Titor aberto. */
  body:not(.games-page):not([data-games-project]):not(.nb-titor-is-open):has(input:focus, textarea:focus, select:focus) :where(
    .nb-titor-v2,
    .favorite-floating,
    .nb-favorite-floating,
    [data-favorite-floating]
  ) {
    display: none !important;
  }
}

@media (max-width: 360px) {
  .nb-premium-hero-v33 .nb-hero-search-v32 input {
    padding-left: 2.45rem;
    font-size: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
