* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  font-family: 'Fira Mono', monospace;
  overflow: hidden;
  background-image: url("opt/layer4.webp");
  background-size: cover;
  background-repeat: no-repeat;
}

.main-wrapper {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.main-container {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: calc(100vh * 1.7481);
  max-height: calc(100vw / 1.7481);
  aspect-ratio: 1888 / 1080;
}

.main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* .window-controls, .popup-controls {
      position: absolute;
      display: flex;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.3s ease;
      z-index: 10;
    }

    .main-wrapper:hover .window-controls,
    .main-wrapper:hover .popup-controls {
      opacity: 1;
      pointer-events: auto;
    }

    .window-controls {
      top: 9%;
      right: 9%;
      gap: 1.5vw;
    }

    .popup-controls {
      top: 57.5%;
      left: 88%;
      transform: translate(-50%, -50%);
    }

    .control-btn,
    .popup-close {
      width: 18px;
      height: 18px;
      cursor: pointer;
    } */

.sunflower-rotate {
  position: absolute;
  top: 48%;
  left: 12%;
  width: 8%;
  transition: transform 0.6s ease-in-out;
  z-index: 5;
}

.sunflower-rotate:hover {
  transform: rotate(180deg);
}

.yes-button {
  position: absolute;
  bottom: 12.5%;
  left: 55%;
  width: 10%;
  cursor: pointer;
  z-index: 5;
}

.nope-wrapper {
  position: absolute;
  bottom: 8%;
  right: 18.8%;
  width: 10%;
  height: auto;
  z-index: 5;
}

.nope-button {
  width: 100%;
  transition: opacity 0.3s ease;
}

.nope-wrapper:hover .nope-button {
  opacity: 0;
}

#mini {
  width: 20px;
  height: 5px;
  position: absolute;
  top: 40%;
  right: 155%;
}

.rainbow-left {
  position: absolute;
  top: 3%;
  left: 0;
  width: 4vw;
  z-index: 4;
}

.flower-right {
  position: absolute;
  top: 22%;
  right: 0;
  width: 6vw;
  z-index: 4;
}

/* ========== Mobile Fallback Banner ========== */
.mobile-fallback {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99999;
  background: #fff8ee;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 40px 28px;
  box-sizing: border-box;
}

.mobile-fallback .mf-badge {
  display: inline-block;
  background: #fc8879;
  color: #fff;
  font-family: 'DM Serif Display', serif;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 6px 18px;
  border-radius: 20px;
  margin-bottom: 28px;
}

.mobile-fallback h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 26px;
  color: #3a3a3a;
  margin: 0 0 16px 0;
  line-height: 1.3;
}

.mobile-fallback p {
  font-family: 'Fira Mono', monospace;
  font-size: 14px;
  color: #777;
  margin: 0;
  line-height: 1.6;
  max-width: 340px;
}

.mobile-fallback .mf-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

.mobile-fallback .mf-divider {
  width: 60px;
  height: 3px;
  background: #fc8879;
  border: none;
  border-radius: 2px;
  margin: 20px auto 0;
}

@media screen and (max-width: 768px) {
  .rainbow-left {
    display: block !important;
    width: 11vw;
    top: 5%;
  }
  
  .flower-right {
    display: block !important;
    width: 11vw;
    top: 12%;
  }
}
/* ========== Mobile fixes ========== */
.main-wrapper { height: 100vh; height: 100dvh; }
.main-container {
  max-width: calc(100dvh * 1.7481);
}
@media (hover: none) {
  .sunflower-rotate:hover { transform: none; }
  .sunflower-rotate:active { transform: rotate(180deg); }
}

/* =====================================================================
   MOBILE LAYOUT (phones, and tablets held upright)
   The desktop composite is hidden and rebuilt from its layers so it
   stacks vertically instead of shrinking.
   ===================================================================== */
.m-landing { display: none; }

@media (max-width: 1024px) and (orientation: portrait) {
  html, body { overflow: auto; background: #fffbf3 url("opt/layer4.webp") center / cover; }
  .main-wrapper { display: none; }

  .m-landing {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3.5vh;
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 9vh 6vw 4vh;
    max-width: 560px;
    margin: 0 auto;
    overflow: hidden;
  }

  .m-rainbow { position: absolute; top: 2.5vh; left: 0; width: 18vw; max-width: 90px; }
  .m-flower  { position: absolute; top: 2vh; right: 0; width: 15vw; max-width: 80px; }

  /* --- PORTFOLIO window --- */
  .m-window { position: relative; width: 100%; }
  .m-window-img { width: 100%; display: block; }
  .m-controls {
    position: absolute; top: 2.2%; right: 4%;
    display: flex; gap: 1.6vw;
  }
  .m-controls span, .m-dialog-bar span {
    width: 6.4vw; height: 6.4vw; max-width: 30px; max-height: 30px;
    border: 2px solid #000; border-radius: 50%; background: #fff;
    display: flex; align-items: center; justify-content: center;
  }
  .m-controls img, .m-dialog-bar img { width: 52%; height: auto; }
  .m-daisy {
    position: absolute; left: 7.5%; top: 47.5%; width: 11.5%;
    transition: transform .6s ease-in-out;
  }
  .m-daisy.spun { transform: rotate(180deg); }
  .m-bfly { position: absolute; width: 11%; }
  .m-bfly-1 { right: 18%; top: 38%; animation: m-flutter 3s ease-in-out infinite; }
  .m-bfly-2 { right: 8%; top: 66%; width: 10%; animation: m-flutter 3.6s ease-in-out infinite reverse; }
  @keyframes m-flutter {
    0%, 100% { transform: translateY(0) rotate(-6deg); }
    50%      { transform: translateY(-8px) rotate(6deg); }
  }

  /* --- Avatar peeking over the dialog --- */
  .m-dialog-wrap { --av: min(44vw, 230px); position: relative; width: 100%; padding-top: calc(var(--av) * .78); }
  .m-me {
    position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: var(--av); z-index: 1;
  }
  .m-hand { position: absolute; z-index: 3; width: calc(var(--av) * .21); top: calc(var(--av) * .78 - var(--av) * .13); }
  .m-hand-l { left: calc(50% - var(--av) * .36); }
  .m-hand-r { left: calc(50% + var(--av) * .15); }

  .m-dialog {
    position: relative; z-index: 2;
    background: #fff5df;
    border: 3px solid #000; border-radius: 4px;
    box-shadow: 5px 5px 0 #000;
  }
  .m-dialog-bar {
    background: #fb8979; border-bottom: 3px solid #000;
    height: 11vw; max-height: 52px;
    display: flex; align-items: center; justify-content: flex-end; padding: 0 3vw;
  }
  .m-dialog p {
    font-family: 'Fira Mono', monospace; font-weight: 700;
    font-size: clamp(14px, 4.2vw, 20px); line-height: 1.35;
    padding: 5vw 5vw 3vw; color: #111;
  }
  .m-actions { display: flex; justify-content: center; gap: 8vw; padding: 1vw 5vw 6vw; }
  .m-btn {
    background: none; border: 0; padding: 0; cursor: pointer;
    width: 30vw; max-width: 150px;
    -webkit-tap-highlight-color: transparent;
    transition: transform .15s ease, opacity .3s ease;
  }
  .m-btn img { width: 100%; display: block; }
  .m-btn:active { transform: scale(.94); }
  .m-nope.gone { opacity: 0; pointer-events: none; }

  .m-computer { position: absolute; left: 4%; bottom: 3%; width: 30%; }
}
