/* journal page */

body {
  background-color: #fffcfe;
}

/* selection */

::selection {
  color: #ffc4d4;
}

/* page wrapper */

html {
  scroll-behavior: smooth;
}

.blogpage {
  width: 1000px;
  margin: 70px auto 35px;
  font-family: "lovely";
  font-size: 10.5px;
  color: #8a7070;
  position: relative;
}

/* open book */

.blogbook {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 26px 1fr;
  width: 1000px;
  height: 820px;
  background: #fffafd;
  border-width: 10px;
  border-style: solid;
  border-image: url("/img/laceborder.png") 8 fill round;
  box-sizing: border-box;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(245, 213, 232, 0.22);
}

/* bow trim */

.booktrim {
  position: absolute;
  top: 12px;
  height: 40px;
  z-index: 20;
  pointer-events: none;
}

.lefttrim {
  left: 20px;
  width: calc(50% - 34px);
}

.righttrim {
  right: 20px;
  width: calc(50% - 34px);
}

.booktrim img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
}

/* pages */

.bookpage {
  position: relative;
  min-width: 0;
  height: 100%;
  padding: 64px 42px 42px;
  box-sizing: border-box;
  background: #ffffff;
  overflow: hidden;
}

.bookpage::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 18px;
  right: 18px;
  bottom: 18px;
  border-width: 8px;
  border-style: solid;
  border-image: url("/img/softpinklace2.png") 6 fill round;
  box-sizing: border-box;
  pointer-events: none;
  z-index: 1;
}

.bookpage>* {
  position: relative;
  z-index: 2;
}

.bookleft {
  position: relative;
  overflow: hidden;
  box-shadow: inset -10px 0 18px rgba(245, 213, 232, 0.12);
}

.bookright {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  box-shadow: inset 10px 0 18px rgba(245, 213, 232, 0.12);
}

/* left page */

/* hanging locket */

.hanginglocket {
  position: absolute;
  top: -1px;
  left: -50px;
  width: 180px;
  z-index: 30;
  pointer-events: none;
  transform-origin: 76% 0;
  animation: locket-sway 6.5s ease-in-out infinite;
}

.hanginglocket img {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;

  filter: drop-shadow(0 3px 10px rgba(120, 95, 105, .08));
}

@keyframes locket-sway {

  0%,
  100% {
    transform: rotate(-1.2deg);
  }

  50% {
    transform: rotate(1.2deg);
  }

}

.journalart {
  width: 395px;
  margin: 28px auto 35px;
}

.journalart img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
  opacity: 0.88;
  filter: saturate(0.55);
}

/* archive */

.blogarchive {
  width: 220px;
  margin: 0 auto;
}

.archiveheading {
  margin-bottom: 13px;
  font-family: "rainy hearts";
  font-size: 19px;
  font-weight: normal;
  text-align: center;
  color: #a48787;
}

.archiveheading::before {
  content: "";

  position: absolute;
  left: 50%;
  top: -2px;

  width: 220px;
  height: 30px;

  transform: translateX(-50%);

  background: url("/img/creamdivider.gif") center / contain no-repeat;

  z-index: -1;
}

.archivecontents {
  max-height: 230px;
  padding-right: 4px;
  overflow-y: auto;
  overflow-x: hidden;
  transition:
    opacity .65s ease,
    transform .65s ease;
}

.archiveyear {
  margin-bottom: 4px;
}

.yearbutton {
  width: 100%;
  padding: 7px 10px;
  border: 0;
  border-bottom: 1px dotted #f0d3df;
  background: transparent;
  font-family: "rainy hearts";
  font-size: 10px;
  color: #8a7070;
  text-align: left;
  cursor: url("/img/key2.png"), pointer;
}

.yeararrow {
  display: inline-block;
  width: 14px;
  color: #e2a8bf;
  font-size: 11px;
  transition: color 0.25s ease;
}

.archiveyear.open .yeararrow {
  color: #d68ea8;
}

.yearmonths {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  max-height: 0;
  margin-left: 26px;
  padding: 0;
  overflow: hidden;
  opacity: 0;
  transition:
    max-height 0.5s ease,
    opacity 0.35s ease,
    padding 0.5s ease;
}

.archiveyear.open .yearmonths {
  max-height: 400px;
  padding: 5px 0 8px;
  opacity: 1;
}

.yearmonths a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 1px 3px;
  color: #8a7070;
  text-decoration: none;
  transition: background 0.25s ease;
}

.yearmonths a img {
  width: 18px;
  height: 18px;
}

.yearmonths a:hover {
  background: #fff5f9;
}

/* archive loading */

.archiveloading {
  padding: 12px 0;
  color: #c7b2ba;
  font-size: 9px;
  text-align: center;
  transition: opacity .35s ease;
}

.archiveloading.hidden {
  opacity: 0;
  pointer-events: none;
}

.archivecontents.archive-loading {
  opacity: 0;
  transform: translateY(5px);
  pointer-events: none;
}

.archivecontents.archive-ready {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* buruburu */

.buruburu {
  position: absolute;
  left: -25px;
  bottom: -18px;
  width: 150px;
  z-index: 22;
  transform-origin: center bottom;
}

.buruburu img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;

  filter: drop-shadow(0 2px 5px rgba(120, 95, 105, .06));
}

.buruburu:hover {
  animation: buruburu-squish .8s ease;
}

@keyframes buruburu-squish {

  0% {
    transform: scale(1);
  }

  30% {
    transform: scale(1.03, .94);
  }

  60% {
    transform: scale(.99, 1.02);
  }

  100% {
    transform: scale(1);
  }

}

/* chii nendo */

.chiinendo {
  position: absolute;
  right: -185px;
  top: 25px;
  width: 175px;
  z-index: 20;
  pointer-events: none;
  transform-origin: center bottom;
  animation: chii-breathe 4.5s ease-in-out infinite;
}

.chiinendo img {
  display: block;
  width: 100%;
  height: auto;

  filter: drop-shadow(0 4px 12px rgba(120, 95, 105, .08));
}

@keyframes chii-breathe {

  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-3px) scale(1.01);
  }
}

/* chii figure */

.chiifigure {
  position: absolute;
  left: -220px;
  bottom: 65px;
  width: 300px;
  z-index: 18;
  pointer-events: none;
  transform-origin: center bottom;
  animation: chii-idle 5.5s ease-in-out infinite;
}

.chiifigure img {
  display: block;
  width: 100%;
  height: auto;

  filter: drop-shadow(0 5px 12px rgba(120, 95, 105, .08));
}

@keyframes chii-idle {

  0%,
  100% {
    transform:
      translateX(0) rotate(-.3deg);
  }

  50% {
    transform:
      translateX(2px) rotate(.3deg);
  }

}

/* centre fold */

.bookspine {
  position: relative;
  z-index: 5;
  background: #fffdfd;
}

.bookspine::before,
.bookspine::after {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  width: 1px;
  border-left: 1px dashed #f0d3df;
  opacity: 0.85;
}

.bookspine::before {
  left: 6px;
}

.bookspine::after {
  right: 6px;
}

/* kuma pen */

.kumapen {
  position: absolute;
  top: 400px;
  right: -55px;
  width: 180px;
  z-index: 25;
  transform: rotate(13deg);
  transform-origin: 25% 85%;
  transition:
    transform .55s cubic-bezier(.25, .8, .25, 1),
    filter .4s ease;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .08));
}

.kumapen img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}

.kumapen:hover {
  transform: rotate(10deg);
  filter: drop-shadow(0 5px 8px rgba(0, 0, 0, .12));
}

/* right page */

.blogentries {
  flex: 1;
  min-height: 0;
  height: 100%;
  padding-right: 8px;
  overflow-y: auto;
  overflow-x: hidden;
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.65s ease,
    transform 0.65s ease;
}

.blogentries.journal-loading {
  opacity: 0;
  transform: translateY(5px);
  pointer-events: none;
}

.blogentries.journal-ready {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.journal-loading-message {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 5;
  transform: translate(-50%, -50%);
  color: #c7b2ba;
  font-size: 9px;
  letter-spacing: 0.4px;
  opacity: 1;
  transition: opacity 0.35s ease;
}

.journal-loading-message.hidden {
  opacity: 0;
  pointer-events: none;
}

.journalstatus {
  padding: 18px 0;
  color: #c7b2ba;
  font-size: 9px;
  text-align: center;
  letter-spacing: 0.4px;
}

/* month sections */

.blogmonth {
  margin-bottom: 32px;
  scroll-margin-top: 20px;
}

.blogmonth:last-child {
  margin-bottom: 0;
}

.blogmonth>h2 {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 14px;
  padding: 0 0 6px 3px;
  font-family: "rainy hearts";
  font-size: 18px;
  font-weight: normal;
  color: #a48787;
  border-bottom: 1px dashed #f0d3df;
  box-sizing: border-box;
}

/* pencil */

.monthpencil {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  position: relative;
  top: -2px;
}

/* entries */

.blogentry {
  position: relative;
  margin-bottom: 14px;
  padding: 16px;
  background: #fffafd;
  border: 7px solid;
  border-image: url("/img/pinkborder4.gif") 7 fill round;
  box-sizing: border-box;
}

.blogentry::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px dotted #f4dce5;
  pointer-events: none;
}

.blogentry:last-child {
  margin-bottom: 0;
}

.entrydate {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 10px;
  color: #b59ca4;
  letter-spacing: 0.2px;
}

.weekday {
  width: 20px;
  height: 20px;
}

.blogentry h3 {
  margin: 0;
  font-size: 10px;
  font-weight: normal;
  letter-spacing: 0.3px;
  color: #8a7070;
}

.blogentry p {
  margin: 10px 0 0;
  font-family: "verdana";
  font-size: 9px;
  line-height: 1.8;
  letter-spacing: 0.6px;
  color: #c7c7c7;
}

/* inline entry emotes */

.entryemote {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin: 0 2px;
  vertical-align: middle;
}

/* music player */

.entrymusic {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 155px;
  height: 30px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 6px;
  background: #fffafd;
  border: 1px dotted #f0d3df;
  box-sizing: border-box;
}

.musicgif {
  width: 18px;
  height: 18px;
  margin-left: auto;
  pointer-events: none;
}

.musicplay {
  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;
}

.musicinfo {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.musictitle,
.musicartist {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.musictitle {
  font-size: 9px;
  color: #9f7f87;
}

.musicartist {
  font-size: 8px;
  color: #b1b1b1;
}

/* entry photos */

.entryphotos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
}

.entryphoto {
  width: 120px;
  height: 120px;
  padding: 6px;
  background: #ffffff;
  border: 8px solid;
  border-image: url("/img/laceborder.png") 8 fill round;
  box-sizing: border-box;
  cursor: url("/img/key2.png"), pointer;
  transition:
    transform 0.35s ease,
    filter 0.35s ease;
}

.entryphoto img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.65);
  transition:
    filter 0.35s ease,
    opacity 0.35s ease;
}

.entryphoto:hover {
  transform: translateY(-3px) scale(1.02);
  filter: drop-shadow(0 3px 5px rgba(245, 213, 232, 0.35));
}

.entryphoto:hover img {
  filter: none;
  opacity: 0.92;
}

/* journal photo popup */

.photopopup {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 35px;
  background: rgba(255, 250, 253, 0.88);
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.35s ease,
    visibility 0.35s ease;
  z-index: 10000;
}

.photopopup.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.photoframe {
  max-width: 82vw;
  max-height: 82vh;
  padding: 10px;
  background: #ffffff;
  border: 10px solid;
  border-image: url("/img/laceborder.png") 8 fill round;
  box-sizing: border-box;
  opacity: 0;
  transform: scale(0.96);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
}

.photopopup.open .photoframe {
  opacity: 1;
  transform: scale(1);
}

.photoframe img {
  display: block;
  max-width: calc(82vw - 40px);
  max-height: calc(82vh - 40px);
  width: auto;
  height: auto;
}

/* custom right-click menu */

#context_menu {
  position: absolute;
  display: none;
  z-index: 999;
  width: 70px;
  background: #fef8fc;
  border: 1px dotted #aaaaaa;
  font-size: 8px;
  letter-spacing: 1px;
}

#context_menu ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

#context_menu li {
  padding: 4px;
  color: #787878;
  text-align: center;
  cursor: url("/img/key.png"), progress;
}

#context_menu li:hover {
  background: #fef8fc;
  color: #848484;
}

/* back */

.backbutton {
  text-align: center;
  margin-top: 5px;
  margin-bottom: 5px;
}

.backbutton img {
  width: 20px;
  height: auto;
  opacity: 0.8;
  transition: opacity 0.4s ease;
}

.backbutton img:hover {
  opacity: 1;
}