@font-face {
  font-family: 'Maax Finstral';
  src: url('fonts/MaaxFinstral-Regular.woff2') format('woff2'),
       url('fonts/MaaxFinstral-Regular.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

body {
  text-align: center;
  font-family: 'Maax Finstral', Arial, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100dvh;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

#page-container {
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}

#sketch-container {
  margin: 0 auto;
}

h1 {
  margin-top: 40px;
  margin-bottom: 5px;
  font-size: 30px;
  font-weight: normal;
}

.text-block {
  margin: 0 auto;  
  margin-top: 0px;
  font-size: 16px;
  font-weight: normal;
  max-width: 600px;
  line-height: 1.45;
}

a {
  color: inherit;
  text-decoration: underline;
}

.cornertext {
  position: fixed;
  bottom: 20px;
  font-size: 16px;
  font-weight: normal;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.3s ease;
  cursor: pointer;
  z-index: 1001;
}

.cornertext:hover {
  opacity: 0.7;
}

.cornertext.left {
  left: 20px;
}

.cornertext.right {
  right: 20px;
}

.dropdown-content {
  display: none;
  position: absolute;
  min-width: 240px;
  padding-top: 14px;
  padding-bottom: 14px;
  z-index: 1;
  right: 0;
  top: 30px;
  border: 1px solid black;
}

.dropdown-content a {
  padding: 12px 16px;
  padding-left: 24px;
  text-decoration: none;
  display: block;
  text-align: left;
  position: relative;
}

.checkmark {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkmark svg {
  width: 16px;
  height: 16px;
}

.dropdown-separator {
  height: 1px;
  background-color: inherit;
  margin: 8px 16px;
}

.chevron {
  display: inline-block;
  transition: transform 0.3s ease;
  margin-left: 4px;
  vertical-align: middle;
}

.chevron svg {
  display: block;
  width: 16px;
  height: 16px;
  transform-origin: center;
}

.chevron.down {
  transform: rotate(0deg);
}

.chevron.up {
  transform: rotate(180deg);
}

#languageButton {
  display: flex;
  align-items: center;
  gap: 0px;
  min-height: 24px;
  padding: 4px 0;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.show {
  display: block;
}

.overlay {
  position: fixed;
  bottom: -100dvh;
  left: 0;
  width: 100%;
  height: 100dvh;
  transition: bottom 0.5s ease-in-out;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow-y: auto;
  background-color: inherit;
  -webkit-overflow-scrolling: touch;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.overlay.active {
  bottom: 0;
}

.overlay-content {
  max-width: 760px;
  padding: 40px;
  text-align: justify;
  text-justify: inter-word;
  height: auto;
  min-height: 100dvh;
  overflow-y: auto;
  margin: 20px 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  -ms-overflow-style: none;
}

.overlay-content h2 {
  font-size: 14px;
  margin-top: 56px;
  margin-bottom: 0px;
  line-height: 1.35;
  font-weight: normal;
}

.overlay-content p {
  font-size: 26px;
  margin-top: 8px;
  margin-bottom: 20px;
  line-height: 1.35;
}

@media screen and (max-aspect-ratio: 1) {

  #page-container {
    top: 100px;
  }

  h1 {
    margin-top: 25px;
    margin-bottom: 5px;
    font-size: 26px;
    font-weight: normal;
  }
  .cornertext:hover {
    opacity: 1;
  } 
  .overlay.active {
    bottom: 50px;
  }
  .overlay-content {
    top: 0;
  }
  .overlay-content p {
    font-size: 20px;
    margin-top: 8px;
    margin-bottom: 20px;
    line-height: 1.3;
  }
}

