/* =========================
   GENERAL
   ========================= */

* {
  box-sizing: border-box;
}


body {
  margin: 0;

  background:
    #6c2e33
    url("https://64.media.tumblr.com/8ea8f68e941c503228918f5e974c72d0/b8ba91369a0ff42e-e1/s500x750/bf9786f0d82b935941215a8a6dbb8bc839736a79.pnj")
    repeat-x fixed;

  font-family:
    monospace,
    calibri,
    Verdana,
    Arial,
    Helvetica,
    sans-serif;

  font-size: 11px;

  text-shadow: 0 0 1px #b3b3b3;

  color: #888;

  letter-spacing: 1px;
}


/* =========================
   MAIN WRAPPER
   EXPANDED DESKTOP WIDTH
   ========================= */

#wrapper {
  position: relative;

  width: min(1200px, calc(100% - 40px));

  margin: 60px auto 30px;
}


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

#headerwrap {
  position: relative;

  width: 100%;

  overflow: visible;
}


#header {
  height: 180px;

  background: #edd8d8;

  border: 1px solid #ebebeb;

  border-top-left-radius: 20px;
  border-top-right-radius: 20px;

  text-align: center;

  overflow: hidden;
}


#header img {
  height: 150px;
  max-width: 95%;

  object-fit: contain;
}


/* =========================
   DENIZEN COUNTER
   ========================= */

#denizens {
  text-align: center;

  font-family: monospace;
  font-size: 11px;

  color: #666;

  letter-spacing: 2px;

  margin: 8px 0;
}


#denizen-count {
  color: #6c2e33;

  font-weight: bold;
}


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

#navigationwrap {
  position: relative;

  width: 100%;

  overflow: visible;
}


#navigation {
  min-height: 32px;

  line-height: 20px;

  background: #c9a3a3;

  border: 1px solid #ebebeb;

  padding: 5px;

  text-align: center;
}


#navigation a:link,
#navigation a:visited,
#navigation a:active {
  position: relative;

  display: inline-block;

  font: 12px monospace;

  text-transform: uppercase;

  line-height: 20px;

  padding: 4px 8px;

  margin-right: 10px;

  letter-spacing: 2px;

  color: #888;

  text-decoration: none;

  transition:
    color 0.15s ease,
    letter-spacing 0.15s ease,
    transform 0.15s ease;
}


/* LITTLE HOVER LEAF */

#navigation a::before {
  content: "";

  position: absolute;

  width: 14px;
  height: 14px;

  left: -9px;
  top: 50%;

  background-image:
    url("homeimages/leafcursor.png");

  background-size: contain;
  background-repeat: no-repeat;

  opacity: 0;

  transform:
    translateY(-50%)
    rotate(-15deg)
    scale(0.6);

  transition:
    opacity 0.15s ease,
    transform 0.15s ease;

  pointer-events: none;
}


/* NAV HOVER */

#navigation a:hover {
  color: #6c2e33;

  letter-spacing: 3px;

  transform: translateY(-1px);
}


/* HOVER LEAF APPEARS */

#navigation a:hover::before {
  opacity: 1;

  transform:
    translateY(-50%)
    rotate(-15deg)
    scale(1);
}


/* =========================
   TWO COLUMNS
   EXPANDED DESKTOP LAYOUT
   ========================= */

#columns {
  display: flex;
  width: 100%;
  align-items: stretch;
  gap: 0;
}


/* =========================
   LEFT COLUMN
   ========================= */

#leftcolumnwrap {
  width: 260px;

  flex: 0 0 260px;

  display: flex;
}


#leftcolumn {
  position: relative;

  width: 100%;

  background: #e3c8c8;

  border: 1px solid #ebebeb;

  padding: 5px;

  overflow: visible;
}


/* =========================
   MAIN CONTENT
   FLEXIBLE WIDTH
   ========================= */

#contentwrap {
  flex: 1 1 auto;

  min-width: 0;

  display: flex;
}


#content {
  width: 100%;

  background: #e3c8c8;

  border: 1px solid #ebebeb;

  padding: 8px;
}


/* =========================
   IMAGES
   ========================= */

#content > img {
  display: block;

  max-width: 100%;

  height: auto;

  margin: 0 auto;
}


.title img,
.title2 img {
  max-width: 18px;

  height: auto;

  vertical-align: middle;
}


/* =========================
   TITLES
   ========================= */

.title {
  background: #c9a3a3;

  text-transform: uppercase;

  font: 10px monospace;

  letter-spacing: 3px;

  color: #555;

  padding: 2px 2px 2px 4px;

  margin-bottom: 4px;
}


.title2 {
  background: #c9a3a3;

  text-transform: uppercase;

  letter-spacing: 3px;

  color: #555;

  padding: 2px 2px 2px 4px;

  margin-bottom: 4px;

  font-size: 13px;
}


/* =========================
   LINKS
   ========================= */

b {
  color: #B39781;
}


a:link,
a:visited,
a:active {
  color: #666;

  text-decoration: none;
}


a:hover {
  color: #999;
}


/* =========================
   WELCOME IMAGE
   ========================= */

.welcome-image-wrap {
  position: relative;

  width: 100%;
}


.welcome-image-wrap > img:not(.pig-sticker) {
  display: block;

  width: 100%;
  height: auto;

  margin: 0.5em auto;
}



/* =========================
   GUINEA PIG STICKERS
   ========================= */

.pig-sticker {
  position: absolute;

  width: 64px;
  height: auto;

  z-index: 20;

  image-rendering: pixelated;
  image-rendering: crisp-edges;

  pointer-events: none;
}


/* RUSSET */

.pig-russet {
  top: -55px;
  right: 8px;
}


/* YUKON */

.pig-yukon {
  top: -45px;
  left: 110px;
}


/* UBE */

.pig-ube {
  bottom: -6px;
  right: -5px;
}


/* TARO */

.pig-taro {
  bottom: -10px;
  right: 4px;
}


/* =========================
   CHANGELOGS
   ========================= */

#footer-links {
  text-align: center;

  margin: 8px 0 20px;

  font-size: 10px;

  letter-spacing: 2px;
}


/* =========================
   FLOATING STATUS NOTE
   ========================= */

.listening-value {
  width: 40%;

  overflow: hidden;

  white-space: nowrap;
}


.listening-text {
  display: inline-block;

  transform: translateX(0);
}


.listening-value.scrolling .listening-text {
  animation:
    song-scroll
    7s ease-in-out
    infinite alternate;
}


@keyframes song-scroll {

  0%,
  15% {
    transform: translateX(0);
  }

  85%,
  100% {
    transform:
      translateX(
        calc(-1 * var(--scroll-distance))
      );
  }

}


/* =========================
   STATUS NOTE POSITION
   ANCHORED TO RIGHT EDGE
   ========================= */

#status-note {
  position: absolute;

  width: 300px;

  aspect-ratio: 470 / 350;

  top: 110px;

  right: -75px;
  left: auto;

  z-index: 30;

  pointer-events: none;
}


.status-note-art {
  position: absolute;

  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: contain;

  margin: 0;

  image-rendering: pixelated;

  pointer-events: none;
}


/* =========================
   STATUS ANSWERS
   ========================= */

#status-values {
  position: absolute;

  inset: 0;

  z-index: 2;

  color: #4b9149;

  font-family:
    "Trebuchet MS",
    Arial,
    sans-serif;

  font-size: 12px;

  font-weight: bold;

  line-height: 1.2;

  text-shadow: none;
}


.status-value {
  position: absolute;

  max-width: 48%;

  overflow-wrap: break-word;

  transform: rotate(-6deg);

  transform-origin: left center;
}


/* TEXT PLACEMENT */

.mood-value {
  top: 28%;
  left: 35%;
}


.listening-value {
  top: 30%;
  left: 39%;
}


.tatoes-value {
  top: 52%;
  left: 41%;
}


/* =========================
   SCROLLBAR
   ========================= */

::-webkit-scrollbar-thumb {
  background-color: #e3c8c8;

  border-radius: 0;

  border: 1px solid #999;
}


::-webkit-scrollbar {
  width: 7px;
  height: 4px;

  background: #e3c8c8;
}


/* =========================
   MOBILE
   PRESERVE STACKED LAYOUT
   ========================= */

@media (max-width: 700px) {

  body {
    font-size: 12px;
  }


  #wrapper {
    width: calc(100% - 16px);

    max-width: none;

    margin-top: 20px;
  }


  /* HEADER */

  #header {
    height: auto;

    min-height: 150px;

    padding: 12px 5px;
  }


  #header img {
    width: auto;

    max-width: 90%;

    height: 130px;
  }


  /* NAVIGATION */

  #navigation {
    height: auto;

    line-height: normal;

    padding: 6px;
  }


  #navigation a:link,
  #navigation a:visited,
  #navigation a:active {
    margin: 2px 4px;
  }


  #navigation a:hover {
    letter-spacing: 2px;

    transform: none;
  }


  /* HIDE DECORATIVE HOVER LEAF */

  #navigation a::before {
    display: none;
  }


  /* =========================
     MOBILE STATUS NOTE
     BECOMES PART OF PAGE
     ========================= */

  #status-note {
    position: relative;

    width: 90%;
    max-width: 360px;

    top: auto;

    right: auto;
    left: auto;

    margin: 20px auto;

    z-index: 1;
  }


  #status-values {
    font-size: 15px;
  }


  /* =========================
     STACK COLUMNS
     ========================= */

  #columns {
    flex-direction: column;

    gap: 0;
  }


  #leftcolumnwrap,
  #contentwrap {
    width: 100%;

    flex: none;
  }


  #leftcolumn,
  #content {
    width: 100%;

    padding: 8px;
  }


  /* =========================
     MOBILE PIG POSITIONS
     ========================= */

  .pig-russet {
    top: -44px;
    right: 5px;
  }


  .pig-yukon {
    top: -44px;
    left: 40px;
  }


  .pig-ube {
    bottom: -3px;
    right: 3px;
  }


  .pig-taro {
    bottom: -8px;
    right: 4px;
  }

}


/* =========================
   VERY SMALL PHONES
   ========================= */

@media (max-width: 400px) {

  #wrapper {
    width: calc(100% - 10px);
  }


  #header img {
    height: 110px;
  }


  #navigation a:link,
  #navigation a:visited,
  #navigation a:active {
    font-size: 11px;

    margin: 1px 2px;
  }


  .title,
  .title2 {
    letter-spacing: 2px;
  }


  .pig-sticker {
    width: 56px;
  }


  #status-values {
    font-size: 13px;
  }

}


/* =========================
   THE DEN'S OPENING GUESTBOOK
   ========================= */

.guestbook-sticker {
  position: relative;
  display: block;

  width: 100%;
  height: 230px;

  margin: 100px auto 0;

  z-index: 10;
  text-decoration: none;
}


/* THE WHOLE BOOK */

.guestbook-scene {
  position: absolute;

  width: min(340px, calc(100vw - 24px));
  aspect-ratio: 1000 / 551;

  left: 50%;
  top: 50%;

  transform:
    translate(-75%, -50%)
    rotate(-12deg);

  perspective: 900px;
  transform-style: preserve-3d;

  pointer-events: none;
}


/* KEEP THE OPEN BOOK INTERACTIVE */

.guestbook-sticker:hover .guestbook-scene,
.guestbook-sticker:focus-visible .guestbook-scene {
  pointer-events: auto;
}


/* THE PINK PAGES UNDER THE COVER */

.guestbook-spread {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  clip-path: inset(0 0 0 50%);

  transition:
    clip-path 0.3s ease;
}


/* THE MOVING FRONT COVER */

.guestbook-cover {
  position: absolute;

  top: 0;
  left: 50%;

  width: 50%;
  height: 100%;

  transform-origin: left center;
  transform-style: preserve-3d;

  transform: rotateY(0deg);

  transition:
    transform 0.85s
    cubic-bezier(0.2, 0.7, 0.2, 1);

  z-index: 2;
}


/* BOTH SIDES OF THE COVER */

.guestbook-front,
.guestbook-inside {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}


/* OUTSIDE: YOUR GREEN COVER */

.guestbook-front {
  display: block;
  object-fit: fill;
}


/* INSIDE: THE LEFT PINK PAGE */

.guestbook-inside {
  background-image:
    url("homeimages/guestbook-open.png");

  background-size: 200% 100%;
  background-position: left center;

  transform: rotateY(180deg);
}


/* THE INVITATION */

.guestbook-invite {
  position: absolute;

  left: 58%;
  top: 43%;
  width: 33%;

  transform: translateY(-50%);

  color: #315c30;

  font-family: Georgia, serif;
  font-style: italic;
  font-weight: bold;
  font-size: 14px;

  line-height: 1.3;
  text-align: center;
  text-shadow: none;

  opacity: 0;
  z-index: 3;

  transition: opacity 0.18s ease;

  pointer-events: none;
}


/* =========================
   OPEN THE BOOK!
   ========================= */

.guestbook-sticker:hover .guestbook-cover,
.guestbook-sticker:focus-visible .guestbook-cover {
  transform: rotateY(-180deg);
}


/* REVEAL THE ENTIRE PINK SPREAD */

.guestbook-sticker:hover .guestbook-spread,
.guestbook-sticker:focus-visible .guestbook-spread {
  clip-path: inset(0);

  transition-delay: 0.35s;
}


/* SHOW THE INVITATION LAST */

.guestbook-sticker:hover .guestbook-invite,
.guestbook-sticker:focus-visible .guestbook-invite {
  opacity: 1;

  transition-delay: 0.55s;
}


/* KEYBOARD ACCESS */

.guestbook-sticker:focus-visible {
  outline: 2px dashed #315c30;
  outline-offset: 4px;
}


/* TOUCHSCREEN LABEL */

.guestbook-touch-label {
  display: none;
}


/* MOBILE */

@media (max-width: 700px) {
  .guestbook-sticker {
    margin: 20px auto 18px;
  }
}


/* DEVICES WITHOUT HOVER */

@media (hover: none) {

  .guestbook-touch-label {
    display: block;

    position: absolute;
    bottom: 0;

    width: 100%;

    color: #315c30;

    font-family: Georgia, serif;
    font-style: italic;
    font-size: 15px;

    text-align: center;
    text-shadow: none;
  }

}


/* ACCESSIBLE REDUCED MOTION */

@media (prefers-reduced-motion: reduce) {

  .guestbook-cover,
  .guestbook-spread,
  .guestbook-invite {
    transition: none;
  }

}


/* =========================
   CUSTOM LEAF CURSOR
   ========================= */

html,
body,
a,
a:link,
a:visited,
a:hover,
button {
  cursor:
    url("homeimages/leafcursor.png") 0 0,
    auto;
}


body:active,
a:active,
a:active:hover,
#navigation a:active,
#navigation a:active:hover,
button:active {
  cursor:
    url("homeimages/leafcursor-click.png") 0 0,
    auto !important;
}


/* CUSTOM TEXT SELECTION */

::selection {
  background: #4b9149;
  color: #fff7f7;
}


::-moz-selection {
  background: #4b9149;
  color: #fff7f7;
}


/* The suspiciously innocent star */

.secret-star {
  display: inline-block;
  vertical-align: middle;
  line-height: 0;
}

.secret-star img {
  transition: transform 0.25s ease;
}

.secret-star:hover img,
.secret-star:focus-visible img {
  transform: rotate(25deg) scale(1.3);
}

@media (prefers-reduced-motion: reduce) {
  .secret-star img {
    transition: none;
  }
}


/* TAKE A BUTTON */

.take-a-button {
  max-width: 350px;
  margin: 12px 0;
}

.take-a-button p {
  margin: 0 0 8px;
}

#den-button-code {
  display: block;

  width: 100%;
  min-height: 65px;

  padding: 8px;

  box-sizing: border-box;

  background: #fff7f2;
  color: #6c2e33;

  border: 1px solid #c9a3a3;
  border-radius: 4px;

  font: 11px monospace;
  resize: none;
}

#copy-den-button {
  margin-top: 8px;
  padding: 7px 14px;

  background: #4b9149;
  color: white;

  border: none;
  border-radius: 4px;

  font-family: inherit;
  cursor: pointer;
}

#copy-den-button:hover {
  background: #315c30;
}

#copy-message {
  margin-left: 8px;
  color: #315c30;
  font-size: 11px;
}


/* SIDEBAR BUTTON DISTRIBUTION */

.take-a-button {
  width: 100%;
  max-width: 100%;
  margin: 12px 0 25px;
  text-align: left;
}

#den-button-code {
  width: 100%;
  text-align: left;
}

#copy-den-button {
  display: inline-block;
}


/* =====================================
   THE DEN'S LITTLE MP3 PLAYER
   ===================================== */

#music-player {
  position: absolute;

  top: 260px;
  right: -270px;
  width: 300px;

  aspect-ratio: 393 / 287;

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


/* =====================================
   CONTENT INSIDE THE SCREEN
   ===================================== */

#mp3-screen {
  position: absolute;

  left: 20.5%;
  top: 12%;

  width: 38%;
  height: 44%;

  transform-origin: top left;

  transform: rotate(18.5deg);

  overflow: hidden;

  background: #f3dbe8;

  z-index: 1;
}


/* =====================================
   ALBUM COVER
   ===================================== */

#mp3-album {
  position: absolute;

  inset: 0;

  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;
}


#mp3-album[hidden] {
  display: none;
}


/* =====================================
   SONG INFORMATION
   ===================================== */

#mp3-screen-text {
  position: absolute;

  left: 2%;
  right: 2%;
  bottom: 3%;

  padding: 3px 2px;

  display: flex;
  flex-direction: column;
  align-items: center;

  gap: 1px;

  text-align: center;

  background:
    rgba(255, 242, 249, 0.9);

  color: #315c30;

  font-family: monospace;
  font-size: 8px;
  line-height: 1.15;

  text-shadow: none;
}


#mp3-playing {
  font-size: 7px;
  letter-spacing: 0.5px;
}


#mp3-song {
  display: block;

  width: 100%;

  font-size: 9px;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


#mp3-artist {
  display: block;

  width: 100%;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


/* =====================================
   YOUR ORIGINAL MP3 ART
   ===================================== */

#mp3-artwork {
  position: absolute;

  inset: 0;

  display: block;

  width: 100%;
  height: 100%;

  object-fit: contain;

  image-rendering: pixelated;

  z-index: 2;
}


/* =====================================
   MID-WIDTH / LANDSCAPE
   KEEP POTATOPOD FLOATING
   ===================================== */

@media (min-width: 701px) and (max-width: 1550px) {

  #music-player {
    position: absolute;

    top: 260px;
    right: 10px;
    left: auto;

    width: 300px;

    margin: 0;
  }

}


/* MP3 SCREEN: CLEANER MUSIC DISPLAY */

#mp3-album {
  filter: saturate(1.25) contrast(1.15);
}

#mp3-screen-text {
  position: absolute;
  inset: 0;

  display: block;
  padding: 0;

  background: transparent;
}

#mp3-playing {
  position: absolute;
  top: 3px;
  left: 3px;

  padding: 2px;

  background: rgba(255, 242, 249, 0.95);

  font-size: 7px;
  letter-spacing: 0;
  white-space: nowrap;
}

#mp3-song,
#mp3-artist {
  position: absolute;
  left: 0;
  width: 100%;

  padding: 2px;

  text-align: center;
  background: rgba(255, 242, 249, 0.97);
}

#mp3-song {
  bottom: 13px;
  font-size: 10px;
}

#mp3-artist {
  bottom: 2px;
  font-size: 8px;
}


/* MP3: MARQUEE FOR LONG SONG TITLES ONLY */

#mp3-song {
  text-align: center;
  text-overflow: clip;
}

#mp3-song .mp3-song-text {
  display: inline-block;
  white-space: nowrap;
}

#mp3-song.is-scrolling {
  text-align: left;
}

#mp3-song.is-scrolling .mp3-song-text {
  animation: mp3-song-marquee
    var(--mp3-scroll-time, 7s)
    ease-in-out infinite alternate;
}

@keyframes mp3-song-marquee {
  0%, 15% {
    transform: translateX(0);
  }

  85%, 100% {
    transform: translateX(
      calc(-1 * var(--mp3-scroll-distance, 0px))
    );
  }
}

@media (prefers-reduced-motion: reduce) {
  #mp3-song.is-scrolling .mp3-song-text {
    animation: none;
  }

  #mp3-song.is-scrolling {
    text-overflow: ellipsis;
  }
}


/* POTATOPOD: DUSTY PINK DISPLAY */

#mp3-playing,
#mp3-song,
#mp3-artist {
  background: #a65b77;
  color: #fff8ee;
  font-weight: 900;
  text-shadow: 0 1px 1px #603348;
}

#mp3-playing {
  font-size: 7px;
}

#mp3-song {
  font-size: 11px;
  bottom: 18px;
}

#mp3-artist {
  font-size: 9px;
  bottom: 2px;
}


/* =========================================
   THE DEN: MOBILE DESK CLUSTER
   ========================================= */

#mobile-desk {
  display: contents;
}

@media (max-width: 700px) {

  #mobile-desk {
    --mobile-note-width: clamp(185px, 39vw, 250px);
    --mobile-pod-width: clamp(180px, 35vw, 220px);
    --mobile-book-width: clamp(195px, 45vw, 275px);

    display: block;
    position: relative;
    width: 100%;
    height: clamp(295px, 53vw, 335px);
    margin: 0;
    isolation: isolate;
  }

  #mobile-desk .guestbook-sticker {
    position: absolute;
    top: 18px;
    left: clamp(22px, 9vw, 65px);
    width: clamp(180px, 35vw, 230px);
    height: 210px;
    margin: 0;
    z-index: 24;
  }

  #mobile-desk .guestbook-scene {
    width: var(--mobile-book-width);
    left: 55%;
    top: 42%;
    transform: translate(-60%, -50%) rotate(-12deg);
  }

  #mobile-desk .guestbook-invite {
    font-size: clamp(10px, 2vw, 13px);
  }

  #mobile-desk #status-note {
    position: absolute;
    top: 0;
    right: 0;
    left: auto;
    width: var(--mobile-note-width);
    max-width: none;
    margin: 0;
    z-index: 20;
  }

  #mobile-desk #status-values {
    font-size: clamp(11px, 2vw, 13px);
  }

  #mobile-desk #music-player {
    position: absolute;
    top: clamp(130px, 23vw, 150px);
    right: clamp(10px, 5vw, 35px);
    left: auto;
    width: var(--mobile-pod-width);
    max-width: none;
    margin: 0;
    z-index: 31;
  }
}


/* =========================================
   MOBILE POTATO DESK · V2
   ========================================= */

#mobile-desk {
  display: contents;
}

@media (max-width: 700px) {

  #mobile-desk {
    --mobile-note-width: clamp(180px, 45vw, 215px);
    --mobile-pod-width: clamp(160px, 38vw, 190px);
    --mobile-book-width: clamp(164px, 39vw, 220px);

    display: block;
    position: relative;
    width: 100%;
    height: clamp(218px, 44vw, 254px);
    margin: 0;
    isolation: isolate;
  }

  #mobile-desk .guestbook-sticker {
    position: absolute;
    top: 25px;
    left: clamp(0px, 5vw, 36px);
    width: clamp(135px, 31vw, 175px);
    height: 145px;
    margin: 0;
    z-index: 24;
  }

  #mobile-desk .guestbook-scene {
    width: var(--mobile-book-width);
    left: 12%;
    top: 45%;
    transform: translate(-60%, -50%) rotate(-12deg);
    pointer-events: none !important;
  }

  #mobile-desk .guestbook-cover,
  #mobile-desk .guestbook-sticker:hover .guestbook-cover,
  #mobile-desk .guestbook-sticker:focus-visible .guestbook-cover {
    transform: rotateY(0deg) !important;
    transition: none !important;
  }

  #mobile-desk .guestbook-spread,
  #mobile-desk .guestbook-inside,
  #mobile-desk .guestbook-invite,
  #mobile-desk .guestbook-touch-label {
    display: none !important;
  }

  #mobile-desk #status-note {
    position: absolute;
    top: 0;
    right: 0;
    left: auto;
    width: var(--mobile-note-width);
    max-width: none;
    margin: 0;
    z-index: 20;
  }

  #mobile-desk #status-values {
    font-size: clamp(11px, 2.3vw, 13px);
  }

  #mobile-desk #music-player {
    position: absolute;
    top: clamp(95px, 18vw, 115px);
    right: clamp(0px, 3vw, 18px);
    left: auto;
    width: var(--mobile-pod-width);
    max-width: none;
    margin: 0;
    z-index: 31;
  }

}


/* EXTRA-NARROW PHONES */

@media (max-width: 369px) {

  #mobile-desk {
    --mobile-book-width: 130px;
  }

  #mobile-desk .guestbook-sticker {
    width: 110px;
    left: 0;
    top: 34px;
  }

}


/* =====================================
   MOBILE: INVERTED POTATO TRIANGLE
   ===================================== */

@media (max-width: 700px) {
  #mobile-desk {
    --mobile-note-width: clamp(160px, 41vw, 190px);
    --mobile-pod-width: clamp(165px, 43vw, 190px);
    height: clamp(250px, 62vw, 285px);
  }

  #mobile-desk #status-note {
    top: 0;
    right: 0;
    left: auto;
    width: var(--mobile-note-width);
  }

  #mobile-desk #status-values {
    font-size: clamp(10px, 2.6vw, 12px);
  }

  #mobile-desk #music-player {
    top: 110px;
    left: 29%;
    right: auto;
    width: var(--mobile-pod-width);
    z-index: 31;
  }
}


/* =====================================
   MOBILE READING ORDER
   ===================================== */

@media (max-width: 700px) {
  #contentwrap {
    order: 1;
  }

  #leftcolumnwrap {
    order: 2;
  }

  #special-thanks {
    order: 3;
    width: 100%;
    padding: 8px;
    background: #e3c8c8;
    border: 1px solid #ebebeb;
  }
}


/* =====================================
   CENTER THE HANDMADE WEBSITE BUTTON
   ===================================== */

.take-a-button {
  text-align: center;
}

.take-a-button > a {
  display: table;
  margin: 0 auto 8px;
}

.take-a-button > a img {
  display: block;
}

#den-button-code {
  width: min(215px, 100%);
  margin: 0 auto;
  text-align: left;
}

#copy-den-button {
  display: block;
  margin: 8px auto 0;
}

#copy-message {
  display: block;
  min-height: 1em;
  margin: 6px 0 0;
  text-align: center;
}


/* =====================================
   INTERACTIVE POTATOES
   ===================================== */

img.pig-sticker {
  pointer-events: auto;
  cursor: url("homeimages/leafcursor.png") 0 0, pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

img.pig-sticker:active {
  cursor: url("homeimages/leafcursor-click.png") 0 0, pointer;
}

img.pig-sticker:focus-visible {
  outline: 2px dashed #4b9149;
  outline-offset: 3px;
}

img.pig-sticker.pig-petted {
  animation: pig-happy 0.35s ease-out;
}

@keyframes pig-happy {
  0%, 100% {
    transform: translateY(0);
  }

  45% {
    transform: translateY(-5px);
  }
}

.pig-heart {
  position: absolute;
  width: 26px;
  height: 25px;
  background: var(--heart-image) center / contain no-repeat;
  image-rendering: pixelated;
  z-index: 100;
  pointer-events: none;
  animation: pig-heart-float 1s ease-out forwards;
}

@keyframes pig-heart-float {
  0% {
    opacity: 0;
    transform: translate(-50%, 5px) scale(0.5);
  }

  20% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }

  100% {
    opacity: 0;
    transform:
      translate(
        calc(-50% + var(--heart-drift, 0px)),
        -55px
      )
      scale(1.15);
  }
}

@media (prefers-reduced-motion: reduce) {
  img.pig-sticker.pig-petted {
    animation: none;
  }

  .pig-heart {
    animation: pig-heart-fade 0.8s ease-out forwards;
  }

  @keyframes pig-heart-fade {
    0%, 70% {
      opacity: 1;
    }

    100% {
      opacity: 0;
    }
  }
}


/* =====================================
   POTATO COMPLIMENTS
   ===================================== */

.pig-speech {
  position: fixed;
  z-index: 9999;
  box-sizing: border-box;
  display: inline-block;
  width: max-content;
  max-width: min(235px, calc(100vw - 20px));
  padding: 8px 11px 10px;
  border: 3px solid var(--speech-accent, #a14e64);
  border-radius: 3px;
  background: #fff8ee;
  color: #54363c;
  box-shadow: 4px 4px 0 #c9a3a3;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.35;
  text-align: left;
  pointer-events: none;
  overflow-wrap: anywhere;
  animation: pig-speech-life 3.2s ease-out both;
}

.pig-speech__name {
  display: block;
  margin-bottom: 3px;
  color: var(--speech-accent, #a14e64);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .6px;
  text-transform: uppercase;
}

.pig-speech__line {
  display: block;
}

.pig-speech::after {
  content: "";
  position: absolute;
  bottom: -12px;
  left: var(--tail-x, 50%);
  transform: translateX(-50%);
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 10px solid var(--speech-accent, #a14e64);
}

.pig-speech--below::after {
  top: -12px;
  bottom: auto;
  border-top: 0;
  border-bottom: 10px solid var(--speech-accent, #a14e64);
}

@keyframes pig-speech-life {
  0% {
    opacity: 0;
    transform: translateY(5px);
  }

  9% {
    opacity: 1;
    transform: translateY(0);
  }

  84% {
    opacity: 1;
    transform: translateY(0);
  }

  100% {
    opacity: 0;
    transform: translateY(-4px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pig-speech {
    animation: pig-speech-still 3.2s linear both;
  }

  @keyframes pig-speech-still {
    0%, 90% {
      opacity: 1;
    }

    100% {
      opacity: 0;
    }
  }
}


/* =====================================
   PETTING HAND
   ===================================== */

img.pig-sticker,
img.pig-sticker:hover {
  cursor:
    url("/homeimages/handopen.png")
    7 12,
    pointer !important;
}

img.pig-sticker:active {
  cursor:
    url("/homeimages/handpet.png")
    7 12,
    pointer !important;
}


/* =====================================
   RUSSET'S SECRET LETTER
   ===================================== */

.russet-mail-drop[hidden],
.russet-letter-modal[hidden] {
  display: none !important;
}

.russet-mail-drop {
  position: absolute;
  top: -36px;
  right: 73px;
  z-index: 38;
  display: block;
  width: 38px;
  height: 32px;
  padding: 3px;
  margin: 0;
  border: 0;
  background: transparent;
  line-height: 0;
  cursor:
    url("/homeimages/leafcursor-click.png")
    0 0,
    pointer;
  animation:
    russet-mail-arrive .4s ease-out both,
    russet-mail-bob 1.9s ease-in-out .4s infinite;
}

.russet-mail-drop img {
  display: block;
  width: 32px;
  height: auto;
  image-rendering: pixelated;
  transition: transform .15s ease;
  filter: drop-shadow(1px 2px 0 rgba(80,39,39,.2));
}

.russet-mail-drop:hover img,
.russet-mail-drop:focus-visible img {
  transform: scale(1.13) rotate(-6deg);
}

.russet-mail-drop:focus-visible {
  outline: 2px dashed #4b9149;
  outline-offset: 3px;
}

@keyframes russet-mail-arrive {
  from {
    opacity: 0;
    transform: translateY(-11px) scale(.6);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes russet-mail-bob {
  0%, 100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-4px);
  }
}

.russet-letter-modal {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: grid;
  place-items: center;
  padding: 28px;
}

.russet-letter-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(46, 18, 27, .72);
}

.russet-letter-card {
  position: relative;
  z-index: 1;
  width: max-content;
  max-width: 100%;
}

.russet-letter-art {
  display: block;
  width: min(300px, calc(100vw - 72px));
  max-height: calc(100dvh - 90px);
  height: auto;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 12px 22px rgba(35, 10, 16, .4));
}

.russet-letter-close {
  position: absolute;
  top: -11px;
  right: -12px;
  z-index: 2;
  width: 32px;
  height: 32px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 2px solid #b85b5c;
  border-radius: 50%;
  background: #fff3ed;
  color: #8d4547;
  font: bold 23px/1 Georgia, serif;
  text-shadow: none;
  cursor:
    url("/homeimages/leafcursor-click.png")
    0 0,
    pointer;
}

.russet-letter-close:hover {
  background: #ffe0de;
}

.russet-letter-close:focus-visible {
  outline: 2px dashed #4b9149;
  outline-offset: 4px;
}

.russet-letter-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 700px) {
  .russet-mail-drop {
    top: -29px;
    right: 65px;
  }

  .russet-letter-modal {
    padding: 18px;
  }

  .russet-letter-art {
    width: min(300px, calc(100vw - 56px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .russet-mail-drop {
    animation: none;
  }

  .russet-mail-drop img {
    transition: none;
  }
}


/* =====================================
   SECRET CATPEEK
   ===================================== */

#special-thanks {
  position: relative;
}

.catpeek-secret {
  position: absolute;
  right: 10px;
  bottom: 6px;
  width: 30px;
  height: auto;
  z-index: 25;
  line-height: 0;
  opacity: 0.42;
}

.catpeek-secret img {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  transition:
    transform 0.18s ease,
    opacity 0.18s ease;
}

.catpeek-secret:hover img,
.catpeek-secret:focus-visible img {
  opacity: 1;
  transform: translateY(-3px);
}

.catpeek-secret:focus-visible {
  outline: 2px dashed #4b9149;
  outline-offset: 3px;
}

@media (max-width: 700px) {
  .catpeek-secret {
    right: 8px;
    bottom: 5px;
    width: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .catpeek-secret img {
    transition: none;
  }
}


/* =====================================
   UBE / YUKON / TARO LETTERS
   ===================================== */

.potato-mail-drop[hidden],
.potato-letter-modal[hidden] {
  display: none !important;
}

.potato-mail-drop {
  position: absolute;
  z-index: 38;
  display: block;
  width: 38px;
  height: 32px;
  padding: 3px;
  margin: 0;
  border: 0;
  background: transparent;
  line-height: 0;
  cursor:
    url("/homeimages/leafcursor-click.png")
    0 0,
    pointer;
  animation:
    russet-mail-arrive .4s ease-out both,
    russet-mail-bob 1.9s ease-in-out .4s infinite;
}

.potato-mail-drop img {
  display: block;
  width: 32px;
  height: auto;
  image-rendering: pixelated;
  transition: transform .15s ease;
  filter: drop-shadow(1px 2px 0 rgba(80,39,39,.2));
}

.potato-mail-drop:hover img,
.potato-mail-drop:focus-visible img {
  transform: scale(1.13) rotate(-6deg);
}

.potato-mail-drop:focus-visible {
  outline: 2px dashed #4b9149;
  outline-offset: 3px;
}

.yukon-mail-drop {
  top: -35px;
  left: 180px;
}

.ube-mail-drop {
  bottom: 2px;
  right: 68px;
}

.taro-mail-drop {
  bottom: 7px;
  right: 70px;
}

.potato-letter-modal {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: grid;
  place-items: center;
  padding: 28px;
}

.potato-letter-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(46, 18, 27, .72);
}

.potato-letter-card {
  position: relative;
  z-index: 1;
  width: max-content;
  max-width: 100%;
}

.potato-letter-art {
  display: block;
  width: min(300px, calc(100vw - 72px));
  max-height: calc(100dvh - 90px);
  height: auto;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 12px 22px rgba(35, 10, 16, .4));
}

.potato-letter-close {
  position: absolute;
  top: -11px;
  right: -12px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 2px solid #b85b5c;
  border-radius: 50%;
  background: #fff3ed;
  color: #8d4547;
  font: bold 23px/1 Georgia, serif;
  text-shadow: none;
  cursor:
    url("/homeimages/leafcursor-click.png")
    0 0,
    pointer;
}

.potato-letter-close:hover {
  background: #ffe0de;
}

.potato-letter-close:focus-visible {
  outline: 2px dashed #4b9149;
  outline-offset: 4px;
}

@media (max-width: 700px) {
  .yukon-mail-drop {
    top: -27px;
    left: 106px;
  }

  .ube-mail-drop {
    bottom: 3px;
    right: 70px;
  }

  .taro-mail-drop {
    bottom: 7px;
    right: 69px;
  }

  .potato-letter-modal {
    padding: 18px;
  }

  .potato-letter-art {
    width: min(300px, calc(100vw - 56px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .potato-mail-drop {
    animation: none;
  }

  .potato-mail-drop img {
    transition: none;
  }
}