/* Church Memorials — palette and ornaments follow the funeral announcement card. */
.cm-memorial,
.cm-archive {
  --cm-green: #3d5a2a;
  --cm-green-deep: #2c4220;
  --cm-leaf: #7f9b5b;
  --cm-accent: #c9683a;
  --cm-accent-deep: #9a4a20;
  --cm-peach: #f4d3b5;
  --cm-peach-soft: #fbeee1;
  --cm-paper: #fbf7ee;
  --cm-card: #fffdf8;
  --cm-beige: #efe8d7;
  --cm-line: #e3dac6;
  --cm-ink: #2f3a27;
  --cm-muted: #6c6f60;
  --cm-live: #b3261e;
  --cm-serif: "Cormorant Garamond", "Playfair Display", Georgia, "Times New Roman", serif;
  --cm-radius: 20px;
  --cm-shadow: 0 1px 2px rgba(61, 52, 30, .05), 0 12px 32px rgba(61, 52, 30, .08);
  color: var(--cm-ink);
  font-size: 1rem;
  line-height: 1.6;
  font-variant-numeric: lining-nums; /* Cormorant defaults to old-style figures ("9:oo") */
}
.cm-memorial *, .cm-memorial *::before, .cm-memorial *::after,
.cm-archive *, .cm-archive *::before, .cm-archive *::after { box-sizing: border-box; }
.cm-memorial { max-width: 1120px; margin: 0 auto; padding: clamp(16px, 3vw, 32px) clamp(16px, 3vw, 24px) 24px; }
.cm-memorial h1, .cm-memorial h2, .cm-memorial h3, .cm-memorial p, .cm-memorial figure, .cm-memorial blockquote,
.cm-archive h1, .cm-archive h2, .cm-archive p, .cm-archive figure { margin: 0; padding: 0; }
.cm-memorial ul, .cm-memorial ol, .cm-archive ul { list-style: none; margin: 0; padding: 0; }
.cm-memorial li, .cm-archive li { margin: 0; padding: 0; }
.cm-memorial li::before, .cm-archive li::before { content: none; }
.cm-memorial img, .cm-archive img { max-width: 100%; height: auto; display: block; }
.cm-memorial a { color: var(--cm-accent-deep); }
.cm-memorial [hidden], .cm-archive [hidden] { display: none !important; }
.cm-center { text-align: center; margin-top: 22px !important; }
.cm-empty { text-align: center; color: var(--cm-muted); font-style: italic; }

/* Icons */
.cm-icon { display: inline-flex; width: 1.1em; height: 1.1em; flex: none; }
.cm-icon svg { width: 100%; height: 100%; fill: currentColor; }
.cm-icon--candle .cm-flame { fill: #e7a13a; transform-origin: 50% 90%; }
.cm-icon--quote { width: 30px; height: 22px; color: var(--cm-accent); opacity: .85; }

/* Ornaments */
.cm-sprig { display: block; width: 210px; max-width: 70%; height: auto; margin: 14px auto; color: var(--cm-leaf); }
.cm-sprig--small { width: 150px; margin: 12px auto 0; }
.cm-kicker { font-size: .76rem; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--cm-accent); }

/* Buttons */
.cm-memorial .cm-btn,
.cm-archive .cm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 44px; padding: .7em 1.25em; margin: 0;
  border: 1.5px solid transparent; border-radius: 999px;
  background: transparent; color: var(--cm-green); box-shadow: none;
  font-family: inherit; font-size: .95rem; font-weight: 600; line-height: 1.2; letter-spacing: normal; text-transform: none; text-decoration: none;
  cursor: pointer; white-space: nowrap; transition: background-color .2s, border-color .2s, color .2s, transform .2s;
}
.cm-memorial .cm-btn:hover { transform: translateY(-1px); }
.cm-memorial .cm-btn:focus-visible, .cm-memorial a:focus-visible, .cm-archive a:focus-visible,
.cm-memorial summary:focus-visible, .cm-memorial button:focus-visible { outline: 3px solid rgba(201, 104, 58, .45); outline-offset: 2px; }
.cm-memorial .cm-btn--primary { background: var(--cm-green); color: #fff; }
.cm-memorial .cm-btn--primary:hover { background: var(--cm-green-deep); color: #fff; }
.cm-memorial .cm-btn--primary.is-live { background: var(--cm-live); }
.cm-memorial .cm-btn--primary.is-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: cm-pulse 1.6s infinite; }
.cm-memorial .cm-btn--ghost { background: rgba(255, 255, 255, .65); border-color: rgba(61, 90, 42, .3); }
.cm-memorial .cm-btn--ghost:hover { background: #fff; border-color: var(--cm-green); color: var(--cm-green); }
.cm-memorial .cm-btn--candle { background: #fff4e6; border-color: #efcfa8; color: #8a4a1f; }
.cm-memorial .cm-btn--candle:hover { background: #ffecd4; color: #8a4a1f; }
.cm-memorial .cm-btn--candle .cm-count { background: #fff; border-radius: 999px; padding: .1em .6em; font-size: .85em; color: var(--cm-accent-deep); }
.cm-memorial .cm-btn--candle.is-lit { background: #fde7c7; border-color: #e9b779; }
.cm-memorial .cm-btn--candle.is-lit .cm-flame { animation: cm-flicker 1.4s infinite alternate; }

/* Hero */
.cm-hero__frame {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(220px, .9fr); gap: clamp(24px, 4vw, 56px); align-items: center;
  padding: clamp(32px, 5vw, 64px) clamp(22px, 5vw, 64px);
  background: radial-gradient(ellipse at 85% 40%, rgba(244, 211, 181, .55), transparent 55%), var(--cm-paper);
  border: 1px solid var(--cm-line); border-radius: 26px; box-shadow: var(--cm-shadow); overflow: hidden;
}
.cm-hero__frame::before { content: ""; position: absolute; inset: 12px; border: 1px solid rgba(61, 90, 42, .28); border-radius: 18px; pointer-events: none; }
.cm-hero__text { position: relative; text-align: center; }
.cm-eyebrow { font-size: .8rem; letter-spacing: .32em; text-transform: uppercase; color: var(--cm-muted); }
.cm-memorial .cm-name { font-family: var(--cm-serif); font-weight: 600; font-size: clamp(2.7rem, 6.8vw, 4.9rem); line-height: 1; color: var(--cm-green); margin: .12em 0 .08em; letter-spacing: -.01em; }
.cm-subtitle { font-family: var(--cm-serif); font-weight: 600; font-size: clamp(1.05rem, 2.3vw, 1.55rem); letter-spacing: .22em; text-transform: uppercase; color: var(--cm-accent); }
.cm-lifespan { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .3em .8em; font-weight: 600; color: var(--cm-green-deep); font-size: 1.05rem; }
.cm-lifespan__sep { color: var(--cm-accent); font-size: .8em; }
.cm-hero__meta { margin-top: 6px !important; color: var(--cm-muted); font-size: .95rem; }
.cm-verse { position: relative; max-width: 30em; margin: 26px auto 0 !important; padding: 18px 0 0 !important; border: 0 !important; border-top: 1px solid rgba(61, 90, 42, .2) !important; background: none !important; quotes: none; }
.cm-verse .cm-icon--quote { display: block; margin: 0 auto 6px; }
.cm-verse p { font-family: var(--cm-serif); font-style: italic; font-size: clamp(1.15rem, 2.2vw, 1.4rem); line-height: 1.45; color: var(--cm-ink); }
.cm-verse cite { display: block; margin-top: 6px; font-style: normal; font-family: var(--cm-serif); font-size: 1.1rem; color: var(--cm-accent); }
.cm-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 28px; }

.cm-hero__portrait { position: relative; display: flex; justify-content: center; align-items: center; padding: 12px 0; }
.cm-hero__portrait::before { content: ""; position: absolute; width: 115%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(244, 200, 160, .6), transparent 62%); }
.cm-portrait { position: relative; z-index: 1; width: min(100%, 290px); aspect-ratio: 2 / 3; border-radius: 50%; overflow: hidden; border: 7px solid var(--cm-peach); background: var(--cm-beige); box-shadow: 0 0 0 1px rgba(201, 104, 58, .35), 0 22px 48px rgba(61, 52, 30, .2); }
.cm-portrait img { width: 100%; height: 100%; object-fit: cover; }
.cm-monogram { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; font-family: var(--cm-serif); font-size: 3.6rem; font-weight: 600; color: var(--cm-green); background: radial-gradient(circle at 50% 35%, #fbf3e6, var(--cm-beige)); }
.cm-branch { position: absolute; z-index: 2; width: 92px; height: auto; color: var(--cm-leaf); opacity: .9; pointer-events: none; }
.cm-branch--left { left: calc(50% - 190px); bottom: 0; }
.cm-branch--right { right: calc(50% - 185px); top: 4px; transform: rotate(180deg); width: 76px; opacity: .75; }

/* Section navigation */
.cm-subnav { position: sticky; top: var(--cm-sticky-top, 0px); z-index: 20; display: flex; justify-content: center; margin: 22px auto 0; pointer-events: none; }
body.admin-bar .cm-subnav { top: calc(var(--cm-sticky-top, 0px) + 32px); }
.cm-subnav ul { pointer-events: auto; display: flex; gap: 4px; max-width: 100%; overflow-x: auto; padding: 6px !important; background: rgba(251, 247, 238, .92); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border: 1px solid var(--cm-line); border-radius: 999px; box-shadow: var(--cm-shadow); scrollbar-width: none; }
.cm-subnav ul::-webkit-scrollbar { display: none; }
.cm-subnav a { display: block; padding: .45em 1em; border-radius: 999px; color: var(--cm-green); font-weight: 600; font-size: .9rem; text-decoration: none; white-space: nowrap; transition: background-color .2s, color .2s; }
.cm-subnav a:hover { background: var(--cm-beige); color: var(--cm-green); }
.cm-subnav a.is-active { background: var(--cm-green); color: #fff; }

/* Sections */
.cm-body { max-width: 880px; margin: 0 auto; }
.cm-section { margin-top: clamp(52px, 8vw, 88px); scroll-margin-top: 96px; }
.cm-section__head { text-align: center; margin-bottom: 28px; }
.cm-memorial .cm-section__title { font-family: var(--cm-serif); font-weight: 600; font-size: clamp(2rem, 4.6vw, 2.8rem); line-height: 1.1; color: var(--cm-green); margin: .15em 0 0; }
.cm-section__summary { margin-top: 6px !important; color: var(--cm-muted); }

/* Notices */
.cm-notice { padding: 14px 18px; border-radius: 14px; margin: 0 0 22px; font-weight: 600; }
.cm-notice--ok { background: #edf4e4; border: 1px solid #bfd3a5; color: var(--cm-green-deep); }
.cm-notice--error { background: #fbeae6; border: 1px solid #eab8ab; color: #8a2c17; }

/* Badges */
.cm-badge { display: inline-flex; align-items: center; gap: .45em; padding: .38em .85em; border-radius: 999px; background: var(--cm-beige); color: var(--cm-green); font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; line-height: 1.2; }
.is-live .cm-badge, .cm-badge.is-live { background: var(--cm-live); color: #fff; }
.is-live .cm-badge::before, .cm-badge.is-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: cm-pulse 1.6s infinite; }
.is-upcoming .cm-badge, .cm-badge.is-upcoming { background: var(--cm-peach-soft); color: var(--cm-accent-deep); }
.cm-badge--inline { font-size: .62rem; vertical-align: middle; background: var(--cm-green); color: #fff; }

/* Livestream */
.cm-stream { background: var(--cm-card); border: 1px solid var(--cm-line); border-radius: var(--cm-radius); overflow: hidden; box-shadow: var(--cm-shadow); }
.cm-stream + .cm-stream { margin-top: 26px; }
.cm-stream__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 16px 22px; }
.cm-memorial .cm-stream__title { font-family: var(--cm-serif); font-size: 1.45rem; font-weight: 600; color: var(--cm-green); line-height: 1.2; }
.cm-stream__when { width: 100%; color: var(--cm-muted); font-size: .92rem; }
.cm-countdown { font-weight: 700; color: var(--cm-accent-deep); }
.cm-countdown:not(:empty)::before { content: "· "; color: var(--cm-muted); font-weight: 400; }
.cm-player { position: relative; aspect-ratio: 16 / 9; background: #10140d; }
.cm-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.cm-memorial .cm-stream__foot { padding: 12px 22px; font-size: .88rem; color: var(--cm-muted); }
.cm-memorial .cm-stream__link { padding: 8px 22px 24px; }

/* Schedule */
.cm-schedule { background: linear-gradient(180deg, #f2ecdd, var(--cm-beige)); border: 1px solid var(--cm-line); border-radius: var(--cm-radius); padding: clamp(22px, 4vw, 38px); box-shadow: var(--cm-shadow); }
.cm-day + .cm-day { margin-top: 30px; }
.cm-memorial .cm-day__title { text-align: center; color: var(--cm-accent); font-size: 1.1rem; font-weight: 700; margin-bottom: 14px; font-family: inherit; }
.cm-event { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 18px; padding: 16px 0 !important; border-top: 1px dashed rgba(61, 90, 42, .25); }
.cm-event:first-child { border-top: 0; }
.cm-event__time { font-family: var(--cm-serif); font-weight: 700; font-size: 1.4rem; line-height: 1.2; color: var(--cm-green); white-space: nowrap; }
.cm-event__title { font-weight: 600; font-size: 1.08rem; color: var(--cm-ink); }
.cm-event__place { font-weight: 600; color: var(--cm-green); margin-top: 2px !important; }
.cm-event__address { color: var(--cm-muted); font-size: .94rem; }
.cm-event__links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px !important; font-size: .86rem; }
.cm-event__links a { display: inline-flex; align-items: center; gap: .35em; color: var(--cm-accent-deep); font-weight: 600; text-decoration: none; }
.cm-event__links a:hover { text-decoration: underline; }
.cm-event.is-past { opacity: .5; }
.cm-event.is-now { background: rgba(255, 255, 255, .6); border-radius: 14px; margin: 0 -14px !important; padding: 16px 14px !important; }

/* Life story */
.cm-prose { max-width: 68ch; margin: 0 auto; font-size: 1.08rem; line-height: 1.85; color: var(--cm-ink); }
.cm-prose p { margin: 0 0 1.1em; }
.cm-prose > p:first-child::first-letter { float: left; font-family: var(--cm-serif); font-size: 3.6em; line-height: .85; padding: .06em .1em 0 0; color: var(--cm-accent); font-weight: 600; }

/* Family */
.cm-family { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.cm-kin { flex: 1 1 190px; max-width: 280px; background: var(--cm-card); border: 1px solid var(--cm-line); border-radius: 18px; padding: 22px 18px !important; text-align: center; box-shadow: var(--cm-shadow); }
.cm-kin__relation { font-size: .74rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--cm-accent); }
.cm-kin__names { font-family: var(--cm-serif); font-size: 1.4rem; font-weight: 600; line-height: 1.3; color: var(--cm-green); margin-top: 6px !important; }
.cm-kin__note { color: var(--cm-muted); font-size: .86rem; margin-top: 4px !important; }

/* Gallery */
.cm-gallery { columns: 3 220px; column-gap: 12px; }
.cm-gallery li { break-inside: avoid; margin-bottom: 12px !important; }
.cm-gallery a { display: block; overflow: hidden; border-radius: 14px; background: var(--cm-beige); }
.cm-gallery img { width: 100%; transition: transform .4s ease; }
.cm-gallery a:hover img { transform: scale(1.03); }
.cm-share-photo { margin-top: 24px; text-align: center; }
.cm-share-photo > summary { list-style: none; display: inline-flex; }
.cm-share-photo > summary::-webkit-details-marker { display: none; }
.cm-share-photo[open] > summary { margin-bottom: 18px; }
.cm-share-photo .cm-form { text-align: left; background: var(--cm-card); border: 1px solid var(--cm-line); border-radius: var(--cm-radius); padding: clamp(20px, 4vw, 30px); box-shadow: var(--cm-shadow); }

/* Messages */
.cm-candle-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 18px; padding: 18px 22px; margin-bottom: 26px; text-align: center; background: linear-gradient(135deg, #fff7ec, #fbeedf); border: 1px solid #f0d9bd; border-radius: 18px; }
.cm-candle-strip p { color: #7a4a2a; font-family: var(--cm-serif); font-size: 1.2rem; font-style: italic; }
.cm-candle-strip__flames { display: flex; gap: 2px; color: #d9c2a3; }
.cm-candle-strip__flames .cm-icon { width: 22px; height: 26px; }
.cm-candle-strip__flames .cm-flame { animation: cm-flicker 1.8s infinite alternate; }
.cm-candle-strip__flames .cm-icon:nth-child(2n) .cm-flame { animation-delay: .5s; }
.cm-candle-strip__flames .cm-icon:nth-child(3n) .cm-flame { animation-delay: .9s; }
.cm-message-list { display: grid; gap: 14px; }
.cm-message { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 14px; background: var(--cm-card); border: 1px solid var(--cm-line); border-radius: 18px; padding: 18px 20px !important; box-shadow: var(--cm-shadow); }
.cm-avatar { display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 50%; color: #fff; font-family: var(--cm-serif); font-weight: 700; font-size: 1.1rem; letter-spacing: .02em; }
.cm-avatar--0 { background: #7f9b5b; } .cm-avatar--1 { background: #c9683a; } .cm-avatar--2 { background: #8a6f4d; }
.cm-avatar--3 { background: #5d7d88; } .cm-avatar--4 { background: #8d5a6e; } .cm-avatar--5 { background: #3d5a2a; }
.cm-message header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.cm-message header strong { font-size: 1.03rem; color: var(--cm-ink); }
.cm-message header span { color: var(--cm-muted); font-size: .86rem; }
.cm-message header time { margin-left: auto; color: var(--cm-muted); font-size: .8rem; }
.cm-message__text { margin-top: 6px; font-size: 1rem; line-height: 1.7; overflow-wrap: anywhere; }
.cm-message__text p { margin: 0 0 .6em; }
.cm-message__text p:last-child { margin: 0; }

/* Forms */
.cm-form-card { margin-top: 32px; background: var(--cm-card); border: 1px solid var(--cm-line); border-radius: var(--cm-radius); padding: clamp(22px, 4vw, 34px); box-shadow: var(--cm-shadow); scroll-margin-top: 96px; }
.cm-memorial .cm-form-card h3 { font-family: var(--cm-serif); font-size: 1.75rem; font-weight: 600; color: var(--cm-green); line-height: 1.2; }
.cm-form-card > p { color: var(--cm-muted); margin: 4px 0 20px; }
.cm-form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.cm-field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 16px; font-weight: normal; }
.cm-field > span { font-size: .88rem; font-weight: 600; color: var(--cm-ink); }
.cm-field em { color: var(--cm-accent); font-style: normal; }
.cm-memorial .cm-form input[type="text"], .cm-memorial .cm-form input[type="email"], .cm-memorial .cm-form input[type="file"],
.cm-memorial .cm-form select, .cm-memorial .cm-form textarea {
  width: 100%; max-width: none; height: auto; min-height: 46px; margin: 0; padding: .72em .9em;
  border: 1px solid #d6cdb8; border-radius: 12px; background: #fffefb; color: var(--cm-ink);
  font: inherit; font-size: 1rem; line-height: 1.45; box-shadow: none; text-transform: none; letter-spacing: normal;
  transition: border-color .2s, box-shadow .2s;
}
.cm-memorial .cm-form textarea { min-height: 130px; resize: vertical; }
.cm-memorial .cm-form input:focus, .cm-memorial .cm-form select:focus, .cm-memorial .cm-form textarea:focus { outline: none; border-color: var(--cm-leaf); box-shadow: 0 0 0 3px rgba(127, 155, 91, .25); }
.cm-memorial .cm-drop input[type="file"] { padding: 1.1em; border-style: dashed; background: var(--cm-paper); cursor: pointer; }
.cm-drop__hint { font-size: .85rem; color: var(--cm-accent-deep); font-weight: 600; }
.cm-counter { align-self: flex-end; color: var(--cm-muted); font-size: .78rem; }
.cm-form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.cm-form__note { color: var(--cm-muted); font-size: .83rem; flex: 1 1 240px; }
.cm-hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Funeral notice */
.cm-notice-card__image { display: block; border-radius: 16px; overflow: hidden; box-shadow: var(--cm-shadow); border: 1px solid var(--cm-line); }

/* Closing */
.cm-closing { text-align: center; margin: clamp(60px, 9vw, 96px) 0 24px; }
.cm-flowers { max-width: 560px; margin: 0 auto 40px; padding: 26px; background: var(--cm-peach-soft); border: 1px solid #f0d9bd; border-radius: 18px; }
.cm-flowers p:not(.cm-kicker) { margin: 8px 0 16px !important; }
.cm-closing__text { max-width: 34em; margin: 10px auto 0 !important; font-family: var(--cm-serif); font-style: italic; font-size: 1.3rem; line-height: 1.5; color: var(--cm-ink); }
.cm-closing__eternal { margin-top: 16px !important; font-size: .82rem; font-weight: 700; letter-spacing: .32em; text-transform: uppercase; color: var(--cm-accent); }

/* Share menu */
.cm-share { position: relative; display: inline-block; }
.cm-share__menu { position: absolute; z-index: 30; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); min-width: 190px; padding: 6px; background: #fff; border: 1px solid var(--cm-line); border-radius: 14px; box-shadow: 0 16px 40px rgba(40, 35, 20, .18); text-align: left; }
.cm-memorial .cm-share__menu a, .cm-memorial .cm-share__menu button { display: block; width: 100%; padding: .6em .9em; border: 0; border-radius: 10px; background: none; color: var(--cm-ink); font: inherit; font-size: .93rem; text-align: left; text-decoration: none; cursor: pointer; }
.cm-memorial .cm-share__menu a:hover, .cm-memorial .cm-share__menu button:hover { background: var(--cm-paper); }

/* Lightbox */
.cm-lightbox { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(18, 20, 14, .93); }
.cm-lightbox figure { margin: 0; text-align: center; }
.cm-lightbox img { max-width: min(92vw, 1400px); max-height: 82vh; width: auto; border-radius: 8px; margin: 0 auto; }
.cm-lightbox figcaption { color: #ece6d8; margin-top: 12px; font-size: .95rem; }
.cm-memorial .cm-lightbox button { position: absolute; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; }
.cm-memorial .cm-lightbox button:hover { background: rgba(255, 255, 255, .28); }
.cm-lightbox__close { top: 18px; right: 18px; }
.cm-lightbox__nav--prev { left: 18px; top: 50%; transform: translateY(-50%); }
.cm-lightbox__nav--next { right: 18px; top: 50%; transform: translateY(-50%); }
body.cm-lb-open { overflow: hidden; }

/* Archive */
.cm-archive { max-width: 1120px; margin: 0 auto; padding: clamp(24px, 5vw, 56px) clamp(16px, 3vw, 24px); }
.cm-archive__head { text-align: center; margin-bottom: clamp(30px, 5vw, 48px); }
.cm-archive .cm-archive__title { font-family: var(--cm-serif); font-weight: 600; font-size: clamp(2.6rem, 6vw, 4rem); line-height: 1.05; color: var(--cm-green); margin-top: .15em; }
.cm-archive__intro { max-width: 40em; margin: 0 auto !important; color: var(--cm-muted); font-size: 1.05rem; }
.cm-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 26px; }
.cm-card > a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; height: 100%; padding: 30px 22px 26px; text-align: center; text-decoration: none; color: var(--cm-ink); background: radial-gradient(ellipse at 50% 20%, rgba(244, 211, 181, .45), transparent 60%), var(--cm-paper); border: 1px solid var(--cm-line); border-radius: 24px; box-shadow: var(--cm-shadow); transition: transform .25s, box-shadow .25s; }
.cm-card > a::before { content: ""; position: absolute; inset: 8px; border: 1px solid rgba(61, 90, 42, .18); border-radius: 18px; pointer-events: none; }
.cm-card > a:hover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(61, 52, 30, .06), 0 22px 44px rgba(61, 52, 30, .14); }
.cm-portrait--card { width: 150px; border-width: 5px; margin-bottom: 6px; }
.cm-archive .cm-card__name { font-family: var(--cm-serif); font-size: 1.85rem; font-weight: 600; line-height: 1.1; color: var(--cm-green); }
.cm-card .cm-lifespan { font-size: .9rem; }
.cm-card__link { margin-top: auto; padding-top: 8px; color: var(--cm-accent-deep); font-weight: 700; font-size: .9rem; }
.cm-pagination { max-width: 1120px; margin: 0 auto 40px; text-align: center; }

/* Animations */
@keyframes cm-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes cm-flicker { 0% { transform: scale(1, 1) rotate(-2deg); } 50% { transform: scale(.94, 1.06) rotate(2deg); } 100% { transform: scale(1.03, .96) rotate(-1deg); } }
@media (prefers-reduced-motion: reduce) {
  .cm-memorial *, .cm-archive * { animation: none !important; transition: none !important; }
}

/* Responsive */
@media (max-width: 820px) {
  .cm-hero__frame { grid-template-columns: 1fr; gap: 18px; }
  .cm-hero__portrait { order: -1; }
  .cm-portrait { width: 210px; }
  .cm-branch--left { left: calc(50% - 150px); width: 72px; }
  .cm-branch--right { right: calc(50% - 145px); width: 60px; }
}
@media (max-width: 782px) {
  body.admin-bar .cm-subnav { top: calc(var(--cm-sticky-top, 0px) + 46px); }
}
@media (max-width: 600px) {
  .cm-memorial .cm-actions .cm-btn { flex: 1 1 calc(50% - 10px); }
  .cm-actions .cm-share { flex: 1 1 calc(50% - 10px); }
  .cm-actions .cm-share > .cm-btn { width: 100%; }
  .cm-subnav { justify-content: flex-start; }
  .cm-event { grid-template-columns: 1fr; gap: 2px; }
  .cm-form__grid { grid-template-columns: 1fr; }
  .cm-message { grid-template-columns: 1fr; }
  .cm-message .cm-avatar { display: none; }
  .cm-message header time { margin-left: 0; width: 100%; }
  .cm-gallery { columns: 2 140px; }
}

/* Print: the page doubles as a printable order of service */
@media print {
  .cm-subnav, .cm-actions, .cm-form-card, .cm-share-photo, .cm-candle-strip, .cm-player, .cm-stream__foot, .cm-event__links, .cm-lightbox, .cm-branch { display: none !important; }
  .cm-hero__frame, .cm-stream, .cm-schedule, .cm-kin, .cm-message { box-shadow: none; }
  .cm-section { break-inside: avoid-page; }
}
