:root {
  --tea-green: #ccd5aeff;
  --beige: #e9edc9ff;
  --cornsilk: #fefae0ff;
  --papaya-whip: #faedcdff;
  --light-bronze: #d4a373ff;
  --coffee-bean: #1f140aff;
  --title-font: "Patrick Hand", sans-serif;
  --text-font: "Instrument Serif", serif;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 18px;
  background-color: var(--cornsilk);
}

body {
  margin: 0;
  padding: 3rem 2rem;
  font-family: var(--text-font);
  color: var(--coffee-bean);
  background-color: var(--cornsilk);
  -webkit-text-size-adjust: 100%;
}

footer {
  margin-top: 2rem;
  margin-bottom: 5rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

img {
  max-width: 100%;
  height: auto;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--title-font);
  margin: 0;
  padding: 0;
}

h1 {
  font-size: 3rem;
  text-shadow: 4px 4px 0px var(--light-bronze);
}

h2 {
  font-size: 1.5rem;
  text-shadow: 2px 2px 0px var(--light-bronze);
}

h3 {
  font-size: 1.1rem;
  text-shadow: 1px 1px 0px var(--light-bronze);
}

p {
  margin: 0.5rem 0;
  line-height: 1.6;
}

ul, ol {
  padding-left: 1.5rem;
}

li {
  margin: 0.5rem 0;
  line-height: 1.6;
}

/* Main layout */
main {
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
}

.header {
  text-align: center;
  margin-bottom: 5rem;
  margin-top: 2rem;
}

.mascot-gif {
  width: 120px;
  height: 120px;
  margin: 0 auto -20px;
}

.header h1 {
  font-size: 4rem;
}

.header .subtitle {
  font-family: var(--title-font);
  font-size: 1.3rem;
  margin-top: -10px;
  color: var(--coffee-bean);
  text-shadow: 2px 2px 0px var(--light-bronze);
}

/* Recipe container with side content */
.recipe-wrapper {
  display: grid;
  grid-template-columns: 1fr 800px 1fr;
  gap: 1rem;
  align-items: start;
  position: relative;
}

.left-side {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3rem;
  align-items: flex-end;
}

.right-side {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3rem;
  align-items: flex-start;
}

.recipe-with-sidebar {
  display: contents;
}

.recipe-content {
  background-color: var(--beige);
  padding: 4rem;
}

.recipe-content h2 {
  margin-bottom: 1.5rem;
  color: var(--coffee-bean);
}

.recipe-content section {
  margin-bottom: 2rem;
}

.recipe-content section h3 {
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  color: var(--coffee-bean);
}

.recipe-content ul li {
  margin: 0.75rem 0;
}

.recipe-content ol li {
  margin: 0.75rem 0;
  line-height: 1.8;
}

/* Images and tips */
.side-image {
  background-color: var(--papaya-whip);
  padding: 1rem;
  filter: drop-shadow(3px 3px 10px rgba(31, 20, 10, 0.12));
  transition: transform 0.3s ease, filter 0.3s ease;
  position: relative;
}

.left-side .side-image:hover {
  transform: translateX(3rem) scale(1.15);
}

.right-side .side-image:hover {
  transform: translateX(-3rem) scale(1.15);
}

.side-image:hover {
  filter: drop-shadow(5px 5px 15px rgba(31, 20, 10, 0.2));
}

.side-image img:not(.sticker) {
  display: block;
  width: 100%;
  height: auto;
}

.side-image.left-lean {
  transform: rotate(-3deg);
}

.side-image.right-lean {
  transform: rotate(3deg);
}

.side-image.left-lean:hover {
  transform: rotate(-3deg) scale(1.05) translateY(-3px);
}

.side-image.right-lean:hover {
  transform: rotate(3deg) scale(1.05) translateY(-3px);
}

/* Sticker positioning */
.sticker {
  position: absolute;
  filter: drop-shadow(2px 2px 6px rgba(31, 20, 10, 0.1));
  transition: transform 0.3s ease;
}

.sticker:hover {
  transform: scale(1.15) rotate(8deg);
  filter: drop-shadow(3px 3px 8px rgba(31, 20, 10, 0.2));
}

.strawberry-sticker {
  width: 70px;
  height: 42px;
  top: -15px;
  right: -25px;
  transform: rotate(-20deg);
}

.strawberry-sticker:hover {
  transform: rotate(-20deg) scale(1.15);
}

.roses-sticker {
  width: 55px;
  height: 65px;
  bottom: -20px;
  left: -20px;
  transform: rotate(15deg);
}

.roses-sticker:hover {
  transform: rotate(15deg) scale(1.15);
}

.dove-sticker {
  width: 85px;
  height: 60px;
  top: -20px;
  left: -35px;
  transform: rotate(-25deg);
}

.dove-sticker:hover {
  transform: rotate(-25deg) scale(1.15);
}

.cat-sticker {
  width: 55px;
  height: 85px;
  bottom: -25px;
  right: -20px;
  transform: rotate(18deg);
}

.cat-sticker:hover {
  transform: rotate(18deg) scale(1.15);
}

.tip-box {
  background-color: var(--tea-green);
  padding: 1.5rem;
  filter: drop-shadow(3px 3px 10px rgba(31, 20, 10, 0.12));
  transition: transform 0.3s ease, filter 0.3s ease;
  max-width: 280px;
}

.tip-box:hover {
  transform: translateY(-3px);
  filter: drop-shadow(4px 4px 15px rgba(31, 20, 10, 0.15));
}

.tip-box h3 {
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  color: var(--coffee-bean);
  text-shadow: 1px 1px 0px var(--light-bronze);
}

.tip-box p {
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

/* Anchor points - hidden but still in layout for positioning */
[data-anchor-point] {
  display: inline;
  width: 0;
  height: 0;
  overflow: hidden;
  padding: 0;
  margin: 0;
}

/* Anchored elements - absolutely positioned */
[data-anchor] {
  position: absolute !important;
  width: 400px;
  margin-bottom: 3rem;
}

/* Add spacing between multiple items with same anchor */
.tip-box[data-anchor] {
  margin-bottom: 1rem;
}

.side-image[data-anchor] {
  margin-top: 0.5rem;
  margin-bottom: 2rem;
}

/* Screenshot styling */
.screenshot {
  width: 400px;
  background-color: var(--papaya-whip);
  padding: 0.5rem;
  filter: drop-shadow(3px 3px 10px rgba(31, 20, 10, 0.12));
}

/* Responsive */

.recipe-content [data-anchor] {
  display: none;
}

/* Tablet layout: 769px to 1199px */
@media (max-width: 1199px) and (min-width: 769px) {
  .recipe-wrapper {
    grid-template-columns: 1fr;
    gap: 0;
    align-items: flex-start;
  }

  /* Hide other layout size's images */
  .recipe-content [data-anchor] {
    display: none;
  }
  .left-side {
    display: none;
  }

  footer {
    margin-left: 0;
  }

  .recipe-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 300px;
    background-color: var(--beige);
    margin-left: -1.5rem;
    padding-left: 3rem;
    margin-right: -1.5rem;
    padding-right: 3rem;
    gap: 2rem;
  }

  .recipe-content {
    background-color: transparent;
    margin: 0;
    padding: 3rem 3rem 3rem 0;
    max-width: none;
  }

  .right-side {
    align-items: flex-start;
  }

  .tip-box {
    max-width: 100%;
  }

  [data-anchor] {
    width: 280px !important;
  }

  .header h1 {
    font-size: 2.5rem;
  }

  body {
    padding: 2rem 1.5rem;
  }

  .mascot-gif {
    width: 100px;
    height: 100px;
  }
}

/* Phone layout: below 768px */
@media (max-width: 768px) {
  .recipe-wrapper {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .left-side, .right-side {
    display: none;
  }

  .recipe-with-sidebar {
    display: contents;
  }

  .recipe-content {
    background-color: var(--beige);
    margin-left: -1rem;
    margin-right: -1rem;
    margin-bottom: 0;
    padding: 2rem;
    max-width: none;
  }

  .recipe-content [data-anchor] {
    position: static !important;
    width: auto !important;
    margin: 1.5rem -1rem;
    display: block;
  }

  .recipe-content .side-image {
    background-color: var(--papaya-whip);
    padding: 1rem;
    max-width: 100%;
  }

  .recipe-content .side-image img:not(.sticker) {
    width: 100%;
  }

  .recipe-content .tip-box {
    background-color: var(--tea-green);
    padding: 1.5rem;
    max-width: 100%;
  }

  .sticker {
    display: none;
  }

  .decoration {
    display: none;
  }

  .mascot-gif {
    width: 80px;
    height: 80px;
  }

  body {
    padding: 1.5rem 1rem;
  }
}


.show-anchor-debug [data-anchor-point] {
  background-color: var(--light-bronze);
}
