/* A Bouquet From Our Photos — see bouquet.js */
:root { --ink: #2a2630; --ink-2: #6f6977; --ink-3: #a29dab; --plum: #5b1d4a; --panel: #f1f0f4; --line: #e3e0e8; --ease: cubic-bezier(0.22, 0.68, 0.16, 1); }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: #fff; color: var(--ink); font-family: "Inter", system-ui, sans-serif; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }

.bq { position: fixed; inset: 0; display: grid; grid-template-columns: minmax(300px, 34%) 1fr; }
.bq.is-gift { grid-template-columns: 1fr; }

/* the photos */
.photos { position: relative; background: var(--panel); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 18px 18px; gap: 14px; min-height: 0; }
.photos__head { text-align: center; max-width: 30em; }
.photos__head h1 { margin: 0; font-family: "Fraunces", Georgia, serif; font-weight: 400; font-size: 1.35rem; letter-spacing: -0.01em; }
.photos__head p { margin: 4px 0 0; font-size: 0.8rem; color: var(--ink-2); }
.viewer { position: relative; flex: 1; width: 100%; min-height: 0; display: flex; align-items: center; justify-content: center; }
.viewer canvas.photo { max-width: 100%; max-height: 100%; border-radius: 10px; box-shadow: 0 10px 30px rgba(40, 30, 50, 0.18); cursor: crosshair; touch-action: none; display: block; }
.viewer canvas.trace { position: absolute; pointer-events: none; }
.nav { position: absolute; top: 50%; width: 36px; height: 36px; margin-top: -18px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.9); box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15); display: grid; place-items: center; font-size: 18px; color: var(--ink); }
.nav--prev { left: 4px; } .nav--next { right: 4px; }
.thumbs { display: flex; gap: 6px; align-items: center; max-width: 100%; overflow-x: auto; padding: 4px 2px; scrollbar-width: none; }
.thumbs::-webkit-scrollbar { display: none; }
.thumbs button { flex: none; width: 34px; height: 44px; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; background: #ddd; opacity: 0.75; transition: opacity 0.2s, border-color 0.2s, transform 0.2s var(--ease); }
.thumbs button[aria-pressed="true"] { border-color: var(--plum); opacity: 1; transform: translateY(-2px); }
.thumbs button canvas, .thumbs button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbs .add { width: 44px; height: 44px; border: 1.5px dashed var(--ink-3); background: transparent; color: var(--ink-2); font-size: 20px; opacity: 1; border-radius: 10px; }
.privacy { margin: 0; font-size: 0.72rem; color: var(--ink-3); text-align: center; }
.toast { position: absolute; left: 50%; bottom: 18%; transform: translateX(-50%); background: rgba(30, 26, 34, 0.88); color: #fff; font-size: 0.82rem; padding: 8px 14px; border-radius: 999px; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity 0.25s; }
.toast.is-on { opacity: 1; }

/* the bouquet */
.vase { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 0; padding: 18px 18px 16px; }
.vase canvas.bouquet { flex: 1; min-height: 0; max-width: 100%; aspect-ratio: 600 / 760; height: 100%; width: auto; display: block; }
.vase__hint { position: absolute; top: 38%; left: 0; right: 0; text-align: center; font-family: "Fraunces", Georgia, serif; font-style: italic; color: var(--ink-3); font-size: 1.05rem; pointer-events: none; padding: 0 20px; }
.bar { display: flex; align-items: center; gap: 6px; padding: 4px; border-radius: 999px; background: #fff; box-shadow: 0 2px 10px rgba(40, 30, 50, 0.12); }
.bar button { min-width: 40px; height: 34px; border: 0; border-radius: 999px; background: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 12px; font-size: 0.82rem; color: var(--ink); }
.bar button:disabled { opacity: 0.35; cursor: default; }
.bar .wrap { background: var(--plum); color: #fff; }
.bar .wrap[aria-pressed="true"] { background: #f3d5e2; color: var(--plum); }
.bar svg { width: 16px; height: 16px; }
.bar button:focus-visible, .thumbs button:focus-visible, .nav:focus-visible { outline: 2px solid var(--plum); outline-offset: 2px; }

/* flying flowers */
canvas.fly { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 30; }

/* her side: the note under the bouquet */
.note { position: absolute; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); width: min(420px, calc(100% - 32px)); transform: translate(-50%, 30px); opacity: 0;
  background: #fffdf8; border-radius: 4px; padding: 16px 20px 14px; box-shadow: 0 12px 34px rgba(40, 30, 50, 0.18); transition: transform 0.8s var(--ease), opacity 0.6s; text-align: center; }
.note.is-on { transform: translate(-50%, 0) rotate(-1deg); opacity: 1; }
.note h2 { margin: 0; font-family: "Fraunces", Georgia, serif; font-weight: 400; font-style: italic; font-size: 1.2rem; color: var(--plum); }
.note p { margin: 6px 0 0; font-family: "Caveat", cursive; font-size: 1.35rem; line-height: 1.2; color: var(--ink); white-space: pre-wrap; }
.note .from { margin-top: 6px; font-size: 1.2rem; text-align: right; }
.note button { margin-top: 8px; background: none; border: 0; font-size: 0.76rem; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }

/* customise */
.fab { position: fixed; z-index: 20; top: max(12px, env(safe-area-inset-top)); right: max(14px, env(safe-area-inset-right)); border: 0; border-radius: 999px; padding: 9px 16px;
  background: var(--plum); color: #fff; font-size: 0.85rem; font-weight: 500; box-shadow: 0 8px 20px rgba(91, 29, 74, 0.25); }
.ed { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-start; justify-content: center; padding: 20px 14px; overflow-y: auto; background: rgba(30, 24, 36, 0.45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.ed__box { position: relative; width: min(500px, 100%); margin: auto 0; background: #fff; border-radius: 18px; padding: 24px 22px 20px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25); }
.ed__x { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: #f1eff4; }
.ed__kicker { margin: 0; font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--plum); font-weight: 600; }
.ed__title { margin: 6px 40px 6px 0; font-family: "Fraunces", Georgia, serif; font-weight: 400; font-size: 1.7rem; }
.ed__sub { margin: 0 0 16px; font-size: 0.9rem; color: var(--ink-2); line-height: 1.5; }
.ed__field { display: block; margin: 0 0 12px; }
.ed__field span { display: block; font-size: 0.78rem; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
.ed__field input, .ed__field textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 0.95rem; color: var(--ink); resize: vertical; }
.ed__field textarea { font-family: "Caveat", cursive; font-size: 1.3rem; line-height: 1.2; }
.ed__field input:focus, .ed__field textarea:focus { outline: 2px solid var(--plum); outline-offset: 1px; border-color: transparent; }
.ed__msg { min-height: 1.2em; margin: 4px 0 8px; font-size: 0.88rem; color: #b0452f; }
.ed__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.ed__btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border-radius: 999px; border: 0; background: var(--plum); color: #fff; font-weight: 600; font-size: 0.92rem; text-decoration: none; }
.ed__btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.share__link { width: 100%; margin: 0 0 8px; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; font: inherit; font-size: 0.85rem; }
.share__size { margin: 0 0 14px; font-size: 0.76rem; color: var(--ink-3); }

.broken { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center; background: #fff; z-index: 50; }
.broken h2 { font-family: "Fraunces", Georgia, serif; font-weight: 400; font-size: 1.8rem; margin: 0 0 10px; }
.broken p { max-width: 36ch; margin: 0 auto; color: var(--ink-2); line-height: 1.5; }

@media (max-width: 760px) {
  .bq { grid-template-columns: 1fr; grid-template-rows: 46% 54%; }
  .bq.is-gift { grid-template-rows: 1fr; }
  .photos { padding: 54px 12px 10px; gap: 8px; }
  .photos__head h1 { font-size: 1.1rem; }
  .photos__head p { font-size: 0.74rem; }
  .privacy { display: none; }
  .vase { padding: 8px 12px 12px; }
  .fab { padding: 8px 13px; font-size: 0.8rem; }
}

/* where she tapped, while the flower is cut out */
.ring { position: fixed; z-index: 25; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15), 0 0 18px rgba(255, 255, 255, 0.6); pointer-events: none; opacity: 0; }
.ring.is-on { animation: ring 0.9s ease-out infinite; }
@keyframes ring { 0% { transform: scale(0.4); opacity: 0.95; } 100% { transform: scale(1.4); opacity: 0; } }
.privacy a { color: inherit; }
.bq.is-gift .vase { padding-bottom: 170px; }
@media (max-width: 760px) { .bq.is-gift .vase { padding-bottom: 190px; } }
