/* Recuerdi · public example gallery (WED-233): the header (bar, style swatches, floating start button) and the
   guestbook tab. Colours come from the gallery theme ([data-theme] in viewer.css): --paper, --ink, --accent… derived
   from the theme's --brand-accent. Rule: no one-sided borders on rounded elements. */

/* ---- header A2 (WED-258, Strategie/demo-header-varianten.html): a slim bar on top, folding into a style chip on
   phones while scrolling down; the start button and the trial link float at the bottom. ---- */
.dm-bar { position: sticky; top: 0; z-index: 40; padding-top: env(safe-area-inset-top); background: color-mix(in oklab, var(--paper-2) 94%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--rule); color: var(--ink); font-family: var(--font-ui); }
.dm-bar__in { max-width: 1180px; margin: 0 auto; padding: 6px 16px 0; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "brand right" "sty sty"; align-items: center; column-gap: 10px; }
.dm-brand { grid-area: brand; display: flex; align-items: center; gap: 6px; min-height: 36px; min-width: 0; }
.dm-right { grid-area: right; display: flex; align-items: center; gap: 14px; justify-self: end; }
.dm-back { display: inline-flex; align-items: center; gap: 6px; margin-left: -6px; padding: 6px 8px 6px 6px; border-radius: 999px; color: var(--ink); text-decoration: none; -webkit-tap-highlight-color: transparent; transition: background-color .2s; }
.dm-back:hover { background: color-mix(in oklab, var(--ink) 7%, transparent); }
.dm-back__ic { width: 16px; height: 16px; flex: none; color: var(--ink-2); }
.dm-back__l { display: none; font: 500 13.5px/1 var(--font-ui); color: var(--ink-2); }
.dm-wm { font-family: "Fraunces", Georgia, serif; font-size: 18px; font-weight: 400; letter-spacing: -.02em; color: var(--ink); display: inline-flex; align-items: baseline; line-height: 1; }
.dm-wm i { font-style: italic; font-weight: 300; }
.dm-wm__dot { width: 5px; height: 5px; border-radius: 50%; background: var(--gv-orn); margin-left: 2px; display: inline-block; transform: translateY(-2px); }
.dm-tag { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 2px; border: 0; border-radius: 999px; background: none; color: var(--ink-3);
  font: 500 10.5px/1 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; white-space: nowrap; -webkit-tap-highlight-color: transparent; }
.dm-tag svg { width: 14px; height: 14px; opacity: .75; }

/* the style swatches: each style's real ornament on its own paper */
.dm-sty { grid-area: sty; display: flex; justify-content: space-between; padding: 6px 0 8px; max-height: 84px; overflow: hidden; transition: max-height .28s cubic-bezier(.2,.8,.2,1), opacity .2s, padding .28s; }
.dm-sw { --sw: 36px; display: inline-flex; flex-direction: column; align-items: center; gap: 4px; width: var(--sw-w, 52px); padding: 0; color: var(--ink-3); text-decoration: none;
  font: 500 10.5px/1.1 var(--font-ui); letter-spacing: .02em; -webkit-tap-highlight-color: transparent; }
.dm-sw__o { display: block; padding: 2px; border-radius: 50%; border: 1.5px solid transparent; transition: border-color .2s, transform .2s; }
.dm-sw__c { display: grid; place-items: center; width: var(--sw, 40px); height: var(--sw, 40px); border-radius: 50%; background: var(--paper); color: var(--gv-orn); box-shadow: inset 0 0 0 1px var(--rule); overflow: hidden; }
.dm-sw__c svg { display: block; width: 86%; height: 86%; margin: 0; }
.dm-sw__c--txt { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: calc(var(--sw, 40px) * .05); }
.dm-sw__c--txt svg { width: 58%; height: auto; }
.dm-sw__c .gv-mono { font-style: italic; font-size: 26px; font-weight: 400; fill: var(--ink); }
.dm-sw__c[data-theme="taupe"] .gv-mono { font-style: normal; font-size: 30px; fill: var(--gv-orn); }
.dm-mono { font-family: var(--gv-title-font); color: var(--ink); font-size: calc(var(--sw, 40px) * .3); line-height: 1; letter-spacing: .04em; white-space: nowrap; }
.dm-sw__c[data-theme="burdeos"] .dm-mono { text-transform: uppercase; font-weight: 500; letter-spacing: 0; }
.dm-amp { font-family: var(--gv-amp-font); font-style: italic; color: var(--gv-orn); font-size: .85em; padding: 0 .06em; }
.dm-sw:hover .dm-sw__o { transform: translateY(-1px); }
.dm-sw[aria-current="true"] { color: var(--ink); }
.dm-sw[aria-current="true"] .dm-sw__o { border-color: var(--ink); }

/* folded on phones: one chip "◯ Estilo · Name ▾" */
.dm-bar.is-collapsed .dm-sty { max-height: 0; opacity: 0; padding-top: 0; padding-bottom: 6px; }
.dm-chip { display: none; align-items: center; gap: 6px; height: 32px; padding: 0 10px 0 3px; border-radius: 999px; border: 1px solid var(--rule-strong); background: var(--paper);
  cursor: pointer; font: 500 12.5px/1 var(--font-ui); color: var(--ink); -webkit-tap-highlight-color: transparent; }
.dm-chip .dm-sw__c { --sw: 26px; }
.dm-chip small { color: var(--ink-3); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.dm-chev { width: 12px; height: 12px; color: var(--ink-3); }
.dm-bar.is-collapsed .dm-chip { display: inline-flex; }

/* "Ejemplo ⓘ": the whole note in a small window */
.dm-pop { position: fixed; z-index: 90; max-width: 300px; padding: 14px 16px; border-radius: 14px; background: var(--ivory); color: var(--ink); border: 1px solid var(--rule);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .35); font: 400 13.5px/1.45 var(--font-ui); text-wrap: pretty; }
.dm-pop b { display: block; font-weight: 600; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }

/* buttons and the trial link */
.dm-cta { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 22px; border-radius: 999px; border: 0; background: var(--accent); color: var(--accent-ink);
  font: 500 14.5px/1 var(--font-ui); letter-spacing: .01em; text-decoration: none; white-space: nowrap; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background-color .2s; }
.dm-cta:hover { background: var(--accent-hover); }
.dm-link { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--ink-2); font: 500 13.5px/1.3 var(--font-ui); cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--rule-strong); -webkit-tap-highlight-color: transparent; }
.dm-link[hidden] { display: none; }
.dm-link:hover { color: var(--ink); }
.dm-own-ic { width: 16px; height: 16px; flex: none; }
.dm-own { display: none; }
:is(.dm-cta, .dm-link, .dm-tag, .dm-sw, .dm-chip, .dm-back, .dm-hint a):focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* the floating plate at the bottom: start button and, where the trial is on, the link under it */
.dm-plate { position: fixed; z-index: 45; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 8px 8px 10px; border-radius: 26px;
  background: color-mix(in oklab, var(--ivory) 90%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 0 0 1px var(--rule), 0 16px 36px -18px rgba(0, 0, 0, .45); }
.dm-plate .dm-cta { width: 100%; height: 48px; }
.dm-plate .dm-link { font-size: 12.5px; }
.dm-plate .dm-link .dm-own-ic { width: 14px; height: 14px; }
.dm-plate:has(.dm-link[hidden]) { padding-bottom: 8px; }

/* the gallery under the bar */
.gv-body--demo { padding-bottom: calc(130px + env(safe-area-inset-bottom)); }
.gv-body--demo .gv-tabs { top: var(--dm-bar-h, 0px); }
.gv-body--demo .gv-back { display: none; }
.gv-body--demo .gv-head { padding-bottom: 22px; }
.dm-hint { margin: 10px 0 0; font: 400 13.5px/1.4 var(--font-ui); }
/* WED-396: clear air between "56 FOTOS" and "8 mensajes para los novios". trial.css also has a .dm-hint (the consent
   line of the trial sheet, margin-top −6px) and loads later, so the header's line needs the stronger selector. */
.gv-head .dm-hint { margin: 6px 0 0; }
.dm-hint a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--rule-strong); }
.dm-hint a:hover { color: var(--ink); }
.dm-foot { max-width: 560px; margin: 28px auto 0; padding: 0 var(--gutter, 16px); text-align: center; font: 400 12.5px/1.5 var(--font-ui); color: var(--ink-3); text-wrap: pretty; }

@media (min-width: 900px) {
  .dm-bar__in { grid-template-columns: 1fr auto 1fr; grid-template-areas: "brand sty right"; padding: 8px 28px; }
  .dm-wm { font-size: 20px; }
  .dm-back { gap: 7px; padding: 8px 12px 8px 8px; }
  .dm-back__l { display: inline; }
  .dm-sty { padding: 0; max-height: none; gap: 6px; }
  .dm-sw { --sw: 32px; --sw-w: 60px; }
  .dm-bar.is-collapsed .dm-sty { max-height: none; opacity: 1; padding: 0; }
  .dm-bar.is-collapsed .dm-chip { display: none; }
  .dm-own { display: inline-flex; }
  .dm-own[hidden] { display: none; }
  .dm-plate { left: 50%; right: auto; transform: translateX(-50%); flex-direction: row; gap: 18px; padding: 7px 22px 7px 7px; border-radius: 999px; bottom: 26px; }
  .dm-plate:has(.dm-link[hidden]) { padding: 7px; }
  .dm-plate .dm-cta { width: auto; height: 46px; }
  .dm-plate .dm-link { font-size: 13.5px; }
}
@media (prefers-reduced-motion: reduce) { .dm-sty, .dm-sw__o, .dm-back { transition: none; } }

/* the guestbook tab: what the couple reads in their panel, here open to everyone and read only */
.dm-msgs { max-width: 760px; margin: 0 auto; padding: 22px var(--gutter, 16px) 40px; color: var(--ink); }
.dm-msgs__t { margin: 0; font-family: var(--gv-meta-font); font-weight: 400; font-size: 26px; text-wrap: balance; }
.dm-msgs__lede { margin: 6px 0 18px; color: var(--ink-2); text-wrap: pretty; }
.dm-msgs__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.dm-msg { display: grid; gap: 10px; align-content: start; padding: 16px; border-radius: var(--gv-r-card); background: var(--ivory); border: 1px solid var(--rule); }
.dm-msg__h { margin: 0; display: grid; gap: 2px; }
.dm-msg__h small { color: var(--ink-3); font-size: 12.5px; }
.dm-msg__text { margin: 0; font-family: var(--gv-meta-font); font-size: 19px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; text-wrap: pretty; }
/* WED-369: a voice note is a picture here, never a player: microphone, waveform, length. No button, no hover, no cursor. */
.dm-voice { margin: 0; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 14px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 5%, transparent); color: var(--ink-3); cursor: default; user-select: none; }
.dm-voice__mic { flex: none; display: grid; place-items: center; width: 18px; height: 18px; }
.dm-voice__mic svg { width: 16px; height: 16px; }
.dm-voice__wave { flex: 1; min-width: 0; height: 26px; display: flex; align-items: center; gap: 2px; }
.dm-voice__wave i { flex: 1; min-height: 2px; border-radius: 2px; background: color-mix(in srgb, var(--ink) 30%, transparent); }
.dm-voice__t { flex: none; font-size: 13px; font-variant-numeric: tabular-nums; }
.dm-msgs__note { margin: 18px 0 0; font-size: 12.5px; color: var(--ink-3); }


/* WED-365: until demo.js adds .dm-fonts after the page load, the other styles' swatches use the UI face, so their
   five font files do not load during the first paint. */
html:not(.dm-fonts) .dm-sty .dm-sw:not([aria-current="true"]) .dm-sw__c,
html:not(.dm-fonts) .dm-sty .dm-sw:not([aria-current="true"]) .dm-sw__c * { font-family: var(--font-ui) !important; }
