html {
  scroll-behavior: smooth;
}

body {
  background: #fffcfe;
}


/* ♡ highlight selection ♡ */

::selection {
  color: #ffc4d4;
}


/* gallery page */

.gallerypage {
  width: 1040px;
  max-width: calc(100% - 32px);

  margin: 70px auto 35px;

  font-family: "lovely";
  font-size: 11px;
  color: #8a7070;
}


/* gallery frame */

.gallerybox {
  position: relative;

  width: 100%;
  height: 760px;

  display: flex;
  flex-direction: column;

  background: #ffffff;

  border: 12px solid transparent;
  border-image: url("/img/pinkborder2.gif") 7 fill round;

  box-sizing: border-box;
  overflow: hidden;
}

.gallerybox::before {
  content: "";

  position: absolute;
  inset: 9px;
  z-index: 1;

  border: 1px dashed #f2d5e0;
  border-radius: 14px;

  pointer-events: none;
}




/* gallery heading */

.gallerypage {
  position: relative;
}

.gallerytitle {
  position: absolute;

  top: -16px;
  left: 50%;

  width: 500px;
  height: 32px;

  transform: translateX(-50%);

  z-index: 50;

  pointer-events: none;
}

.gallerytitle img {
  display: block;

  width: 100%;
  height: auto;
}

.gallerytitle span {
  position: absolute;

  top: 0;
  left: 50%;

  transform: translateX(-50%);

  white-space: nowrap;

  font-family: "Ownglyph PDH Regular";
  font-size: 31px;
  line-height: 1;

  color: #a48787;

  text-shadow:
    -2px -2px 0 #fff,
     2px -2px 0 #fff,
    -2px  2px 0 #fff,
     2px  2px 0 #fff,
    -3px  0 0 #fff,
     3px  0 0 #fff,
     0 -3px 0 #fff,
     0  3px 0 #fff;
}

.gallerytop {
  position: relative;
  z-index: 4;

  flex-shrink: 0;

  padding: 42px 34px 19px;

  background: #ffffff;

  box-sizing: border-box;
}


/* story highlights */

.galleryhighlights {
  min-height: 120px;

  display: flex;
  align-items: flex-start;
  justify-content: center;

  gap: 22px;

  margin: -4px 0 14px;

  opacity: 0;

  transition:
    opacity 0.5s ease;
}

.galleryhighlights.ready {
  opacity: 1;
}

.galleryhighlights.empty {
  display: none;

  min-height: 0;
  margin: 0;
}

.galleryhighlight {
  position: relative;

  width: 115px;
  height: 115px;

  flex: 0 0 115px;

  padding: 0;
  margin: 0;

  border: 0;
  background: transparent;

  appearance: none;
  -webkit-appearance: none;

  cursor:
    url("/img/key2.png"),
    pointer;
}

.galleryhighlight::before {
  content: "";

  position: absolute;

  top: 7px;
  left: 7px;

  width: 101px;
  height: 101px;

  border-radius: 50%;

  background:
    radial-gradient(
      circle,
      rgba(255, 236, 244, 0.95) 0%,
      rgba(255, 221, 234, 0.82) 45%,
      rgba(255, 214, 231, 0.45) 68%,
      rgba(255, 214, 231, 0) 100%
    );

  box-shadow:
    0 0 10px rgba(255, 212, 229, .85),
    0 0 22px rgba(255, 214, 231, .65),
    0 0 36px rgba(255, 222, 238, .45);

  opacity: 0;

  transform: scale(.92);

  transition:
    opacity .45s ease,
    transform .45s ease;

  pointer-events: none;

  z-index: 0;
}

.galleryhighlight:hover::before {
  opacity: 1;
  transform: scale(1.12);
}

.galleryhighlight:hover::before {
  opacity: 1;

  transform: scale(1.08);
}

.galleryhighlightcover {
  position: absolute;

  top: 11px;
  left: 11px;

  width: 93px;
  height: 93px;

  border-radius: 50%;

  object-fit: cover;

  filter: saturate(0.65);

  z-index: 1;
}

.galleryhighlightframe {
  position: absolute;

  inset: 0;

  width: 115px;
  height: 115px;

  object-fit: contain;

  pointer-events: none;

  z-index: 2;
}










/* gallery categories */

.gallerycategories {
  display: flex;
  align-items: center;
  justify-content: center;

  gap: 18px;
}

.gallerytab {
  padding: 3px 7px;

  border: 0;
  background: transparent;

  font-family: "lovely";
  font-size: 11px;
  line-height: 1.2;

  color: #b0949d;

  cursor: url("/img/key2.png"), pointer;

  transition: 0.3s;
}

.gallerytab:hover {
  background: #fff5f9;

  font-family: "cheeky rabbit";
  font-style: italic;

  color: #9f7f87;

  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;

  letter-spacing: 0.5px;
}

.gallerytab.active {
  background: #fff5f9;

  font-family: "lovely";
  font-style: normal;

  color: #9f7f87;

  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;

  letter-spacing: 0.5px;
}


/* gallery scroll */

.galleryscroll {
  position: relative;
  z-index: 2;

  flex: 1;
  min-height: 0;

  padding: 12px 37px 42px;

  overflow-x: hidden;
  overflow-y: auto;

  background: #ffffff;

  box-sizing: border-box;

  scroll-behavior: smooth;
}


/* gallery grid */

.gallerygrid {
  display: grid;

  grid-template-columns:
    repeat(4, minmax(0, 1fr));

  gap: 19px;

  opacity: 1;

  transition:
    opacity 0.5s ease;
}

.gallerygrid.fading {
  opacity: 0;
}

/* gallery message */

.gallerymessage {
  grid-column: 1 / -1;

  min-height: 180px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 30px;

  text-align: center;

  font-family: "lovely";
  font-size: 11px;
  line-height: 1.6;

  color: #b3959f;

  box-sizing: border-box;
}


/* gallery thumbnails */

.galleryitem {
  position: relative;

  width: 100%;
  aspect-ratio: 1 / 1.18;

  padding: 8px;

  overflow: hidden;

  background: #ffffff;

  border: 9px solid transparent;
  border-image: url("/img/laceborder.png") 8 fill round;

  box-sizing: border-box;

  appearance: none;
  -webkit-appearance: none;

  cursor: url("/img/key2.png"), pointer;

  transition:
    filter 0.35s ease,
    transform 0.35s ease;
}

.galleryitem img,
.galleryitem video {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;

  filter: saturate(0.55);

  transition: filter 0.38s ease;
}

.galleryitem:hover img,
.galleryitem:hover video {
  filter: saturate(1);
}

.galleryitem:hover {
  outline: none;

  transform: translateY(-1px);
}


/* carousel indicator */

.gallerymulti {
  position: absolute;

  top: 3px;
  right: 3px;

  width: 20px !important;
  height: 20px !important;

  max-width: none !important;
  max-height: none !important;

  object-fit: contain;

  pointer-events: none;
  user-select: none;

  z-index: 5;
}



/* mamegoma back to top */

.gallerymamegoma {
  position: absolute;

  right: -32px;
  bottom: -16px;

  width: 125px;

  padding: 0;
  margin: 0;

  border: 0;
  background: transparent;

  appearance: none;
  -webkit-appearance: none;

  cursor: url("/img/key2.png"), pointer;

  z-index: 25;

  transform-origin: center bottom;

  animation: mamegoma-breathe 4.8s ease-in-out infinite;
}

.gallerymamegoma img {
  display: block;

  width: 100%;
  height: auto;

  pointer-events: none;
}

.gallerymamegoma:hover {
  filter: saturate(1.08);

  animation: mamegoma-wiggle .6s ease;
}

@keyframes mamegoma-breathe {

  0%,100% {
    transform: scaleX(1) scaleY(1);
  }

  35% {
    transform: scaleX(.985) scaleY(.965);
  }

  70% {
    transform: scaleX(1.01) scaleY(1.005);
  }

}

@keyframes mamegoma-wiggle {

  0%,100% {
    transform: rotate(0deg);
  }

  30% {
    transform: rotate(-3deg);
  }

  65% {
    transform: rotate(3deg);
  }

}








/* popup */

.gallerypopup {
  position: fixed;
  inset: 0;
  z-index: 10000;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 30px;

  background: rgba(255, 250, 253, 0.88);

  box-sizing: border-box;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition:
    opacity 0.38s ease,
    visibility 0.38s ease;
}

.gallerypopup.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}


/* popup frame */

.gallerypopupframe {
  position: relative;

  width: auto;
  max-width: 88vw;
  max-height: 90vh;

  padding: 19px 21px 20px;

  overflow-x: hidden;
  overflow-y: auto;

  background: #ffffff;

  border: 11px solid transparent;
  border-image: url("/img/laceborder.png") 8 fill round;

  box-sizing: border-box;

  opacity: 0;

  transform: scale(0.96) translateY(5px);

  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
}

.gallerypopup.open .gallerypopupframe {
  opacity: 1;

  transform: scale(1) translateY(0);
}

/* popup content */

.gallerypopupcontent {
  position: relative;
  z-index: 2;

  display: flex;
  flex-direction: column;
  align-items: center;

  padding-bottom: 26px;

  box-sizing: border-box;
}


/* popup media */

.gallerypopupimageframe {
  position: relative;

  width: 100%;

  display: flex;
  justify-content: center;
  align-items: center;
}

.gallerypopupmedia {
  position: relative;

  width: 100%;

  display: flex;
  justify-content: center;
  align-items: center;

  overflow: hidden;
}

.gallerypopupmedia img,
.gallerypopupmedia video {
  display: block;

  width: auto;
  height: auto;

  max-width: 78vw;
  max-height: 67vh;

  object-fit: contain;

  opacity: 0;

  animation: gallery-media-fade 0.6s ease forwards;

  will-change: opacity;
}

.gallerypopupvideo {
  background: #fffafd;
}


/* popup media fade */

@keyframes gallery-media-fade {

  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }

}


/* carousel hearts */

.galleryhearts {
  position: absolute;

  left: 0;
  right: 0;
  bottom: 0;

  height: 18px;

  display: flex;
  justify-content: center;
  align-items: center;

  gap: 5px;

  margin: 0;
}

.galleryhearts.hidden {
  visibility: hidden;
  pointer-events: none;
}

.galleryheart {
  width: 16px;
  height: 18px;

  display: flex;
  justify-content: center;
  align-items: center;

  margin: 0;
  padding: 0;

  border: 0;
  outline: 0;

  background: transparent;

  appearance: none;
  -webkit-appearance: none;

  font-family: Georgia, serif;
  font-size: 14px;
  line-height: 1;

  color: #dab9c5;

  cursor: url("/img/key2.png"), pointer;

  transition:
    color .25s ease,
    transform .25s ease;
}

.galleryheart:hover {
  color: #c995a8;

  transform: scale(1.14);
}

.galleryheart.active {
  color: #c995a8;

  transform: scale(1.04);
}


/* popup details */

.gallerypopupdetails {
  position: relative;
  z-index: 2;

  width: min(620px, 100%);

  margin: 14px auto 0;
  padding: 0 12px 2px;

  box-sizing: border-box;
}

.gallerycaption {
  width: 100%;

  margin: 0 auto;

  text-align: center;

  font-family: "lovely";
  font-size: 11px;
  line-height: 1.6;

  color: #8a7070;

  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.gallerycaption:empty {
  display: none;
}

.gallerydate {
  margin-top: 4px;

  text-align: center;

  font-family: "lovely";
  font-size: 9.5px;
  line-height: 1.4;

  color: #b99ba4;
}

.gallerydate:empty {
  display: none;
}


/* gallery music */

.gallerymusic {
  width: 155px;
  height: 30px;

  display: flex;
  align-items: center;

  gap: 7px;

  margin: 14px auto 0;
  padding: 4px 6px;

  background: #fffafd;

  border: 1px dotted #f0d3df;

  box-sizing: border-box;
}

.gallerymusic.hidden {
  display: none;
}

.gallerymusicbutton {
  width: 20px;
  height: 20px;

  padding: 0;

  border: 1px solid #f0d3df;

  background: #ffffff;

  color: #d7a9b9;

  font-family: inherit;
  font-size: 8px;

  cursor: url("/img/key2.png"), pointer;
}

.gallerymusicinfo {
  min-width: 0;

  display: flex;
  flex-direction: column;

  line-height: 1.15;
}

.gallerymusictitle,
.gallerymusicartist {
  overflow: hidden;

  white-space: nowrap;
  text-overflow: ellipsis;
}

.gallerymusictitle {
  font-size: 9px;

  color: #9f7f87;
}

.gallerymusicartist {
  font-size: 8px;

  color: #b1b1b1;
}

.gallerymusic audio,
#galleryaudio {
  display: none;
}


/* responsive */

@media (max-width: 1080px) {

  .gallerypage {
    width: calc(100% - 32px);
  }

  .gallerybox {
    height: 730px;
  }

  .gallerygrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

}


@media (max-width: 760px) {

  .gallerypage {
    width: calc(100% - 22px);

    margin-top: 38px;
  }

  .gallerybox {
    height: 690px;

    border-width: 10px;
  }

  .gallerytop {
    padding: 27px 18px 17px;
  }

  .galleryheading {
    font-size: 28px;
  }

  .gallerycategories {
    gap: 18px;
  }

  .galleryscroll {
    padding: 10px 20px 34px;
  }

  .gallerygrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 13px;
  }

  .galleryitem {
    padding: 6px;

    border-width: 8px;
  }

  .gallerypopup {
    padding: 16px;
  }

  .gallerypopupframe {
    max-width: 94vw;
    max-height: 92vh;

    padding: 16px 16px 18px;

    border-width: 9px;
  }

  .gallerypopupmedia img,
  .gallerypopupmedia video {
    max-width: calc(94vw - 64px);
    max-height: 63vh;
  }

  .gallerypopupdetails {
    padding-left: 5px;
    padding-right: 5px;
  }

}


@media (max-width: 440px) {

  .gallerypage {
    width: calc(100% - 14px);
  }

  .gallerybox {
    height: 650px;
  }

  .gallerytop {
    padding-left: 12px;
    padding-right: 12px;
  }

  .galleryscroll {
    padding-left: 12px;
    padding-right: 12px;
  }

  .gallerygrid {
    gap: 9px;
  }

  .gallerypopup {
    padding: 9px;
  }

  .gallerypopupframe {
    max-width: 98vw;
  }

  .gallerypopupmedia img,
  .gallerypopupmedia video {
    max-width: calc(98vw - 54px);
    max-height: 59vh;
  }

  .gallerymusic {
    max-width: 100%;
  }

}


/* corner bows */

.gallerycornerbow {
  position: absolute;

  top: -30px;

  width: 90px;
  height: auto;

  z-index: 40;

  pointer-events: none;

}

.gallerycornerbow-left {
  left: -27px;

  transform: rotate(-12deg);
}

.gallerycornerbow-right {
  right: -27px;

  transform: scaleX(-1) rotate(-12deg);
}


/* sleeping milk */

.gallerymilksleep {
  position: absolute;

  left: -45px;
  bottom: -12px;

  width: 150px;
  height: auto;

  z-index: 24;

  pointer-events: none;

  transform-origin: center bottom;

  animation: milksleep-float 5.5s ease-in-out infinite;
}

@keyframes milksleep-float {

  0%,
  100% {
    transform:
      translateY(0)
      rotate(0deg);
  }

  50% {
    transform:
      translateY(-4px)
      rotate(-1deg);
  }

}



/* story highlight popup */

.highlightpopup {
  position: fixed;

  inset: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 24px;

  box-sizing: border-box;

  background: rgba(255, 248, 252, 0.72);

  opacity: 0;
  visibility: hidden;

  pointer-events: none;

  transition:
    opacity 0.35s ease,
    visibility 0.35s ease;

  z-index: 9999;
}

.highlightpopup.open {
  opacity: 1;
  visibility: visible;

  pointer-events: auto;
}

.highlightpopupframe {
  position: relative;

  width: min(640px, calc(100vw - 40px));
  height: min(860px, calc(100vh - 40px));

  overflow: hidden;

  box-sizing: border-box;

  background: #fffafd;

  border: 8px solid transparent;
  border-image:
    url("/img/laceborder.png")
    8 fill round;

  opacity: 0;

  transition:
    opacity 0.4s ease;
}

.highlightpopup.open
.highlightpopupframe {
  opacity: 1;
}

/* progress bars */

.highlightprogress {
  position: absolute;

  top: 15px;
  left: 16px;
  right: 48px;

  display: flex;

  gap: 4px;

  height: 2px;

  z-index: 12;
}

.highlightprogressbar {
  position: relative;

  flex: 1;

  height: 2px;

  overflow: hidden;

  border-radius: 999px;

  background: rgba(255,255,255,.45);
}

.highlightprogressfill {
  display: block;

  width: 0;
  height: 100%;

  border-radius: inherit;

  background: #ffffff;

  box-shadow:
    0 0 4px
    rgba(255, 255, 255, 0.65);
}

.highlightprogressbar.finished
.highlightprogressfill {
  width: 100%;
}

.highlightprogressbar.active
.highlightprogressfill {
  animation-name:
    highlightProgressFill;

  animation-timing-function:
    linear;

  animation-fill-mode:
    forwards;
}

.highlightprogressbar.paused
.highlightprogressfill {
  animation-play-state:
    paused;
}

@keyframes highlightProgressFill {
  from {
    width: 0;
  }

  to {
    width: 100%;
  }
}


/* story media */

.highlightmedia {
  position: absolute;

  inset: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  overflow: hidden;

  background: #fffafd;
}

.highlightmedia img,
.highlightmedia video {
  width: 100%;
  height: 100%;

  display: block;

  object-fit: cover;

  user-select: none;
  -webkit-user-drag: none;
}

.highlightmedia img {
  filter: saturate(0.78);
}

.highlightmedia video {
  background: #fffafd;
}


/* soft overlays */

.highlightpopupframe::before {
  content: "";

  position: absolute;

  top: 0;
  left: 0;
  right: 0;

  height: 105px;

  pointer-events: none;

  background:
    linear-gradient(
      to bottom,
      rgba(96, 69, 78, 0.34),
      rgba(96, 69, 78, 0)
    );

  z-index: 8;
}

.highlightpopupframe::after {
  content: "";

  position: absolute;

  left: 0;
  right: 0;
  bottom: 0;

  height: 240px;

  pointer-events: none;

  background:
    linear-gradient(
      to top,
      rgba(86, 59, 68, 0.55),
      rgba(86, 59, 68, 0)
    );

  z-index: 8;
}


/* close button */

.highlightclose {
  position: absolute;

  top: 23px;
  right: 14px;

  width: 28px;
  height: 28px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0;

  border: 0;
  background: transparent;

  color: #ffffff;

  font-family: "MS Gothic", sans-serif;
  font-size: 24px;
  line-height: 1;

  text-shadow:
    0 1px 3px
    rgba(104, 74, 84, 0.5);

  cursor:
    url("/img/key2.png"),
    pointer;

  z-index: 15;

  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
}

.highlightclose:hover {
  transform: scale(1.08);

  opacity: 0.8;
}


/* invisible previous and next areas */

.highlightnav {
  position: absolute;

  top: 48px;
  bottom: 0;

  width: 50%;

  padding: 0;

  border: 0;
  background: transparent;

  cursor:
    url("/img/key2.png"),
    pointer;

  z-index: 9;
}

.highlightprev {
  left: 0;
}

.highlightnext {
  right: 0;
}


/* date, caption and music */

.highlightinfo {
  position: absolute;

  left: 24px;
  right: 24px;
  bottom: 24px;

  display: flex;
  flex-direction: column;

  gap: 7px;

  color: #ffffff;

  text-shadow:
    0 1px 3px
    rgba(82, 57, 65, 0.7);

  pointer-events: none;

  z-index: 11;
}

.highlightdate {
  min-height: 13px;

  font-family: "MS Gothic", sans-serif;
  font-size: 10px;
  letter-spacing: 0.5px;

  opacity: 0.8;
}

.highlightcaption {
  max-height: 90px;

  overflow-y: auto;

  padding-right: 4px;

  font-family: "lovely", sans-serif;
  font-size: 12px;
  line-height: 1.55;

  scrollbar-width: thin;
  scrollbar-color:
    rgba(255, 255, 255, 0.55)
    transparent;
}

.highlightcaption:empty,
.highlightdate:empty {
  display: none;
}

.highlightcaption::-webkit-scrollbar {
  width: 4px;
}

.highlightcaption::-webkit-scrollbar-track {
  background: transparent;
}

.highlightcaption::-webkit-scrollbar-thumb {
  border-radius: 10px;

  background:
    rgba(255, 255, 255, 0.55);
}


/* story music */

.highlightmusic {
  width: fit-content;
  max-width: 100%;

  display: flex;
  align-items: center;

  gap: 8px;

  margin-top: 3px;
  padding: 7px 11px 7px 8px;

  box-sizing: border-box;

  border: 1px solid
    rgba(255, 255, 255, 0.62);

  border-radius: 18px;

  background:
    rgba(255, 250, 253, 0.2);

  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);

  pointer-events: auto;
}

.highlightmusic.hidden {
  display: none;
}

.highlightmusicbutton {
  width: 24px;
  height: 24px;

  flex: 0 0 24px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0 0 0 2px;

  border: 0;
  border-radius: 50%;

  background:
    rgba(255, 255, 255, 0.78);

  color: #a48787;

  font-family: "MS Gothic", sans-serif;
  font-size: 9px;

  cursor:
    url("/img/key2.png"),
    pointer;

  transition:
    transform 0.25s ease,
    background 0.25s ease;
}

.highlightmusicbutton:hover {
  transform: scale(1.06);

  background: #ffffff;
}

.highlightmusictext {
  min-width: 0;

  display: flex;
  flex-direction: column;

  gap: 1px;
}

.highlightmusictitle,
.highlightmusicartist {
  overflow: hidden;

  white-space: nowrap;
  text-overflow: ellipsis;
}

.highlightmusictitle {
  font-family: "lovely", sans-serif;
  font-size: 10.5px;
}

.highlightmusicartist {
  font-family: "MS Gothic", sans-serif;
  font-size: 8.5px;

  opacity: 0.8;
}


/* loading and error states */

.highlightmediaerror {
  opacity: 0.45;

  filter: grayscale(1);
}


/* smaller screens */

@media (max-width: 520px) {
  .highlightpopup {
    padding: 12px;
  }

  .highlightpopupframe {
    width: calc(100vw - 24px);
    height: calc(100vh - 24px);
  }

  .highlightprogress {
    top: 13px;
    left: 13px;
    right: 44px;
  }

  .highlightclose {
    top: 20px;
    right: 11px;
  }

  .highlightinfo {
    left: 18px;
    right: 18px;
    bottom: 20px;
  }
}






