@font-face {
  font-family: "Earth Momma";
  src: url("Earth_Momma.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  cursor: url("images/cursor-idle.png") 2 2, auto;
}

/* Custom cursor over links */
a,
button,
.clickable {
  cursor: url("images/cursor-hover.png") 2 2, pointer;
}


/* ===== BODY ===== */

body {
  font-family: "Cormorant Garamond", serif;
  font-size: 15px;
  color: #392f35;

  background:
    repeating-linear-gradient(
      to bottom,
      #392f35 0,
      #392f35 70px,
      #bb67c8 70px,
      #bb67c8 110px,
      #d2b9f8 110px,
      #d2b9f8 120px,
      #392f35 120px,
      #392f35 180px,
      #a4f6a1 180px,
      #a4f6a1 240px
    );

  background-size: 100% 240px;
  background-attachment: fixed;
}

/* Earth Momma is used for prose inside the site's boxes. */
.content-panel,
.sidebar-box {
  font-family: "Earth Momma", "Cormorant Garamond", serif;
}

/* Keep headings and navigational/interactive labels in the original font. */
.content-panel h1,
.content-panel h2,
.content-panel h3,
.content-panel h4,
.content-panel h5,
.content-panel h6,
.sidebar-box h1,
.sidebar-box h2,
.sidebar-box h3,
.sidebar-box h4,
.sidebar-box h5,
.sidebar-box h6,
.icon-nav,
.sidebar-box li a,
.lore-entry summary,
.character-summary {
  font-family: "Cormorant Garamond", serif;
}


/* ===== PAGE WRAP ===== */

.page-wrap {
  width: 100%;
  min-height: 100vh;
  padding: 20px;
}


/* ===== MAIN SHELL ===== */

.site-shell {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;

  background: #f1efef;

  border: 5px solid #bb67c8;
  border-radius: 22px;

  box-shadow:
    0 0 24px rgba(187, 103, 200, 0.55),
    inset 0 0 20px rgba(210, 185, 248, 0.2);

  overflow: hidden;
}


/* ===== HEADER ===== */

.top-header {
  display: flex;
  align-items: center;
  justify-content: center;

  height: 160px;
  padding: 0;

  background: linear-gradient(#f1efef, #d2b9f8);

  border-bottom: 4px solid #bb67c8;
}

.banner-img {
  max-width: 95%;
  max-height: 140px;
  object-fit: contain;
}


/* ===== NAVIGATION ===== */

.icon-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;

  padding: 12px;

  background: #d2b9f8;
  border-bottom: 4px solid #bb67c8;
}

.icon-nav a {
  padding: 8px 14px;

  color: #783984;
  background: #f1efef;

  font-weight: bold;

  border: 3px solid #95858d;
  border-radius: 12px;

  transition:
    color 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.icon-nav a:hover,
.icon-nav a:focus-visible {
  color: #f1efef;
  background: #783984;
  border-color: #bb67c8;
  box-shadow: 0 0 10px rgba(187, 103, 200, 0.45);
  transform: translateY(-1px);
}


/* ===== TWO-COLUMN CONTENT GRID ===== */

.content-grid {
  display: grid;

  /* Left sidebar + expanded main content */
  grid-template-columns: 220px minmax(0, 1fr);

  align-items: start;
  gap: 14px;
  padding: 14px;
}


/* ===== LEFT SIDEBAR ===== */

.sidebar {
  min-width: 0;
  padding: 10px;

  background: #e0f1de;

  border: 4px solid #a4f6a1;
  border-radius: 16px;

  box-shadow: inset 0 0 12px rgba(164, 246, 161, 0.15);
}

.sidebar-box {
  margin-bottom: 12px;
  padding: 10px;

  background: #f1efef;

  border: 3px solid #95858d;
  border-radius: 14px;

  box-shadow: inset 0 0 8px rgba(149, 133, 141, 0.18);
}

.sidebar-box:last-child {
  margin-bottom: 0;
}

.sidebar-box h2 {
  margin: 0 0 8px;

  color: #783984;

  font-size: 22px;
  letter-spacing: 1px;
  text-transform: uppercase;
}


/* ===== SIDEBAR LINK BUTTONS ===== */

.sidebar-box ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.sidebar-box li {
  margin: 5px 0;
}

.sidebar-box li a {
  display: block;
  padding: 6px 9px;

  color: #392f35;
  background: rgba(210, 185, 248, 0.12);

  border: 1px solid rgba(187, 103, 200, 0.18);
  border-radius: 6px;

  text-decoration: none;

  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}

.sidebar-box li a:hover,
.sidebar-box li a:focus-visible {
  color: #392f35;
  background: #d2b9f8;
  border-color: #a4f6a1;
  transform: translateX(3px);
}

.sidebar-character {
  max-height: 250px;
  margin: 0 auto;
}


/* ===== MAIN CONTENT PANEL ===== */

.content-panel {
  min-width: 0;
  min-height: 600px;
  padding: 18px;

  background: linear-gradient(145deg, #f1efef, #f1efef);

  border: 4px solid #95858d;
  border-radius: 18px;

  box-shadow: inset 0 0 24px rgba(210, 185, 248, 0.15);
}

.panel-title {
  margin-top: 0;

  color: #783984;

  font-size: 32px;
  letter-spacing: 2px;
  text-align: center;
  text-transform: uppercase;
}


/* ===== UPDATE BOX ===== */

.update-box {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.update-mascot {
  width: 90px;
  flex-shrink: 0;
}


/* ===== GALLERY ===== */

.gallery-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.gallery-grid img {
  width: 140px;
  height: 140px;
  padding: 4px;

  object-fit: cover;
  cursor: pointer;

  background: #f1efef;

  border: 3px solid #95858d;
  border-radius: 12px;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.gallery-grid img:hover {
  border-color: #bb67c8;
  box-shadow:
    0 0 0 2px #f1efef,
    0 0 12px rgba(187, 103, 200, 0.5);
}


/* ===== THUMBNAIL GALLERY ===== */

.thumb-gallery {
  margin-top: 26px;
}

.thumb-gallery h3 {
  margin: 0 0 12px;

  color: #783984;

  font-size: 22px;
  letter-spacing: 1px;
}

.thumb-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 12px;
}

.thumb-grid img {
  width: 100%;
  height: 180px;
  padding: 4px;

  object-fit: cover;

  background: #f1efef;

  border: 3px solid #95858d;
  border-radius: 12px;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.thumb-grid img:hover {
  border-color: #bb67c8;
  box-shadow:
    0 0 0 2px #f1efef,
    0 0 12px rgba(187, 103, 200, 0.5);
}


/* ===== GENERAL GALLERY MODAL ===== */

.modal {
  display: none;

  position: fixed;
  z-index: 9999;
  inset: 0;

  background: rgba(57, 47, 53, 0.94);
}

.modal-content {
  position: relative;

  width: 90%;
  max-width: 900px;
  margin: 60px auto;
  padding: 20px;

  background: #f1efef;

  border: 4px solid #95858d;
  border-radius: 18px;

  box-shadow: 0 0 24px rgba(210, 185, 248, 0.5);
}

.mySlides {
  display: none;
}

.mySlides img {
  width: 100%;
  max-height: 75vh;
  object-fit: contain;
}

.close {
  position: absolute;
  top: 10px;
  right: 20px;

  color: #783984;

  font-size: 40px;
  cursor: pointer;
}

.prev,
.next {
  position: absolute;
  top: 50%;

  padding: 10px;

  color: #392f35;
  background: #d2b9f8;

  border: 3px solid #95858d;
  border-radius: 12px;

  font-size: 30px;
  cursor: pointer;

  transform: translateY(-50%);
}

.prev {
  left: 0;
}

.next {
  right: 0;
}

.prev:hover,
.next:hover {
  color: #f1efef;
  background: #bb67c8;
  border-color: #f1efef;
}


/* ===== ABOUT PAGE IMAGE FADE ===== */

.image-container {
  position: relative;

  width: min(568px, 100%);
  aspect-ratio: 568 / 686;
}

.image {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: contain;

  opacity: 1;
  transition: opacity 1s ease-in-out;
}

.image2 {
  opacity: 0;
}

.image-container:hover .image1 {
  opacity: 0;
}

.image-container:hover .image2 {
  opacity: 1;
}


/* ===== LORE PAGE ===== */

.lore-introduction {
  margin-bottom: 24px;
}

.lore-introduction p {
  line-height: 1.6;
}

.lore-section {
  margin-top: 28px;
}

.lore-section-title {
  margin-bottom: 12px;
  padding-bottom: 5px;
  border-bottom: 1px solid currentColor;
}

.lore-list {
  display: grid;
  gap: 12px;
}

.lore-entry {
  overflow: hidden;

  background: #f1efef;
  border: 1px solid #d2b9f8;
}

.lore-entry summary {
  padding: 13px 16px;

  font-size: 1.05rem;
  font-weight: bold;

  cursor: pointer;
  user-select: none;
  color: #392f35;
}

.lore-entry summary:hover,
.lore-entry summary:focus {
  background: #d2b9f8;
}

.lore-entry[open] summary {
  border-bottom: 1px solid #d2b9f8;
}

.lore-preview {
  margin-left: 8px;

  font-weight: normal;
  opacity: 0.8;
}

.lore-entry-content {
  padding: 14px 16px 18px;
  line-height: 1.6;
}

.lore-entry-content p:first-child {
  margin-top: 0;
}

.lore-entry-content p:last-child {
  margin-bottom: 0;
}

.lore-note {
  margin-top: 28px;
  padding: 12px 15px;

  background: #e0f1de;
  border-left: 4px solid #a4f6a1;

  line-height: 1.5;
}


/* ===== CHARACTER IMAGE POP-UP ===== */

.character-modal {
  display: none;

  position: fixed;
  z-index: 9999;
  inset: 0;

  width: 100vw;
  height: 100vh;
  padding: 40px;

  background: rgba(57, 47, 53, 0.94);
}

.character-modal.is-open {
  display: flex;
  align-items: center;
  justify-content: center;
}

.character-modal-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  max-width: 90vw;
  max-height: 90vh;
}

.character-modal-image {
  display: block;

  width: auto;
  height: auto;
  max-width: 88vw;
  max-height: 80vh;

  object-fit: contain;

  background: #392f35;
  border: 2px solid #d2b9f8;
}

.character-modal-caption {
  margin-top: 10px;

  color: #f1efef;
  text-align: center;
}

.character-modal-close {
  position: fixed;
  z-index: 10000;
  top: 15px;
  right: 22px;

  padding: 4px 12px;

  color: #f1efef;
  background: transparent;
  border: none;

  font-size: 42px;
  line-height: 1;

  cursor: pointer;
}

.character-modal-close:hover,
.character-modal-close:focus-visible {
  opacity: 0.7;
}


/* ===== TABLET ===== */

@media (max-width: 900px) {
  .content-grid {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .thumb-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* ===== MOBILE ===== */

@media (max-width: 650px) {
  .page-wrap {
    padding: 8px;
  }

  .site-shell {
    border-width: 3px;
    border-radius: 14px;
    width: 100%;
  }

  .top-header {
    height: 120px;
  }

  .banner-img {
    max-height: 105px;
  }

  .content-grid {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .sidebar {
    width: 100%;
  }

  .content-panel {
    min-height: 0;
    padding: 14px;
  }

  .panel-title {
    font-size: 26px;
  }

  .update-box {
    flex-direction: column;
  }

  .update-mascot {
    margin: 0 auto;
  }

  .gallery-grid {
    justify-content: center;
  }

  .thumb-grid {
    grid-template-columns: 1fr;
  }

  .lore-entry summary {
    padding: 12px;
  }

  .lore-preview {
    display: block;

    margin-top: 4px;
    margin-left: 0;

    font-size: 0.9rem;
  }

  .lore-entry-content {
    padding: 12px;
  }

  .character-modal {
    padding: 20px;
  }
}



/* ugh */


/* ===== FOOTER ===== */

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;

  width: 100%;
  padding: 16px 22px;

  color: #392f35;
  background: #d2b9f8;

  border-top: 4px solid #bb67c8;
}

.site-footer p {
  margin: 0;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.footer-links a {
  color: #783984;
  font-weight: bold;
  text-decoration: none;
}

.footer-links a:hover {
  color: #783984;
  text-decoration: underline;
}

@media (max-width: 650px) {
  .site-footer {
    flex-direction: column;
    justify-content: center;
    gap: 10px;

    text-align: center;
  }

  .footer-links {
    justify-content: center;
    flex-wrap: wrap;
  }
}

.place-summary {
  display: flex;
  align-items: center;
  gap: 16px;
}

.place-icon {
  width: 100px;
  height: 100px;
  flex: 0 0 100px;

  object-fit: cover;

  background: #e0f1de;
  border: 2px solid #d2b9f8;
  border-radius: 8px;
}

.place-summary-text {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.place-name {
  color: #392f35;
  font-size: 1.1rem;
  font-weight: bold;
}

.place-summary-text .lore-preview {
  display: block;
  margin: 0;

  color: #655760;
  font-size: 1rem;
  font-weight: normal;
}

@media (max-width: 650px) {
  .place-summary {
    gap: 12px;
  }

  .place-icon {
    width: 75px;
    height: 75px;
    flex-basis: 75px;
  }
}


/* ===== CHARACTER LIST ===== */

.character-section-title {
  margin: 24px 0 12px;
  padding-bottom: 6px;

  color: #392f35;

  font-size: 1.35rem;

  border-bottom: 3px solid #bb67c8;
}

.character-entry {
  margin-bottom: 14px;

  overflow: hidden;

  background: #f1efef;

  border: 1px solid #d2b9f8;
  border-radius: 8px;
}

.character-summary {
  display: flex;
  align-items: center;
  gap: 14px;

  min-height: 124px;
  padding: 11px 14px;

  background: #d2b9f8;

  cursor: pointer;
  list-style: none;
}

.character-summary::-webkit-details-marker {
  display: none;
}

.character-summary::before {
  content: "▶";

  flex: 0 0 auto;

  color: #392f35;

  transition: transform 0.18s ease;
}

.character-entry[open] > .character-summary::before {
  transform: rotate(90deg);
}

.character-icon-button {
  width: 100px;
  height: 100px;
  flex: 0 0 100px;

  padding: 0;
  overflow: hidden;

  background: #e0f1de;

  border: 2px solid #d2b9f8;
  border-radius: 8px;

  cursor: zoom-in;
}

.character-icon {
  width: 100%;
  height: 100%;

  object-fit: cover;
}

.character-summary-text {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px;

  min-width: 0;
}

.character-name {
  color: #392f35;

  font-size: 1.1rem;
  font-weight: bold;
}

.character-subtitle {
  color: #655760;
}

.character-entry-content {
  padding: 14px 16px 18px;

  border-top: 1px solid #d2b9f8;
}

@media (max-width: 650px) {
  .character-summary {
    gap: 10px;

    min-height: 99px;
    padding: 10px;
  }

  .character-icon-button {
    width: 75px;
    height: 75px;
    flex-basis: 75px;
  }
}

/* =====  decorations ===== */

.decorated-title {
  position: relative;
  margin-bottom: 28px;
  text-align: center;
}

.decorated-title .panel-title {
  margin-bottom: 4px;
}

.title-scribble {
  width: 380px;
  max-width: 80%;
  height: 30px;
  margin: -4px auto 0;
  object-fit: contain;
}

.content-panel {
  position: relative;
}

.panel-creature {
  position: absolute;
  width: 90px;
  height: auto;

  top: -58px;
  right: 28px;

  z-index: 2;
  pointer-events: none;
}


}

