:root {
  --bg:#080d13;
  --surface:#141c25;
  --line:#2c3f4e;
  --text:#ebeff3;
  --muted:#b5c3d0;
  --orange:#ff8a00;
  --serif:Georgia, "Times New Roman", serif;
  --gutter:clamp(18px, 6.25vw, 96px);
}
* { box-sizing:border-box }
[hidden] { display:none !important }
body { margin:0; position:relative; color:var(--text); background:var(--bg); font-family:Inter,system-ui,"Segoe UI",sans-serif }
a { color:inherit; text-decoration:none }
button,input,textarea,select { font:inherit }
button { cursor:pointer }
button:focus-visible,a:focus-visible { outline:2px solid #ffb457; outline-offset:4px }
.site-scene {
  position:absolute; z-index:-1; inset:0 0 auto; height:clamp(480px,50vw,720px);
  background:linear-gradient(0deg,var(--bg),transparent 30%),linear-gradient(90deg,#03070b5e,transparent 70%),url("/images/moonlit-cemetery.webp") right center/cover no-repeat;
}
.header, .shell, .hero-inner { width:min(100% - 2 * var(--gutter), 1400px); margin-inline:auto }
.header { min-height:74px; display:flex; align-items:center; justify-content:space-between; gap:24px; position:relative; z-index:3 }
.brand { display:inline-flex; align-items:center; gap:10px; white-space:nowrap }
.brand img { width:48px; height:48px }
.brand strong { font-size:clamp(20px,2.3vw,28px); letter-spacing:-.04em; color:white }
.brand small { display:block; font-size:12px; color:var(--muted) }
.accent { color:var(--orange) }
nav { display:flex; align-items:center; gap:clamp(14px,2vw,34px); font-size:14px; font-weight:650 }
nav a:hover,.back-link:hover,.text-button:hover { color:var(--orange) }
.nav-toggle { display:none }
.btn { min-height:48px; border-radius:28px; border:1px solid transparent; padding:10px 22px; display:inline-flex; justify-content:center; align-items:center; gap:8px; font-weight:750; font-size:14px; text-align:center }
.btn-primary { background:var(--orange); color:#10100d }
.btn-primary:hover { background:#ffad38 }
.btn-outline { background:#0a141caa; color:white; border-color:#d0dbe5 }
.btn-outline:hover { background:#202f3d }
.header-cta { white-space:nowrap; min-height:40px; padding-inline:16px }
.cta-icon { width:26px; height:26px; filter:brightness(0) }
.hero { min-height:clamp(355px,39vw,525px); display:flex; align-items:center }
.hero-inner { padding:35px 0 63px; }
.hero h1 { font:700 clamp(55px,8.1vw,112px)/.88 var(--serif); letter-spacing:-.048em; margin:0 0 20px; color:#e5edf4; text-shadow:0 4px 18px #03070b }
.hero p { max-width:440px; color:#cad7e5; font-size:clamp(16px,1.7vw,21px); line-height:1.45; margin:0 0 22px; text-shadow:0 2px 6px black }
.hero-actions { display:flex; flex-wrap:wrap; gap:12px }
.stats { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:15px; padding:17px 20px; border:1px solid #3a5266; border-radius:17px; background:#0e1822eb; box-shadow:inset 0 0 20px #4d688424,0 10px 36px #0205097d }
.stats>div { display:grid; grid-template-columns:auto 1fr; align-content:center; column-gap:12px }
.stat-icon { grid-row:span 2; align-self:center; font-size:clamp(22px,3vw,38px) }
.stats strong { font-size:clamp(15px,1.8vw,22px); white-space:nowrap }
.stats small,.stats-note,.section-note { color:var(--muted); font-size:13px }
.stats-note { margin:8px 0 0; text-align:right }
.section { margin-top:34px; scroll-margin-top:16px }
.section-heading { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:16px }
.section h2,.about h2 { font:700 clamp(26px,3vw,42px)/1.1 var(--serif); margin:0 }
.text-button { min-height:44px; padding:0; border:0; background:none; color:var(--text); text-align:left }
.filters { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 18px }
.chip,.detail-tabs button { min-height:44px; padding:6px 15px; background:#141e29; border:1px solid var(--line); border-radius:22px; color:var(--text) }
.chip.active,.detail-tabs button[aria-pressed=true] { color:#ffa433; border-color:#754a21; background:#3b2817 }
.graves,.rankings { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:clamp(12px,2vw,25px) }
.graves { row-gap:25px }
.grave { min-width:0 }
.grave-link { position:relative; isolation:isolate; display:flex; flex-direction:column; align-items:center; text-align:center; height:clamp(282px,29vw,370px); padding:9% 12% 8%; transition:transform .2s; border-radius:48% 48% 12px 12px / 23% 23% 12px 12px }
.grave-link:hover { transform:translateY(-5px) }
.stone { position:absolute; z-index:-1; inset:0 }
.stone-face { position:absolute; inset:0; background:url("/images/granite-headstone.webp") center/100% 100% no-repeat; filter:drop-shadow(0 8px 12px #020509ad) }
.grave-icon { display:block; position:absolute; top:10%; left:50%; transform:translateX(-50%); filter:grayscale(.9) brightness(1.25); font-size:clamp(28px,4vw,53px); line-height:1 }
.grave h3 { margin:clamp(55px,6vw,82px) 0 12px; color:white; font-size:clamp(16px,1.7vw,24px); line-height:1.1; text-shadow:0 2px 4px black; overflow-wrap:anywhere }
.grave time { color:#e0e3e8; font-size:clamp(12px,1vw,14px); text-shadow:0 1px 4px black }
.epitaph { color:#faf7f3; margin:11px 0 6px; line-height:1.3; font-size:clamp(13px,1.2vw,16px); text-shadow:0 1px 4px black; overflow-wrap:anywhere; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; overflow:hidden }
.counts { display:flex; justify-content:center; flex-wrap:wrap; gap:4px 10px; margin-top:auto; font-weight:650; font-size:clamp(11px,1vw,14px); text-shadow:0 2px 4px black }
.center { text-align:center; margin-top:24px }
.rank-card { display:grid; grid-template-columns:auto 1fr; align-content:center; gap:4px 10px; border:1px solid var(--line); border-radius:14px; background:linear-gradient(135deg,#18222c,#101821); padding:14px 12px }
.rank-card span { grid-row:span 2; align-self:start; display:grid; place-items:center; width:42px; height:42px; border-radius:50%; background:#263340; font-size:25px }
.rank-card strong { font-size:14px }
.rank-card p { margin:0; color:var(--muted); font-size:13px; line-height:1.4 }
.upgrades { padding-top:26px; border-top:1px solid var(--line); margin-top:38px }
.receipt { border:1px solid #3f3c34; border-radius:10px; background:#151c23; padding:12px; display:grid; gap:7px; font-size:13px }
.receipt strong { color:#ffb457 }
.receipt span { display:flex; align-items:baseline; justify-content:space-between; gap:8px; color:#d4dce4 }
.receipt b { color:#f4e8d6; white-space:nowrap }
.marble .stone-face { filter:brightness(1.22) saturate(.45) drop-shadow(0 0 10px #bddfff4a) }
.gold .stone-face { filter:sepia(.88) saturate(1.5) brightness(1.1) drop-shadow(0 0 12px #ffac425e) }
.ghost .stone-face { filter:hue-rotate(18deg) drop-shadow(0 0 12px #86b8ff59) }
.ceremony .stone-face { filter:drop-shadow(0 0 15px #f2a24955) }
.ornament,.detail-flowers,.detail-candle { position:absolute; z-index:1; bottom:9%; right:3%; font-size:clamp(26px,3.8vw,51px); filter:drop-shadow(0 0 10px #ff933e91); pointer-events:none }
.ghost .ornament { top:11%; bottom:auto; filter:drop-shadow(0 0 11px #88caff); animation:float 3s ease-in-out infinite alternate }
.gold .ornament,.detail-candle { animation:flicker 2.4s ease-in-out infinite alternate }
@keyframes float { to { transform:translateY(-9px) } }
@keyframes flicker { 65% { filter:drop-shadow(0 0 19px #ff902eee) } }
.about { margin:54px 0 34px; padding:clamp(20px,4vw,45px); border:1px solid var(--line); border-radius:18px; background:linear-gradient(110deg,#19242f,#0d151e); display:grid; grid-template-columns:1.35fr 1fr; gap:26px; align-items:center }
.about h2 { margin-top:8px }
.about p,.quote span { color:var(--muted) }
.quote { padding:12px 18px; border-left:3px solid var(--orange); font:italic 24px/1.4 var(--serif) }
.quote span { display:block; font:13px system-ui,sans-serif; margin-top:10px }
.eyebrow { color:#ffac49; font-size:12px; font-weight:700 }
footer { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; padding:20px 0 30px; border-top:1px solid var(--line); gap:15px; color:var(--muted); font-size:13px }
.on-grave .site-scene { opacity:.32; height:500px }
.grave-page { max-width:1040px; padding:10px 0 45px }
.back-link { display:inline-flex; align-items:center; min-height:44px; color:var(--muted); font-size:14px }
.detail-layout { display:grid; grid-template-columns:minmax(200px,.7fr) minmax(0,1fr); gap:clamp(24px,5vw,60px); align-items:start }
.detail-portrait { position:relative; isolation:isolate; aspect-ratio: .84; max-height:440px; width:100%; margin-top:8px; text-align:center }
.detail-portrait .grave-icon { font-size:clamp(44px,6vw,78px); top:14% }
.engraving { display:block; position:absolute; top:38%; inset-inline:19%; color:#e5ddd0; text-shadow:0 2px 4px #000; font:700 clamp(22px,3.2vw,41px)/1.05 var(--serif); overflow-wrap:anywhere }
.detail-flowers { right:auto; left:2%; bottom:10% }
.detail-candle { bottom:8%; right:5% }
.detail-copy h1 { font-size:clamp(25px,4vw,43px); letter-spacing:-.035em; line-height:1.1; margin:8px 0 12px; overflow-wrap:anywhere }
.detail-tags { display:flex; flex-wrap:wrap; gap:9px; align-items:center }
.category-tag,.tag { display:inline-block; padding:5px 10px; border-radius:20px; background:#26313d; font-size:13px }
.tag { color:#ffb650; background:#432e19 }
.detail-facts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px 20px; margin:16px 0 }
.detail-facts div { display:flex; gap:6px; flex-wrap:wrap; font-size:14px }
.detail-facts dt { color:var(--muted) }
.detail-facts dt::after { content:":" }
.detail-facts dd { margin:0 }
.detail-copy h2 { font-size:16px; margin:13px 0 5px }
.detail-copy p,.tab-content p { color:#d6e0e9; line-height:1.55; margin:0 0 9px; overflow-wrap:anywhere }
.detail-copy .receipt { margin-top:16px }
.reactions { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:10px; margin:24px 0 18px }
.reaction { min-height:85px; border:1px solid #283746; border-radius:12px; color:var(--text); background:#151e28; padding:8px; font-size:13px }
.reaction span,.reaction small { display:block }
.reaction span { font-size:25px; line-height:1.25; margin-bottom:4px }
.reaction small { color:var(--muted) }
.reaction:hover,.reaction[aria-pressed=true] { border-color:#d98a38; background:#36291d }
.detail-tabs { display:flex; gap:8px; border-bottom:1px solid var(--line); padding-bottom:8px }
.tab-content { padding-top:12px }
.epitaph-comment { border-bottom:1px solid #263543; padding:8px 0 }
.epitaph-comment strong { font-size:13px; color:#b8c8d6 }
.ceremony-playing { animation:ceremony 1.8s ease both }
@keyframes ceremony { 0% { opacity:.25; transform:translateY(12px) } 50% { filter:drop-shadow(0 0 32px #ffae4f) } }
.modal-backdrop { position:fixed; inset:0; z-index:10; display:none; background:#020509d9; padding:14px; place-items:center }
.modal-backdrop.open { display:grid }
.modal { position:relative; width:min(700px,100%); max-height:calc(100dvh - 28px); overflow:auto; border:1px solid var(--line); border-radius:18px; background:#131e29; padding:clamp(18px,4vw,34px) }
.close { position:absolute; top:5px; right:8px; width:44px; height:44px; border:0; background:none; color:white; font-size:30px }
.modal h2 { font:700 30px var(--serif); margin:10px 25px 10px 0 }
.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px }
.field { display:grid; gap:5px; min-width:0 }
.field.full { grid-column:1/-1 }
.field label,.hint { color:var(--muted); font-size:13px }
.field input,.field select,.field textarea { width:100%; min-height:44px; border:1px solid #405466; border-radius:8px; color:white; background:#0b1722; padding:8px; color-scheme:dark }
.field textarea { min-height:80px; resize:vertical }
.toast { position:fixed; z-index:12; inset:auto auto 18px 50%; transform:translateX(-50%); max-width:calc(100% - 32px); width:max-content; overflow-wrap:anywhere; background:#ffad38; color:#17100a; border-radius:10px; padding:10px 15px; opacity:0; pointer-events:none }
.toast.show { opacity:1 }
@media (max-width:1050px) {
  .header { gap:15px }
  nav { gap:13px; font-size:13px }
}
@media (max-width:860px) {
  .header { min-height:65px }
  .header-cta { display:none }
  .nav-toggle { display:inline-grid; place-items:center; min-width:44px; min-height:44px; border:0; color:white; background:#0a111bcf; border-radius:8px; font-size:21px }
  nav { display:none; position:absolute; top:100%; right:0; width:min(270px,100%); padding:8px 14px; background:#101b25; border:1px solid var(--line); border-radius:12px }
  nav.open { display:grid; gap:0 }
  nav a { display:flex; align-items:center; min-height:44px }
  .graves,.rankings { grid-template-columns:repeat(2,minmax(0,1fr)) }
  .grave-link { max-width:310px; width:100%; margin:auto; height:330px; padding-top:26px }
  .grave h3 { margin-top:66px }
  .stats { grid-template-columns:repeat(3,minmax(0,1fr)) }
}
@media (max-width:560px) {
  .brand img { width:39px; height:39px }
  .site-scene { height:490px; background-position:66% center; background-image:linear-gradient(0deg,var(--bg),#080d1370 35%,#080d1340 68%,transparent),url("/images/moonlit-cemetery.webp") }
  .hero { min-height:370px; text-align:center }
  .hero-inner { padding:67px 0 34px }
  .hero h1 { font-size:clamp(45px,11.6vw,64px); margin-bottom:16px }
  .hero p { margin:0 auto 15px; font-size:15px }
  .hero-actions { display:grid; gap:8px; max-width:330px; margin:auto }
  .stats { grid-template-columns:repeat(2,minmax(0,1fr)); gap:13px 8px; padding:14px 11px }
  .stats>div { column-gap:6px }
  .stats small { font-size:12px }
  .stats-note { text-align:left }
  .graves { grid-template-columns:1fr; justify-items:center }
  .grave { width:min(100%,295px) }
  .grave-link { height:340px }
  .grave-icon { font-size:44px }
  .grave h3 { font-size:21px }
  .rankings,.about,.detail-layout { grid-template-columns:1fr }
  .detail-portrait { width:min(260px,100%); margin-inline:auto }
  .detail-portrait .grave-icon { font-size:53px }
  .reactions { grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px }
  .section-heading { align-items:start }
  .section-heading .text-button { font-size:13px; min-width:90px; text-align:right }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation:none !important; transition:none !important }
}
body { isolation:isolate }
.detail-tabs { flex-wrap:wrap }
.reaction .revive-icon { color:#ff8a30 }
.share-link { float:right; font-size:13px; margin-left:10px }
.grave h3 { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; overflow:hidden; flex-shrink:0 }
.marble .stone-face { filter:grayscale(1) brightness(1.7) contrast(.82) drop-shadow(0 0 10px #bddfff4a) }
.gold .stone-face { filter:sepia(1) saturate(2.6) brightness(1.48) drop-shadow(0 0 12px #ffac425e) }
@media (max-width:560px) { .share-link { float:none; margin-left:0 } }
/* Grave page */
.on-grave .site-scene { display:none }
.on-grave::before {
  content:""; position:absolute; z-index:-1; top:0; right:0;
  width:min(48vw,700px); height:320px; opacity:.48; pointer-events:none;
  background:url("/images/moonlit-cemetery.webp") left top/255% auto no-repeat;
  transform:scaleX(-1);
  mask-image:linear-gradient(90deg,#000,transparent 90%),linear-gradient(#000,transparent);
  mask-composite:intersect;
}
.on-grave .header { border-bottom:1px solid #1c2833 }
.grave-page { max-width:980px; padding-top:10px }
.back-link { margin-bottom:3px }
.detail-layout { grid-template-columns:minmax(0,.73fr) minmax(0,1.27fr); gap:clamp(22px,3.2vw,48px); align-items:center }
.detail-portrait { max-height:408px; aspect-ratio:.83; margin-top:0; }
.featured-portrait { aspect-ratio: .78; margin:0; max-height:none }
.featured-portrait img {
  display:block; width:100%; height:100%; object-fit:contain;
  mask-image:linear-gradient(90deg,transparent,#000 7%,#000 92%,transparent),
    linear-gradient(transparent,#000 5%,#000 83%,transparent);
  mask-composite:intersect;
}
.detail-copy h1 { font-size:clamp(25px,3.25vw,38px); margin:0 0 10px }
.detail-copy h2 { margin:12px 0 4px }
.detail-copy p { line-height:1.45 }
.detail-copy .last-words { width:fit-content; margin-bottom:0; padding:4px 12px; border-radius:22px; background:#19222c; color:#edf1f5 }
.detail-facts { margin:13px 0 15px; gap:7px 12px }
.detail-facts div { align-items:baseline; flex-wrap:wrap; gap:3px 6px }
.detail-facts div::before { content:"◷"; color:#ffbc63; font-weight:700 }
.detail-facts div:nth-child(1)::before,.detail-facts div:nth-child(3)::before { content:"▦" }
.detail-facts div:nth-child(2)::before,.detail-facts div:nth-child(4)::before { content:"♙" }
.reactions { margin:17px 0 20px; gap:clamp(6px,1.2vw,14px) }
.reaction { min-height:94px; background:linear-gradient(140deg,#18212c,#131b24); border-color:#24303c; }
.reaction > img { display:block; width:35px; height:35px; object-fit:contain; margin:0 auto 4px }
.detail-tabs { padding:0; gap:8px }
.detail-tabs button { min-height:42px; padding:0 14px; border:0; border-radius:12px 12px 0 0; background:transparent; color:#b7c4d0; font-size:14px }
.detail-tabs button[aria-pressed=true] { background:linear-gradient(#3c2916,#272014); border-bottom:2px solid #ff8a00; color:#ffac49 }
.detail-tabs .share-link { margin-left:auto; padding-inline:6px }
.tab-content { padding-top:3px }
.epitaph-comment { display:grid; grid-template-columns:37px minmax(0,1fr) auto; align-items:center; gap:10px; padding:10px 0; }
.epitaph-comment small { font-size:12px; color:#9eafbf }
.epitaph-comment p { margin:2px 0 0; font-size:14px; line-height:1.4 }
.comment-avatar { width:36px; height:36px; display:grid; place-items:center; border:1px solid #586b7c; border-radius:50%; background:#273d4e; color:#eff4ff; font-weight:700 }
.epitaph-comment:nth-child(2) .comment-avatar { background:#403c45 }
.comment-likes { white-space:nowrap; font-size:13px; }
.comment-likes span { color:#ff865b; font-size:19px; vertical-align:middle }
.receipt > span { display:grid; grid-template-columns:42px minmax(0,1fr) auto; align-items:center; gap:8px; min-height:42px }
.receipt > span > span { display:block }
.bonus-preview { width:42px; height:42px; object-fit:contain; }
.ornament { width:clamp(49px,6.5vw,84px); height:clamp(49px,6.5vw,84px); object-fit:contain; bottom:6% }
.marble .ornament { right:auto; left:0 }
.ghost .ornament { width:clamp(58px,7.5vw,105px); height:clamp(58px,7.5vw,105px); right:0 }
@media (max-width:680px) {
  .detail-layout { grid-template-columns:1fr; gap:10px }
  .detail-portrait { width:min(290px, 100%); margin-inline:auto }
  .featured-portrait { width:min(280px, 100%); }
  .detail-copy h1 { margin-top:4px }
}
@media (max-width:400px) {
  .detail-tabs button { padding-inline:9px; font-size:13px }
  .detail-tabs .share-link { margin-left:0 }
}
.marble .stone-face {
  background-image:url("/images/bonus-marble.webp");
  filter:brightness(.89) drop-shadow(0 8px 12px #020509ad);
}
.gold .stone-face {
  background-image:url("/images/bonus-gold.webp");
  filter:brightness(.91) drop-shadow(0 8px 12px #020509ad);
}
.detail-layout:has(.featured-portrait) { align-items:start }
.detail-layout:has(.featured-portrait) .detail-copy { padding-top:12px }
/* Shared memorial composition. Project titles are live text. */
.detail-layout { align-items:start }
.detail-copy { padding-top:8px }
.detail-portrait { aspect-ratio:.8; max-height:435px; max-width:345px; margin-inline:auto }
.memorial-image {
  display:block; width:100%; height:100%; object-fit:fill;
  filter:brightness(.82) drop-shadow(0 14px 20px #030910);
  mask-image:linear-gradient(90deg,transparent,#000 6%,#000 94%,transparent),
    linear-gradient(transparent,#000 4%,#000 91%,transparent);
  mask-composite:intersect;
}
.memorial-emblem {
  position:absolute; top:16%; left:50%; transform:translateX(-50%);
  font:700 clamp(34px,5vw,70px)/1 var(--serif);
  color:#e1e5e7; text-shadow:0 2px 7px #080c10;
}
.detail-portrait .ornament.marble { left:0; right:auto; }
.detail-portrait .ornament.ghost { top:12%; bottom:auto; animation:float 3s ease-in-out infinite alternate }
.detail-portrait .ornament.gold { animation:flicker 2.4s ease-in-out infinite alternate }
.author-epitaph { margin:10px 0 0; padding:8px 11px; border-left:2px solid #947447; color:#d3dce4; font:italic 15px/1.4 var(--serif) }
.memorial-field { display:grid; grid-template-columns:minmax(0,1fr) 154px; gap:14px; align-items:center }
.memorial-field label { display:block; margin-bottom:5px }
.memorial-preview { position:relative; aspect-ratio:.82; text-align:center; font:700 12px/1.1 var(--serif) }
.memorial-preview img { width:100%; height:100%; object-fit:contain }
@media (max-width:680px) {
  .detail-portrait { width:min(270px,100%); }

}

.upgrades .grave-link { padding-inline:14% }
.upgrades .grave-link .ornament { bottom:5%; right:2%; width:20%; height:22% }
.upgrades .grave-link .marble .ornament { left:2%; right:auto }
.upgrades .grave-link .ghost .ornament { top:12%; bottom:auto }
.upgrades .grave-link .counts { padding:0 5px }
.stone-face img {
  display:block; width:100%; height:100%; object-fit:fill; filter:brightness(.7);
  mask-image:linear-gradient(90deg,transparent,#000 12%,#000 88%,transparent);
}
.upgrades .grave { display:flex; flex-direction:column }
.upgrades .grave-link { flex-shrink:0 }
.upgrades .receipt { flex:1; align-content:start }
#pageTitle:focus { outline:none }

@media (max-width:680px) {

}
/* Text bounds match the usable face of each stone. */
.detail-portrait,.memorial-preview {
  --face-left:22%; --face-right:22%; --face-top:34%; --face-bottom:25%;
  --emblem-top:19%;
}
[data-memorial="candlelight"] { --face-left:32%; --face-right:27%; --face-top:30%; --face-bottom:35%; --emblem-top:16% }
[data-memorial="rounded"] { --face-left:31%; --face-right:22%; --face-top:34%; --face-bottom:28%; --emblem-top:21% }
[data-memorial="granite-grid"] { --face-left:31%; --face-right:23%; --face-bottom:31% }
[data-memorial="rustic"] { --face-left:31%; --face-right:23%; --face-top:33%; --face-bottom:27% }
[data-memorial="slate"] { --face-left:29%; --face-right:22%; --face-bottom:29% }
[data-memorial="herb"] { --face-left:26%; --face-right:20%; --face-bottom:31% }
[data-memorial="iron"] { --face-left:33%; --face-right:23%; --face-bottom:28% }
[data-memorial="angular"] { --face-left:31%; --face-right:22%; --face-bottom:28% }
.detail-portrait .engraving,.memorial-preview .engraving {
  position:absolute; display:block; inset:var(--face-top) var(--face-right) var(--face-bottom) var(--face-left);
  color:#d2c3a9; text-shadow:0 -1px 1px #070809,0 1px 1px #0a0a09,0 0 6px #0d0e10;
  font:700 1rem/1.13 var(--serif); text-align:center; overflow:visible; overflow-wrap:normal;
}
.engraving-rip,.engraving-title { display:block }
.engraving-rip { font-size:clamp(13px,1.3vw,19px); letter-spacing:.1em; padding-bottom:.22em; color:#c1b49e }
.engraving-title { text-wrap:pretty }
.memorial-emblem {
  top:var(--emblem-top); left:calc((100% + var(--face-left) - var(--face-right)) / 2);
  font-size:clamp(24px,3.1vw,43px); color:#b7ada0; text-shadow:0 -1px 1px #06090a,0 1px 2px #05080b;
}
.memorial-preview img { object-fit:fill }
.memorial-preview .engraving-rip { font-size:8px }
@media (max-width:400px) {
  .memorial-field { grid-template-columns:minmax(0,1fr) 144px }
}

.stat-icon {
  width:clamp(24px,3.45vw,43px); height:clamp(24px,3.45vw,43px); object-fit:contain;
  filter:drop-shadow(0 2px 4px #020509a0);
}
.rank-icon { grid-row:span 2; align-self:start; width:42px; height:42px; object-fit:contain; }
.button-illustration,.timeline-icon { width:22px; height:22px; object-fit:contain; }
.timeline-icon { display:inline-block; vertical-align:middle; margin-right:8px }
.counts > span { display:inline-flex; align-items:center; gap:3px; }
.count-icon { width:17px; height:17px; object-fit:contain; }
.memorial-field label:not(:first-child) { margin-top:10px }
.memorial-preview .memorial-emblem { font-size:17px }

[x-cloak]{display:none !important}
.legal{padding:28px 0 48px}
.legal h1,.legal-doc h1{font:700 clamp(32px,4vw,48px)/1.1 Georgia,serif;margin:0 0 12px}
.legal-doc h2{font:700 28px/1.2 Georgia,serif;margin:28px 0 8px}
.legal-doc h3{margin:18px 0 6px}
.legal p,.legal-doc p,.legal-doc li{color:#d6e0e9;line-height:1.55}
.legal-doc a{color:#ffb457}
.legal-doc blockquote{margin:0 0 18px;padding:12px 16px;border-left:3px solid #ff8a00;background:#141c25;color:#f5e9d6}
.legal-doc table{width:100%;border-collapse:collapse;margin:12px 0 18px;font-size:14px}
.legal-doc th,.legal-doc td{border:1px solid #344353;padding:8px;vertical-align:top;text-align:left}
.legal-doc th{color:#ffb457}
.legal-notice{padding:12px 14px;border:1px solid #754a21;border-radius:12px;background:#3b2817;color:#f5e9d6}
.legal-related{display:flex;flex-wrap:wrap;gap:10px 16px;margin-top:28px}
.legal-form{width:min(760px,100%);margin-inline:auto}
.footer-requisites{color:#d6e0e9;font-size:13px;line-height:1.45}
.footer-requisites p{margin:0 0 4px}
.services-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:18px 0 28px}
.service-card{border:1px solid #344353;border-radius:16px;background:#141c25;padding:16px}
.service-card img{width:140px;height:140px;object-fit:contain}
.service-card h2{font:700 26px/1.15 Georgia,serif;margin:8px 0}
.service-price{color:#ff8a00;font-size:22px;font-weight:700}
.service-card dl{margin:0 0 12px}
.service-card dt{color:#ffb457;font-size:13px}
.service-card dd{margin:0 0 8px}
.service-card .btn[disabled]{opacity:.55;cursor:not-allowed}
.footer-links{display:flex;flex-wrap:wrap;gap:8px 14px;max-width:720px}
@media (max-width:700px){
  .services-grid{grid-template-columns:1fr}
}
.footer-links a,.footer-links button{color:#b5c3d0}
.footer-links a:hover,.footer-links button:hover{color:#ff8a00}
.cookie-banner{position:fixed;z-index:20;left:16px;right:16px;bottom:16px;max-width:720px;margin-inline:auto;padding:16px;border:1px solid #344353;border-radius:16px;background:#141c25f2;box-shadow:0 16px 40px #020509cc}
.cookie-banner p{margin:0 0 12px}
.hp{position:absolute;left:-9999px}
@media (max-width:560px){
  .cookie-banner .hero-actions{display:grid}
}
