@font-face {
  font-family: "Sarabun";
  src: url(../../../../../fonts/Sarabun/Sarabun-Regular.ttf);
}
@font-face {
  font-family: "Kanit";
  src: url(../../../../../fonts/Kanit/Kanit-Regular.ttf);
}
@font-face {
  font-family: "Prompt";
  src: url(../../../../../fonts/Prompt/Prompt-Regular.ttf);
}
@font-face {
  font-family: "PlexSans";
  src: url(../../../../../fonts/IBM_Plex_Sans_Thai/IBMPlexSansThai-Medium.ttf);
}
@font-face {
  font-family: "NotoSansThai";
  src: url(../../../../../fonts/NotoSansThai/NotoSansThai-Regular.ttf);
}
@font-face {
  font-family: "Fraunces";
  src: url(../../../../../fonts/Fraunces_72pt/Fraunces_72pt-Regular.ttf);
}
:root {
  margin: 0;
}

*, *:before, *:after {
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  padding: 0;
  background-color: #351d29;
  overflow-x: clip;
}

h1, h2 {
  font-family: serif;
  font-weight: normal;
  color: hsl(27, 27%, 70%);
  text-align: center;
  margin: 1rem 1rem 1rem 1rem;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 4rem;
}

h2 {
  font-size: 2rem;
  margin: 0rem 0rem 0rem 0rem;
  padding: 0.5rem 1rem 0rem 1rem;
  background-color: #502c3f;
}

div.gallery {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
      flex-wrap: wrap;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  -webkit-box-align: start;
      -ms-flex-align: start;
          align-items: flex-start;
  gap: 2rem;
  padding: 1rem;
  margin-bottom: 5rem;
  position: relative;
  background-color: #502c3f;
}

div.gallery h2 {
  position: absolute;
  bottom: 100%;
  left: 50%;
  -webkit-transform: translateX(-50%);
      -ms-transform: translateX(-50%);
          transform: translateX(-50%);
  white-space: nowrap;
  border-radius: 9px 9px 0px 0px;
  color: hsl(53, 100%, 89%);
}

span {
  display: block;
  padding: 0.6rem 1rem 0.2rem 1rem;
  font-size: 1.8rem;
  line-height: 2.5rem;
  text-align: center;
  background-color: #6c3b54;
  border-radius: 9px;
}

span.a {
  background-color: hsl(0, 100%, 74%);
}

span.b {
  background-color: hsl(278, 24%, 54%);
}

span.hilite {
  background-color: hsl(40, 100%, 89%);
}

span:hover {
  cursor: pointer;
}

a {
  text-decoration: none;
}

#targetElements div {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
}

u {
  position: relative;
  white-space: nowrap;
  text-decoration: none;
}

u i {
  font-family: sans-serif;
  font-size: 1rem;
  line-height: 1.1rem;
  text-align: center;
  font-style: normal;
  white-space: normal;
  position: absolute;
  left: 50%;
  top: 2.35rem;
  -webkit-transform: translateX(-50%);
      -ms-transform: translateX(-50%);
          transform: translateX(-50%);
  width: clamp(6.5rem, 100%, 120%);
  color: #f0e3ea;
  background-color: hsl(0, 0%, 0%);
  padding: 0.25rem;
  border-radius: 0.5rem;
  opacity: 0;
}

u:hover i {
  display: block;
  opacity: 1;
  z-index: 1;
}

u > i:after {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  border-width: 10px;
  margin-left: -10px;
  border-style: solid;
  border-color: transparent transparent hsl(0, 0%, 0%) transparent;
}

@media (min-width: 320px) {
  figure {
    width: 32%;
  }
}
@media (min-width: 1025px) { /* big landscape tablets, laptops, and desktops */
  figure {
    width: 24%;
  }
}