.flower-note-entry,
.flower-note-modal {
  --flower-note-fibers: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='152' height='112'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.52 .96' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath d='M0 0h152v112H0z' filter='url(%23f)'/%3E%3C/svg%3E");
}

.flower-note-entry {
  position: relative;
  isolation: isolate;
  display: block;
  width: min(600px, 100%);
  margin: 28px auto 5px;
  padding: 15px 0 0;
  text-align: left;
}
.flower-note-entry-paper {
  position: absolute;
  z-index: -1;
  inset: 4px 7% 17% 9%;
  border-radius: 2px;
  background: linear-gradient(104deg, #b7a782, #ded1af 30%, #e9dec3 71%, #c8b78e);
  box-shadow: inset 0 1px #fffae3a3, 0 2px 7px #101b14a6;
  transform: rotate(-1.4deg);
}
.flower-note-pocket {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(86px, 43%);
  align-items: center;
  gap: clamp(10px, 3%, 23px);
  min-height: 211px;
  padding: 17px clamp(16px, 6%, 36px);
  overflow: hidden;
  border-radius: 3px;
  background:
    radial-gradient(ellipse at 75% 13%, #3a4940 0%, transparent 68%),
    linear-gradient(153deg, #2a3830, #17251f 76%);
  box-shadow: inset 0 0 0 1px #c2b37e36, inset 0 2px #f0e7c612, 0 12px 22px -10px #080f0bd1;
}
.flower-note-pocket::before,
.flower-note::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  background-image: var(--flower-note-fibers);
  content: "";
  pointer-events: none;
}
.flower-note-pocket::before { opacity: .13; mix-blend-mode: soft-light; }
.flower-note-pocket::after {
  position: absolute;
  z-index: -1;
  inset: auto 0 0;
  height: 32%;
  background: linear-gradient(174deg, transparent 31%, #b5a87b2e 32%, #080e0a26 33%, transparent 46%);
  content: "";
  pointer-events: none;
}
.flower-note-entry-copy {
  display: grid;
  justify-self: center;
  justify-items: center;
  gap: clamp(10px, 1.24vw, 17px);
  min-width: 0;
}
.flower-note-entry-imprint {
  --flower-note-foil: linear-gradient(112deg, #b19355 1%, #d2b574 22%, #ebd8a4 37%, #bfa063 53%, #eddbac 70%, #c6a365 86%, #ac8d50);
  --flower-note-foil-flecks: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='19' height='13' viewBox='0 0 19 13'%3E%3Cpath fill='%2365502f' opacity='.22' d='m.5 4 2.1-.7.8 1-2.9.4zM7 1l1.5.35-.8.65zM13 5l1.6-1.1.45.8-1.6 1zM5 10l2.5-1 .4.6-2 .8zM16 10l1.7-.5-.65 1z'/%3E%3Cpath fill='%23fff0bd' opacity='.31' d='M2 8.7l1.2-.7.5.55zM10 6l2-.9.55.64-1.1.66zM11 11.8l.8-1 .6.6zM17 2l1.4-.7-.2.9z'/%3E%3C/svg%3E");
  position: relative;
  padding: 4px 13px;
  border: 1px solid #9c814e94;
  border-radius: 50%;
  box-shadow: inset 0 -.75px #111d1699, 0 .75px #eadab626;
  color: #dbc58a;
  font: 12px/1.4 var(--serif);
  letter-spacing: .12em;
  white-space: nowrap;
}
.flower-note-entry-imprint::before {
  position: absolute;
  inset: -1px;
  padding: 1px;
  border-radius: inherit;
  background-image: var(--flower-note-foil-flecks), var(--flower-note-foil);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  content: "";
  pointer-events: none;
}
@supports (background-clip: text) {
  .flower-note-entry-imprint span {
    background-image: var(--flower-note-foil-flecks), var(--flower-note-foil);
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 .5px #14211a);
  }
}
@media (forced-colors: active) {
  .flower-note-entry-imprint { border-color: ButtonText; }
  .flower-note-entry-imprint::before { display: none; }
  .flower-note-entry-imprint span { background: none; color: ButtonText; filter: none; }
}
.flower-note-entry-title {
  color: #eee4cb;
  font: clamp(28px, 3.15vw, 38px)/1.16 var(--serif);
  letter-spacing: .1em;
  white-space: nowrap;
}
.flower-note-entry-art {
  display: block;
  width: min(100%, 188px);
  height: auto;
  max-height: 182px;
  margin-inline: auto;
  object-fit: contain;
  transform: translateX(clamp(-26px, -14%, -7px));
}

.flower-note-modal[open] {
  display: flex;
  flex-direction: column;
  width: min(48rem, calc(100% - 22px));
  max-height: calc(100vh - 20px);
  max-height: calc(100dvh - 20px);
  padding: 53px 0 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.flower-note-modal::backdrop { background: #14231ce8; }
.flower-note-modal #modal-content {
  min-height: 0;
  padding: 0 7px 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.flower-note-modal .modal-close {
  top: 4px;
  right: 7px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #e2d5ad;
}
.flower-note-modal .modal-close:hover { background: #c9ba8e20; }
.flower-note-modal .modal-close:focus-visible { outline-offset: 2px; }
.flower-note {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template:
    "art heading"
    "art message" /
    minmax(0, 1.13fr) minmax(0, 1.87fr);
  column-gap: clamp(21px, 4.2vw, 42px);
  padding: clamp(21px, 5.1vw, 47px);
  border-radius: 2px 3px 5px 2px;
  background:
    radial-gradient(ellipse at 16% 10%, #f6eed7 0%, transparent 72%),
    linear-gradient(143deg, #ebe2cb 28%, #e9e1cb 69%, #ded2b6);
  color: #344133;
  box-shadow: inset 0 1px #fffbefa8, inset 0 -2px 5px #98836624, 0 7px 12px #0b120e62;
}
.flower-note::before { opacity: .13; mix-blend-mode: multiply; }
.flower-note-heading { grid-area: heading; min-width: 0; }
.flower-note-art-panel { grid-area: art; min-width: 0; align-self: center; }
.flower-note-art { display: block; width: min(100%, 237px); height: auto; margin: auto; }
.flower-note-received .flower-note-art { filter: saturate(1.17) sepia(.09); }
.flower-note-message { grid-area: message; min-width: 0; }
.flower-note-kicker {
  margin: 0 0 8px;
  color: #696346;
  font-size: 11px;
  letter-spacing: .2em;
}
.flower-note .modal-title {
  margin: 0 0 15px;
  color: #263b30;
  font-size: clamp(26px, 4.3vw, 36px);
  line-height: 1.27;
  letter-spacing: .05em;
}
.flower-note .modal-title span { display: block; }
.flower-note:not(.flower-note-received) .modal-title span { display: inline-block; white-space: nowrap; }
.flower-note-copy { font: clamp(15px, 1.5vw, 17px)/1.83 var(--serif); }
.flower-note-copy p { margin: 0 0 6px; }
.flower-note-signature {
  margin: 15px 0 19px;
  color: #615b43;
  font: 12px/1.7 var(--serif);
  letter-spacing: .08em;
  text-align: right;
}
.flower-note-status {
  margin: 0 0 7px;
  color: #665d43;
  font-size: 11px;
  letter-spacing: .12em;
}
.flower-note-keep {
  min-height: 44px;
  padding: 8px 17px;
  border-radius: 2px;
  background: #263c30;
  color: #fbf2d8;
  font-size: 13px;
  letter-spacing: .04em;
}
.flower-note-keep:hover { background: #365144; }
.flower-note button:focus-visible { outline-color: #465d43; outline-offset: 3px; }
.flower-note-kept {
  display: flex;
  align-items: center;
  min-height: 44px;
  margin: 0;
  color: #344a39;
  font: 13px/1.5 var(--serif);
}
.flower-note-stamp {
  display: inline-block;
  padding: 3px 7px;
  border: 1px solid #607854;
  border-radius: 2px;
  color: #465f40;
  letter-spacing: .12em;
  transform: rotate(-4deg);
}
.flower-note-receipt {
  margin-top: 17px;
  padding-top: 4px;
  border-top: 1px solid #706a4e32;
}
.flower-note-receipt button {
  min-height: 44px;
  padding: 0;
  color: #435748;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.flower-note-receipt button:hover { color: #20372b; }
.flower-note-receipt p { margin: -4px 0 0; color: #615d4c; font-size: 12px; }

@media (max-width: 600px) {
  .flower-note {
    grid-template:
      "heading art"
      "message message" /
      minmax(0, 1fr) minmax(71px, 39%);
    align-items: center;
    gap: 12px;
  }
  .flower-note .modal-title { margin-bottom: 0; font-size: clamp(21px, 5.8vw, 29px); }
  .flower-note-art { width: min(100%, 126px); }
  .flower-note-signature { margin: 13px 0 15px; }
}
@media (max-width: 430px) {
  .flower-note-entry { margin-top: 24px; }
  .flower-note-pocket {
    grid-template-columns: minmax(0, 1fr) minmax(68px, 43%);
    gap: 9px;
    min-height: 164px;
    padding: 14px;
  }
  .flower-note-entry-imprint { padding: 4px 11px; font-size: 11px; }
  .flower-note-entry-title { font-size: clamp(24px, 6.4vw, 29px); }
  .flower-note-entry-art { max-height: none; transform: translateX(-6px); }
}

@keyframes flower-note-emerge {
  from { opacity: .26; transform: translateY(15px) scale(.986); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: no-preference) {
  body:not(.reduced) .flower-note-modal[open] .flower-note {
    animation: flower-note-emerge 470ms cubic-bezier(.19, .73, .32, 1) backwards;
  }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  body:not(.reduced) .flower-note-entry-paper { transition: transform 230ms ease, box-shadow 230ms ease; }
  body:not(.reduced) .flower-note-entry:hover .flower-note-entry-paper {
    transform: translateY(-4px) rotate(-1.4deg);
    box-shadow: inset 0 1px #fffae3b5, 0 4px 9px #101b14ae;
  }
}
