/* App v5 base-theme geometry and materials, at a responsive website scale. */
.v5-hero, .v5-calendar {
  --v5-ink: #44392d;
  --v5-muted: #75654d;
  --v5-accent: #b25037;
  --v5-seal-ink: #796348;
  --v5-cell: #e8dabf3b;
  --v5-status-bg: #fff9ebf0;
  font-family: var(--display);
}
.v5-hero-space { width: 100%; height: 450px; position: relative; }
.v5-hero { position: absolute; width: 346px; height: 390px; top: 0; left: 50%; margin-left: -173px; isolation: isolate; transform: scale(var(--hero-scale, 1)); transform-origin: top center; }
.v5-envelope-back, .v5-envelope-front { position: absolute; left: -18px; top: 14px; width: 382px; height: 382px; max-width: none; object-fit: contain; pointer-events: none; }
.v5-envelope-back { z-index: 0; clip-path: inset(2% 4.5% 2.5% 4.4%); filter: url(#v5-home-material-color) drop-shadow(0 5px 6px #6649211f); }
.v5-envelope-front { z-index: 3; clip-path: polygon(4.4% 44.5%,34.1% 65.05%,65.1% 65.05%,95.3% 44.5%,95.3% 97.5%,4.4% 97.5%); filter: url(#v5-home-material-color); }
.v5-card-mask { position: absolute; inset: 0 0 auto; height: 376px; z-index: 2; overflow: hidden; contain: paint; }
.v5-letter { position: absolute; isolation: isolate; top: 40px; left: 14px; right: 14px; height: 330px; padding: 14px; border-radius: 1.5px; background: transparent; box-shadow: 0 1.4px 1.7px #6f583426, 0 5px 11px #634c2b1c; transform-origin: 50% 85%; }
.v5-letter::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 1.5px; background: #fff9ed url("assets/cardstock.webp"); background-size: 330px; filter: url(#v5-home-material-color); }
.v5-letter-content { display: flow-root; width: 100%; max-width: 290px; margin: 0 auto; }
.v5-memory-photo { display: block; width: 100%; height: 174px; object-fit: cover; object-position: center 45%; border-radius: 2px; }
.v5-memory-copy { font: 400 22px/28px "Mailbox Hand", var(--display); letter-spacing: .1px; margin: 10px 1px 8px; max-height: 56px; overflow: hidden; color: #5b4b36; }
.v5-twine { position: absolute; z-index: 4; left: 110px; top: 222px; width: 140px; height: 140px; max-width: none; object-fit: contain; pointer-events: none; transform: scaleX(-1); transform-origin: 63px center; filter: url(#v5-home-material-color) drop-shadow(0 1px 1px #4a321226); }
.v5-envelope-message { position: absolute; z-index: 5; top: 250px; left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 35px; pointer-events: none; }
.v5-wax-seal { position: relative; width: 69px; height: 69px; transform: rotate(-8deg); filter: url(#v5-home-material-color) drop-shadow(0 2px 2px #5b3d1b30); }
.v5-wax-material { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.v5-wax-brand { position: absolute; left: 19px; top: 19px; width: 31px; height: 31px; object-fit: contain; opacity: .82; mix-blend-mode: multiply; filter: drop-shadow(0 .5px 0 #ffecb9a6); }
.v5-envelope-message p { font: 400 14px/22px var(--display); letter-spacing: 1px; color: var(--v5-seal-ink); text-shadow: 0 .5px #ffffff8c; filter: url(#v5-home-material-color); }
.v5-audio-player { display: flex; align-items: center; gap: 10px; height: 32px; border-radius: 5px; background: #efd7c157; padding: 0 9px 0 5px; color: #ed785b; }
.v5-play { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; background: #ed785b; color: white; }
.v5-play .icon { width: 11px; height: 11px; }
.v5-waveform { gap: 3px; color: #ed785b; }
.v5-duration { font: 12px/18px var(--display); color: #776c60; font-variant-numeric: tabular-nums; }

.v5-calendar {
  --unit: clamp(1rem, 1.35vw, 1.52rem);
  position: relative; isolation: isolate; overflow: visible; margin: 0 auto;
  padding: clamp(10px, 2vw, 25px); border-radius: 2px; color: var(--v5-ink);
}
.v5-calendar::before, .v5-calendar::after { content: ""; position: absolute; pointer-events: none; border-radius: 2px; background: #fff9ed url("assets/cardstock.webp"); background-size: 330px; filter: url(#v5-home-material-color); }
.v5-calendar::before { z-index: -1; inset: 3px -1px -4px 2px; transform: rotate(.35deg); background-color: #f4ead6; background-blend-mode: multiply; box-shadow: 0 2px 4px #6b502b1a; }
.v5-calendar::after { z-index: 0; inset: 0; box-shadow: 0 1.5px 2.5px #684e291c, 0 6px 12px #634c2b14; }
.v5-calendar > * { position: relative; z-index: 1; }
.v5-calendar-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.v5-calendar h3 { font-size: calc(var(--unit) * 1.36); line-height: 1.25; color: #66543a; font-weight: 400; letter-spacing: .025em; }
.v5-month { display: flex; align-items: center; gap: 2px; font-size: var(--unit); color: var(--v5-muted); white-space: nowrap; }
.v5-month button { display: grid; place-items: center; width: 38px; height: 42px; color: inherit; border-radius: 4px; }
.v5-month button:hover:not(:disabled) { background: #e9d7ba58; }
.v5-month button:disabled { opacity: .42; }
.v5-month .icon { width: 15px; height: 15px; }
.v5-weekdays { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); text-align: center; margin: 5px 0 6px; font-size: calc(var(--unit) * .89); color: var(--v5-muted); }
.v5-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: clamp(4px, .45vw, 7px); min-height: 225px; }
.v5-day {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  min-width: 0; min-height: 38px; aspect-ratio: 1.14; overflow: hidden; border-radius: 4px;
  background: var(--v5-cell); color: var(--v5-ink);
}
.v5-day-blank { visibility: hidden; }
.v5-date-number { position: relative; z-index: 2; display: block; font-size: calc(var(--unit) * 1.15); line-height: 1.25; font-weight: 400; font-variant-numeric: tabular-nums; }
.v5-day > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 36%; }
.v5-day-photo .v5-date-number { color: white; text-shadow: 0 1px 4px #342719, 0 1px 2px #18140b; }
.v5-day-photo:hover { outline: 1px solid var(--v5-accent); outline-offset: 1px; }
.v5-day-status { z-index: 2; width: 100%; min-height: max(14px, var(--unit)); display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: auto; background: var(--v5-status-bg); line-height: 1; color: var(--v5-accent); }
.v5-day-status .icon { width: .78em; height: .78em; }
.v5-day-status b { font-weight: 400; font-size: calc(var(--unit) * .88); }
.v5-day-today { outline: 1.5px solid #ed785b; outline-offset: 1px; }
.v5-day-today:not(.v5-day-photo) .v5-date-number { color: var(--v5-accent); text-shadow: none; }
.is-awaiting-light > img, .is-awaiting-light .v5-day-status { opacity: .1; }
.is-awaiting-light .v5-date-number { color: var(--v5-accent); text-shadow: none; }
.v5-day-today.is-lighting { animation: light-day 1.22s cubic-bezier(.2,.7,.3,1) both; }
.v5-day-today.is-lighting img { animation: light-photo .78s cubic-bezier(.2,.7,.3,1) both; }
@keyframes light-day {
  0%, 100% { box-shadow: 0 0 0 0 #e9a45c00; }
  40% { box-shadow: 0 0 0 4px #d9654260, 0 0 23px 7px #fbc66abb; }
}
@keyframes light-photo {
  from { opacity: .1; filter: brightness(1.45) saturate(.62); }
  to { opacity: 1; filter: none; }
}
.v5-legend { display: flex; gap: 16px; align-items: center; color: var(--v5-muted); font-size: calc(var(--unit) * .84); margin-top: 9px; }
.v5-legend span { display: flex; align-items: center; gap: 5px; }
.v5-legend .icon, .v5-legend b { font-weight: 400; }
@media (max-width: 760px) {
  .v5-hero-space { height: clamp(280px, 98vw, 450px); }
}
@media (prefers-reduced-motion: reduce) {
  .is-awaiting-light > img, .is-awaiting-light .v5-day-status { opacity: 1; }
}
