@import url("https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600;700&family=Lilita+One&family=Nunito:wght@400;600;700;800&display=swap");

:root {
  color-scheme: dark;
  --nf-ink: #f8e8bf;
  --nf-muted: #c6b38c;
  --nf-deep: #102c29;
  --nf-panel: #173b34;
  --nf-panel-light: #214a3e;
  --nf-gold: #e7b957;
  --nf-gold-bright: #f5d58c;
  --nf-border: rgba(231, 185, 87, .48);
  --nf-shadow: 0 18px 48px rgba(8, 18, 16, .35);
  font-family: "Nunito", sans-serif;
  background: var(--nf-deep);
  color: var(--nf-ink);
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body {
  min-height: 100dvh;
  margin: 0;
  background:
    radial-gradient(ellipse at 50% -20%, rgba(76, 107, 75, .42), transparent 52%),
    linear-gradient(145deg, #102c29 0%, #15332d 56%, #102724 100%);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .12;
  background-image: radial-gradient(rgba(250, 226, 178, .4) .55px, transparent .55px);
  background-size: 5px 5px;
}
a { color: inherit; }
button, summary { font: inherit; }
button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid var(--nf-gold-bright);
  outline-offset: 4px;
}

.new-fun {
  width: min(1180px, 100%);
  margin-inline: auto;
  padding: clamp(18px, 4vw, 48px) clamp(16px, 4vw, 44px) 64px;
}
.nf-header {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  padding: 12px 0 28px;
  border-bottom: 1px solid var(--nf-border);
}
.nf-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  min-height: 42px;
  padding: 8px 15px;
  border: 1px solid var(--nf-border);
  border-radius: 999px;
  background: rgba(17, 44, 39, .68);
  color: var(--nf-ink);
  font-size: .88rem;
  font-weight: 800;
  text-decoration: none;
  transition: background .18s ease, transform .18s ease;
}
.nf-back:hover { background: #285044; transform: translateY(-2px); }
.nf-back-mark { color: var(--nf-gold); font-size: 1.2rem; line-height: 1; }
.nf-title-wrap { text-align: center; }
.nf-eyebrow {
  margin: 0 0 2px;
  color: var(--nf-gold);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .24em;
  text-transform: uppercase;
}
.nf-title {
  margin: 0;
  color: #f5d58c;
  font: clamp(2.35rem, 6vw, 4.55rem)/.98 "Lilita One", Georgia, serif;
  letter-spacing: .015em;
  text-shadow: 0 3px 0 #614019, 0 8px 24px rgba(0, 0, 0, .34);
}
.nf-subtitle {
  margin: 8px 0 0;
  color: #f8e8bf;
  font: 500 clamp(1rem, 2.4vw, 1.28rem)/1.2 "Fredoka", sans-serif;
  letter-spacing: .035em;
}
.nf-header-spacer { min-height: 1px; }
.nf-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 30px 0 16px;
}
.nf-section-heading h2 {
  margin: 0;
  color: #f5d58c;
  font: 1.45rem/1.05 "Lilita One", Georgia, serif;
  letter-spacing: .02em;
}
.nf-section-heading p { margin: 0; color: var(--nf-muted); font-size: .84rem; }
.nf-featured {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.nf-feature {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(105px, 32%);
  align-items: center;
  min-height: 226px;
  overflow: hidden;
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid var(--nf-border);
  border-radius: 18px 6px 18px 6px;
  background:
    linear-gradient(115deg, rgba(14, 40, 35, .97) 0%, rgba(23, 59, 52, .91) 70%, rgba(29, 65, 55, .78) 100%);
  box-shadow: var(--nf-shadow), inset 0 0 0 4px rgba(231, 185, 87, .045);
}
.nf-feature::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(231, 185, 87, .17);
  border-radius: 12px 3px 12px 3px;
  pointer-events: none;
}
.nf-feature-copy { position: relative; z-index: 1; }
.nf-ribbon {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 3px 10px;
  border-radius: 3px 10px 3px 10px;
  background: var(--nf-gold);
  color: #392613;
  font-size: .65rem;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.nf-feature h3 {
  margin: 12px 0 5px;
  color: #f5d58c;
  font: clamp(1.8rem, 4.2vw, 2.65rem)/.98 "Lilita One", Georgia, serif;
}
.nf-feature p { max-width: 30ch; margin: 0; color: #e4d4b3; font-size: .92rem; line-height: 1.45; }
.nf-feature-art {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  max-height: 180px;
  object-fit: contain;
  filter: drop-shadow(0 8px 11px rgba(0, 0, 0, .4));
}
.nf-feature-peek { grid-template-columns: minmax(0, 1fr) minmax(125px, 38%); }
.nf-feature-peek .nf-feature-art { max-height: 166px; }
.nf-feature-actions { display: flex; align-items: center; gap: 12px; margin-top: 19px; }
.nf-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  min-height: 42px;
  padding: 9px 20px;
  border: 1px solid #edcb78;
  border-radius: 999px;
  background: linear-gradient(#e9bd59, #c99036);
  color: #342410;
  font: 600 1rem "Fredoka", sans-serif;
  text-decoration: none;
  box-shadow: 0 4px 0 #79532a, 0 6px 14px rgba(0, 0, 0, .24);
  transition: transform .16s ease, filter .16s ease;
}
.nf-play:hover { filter: brightness(1.08); transform: translateY(-2px); }
.nf-coming {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid rgba(231, 185, 87, .32);
  border-radius: 999px;
  color: #f1d599;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .035em;
}
.nf-category-heading { margin-top: 44px; }
.nf-categories {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.nf-category {
  min-width: 0;
  border: 1px solid var(--nf-border);
  border-radius: 6px 16px 6px 16px;
  background: linear-gradient(155deg, rgba(37, 76, 62, .98), rgba(19, 49, 43, .98));
  box-shadow: 0 10px 25px rgba(4, 17, 14, .26), inset 0 0 0 4px rgba(231, 185, 87, .045);
}
.nf-category summary {
  position: relative;
  display: flex;
  min-height: 130px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px 12px;
  color: var(--nf-ink);
  list-style: none;
  cursor: pointer;
  text-align: center;
}
.nf-category summary::-webkit-details-marker { display: none; }
.nf-category summary::before {
  content: attr(data-mark);
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(231, 185, 87, .56);
  border-radius: 50%;
  color: #f4d283;
  font: 1.15rem "Lilita One", Georgia, serif;
  background: rgba(14, 38, 33, .55);
}
.nf-category summary::after {
  content: "Explore";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 90px;
  min-height: 30px;
  padding: 4px 13px;
  border: 1px solid rgba(237, 203, 120, .78);
  border-radius: 999px;
  background: #1a5144;
  color: #f4d283;
  font-size: .76rem;
  font-weight: 800;
  transition: background .18s ease;
}
.nf-category summary:hover::after, .nf-category[open] summary::after { background: #286553; }
.nf-category-name { font: 1.32rem/1 "Lilita One", Georgia, serif; }
.nf-game-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0 16px 12px;
  list-style: none;
}
.nf-game-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 1px;
  border-top: 1px solid rgba(231, 185, 87, .19);
  color: #f6e7c5;
  font-size: .85rem;
  font-weight: 800;
}
.nf-game-list li small { color: #d9b66d; font-size: .67rem; font-weight: 800; white-space: nowrap; }
.nf-game-list a { text-decoration-color: rgba(245, 213, 140, .5); text-underline-offset: 3px; }
.nf-category:focus-within { border-color: var(--nf-gold-bright); }
.nf-footer {
  display: flex;
  justify-content: center;
  margin-top: 34px;
  color: #a99469;
  font-size: .75rem;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.nf-player-quirkie {
  position: fixed;
  z-index: 20;
  bottom: max(8px, env(safe-area-inset-bottom));
  left: max(8px, env(safe-area-inset-left));
  display: flex;
  width: clamp(58px, 8vw, 108px);
  height: clamp(68px, 14vh, 128px);
  align-items: flex-end;
  justify-content: center;
  text-decoration: none;
}
.nf-player-quirkie[hidden] { display: none; }
.nf-player-quirkie img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  object-position: center bottom;
}
.nf-player-quirkie:focus-visible { outline: 3px solid var(--nf-gold-bright); outline-offset: 2px; }

@media (max-width: 760px) {
  .new-fun { padding-top: 18px; }
  .nf-header { grid-template-columns: 1fr auto; gap: 12px; padding-bottom: 20px; }
  .nf-title-wrap { grid-column: 1 / -1; grid-row: 1; padding: 5px 0 4px; }
  .nf-back { grid-column: 1 / -1; grid-row: 2; justify-self: center; min-height: 38px; }
  .nf-header-spacer { display: none; }
  .nf-featured { grid-template-columns: 1fr; gap: 12px; }
  .nf-feature { min-height: 190px; }
  .nf-categories { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .nf-section-heading { align-items: start; flex-direction: column; gap: 5px; }
  .nf-feature { grid-template-columns: minmax(0, 1fr) 105px; padding: 17px; }
  .nf-feature-peek { grid-template-columns: minmax(0, 1fr) 118px; }
  .nf-feature h3 { font-size: 1.85rem; }
  .nf-feature-art { max-height: 140px; }
  .nf-category summary { min-height: 122px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* The supplied house art contains its own labels and Play buttons. */
html,
body { width: 100%; min-height: 100%; overflow-x: hidden; }
body.nf-house-page {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: 100dvh;
  place-items: center;
  background: #17211d;
}
body.nf-house-page::before {
  z-index: 0;
  opacity: .6;
  background: url("/api/storage/public-objects/newfun-house/newfun-house-interior-moregames.png") center / cover fixed no-repeat;
  filter: blur(16px) brightness(.35);
  transform: scale(1.04);
}
body.nf-house-page .new-fun {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(100vw, 150dvh);
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  place-items: center;
}
.nf-house {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
}
.nf-house-art {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.nf-house-hotspot {
  position: absolute;
  z-index: 2;
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  transform: translateY(-50%);
  -webkit-tap-highlight-color: transparent;
}
.nf-game-card-hotspot {
  border-radius: 0;
}
.nf-house-hotspot:focus-visible {
  outline: 3px solid #fff0a8;
  outline-offset: 2px;
  box-shadow: 0 0 18px #fff0a8;
}
.nf-back-hotspot { left: 4.8%; top: 4.5%; width: 14.5%; height: 5%; }
.nf-letterlock-hotspot { left: 7%; top: 28%; width: 48%; height: 34%; }
.nf-peek-play,
.nf-coming-soon-hotspot {
  position: absolute;
  z-index: 3;
  left: 61.1%;
  top: 32.4%;
  display: grid;
  width: 15.2%;
  height: 5.5%;
  place-items: center;
  border: 2px solid #d9b55b;
  border-radius: 999px;
  background: linear-gradient(180deg, #17493f, #0d302b);
  color: #f5d98d;
  font: 800 clamp(8px, 1.55vw, 17px)/1 "Fredoka", sans-serif;
  text-align: center;
  text-shadow: 0 1px 2px #08201b;
  box-shadow: inset 0 0 0 2px rgba(248, 225, 160, .12);
  pointer-events: none;
}
.nf-peek-play {
  pointer-events: auto;
  text-decoration: none;
}
.nf-peek-play:focus-visible {
  outline: 3px solid #fff0a8;
  outline-offset: 2px;
}
.nf-pipes-hotspot { left: 7%; top: 61%; width: 22%; height: 29%; }
.nf-labyrinth-hotspot { left: 29.5%; top: 61%; width: 21.5%; height: 29%; }
.nf-simon-hotspot { left: 51%; top: 61%; width: 21.5%; height: 29%; }
.nf-target-hotspot { left: 73%; top: 61%; width: 22%; height: 29%; }
.nf-more-games-hotspot {
  left: 1%;
  top: 88%;
  width: 98%;
  height: 20%;
}
@media (max-width: 480px) {
  .nf-player-quirkie { width: 62px; height: 84px; z-index: 30; }
}
