.nav-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 12;
}

.nav {
  height: 90px;
  display: flex;
  align-items: center;
  align-content: center;
  padding: 0 40px;
}

.nav-wrapper {
  box-shadow: 0 0 12px 0 #000;
}

.nav, .nav-wrapper .drawer {
  background: #000 url(/assets/reusables/graphics/darker-wood.png);
}

.nav .center {
  -webkit-box-flex: 2;
  -ms-flex-positive: 2;
  flex-grow: 2;
  text-align: center;
  display: flex;
  font: 400 50px cassannet;
  align-items: center;
  justify-content: center;
}

.nav a, .drawer a, .condensed-logo a {
  text-decoration: none;
  outline: none !important;
}

.nav a.center, .condensed-logo a {
  color: #fff !important;
}

.nav .center .logo {
  margin-right: 10px;
}

.nav .menu-option {
  position: relative;
  height: 50px;
  color: #fff;
  display: inline-block;
  font: 500 50px sunn;
  padding: 0 20px;
  line-height: 45px;
  -webkit-transition: color 0.15s;
  -moz-transition: color 0.15s;
  -o-transition: color 0.15s;
  transition: color 0.15s;
}

.nav .expandable-arrow {
  position: relative;
  top: -6.5px;
  border-top: #FFF 11px solid;
  border-left: transparent 8px solid;
  border-right: transparent 8px solid;
  display: inline-block;
  border-radius: 2px;
  transition: transform 0.6s;
}

.nav .expandable-arrow.upside-down {
  -webkit-transform: rotate(180deg);
  -moz-transform: rotate(180deg);
  -ms-transform: rotate(180deg);
  -o-transform: rotate(180deg);
  transform: rotate(180deg);
}

.nav .menu-option.language-options {
  top: -1.5px;
  cursor: pointer;
}

.nav a:not(:last-child) .menu-option {
  border-right: 1px solid #FFF;
}

.nav a.active .menu-option:after {
  content: "";
  position: absolute;
  bottom: -20px;
  left: 10px;
  right: 10px;
  background-color: #F390AF;
  border-radius: 2px;
  height: 5px;
}

.pinked {
  color: #F390AF !important;
}

.menu-option.language-options img {
  max-height: 40px;
  vertical-align: middle;
}

.nav .left, .nav .right {
  padding: 20px 0;
}

.nav-wrapper .drawer {
  position: absolute;
  box-shadow: 0 0 3px 0 #231F20;
  z-index: -1;
  transition: transform 0.6s;
}

.nav-wrapper .drawer.open {
  transform: translate(0, 100%);
  bottom: 0;
}

.language.drawer {
  right: 55px;
  padding: 0 15px;
  width: 120px;
  bottom: 2px;
}

.language.drawer > div {
  border-top: 1px solid #fff;
  padding: 10px;
  cursor: pointer;
}

.language.drawer img {
  max-width: 100%;
}

.games.drawer {
  bottom: 2px;
  left: 41px;
  min-width: 280px;
  transition: transform .5s cubic-bezier(.3,.7,.2,1);
}

.games.drawer .game {
  padding: 6px 18px 6px 12px;
}

/* The line sits over the whole row, icon included, so each project reads as one block. */
.games.drawer .game a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
  padding-top: 4px;
  border-top: 1px solid #fff;
}

.games.drawer .game img {
  flex: 0 0 50px;
  width: 50px;
  height: 50px;
  border-radius: 6px;
}

.games.drawer .game-name {
  flex: 1 1 auto;
  color: #fff;
  text-align: center;
  font: 400 49px sunn;
  line-height: 54px;
  white-space: nowrap;
  transition: color .15s;
}

.games.drawer .game:after {
  content: "";
  display: block;
  clear: both;
}

.footer {
  position: relative;
  z-index: 10;
  display: block;
  background: #231F20;
  color: #E9E3D8;
  font-family: Dosis, sans-serif;
}

/* The two strips of tape holding the footer onto the page above it, coloured by the page's --tape-a and --tape-b. */
.footer-tape {
  position: absolute;
  top: -12px;
  width: 84px;
  box-shadow: 0 1px 2px rgba(0,0,0,.12);
}

.footer-tape-left {
  left: 12%;
  height: 20px;
  transform: rotate(-3deg);
  background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--tape-a, #F390AF) 60%, transparent) 0 8px, color-mix(in srgb, var(--tape-a, #F390AF) 42%, transparent) 8px 16px);
}

.footer-tape-right {
  right: 14%;
  height: 22px;
  transform: rotate(5deg);
  background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--tape-b, #D86F92) 60%, transparent) 0 8px, color-mix(in srgb, var(--tape-b, #D86F92) 42%, transparent) 8px 16px);
}

.footer-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 28px 56px;
}

.footer-brand {
  flex: 1 1 240px;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: #E9E3D8;
  text-decoration: none;
  font: 400 32px cassannet, serif;
}

.footer-logo img {
  width: 40px;
  height: 40px;
}

.footer-logo span {
  position: relative;
  top: 3px;
}

.social-media {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.social-media a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid #4A4446;
  color: #E9E3D8;
  transition: color .15s, border-color .15s, transform .15s;
}

.social-media a:hover, .social-media a:focus-visible {
  color: #F390AF;
  border-color: #F390AF;
  transform: translateY(-3px);
}

.footer-nav {
  flex: 2 1 420px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px 20px;
  font-size: 17px;
}

/* The page links take the header menu's lettering, so they read as a menu rather than as more of the small links under them. */
.footer-nav a {
  color: #E9E3D8;
  font: 500 28px/1.15 sunn, sans-serif;
  text-decoration: none;
}

/* A strip of the wood always closes the site under the footer, at every width. */
.footer::after {
  content: '';
  display: block;
  height: 30px;
  background: #231F20 url(/assets/reusables/graphics/dark-wood.png);
  box-shadow: inset 0 6px 6px -4px rgba(0,0,0,.6);
}

/* On wide screens the socials sit on one row, and the page links fit beside them in the same height. */
@media (min-width: 1081px) {
  .footer-main {
    flex-wrap: nowrap;
    align-items: center;
  }

  .footer-brand {
    flex: 0 0 auto;
  }

  .social-media {
    flex-wrap: nowrap;
  }

  .footer-nav {
    flex: 1 1 auto;
    grid-template-columns: repeat(4, max-content);
    justify-content: end;
    gap: 6px 40px;
  }
}

.footer-rights {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 24px 28px;
  border-top: 1px solid #3A3436;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  font-size: 14px;
  color: #B9B1A6;
}

.footer-rights a {
  color: #B9B1A6;
}

::-webkit-input-placeholder { /* Chrome/Opera/Safari */
  text-align: center;
}
::-moz-placeholder { /* Firefox 19+ */
  text-align: center;
}
:-ms-input-placeholder { /* IE 10+ */
  text-align: center;
}
:-moz-placeholder { /* Firefox 18- */
  text-align: center;
}

.page-wrapper {
  position: relative;
  padding: 0 40px;
  width: 100%;
}

.smudges {
  position: absolute;
  left: 40px;
  right: 40px;
  top: 0;
  height: 250px;
  background: url(../assets/reusables/graphics/stain-header.png) center top no-repeat;
  pointer-events: none;
}

.smudges.black {
  position: absolute;
  left: 40px;
  right: 40px;
  top: 0;
  height: 250px;
  background: url(../assets/reusables/graphics/black-smudges.png) center top no-repeat;
  pointer-events: none;
}

.page {
  width: 100%;
  min-height: 400px;
  background: #f0f0f0 url(../assets/reusables/graphics/page-tile.png);
}

.cookie-disclaimer p {
  margin: 0;
}

.cookie-message {
  margin-top: 0;
}

.cookie-disclaimer.out {
  transform: translate(0, 100%);
}

.nav a:hover .menu-option, .footer-nav a:hover, .footer-nav a.active, .footer-rights a:hover,
.games.drawer a:hover .game-name, .nav:not(.hovered) a.active .menu-option, .footer-rights a.active {
  color: #F390AF;
}

/* The cookie notice: one paper sheet over the page, scrolling inside itself when taller than the screen.
   It stays within the space the page really has, since a phone's address bar leaves less than the screen's height, and the notice would hang off the top and bottom. */
.cookie-notice-scroll {
  font-family: Dosis, sans-serif;
  width: 820px;
  max-width: 100%;
  max-height: 100%;
  overflow: auto;
}

.cookie-notice .paper-stack {
  padding-top: 0;
  background: none;
  box-shadow: none;
}

.cookie-notice ::ng-deep .paper-sheet-wrap {
  margin: 0;
}

.cookie-notice ::ng-deep .paper-sheet-under {
  display: none;
}

.cookie-notice ::ng-deep .paper-sheet {
  padding: 58px 56px 54px;
}

.cookie-notice .info-head {
  margin-bottom: 24px;
}

.cookie-notice .paper-label {
  font-size: 44px;
}

.cookie-message {
  max-width: 640px;
  margin: 0 auto 26px;
  text-align: center;
  font-size: 18px;
  line-height: 1.6;
}

.cookie-notice-footer {
  margin-top: 34px;
  text-align: center;
}

.cookie-accept {
  --button: #3B3632;
  border: none;
  background: none;
  cursor: pointer;
}

/* The cookie monster, drawn in pencil in the bottom corner. */
.cookie-notice-monster {
  position: absolute;
  right: 18px;
  bottom: 10px;
  width: 190px;
  filter: invert(1);
  opacity: .16;
  pointer-events: none;
}

/* A cross drawn on the paper, top right. */
.cookie-notice-close {
  position: absolute;
  z-index: 2;
  right: -26px;
  top: -34px;
  width: 44px;
  height: 44px;
  border: none;
  background: none;
  cursor: pointer;
  opacity: .65;
  transition: opacity .15s, transform .15s;
}

.cookie-notice-close::before, .cookie-notice-close::after {
  content: '';
  position: absolute;
  left: 9px;
  right: 9px;
  top: 20px;
  height: 3px;
  border-radius: 2px;
  background: #3B3632;
  transform: rotate(45deg);
}

.cookie-notice-close::after {
  transform: rotate(-42deg);
}

.cookie-notice-close:hover, .cookie-notice-close:focus-visible {
  opacity: 1;
  transform: rotate(8deg);
}

.cookie-modal-toggle {
  position: fixed;
  bottom: 15px;
  left: 15px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 10001;
}

.cookie-modal-toggle.in {
  opacity: 1;
  pointer-events: all;
}

@media (max-width: 1400px) {
  .nav {
    height: 65px;
  }

  .logo {
    width: 50px;
  }

  .nav .menu-option {
    height: 30px;
    font-size: 30px;
    line-height: 34px;
  }

  .nav .center {
    font-size: 48px;
  }

  .nav a.active .menu-option:after {
    bottom: -18px;
  }  

  .menu-option.language-options img {
    max-height: 25px;
    vertical-align: middle;
  }

  .nav .expandable-arrow {
    top: 0.5px;
  }
}

@media (max-width: 1080px) {
  .page-wrapper {
    padding: 0 5px;
  }

  .games.drawer {
    bottom: 1px;
    left: 5px;
    width: auto;
    min-width: 200px;
  }

  .smudges {
    left: 5px;
    right: 5px;
  }

  .nav {
    height: 50px;
    padding: 0 10px;
  }

  .logo {
    width: 40px;
  }

  .nav .menu-option {
    height: 25px;
    font-size: 26px;
    padding: 0 10px;
    line-height: 28px;
  }

  .nav .center {
    font-size: 38px;
  }

  .nav a.active .menu-option:after {
    bottom: -14px;
    height: 4px;
  }  

  .menu-option.language-options img {
    max-height: 20px;
    vertical-align: middle;
  }

  .nav .expandable-arrow {
    top: -1px;
    border-top: #FFF 9px solid;
    border-left: transparent 6px solid;
    border-right: transparent 6px solid;
  }

  .language.drawer {
    right: 5px;
  }
}

@media (max-width: 767px) { 
  .nav-wrapper {
    background: #000 url(/assets/reusables/graphics/darker-wood.png);
    padding: 0 10px;
  }

  .nav-wrapper .nav {
    padding-bottom: 120px;
  }

  .cookie-disclaimer {
    font-size: 18px;
    padding: 4px 8px;
  }

  .cookie-disclaimer .cookie-closer {
    margin-left: 4px;
  }

  .cookie-notice ::ng-deep .paper-sheet {
    padding: 46px 20px 40px;
  }

  .cookie-notice .paper-label {
    font-size: 32px;
  }

  .cookie-message {
    font-size: 16px;
  }

  /* Room above the sheet for the cross, which the scrolling would otherwise cut off. */
  .cookie-notice-scroll {
    padding-top: 30px;
  }

  .cookie-notice-close {
    right: -6px;
    top: -30px;
  }

  .cookie-notice-monster {
    width: 120px;
  }

  .burger {
    position: relative;
    float: right;
    width: 50px;
    height: 50px;
    padding: 10px 8px;
    margin: 4px 8px 0 0;
    cursor: pointer;
  }

  .burger:not(.open) .bun {
    width: 100%;
    height: 3px;
    background-color: #FFF;
    margin-bottom: 8px;
  }

  .burger.open .arrow {
    position: absolute;
    top: 10px;
    left: 6px;
    border-right: #FFF 21px solid;
    border-top: transparent 14px solid;
    border-bottom: transparent 14px solid;
    border-radius: 4px;
  }

  .burger.open .arrow-body {
    position: absolute;
    top: 19px;
    width: 22px;
    right: 7px;
    background-color: #FFF;
    height: 10px;
    border-radius: 2px;
  }

  .nav {
    display: block;
    position: fixed;
    top: 50px;
    right: -200px;
    height: calc(100vh - 50px);
    overflow-y: auto;
    width: 200px;
  }

  .nav .left, .nav .right {
    padding: 0;
  }

  .nav .menu-option {
    display: block;
    width: 100%;
    font-size: 48px;
    height: auto;
    min-height: 48px;
    line-height: 36px;
    padding: 8px 0;
  }

  .nav .awkward-icons {
    border-bottom: #FFF solid 1px;
  }

  .nav .awkward-icons p, .nav .mobile-language-options p {
    position: relative;
    min-height: 50px;
    color: #fff;
    margin: 0;
    font: 500 42px sunn;
    text-align: center;
    line-height: 45px;
  }

  .nav .mobile-language-options p {
    text-align: center;
  }

  .nav .awkward-icons a, .nav .mobile-language-options > div {
    float: left;
    width: 50%;
    padding: 0 0 4px;
  }

  /* With an odd number of networks, the last button takes the whole row. The menu's title comes first and a clearing line last, hence counting from both ends. */
  .nav .awkward-icons a:nth-last-child(2):nth-child(even) {
    width: 100%;
    padding-right: 0 !important;
  }

  .nav .awkward-icons .social-tile {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 72px;
    border-radius: 12px;
    /* A faint edge, so the black X and TikTok buttons still show on the black menu. */
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.28);
  }

  .nav .awkward-icons a:nth-child(even), .nav .mobile-language-options > div:nth-child(even) {    
    padding-right: 4px;
  }

  .nav .awkward-icons a:nth-child(odd), .nav .mobile-language-options > div:nth-child(odd) {    
    padding-left: 4px;
  }

  .nav .awkward-icons img, .nav .mobile-language-options img  {
    max-width: 100%;
  }

  .nav .center {
    display: none;
  }

  .nav a .menu-option {
    border-right: none !important;
    border-bottom: #FFF solid 1px;
  }

  .nav a.active .menu-option:after {
    display: none;
  }

  .page-wrapper, .footer, .nav {
    transition: transform 0.3s;
  }

  .page-wrapper.nav-open, .footer.nav-open, .nav.nav-open {
    transform: translate(-200px, 0);
  }

  .condensed-logo {
    float: left;
    font: 400 35px cassannet;
    color: #FFF;
  }

  .condensed-logo > a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 54px;
  }

  .condensed-logo > a p {
    display: block;
    margin-left: 8px;
    position: relative;
    top: 4px;
  }

}