:root {
  color-scheme: dark;
  --bg: #0b0c0e;
  --panel: #121418;
  --line: #292d34;
  --text: #f4f5f7;
  --muted: #a9afb8;
  --gold: #f1ab04;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 75% 10%, rgba(241,171,4,.12), transparent 30rem),
    linear-gradient(135deg, #090a0c, #111318);
  color: var(--text);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .22;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg,rgba(255,255,255,.04) 1px,transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000, transparent 85%);
}
main { position: relative; z-index: 1; min-height: calc(100vh - 76px); display: grid; place-items: center; padding: 70px 22px 50px; }
.notice { width: min(900px, 100%); }
.brand { display: flex; align-items: center; gap: 13px; margin-bottom: 70px; color: white; font-size: 1.05rem; font-weight: 800; letter-spacing: .08em; }
.brand strong { color: var(--gold); }
.brand-mark { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--gold); color: var(--gold); font-weight: 900; letter-spacing: -.04em; }
.music-toggle { position: absolute; top: 38px; right: max(22px,calc((100vw - 900px)/2)); z-index: 5; display: inline-flex; align-items: center; gap: 9px; min-height: 40px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 999px; background: rgba(18,20,24,.78); color: #c7cbd1; cursor: pointer; backdrop-filter: blur(8px); }
.music-toggle:hover { border-color: var(--gold); color: white; }
.music-toggle[aria-pressed="true"] { border-color: rgba(241,171,4,.55); color: var(--gold); background: rgba(241,171,4,.08); }
.music-icon { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(241,171,4,.12); color: var(--gold); font-size: 1rem; }
.music-toggle[aria-pressed="true"] .music-icon { animation: musicPulse 1.4s ease-in-out infinite; }
.music-label { font-size: .74rem; font-weight: 800; letter-spacing: .04em; }
.status { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; color: var(--gold); font-size: .78rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.status span { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 18px rgba(241,171,4,.75); }
h1 { max-width: 800px; margin: 0 0 25px; font-size: clamp(3rem, 7vw, 5.9rem); line-height: .98; letter-spacing: -.055em; }
.lead { max-width: 740px; margin: 0; color: #c9cdd3; font-size: clamp(1.08rem, 2vw, 1.3rem); line-height: 1.65; }
.law-note { display: grid; grid-template-columns: 125px 1fr; gap: 25px; margin: 34px 0 0; padding: 25px 28px; border: 1px solid var(--line); border-radius: 14px; background: rgba(18,20,24,.74); }
.law-note time { color: var(--gold); font-size: 1.25rem; font-weight: 900; letter-spacing: -.025em; }
.law-note strong { display: block; margin-bottom: 7px; }
.law-note p { margin: 0 0 9px; color: var(--muted); font-size: .91rem; line-height: 1.6; }
.law-note a { color: var(--gold); font-size: .82rem; font-weight: 800; text-decoration: none; }
.law-note a:hover { color: #ffc52a; text-decoration: underline; }
.memorial { position: relative; display: grid; place-items: end center; width: min(520px,100%); height: 310px; margin: -48px auto 52px; overflow: hidden; }
.moon { position: absolute; top: 16px; right: 64px; width: 88px; height: 88px; border-radius: 50%; background: radial-gradient(circle at 38% 34%,#fff4c7,#e1a82a 58%,#8e6510); box-shadow: 0 0 48px rgba(241,171,4,.28); opacity: .9; }
.tombstone { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; width: 250px; height: 230px; padding: 48px 25px 20px; border: 1px solid #545861; border-bottom: 0; border-radius: 125px 125px 10px 10px; background: linear-gradient(135deg,#32363d,#1b1e23 64%,#111318); box-shadow: inset 10px 8px 25px rgba(255,255,255,.03), 0 22px 45px rgba(0,0,0,.45); animation: rise 1.15s cubic-bezier(.2,.85,.3,1) both; }
.tombstone::before { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(255,255,255,.055); border-radius: 115px 115px 7px 7px; }
.tomb-small { position: relative; color: #aeb3bb; font-size: .72rem; font-weight: 800; letter-spacing: .27em; }
.tombstone strong { position: relative; color: var(--gold); font-size: 1.43rem; letter-spacing: .1em; }
.rip { position: relative; margin-top: 16px; font-family: Georgia,serif; font-size: 2.4rem; letter-spacing: .08em; text-shadow: 0 2px 0 #000; }
.tomb-line { position: relative; width: 70px; height: 1px; margin: 12px 0 9px; background: var(--gold); opacity: .6; }
.tombstone small { position: relative; color: #9298a1; font-size: .64rem; letter-spacing: .17em; }
.tombstone { height: 290px; padding-bottom: 48px; }
.memorial { height: 350px; }
.tomb-date { position: relative; margin-top: 8px; color: #d4d7dc; font-family: Georgia,serif; font-size: 1.25rem; }
.tombstone .tomb-caption { margin-top: 4px; letter-spacing: .03em; color: #b9bec6; }
.ground { position: absolute; z-index: 3; bottom: 0; width: 440px; height: 42px; border-radius: 50% 50% 0 0; background: linear-gradient(#191b1f,#0a0b0d); box-shadow: 0 -8px 24px rgba(0,0,0,.35); }
.spark { position: absolute; z-index: 1; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 16px var(--gold); animation: float 3.6s ease-in-out infinite; }
.spark-one { left: 74px; top: 104px; }
.spark-two { right: 36px; top: 180px; animation-delay: -1.8s; }
.thanks { display: grid; grid-template-columns: auto 1fr; gap: 22px; margin: 38px 0 42px; padding: 27px 30px; border: 1px solid rgba(241,171,4,.32); border-radius: 4px 17px 17px 4px; background: linear-gradient(110deg,rgba(241,171,4,.1),rgba(18,20,24,.68)); }
.thanks > span { color: var(--gold); font-family: Georgia,serif; font-size: 4.2rem; line-height: .8; }
.thanks h2 { margin: 0 0 8px; font-size: 1.42rem; letter-spacing: -.025em; }
.thanks p { margin: 0; color: #bec3ca; line-height: 1.65; }
.services { margin: 42px 0; padding: 26px 28px; border: 1px solid var(--line); border-radius: 16px; background: rgba(18,20,24,.74); }
.services p { margin: 0 0 13px; font-weight: 800; }
.services ul { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 35px; margin: 0; padding: 0; list-style: none; color: var(--muted); }
.services li { position: relative; padding-left: 18px; }
.services li::before { content: ""; position: absolute; left: 0; top: .7em; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.services .service-note { margin: 22px 0 0; padding-top: 20px; border-top: 1px solid var(--line); color: #c4c8ce; font-size: .93rem; font-weight: 400; line-height: 1.65; }
.next { padding-top: 4px; }
.service-choices { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.service-choice { display:flex; flex-direction:column; gap:12px; padding:24px; border:1px solid var(--gold); border-radius:16px; background:rgba(241,171,4,.06); color:var(--text); text-decoration:none; }
.service-choice strong { font-size:1.5rem; color:var(--gold); }
.service-choice span { line-height:1.5; }
.service-choice small { margin-top:auto; color:var(--muted); font-size:.9rem; }
.service-choice:hover { background:rgba(241,171,4,.14); }
.service-choice:focus-visible { outline:3px solid var(--gold); outline-offset:5px; }
@media(max-width:560px) { .service-choices { grid-template-columns:1fr; } }
.next > p { max-width: 680px; margin: 0 0 22px; color: var(--muted); }
.primary, .secondary { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; border-radius: 999px; font-weight: 850; text-decoration: none; }
.primary { gap: 16px; padding: 13px 22px; background: var(--gold); color: #15120a; }
.primary:hover { background: #ffc52a; }
.primary span { font-size: 1.25rem; }
.secondary { margin-left: 10px; padding: 12px 20px; border: 1px solid var(--line); color: #d9dde2; }
.secondary:hover { border-color: var(--gold); }
.locations { margin: 35px 0 0; color: #767d87; font-size: .82rem; }
.redirect-notice { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 24px; padding: 14px 17px; border-left: 3px solid var(--gold); background: rgba(241,171,4,.07); color: var(--muted); font-size: .84rem; }
.redirect-notice p { margin: 0; }
.redirect-notice strong { color: var(--text); }
.redirect-notice button { flex: 0 0 auto; padding: 7px 10px; border: 0; border-bottom: 1px solid #767d87; background: transparent; color: #c7cbd1; cursor: pointer; }
.redirect-notice button:hover { color: white; border-color: var(--gold); }
.redirect-notice.cancelled { border-left-color: #68707a; }
footer { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 20px; min-height: 76px; padding: 25px max(22px, calc((100vw - 850px) / 2)); border-top: 1px solid var(--line); color: #747b85; font-size: .8rem; }

@keyframes rise {
  from { opacity: 0; transform: translateY(90px) rotate(-2deg); }
  to { opacity: 1; transform: translateY(0) rotate(0); }
}

/* Memorial details: decorative only, with reduced-motion support below. */
.memorial { isolation: isolate; }
.candle { position: absolute; z-index: 5; bottom: 16px; width: 19px; height: 42px; border-radius: 4px 4px 2px 2px; background: linear-gradient(90deg,#938368,#f3e3bf 45%,#b5a184); box-shadow: 0 8px 18px #0008; }
.candle-left { left: calc(50% - 139px); transform: rotate(-3deg); }
.candle-right { right: calc(50% - 139px); height: 32px; }
.candle span { position: absolute; bottom: calc(100% + 3px); left: 4px; width: 11px; height: 23px; border-radius: 70% 30% 55% 45%; background: linear-gradient(#ffb327,#fff4bc); box-shadow: 0 0 16px #ffb327,0 0 38px #ffb32770; transform-origin: center bottom; animation: flame 2.7s ease-in-out infinite alternate; }
.candle-right span { animation-delay: -1.4s; }
.wreath { position: absolute; z-index: 4; bottom: 7px; left: calc(50% - 46px); width: 92px; height: 53px; border: 9px dotted #61705a; border-radius: 50%; background: #243326; transform: rotate(-8deg); box-shadow: 0 5px 12px #0008; }
.wreath span { position: absolute; top: 8px; left: -12px; width: 98px; padding: 3px; background: #191919; color: #e0cba0; text-align: center; letter-spacing: .25em; font-size: .57rem; border-block: 1px solid #968157; }
.mist { position: absolute; z-index: 6; pointer-events: none; bottom: -28px; left: -30%; width: 160%; height: 85px; background: radial-gradient(ellipse,#c0cbd52b,transparent 65%); filter: blur(9px); animation: drift 12s ease-in-out infinite alternate; }
.epitaph { margin: -28px 0 44px; text-align: center; font-family: Georgia,serif; font-style: italic; color: #c5bda8; font-size: clamp(.95rem,2.5vw,1.15rem); }
.last-service { margin: 28px 0; padding: 22px 25px; border: 1px dashed #5d5442; background: linear-gradient(120deg,#e0bd7910,transparent); border-radius: 6px; }
.service-stamp { display: inline-block; color: var(--gold); font-family: monospace; letter-spacing: .14em; font-size: .75rem; margin-bottom: 10px; }
.last-service p { display: flex; justify-content: space-between; gap: 18px; padding: 10px 0; margin: 0; border-bottom: 1px solid #ffffff0d; font-size: .92rem; }
.last-service p:last-child { border: 0; }
.last-service p span { color: var(--muted); }
.last-service strong { text-align: right; font-weight: 600; }
.thanks .thanks-joke { color: #ebce91; margin-bottom: 12px; }
@keyframes flame { from { transform: rotate(-6deg) scaleY(.9); } to { transform: rotate(6deg) scaleY(1.08); } }
@keyframes drift { from { transform: translateX(-30px); opacity: .5; } to { transform: translateX(30px); opacity: .9; } }
@media(max-width: 400px) { .last-service { padding: 18px; } .last-service p { flex-direction: column; gap: 3px; } .last-service strong { text-align: left; } }
@keyframes float {
  0%,100% { opacity: .2; transform: translateY(12px); }
  50% { opacity: 1; transform: translateY(-16px); }
}
@keyframes musicPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(241,171,4,.2); }
  50% { box-shadow: 0 0 0 6px rgba(241,171,4,0); }
}

@media (max-width: 680px) {
  main { place-items: start; padding-top: 42px; }
  .brand { margin-bottom: 70px; }
  .music-toggle { position: static; margin: -50px 0 64px; }
  .memorial { height: 320px; margin-top: -42px; }
  .tombstone { width: 215px; height: 280px; padding-top: 41px; }
  .ground { width: 320px; }
  .moon { right: 22px; width: 72px; height: 72px; }
  .thanks { grid-template-columns: 1fr; padding: 24px 22px; }
  .thanks > span { font-size: 3.2rem; }
  .law-note { grid-template-columns: 1fr; gap: 9px; padding: 22px; }
  .services { padding: 22px; }
  .services ul { grid-template-columns: 1fr; }
  .primary, .secondary { width: 100%; }
  .secondary { margin: 10px 0 0; }
  .redirect-notice { align-items: flex-start; flex-direction: column; }
  footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .tombstone,.spark,.candle span,.mist { animation: none !important; }
  .music-toggle[aria-pressed="true"] .music-icon { animation: none !important; }
}
