/* e7ents Memories app: phone-first, in the event's own colours (palette.derive
   sets --bg, --ink, --accent... on <body>) and fonts. */
*, *::before, *::after { box-sizing: border-box; }
:root { --mv-radius: 14px; --mv-gutter: 16px; --mv-tabbar: 64px; color-scheme: light; }
html { -webkit-text-size-adjust: 100%; }
body.mv { margin: 0; min-height: 100vh; background: var(--bg, #fbf8f1); color: var(--ink, #1f2a44);
  font: 400 16px/1.55 var(--font-body, system-ui, -apple-system, "Segoe UI", sans-serif); padding-bottom: calc(var(--mv-tabbar) + env(safe-area-inset-bottom)); }
h1, h2, h3 { font-family: var(--font-display, Georgia, serif); font-weight: 500; line-height: 1.2; margin: 0; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; } /* the scripts hide buttons and cards that set their own display */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mv-eyebrow { margin: 0 0 .2rem; font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--accent-text, #7a5f33); }
.mv-note { margin: .4rem 0 1rem; font-size: .9rem; color: var(--muted, #6b6b6b); }
.mv-link { color: var(--accent-text, #7a5f33); }
.mv-empty { padding: 2rem 0; text-align: center; color: var(--muted, #6b6b6b); }
.mv-alert { margin: .8rem 0 0; padding: .7rem .9rem; border-radius: 10px; background: var(--accent-soft, #f3e9d6); }

.mv-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: calc(14px + env(safe-area-inset-top)) var(--mv-gutter) 12px; background: color-mix(in srgb, var(--bg, #fff) 92%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line, #e2dbcf); }
.mv-top h1 { font-size: 1.5rem; }
.mv-date { margin: .1rem 0 0; font-size: .82rem; color: var(--muted, #6b6b6b); }
.mv-icon-btn { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; border: 0; border-radius: 50%;
  background: transparent; color: inherit; font-size: 1.6rem; cursor: pointer; text-decoration: none; }
.mv-icon-btn svg { width: 22px; height: 22px; fill: currentColor; }
.mv-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; padding: 0 1.2rem;
  border: 1px solid var(--accent-text, #7a5f33); border-radius: 999px; background: var(--accent-text, #7a5f33);
  color: var(--on-accent, #fff); font: 500 .92rem var(--font-body, system-ui); text-decoration: none; cursor: pointer; }
.mv-btn-ghost { background: transparent; color: var(--accent-text, #7a5f33); }
.mv-btn[disabled] { opacity: .5; cursor: default; }

.mv-today { margin: 14px var(--mv-gutter) 0; padding: 18px; border-radius: var(--mv-radius); text-align: center;
  background: linear-gradient(160deg, var(--accent-soft, #f3e9d6), var(--surface, #fff)); }
.mv-today h2 { font-size: 1.3rem; margin-bottom: .8rem; }

.mv-main { padding: 0 var(--mv-gutter); }
.mv-tab { padding: 18px 0 24px; }
.mv-tab > h2, .mv-bar h2 { font-size: 1.35rem; }
.mv-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; }
.mv-count { font: 400 .9rem var(--font-body, system-ui); color: var(--muted, #6b6b6b); }
.mv-tools { display: flex; gap: .5rem; align-items: center; }
.mv-select select { min-height: 44px; max-width: 46vw; padding: 0 .8rem; border: 1px solid var(--line, #e2dbcf); border-radius: 999px;
  background: var(--surface, #fff); color: inherit; font: inherit; font-size: .9rem; }

.mv-grid { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
@media (min-width: 640px) { .mv-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.mv-tile { position: relative; }
.mv-tile[hidden] { display: none; }
.mv-tile-open { display: block; width: 100%; padding: 0; border: 0; background: var(--line, #e2dbcf); cursor: zoom-in; border-radius: 6px; overflow: hidden; aspect-ratio: 1; }
.mv-tile img { width: 100%; height: 100%; object-fit: cover; } /* the tile is square before (or without) its picture */
.mv-heart { position: absolute; right: 2px; bottom: 2px; width: 40px; height: 40px; display: grid; place-items: center; border: 0;
  border-radius: 50%; background: transparent; cursor: pointer; }
.mv-heart svg { width: 22px; height: 22px; fill: rgba(0, 0, 0, .25); stroke: #fff; stroke-width: 1.6; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .35)); }
.mv-heart[aria-pressed="true"] svg { fill: #e0485e; stroke: #fff; }

.mv-videos { list-style: none; margin: .8rem 0 0; padding: 0; display: grid; gap: 1rem; }
.mv-video video { width: 100%; border-radius: var(--mv-radius); background: #000; aspect-ratio: 16 / 9; }
.mv-video-title { margin: .4rem 0 0; font-size: .9rem; }
.mv-card { margin-top: 1.2rem; padding: 16px; border: 1px solid var(--line, #e2dbcf); border-radius: var(--mv-radius); background: var(--surface, #fff); }
.mv-meter { display: grid; gap: .4rem; margin: 0 0 .8rem; font-size: .88rem; }
.mv-meter-bar { height: 6px; border-radius: 3px; background: var(--line, #e2dbcf); overflow: hidden; }
.mv-meter-bar i { display: block; height: 100%; background: var(--accent-text, #7a5f33); }
.mv-form { display: grid; gap: .7rem; }
.mv-form label { display: grid; gap: .3rem; font-size: .88rem; }
.mv-form input { min-height: 44px; padding: .6rem .8rem; border: 1px solid var(--line, #e2dbcf); border-radius: 10px; background: var(--bg, #fff); color: inherit; font: inherit; }

.mv-chapter { margin: 1.2rem 0; }
.mv-chapter h3 { font-size: 1.15rem; margin-bottom: .3rem; }
.mv-chapter p { margin: 0; }
.mv-sub { margin: 1.8rem 0 .6rem; font-size: 1.15rem; }
.mv-vow { margin: 0 0 1rem; padding: 14px 16px; border-left: 2px solid var(--accent, #b08d57); background: var(--surface, #fff); border-radius: 0 10px 10px 0; }
.mv-vow p { margin: 0; font-style: italic; }
.mv-vow footer { margin-top: .4rem; font-size: .85rem; color: var(--muted, #6b6b6b); }
.mv-wishes { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.mv-wishes li { padding: 12px 14px; border: 1px solid var(--line, #e2dbcf); border-radius: 12px; background: var(--surface, #fff); }
.mv-wishes p { margin: 0 0 .3rem; }
.mv-wishes span { font-size: .82rem; color: var(--muted, #6b6b6b); }

.mv-moment { position: relative; margin: 0; padding: 0 0 1.4rem 1.4rem; border-left: 1px solid var(--line, #e2dbcf); }
.mv-moment::before { content: ""; position: absolute; left: -5px; top: .35rem; width: 9px; height: 9px; border-radius: 50%; background: var(--accent, #b08d57); }
.mv-moment-time { margin: 0; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-text, #7a5f33); }
.mv-moment h3 { font-size: 1.1rem; margin: .1rem 0 .5rem; }
.mv-strip { list-style: none; margin: 0; padding: 0 0 .2rem; display: flex; gap: 4px; overflow-x: auto; scroll-snap-type: x mandatory; }
.mv-strip li { flex: none; width: 30%; scroll-snap-align: start; }
.mv-strip img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }
[data-tab="day"] { padding-left: 6px; }

.mv-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: grid; grid-template-columns: repeat(4, 1fr);
  min-height: var(--mv-tabbar); padding-bottom: env(safe-area-inset-bottom); background: var(--surface, #fff);
  border-top: 1px solid var(--line, #e2dbcf); }
.mv-tab-link { display: grid; justify-items: center; align-content: center; gap: 2px; min-height: 56px; color: var(--muted, #6b6b6b);
  font-size: .72rem; text-decoration: none; transition: color .2s ease; }
.mv-tab-link svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.mv-tab-link[aria-current="page"] { color: var(--accent-text, #7a5f33); }

.mv-viewer { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #0b0b0b; color: #fff; }
.mv-viewer::backdrop { background: #0b0b0b; }
.mv-viewer img { width: 100%; height: calc(100% - 72px - env(safe-area-inset-bottom)); object-fit: contain; }
.mv-viewer-bar { display: flex; justify-content: center; gap: .4rem; padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); }
.mv-viewer .mv-heart { position: static; }
.mv-sheet { width: min(100vw, 520px); margin: auto auto 0; padding: 22px var(--mv-gutter) calc(22px + env(safe-area-inset-bottom));
  border: 0; border-radius: 20px 20px 0 0; background: var(--bg, #fff); color: inherit; display: none; }
.mv-sheet[open] { display: grid; gap: .6rem; }
.mv-sheet::backdrop { background: rgba(0, 0, 0, .35); }

.mv-notice, .mv-install { max-width: 34rem; margin: 0 auto; padding: calc(40px + env(safe-area-inset-top)) var(--mv-gutter) 40px; text-align: center; }
.mv-notice h1, .mv-install h1 { font-size: 1.8rem; margin-bottom: .6rem; }
.mv-notice h2 { font-size: 1.25rem; margin: 1.2rem 0 .4rem; }
.mv-install .mv-card { text-align: left; }
.mv-install .mv-card h2 { font-size: 1.1rem; margin-bottom: .4rem; }
.mv-install-icon { margin: 1rem auto; border-radius: 22px; box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .45); }
.mv-steps { margin: .4rem 0 0; padding-left: 1.2rem; display: grid; gap: .7rem; }
.mv-illus { display: block; width: 40px; height: 40px; margin-top: .3rem; color: var(--accent-text, #7a5f33); }
.mv-people { list-style: none; margin: 1rem 0; padding: 0; display: grid; gap: .5rem; text-align: left; }
.mv-people li { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: 10px 12px; border: 1px solid var(--line, #e2dbcf); border-radius: 12px; }
.mv-people small { display: block; color: var(--muted, #6b6b6b); }
.mv-copy { width: 100%; min-height: 44px; padding: .6rem; border: 1px solid var(--line, #e2dbcf); border-radius: 10px; font: inherit; }
[data-platform][hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .mv-tab-link { transition: none; } }

/* the back arrow, top left on every inner screen (back.js, 2026-10-19) */
.e7-back-row { margin: 0 0 4px; text-align: left; }
.e7-back { display: inline-grid; place-items: center; width: 44px; height: 44px; margin-left: -10px; border-radius: 50%; color: inherit; }
.e7-back svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.e7-back:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
