:root {
  --ink: #342923;
  --muted: #766a62;
  --paper: #fff8ef;
  --paper-deep: #f5e2d2;
  --rose: #c85f73;
  --sage: #73866f;
  --gold: #c7974f;
  --shadow: 0 24px 70px rgba(69, 43, 35, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: Inter, system-ui, sans-serif;
  background:
    linear-gradient(rgba(255, 249, 242, 0.76), rgba(255, 246, 238, 0.88)),
    url("assets/botanical-paper.png") center / cover fixed,
    #fff7ec;
}

button {
  font: inherit;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: clamp(20px, 4vw, 46px);
  align-items: start;
  padding: 32px 0;
}

.bouquet-view {
  min-width: 0;
}

.intro {
  max-width: 660px;
  margin-bottom: clamp(6px, 1.2vh, 14px);
}

.kicker,
.panel-topline,
h3,
.flower-meta {
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.kicker {
  margin: 0 0 8px;
  color: var(--rose);
  font-size: 0.82rem;
  font-weight: 700;
}

h1,
h2 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  line-height: 0.95;
}

h1 {
  max-width: 680px;
  font-size: clamp(2.9rem, 6.5vw, 5.45rem);
  font-weight: 700;
}

.title-line {
  display: block;
}

.title-line:last-child {
  max-width: 11ch;
}

.dedication {
  max-width: 560px;
  margin: 10px 0 0;
  color: #67594f;
  font-size: clamp(0.95rem, 1.55vw, 1.06rem);
  line-height: 1.45;
}

.dedication + .dedication {
  margin-top: 6px;
}

.bouquet-stage {
  position: relative;
  width: min(780px, 100%);
  height: clamp(470px, 58vh, 640px);
  margin: 0 auto;
  overflow: hidden;
  isolation: isolate;
}

.stage-glow {
  position: absolute;
  left: 50%;
  top: 21%;
  width: min(430px, 76%);
  height: 300px;
  border-radius: 6px;
  background:
    linear-gradient(160deg, rgba(188, 137, 98, 0.34), rgba(219, 174, 134, 0.22) 52%, rgba(141, 97, 75, 0.24)),
    radial-gradient(ellipse at 50% 22%, rgba(116, 75, 57, 0.22), transparent 62%);
  clip-path: polygon(10% 0, 90% 0, 68% 100%, 32% 100%);
  filter: blur(0.5px);
  transform: translateX(-50%);
  z-index: 0;
}

.stem-layer,
.flower-layer,
.wrap {
  position: absolute;
  inset: 0;
}

.stem-layer {
  z-index: 1;
}

.flower-layer {
  z-index: 2;
}

.wrap {
  z-index: 3;
}

.flower-layer::before {
  display: none;
}

.stem {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  opacity: 0.78;
}

.flower {
  position: absolute;
  width: var(--size);
  height: var(--size);
  left: calc(var(--x) - var(--size) / 2);
  top: calc(var(--y) - var(--size) / 2);
  filter: drop-shadow(0 13px 18px rgba(66, 44, 32, 0.2));
  transform: rotate(var(--tilt)) scale(var(--scale));
  transform-origin: center;
  animation: bloom-in 680ms cubic-bezier(0.2, 0.9, 0.24, 1.08) both;
  animation-delay: var(--delay);
}

.flower::before {
  content: "";
  position: absolute;
  inset: 9%;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #d6a74d 0 17%, transparent 18%),
    repeating-conic-gradient(var(--bloom-light) 0 12deg, var(--bloom-color) 12deg 22deg, var(--bloom-shadow) 22deg 27deg, transparent 27deg 34deg);
  opacity: 0.62;
  transform: rotate(12deg);
}

.flower img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  transform: scale(1.24);
}

.flower.grogu-flower {
  filter: drop-shadow(0 16px 22px rgba(55, 39, 25, 0.26));
}

.flower.grogu-flower::before {
  inset: 2%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(246, 218, 153, 0.58), rgba(143, 164, 108, 0.2) 54%, transparent 70%);
  opacity: 0.72;
  transform: none;
}

.flower.grogu-flower img {
  object-fit: contain;
  filter: var(--grogu-filter, none);
  transform: scale(1.18);
}

.wrap {
  pointer-events: none;
}

.wrap-left,
.wrap-right {
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 180px;
  height: 250px;
  background: linear-gradient(145deg, rgba(246, 220, 203, 0.88), rgba(231, 181, 157, 0.82));
  clip-path: polygon(14% 0, 100% 100%, 0 100%);
  transform-origin: 50% 100%;
  box-shadow: inset 0 0 28px rgba(255, 255, 255, 0.28);
}

.wrap-left {
  transform: translateX(-92%) rotate(10deg);
}

.wrap-right {
  transform: translateX(-8%) rotate(-10deg) scaleX(-1);
}

.ribbon {
  position: absolute;
  left: 50%;
  bottom: 88px;
  width: 150px;
  height: 38px;
  border-radius: 50px 50px 42px 42px;
  background: linear-gradient(135deg, #b14c64, #df8495);
  transform: translateX(-50%);
  box-shadow: 0 16px 28px rgba(86, 35, 45, 0.22);
}

.ribbon::before,
.ribbon::after {
  content: "";
  position: absolute;
  top: 11px;
  width: 66px;
  height: 32px;
  background: inherit;
  clip-path: polygon(0 0, 100% 48%, 0 100%);
}

.ribbon::before {
  right: 78%;
}

.ribbon::after {
  left: 78%;
  transform: scaleX(-1);
}

.bouquet-panel {
  align-self: start;
  margin-top: clamp(12px, 3vh, 28px);
  padding: 18px;
  border: 1px solid rgba(129, 98, 82, 0.18);
  border-radius: 8px;
  background: rgba(255, 251, 245, 0.84);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.panel-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  color: var(--sage);
  font-size: 0.72rem;
  font-weight: 800;
}

h2 {
  font-size: clamp(2.2rem, 3.2vw, 3rem);
  overflow-wrap: break-word;
}

.mood {
  min-height: 0;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.swatches {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 20px 0;
}

.swatch {
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(65, 40, 32, 0.12);
  background: var(--color);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.38);
}

h3 {
  margin: 0 0 12px;
  color: #8b6f5b;
  font-size: 0.72rem;
}

.flower-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.flower-item {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 8px 0;
  border-top: 1px solid rgba(129, 98, 82, 0.14);
}

.flower-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.7);
}

.flower-name {
  display: block;
  font-weight: 700;
}

.flower-meta {
  display: block;
  margin-top: 3px;
  color: #907e72;
  font-size: 0.66rem;
  font-weight: 700;
}

.bouquet-actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.regenerate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 48px;
  margin-top: 0;
  border: 0;
  border-radius: 999px;
  color: #fffaf4;
  background: linear-gradient(135deg, #323d31, #7b8a62 55%, #c89255);
  box-shadow: 0 16px 28px rgba(72, 78, 52, 0.24);
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.regenerate.secondary {
  color: #3d3128;
  background: linear-gradient(135deg, #ead0b4, #d59a69 55%, #9f6951);
  box-shadow: 0 13px 24px rgba(106, 69, 47, 0.2);
}

.regenerate.grogu {
  color: #fffaf0;
  background: linear-gradient(135deg, #3e4c33, #7e955b 52%, #b98452);
  box-shadow: 0 14px 26px rgba(62, 76, 51, 0.24);
}

.regenerate.latest {
  color: #fffaf4;
  background: linear-gradient(135deg, #4f392d, #9f6951 52%, #d9a45f);
  box-shadow: 0 14px 26px rgba(94, 58, 42, 0.22);
}

.regenerate:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 34px rgba(72, 78, 52, 0.28);
}

.regenerate.secondary:hover {
  box-shadow: 0 18px 30px rgba(106, 69, 47, 0.25);
}

.regenerate.grogu:hover {
  box-shadow: 0 18px 30px rgba(62, 76, 51, 0.28);
}

.regenerate.latest:hover {
  box-shadow: 0 18px 30px rgba(94, 58, 42, 0.27);
}

.regenerate:active {
  transform: translateY(0);
}

.regenerate:focus-visible {
  outline: 3px solid rgba(200, 95, 115, 0.35);
  outline-offset: 4px;
}

@keyframes bloom-in {
  from {
    opacity: 0;
    transform: rotate(var(--tilt)) scale(0.72);
  }
  to {
    opacity: 1;
    transform: rotate(var(--tilt)) scale(var(--scale));
  }
}

@media (max-width: 900px) {
  .page-shell {
    grid-template-columns: 1fr;
    align-items: start;
    padding: 24px 0;
  }

  .intro {
    text-align: center;
    margin-inline: auto;
  }

  .dedication {
    margin-inline: auto;
  }

  .bouquet-stage {
    height: min(650px, 68vh);
  }

  .bouquet-panel {
    width: min(620px, 100%);
    margin: 0 auto 18px;
  }
}

@media (max-width: 560px) {
  .page-shell {
    width: min(100% - 22px, 1180px);
    padding: 18px 0;
    gap: 14px;
  }

  .intro {
    max-width: 100%;
    margin-bottom: 0;
  }

  h1 {
    font-size: clamp(1.75rem, 7.4vw, 2.05rem);
    line-height: 0.96;
    margin-inline: auto;
  }

  .dedication {
    max-width: 34ch;
    font-size: 0.84rem;
    line-height: 1.28;
  }

  .dedication + .dedication {
    margin-top: 4px;
  }

  .bouquet-stage {
    height: 470px;
    margin-top: -4px;
  }

  .bouquet-panel {
    padding: 18px;
  }

  h2 {
    font-size: clamp(1.65rem, 7.8vw, 2rem);
    line-height: 1.08;
  }

  .mood {
    min-height: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
