/* Chapter 3: the ASCII bouquet in its little dark window.
   The renderer sizes the bouquet by the window's height, so the window keeps a
   squarish shape to fit the whole bouquet across. */
.bouquet-frame {
  flex: none;
  width: min(780px, 100%, calc((100dvh - 230px) * 1.25));
  aspect-ratio: 5 / 4;
  border-radius: 18px;
  overflow: hidden;
  background: #0b0d12;
  box-shadow: var(--shadow-soft), 0 0 0 4px var(--cocoa);
}
.bouquet-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
@media (max-width: 600px) {
  .bouquet-frame { width: min(100%, calc(100dvh - 230px)); aspect-ratio: 1 / 1; }
}
@media (max-height: 520px) {
  .bouquet-frame { width: min(100%, calc((100dvh - 150px) * 1.25)); }
}

/* the lead-in: your message and a drawn flower, on blush */
.bloom-intro {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(26px, 5dvh, 44px);
  padding: 24px 20px;
  background: transparent;
}
.bloom-message {
  margin: 0;
  max-width: 24ch;
  font: italic 500 clamp(25px, 5.4vw, 36px)/1.35 var(--font-serif);
  color: var(--cocoa);
  text-align: center;
  text-wrap: balance;
}
.bloom-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border: 0;
  background: none;
  cursor: pointer;
  color: var(--cocoa);
  font: 800 16px/1 var(--font-sans);
}
.bloom-btn svg { width: clamp(96px, 24vw, 128px); height: auto; overflow: visible; }
.bloom-btn .bloom-petals { transform-origin: 60px 60px; animation: bloom-breathe 3.6s ease-in-out infinite; transition: transform .4s var(--ease-bounce); }
.bloom-btn:hover .bloom-petals { animation: none; transform: scale(1.1) rotate(8deg); }
.bloom-btn:focus-visible { outline: 3px solid var(--candy); outline-offset: 6px; border-radius: 20px; }
.bloom-label { padding: 8px 16px 9px; border-radius: 999px; background: var(--paper); box-shadow: 0 6px 14px -8px rgba(122, 75, 71, .45); }
@keyframes bloom-breathe { 0%, 100% { transform: scale(1) rotate(0deg); } 50% { transform: scale(1.05) rotate(6deg); } }

/* the transition: the dark wipe and the petals above it */
.bloom-wipe { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.bloom-petal { position: absolute; z-index: 5; width: 22px; pointer-events: none; }
.bloom-petal svg { display: block; width: 100%; height: auto; }

@media (prefers-reduced-motion: reduce) {
  .bloom-btn .bloom-petals { animation: none; transition: none; }
}
