/* e7ents sample Memories apps, on top of memories.css (the real app's look).
   Every rule is scoped to .dm / .dm-*: this file is also loaded on public
   site pages (the picker, the homepage, /samples) for the phone mockups. */

/* ---------------------------------------------------------------- shared pieces */
.dm-host { position: relative; display: grid; place-content: center; justify-items: center; gap: 6px; width: 100%;
  border-radius: 12px; background: var(--accent-soft, #f3e9d6); border: 1px solid var(--line, #e2dbcf);
  color: var(--accent-text, #7a5f33); font: 500 .78rem/1.2 var(--font-body, system-ui, sans-serif); text-align: center; overflow: hidden; }
.dm-host svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.dm-host.dm-round { border-radius: 50%; }
.dm-ornament { display: block; width: 150px; max-width: 70%; margin: .5rem auto; color: var(--accent, #b08d57); }
.dm-ornament svg { display: block; width: 100%; height: auto; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; }
.dm-orn-crowns .dm-ornament svg path:nth-child(2), .dm-ornament[data-ornament="crowns"] svg path:nth-child(2) { fill: currentColor; }
.dm-ornament[data-ornament="sparkle"] svg path:nth-child(2) { fill: currentColor; }
.dm-ornament svg circle { fill: currentColor; stroke: none; }
.dm-ornament[data-ornament="rose"] svg circle { fill: none; stroke: currentColor; }
.dm-ornament[data-ornament="rule"] svg rect { fill: currentColor; stroke: none; }
.dm-logo { display: inline-flex; align-items: center; gap: .5rem; color: var(--ink, #13294b); }
.dm-logo svg { width: 40px; height: 40px; fill: none; stroke-width: 6; stroke-linecap: round; }
.dm-logo .w1, .dm-logo .w2 { stroke: var(--ink, #13294b); }
.dm-logo .w3 { stroke: var(--accent, #1c8c84); }
.dm-logo-name { font: 700 .95rem/1 var(--font-display, sans-serif); letter-spacing: .02em; }
.dm-logo-sm svg { width: 30px; height: 30px; }
.dm-logo-sm .dm-logo-name { display: none; }
.dm-logo-lg { flex-direction: column; margin-bottom: .6rem; }
.dm-logo-lg svg { width: 64px; height: 64px; }
.dm-cam { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }

/* the slim demo banner */
.dm-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 10px;
  padding: 6px var(--mv-gutter, 16px); background: var(--ink, #1f2a44); color: var(--bg, #fff); font: 400 .78rem/1.3 var(--font-body, system-ui); }
.dm-banner p { margin: 0; }
.dm-banner-links { display: flex; gap: 12px; }
.dm-banner a { display: inline-flex; align-items: center; min-height: 32px; color: inherit; font-weight: 600; text-underline-offset: 3px; }

/* ---------------------------------------------------------------- the app */
body.dm { padding-bottom: calc(var(--mv-tabbar) + 8px + env(safe-area-inset-bottom)); }
.dm-top { position: sticky; top: 0; z-index: 7; }
.dm-top .mv-top { position: static; padding-top: 10px; }
.dm-head-id { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.dm-head-id .mv-title { min-width: 0; }
.dm-head-icon { width: 36px; height: 36px; border-radius: 9px; flex: none; }
/* the whole name, never "…" (2026-10-07): it wraps to a second line, and a long one (over 24
   characters, the template's .dm-head-long) is set smaller so 40 characters fit in two lines at 360px */
.dm-head-name { margin: 0; font: 500 1.1rem/1.15 var(--font-display, Georgia, serif); overflow-wrap: anywhere; text-wrap: balance; }
.dm-head-name.dm-head-long { font-size: .95rem; }
.dm-main { padding-top: 0; }
.dm-tab > h2 { margin-bottom: .6rem; }

.dm-hero { position: relative; margin: 14px 0 0; text-align: center; }
.dm-hero-photo { aspect-ratio: 4 / 3 !important; border-radius: var(--mv-radius, 14px); }
.dm-hero-text { position: relative; margin: -36px 12px 0; padding: 18px 16px 16px; border-radius: var(--mv-radius, 14px);
  background: var(--bg, #fff); box-shadow: 0 12px 28px -18px rgba(0, 0, 0, .35); }
.dm-name { font-size: 1.9rem; }
.dm-date { margin: .2rem 0 .6rem; font-size: .88rem; color: var(--muted, #6b6b6b); }
.dm-counter { margin: 0; font-size: .95rem; }
.dm-counter strong { display: block; font: 500 1.7rem/1.1 var(--font-display, Georgia, serif); color: var(--accent-text, #7a5f33); }
.dm-counter-sub { display: block; margin-top: .2rem; font-size: .82rem; color: var(--muted, #6b6b6b); }
.dm-age { position: absolute; top: -26px; right: 12px; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%;
  background: var(--accent, #c2185b); color: var(--on-accent, #fff); font: 700 1.5rem/1 var(--font-display, serif);
  box-shadow: 0 0 0 4px var(--bg, #fff), 0 8px 18px -8px rgba(0, 0, 0, .5); }
.dm-age-sm { position: static; width: 40px; height: 40px; font-size: 1.1rem; box-shadow: none; }
.dm-stats { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; }
.dm-stats li { padding: 10px 4px; border-radius: 12px; background: var(--surface, #fff); border: 1px solid var(--line, #e2dbcf); }
.dm-stats strong { display: block; font: 600 1.25rem/1.1 var(--font-display, sans-serif); color: var(--accent-text, #1c8c84); }
.dm-stats span { font-size: .72rem; color: var(--muted, #6b6b6b); }
.dm-quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 16px 0; }
.dm-quick-link { display: grid; justify-items: center; align-content: center; gap: 4px; min-height: 72px; padding: 8px 4px; border-radius: 12px;
  background: var(--surface, #fff); border: 1px solid var(--line, #e2dbcf); color: inherit; font-size: .76rem; text-align: center; text-decoration: none; }
.dm-quick-link svg, .dm-more-tab svg { width: 22px; height: 22px; fill: none; stroke: var(--accent-text, #7a5f33); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.dm-otd-card { text-align: center; }
.dm-otd-card p { margin: 0 0 .8rem; }

/* the album: tiles of different shapes, like a real album */
.dm-grid { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 52px; grid-auto-flow: row dense; gap: 4px; }
.dm-tile { position: relative; grid-row: span 2; }
.dm-portrait { grid-row: span 3; }
.dm-landscape { grid-column: span 2; grid-row: span 2; }
.dm-tile[hidden] { display: none; }
.dm-tile-open { display: block; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 6px; overflow: hidden; cursor: zoom-in; background: none; font: inherit; }
.dm-shot { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 1px; width: 100%; height: 100%;
  padding: 7px 7px 6px; background: var(--t-bg, #e9e2d4); color: var(--t-ink, #333); text-align: left; border-radius: inherit;
  background-image: radial-gradient(120% 90% at 85% 10%, rgba(255, 255, 255, .28), transparent 60%); }
.dm-shot .dm-cam { position: absolute; top: 6px; left: 6px; padding: 3px; width: 22px; height: 22px; border-radius: 50%; background: rgba(255, 255, 255, .5); stroke: currentColor; }
.dm-shot-who { font-size: .68rem; line-height: 1.2; font-weight: 600; padding-right: 26px; }
.dm-shot-time { font-size: .64rem; opacity: .8; }
.dm-tile .mv-heart { right: 0; bottom: 0; }
.dm-off-inline { white-space: nowrap; }

/* videos */
.dm-allowance { margin: 0 0 1rem; padding: 12px 14px; border-radius: 12px; background: var(--surface, #fff); border: 1px solid var(--line, #e2dbcf); }
.dm-allowance p { margin: 0 0 .4rem; font-size: .9rem; font-weight: 500; }
.dm-videos { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.dm-video-tools { display: flex; gap: 8px; margin-top: 8px; }  /* the hosts': Approve / Show / Hide (2026-10-16) */
.dm-poster { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; border-radius: var(--mv-radius, 14px);
  overflow: hidden; cursor: pointer; color: var(--on-accent, #fff); font: inherit;
  background: linear-gradient(150deg, var(--accent, #b08d57), var(--seal, #6b5332)); }
.dm-poster .dm-ornament { position: absolute; top: 12px; left: 50%; width: 110px; margin: 0; transform: translateX(-50%); color: currentColor; opacity: .55; }
.dm-poster-tag { position: absolute; top: 10px; left: 10px; padding: 2px 8px; border-radius: 999px; background: rgba(0, 0, 0, .28); color: #fff; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; }
.dm-play { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: rgba(255, 255, 255, .92); box-shadow: 0 6px 18px rgba(0, 0, 0, .3); }
.dm-play svg { width: 26px; height: 26px; margin-left: 3px; fill: #1a1a1a; }
.dm-play-sm { width: 38px; height: 38px; }
.dm-play-sm svg { width: 18px; height: 18px; }
.dm-poster-title { position: absolute; left: 12px; bottom: 10px; right: 64px; font: 500 1rem/1.25 var(--font-display, Georgia, serif); text-align: left; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .35); }
.dm-duration { position: absolute; right: 10px; bottom: 10px; padding: 2px 7px; border-radius: 6px; background: rgba(0, 0, 0, .55); color: #fff; font-size: .74rem; }
.dm-clips { list-style: none; margin: 0; padding: 0 0 4px; display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; }
.dm-clips li { flex: none; width: 40%; max-width: 160px; scroll-snap-align: start; }
.dm-clip { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 9 / 14; padding: 8px; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--accent-soft, #f3e9d6); color: var(--accent-text, #7a5f33); font: inherit; }
.dm-clip .dm-cam { position: absolute; top: 8px; left: 8px; }
.dm-clip-title { position: absolute; left: 8px; right: 8px; bottom: 30px; font-size: .74rem; font-weight: 600; text-align: left; }
.dm-clip .dm-duration { bottom: 8px; right: 8px; }
.dm-off { margin-top: 1rem; }
.dm-off .mv-note, p.dm-off { margin-bottom: 0; }

/* story, vows, timeline */
.dm-timeline { list-style: none; margin: 0; padding: 0; }
.dm-timeline li { position: relative; padding: 0 0 1.4rem 1.2rem; border-left: 1px solid var(--line, #e2dbcf); }
.dm-timeline li::before { content: ""; position: absolute; left: -5px; top: .35rem; width: 9px; height: 9px; border-radius: 50%; background: var(--accent, #b08d57); }
.dm-timeline .dm-host { margin-bottom: .8rem; }
.dm-timeline h3 { font-size: 1.15rem; margin: .1rem 0 .3rem; }
.dm-timeline p { margin: 0; }
.dm-when { margin: 0; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-text, #7a5f33); }
.dm-vow p { font-family: var(--font-display, Georgia, serif); font-size: 1.05rem; }
.dm-wishes li p { font-family: var(--font-display, Georgia, serif); font-size: 1.02rem; }

/* kids: growing up */
.dm-years { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.dm-year { position: relative; padding: 14px; border-radius: var(--mv-radius, 14px); background: var(--surface, #fff); border: 1px solid var(--line, #e2dbcf); }
.dm-year .dm-age { position: absolute; top: 10px; right: 10px; z-index: 1; }
.dm-year .dm-host { margin-bottom: .7rem; }
.dm-year h3 { margin: .1rem 0 .3rem; font-size: 1.15rem; }
.dm-year p { margin: 0; }
.dm-year-next { border-style: dashed; background: transparent; }
.dm-year-next .dm-age { background: var(--accent-soft, #fbd9e5); color: var(--accent-text, #c2185b); }
.dm-year-next .mv-btn { margin-top: .6rem; }

/* debut: eighteen */
.dm-eighteen { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dm-eighteen li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--surface, #fff); border: 1px solid var(--line, #e2dbcf); }
.dm-eighteen p { margin: .15rem 0 0; font-size: .9rem; color: var(--muted, #6b6b6b); }
.dm-n { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft, #f6d9cf);
  color: var(--accent-text, #8a5a48); font: 600 .85rem/1 var(--font-display, serif); }

/* anniversary: then & now */
.dm-pairs { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.dm-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dm-pair figure { margin: 0; }
.dm-pair figcaption { margin-top: .35rem; font-size: .85rem; }
.dm-pair figcaption .dm-when { display: block; }
.dm-pair figure:first-child .dm-host { filter: sepia(.35) saturate(.8); }

/* corporate */
.dm-awards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dm-awards h3 { margin: .1rem 0 0; font-size: 1rem; }
.dm-awards .dm-host { margin-bottom: .5rem; }
.dm-awards .mv-note { margin: 0; }
.dm-speakers { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 10px; }
.dm-speakers li { display: flex; align-items: center; gap: 12px; }
.dm-speakers .dm-host { width: 64px; flex: none; font-size: .6rem; }
.dm-speakers .dm-host svg { width: 18px; height: 18px; }
.dm-speakers span { display: block; font-size: .85rem; color: var(--muted, #6b6b6b); }
.dm-teams { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dm-teams p { margin: .35rem 0 0; font-weight: 500; }
.dm-thanks { text-align: center; padding: 18px 0; }
.dm-thanks-text { font: 500 1.3rem/1.4 var(--font-display, sans-serif); }

/* the bottom bar: five, the rest in More */
.dm-tabs { grid-template-columns: repeat(5, 1fr); }
.dm-tabs .mv-tab-link span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; padding: 0 2px; }
.dm-more-link { border: 0; background: none; font: inherit; font-size: .72rem; cursor: pointer; }
.dm-sheet { max-height: 88vh; overflow-y: auto; }
.dm-more-tabs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dm-more-tab { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line, #e2dbcf); color: inherit; text-decoration: none; font-size: .9rem; }
.dm-offlist { display: grid; gap: .4rem; margin-top: .4rem; padding-top: .8rem; border-top: 1px solid var(--line, #e2dbcf); }
.dm-offlist .mv-note { margin: 0; }
.dm-sheet .mv-link { display: inline-flex; align-items: center; min-height: 44px; }

/* the viewer, the player, the notification */
.dm-viewer-photo { display: grid; place-content: center; justify-items: center; gap: 6px; width: 100%; height: calc(100% - 72px - env(safe-area-inset-bottom));
  background: var(--t-bg, #333); color: var(--t-ink, #fff); text-align: center; transition: background-color var(--m-base, 320ms) ease; }
.dm-viewer-photo .dm-cam { width: 40px; height: 40px; }
.dm-viewer-who { margin: 0; font: 500 1.4rem/1.3 var(--font-display, Georgia, serif); }
.dm-viewer-time { margin: 0; opacity: .8; }
.dm-player { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #000; color: #fff; }
.dm-player[open] { display: grid; grid-template-rows: 1fr auto auto; }
.dm-player::backdrop { background: #000; }
.dm-player video { width: 100%; height: 100%; min-height: 0; object-fit: contain; background: #000; }
.dm-player-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 8px var(--mv-gutter, 16px); }
.dm-player-bar p { margin: 0; font-size: .95rem; }
.dm-player-note { margin: 0; padding: 0 var(--mv-gutter, 16px) calc(14px + env(safe-area-inset-bottom)); font-size: .8rem; opacity: .7; }
.dm-notify { width: min(100vw, 420px); max-height: 100vh; margin: auto; padding: 0 0 18px; border: 0; border-radius: 20px; background: var(--bg, #fff); color: inherit; overflow: hidden; }
.dm-notify::backdrop { background: rgba(0, 0, 0, .55); }
.dm-lock { padding: 34px 14px 26px; text-align: center; color: #fff;
  background: linear-gradient(170deg, var(--seal, #4a3a22), var(--accent, #b08d57)); }
.dm-lock-time { margin: 0; font: 300 3.4rem/1 system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: -.02em; }
.dm-lock-date { margin: .3rem 0 1.4rem; font: 500 .95rem system-ui, -apple-system, "Segoe UI", sans-serif; }
.dm-notification { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 18px; text-align: left;
  background: rgba(255, 255, 255, .86); color: #111; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .5); }
.dm-notification img { border-radius: 9px; flex: none; }
.dm-notification p { margin: 0; }
.dm-notification-app { font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: #555; display: flex; justify-content: space-between; }
.dm-notification-app span { text-transform: none; }
.dm-notification-title { font-weight: 600; font-size: .95rem; }
.dm-notification-body { font-size: .9rem; }
.dm-notify > .mv-note { margin: 14px 18px 10px; }
.dm-notify-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px; }

/* the opening: this app's motif, once per visit */
.dm-opening { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; overflow: hidden; pointer-events: auto; }
.dm-opening-a, .dm-opening-b { position: absolute; top: 0; bottom: 0; width: 50.5%; background: var(--accent, #b08d57); }
.dm-opening-a { left: 0; } .dm-opening-b { right: 0; }
.dm-opening-mark { position: relative; display: grid; justify-items: center; gap: 12px; color: var(--on-accent, #fff); font: 500 1.3rem var(--font-display, Georgia, serif); text-align: center; padding: 0 24px; }
.dm-opening-mark img { border-radius: 22px; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .5); }
.dm-opening.is-done { display: none; }
/* while its fonts load (app.html): the app waits behind the opening, and the opening's words wait too */
.mv-fw body > *:not(.dm-opening):not(script) { display: none !important; }
.mv-fw .dm-opening-mark, .mv-fw .dm-env-seal span { visibility: hidden; }
.dm-opening.is-going .dm-opening-mark { animation: dm-mark-out var(--m-slow, 600ms) var(--e-exit, ease-in) forwards; }
.dm-opening--seal .dm-opening-a, .dm-opening--seal .dm-opening-b { background: var(--bg, #0e2a22); }
.dm-opening--seal .dm-opening-mark { color: var(--ink, #f4ecd8); }
.dm-opening--seal.is-going .dm-opening-a, .dm-opening--fade.is-going .dm-opening-a, .dm-opening--rise.is-going .dm-opening-a,
.dm-opening--seal.is-going .dm-opening-b, .dm-opening--fade.is-going .dm-opening-b, .dm-opening--rise.is-going .dm-opening-b { animation: dm-fade var(--m-slow, 600ms) ease 300ms forwards; }
.dm-opening--gates.is-going .dm-opening-a, .dm-opening--curtains.is-going .dm-opening-a { animation: dm-left 900ms cubic-bezier(.6, 0, .3, 1) 250ms forwards; }
.dm-opening--gates.is-going .dm-opening-b, .dm-opening--curtains.is-going .dm-opening-b { animation: dm-right 900ms cubic-bezier(.6, 0, .3, 1) 250ms forwards; }
.dm-opening--gates .dm-opening-a { border-right: 3px solid #f6d77a; } .dm-opening--gates .dm-opening-b { border-left: 3px solid #f6d77a; }
.dm-opening--curtains .dm-opening-a, .dm-opening--curtains .dm-opening-b {
  background: repeating-linear-gradient(90deg, var(--accent, #c3927f) 0 18px, color-mix(in srgb, var(--accent, #c3927f) 82%, #000) 18px 36px); }
.dm-opening--book .dm-opening-a { width: 100%; transform-origin: left center; }
.dm-opening--book .dm-opening-b { display: none; }
.dm-opening--book.is-going .dm-opening-a { animation: dm-book 1000ms cubic-bezier(.5, 0, .3, 1) 250ms forwards; }
.dm-opening--fade .dm-opening-a, .dm-opening--fade .dm-opening-b { background: var(--ink, #13294b); }
.dm-opening--rise.is-going .dm-opening-mark { animation: dm-rise var(--m-slow, 600ms) ease forwards; }
@keyframes dm-mark-out { to { opacity: 0; transform: scale(.92); } }
@keyframes dm-rise { to { opacity: 0; transform: translateY(-30px); } }
@keyframes dm-fade { to { opacity: 0; } }
@keyframes dm-left { to { transform: translateX(-102%); } }
@keyframes dm-right { to { transform: translateX(102%); } }
@keyframes dm-book { to { transform: perspective(1200px) rotateY(-100deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .dm-opening { display: none; } }

/* each app's own character */
.dm-wedding .dm-name, .dm-wedding .dm-head-name { font-family: var(--font-script); font-size: 2.3rem; font-weight: 400; }
.dm-wedding .dm-head-name { font-size: 1.5rem; }
.dm-wedding .dm-head-name.dm-head-long { font-size: 1.2rem; }
.dm-birthday .dm-hero-text { border-radius: 26px; }
.dm-birthday .dm-name { letter-spacing: .04em; }
.dm-birthday .mv-btn, .dm-birthday .dm-quick-link { border-radius: 18px; }
.dm-debut .dm-name { font-style: italic; }
.dm-anniversary .dm-name { font-weight: 400; letter-spacing: .02em; }
.dm-corporate .dm-name { font-weight: 700; font-size: 1.6rem; letter-spacing: -.01em; }
.dm-corporate .mv-eyebrow { letter-spacing: .12em; }
.dm-corporate .dm-hero-text, .dm-corporate .dm-host, .dm-corporate .mv-card, .dm-corporate .dm-poster { border-radius: 6px; }
.dm-corporate .mv-btn { border-radius: 6px; }
.dm-celebration .dm-name { font-size: 1.8rem; }

/* desktop: the app in a phone-width column, the QR code beside it */
.dm-desk { display: none; }
@media (min-width: 960px) {
  body.dm { max-width: 460px; margin: 0 auto; box-shadow: 0 0 0 1px var(--line, #e2dbcf), 0 30px 80px -40px rgba(0, 0, 0, .45); }
  html:has(body.dm) { background: color-mix(in srgb, var(--bg, #fff) 70%, #888); }
  body.dm .mv-tabs { left: 50%; right: auto; width: 460px; transform: translateX(-50%); }
  .dm-desk { position: fixed; top: 120px; left: calc(50% + 260px); display: block; width: 220px; padding: 18px; border-radius: 16px;
    background: var(--surface, #fff); border: 1px solid var(--line, #e2dbcf); text-align: center; }
  .dm-desk p { margin: .5rem 0 0; font-size: .9rem; }
}
.dm-qr svg { display: block; width: 100%; height: auto; background: #fff; border-radius: 8px; }
.dm-qr-inline { width: 180px; margin: .4rem auto .8rem; }

/* ---------------------------------------------------------------- phone mockups (site pages) */
.dm-picker { list-style: none; margin: 24px 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 36px 24px; }
.dm-picker-cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 12px 0 56px; }
.dm-phone-card { display: grid; justify-items: center; gap: 10px; color: inherit; text-decoration: none; text-align: center; }
.dm-phone { display: block; width: 220px; padding: 9px; border-radius: 36px; background: #15151a; box-shadow: 0 24px 48px -26px rgba(0, 0, 0, .55); }
.dm-phone-screen { position: relative; display: flex; flex-direction: column; align-items: center; height: 400px; padding: 0 12px; border-radius: 28px; overflow: hidden;
  background: var(--bg, #fff); color: var(--ink, #222); font-family: var(--font-body, system-ui, sans-serif); }
.dm-phone-status { display: flex; justify-content: space-between; align-items: center; width: 100%; height: 26px; font-size: .58rem; font-weight: 600; }
.dm-phone-notch { width: 62px; height: 16px; border-radius: 10px; background: #15151a; }
.dm-phone-head { display: flex; align-items: center; gap: 6px; width: 100%; padding: 4px 0 8px; font-size: .56rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-text, #7a5f33); }
.dm-phone-head img { border-radius: 6px; }
.dm-phone-head .dm-logo-sm svg { width: 22px; height: 22px; }
.dm-phone-head .dm-logo-name { display: none; }
.dm-phone-hero { display: block; width: 100%; flex: 0 1 auto; min-height: 0; overflow: hidden; border-radius: 10px; }
.dm-phone-photo { display: block; width: 100%; aspect-ratio: 5 / 4; object-fit: cover; }
.dm-phone-hero .dm-host { font-size: .62rem; }
.dm-phone-name { margin-top: 10px; font: 500 1.25rem/1.15 var(--font-display, Georgia, serif); }
.dm-phone .dm-ornament { width: 96px; margin: 6px auto; }
.dm-phone-date { font-size: .62rem; color: var(--muted, #6b6b6b); }
.dm-phone-count { margin-top: 8px; font-size: .62rem; }
.dm-phone-count strong { display: block; font: 500 1rem/1.1 var(--font-display, Georgia, serif); color: var(--accent-text, #7a5f33); }
/* the menu sits in the screen's flow, last: everything above it stays above it at every size */
.dm-phone-screen > :not(.dm-phone-tabs) { flex-shrink: 0; }
.dm-phone-screen > .dm-phone-hero { flex-shrink: 1; }
.dm-phone-tabs { position: relative; flex: none; margin: auto -12px 0; width: calc(100% + 24px); display: grid; grid-template-columns: repeat(5, 1fr); padding: 8px 6px 12px;
  background: var(--surface, #fff); border-top: 1px solid var(--line, #e2dbcf); }
.dm-phone-tabs svg { width: 16px; height: 16px; margin: 0 auto; display: block; fill: none; stroke: var(--muted, #888); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dm-phone-tabs span:first-child svg { stroke: var(--accent-text, #7a5f33); }
.dm-wedding .dm-phone-name { font-family: var(--font-script); font-size: 1.6rem; font-weight: 400; }
.dm-debut .dm-phone-name { font-style: italic; }
.dm-corporate .dm-phone-name { font-weight: 700; }
.dm-homeicon { display: grid; justify-items: center; gap: 4px; }
.dm-homeicon img { width: 60px; height: 60px; border-radius: 14px; box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .5); }
.dm-homeicon-label { font: 500 .78rem/1.2 system-ui, -apple-system, "Segoe UI", sans-serif; }
.dm-phone-caption { display: grid; gap: 2px; max-width: 240px; }
.dm-phone-caption span { font-size: .88rem; opacity: .75; }
.dm-phone-card.dm-sm .dm-phone { width: 170px; padding: 7px; border-radius: 28px; }
.dm-phone-card.dm-sm .dm-phone-screen { height: 310px; border-radius: 22px; padding: 0 9px; }
.dm-phone-card.dm-sm .dm-phone-tabs { margin: auto -9px 0; width: calc(100% + 18px); }
.dm-phone-card.dm-sm .dm-phone-name { font-size: 1rem; }
.dm-phone-card.dm-sm.dm-wedding .dm-phone-name, .dm-phone-card.dm-sm .dm-wedding .dm-phone-name { font-size: 1.3rem; }

/* the homepage row and the /samples strip: phones with their home-screen icons */
.dm-phone-card.dm-sm .dm-phone-caption { display: none; }
.dm-row { list-style: none; margin: 18px 0 8px; padding: 0 0 12px; display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; }
.dm-row > li { flex: none; scroll-snap-align: center; }
@media (min-width: 1100px) { .dm-row { justify-content: center; overflow: visible; } }
.dm-strip-samples { margin: 8px 0 28px; padding: 18px 0 4px; border-bottom: 1px solid rgba(0, 0, 0, .08); }
.dm-strip-samples h2 { margin: 0 0 .3rem; }

/* ---------------------------------------------------------------- real apps: photos the hosts added, Edit mode */
.mv-host-img { display: block; width: 100%; object-fit: cover; border-radius: 12px; background: var(--accent-soft, #f3e9d6); }
.dm-hero-photo.mv-host-img { aspect-ratio: 4 / 3; border-radius: var(--mv-radius, 14px); }
.dm-hero-plain .dm-hero-text { margin-top: 14px; }
.dm-logo-img { display: block; max-width: 140px; max-height: 64px; margin: 0 auto .6rem; object-fit: contain; }
.dm-head-icon[data-logo] { object-fit: contain; background: #fff; }
.dm-tile-open img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dm-strip img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }
.dm-viewer-img { width: 100%; height: calc(100% - 72px - env(safe-area-inset-bottom)); object-fit: contain; }
.dm-rel { font-size: .82rem; color: var(--muted, #6b6b6b); }
.dm-eighteen-photo { flex: none; width: 52px; border-radius: 50%; }
.dm-eighteen .dm-host.dm-eighteen-photo { width: 52px; font-size: .5rem; }
.dm-eighteen .dm-host.dm-eighteen-photo svg { width: 16px; height: 16px; }
.dm-pair { grid-template-areas: "a b" "c c"; }
.dm-pair-caption { grid-column: 1 / -1; margin: 0; font-size: .9rem; }
.dm-year-more { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: -.3rem 0 .7rem; }
.is-empty .mv-empty { text-align: left; padding: 1rem 0; }

.mv-editbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px var(--mv-gutter, 16px);
  background: var(--accent-soft, #f3e9d6); color: var(--ink, #222); font-size: .82rem; }
.mv-editbar p { margin: 0; flex: 1; }
.mv-editbar-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border: 1px solid var(--accent-text, #7a5f33);
  border-radius: 999px; background: var(--bg, #fff); color: var(--accent-text, #7a5f33); font: 600 .8rem var(--font-body, system-ui); text-decoration: none; cursor: pointer; }
.mv-edit, .mv-edit-list { margin: 14px 0; padding: 14px; border: 1px dashed var(--accent-text, #7a5f33); border-radius: 12px; background: var(--surface, #fff); }
.mv-edit-note p { margin: 0 0 .6rem; }
.mv-edit-rows { list-style: none; margin: 0 0 .8rem; padding: 0; display: grid; gap: 6px; }
.mv-edit-rows details { border: 1px solid var(--line, #e2dbcf); border-radius: 10px; padding: 0 10px; }
.mv-edit-rows summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 500; }
.mv-edit-row-actions { display: flex; gap: 6px; padding: 8px 0 10px; }
.mv-btn-sm { min-height: 44px; padding: 0 .9rem; }
.mv-edit-add > summary { list-style: none; width: fit-content; }
.mv-edit-add > summary::-webkit-details-marker { display: none; }
.mv-edit-add[open] > summary { margin-bottom: .6rem; }
.mv-field { display: grid; gap: .3rem; font-size: .88rem; }
.mv-field input, .mv-field textarea, .mv-field select { width: 100%; min-height: 44px; padding: .55rem .75rem; border: 1px solid var(--line, #e2dbcf);
  border-radius: 10px; background: var(--bg, #fff); color: inherit; font: inherit; }
.mv-hint { font-size: .78rem; color: var(--muted, #6b6b6b); font-weight: 400; }
.mv-check { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; font-size: .88rem; }
.mv-photo-field { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.mv-photo-field img { border-radius: 8px; object-fit: cover; }
.mv-photo-field .mv-field { flex: 1; min-width: 12rem; }
.mv-tab-settings { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.mv-tab-settings li { display: flex; justify-content: space-between; align-items: center; gap: 8px; border-bottom: 1px solid var(--line, #e2dbcf); }
.mv-order { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; }
.mv-order input { width: 4rem; min-height: 40px; padding: 0 .5rem; border: 1px solid var(--line, #e2dbcf); border-radius: 8px; font: inherit; }
.mv-pending-actions { display: flex; gap: 6px; }

/* the Studio's Memories page (a dashboard page: memories.css isn't loaded there) */
.mv-editor { --accent-text: #6b5332; --line: #e2dbcf; --surface: #fff; --bg: #fff; --muted: #6b6b6b; max-width: 46rem; }
.mv-editor-sec { margin: 1.4rem 0; }
.mv-editor .mv-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 1.1rem;
  border: 1px solid var(--accent-text); border-radius: 999px; background: var(--accent-text); color: #fff; font: inherit; font-weight: 500; cursor: pointer; text-decoration: none; }
.mv-editor .mv-btn-ghost { background: transparent; color: var(--accent-text); }
.mv-editor .mv-btn[disabled] { opacity: .5; }
.mv-editor .mv-form { display: grid; gap: .7rem; }
.mv-editor .mv-note { color: var(--muted); font-size: .9rem; }
.mv-editor .mv-eyebrow { margin: 0 0 .3rem; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--accent-text); }
.mv-editor .mv-link { color: var(--accent-text); }
.mv-form label.mv-check, .mv-form .mv-check { display: inline-flex; grid-template-columns: none; align-items: center; gap: .5rem; }
.mv-form input[type="checkbox"], .mv-check input[type="checkbox"] { width: 22px; height: 22px; min-height: 0; padding: 0; flex: none; accent-color: var(--accent-text, #7a5f33); }
.mv-form label.mv-order { display: inline-flex; align-items: center; gap: .4rem; }
.mv-form .mv-order input { width: 4.2rem; min-height: 40px; }
.mv-tab-settings li { padding: 2px 0; }

/* The e7ent wears its invitation (app_style.py): its envelope opening, buttons, frames, paper */
.dm-opening--envelope .dm-opening-a, .dm-opening--envelope .dm-opening-b { background: var(--bg, #f6f0e6); }
.dm-env { position: relative; width: min(72vw, 300px); aspect-ratio: 3 / 2; }
.dm-env-body { position: absolute; inset: 0; background: var(--env-paper, #f4ecd8); border-radius: 6px;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .45); }
.dm-env-flap { position: absolute; left: 0; right: 0; top: 0; height: 58%; z-index: 2; transform-origin: top center;
  background: linear-gradient(to bottom right, transparent 49.5%, var(--env-liner, #d8c7a8) 50%) left / 50.5% 100% no-repeat,
              linear-gradient(to bottom left, transparent 49.5%, var(--env-liner, #d8c7a8) 50%) right / 50.5% 100% no-repeat; }
.dm-env-seal { position: absolute; left: 50%; top: 58%; z-index: 3; width: 64px; height: 64px; margin: -32px 0 0 -32px;
  display: grid; place-items: center; border-radius: 50%; background: var(--seal, #8a6a35); color: #fff;
  box-shadow: inset 0 0 0 4px color-mix(in srgb, var(--seal, #8a6a35) 70%, #000), 0 4px 10px rgba(0, 0, 0, .35);
  font: 600 1.15rem var(--font-display, Georgia, serif); letter-spacing: .04em; }
.dm-env-seal svg { width: 70%; height: 70%; color: #fff; fill: currentColor; }
.dm-env-name { position: absolute; bottom: 18%; color: var(--ink, #2a2a2a); }
.dm-opening--envelope.is-going .dm-env-seal { animation: dm-seal-off 350ms ease forwards; }
.dm-opening--envelope.is-going .dm-env-flap { animation: dm-flap 450ms ease 250ms forwards; }
.dm-opening--envelope.is-going .dm-env, .dm-opening--envelope.is-going .dm-env-name { animation: dm-fade 400ms ease 700ms forwards; }
.dm-opening--envelope.is-going .dm-opening-a, .dm-opening--envelope.is-going .dm-opening-b { animation: dm-fade 400ms ease 750ms forwards; }
@keyframes dm-seal-off { to { transform: scale(.6); opacity: 0; } }
@keyframes dm-flap { to { transform: perspective(600px) rotateX(180deg); } }
.dm-opening.is-fade { animation: dm-fade 400ms ease forwards; }
@media (prefers-reduced-motion: reduce) { .dm-opening:not(.is-fade) { display: none; } .dm-opening.is-fade { display: grid; } }
.mv[data-button="pill"] .mv-btn { border-radius: 999px; }
.mv[data-button="square"] .mv-btn { border-radius: 3px; }
.mv[data-button="outline"] .mv-btn { background: transparent; color: var(--accent-text); border: 1.5px solid currentColor; }
.mv[data-frame="polaroid"] .mv-tile img, .mv[data-frame="polaroid"] .dm-host { padding: 6px 6px 16px; background: #fff;
  box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .35); border-radius: 2px; }
.mv[data-frame="arch"] .dm-hero-photo, .mv[data-frame="arch"] .dm-phone-hero .dm-host { border-radius: 999px 999px 10px 10px; }
.mv[data-paper] { background-image: radial-gradient(rgba(0, 0, 0, .028) 1px, transparent 1px); background-size: 4px 4px; }
.dm-ornament .dm-motif { width: 160px; height: 40px; color: var(--accent-text); fill: none; stroke: currentColor; }

/* ---------- Template-first (2026-10-08): each template's app wears its picture style (data-frame) and
   opens with a short version of its invitation's opening (.dm-opening--<key>). Transform and opacity only. */
.mv[data-frame="ruled"] .mv-tile img, .mv[data-frame="ruled"] .dm-host, .mv[data-frame="ruled"] .dm-hero-photo {
  border-radius: 0; box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px color-mix(in srgb, var(--accent) 60%, transparent); }
.mv[data-frame="oval"] .dm-hero-photo, .mv[data-frame="oval"] .dm-phone-hero .dm-host { border-radius: 50%; }
.mv[data-frame="oval"] .mv-tile img { border-radius: 46% / 40%; }
.mv[data-frame="bleed"] .mv-tile img, .mv[data-frame="bleed"] .dm-hero-photo, .mv[data-frame="bleed"] .dm-host { border-radius: 0; }
.mv[data-frame="capiz"] .dm-hero-photo, .mv[data-frame="capiz"] .dm-phone-hero .dm-host { border-radius: 999px 999px 6px 6px; }
.mv[data-frame="capiz"] .mv-tile img { border-radius: 40% 40% 4px 4px / 24% 24% 4px 4px; }
.mv[data-frame="scallop"] .mv-tile img, .mv[data-frame="scallop"] .dm-hero-photo {
  -webkit-mask: radial-gradient(circle at 6px 6px, transparent 4px, #000 4.5px) -6px -6px / 12px 12px,
                linear-gradient(#000, #000) 50% 50% / calc(100% - 12px) calc(100% - 12px) no-repeat;
  mask: radial-gradient(circle at 6px 6px, transparent 4px, #000 4.5px) -6px -6px / 12px 12px,
        linear-gradient(#000, #000) 50% 50% / calc(100% - 12px) calc(100% - 12px) no-repeat; }
.mv[data-frame="octagon"] .mv-tile img, .mv[data-frame="octagon"] .dm-hero-photo {
  border-radius: 0; clip-path: polygon(12% 0, 88% 0, 100% 12%, 100% 88%, 88% 100%, 12% 100%, 0 88%, 0 12%); }
.mv[data-frame="arch"] .mv-tile img { border-radius: 999px 999px 4px 4px; }
.mv[data-frame="pebble"] .mv-tile img, .mv[data-frame="pebble"] .dm-hero-photo { border-radius: 58% 42% 52% 48% / 46% 56% 44% 54%; }
.mv[data-frame="circle"] .mv-tile img, .mv[data-frame="circle"] .dm-hero-photo, .mv[data-frame="circle"] .dm-phone-hero .dm-host { border-radius: 50%; }

/* lattice (a capiz screen): two lattice panels slide apart */
.dm-opening--lattice .dm-opening-a, .dm-opening--lattice .dm-opening-b {
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 55%, transparent) 2px, transparent 2px) 0 0 / 28px 28px,
              linear-gradient(color-mix(in srgb, var(--accent) 55%, transparent) 2px, transparent 2px) 0 0 / 28px 28px, var(--bg, #fbf9f2); }
.dm-opening--lattice .dm-opening-mark { color: var(--ink); }
.dm-opening--lattice.is-going .dm-opening-a { animation: dm-left 900ms cubic-bezier(.6, 0, .3, 1) 250ms forwards; }
.dm-opening--lattice.is-going .dm-opening-b { animation: dm-right 900ms cubic-bezier(.6, 0, .3, 1) 250ms forwards; }
/* pocket (a kraft pocketfold): the card rises out, the pocket fades */
.dm-opening--pocket .dm-opening-a, .dm-opening--pocket .dm-opening-b { background: color-mix(in srgb, var(--accent) 35%, var(--bg)); }
.dm-opening--pocket .dm-opening-mark { color: var(--ink); }
.dm-opening--pocket.is-going .dm-opening-mark { animation: dm-rise 600ms cubic-bezier(.4, 0, .2, 1) 150ms forwards; }
.dm-opening--pocket.is-going .dm-opening-a, .dm-opening--pocket.is-going .dm-opening-b { animation: dm-fade 500ms ease 550ms forwards; }
/* polaroid: the picture develops (dark to light), then lifts away */
.dm-opening--polaroid .dm-opening-a, .dm-opening--polaroid .dm-opening-b { background: #1d1b19; }
.dm-opening--polaroid .dm-opening-mark { color: #fffdf8; }
.dm-opening--polaroid.is-going .dm-opening-a, .dm-opening--polaroid.is-going .dm-opening-b { animation: dm-fade 900ms ease 150ms forwards; }
.dm-opening--polaroid.is-going .dm-opening-mark { animation: dm-rise 700ms ease 500ms forwards; }
/* ribbon: a band across the middle slides off, the halves part */
.dm-opening--ribbon .dm-opening-a, .dm-opening--ribbon .dm-opening-b { background: var(--bg, #f6efe6); }
.dm-opening--ribbon .dm-opening-mark { color: var(--ink); }
.dm-opening--ribbon .dm-opening-mark::after { content: ""; position: absolute; left: -100vw; right: -100vw; top: 50%; height: 14px; margin-top: -7px;
  background: var(--accent); z-index: -1; }
.dm-opening--ribbon.is-going .dm-opening-mark { animation: dm-rise 500ms ease 100ms forwards; }
.dm-opening--ribbon.is-going .dm-opening-a { animation: dm-left 800ms cubic-bezier(.6, 0, .3, 1) 350ms forwards; }
.dm-opening--ribbon.is-going .dm-opening-b { animation: dm-right 800ms cubic-bezier(.6, 0, .3, 1) 350ms forwards; }
/* spotlight (a moonbeam): the night fades out from a bright centre */
.dm-opening--spotlight .dm-opening-a, .dm-opening--spotlight .dm-opening-b { background: var(--bg, #0f1730); }
.dm-opening--spotlight .dm-opening-mark { color: var(--ink); }
.dm-opening--spotlight .dm-opening-mark::before { content: ""; position: absolute; left: 50%; top: 50%; width: 320px; height: 320px; margin: -160px 0 0 -160px;
  border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 45%, transparent), transparent 70%); z-index: -1; }
.dm-opening--spotlight.is-going .dm-opening-mark::before { animation: dm-beam 900ms ease forwards; }
.dm-opening--spotlight.is-going .dm-opening-a, .dm-opening--spotlight.is-going .dm-opening-b { animation: dm-fade 700ms ease 500ms forwards; }
.dm-opening--spotlight.is-going .dm-opening-mark { animation: dm-mark-out 600ms ease 600ms forwards; }
@keyframes dm-beam { to { transform: scale(4); opacity: 0; } }
/* the ribbon band and the moonbeam sit just behind the name, above the two halves */
.dm-opening--ribbon .dm-opening-mark, .dm-opening--spotlight .dm-opening-mark { z-index: 1; isolation: isolate; }
