/* A Softer Touch — memorial platform. Serene Earth defaults; per-memorial
   theme variables are injected in the page <style> from the theme choice. */
* { box-sizing: border-box; }
body { margin: 0; font-family: Georgia, 'Times New Roman', serif; background: var(--bg, #F5F1E8); color: var(--ink, #5B5752); }
.wrap { max-width: 880px; margin: 0 auto; padding: 20px 16px 64px; }
.wrap.narrow, .narrow { max-width: 560px; }
.top { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; }
.brand { color: var(--ink); text-decoration: none; font-style: italic; letter-spacing: .04em; }
h1 { font-weight: 500; font-size: 2rem; margin: .4em 0 .2em; }
h2 { font-weight: 500; margin-top: 1.6em; }
.center { text-align: center; } .lede { font-size: 1.12rem; line-height: 1.55; }
.small { font-size: .88rem; opacity: .85; } .addr { font-family: ui-monospace, monospace; word-break: break-all; }
.dates { font-size: 1.05rem; letter-spacing: .06em; opacity: .85; }
.story { line-height: 1.65; font-size: 1.05rem; }
.error { background: #f7e3e0; border: 1px solid #c08a7e; padding: 10px 12px; border-radius: 8px; }
.ok { background: #e6efe2; border: 1px solid var(--accent); padding: 10px 12px; border-radius: 8px; }
.badge { background: var(--taupe); color: #fff; border-radius: 4px; padding: 1px 6px; font-size: .75rem; }

/* Buttons & forms — big tap targets, WHITE inputs with visible caret. */
.btn { display: inline-block; background: var(--accent); color: #fff; border: 1px solid var(--accent);
  padding: 12px 20px; border-radius: 10px; font-size: 1rem; cursor: pointer; text-decoration: none; min-height: 48px; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--taupe); }
.btn.small { padding: 7px 12px; min-height: 38px; font-size: .92rem; }
.btn.big { font-size: 1.15rem; padding: 16px 28px; }
.row { display: flex; gap: 10px; align-items: end; } .row-c { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.wrap-r { flex-wrap: wrap; }
input, textarea, select { width: 100%; background: #fff; color: #333; caret-color: var(--accent);
  border: 2px solid var(--taupe); border-radius: 8px; padding: 12px; font-size: 1rem; margin-top: 4px; }
input:focus, textarea:focus, select:focus { outline: 3px solid var(--accent); outline-offset: 1px; }
label { display: block; margin: 12px 0; font-size: .98rem; }
label.check, .radio-row label, .radio-card { display: flex; gap: 8px; align-items: center; }
label.check input, .radio-row input, .radio-card input { width: auto; margin: 0; }
.card { background: var(--surface); border: 1px solid var(--taupe); border-radius: 12px; padding: 16px; margin: 14px 0; }
.radio-card { background: var(--surface); border: 1px solid var(--taupe); border-radius: 10px; padding: 12px; margin: 8px 0; }
.radio-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin: 10px 0; }

/* Photos */
.ph { margin: 0; } .ph img { width: 100%; height: 100%; display: block; }
.ph figcaption { font-size: .9rem; text-align: center; padding: 6px; opacity: .85; }
.hero img { max-height: 52vh; } .thumb { max-width: 140px; border-radius: 8px; }
.thumb-v { max-width: 220px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.grid .ph img { height: 200px; }
.hero-video, .full-video { width: 100%; border-radius: 12px; }
.welcome-quote { font-size: 1.5rem; text-align: center; font-style: italic; margin: 2em 1em; line-height: 1.5; }
.welcome-quote cite { display: block; font-size: 1rem; margin-top: .6em; font-style: normal; opacity: .8; }
.wslide { display: none; } .wslide.on { display: block; }

/* Candle garden — one candle per candle lit */
.garden { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.candle { text-align: center; width: 56px; } .candle .flame { font-size: 30px; display: block;
  filter: drop-shadow(0 0 6px rgba(255, 180, 60, .8)); animation: flicker 2.4s infinite ease-in-out; }
.candle small { font-size: .68rem; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes flicker { 0%,100% { transform: scale(1); } 50% { transform: scale(1.07); } }

.msg { background: var(--surface); border-left: 4px solid var(--accent); border-radius: 8px; padding: 10px 14px; margin: 10px 0; }
.held { display: flex; justify-content: space-between; gap: 12px; align-items: center; background: var(--surface);
  border: 1px solid var(--taupe); border-radius: 10px; padding: 12px; margin: 8px 0; flex-wrap: wrap; }
.timeline li { margin: 6px 0; } .notifs li { margin: 5px 0; }
table.reg { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.reg th, table.reg td { border-bottom: 1px solid var(--taupe); padding: 7px 6px; text-align: left; }

/* Wizard */
.step { background: var(--surface); border: 1px solid var(--taupe); border-radius: 14px; padding: 18px; margin: 16px 0; }
.progress { margin: 14px 0; } .progress-head { background: none; border: none; font: inherit; cursor: pointer; padding: 4px 0; }
.progress .bar { height: 10px; background: #fff; border: 1px solid var(--taupe); border-radius: 6px; overflow: hidden; }
.progress .bar span { display: block; height: 100%; background: var(--accent); transition: width .4s; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { display: flex; align-items: center; gap: 8px; border: 2px solid; border-radius: 10px; padding: 10px 14px; cursor: pointer; width: auto; }
.swatch input { width: auto; } .swatch .dot { width: 16px; height: 16px; border-radius: 50%; display: inline-block; }

/* Slideshow overlay */
.slideshow { position: fixed; inset: 0; background: rgba(30, 28, 26, .96); z-index: 50; text-align: center; padding: 20px; }
.slideshow img { max-width: 100%; max-height: 78vh; border-radius: 10px; }
.slideshow p { color: #F5F1E8; }
.ss-close { position: absolute; top: 14px; right: 14px; }
.foot { margin-top: 48px; font-size: .8rem; text-align: center; opacity: .7; }
.glow { font-size: 44px; text-align: center; filter: drop-shadow(0 0 14px rgba(255, 180, 60, .7)); }

/* Soft arrival (~2s), off under reduced-motion */
@keyframes softIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.soft-in { animation: softIn 1.6s ease both; }
@media (prefers-reduced-motion: reduce) { .soft-in, .candle .flame { animation: none; } }
