/* Gedenkbuch – public page
   Dusk after the storm: twilight slate + plum haze, mist-grey paper, one candle-gold. */

@font-face { font-family: "Cormorant"; src: url(/fonts/cormorant-garamond-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url(/fonts/cormorant-garamond-latin-400-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url(/fonts/cormorant-garamond-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url(/fonts/cormorant-garamond-latin-500-italic.woff2) format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url(/fonts/cormorant-garamond-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Jost"; src: url(/fonts/jost-latin-300-normal.woff2) format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Jost"; src: url(/fonts/jost-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Jost"; src: url(/fonts/jost-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --dusk: #1f2536;        /* twilight slate */
  --haze: #3b3552;        /* plum haze low in the sky */
  --gold: #e6b566;        /* candlelight */
  --gold-soft: #f3d9a4;
  --mist: #eceef1;        /* reading paper, cool */
  --mist-deep: #dfe3e8;
  --ink: #272b36;
  --stone: #6c7282;
  --rule: #c9ced7;
  --on-dusk: #e9e6ef;
  --on-dusk-dim: #a9a6bb;

  --serif: "Cormorant", "Cormorant Garamond", Georgia, serif;
  --sans: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;

  --measure: 36rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section-pad: clamp(4.5rem, 11vw, 8.5rem);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.62;
  font-feature-settings: "kern", "liga", "onum";
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
h1, h2 { font-weight: 500; line-height: 1.12; margin: 0; }
h2 { font-size: clamp(2.1rem, 4.4vw, 2.85rem); letter-spacing: -.005em; margin-bottom: 1.25rem; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -999px; top: .5rem; background: var(--dusk); color: var(--on-dusk); padding: .5rem 1rem; z-index: 100; font: 500 .9rem var(--sans); }
.skip:focus { left: .5rem; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.noscript { padding: 2rem; text-align: center; }
[hidden] { display: none !important; }

/* ---------- top bar */
.topbar {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; gap: 1.5rem;
  padding: .85rem var(--gutter);
  font-family: var(--sans); font-size: .875rem; color: var(--on-dusk);
  transition: background .5s var(--ease), box-shadow .5s var(--ease), color .5s;
}
.topbar.solid { background: rgba(31, 37, 54, .92); backdrop-filter: blur(8px); box-shadow: 0 1px 0 rgba(255,255,255,.06); }
.topbar-name {
  font-family: var(--serif); font-size: 1.2rem; text-decoration: none; margin-right: auto;
  opacity: 0; transform: translateY(-4px); transition: opacity .5s, transform .5s var(--ease);
}
.topbar.solid .topbar-name { opacity: 1; transform: none; }
.topnav { display: flex; gap: 1.4rem; }
.topnav a { text-decoration: none; color: var(--on-dusk-dim); transition: color .2s; }
.topnav a:hover, .topnav a.active { color: var(--on-dusk); }
.lang { display: flex; border: 1px solid rgba(233, 230, 239, .28); border-radius: 999px; padding: 2px; }
.lang button {
  font: 500 .75rem var(--sans); letter-spacing: .04em; color: var(--on-dusk-dim);
  background: none; border: 0; border-radius: 999px; padding: .3rem .7rem; cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--on-dusk); color: var(--dusk); }
@media (max-width: 860px) { .topnav { display: none; } }

/* ---------- hero */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: grid; place-items: center; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(120% 70% at 50% 108%, rgba(230, 181, 102, .22), transparent 60%),
    linear-gradient(180deg, #161b28 0%, var(--dusk) 42%, var(--haze) 100%);
  color: var(--on-dusk); text-align: center;
  padding: 6rem var(--gutter) 7rem;
}
.hero-bg {
  position: absolute; inset: -4%; z-index: -2;
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity 2.4s var(--ease);
}
.hero-bg.ready { opacity: .32; animation: drift 40s ease-in-out infinite alternate; }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(22,27,40,.55), rgba(59,53,82,.75)); }
@keyframes drift { from { transform: scale(1.02) translate3d(0, 0, 0); } to { transform: scale(1.1) translate3d(-1.5%, -1%, 0); } }
.hero-motes { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero-inner { max-width: 54rem; }

.portrait {
  width: clamp(8.5rem, 22vw, 12rem); aspect-ratio: 1; margin: 0 auto 2.25rem;
  border-radius: 50%; position: relative;
  opacity: 0; animation: rise 1.6s .2s var(--ease) forwards;
}
.portrait::before {
  content: ""; position: absolute; inset: -14px; border-radius: 50%;
  background: radial-gradient(circle, rgba(230,181,102,.35), transparent 70%);
  animation: breathe 6s ease-in-out infinite;
}
.portrait img, .portrait .monogram {
  position: relative; width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 1px rgba(243, 217, 164, .5), 0 0 0 7px rgba(31, 37, 54, .7), 0 0 0 8px rgba(243, 217, 164, .22);
}
.monogram {
  display: grid; place-items: center; background: linear-gradient(160deg, #2b3148, #3b3552);
  font: italic 500 clamp(2.6rem, 7vw, 3.6rem) var(--serif); color: var(--gold-soft);
}
@keyframes breathe { 0%, 100% { opacity: .55; transform: scale(.97); } 50% { opacity: 1; transform: scale(1.03); } }

.hero-kicker {
  font: 300 1rem var(--sans); letter-spacing: .06em; color: var(--on-dusk-dim);
  margin-bottom: 1rem; opacity: 0; animation: rise 1.4s .6s var(--ease) forwards;
}
.hero-name {
  font-size: clamp(3.2rem, 10.5vw, 7.6rem); font-weight: 400; letter-spacing: -.012em; line-height: 1;
  color: #f6f2ea;
}
.hero-name .word { display: inline-block; white-space: nowrap; }
.hero-name .ch {
  display: inline-block; opacity: 0; filter: blur(14px); transform: translateY(.18em);
  animation: resolve 1.9s var(--ease) forwards;
}
@keyframes resolve { to { opacity: 1; filter: blur(0); transform: none; } }
.hero-dates {
  margin-top: 1.6rem; font: 400 1.05rem var(--sans); letter-spacing: .05em; color: var(--gold-soft);
  display: flex; justify-content: center; align-items: center; gap: 1rem;
  opacity: 0; animation: rise 1.4s 2.2s var(--ease) forwards;
}
.hero-dates > span:not(.line) { white-space: nowrap; }
@media (max-width: 520px) { .hero-dates { gap: .6rem; font-size: .95rem; } .hero-dates .line { width: 1.25rem !important; } }
.hero-dates .line { width: clamp(2rem, 8vw, 4.5rem); height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.hero-epitaph {
  margin: 2rem auto 0; max-width: 32rem; font-style: italic; font-size: clamp(1.25rem, 2.3vw, 1.5rem);
  color: var(--on-dusk); opacity: 0; animation: rise 1.6s 2.6s var(--ease) forwards;
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hero-scroll {
  position: absolute; left: 50%; bottom: 2rem; width: 1.5rem; height: 2.6rem; margin-left: -.75rem;
  border: 1px solid rgba(233, 230, 239, .35); border-radius: 999px;
  opacity: 0; animation: rise 1.2s 3.4s var(--ease) forwards;
}
.hero-scroll span { position: absolute; left: 50%; top: .5rem; width: 3px; height: 6px; margin-left: -1.5px; border-radius: 3px; background: var(--gold-soft); animation: nudge 2.4s ease-in-out infinite; }
@keyframes nudge { 0% { transform: translateY(0); opacity: 0; } 30% { opacity: 1; } 80% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }

/* ---------- reading blocks */
.block { padding: var(--section-pad) var(--gutter); }
.block + .block { padding-top: 0; }
.measure { max-width: var(--measure); margin: 0 auto; }
.wide { max-width: 68rem; margin: 0 auto; }
.prose p + p { margin-top: 1em; }
.prose:empty { display: none; }
.intro { text-align: center; position: relative; }
.intro .measure { position: relative; z-index: 1; }

/* dandelion: stands in the free space left of the text column on wide screens */
.pusteblume {
  position: absolute; z-index: 0; pointer-events: none; user-select: none;
  top: calc(var(--section-pad) * .55);
  width: min(25rem, calc((100vw - var(--measure)) / 2 - 4rem));
  right: calc(50% + var(--measure) / 2 + 2rem);
  height: auto;
  filter: drop-shadow(0 1px 1.5px rgba(39, 43, 54, .22));
  transform-origin: 25% 100%;                 /* sways from the foot of the stem */
  -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent 100%);   /* stem fades out softly */
  mask-image: linear-gradient(to bottom, #000 78%, transparent 100%);
  animation: pusteblume-sway 11s ease-in-out infinite;
}
@keyframes pusteblume-sway {
  0%, 100% { transform: rotate(0deg); }
  30% { transform: rotate(-1.3deg); }
  65% { transform: rotate(.9deg); }
}
/* narrower screens: a small dandelion above the welcome heading instead */
@media (max-width: 1100px) {
  .pusteblume {
    position: static; display: block; width: min(11rem, 46vw);
    margin: 0 auto 1.5rem; transform-origin: 25% 100%;
  }
}
.intro .prose { font-size: 1.4rem; line-height: 1.55; color: #3a3f4c; }


/* timeline: the content really is a sequence, so it gets a spine */
.timeline { list-style: none; margin: 2.25rem 0 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 5.4rem; top: .6rem; bottom: .6rem; width: 1px; background: var(--rule); }
.timeline li { display: grid; grid-template-columns: 5.4rem 1fr; column-gap: 2rem; position: relative; padding-bottom: 2.25rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: calc(5.4rem - 4px); top: .62rem; width: 9px; height: 9px;
  border-radius: 50%; background: var(--mist); border: 1px solid var(--gold); box-shadow: 0 0 0 4px var(--mist);
}
.tl-year { font: 500 .95rem/2 var(--sans); color: var(--stone); padding-right: 1.25rem; text-align: right; }
.tl-body { padding-left: .25rem; }
.tl-title { font-size: 1.45rem; font-weight: 500; line-height: 1.3; }
.tl-text { color: #444a58; margin-top: .25rem; }
@media (max-width: 520px) {
  .timeline::before { left: 4px; }
  .timeline li { grid-template-columns: 1fr; padding-left: 1.75rem; }
  .timeline li::before { left: 0; }
  .tl-year { text-align: left; padding: 0; line-height: 1.6; }
}

/* ---------- quote */
/* the quote stays on paper: the candle room is the page's one dark interlude */
.quote { padding: 0 var(--gutter) var(--section-pad); text-align: center; }
.quote blockquote { margin: 0 auto; max-width: 44rem; padding-top: 3.25rem; position: relative; }
.quote blockquote::before {
  content: ""; position: absolute; top: 0; left: 50%; width: 3.5rem; height: 1px; margin-left: -1.75rem;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.quote p { font-size: clamp(1.75rem, 3.6vw, 2.6rem); font-style: italic; line-height: 1.3; color: #303545; }
.quote footer { margin-top: 1.5rem; font: 400 .95rem var(--sans); letter-spacing: .03em; color: var(--stone); }
.quote:has(p:empty) { display: none; }

/* ---------- gallery */
.gallery-block { padding-top: var(--section-pad) !important; }
.gallery-block h2, .gallery-intro { max-width: var(--measure); margin-left: auto; margin-right: auto; }
.gallery { list-style: none; padding: 0; margin: 2.5rem 0 0; columns: 3 16rem; column-gap: 1rem; }
.gallery li { break-inside: avoid; margin-bottom: 1rem; }
.gallery button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; text-align: left; }
.gallery img { width: 100%; border-radius: 3px; transition: filter .4s var(--ease); }
.gallery button:hover img { filter: brightness(1.06) contrast(1.03); }
.gallery .cap { display: block; margin-top: .45rem; font: 400 .85rem var(--sans); color: var(--stone); }

.lightbox {
  border: 0; padding: 0; max-width: none; max-height: none; width: 100vw; height: 100vh; height: 100dvh;
  background: rgba(17, 20, 31, .94); color: var(--on-dusk);
  display: none; place-items: center; grid-template-columns: auto 1fr auto;
}
.lightbox[open] { display: grid; animation: fade .35s var(--ease); }
.lightbox::backdrop { background: transparent; }
.lightbox figure { margin: 0; grid-column: 2; text-align: center; padding: 3.5rem 0; }
.lightbox img { max-width: 100%; max-height: calc(100dvh - 9rem); margin: 0 auto; border-radius: 2px; animation: settle .5s var(--ease); }
.lightbox figcaption { margin-top: 1rem; font: 400 .95rem var(--sans); color: var(--on-dusk-dim); }
@keyframes fade { from { opacity: 0; } }
@keyframes settle { from { opacity: 0; transform: scale(.985); } }
.lb-close, .lb-nav {
  background: none; border: 0; color: var(--on-dusk); cursor: pointer; width: 3rem; height: 3rem; border-radius: 50%;
  display: grid; place-items: center; font: 300 1.75rem var(--sans);
}
.lb-close { position: absolute; top: 1rem; right: 1rem; }
.lb-close::before { content: "\00d7"; }
.lb-prev::before { content: "\2039"; font-size: 2.4rem; }
.lb-next::before { content: "\203a"; font-size: 2.4rem; }
.lb-close:hover, .lb-nav:hover { background: rgba(255,255,255,.08); }
.lightbox.single .lb-nav { visibility: hidden; }

/* ---------- candles */
.candles {
  background:
    radial-gradient(80% 60% at 50% 100%, rgba(230, 181, 102, .16), transparent 70%),
    linear-gradient(180deg, var(--haze), var(--dusk));
  color: var(--on-dusk); text-align: center; padding: var(--section-pad) var(--gutter);
}
.candles-inner { max-width: 52rem; margin: 0 auto; }
.candles .prose { max-width: 32rem; margin: 0 auto; color: var(--on-dusk-dim); }
.candle-field {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: .4rem .7rem;
  margin: 2.5rem auto 2.25rem; min-height: 10rem;
}
/* each candle is the family's own candle photo with a natural burning flame (no glow) */
.candles { --candle-h: 7rem; }
@media (max-width: 560px) { .candles { --candle-h: 5.75rem; } .candle-field { gap: .3rem .5rem; } }
.candle {
  --s: 1; --d: 0s; position: relative; flex: none;
  height: calc(var(--candle-h) * var(--s));
  margin-top: calc(var(--candle-h) * .32);         /* room for the flame above the tallest candle */
}
.candle > img { display: block; height: 100%; width: auto; user-select: none; -webkit-user-drag: none; }

/* flame sits on the wick (53 % across, just below the top edge of the photo) */
.candle .flame {
  position: absolute; left: 53.1%; bottom: 95.5%;
  /* flame grows with the candle, but less than proportionally, like real candles */
  width: calc(var(--candle-h) * .095 * (.5 + .5 * var(--s))); height: calc(var(--candle-h) * .27 * (.5 + .5 * var(--s)));
  transform: translateX(-50%); pointer-events: none;
}
.candle .flame span {
  display: block; width: 100%; height: 100%;
  transform-origin: 50% 82%;
  animation: flame-sway 4.3s ease-in-out infinite; animation-delay: var(--d);
}
.candle .flame img {
  display: block; width: 100%; height: 100%;
  transform-origin: 50% 82%;
  animation: flame-flicker 1.9s ease-in-out infinite; animation-delay: var(--d);
}
/* slow lean in a draught */
@keyframes flame-sway {
  0%, 100% { transform: rotate(0deg) skewX(0deg); }
  18% { transform: rotate(-2.5deg) skewX(2deg); }
  37% { transform: rotate(1.5deg) skewX(-1.5deg); }
  55% { transform: rotate(-1deg) skewX(1deg); }
  76% { transform: rotate(3deg) skewX(-2.5deg); }
}
/* irregular height and width breathing of the fire */
@keyframes flame-flicker {
  0%, 100% { transform: scale(1, 1); opacity: 1; }
  12% { transform: scale(.96, 1.05); }
  23% { transform: scale(1.03, .94); opacity: .94; }
  37% { transform: scale(.97, 1.08); opacity: 1; }
  48% { transform: scale(1.02, .97); }
  61% { transform: scale(.95, 1.03); opacity: .96; }
  74% { transform: scale(1.04, .92); }
  88% { transform: scale(.98, 1.06); opacity: 1; }
}
.candle.unlit { opacity: .45; }
.candle.unlit .flame { display: none; }
.candle.new { animation: placed .9s var(--ease) both; }
.candle.new .flame span { animation: flame-ignite 1.2s .5s var(--ease) backwards, flame-sway 4.3s 1.7s ease-in-out infinite; }
@keyframes placed { from { opacity: 0; transform: translateY(14px); } }
@keyframes flame-ignite {
  0% { transform: scale(0, 0); opacity: 0; }
  35% { transform: scale(.45, 1.35); opacity: 1; }
  70% { transform: scale(1.08, .92); }
  100% { transform: scale(1, 1); }
}

/* small candle next to condolence entries */
.entry-candle { position: relative; display: inline-block; flex: none; height: 1.75rem; margin: -.55rem 0 -.2rem; padding-top: .55rem; }
.entry-candle > img:first-child { display: block; height: 1.75rem; width: auto; filter: drop-shadow(0 0 1px rgba(39, 43, 54, .45)) drop-shadow(0 1px 2px rgba(39, 43, 54, .25)); }
.entry-candle .mini-flame { position: absolute; left: 53%; top: .1rem; width: .3rem; height: .6rem; transform: translateX(-50%); }
.candle-count { font: 300 1rem var(--sans); letter-spacing: .03em; color: var(--gold-soft); min-height: 1.6em; margin-bottom: 1.75rem; }

/* who lit a candle */
.candle-names {
  list-style: none; margin: 2rem auto 0; padding: 0; max-width: 46rem;
  display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem .75rem;
}
.candle-names:empty { display: none; }
.candle-chip {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .5rem 1rem .5rem .6rem; border-radius: 999px;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(243, 217, 164, .18);
  font: 400 .9rem var(--sans); line-height: 1.2;
}
.chip-dot {
  flex: none; width: 1.25rem; height: 1.25rem; border-radius: 50%;
  background: radial-gradient(circle, #f0a43a 0 32%, rgba(240, 164, 58, .28) 36% 100%);
}
.chip-name { font-weight: 500; color: var(--on-dusk); max-width: 16rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.candle-chip.anon .chip-name { font-weight: 400; font-style: italic; font-family: var(--serif); font-size: 1.02rem; }
.chip-time { color: var(--on-dusk-dim); font-size: .8rem; white-space: nowrap; }
.chip-time::before { content: "\00b7"; margin-right: .4rem; }
.candle-chip.fresh { animation: chip-in .8s var(--ease) both; border-color: rgba(243, 217, 164, .5); }
@keyframes chip-in { from { opacity: 0; transform: translateY(8px) scale(.96); } }
.candle-more {
  margin-top: 1.25rem; background: none; border: 0; cursor: pointer;
  font: 400 .9rem var(--sans); color: var(--gold-soft); text-decoration: underline; text-underline-offset: 3px;
}

/* ---------- buttons & forms */
.btn {
  font: 500 .95rem var(--sans); letter-spacing: .02em;
  background: var(--dusk); color: var(--on-dusk); border: 1px solid var(--dusk);
  border-radius: 999px; padding: .85rem 1.7rem; cursor: pointer;
  transition: background .25s, color .25s, border-color .25s, transform .15s;
}
.btn:hover { background: #2c3449; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: default; }
.btn-light { background: transparent; color: var(--gold-soft); border-color: rgba(243, 217, 164, .55); }
.btn-light:hover { background: rgba(243, 217, 164, .1); border-color: var(--gold-soft); }
.btn-quiet { background: none; color: var(--ink); border-color: var(--rule); margin-top: 2rem; }
.btn-quiet:hover { background: var(--mist-deep); }

.form { margin-top: 2.25rem; display: grid; gap: 1.15rem; }
.field { display: grid; gap: .4rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.15rem; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.field .opt { font-style: normal; font-size: .8rem; color: var(--stone); margin-left: .2rem; }
.field input::placeholder, .field textarea::placeholder { color: #9aa0ad; opacity: 1; }
.field > span, .check, .form-note { font: 400 .9rem var(--sans); color: #4c5263; }
.field input, .field textarea {
  font: 400 1.15rem/1.5 var(--serif); color: var(--ink);
  background: #f7f8fa; border: 1px solid var(--rule); border-radius: 3px; padding: .65rem .8rem;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field textarea { resize: vertical; min-height: 7.5rem; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--dusk); background: #fff; box-shadow: 0 0 0 3px rgba(31, 37, 54, .12); }
.field.invalid input, .field.invalid textarea, .check.invalid { border-color: #a2453a; color: #a2453a; }
.check { display: flex; gap: .65rem; align-items: flex-start; cursor: pointer; line-height: 1.45; }
.check input { width: 1.05rem; height: 1.05rem; margin: .15rem 0 0; accent-color: var(--dusk); flex: none; }
.form-note { color: var(--stone); font-size: .85rem; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.25rem; margin-top: .4rem; }
.form-status { font: 400 .95rem var(--sans); color: var(--stone); }
.form-status.ok { color: #3d6a4e; }
.form-status.err { color: #a2453a; }

/* ---------- guestbook entries */
.gb-list { max-width: var(--measure); margin: 4.5rem auto 0; }   /* same width as the form above */
.gb-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap;
  padding-bottom: 1rem; border-bottom: 1px solid var(--rule);
}
.gb-count { font: 400 1.6rem/1.2 var(--serif); color: var(--ink); margin: 0; }
.gb-search input {
  width: min(16rem, 70vw); font: 400 .9rem var(--sans); color: var(--ink);
  background: #fff; border: 1px solid var(--rule); border-radius: 999px; padding: .55rem 1.1rem;
  transition: border-color .2s, box-shadow .2s;
}
.gb-search input::placeholder { color: #9aa0ad; }
.gb-search input:focus { outline: none; border-color: var(--dusk); box-shadow: 0 0 0 3px rgba(31, 37, 54, .1); }
.gb-empty { margin-top: 2rem; text-align: center; font: 400 .95rem var(--sans); color: var(--stone); }

.entries { list-style: none; padding: 0; margin: 1.75rem 0 0; display: grid; gap: 1.5rem; }
.entries:empty { display: none; }
.entry {
  background: #fff; border: 1px solid #e1e4ea; border-radius: 18px;
  padding: clamp(1.4rem, 3.5vw, 2.1rem) clamp(1.25rem, 4vw, 2.25rem);
  box-shadow: 0 1px 2px rgba(31, 37, 54, .04);
}
.entry-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem 1.5rem; flex-wrap: wrap;
  padding-bottom: 1rem; margin-bottom: 1.1rem; border-bottom: 1px solid #e8eaef;
}
.entry-name { font: 500 clamp(1.45rem, 2.6vw, 1.75rem)/1.2 var(--serif); color: var(--ink); margin: 0; }
.entry-rel { margin-top: .35rem; font: 400 .85rem var(--sans); color: var(--stone); }
.entry-date {
  display: flex; align-items: center; gap: .55rem; margin-top: .45rem;
  font: 500 .76rem var(--sans); letter-spacing: .08em; text-transform: uppercase; color: #8b90a0; white-space: nowrap;
}
.entry-text { white-space: pre-line; font: 300 1.02rem/1.8 var(--sans); color: #3b4050; }
.entry.fresh { animation: rise .8s var(--ease); }
@media (max-width: 560px) {
  .gb-head { flex-direction: column; align-items: stretch; }
  .gb-search input { width: 100%; }
  .entry-head { flex-direction: column; gap: .55rem; }
  .entry-date { margin-top: 0; }
}


/* ---------- footer & pages */
.site-footer {
  background: var(--dusk); color: var(--on-dusk-dim); text-align: center;
  padding: 4rem var(--gutter) 3rem; font-family: var(--sans); font-size: .9rem;
}
.footer-text { font: italic 400 1.4rem var(--serif); color: var(--on-dusk); }
.footer-name { margin-top: .4rem; }
.footer-links { margin-top: 2rem; display: flex; justify-content: center; flex-wrap: wrap; gap: .5rem 1.5rem; }
.footer-links a { color: var(--on-dusk-dim); text-decoration: none; border-bottom: 1px solid rgba(169,166,187,.35); }
.footer-links a:hover { color: var(--on-dusk); }

.page-dialog {
  border: 0; border-radius: 4px; padding: 0; width: min(40rem, calc(100vw - 2rem)); max-height: min(80vh, 46rem);
  background: var(--mist); color: var(--ink); box-shadow: 0 40px 80px -30px rgba(0,0,0,.6);
}
.page-dialog[open] { animation: settle .35s var(--ease); }
.page-dialog::backdrop { background: rgba(17, 20, 31, .6); backdrop-filter: blur(3px); }
.page-dialog article { padding: 3rem clamp(1.25rem, 5vw, 3rem) 2.5rem; position: relative; }
.page-dialog h2 { font-size: 2.2rem; margin-bottom: 1.25rem; padding-right: 2rem; }
.page-dialog .prose { white-space: pre-line; font-size: 1.15rem; }
.page-dialog .lb-close { color: var(--ink); top: .75rem; right: .75rem; }
.page-dialog .lb-close:hover { background: var(--mist-deep); }

/* ---------- reduced motion: everything visible at once, nothing drifts */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .hero-name .ch { filter: none; }
}
