/*
  Public page styles (the page a QR code opens) and its 25 themes.
  Hand-written rather than Tailwind: this stylesheet ships to every visitor, and the themes are
  easiest to reason about as sets of custom properties. A theme only changes variables and a
  few signature touches (the cover frame shape, a background pattern).
*/

:root {
  --bg: #fbfaf7;
  --bg-art: none;
  --surface: #ffffff;
  --text: #1c1917;
  --muted: #78716c;
  --accent: #9a3412;
  --accent-ink: #ffffff;
  --line: rgb(0 0 0 / 0.08);
  --font-heading: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-script: "Caveat", "Segoe Script", cursive;
  --heading-weight: 500;
  --heading-scale: 1;
  --radius: 20px;
  --frame-radius: 28px;
  --frame-ratio: 4 / 5;
  --shadow: 0 22px 44px -26px rgb(0 0 0 / 0.38);
  --shadow-soft: 0 10px 30px -18px rgb(0 0 0 / 0.25);
  --glass: rgb(255 255 255 / 0.88);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body.memo {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background-color .4s ease, color .4s ease;
}
body.memo::before {
  content: "";
  position: fixed;
  inset: 0;
  background: var(--bg-art);
  pointer-events: none;
  z-index: 0;
}

img { max-width: 100%; }

.memo-wrap { position: relative; z-index: 1; max-width: 620px; margin: 0 auto; padding: 32px 22px 24px; }
#memo-fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 4; }

.m-block { margin: 0 0 48px; }

/* ── Cover */
.m-hero { text-align: center; padding-top: 8px; }
.m-hero-date { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--accent); }
.m-hero-frame {
  margin: 18px auto 28px;
  width: min(100%, 420px);
  aspect-ratio: var(--frame-ratio);
  border-radius: var(--frame-radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.m-hero-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.m-hero-title {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: var(--heading-weight);
  font-size: calc(clamp(36px, 9.5vw, 54px) * var(--heading-scale));
  line-height: 1.06;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.m-hero-sub { margin: 14px auto 0; max-width: 32ch; font-size: 18px; color: var(--muted); text-wrap: balance; }

/* ── Text */
.m-h2 {
  margin: 0 0 12px;
  font-family: var(--font-heading);
  font-weight: var(--heading-weight);
  font-size: calc(29px * var(--heading-scale));
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.m-body { white-space: pre-line; text-wrap: pretty; }

/* ── Photos */
.m-image { margin-left: 0; margin-right: 0; }
.m-photo { display: block; width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); cursor: zoom-in; }
.m-caption { margin: 12px 0 0; text-align: center; font-size: 14px; color: var(--muted); }

.m-carousel { position: relative; }
.m-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  border-radius: var(--radius);
}
.m-track::-webkit-scrollbar { display: none; }
.m-slide {
  flex: 0 0 100%;
  aspect-ratio: 4 / 5;
  scroll-snap-align: center;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.m-slide img { display: block; width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.m-nav {
  position: absolute;
  top: calc(50% - 22px);
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%;
  background: var(--glass);
  color: #1c1917;
  box-shadow: 0 6px 18px -8px rgb(0 0 0 / .4);
  cursor: pointer;
  transition: transform .15s ease, opacity .2s ease;
}
.m-nav:active { transform: scale(.94); }
.m-nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.m-prev { left: 10px; }
.m-next { right: 10px; }
.m-nav[disabled] { opacity: 0; pointer-events: none; }
.m-dots { display: flex; justify-content: center; gap: 6px; margin-top: 14px; }
.m-dot { width: 7px; height: 7px; border-radius: 99px; background: var(--text); opacity: .2; transition: all .3s ease; }
.m-dot.is-active { width: 22px; opacity: 1; background: var(--accent); }

.m-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.m-grid img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: calc(var(--radius) * .7); cursor: zoom-in; }
.m-grid-odd img:first-child { grid-column: span 2; aspect-ratio: 16 / 10; }

/* ── Quote */
.m-quote { margin: 0 0 48px; padding: 4px 8px; text-align: center; }
.m-quote-mark { display: block; height: 34px; font-family: var(--font-heading); font-size: 76px; line-height: 1; color: var(--accent); }
.m-quote p {
  margin: 0;
  font-family: var(--font-heading);
  font-size: calc(clamp(24px, 6.2vw, 32px) * var(--heading-scale));
  font-style: italic;
  line-height: 1.32;
  text-wrap: balance;
}
.m-quote cite { display: block; margin-top: 14px; font-size: 15px; font-style: normal; color: var(--muted); }

/* ── Video & music */
.m-media { margin-left: 0; margin-right: 0; }
.m-embed { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: var(--shadow); }
.m-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.m-embed-audio { aspect-ratio: auto; background: transparent; box-shadow: var(--shadow-soft); border-radius: 14px; }

/* ── Counter */
.m-counter {
  padding: 26px 16px 24px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.m-counter-label { margin: 0 0 16px; font-size: 12.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.m-counter-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 4px; }
.m-unit { min-width: 62px; padding: 0 4px; }
.m-num { font-family: var(--font-heading); font-size: 34px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.m-lbl { margin-top: 7px; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.m-counter-done { font-family: var(--font-heading); font-size: 28px; }

/* ── Timeline */
.m-timeline ol { list-style: none; margin: 8px 0 0; padding: 0 0 0 22px; border-left: 2px solid var(--line); }
.m-timeline li { position: relative; padding: 0 0 26px 16px; }
.m-timeline li:last-child { padding-bottom: 4px; }
.m-timeline li::before {
  content: "";
  position: absolute;
  left: -31px; top: 6px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--bg);
}
.m-tl-date { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.m-timeline h3 { margin: 3px 0 4px; font-family: var(--font-heading); font-weight: var(--heading-weight); font-size: calc(20px * var(--heading-scale)); line-height: 1.3; }
.m-timeline p { margin: 0; color: var(--muted); }

/* ── Button */
.m-button {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  padding: 16px 24px;
  border: 0; border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit; font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 14px 28px -16px var(--accent);
  transition: transform .15s ease, filter .15s ease;
}
.m-button:hover { filter: brightness(1.07); }
.m-button:active { transform: scale(.98); }
.m-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }

/* ── Signature */
.m-signature { text-align: center; }
.m-sig-text { margin: 0; font-style: italic; color: var(--muted); }
.m-sig-name { margin: 4px 0 0; font-family: var(--font-script); font-size: 44px; line-height: 1.1; color: var(--accent); }

/* ── Divider */
.m-divider { display: flex; justify-content: center; color: var(--accent); opacity: .75; }
.m-divider svg { width: 22px; height: 22px; fill: currentColor; }
.m-divider-dots { font-size: 20px; letter-spacing: .1em; }
.m-rule { display: block; width: 90px; height: 1px; background: currentColor; }

/* ── Profile (link-in-bio header) */
.m-profile { text-align: center; padding-top: 12px; }
.m-avatar {
  width: 128px; height: 128px; margin: 0 auto 18px;
  border-radius: 50%; overflow: hidden;
  background: var(--surface);
  box-shadow: 0 0 0 5px var(--surface), 0 0 0 6px var(--line), var(--shadow);
}
.m-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.m-avatar.m-ph { min-height: 0; padding: 0; border-radius: 50%; }
.m-avatar-sm { width: 84px; height: 84px; margin-bottom: 14px; }
.m-profile-name { margin: 0; font-family: var(--font-heading); font-weight: var(--heading-weight); font-size: calc(32px * var(--heading-scale)); line-height: 1.15; letter-spacing: -0.01em; }
.m-profile-bio { margin: 10px auto 0; max-width: 34ch; color: var(--muted); white-space: pre-line; }

/* ── Link list */
.m-links { display: grid; gap: 12px; }
.m-links .m-h2 { text-align: center; font-size: calc(22px * var(--heading-scale)); margin-bottom: 4px; }
.m-link {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 18px; min-height: 60px;
  background: var(--surface); color: var(--text); text-decoration: none;
  border: 1px solid var(--line); border-radius: calc(var(--radius) * .8);
  box-shadow: var(--shadow-soft);
  transition: transform .15s ease, border-color .15s ease;
}
.m-link:hover { transform: translateY(-2px); border-color: var(--accent); }
.m-link-icon { display: flex; width: 22px; height: 22px; color: var(--accent); flex-shrink: 0; }
.m-link-icon svg, .m-social svg, .m-contact-actions svg, .m-button > svg { width: 100%; height: 100%; }
.m-link-label { flex: 1; font-weight: 600; text-align: center; margin-right: 22px; }
.m-link-arrow { width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 2; flex-shrink: 0; }

/* ── Social icons */
.m-social { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.m-social a {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; padding: 12px;
  border-radius: 50%; color: var(--text); background: var(--surface);
  border: 1px solid var(--line);
  transition: transform .15s ease, color .15s ease, border-color .15s ease;
}
.m-social a:hover { transform: translateY(-2px); color: var(--accent); border-color: var(--accent); }

/* ── Contact card */
.m-contact { text-align: center; padding: 28px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-soft); }
.m-contact .m-h2 { margin-bottom: 4px; }
.m-contact-role { margin: 0; color: var(--muted); }
.m-contact-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 8px; margin: 22px 0 16px; }
.m-contact-actions a {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 6px; border-radius: 14px;
  color: var(--text); text-decoration: none; font-size: 13px; font-weight: 600;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}
.m-contact-actions a svg { width: 22px; height: 22px; color: var(--accent); }
.m-contact-address { margin: 0 0 18px; font-size: 14px; color: var(--muted); white-space: pre-line; }
.m-button > svg { width: 18px; height: 18px; }

/* ── Menu / price list */
.m-menu ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 16px; }
.m-menu-row { display: flex; align-items: baseline; gap: 10px; }
.m-menu-name { font-weight: 600; font-family: var(--font-heading); font-size: calc(19px * var(--heading-scale)); }
.m-menu-dots { flex: 1; border-bottom: 1.5px dotted color-mix(in srgb, var(--text) 30%, transparent); transform: translateY(-5px); min-width: 20px; }
.m-menu-price { font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.m-menu-desc { margin: 3px 0 0; font-size: 15px; color: var(--muted); }

/* ── Guestbook */
.m-guestbook { padding-top: 12px; border-top: 1px solid var(--line); }
.m-guestbook-lead { margin: -4px 0 18px; color: var(--muted); }
.m-gb-form { display: grid; gap: 10px; }
.m-gb-form input, .m-gb-form textarea {
  width: 100%; padding: 13px 15px; font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; outline: none; resize: vertical;
}
.m-gb-form input:focus, .m-gb-form textarea:focus { border-color: var(--accent); }
.m-gb-flash { margin: 0 0 14px; padding: 12px 14px; border-radius: 12px; font-size: 15px; background: color-mix(in srgb, var(--accent) 12%, transparent); }
.m-gb-flash.is-error { background: rgb(194 41 61 / .1); color: #c2293d; }
.m-gb-list { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 12px; }
.m-gb-list li { padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.m-gb-msg { margin: 0; white-space: pre-line; }
.m-gb-meta { margin: 8px 0 0; font-size: 13px; color: var(--muted); }

/* ── Footer, controls, lightbox */
.memo-foot { position: relative; z-index: 1; padding: 8px 20px 44px; text-align: center; font-size: 13px; }
.memo-foot a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; color: var(--muted); text-decoration: none; background: color-mix(in srgb, var(--surface) 70%, transparent); border: 1px solid var(--line); }
.memo-foot a:hover { color: var(--text); }
.memo-foot svg { width: 18px; height: 18px; color: var(--text); }

.memo-fx-toggle {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 6;
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 50%;
  background: var(--glass); color: #1c1917;
  backdrop-filter: blur(8px);
  cursor: pointer;
}
.memo-fx-toggle[hidden] { display: none; }
.memo-fx-toggle svg { width: 16px; height: 16px; fill: currentColor; }
.memo-fx-toggle .i-play, .memo-fx-toggle.is-paused .i-pause { display: none; }
.memo-fx-toggle.is-paused .i-play { display: block; }

.m-lightbox { position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgb(10 10 12 / .94); }
.m-lightbox[hidden] { display: none; }
.m-lightbox img { max-width: 100%; max-height: 100%; border-radius: 12px; object-fit: contain; }
.m-lightbox button { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgb(255 255 255 / .15); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }

/* ── Scroll reveal (public page only; the editor preview re-renders too often) */
.js-reveal .m-block { opacity: 0; transform: translateY(16px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.js-reveal .m-block.is-in { opacity: 1; transform: none; }

/* ── Editor preview */
.m-ph {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 140px; padding: 24px;
  border: 2px dashed color-mix(in srgb, var(--text) 22%, transparent);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  color: var(--muted);
  font-size: 14px; font-weight: 500; text-align: center;
}
.m-ph-sm { min-height: 72px; }
.m-ph-icon { font-size: 22px; line-height: 1; color: var(--accent); }
.m-hero-frame.m-ph { box-shadow: none; }
.is-preview .m-block { cursor: pointer; border-radius: 14px; outline: 2px solid transparent; outline-offset: 10px; transition: outline-color .2s ease; }
.is-preview .m-block:hover { outline-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.is-preview .m-block.is-selected { outline-color: var(--accent); }
.is-preview .memo-foot a { pointer-events: none; }

/* In-place editing: text looks like text until hovered, then shows it can be typed into. */
.is-preview [data-edit] { cursor: text; border-radius: 6px; outline: 1.5px dashed transparent; outline-offset: 4px; transition: outline-color .15s ease, background-color .15s ease; min-width: 2ch; }
.is-preview [data-edit]:hover { outline-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.is-preview [data-edit]:focus { outline: 2px solid var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); }
.is-preview [data-edit]:empty::before { content: attr(data-placeholder); opacity: .38; pointer-events: none; }
.is-preview [data-edit-image] { cursor: pointer; position: relative; }
.is-preview figure[data-edit-image]::after, .is-preview .m-photo[data-edit-image] + .m-edit-hint {
  content: "Replace photo";
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  padding: 7px 14px; border-radius: 999px;
  background: rgb(0 0 0 / .65); color: #fff; font: 600 12px/1 var(--font-body);
  opacity: 0; transition: opacity .15s ease; pointer-events: none; white-space: nowrap;
}
.is-preview figure[data-edit-image]:hover::after { opacity: 1; }
.is-preview .m-photo[data-edit-image]:hover { filter: brightness(.92); }
.m-add-photos {
  display: block; width: 100%; margin-top: 12px; padding: 12px;
  border: 2px dashed color-mix(in srgb, var(--text) 20%, transparent); border-radius: 14px;
  background: transparent; color: var(--muted); font: 600 14px var(--font-body); cursor: pointer;
}
.m-add-photos:hover { color: var(--accent); border-color: var(--accent); }

/* ── Password gate */
.memo-gate { min-height: 100dvh; display: flex; align-items: center; justify-content: center; }
.gate-card { width: 100%; max-width: 380px; padding: 36px 28px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); }
.gate-card p { color: var(--muted); margin: 0 0 20px; }
.gate-icon { width: 52px; height: 52px; margin: 0 auto 16px; display: flex; align-items: center; justify-content: center; border-radius: 16px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.gate-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; }
.gate-card input { width: 100%; margin-bottom: 12px; padding: 14px 16px; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 14px; outline: none; }
.gate-card input:focus { border-color: var(--accent); }
.gate-error { color: #c2293d !important; font-size: 14px; margin: -4px 0 12px !important; }

/* ═════════════════════════════════════════ Themes */

.theme-classic { }

.theme-ink {
  --bg: #ffffff; --surface: #f4f4f5; --text: #09090b; --muted: #71717a; --accent: #09090b; --accent-ink: #ffffff;
  --line: rgb(0 0 0 / .12);
  --font-heading: "Instrument Serif", Georgia, serif; --heading-weight: 400; --heading-scale: 1.12;
  --radius: 6px; --frame-radius: 4px; --frame-ratio: 3 / 4;
  --shadow: none; --shadow-soft: none;
}
.theme-ink .m-hero-frame { box-shadow: none; }
.theme-ink .m-counter { background: transparent; }

.theme-blush {
  --bg: #fdf2f4; --surface: #ffffff; --text: #4a2330; --muted: #8d6070; --accent: #d9577a;
  --bg-art: radial-gradient(38rem 26rem at 110% -5%, rgb(244 164 186 / .45), transparent 60%), radial-gradient(30rem 22rem at -15% 60%, rgb(255 214 222 / .6), transparent 60%);
  --font-heading: "Cormorant Garamond", Georgia, serif; --heading-weight: 600; --heading-scale: 1.1;
  --frame-radius: 999px 999px 28px 28px;
  --shadow: 0 24px 48px -28px rgb(217 87 122 / .55);
}

.theme-lavender {
  --bg: #f5f3ff; --surface: #ffffff; --text: #2e1065; --muted: #6d5a99; --accent: #7c3aed;
  --bg-art: radial-gradient(40rem 26rem at 50% -10%, rgb(196 181 253 / .55), transparent 65%);
  --font-heading: "Playfair Display", Georgia, serif; --heading-weight: 500;
  --frame-radius: 36px;
  --shadow: 0 24px 48px -28px rgb(124 58 237 / .5);
}

.theme-midnight {
  --bg: #0b1026; --surface: #141a38; --text: #eef1ff; --muted: #a5acd6; --accent: #f5c56b; --accent-ink: #0b1026;
  --line: rgb(255 255 255 / .1);
  --bg-art: radial-gradient(50rem 30rem at 50% -10%, rgb(76 94 196 / .45), transparent 65%), radial-gradient(1px 1px at 20% 30%, #fff8, transparent), radial-gradient(1px 1px at 70% 20%, #fff6, transparent), radial-gradient(1.5px 1.5px at 85% 65%, #fff7, transparent), radial-gradient(1px 1px at 35% 80%, #fff5, transparent);
  --font-heading: "DM Serif Display", Georgia, serif; --heading-weight: 400;
  --frame-radius: 999px 999px 24px 24px;
  --shadow: 0 30px 60px -30px rgb(0 0 0 / .8);
  --shadow-soft: 0 12px 30px -18px rgb(0 0 0 / .7);
  --glass: rgb(255 255 255 / .9);
}

.theme-gala {
  --bg: #0c0a09; --surface: #1c1917; --text: #f5f0e6; --muted: #b3aa9c; --accent: #d4af37; --accent-ink: #0c0a09;
  --line: rgb(212 175 55 / .25);
  --bg-art: radial-gradient(46rem 28rem at 50% -12%, rgb(212 175 55 / .16), transparent 65%);
  --font-heading: "Cormorant Garamond", Georgia, serif; --heading-weight: 500; --heading-scale: 1.12;
  --font-body: "Montserrat", system-ui, sans-serif;
  --frame-radius: 999px 999px 18px 18px;
  --shadow: 0 30px 60px -30px rgb(0 0 0 / .9);
}
.theme-gala body, body.theme-gala { font-size: 16px; letter-spacing: .01em; }
.theme-gala .m-hero-frame { outline: 1px solid var(--accent); outline-offset: 9px; overflow: hidden; }
.theme-gala .m-hero-title { letter-spacing: .01em; }
.theme-gala .m-button { background: transparent; color: var(--accent); border: 1px solid var(--accent); box-shadow: none; }

.theme-ocean {
  --bg: #ecfeff; --surface: #ffffff; --text: #083344; --muted: #4b7384; --accent: #0e7490;
  --bg-art: linear-gradient(180deg, #e0f7ff 0%, transparent 45%), radial-gradient(34rem 20rem at 100% 100%, rgb(103 232 249 / .3), transparent 60%);
  --font-body: "Nunito", system-ui, sans-serif;
  --frame-radius: 44px;
}

.theme-sage {
  --bg: #f3f6f0; --surface: #ffffff; --text: #1f2e1f; --muted: #5f6f5f; --accent: #4d7c4d;
  --font-heading: "Lora", Georgia, serif; --heading-weight: 500;
  --frame-radius: 14px; --frame-ratio: 1 / 1;
  --shadow: 0 20px 40px -28px rgb(31 46 31 / .45);
}

.theme-sunset {
  --bg: #fff4ec; --surface: #ffffff; --text: #43200f; --muted: #8a5a45; --accent: #e4572e;
  --bg-art: radial-gradient(46rem 30rem at 50% -8%, rgb(255 179 138 / .55), transparent 62%), radial-gradient(30rem 20rem at 0% 100%, rgb(255 213 128 / .35), transparent 60%);
  --font-heading: "Playfair Display", Georgia, serif; --heading-weight: 500;
  --font-body: "Nunito", system-ui, sans-serif;
  --frame-radius: 46% 54% 42% 58% / 52% 42% 58% 48%;
  --frame-ratio: 1 / 1;
  --shadow: 0 26px 50px -28px rgb(228 87 46 / .55);
}

.theme-letter {
  --bg: #efe4d0; --surface: #f8f1e3; --text: #3b2a1a; --muted: #7a624a; --accent: #8b4513;
  --line: rgb(59 42 26 / .15);
  --bg-art: repeating-linear-gradient(0deg, rgb(120 90 60 / .035) 0 1px, transparent 1px 30px), radial-gradient(40rem 30rem at 50% 0%, rgb(255 250 240 / .6), transparent 70%);
  --font-heading: "Caveat", "Segoe Script", cursive; --heading-weight: 700; --heading-scale: 1.3;
  --font-body: "Lora", Georgia, serif;
  --radius: 6px; --frame-radius: 3px;
  --shadow: 0 18px 30px -18px rgb(59 42 26 / .45);
}
.theme-letter .m-hero-frame { padding: 12px 12px 48px; background: #fffdf8; transform: rotate(-2deg); aspect-ratio: auto; }
.theme-letter .m-hero-frame img { aspect-ratio: 4 / 5; border-radius: 2px; }
.theme-letter .m-slide, .theme-letter .m-grid img, .theme-letter .m-photo { border: 8px solid #fffdf8; }
.theme-letter .m-quote p { font-family: var(--font-body); font-size: 24px; }

.theme-winter {
  --bg: #eef6fc; --surface: #ffffff; --text: #0f2a44; --muted: #587089; --accent: #2f7fc1;
  --bg-art: linear-gradient(180deg, #dcecf9 0%, transparent 50%);
  --font-body: "Nunito", system-ui, sans-serif;
  --frame-radius: 50%; --frame-ratio: 1 / 1;
  --shadow: 0 24px 48px -28px rgb(47 127 193 / .55);
}
.theme-winter .m-hero-frame { width: min(100%, 340px); border: 6px solid #fff; }

.theme-candy {
  --bg: #fff7fb; --surface: #ffffff; --text: #3b1f47; --muted: #7b5f86; --accent: #f0569b;
  --bg-art: radial-gradient(circle at 1px 1px, rgb(240 86 155 / .14) 1.5px, transparent 0) 0 0 / 22px 22px;
  --font-heading: "Baloo 2", system-ui, sans-serif; --heading-weight: 700;
  --font-body: "Nunito", system-ui, sans-serif;
  --radius: 24px; --frame-radius: 36px;
  --shadow: 0 22px 44px -24px rgb(240 86 155 / .55);
}
.theme-candy .m-hero-frame { border: 6px solid #fff; transform: rotate(-1.5deg); }

.theme-linen {
  --bg: #f6f1ea; --surface: #fffdf9; --text: #2b2520; --muted: #80746a; --accent: #7c5c3c;
  --line: rgb(43 37 32 / .1);
  --font-heading: "Newsreader", Georgia, serif; --heading-weight: 400; --heading-scale: 1.08;
  --frame-radius: 6px; --frame-ratio: 4 / 5;
  --shadow: 0 30px 50px -36px rgb(43 37 32 / .5);
}
.theme-linen .m-hero-title { font-style: italic; }

.theme-noir {
  --bg: #0a0a0a; --surface: #161616; --text: #fafafa; --muted: #9a9a9a; --accent: #ffffff; --accent-ink: #0a0a0a;
  --line: rgb(255 255 255 / .12);
  --font-heading: "Instrument Serif", Georgia, serif; --heading-weight: 400; --heading-scale: 1.15;
  --radius: 4px; --frame-radius: 2px; --frame-ratio: 3 / 4;
  --shadow: none; --shadow-soft: none;
}
.theme-noir .m-hero-frame img { filter: grayscale(.15) contrast(1.05); }
.theme-noir .m-counter { background: transparent; }

.theme-swiss {
  --bg: #ffffff; --surface: #f5f5f5; --text: #111111; --muted: #6b6b6b; --accent: #e11d2a;
  --line: rgb(0 0 0 / .1);
  --font-heading: "Inter Tight", system-ui, sans-serif; --heading-weight: 800; --heading-scale: 1.05;
  --radius: 0px; --frame-radius: 0px; --frame-ratio: 1 / 1;
  --shadow: none; --shadow-soft: none;
}
.theme-swiss .m-hero { text-align: left; }
.theme-swiss .m-hero-frame { margin-left: 0; width: 100%; }
.theme-swiss .m-hero-title { letter-spacing: -0.045em; line-height: .98; }
.theme-swiss .m-hero-sub { margin-left: 0; }
.theme-swiss .m-hero-date::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 8px; background: var(--accent); }
.theme-swiss .m-button { border-radius: 0; }
.theme-swiss .m-counter { border: 0; border-top: 3px solid var(--text); border-radius: 0; background: transparent; }

.theme-mono {
  --bg: #fafaf7; --surface: #ffffff; --text: #1a1a1a; --muted: #6f6f6a; --accent: #1a1a1a; --accent-ink: #fafaf7;
  --line: rgb(0 0 0 / .14);
  --font-heading: "IBM Plex Mono", ui-monospace, monospace; --font-body: "IBM Plex Mono", ui-monospace, monospace;
  --heading-weight: 600; --heading-scale: .82;
  --radius: 2px; --frame-radius: 2px;
  --shadow: none; --shadow-soft: none;
}
body.theme-mono { font-size: 15px; }
.theme-mono .m-hero-frame { border: 1px solid var(--line); padding: 8px; background: var(--surface); }
.theme-mono .m-hero-frame img { aspect-ratio: 4 / 5; }
.theme-mono .m-hero-title::after { content: "_"; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.theme-champagne {
  --bg: #faf6ee; --surface: #ffffff; --text: #2f2a22; --muted: #8a7f6c; --accent: #b8903d;
  --line: rgb(184 144 61 / .22);
  --bg-art: radial-gradient(40rem 26rem at 50% -10%, rgb(233 212 160 / .35), transparent 65%);
  --font-heading: "Italiana", Georgia, serif; --heading-weight: 400; --heading-scale: 1.1;
  --font-body: "Jost", system-ui, sans-serif;
  --frame-radius: 999px 999px 0 0;
  --shadow: 0 26px 50px -32px rgb(120 94 40 / .45);
}
.theme-champagne .m-hero-title { letter-spacing: .02em; }
.theme-champagne .m-hero-frame { outline: 1px solid var(--accent); outline-offset: 8px; }

.theme-rosegold {
  --bg: #fbf1ee; --surface: #ffffff; --text: #4a2c2c; --muted: #957070; --accent: #b76e79;
  --bg-art: linear-gradient(160deg, rgb(247 214 208 / .6), transparent 45%), radial-gradient(30rem 20rem at 100% 100%, rgb(232 190 172 / .4), transparent 60%);
  --font-heading: "Cormorant Garamond", Georgia, serif; --heading-weight: 600; --heading-scale: 1.1;
  --font-body: "Jost", system-ui, sans-serif;
  --frame-radius: 200px 200px 200px 24px;
  --shadow: 0 24px 48px -28px rgb(183 110 121 / .55);
}

.theme-forest {
  --bg: #10231a; --surface: #17301f; --text: #eaf2ea; --muted: #a3b8a6; --accent: #c8b273; --accent-ink: #10231a;
  --line: rgb(234 242 234 / .12);
  --bg-art: radial-gradient(44rem 30rem at 50% -10%, rgb(62 110 78 / .45), transparent 65%);
  --frame-radius: 18px;
  --shadow: 0 30px 60px -30px rgb(0 0 0 / .7); --shadow-soft: 0 12px 30px -18px rgb(0 0 0 / .6);
}

.theme-terracotta {
  --bg: #f6ece4; --surface: #fffaf6; --text: #3a2419; --muted: #8a6a58; --accent: #c2571a;
  --font-heading: "DM Serif Display", Georgia, serif; --heading-weight: 400;
  --font-body: "DM Sans", system-ui, sans-serif;
  --frame-radius: 999px 999px 999px 999px; --frame-ratio: 4 / 5;
  --shadow: 0 24px 48px -30px rgb(194 87 26 / .5);
}
.theme-terracotta .m-hero-frame { border-radius: 50% / 40%; }

.theme-sky {
  --bg: #eef4ff; --surface: #ffffff; --text: #0f1f3d; --muted: #5a6b8c; --accent: #2563eb;
  --bg-art: linear-gradient(180deg, #dbe7ff 0%, rgb(238 244 255 / 0) 55%);
  --font-heading: "Plus Jakarta Sans", system-ui, sans-serif; --font-body: "Plus Jakarta Sans", system-ui, sans-serif;
  --heading-weight: 800; --heading-scale: .95;
  --radius: 22px; --frame-radius: 32px;
  --shadow: 0 30px 50px -30px rgb(37 99 235 / .45);
}
.theme-sky .m-hero-title { letter-spacing: -0.035em; }

.theme-citrus {
  --bg: #fffbe8; --surface: #ffffff; --text: #1f1a05; --muted: #6d6444; --accent: #1f1a05; --accent-ink: #ffe45c;
  --bg-art: radial-gradient(34rem 24rem at 100% 0%, rgb(255 228 92 / .55), transparent 60%);
  --font-heading: "Bricolage Grotesque", system-ui, sans-serif; --heading-weight: 700;
  --radius: 18px; --frame-radius: 28px;
  --shadow: 0 20px 40px -26px rgb(120 100 0 / .4);
}
.theme-citrus .m-hero-date { background: #ffe45c; color: #1f1a05; display: inline-block; padding: 4px 10px; border-radius: 99px; }
.theme-citrus .m-timeline li::before, .theme-citrus .m-dot.is-active { background: #f5c400; }

.theme-aurora {
  --bg: #0b0b1a; --surface: rgb(255 255 255 / .06); --text: #f2f2ff; --muted: #a9a9c9; --accent: #8be9fd; --accent-ink: #0b0b1a;
  --line: rgb(255 255 255 / .12);
  --bg-art: radial-gradient(40rem 26rem at 10% -5%, rgb(139 92 246 / .45), transparent 60%), radial-gradient(36rem 24rem at 100% 20%, rgb(34 211 238 / .3), transparent 60%), radial-gradient(40rem 30rem at 50% 110%, rgb(236 72 153 / .25), transparent 60%);
  --font-heading: "Space Grotesk", system-ui, sans-serif; --font-body: "Space Grotesk", system-ui, sans-serif;
  --heading-weight: 700; --heading-scale: .96;
  --radius: 22px; --frame-radius: 28px;
  --shadow: 0 30px 60px -30px rgb(0 0 0 / .8); --shadow-soft: none;
}
.theme-aurora .m-hero-title { background: linear-gradient(90deg, #c4b5fd, #8be9fd, #f9a8d4); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: -0.03em; }
.theme-aurora .m-counter { backdrop-filter: blur(10px); }

.theme-pastel {
  --bg: #fbf7ff; --surface: #ffffff; --text: #2e2446; --muted: #776a92; --accent: #8b5cf6;
  --bg-art: radial-gradient(30rem 22rem at 0% 0%, rgb(253 186 216 / .5), transparent 60%), radial-gradient(30rem 22rem at 100% 10%, rgb(186 230 253 / .6), transparent 60%), radial-gradient(34rem 24rem at 50% 100%, rgb(217 249 157 / .35), transparent 60%);
  --font-heading: "Quicksand", system-ui, sans-serif; --heading-weight: 700;
  --font-body: "Nunito", system-ui, sans-serif;
  --radius: 26px; --frame-radius: 40px;
  --shadow: 0 24px 48px -28px rgb(139 92 246 / .45);
}

.theme-vintage {
  --bg: #f3ead8; --surface: #fbf5e8; --text: #3a2a1c; --muted: #7d6a55; --accent: #9c3d2e;
  --line: rgb(58 42 28 / .15);
  --bg-art: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.09'/%3E%3C/svg%3E");
  --font-heading: "Playfair Display", Georgia, serif; --heading-weight: 500;
  --font-body: "Lora", Georgia, serif;
  --radius: 4px; --frame-radius: 4px;
  --shadow: 0 16px 30px -18px rgb(58 42 28 / .5);
}
.theme-vintage .m-hero-title { font-style: italic; }
.theme-vintage .m-hero-frame, .theme-vintage .m-slide, .theme-vintage .m-photo { filter: sepia(.25) saturate(.9); }
.theme-vintage .m-hero-frame { border: 10px solid var(--surface); }

.theme-slate {
  --bg: #f5f7fa; --surface: #ffffff; --text: #0f172a; --muted: #5b6475; --accent: #1d4ed8;
  --line: rgb(15 23 42 / .09);
  --bg-art: linear-gradient(180deg, #e8edf5 0%, rgb(245 247 250 / 0) 40%);
  --font-heading: "Inter Tight", system-ui, sans-serif; --heading-weight: 700; --heading-scale: .92;
  --radius: 14px; --frame-radius: 16px; --frame-ratio: 16 / 10;
  --shadow: 0 20px 40px -28px rgb(15 23 42 / .35); --shadow-soft: 0 8px 20px -14px rgb(15 23 42 / .25);
}
.theme-slate .m-hero-title, .theme-slate .m-profile-name { letter-spacing: -0.03em; }

.theme-neon {
  --bg: #09090b; --surface: #18181b; --text: #fafafa; --muted: #a1a1aa; --accent: #c6f432; --accent-ink: #09090b;
  --line: rgb(255 255 255 / .1);
  --font-heading: "Space Grotesk", system-ui, sans-serif; --heading-weight: 700;
  --radius: 18px; --frame-radius: 24px;
  --shadow: 0 30px 60px -30px rgb(0 0 0 / .9); --shadow-soft: none;
}
.theme-neon .m-avatar { width: 150px; height: 150px; box-shadow: 0 0 0 4px var(--bg), 0 0 0 6px var(--accent), 0 0 60px -10px var(--accent); }
.theme-neon .m-link { background: transparent; border: 1.5px solid rgb(255 255 255 / .18); }
.theme-neon .m-link:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.theme-neon .m-link:hover .m-link-icon, .theme-neon .m-link:hover .m-link-arrow { color: var(--accent-ink); stroke: var(--accent-ink); }

.theme-studio {
  --bg: #fafaf9; --surface: #ffffff; --text: #111111; --muted: #6b6b6b; --accent: #ea580c;
  --line: rgb(0 0 0 / .1);
  --font-heading: "Syne", system-ui, sans-serif; --heading-weight: 800; --heading-scale: .95;
  --radius: 4px; --frame-radius: 4px;
  --shadow: none; --shadow-soft: none;
}
.theme-studio .m-profile, .theme-studio .m-hero { text-align: left; }
.theme-studio .m-avatar { margin-left: 0; border-radius: 8px; box-shadow: none; }
.theme-studio .m-profile-bio, .theme-studio .m-hero-sub { margin-left: 0; }
.theme-studio .m-grid { gap: 4px; }
.theme-studio .m-link { border-radius: 4px; box-shadow: none; }
.theme-studio .m-link-label { text-align: left; }

.theme-bistro {
  --bg: #f7f3ea; --surface: #fffdf7; --text: #1f2a1f; --muted: #6b7163; --accent: #2f5d3a;
  --line: rgb(31 42 31 / .14);
  --font-heading: "Playfair Display", Georgia, serif; --heading-weight: 700;
  --font-body: "Lato", system-ui, sans-serif;
  --radius: 10px; --frame-radius: 10px; --frame-ratio: 16 / 10;
  --shadow: 0 18px 36px -26px rgb(31 42 31 / .4);
}
.theme-bistro .m-menu .m-h2 { text-align: center; font-style: italic; }
.theme-bistro .m-menu .m-h2::after { content: ""; display: block; width: 44px; height: 2px; margin: 10px auto 0; background: var(--accent); }

/* ── Motion preferences */
@media (prefers-reduced-motion: reduce) {
  .js-reveal .m-block { opacity: 1; transform: none; transition: none; }
  .m-track { scroll-behavior: auto; }
  .theme-mono .m-hero-title::after { animation: none; }
}
