:root {
  --ink: #20332d;
  --muted: #65736d;
  --paper: #f4f0e7;
  --paper-deep: #e8e1d3;
  --green: #2f5548;
  --green-dark: #1e3b32;
  --gold: #b89152;
  --line: rgba(32, 51, 45, 0.16);
  --serif: "Noto Serif SC", "Songti SC", serif;
  --sans: "Inter", "PingFang SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 8%, rgba(255, 255, 255, 0.9), transparent 27%),
    var(--paper);
  font-family: var(--sans);
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

.site-header {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 0;
  display: grid;
  width: 100%;
  padding: 26px 5vw;
  align-items: center;
  grid-template-columns: 1fr auto 1fr;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-decoration: none;
}

.brand-mark {
  display: inline-block;
  width: 18px;
  height: 25px;
  border: 1px solid var(--ink);
  border-radius: 50% 50% 45% 45%;
  background:
    linear-gradient(90deg, transparent 47%, var(--ink) 48%, var(--ink) 52%, transparent 53%),
    linear-gradient(30deg, transparent 46%, var(--ink) 47%, var(--ink) 51%, transparent 52%);
  transform: rotate(-8deg);
}

.main-nav {
  display: flex;
  gap: 42px;
}

.main-nav a {
  position: relative;
  padding: 8px 0;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}

.main-nav a.active,
.main-nav a:hover {
  color: var(--ink);
}

.main-nav a.active::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  height: 4px;
  margin: auto;
  border-radius: 50%;
  background: var(--gold);
  content: "";
}

body.language-panel-open {
  overflow: hidden;
}

.site-header > .primary-button {
  justify-self: end;
}

.language-fab {
  position: fixed;
  z-index: 900;
  top: 50%;
  right: 0;
  display: grid;
  width: 58px;
  padding: 12px 7px 10px;
  border: 0;
  border-radius: 12px 0 0 12px;
  place-items: center;
  color: #fffaf2;
  background: #795947;
  box-shadow: 0 10px 30px rgba(72, 56, 47, 0.24);
  cursor: pointer;
  transform: translateY(-50%);
  transition: 180ms ease;
}

.language-fab:hover {
  width: 64px;
  background: #5f4538;
}

.language-fab > span {
  font-family: var(--serif);
  font-size: 20px;
}

.language-fab b {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 500;
}

.language-fab small {
  margin-top: 2px;
  color: #e8c7aa;
  font-size: 9px;
}

.language-backdrop {
  position: fixed;
  z-index: 950;
  inset: 0;
  background: rgba(54, 40, 32, 0.35);
  backdrop-filter: blur(3px);
}

.language-panel {
  position: fixed;
  z-index: 960;
  top: 0;
  right: 0;
  display: flex;
  width: min(520px, 100%);
  height: 100dvh;
  padding: 36px;
  flex-direction: column;
  background: #fffaf2;
  box-shadow: -25px 0 70px rgba(72, 56, 47, 0.2);
  transform: translateX(105%);
  transition: transform 240ms ease;
}

.language-panel.open {
  transform: translateX(0);
}

.language-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.language-panel-head p {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.25em;
}

.language-panel-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
}

.language-panel-head span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 10px;
}

.language-panel-head button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  font-size: 22px;
}

.language-search {
  display: flex;
  margin: 28px 0 18px;
  padding: 0 15px;
  border: 1px solid var(--line);
  align-items: center;
  gap: 8px;
  background: #fff;
}

.language-search span {
  color: var(--gold);
  font-size: 19px;
}

.language-search input {
  width: 100%;
  height: 48px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 13px;
}

.language-list {
  display: grid;
  min-height: 0;
  padding-right: 6px;
  overflow-y: auto;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.language-option {
  display: flex;
  min-height: 54px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 5px;
  align-items: center;
  gap: 11px;
  background: #f7ede0;
  cursor: pointer;
  text-align: left;
  transition: 140ms ease;
}

.language-option:hover,
.language-option.active {
  border-color: #c78152;
  background: #fff;
}

.language-option b,
.language-option small {
  display: block;
}

.language-option b {
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 500;
}

.language-option small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.language-status {
  min-height: 18px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.primary-button {
  display: inline-flex;
  min-height: 50px;
  padding: 0 24px;
  border: 1px solid var(--green);
  align-items: center;
  justify-content: center;
  gap: 26px;
  color: #fff;
  background: var(--green);
  cursor: pointer;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: 180ms ease;
}

.primary-button:hover {
  background: var(--green-dark);
  transform: translateY(-2px);
}

.primary-button.small {
  min-height: 42px;
  padding: 0 19px;
}

.hero {
  position: relative;
  min-height: 760px;
  padding: 180px 9vw 80px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero::after {
  position: absolute;
  z-index: -1;
  top: 50px;
  right: 2vw;
  width: min(54vw, 780px);
  height: 650px;
  border: 1px solid rgba(47, 85, 72, 0.12);
  border-radius: 50%;
  background:
    radial-gradient(circle at 53% 48%, rgba(184, 145, 82, 0.18) 0 2px, transparent 3px),
    repeating-radial-gradient(circle at 53% 48%, transparent 0 58px, rgba(47, 85, 72, 0.08) 59px 60px);
  content: "";
  transform: rotate(-13deg);
}

.eyebrow,
.section-kicker {
  margin: 0 0 24px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.28em;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
}

.eyebrow span {
  width: 28px;
  height: 1px;
  background: var(--gold);
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(52px, 6.5vw, 92px);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 1.2;
}

.hero h1 em {
  color: var(--green);
  font-style: normal;
}

.hero-copy {
  margin: 34px 0 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 2;
}

.hero-actions {
  display: flex;
  margin-top: 44px;
  align-items: center;
  gap: 36px;
}

.text-button {
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
}

.text-button span {
  margin-left: 10px;
  color: var(--gold);
}

.hero-stats {
  display: flex;
  margin-top: 78px;
  gap: 50px;
}

.hero-stats div {
  padding-right: 50px;
  border-right: 1px solid var(--line);
}

.hero-stats div:last-child {
  border: 0;
}

.hero-stats strong,
.hero-stats span {
  display: block;
}

.hero-stats strong {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
}

.hero-stats span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.map-section {
  padding: 100px 5vw 110px;
  background: #eae5da;
}

.map-toolbar {
  display: flex;
  max-width: 1400px;
  margin: 0 auto 34px;
  align-items: end;
  justify-content: space-between;
}

.map-toolbar h2,
.closing-cta h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 500;
  letter-spacing: -0.03em;
}

.map-toolbar .section-kicker {
  margin-bottom: 14px;
}

.filters {
  display: flex;
  padding: 4px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.25);
}

.filter {
  padding: 9px 15px;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  font-size: 11px;
}

.filter.active {
  color: #fff;
  background: var(--green);
}

.map-shell {
  position: relative;
  max-width: 1400px;
  height: 720px;
  margin: auto;
  overflow: hidden;
  border: 1px solid rgba(47, 85, 72, 0.18);
  background: #dce3df;
  box-shadow: 0 30px 80px rgba(43, 56, 51, 0.12);
}

.map-canvas {
  position: absolute;
  inset: 0;
  touch-action: none;
  cursor: grab;
  transition: transform 220ms ease;
  transform-origin: center;
}

.map-canvas:active {
  cursor: grabbing;
  transition: none;
}

.world-map {
  width: 100%;
  height: 100%;
  opacity: 0.9;
}

.grid-lines path {
  fill: none;
  stroke: rgba(47, 85, 72, 0.09);
  stroke-dasharray: 3 8;
  stroke-width: 1;
}

.continents path {
  fill: #c2cec6;
  stroke: #aabbb1;
  stroke-width: 1.5;
}

.map-label {
  position: absolute;
  color: rgba(47, 85, 72, 0.35);
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.3em;
}

.label-americas { top: 30%; left: 18%; }
.label-europe { top: 25%; left: 49%; }
.label-africa { top: 57%; left: 51%; }
.label-asia { top: 29%; left: 72%; }
.label-oceania { top: 72%; left: 84%; }

.story-marker {
  position: absolute;
  top: var(--y);
  left: var(--x);
  display: flex;
  padding: 0;
  border: 0;
  align-items: center;
  gap: 8px;
  background: transparent;
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: 180ms ease;
}

.story-marker span {
  position: relative;
  display: block;
  width: 11px;
  height: 11px;
  border: 2px solid #f8f5ed;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 6px rgba(184, 145, 82, 0.15);
}

.story-marker.living span {
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(47, 85, 72, 0.14);
}

.story-marker.featured span::after {
  position: absolute;
  inset: -11px;
  border: 1px solid rgba(184, 145, 82, 0.45);
  border-radius: 50%;
  content: "";
  animation: pulse 2.2s infinite;
}

.story-marker b {
  padding: 4px 7px;
  border-radius: 2px;
  color: var(--ink);
  background: rgba(244, 240, 231, 0.78);
  font-family: var(--serif);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.story-marker:hover {
  z-index: 4;
  transform: translate(-50%, -50%) scale(1.12);
}

.story-marker.hidden {
  opacity: 0;
  pointer-events: none;
}

@keyframes pulse {
  0% { opacity: 1; transform: scale(0.6); }
  100% { opacity: 0; transform: scale(1.8); }
}

.map-controls {
  position: absolute;
  bottom: 28px;
  left: 28px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 24px rgba(32, 51, 45, 0.12);
}

.map-controls button {
  width: 38px;
  height: 38px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(244, 240, 231, 0.95);
  cursor: pointer;
  font-size: 20px;
}

.map-controls button:last-child {
  border: 0;
}

.map-hint {
  position: absolute;
  right: 30px;
  bottom: 27px;
  color: rgba(32, 51, 45, 0.55);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.story-preview {
  position: absolute;
  z-index: 7;
  top: 50%;
  right: 40px;
  width: min(360px, calc(100% - 40px));
  padding: 38px;
  color: #f5f1e8;
  background: rgba(30, 59, 50, 0.96);
  box-shadow: 0 25px 60px rgba(30, 59, 50, 0.28);
  transform: translateY(-50%);
  transition: 240ms ease;
}

.story-preview.closed {
  opacity: 0;
  pointer-events: none;
  transform: translate(30px, -50%);
}

.preview-close,
.dialog-close {
  position: absolute;
  top: 18px;
  right: 20px;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  font-size: 22px;
}

.portrait {
  display: grid;
  width: 70px;
  height: 84px;
  margin-bottom: 25px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.8);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), transparent),
    #49685e;
  font-family: var(--serif);
  font-size: 28px;
}

.story-type {
  margin: 0 0 9px;
  color: #cbb486;
  font-size: 9px;
  letter-spacing: 0.18em;
}

.story-preview h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
}

.life-dates {
  margin: 5px 0 26px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
}

blockquote {
  margin: 0;
  font-family: var(--serif);
  font-size: 14px;
  line-height: 2;
}

.story-author {
  margin: 20px 0 26px;
  color: rgba(255, 255, 255, 0.47);
  font-size: 10px;
}

.read-story {
  width: 100%;
  padding: 14px 0;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-size: 11px;
}

.read-story span {
  float: right;
}

.story-detail-dialog {
  width: min(780px, calc(100vw - 32px));
  max-height: min(860px, calc(100vh - 32px));
  padding: clamp(30px, 6vw, 64px);
  overflow-y: auto;
  border: 0;
  color: var(--ink);
  background: #fffaf2;
  box-shadow: 0 35px 100px rgba(63, 43, 31, 0.32);
}

.story-detail-dialog::backdrop {
  background: rgba(45, 34, 28, 0.72);
  backdrop-filter: blur(5px);
}

.story-detail-hero {
  display: grid;
  margin-bottom: 32px;
  grid-template-columns: 110px 1fr;
  align-items: center;
  gap: 24px;
}

.story-detail-hero img {
  width: 110px;
  height: 132px;
  object-fit: cover;
  border: 8px solid #fff;
  box-shadow: 0 14px 35px rgba(74, 52, 38, 0.18);
  transform: rotate(-2deg);
}

.story-detail-hero h2 {
  margin: 4px 0 8px;
  font-family: var(--serif);
  font-size: clamp(34px, 6vw, 58px);
  font-weight: 500;
}

.story-detail-hero p:last-child {
  margin: 0;
  color: var(--muted);
}

.story-detail-dialog > blockquote {
  margin: 0 0 34px;
  padding: 24px 28px;
  border-left: 3px solid var(--gold);
  background: var(--paper);
  font-size: 18px;
}

.story-detail-content {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.9;
}

.story-detail-content img {
  max-width: 100%;
  height: auto;
}

.story-detail-sections {
  display: grid;
  margin-top: 30px;
  gap: 16px;
}

.story-detail-section {
  padding: 20px 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.45);
}

.story-detail-section h3 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 18px;
}

.story-detail-section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  white-space: pre-wrap;
}

.story-detail-photos {
  display: grid;
  margin-top: 28px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.story-detail-photos img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.story-detail-note {
  margin: 30px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

@media (max-width: 620px) {
  .story-detail-hero {
    grid-template-columns: 80px 1fr;
  }

  .story-detail-hero img {
    width: 80px;
    height: 98px;
  }

  .story-detail-photos {
    grid-template-columns: 1fr;
  }
}

.hero-entry-actions {
  display: grid;
  width: min(880px, 100%);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.entry-button {
  display: inline-flex;
  min-height: 50px;
  padding: 0 20px;
  border: 1px solid rgba(42, 68, 57, 0.32);
  align-items: center;
  justify-content: center;
  color: var(--green-dark);
  background: rgba(255, 250, 242, 0.82);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.03em;
  transition: 180ms ease;
}

.entry-button:hover {
  border-color: var(--green);
  background: #fffaf2;
  transform: translateY(-2px);
}

.trust-prompts div {
  display: flex;
  align-items: center;
}

.trust-prompts strong {
  max-width: 210px;
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.55;
}

.demo-label {
  position: absolute;
  z-index: 3;
  top: -28px;
  right: 0;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.about-section {
  padding: 110px 9vw 120px;
  border-top: 1px solid var(--line);
  background: #f7f0e5;
}

.about-heading {
  max-width: 780px;
  margin-bottom: 54px;
}

.about-heading h2 {
  margin: 12px 0 0;
  font-family: var(--serif);
  font-size: clamp(34px, 5vw, 62px);
  font-weight: 500;
  line-height: 1.15;
}

.about-layout {
  display: grid;
  max-width: 820px;
  grid-template-columns: minmax(0, 1fr);
}

.about-philosophy {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.9;
}

.about-philosophy p {
  margin: 0 0 22px;
}

.about-emphasis {
  padding: 20px 0 20px 24px;
  border-left: 2px solid var(--gold);
  font-size: 20px;
}

.footer-disclaimer {
  max-width: 650px;
  padding: 0 28px;
  line-height: 1.65;
  text-align: center;
  letter-spacing: 0;
}

.sentence-dialog {
  width: min(680px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 48px;
  overflow-y: auto;
  border: 0;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 30px 100px rgba(18, 35, 30, 0.3);
}

.sentence-dialog::backdrop {
  background: rgba(22, 36, 31, 0.64);
  backdrop-filter: blur(5px);
}

.sentence-dialog h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 500;
}

#sentenceForm {
  display: grid;
  gap: 22px;
}

#sentenceForm fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

#sentenceForm legend,
#sentenceForm label > span {
  display: block;
  margin-bottom: 9px;
  font-family: var(--serif);
  font-size: 12px;
}

#sentenceForm textarea,
#sentenceForm input[type="date"] {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  outline: 0;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.5);
  resize: vertical;
}

.compact-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.compact-choice-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.compact-choice-grid label {
  cursor: pointer;
}

.compact-choice-grid input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.compact-choice-grid label > span {
  min-height: 48px;
  margin: 0;
  padding: 13px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.35);
}

.compact-choice-grid label:has(input:checked) > span {
  border-color: var(--green);
  color: var(--green-dark);
  background: #fffaf2;
  box-shadow: 0 6px 18px rgba(92, 63, 43, 0.08);
}

.sentence-date {
  display: block;
  margin-top: 12px;
}

.sentence-date[hidden],
.sentence-followup[hidden] {
  display: none;
}

.sentence-followup {
  padding: 24px 0 0;
  text-align: center;
}

.success-check {
  display: grid;
  width: 46px;
  height: 46px;
  margin: 0 auto 18px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
}

.sentence-followup h3 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
}

.sentence-followup p {
  color: var(--muted);
}

.sentence-followup > div {
  display: grid;
  margin-top: 22px;
  gap: 10px;
}

.record-options small {
  max-width: 500px;
  line-height: 1.55;
}

.field-guidance {
  margin: -4px 0 0;
  padding: 12px 14px;
  border-left: 2px solid var(--gold);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.35);
  font-size: 10px;
  line-height: 1.65;
}

.death-date-field {
  grid-column: 1 / -1;
}

.submission-disclaimer {
  padding: 16px;
  border: 1px solid rgba(103, 83, 58, 0.16);
  background: rgba(255, 255, 255, 0.38);
}

.submission-disclaimer strong {
  font-family: var(--serif);
  font-size: 12px;
}

.submission-disclaimer p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.7;
}

.consent-group {
  display: grid;
  min-width: 0;
  margin: 0;
  padding: 17px;
  border: 1px solid rgba(104, 119, 90, 0.25);
  gap: 13px;
  background: rgba(232, 238, 224, 0.52);
}

.consent-group legend {
  padding: 0 6px;
  font-family: var(--serif);
  font-size: 12px;
}

#storyForm .consent {
  align-items: flex-start;
  line-height: 1.55;
}

#storyForm .consent input {
  margin-top: 2px;
  flex: 0 0 auto;
}

@media (max-width: 760px) {
  .hero-entry-actions,
  .about-layout {
    grid-template-columns: 1fr;
  }

  .hero-entry-actions {
    width: 100%;
  }

  .about-section {
    padding: 80px 7vw;
  }

  .compact-choice-grid.three {
    grid-template-columns: 1fr;
  }

  footer {
    display: grid;
    gap: 18px;
    text-align: center;
  }

  .footer-disclaimer {
    padding: 0;
  }
}

@media (max-width: 520px) {
  .sentence-dialog {
    padding: 34px 22px;
  }

  .compact-choice-grid {
    grid-template-columns: 1fr;
  }
}

.belief-section {
  padding: 120px 8vw;
  text-align: center;
}

.belief-quote {
  margin: 0 auto;
  font-family: var(--serif);
  font-size: clamp(28px, 3.4vw, 48px);
  line-height: 1.65;
}

.belief-grid {
  display: grid;
  max-width: 1100px;
  margin: 90px auto 0;
  grid-template-columns: repeat(3, 1fr);
  text-align: left;
}

.belief-grid article {
  padding: 0 45px;
  border-right: 1px solid var(--line);
}

.belief-grid article:first-child {
  padding-left: 0;
}

.belief-grid article:last-child {
  padding-right: 0;
  border: 0;
}

.belief-grid span {
  color: var(--gold);
  font-family: var(--serif);
  font-size: 11px;
}

.belief-grid h3 {
  margin: 20px 0 14px;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
}

.belief-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.9;
}

.closing-cta {
  display: flex;
  padding: 80px 9vw;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  background: var(--green-dark);
}

.closing-cta .section-kicker {
  color: #cbb486;
}

.primary-button.light {
  border-color: #f4f0e7;
  color: var(--ink);
  background: #f4f0e7;
}

footer {
  display: flex;
  padding: 35px 5vw;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  background: #e2dccf;
  font-size: 9px;
  letter-spacing: 0.08em;
}

footer .brand {
  font-size: 13px;
}

footer .brand-mark {
  width: 12px;
  height: 18px;
}

.contribute-dialog {
  width: min(600px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 48px;
  border: 0;
  overflow-y: auto;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 30px 100px rgba(18, 35, 30, 0.3);
}

.contribute-dialog::backdrop {
  background: rgba(22, 36, 31, 0.64);
  backdrop-filter: blur(5px);
}

.contribute-dialog h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 500;
}

.dialog-intro {
  margin: 12px 0 28px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.record-options {
  display: grid;
  gap: 12px;
}

.record-options button {
  padding: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  text-align: left;
  transition: 160ms ease;
}

.record-options button:hover {
  border-color: var(--green);
  background: #fff;
  transform: translateX(4px);
}

.record-options button.selected {
  border-color: var(--green);
  color: var(--green-dark);
  background: #fffaf2;
  box-shadow:
    inset 4px 0 0 var(--green),
    0 10px 24px rgba(62, 85, 72, 0.1);
  transform: translateX(4px);
}

.record-options button.selected::after {
  float: right;
  color: var(--green);
  content: "✓ Selected";
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.audience-continue {
  width: 100%;
  margin-top: 16px;
}

.audience-continue:disabled {
  cursor: default;
  opacity: 0.42;
  transform: none;
}

.record-options span,
.record-options small {
  display: block;
}

.record-options span {
  font-family: var(--serif);
  font-size: 16px;
}

.record-options small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.family-delivery-settings {
  display: grid;
  padding: 20px;
  border: 1px solid rgba(167, 94, 60, 0.25);
  gap: 16px;
  background: rgba(255, 247, 236, 0.82);
}

.family-delivery-settings[hidden],
.family-delivery-fields[hidden] {
  display: none;
}

.family-delivery-settings h3 {
  margin: 5px 0 8px;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
}

.family-delivery-settings p:not(.section-kicker) {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

.delivery-toggle {
  display: flex;
  padding: 13px;
  border: 1px solid var(--line);
  align-items: flex-start;
  gap: 10px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
}

.delivery-toggle-disabled {
  border-style: dashed;
  cursor: default;
  opacity: 0.78;
}

#storyForm .delivery-toggle input {
  width: auto;
  margin-top: 2px;
}

#storyForm .delivery-toggle > span {
  margin: 0;
  font-family: var(--sans);
  line-height: 1.5;
}

#storyForm .delivery-toggle small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.family-delivery-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.family-delivery-fields small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.family-delivery-fields .delivery-consent {
  display: flex;
  grid-column: 1 / -1;
  padding: 12px;
  border: 1px solid rgba(104, 119, 90, 0.25);
  align-items: flex-start;
  gap: 9px;
  background: rgba(232, 238, 224, 0.5);
}

#storyForm .delivery-consent input {
  width: auto;
  margin-top: 2px;
}

#storyForm .delivery-consent > span {
  margin: 0;
  font-family: var(--sans);
  font-size: 10px;
  line-height: 1.55;
}

@media (max-width: 620px) {
  .family-delivery-fields {
    grid-template-columns: 1fr;
  }

  .family-delivery-fields small {
    grid-column: auto;
  }
}

#storyForm {
  display: grid;
  gap: 20px;
}

#storyForm[hidden] {
  display: none;
}

.draft-safety {
  display: grid;
  padding: 16px;
  border: 1px solid rgba(104, 119, 90, 0.25);
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 13px;
  background: rgba(232, 238, 224, 0.72);
}

.draft-safety-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
  font-size: 12px;
}

.draft-safety strong {
  font-family: var(--serif);
  font-size: 12px;
}

.draft-safety p {
  margin: 4px 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.draft-safety p span {
  display: block;
}

.draft-safety span {
  color: var(--green-dark);
  font-size: 8px;
}

.draft-safety button {
  padding: 9px 11px;
  border: 1px solid var(--green);
  color: var(--green-dark);
  background: #fffaf2;
  cursor: pointer;
  font-size: 9px;
  white-space: nowrap;
}

.account-dialog {
  width: min(480px, calc(100% - 32px));
  padding: 42px;
  border: 0;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 30px 100px rgba(18, 35, 30, 0.3);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.account-button {
  max-width: 210px;
  padding: 9px 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--green);
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-tabs {
  display: grid;
  margin: 18px 0 14px;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.account-tabs button {
  padding: 10px;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.account-tabs button.active {
  color: #fff;
  background: var(--green);
}

.account-signed-in {
  display: grid;
  margin: 18px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  gap: 7px;
  background: rgba(255, 255, 255, 0.55);
}

.account-signed-in[hidden],
#accountForm[hidden],
.account-tabs[hidden],
.account-flow[hidden],
.account-verification[hidden] {
  display: none;
}

.account-signed-in span {
  color: var(--muted);
  font-size: 10px;
}

.account-signed-in strong {
  overflow-wrap: anywhere;
  color: var(--green);
  font-family: var(--serif);
}

.secondary-button {
  margin-top: 8px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

.account-dialog::backdrop {
  background: rgba(22, 36, 31, 0.64);
  backdrop-filter: blur(5px);
}

.account-dialog h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 500;
}

.account-dialog > p:not(.section-kicker) {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}

.account-benefits {
  display: grid;
  margin: 22px 0;
  padding: 15px;
  gap: 8px;
  color: var(--green-dark);
  background: rgba(232, 238, 224, 0.72);
  font-size: 10px;
}

.account-flow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 20px 0;
}

.account-flow[hidden],
.account-verification[hidden] {
  display: none !important;
}

.account-flow > div {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px 10px;
  border: 1px solid rgba(103, 83, 58, 0.14);
  border-radius: 14px;
  background: rgba(255, 252, 246, 0.76);
}

.account-flow b {
  display: grid;
  place-items: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #fff;
  background: #8b6d52;
  font-size: 12px;
}

.account-flow span {
  display: grid;
  gap: 3px;
}

.account-flow strong {
  font-size: 13px;
}

.account-flow small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.account-actions {
  display: grid;
  gap: 10px;
}

.account-actions .secondary-button {
  width: 100%;
}

.account-verification {
  display: grid;
  margin: 22px 0 8px;
  padding: 24px;
  border: 1px solid rgba(103, 83, 58, 0.18);
  border-radius: 16px;
  gap: 10px;
  text-align: center;
  background: rgba(255, 252, 246, 0.82);
}

.account-verification .verification-icon {
  display: grid;
  width: 42px;
  height: 42px;
  margin: 0 auto 2px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
  font-size: 20px;
}

.account-verification h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
}

.account-verification p {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.text-link-button {
  border: 0;
  padding: 7px;
  color: #795c44;
  background: transparent;
  font: inherit;
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
}

@media (max-width: 620px) {
  .account-flow {
    grid-template-columns: 1fr;
  }
}

.account-dialog label span {
  display: block;
  margin-bottom: 7px;
  font-family: var(--serif);
  font-size: 11px;
}

.account-dialog label > small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.account-dialog input {
  width: 100%;
  padding: 13px;
  border: 1px solid var(--line);
  outline: 0;
  background: rgba(255, 255, 255, 0.55);
}

.account-dialog .primary-button {
  width: 100%;
  margin-top: 13px;
}

.account-dialog > small {
  display: block;
  margin-top: 13px;
  color: var(--muted);
  font-size: 8px;
  text-align: center;
}

.account-feedback {
  min-height: 34px;
  margin: 12px 0 0;
  padding: 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.45);
  font-size: 9px;
  line-height: 1.55;
}

.account-feedback.error {
  color: #8f3f35;
  background: rgba(163, 79, 66, 0.09);
}

.account-feedback.success {
  color: var(--green-dark);
  background: rgba(104, 119, 90, 0.12);
}

.account-dialog .primary-button:disabled {
  cursor: default;
  opacity: 0.65;
  transform: none;
}

#storyForm label > span {
  display: block;
  margin-bottom: 8px;
  font-family: var(--serif);
  font-size: 12px;
}

#storyForm input,
#storyForm textarea,
#storyForm select {
  width: 100%;
  padding: 13px;
  border: 1px solid var(--line);
  outline: 0;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.45);
  resize: vertical;
}

#storyForm input:focus,
#storyForm textarea:focus,
#storyForm select:focus {
  border-color: var(--green);
}

.person-fields {
  display: grid;
  gap: 14px;
}

.life-date-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 620px) {
  .life-date-fields {
    grid-template-columns: 1fr;
  }
}

.location-field {
  display: grid;
  gap: 10px;
}

.location-field > p,
.location-field > small {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.location-picker-map {
  width: 100%;
  height: 260px;
  overflow: hidden;
  border: 1px solid rgba(103, 83, 58, 0.2);
  border-radius: 18px;
  background: #eee8dd;
}

.location-field > small.location-selected {
  color: #4d765d;
  font-weight: 600;
}

.identity-fields {
  display: grid;
  grid-template-columns: 132px 1fr;
  align-items: start;
  gap: 18px;
}

.avatar-upload > span {
  display: block;
  margin-bottom: 8px;
  font-family: var(--serif);
  font-size: 12px;
}

.avatar-dropzone {
  position: relative;
  display: grid;
  width: 112px;
  height: 132px;
  padding: 0;
  overflow: hidden;
  border: 1px dashed rgba(104, 119, 90, 0.55);
  place-items: center;
  color: var(--green);
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.avatar-dropzone:hover,
.avatar-dropzone.dragging {
  border-style: solid;
  background: #fffaf2;
}

.avatar-placeholder b,
.avatar-placeholder small {
  display: block;
}

.avatar-placeholder {
  position: absolute;
  right: 6px;
  bottom: 6px;
  left: 6px;
  z-index: 1;
  padding: 6px;
  border-radius: 9px;
  color: #fff;
  background: rgba(57, 47, 40, 0.62);
  backdrop-filter: blur(4px);
}

.avatar-placeholder b {
  font-size: 18px;
  font-weight: 400;
}

.avatar-placeholder small {
  margin-top: 5px;
  font-size: 9px;
}

.avatar-dropzone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-actions {
  display: flex;
  width: 112px;
  margin-top: 6px;
  justify-content: space-between;
}

.avatar-actions[hidden] {
  display: none;
}

.avatar-actions button {
  padding: 3px 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 9px;
}

.avatar-actions button:hover {
  color: var(--green);
}

.upload-hint {
  display: block;
  max-width: 112px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.name-field {
  padding-top: 1px;
}

#storyForm .consent {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
}

#storyForm .consent input {
  width: auto;
}

.story-depth,
.story-visibility {
  min-width: 0;
  margin: 2px 0 0;
  padding: 0;
  border: 0;
}

.story-depth legend,
.story-visibility legend {
  margin-bottom: 11px;
  font-family: var(--serif);
  font-size: 12px;
}

.depth-tabs,
.visibility-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.depth-tab,
.visibility-option {
  display: block;
  cursor: pointer;
}

.depth-tab input,
.visibility-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.depth-tab > span,
.visibility-option > span {
  display: block;
  min-height: 78px;
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.35);
  transition: 150ms ease;
}

.depth-tab:hover > span,
.depth-tab.selected > span,
.visibility-option:hover > span,
.visibility-option.selected > span {
  border-color: var(--green);
  background: #fffaf2;
  box-shadow: 0 7px 18px rgba(92, 63, 43, 0.08);
}

.depth-tab b,
.depth-tab small,
.visibility-option b,
.visibility-option small {
  display: block;
}

.depth-tab b,
.visibility-option b {
  margin-bottom: 6px;
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 600;
}

.depth-tab small,
.visibility-option small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.detailed-story {
  display: grid;
  margin-top: 12px;
  padding: 20px;
  border: 1px solid rgba(104, 119, 90, 0.25);
  gap: 17px;
  background: rgba(239, 234, 218, 0.55);
}

.detailed-story[hidden] {
  display: none;
}

.rich-story-field {
  min-width: 0;
}

.rich-story-label {
  display: flex;
  margin-bottom: 8px;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.rich-story-label > span {
  font-family: var(--serif);
  font-size: 12px;
}

.rich-story-label small {
  color: var(--muted);
  font-size: 8px;
}

.editor-toolbar {
  display: flex;
  padding: 7px;
  border: 1px solid var(--line);
  border-bottom: 0;
  align-items: center;
  gap: 4px;
  background: #f2e8da;
}

.editor-toolbar button {
  min-width: 32px;
  height: 31px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
  font-size: 10px;
}

.editor-toolbar button:hover {
  border-color: var(--line);
  background: #fffaf2;
}

.toolbar-spacer {
  flex: 1;
}

.editor-toolbar .insert-photo-button {
  color: #fff;
  background: var(--green);
}

.editor-toolbar .insert-photo-button:hover {
  border-color: var(--green-dark);
  background: var(--green-dark);
}

.rich-editor {
  min-height: 290px;
  padding: 22px;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  outline: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.84)),
    repeating-linear-gradient(
      to bottom,
      transparent 0 31px,
      rgba(91, 66, 49, 0.06) 32px
    );
  font-family: var(--serif);
  font-size: 13px;
  line-height: 2;
}

.rich-editor:empty::before {
  color: rgba(72, 56, 47, 0.42);
  content: attr(data-placeholder);
  pointer-events: none;
}

.rich-editor:focus {
  border-color: var(--green);
}

.rich-editor.invalid {
  border-color: #a34f42;
  box-shadow: 0 0 0 2px rgba(163, 79, 66, 0.1);
}

.rich-editor h3 {
  margin: 20px 0 8px;
  color: var(--green-dark);
  font-size: 18px;
}

.rich-editor blockquote {
  margin: 18px 0;
  padding: 5px 0 5px 16px;
  border-left: 3px solid var(--gold);
  color: var(--muted);
}

.rich-editor img {
  display: block;
  max-width: 100%;
  max-height: 420px;
  margin: 20px auto 8px;
  border: 7px solid #fffaf2;
  box-shadow: 0 10px 26px rgba(72, 56, 47, 0.16);
  object-fit: contain;
}

.rich-editor figure {
  margin: 20px 0;
}

.rich-editor figcaption {
  color: var(--muted);
  font-size: 9px;
  text-align: center;
}

.editor-footer {
  display: flex;
  padding-top: 7px;
  justify-content: flex-end;
  gap: 16px;
  color: var(--muted);
  font-size: 8px;
}

.life-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.visibility-note {
  margin: 9px 0 0;
  padding-left: 11px;
  border-left: 2px solid var(--gold);
  color: var(--muted);
  font-size: 9px;
  line-height: 1.7;
}

.release-settings {
  min-width: 0;
  margin: 2px 0 0;
  padding: 0;
  border: 0;
}

.release-settings legend {
  margin-bottom: 11px;
  font-family: var(--serif);
  font-size: 12px;
}

.release-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.release-option {
  display: block;
  cursor: pointer;
}

.release-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.release-option > span {
  display: block;
  min-height: 92px;
  padding: 14px 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.35);
  transition: 150ms ease;
}

.release-option:hover > span,
.release-option.selected > span {
  border-color: var(--gold);
  background: #fffaf2;
  box-shadow: 0 7px 18px rgba(92, 63, 43, 0.08);
}

.release-option b,
.release-option small {
  display: block;
}

.release-option b {
  margin-bottom: 7px;
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 600;
}

.release-option small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.coming-soon-badge {
  display: inline-block;
  margin-left: 5px;
  padding: 3px 6px;
  border-radius: 999px;
  color: #fffaf2;
  background: #9b704d;
  font-family: var(--sans);
  font-size: 7px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: middle;
}

.future-letter-option {
  display: grid;
  margin-top: 14px;
  padding: 16px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  border: 1px dashed rgba(155, 112, 77, 0.45);
  align-items: center;
  gap: 12px;
  background: rgba(255, 250, 242, 0.72);
}

.future-letter-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: #fffaf2;
  background: #9b704d;
  font-size: 15px;
}

.future-letter-option b,
.future-letter-option small {
  display: block;
}

.future-letter-option b {
  margin-bottom: 5px;
  font-family: var(--serif);
  font-size: 12px;
}

.future-letter-option small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.future-letter-control {
  width: 34px;
  height: 18px;
  border: 1px solid rgba(72, 56, 47, 0.2);
  border-radius: 999px;
  background: rgba(72, 56, 47, 0.08);
}

.future-letter-control::after {
  display: block;
  width: 12px;
  height: 12px;
  margin: 2px;
  border-radius: 50%;
  background: rgba(72, 56, 47, 0.32);
  content: "";
}

.time-capsule {
  display: grid;
  margin-top: 12px;
  padding: 20px;
  border: 1px solid rgba(199, 129, 82, 0.3);
  gap: 17px;
  background:
    linear-gradient(135deg, rgba(255, 250, 242, 0.96), rgba(247, 231, 211, 0.72));
}

.time-capsule[hidden] {
  display: none;
}

.capsule-heading {
  display: flex;
  align-items: center;
  gap: 11px;
}

.capsule-heading b,
.capsule-heading small {
  display: block;
}

.capsule-heading b {
  font-family: var(--serif);
  font-size: 14px;
}

.capsule-heading small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.capsule-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--gold);
  font-size: 18px;
}

.release-years > span {
  display: block;
  margin-bottom: 8px;
  font-family: var(--serif);
  font-size: 12px;
}

.release-years > div {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.release-years button {
  min-height: 36px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  font-size: 10px;
}

.release-years button:hover,
.release-years button.active {
  border-color: var(--green);
  color: #fff;
  background: var(--green);
}

.capsule-preview {
  padding: 14px;
  border-left: 3px solid var(--gold);
  background: rgba(255, 255, 255, 0.55);
}

.capsule-preview p {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.capsule-preview div {
  display: grid;
  padding: 7px 0;
  grid-template-columns: 130px 1fr;
  border-top: 1px solid var(--line);
  gap: 10px;
}

.capsule-preview span {
  color: var(--muted);
  font-size: 9px;
}

.capsule-preview strong {
  font-family: var(--serif);
  font-size: 11px;
  font-weight: 500;
}

.capsule-note {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.7;
}

.success-message {
  padding: 30px 0 10px;
  text-align: center;
}

.success-message[hidden] {
  display: none;
}

.success-message > span {
  display: grid;
  width: 48px;
  height: 48px;
  margin: 0 auto 18px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
}

.success-message h3 {
  font-family: var(--serif);
  font-size: 22px;
}

.success-message p {
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 800px) {
  .site-header {
    grid-template-columns: 1fr auto;
    gap: 12px;
  }

  .main-nav {
    display: none;
  }

  .primary-button.small {
    padding: 0 12px;
  }

  .language-fab {
    top: auto;
    right: 14px;
    bottom: 16px;
    width: auto;
    padding: 10px 13px;
    border-radius: 24px;
    grid-template-columns: auto auto;
    gap: 7px;
    transform: none;
  }

  .language-fab:hover {
    width: auto;
  }

  .language-fab b {
    margin: 0;
  }

  .language-fab small {
    display: none;
  }

  .language-panel {
    padding: 25px 18px 18px;
  }

  .language-list {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 700px;
    padding: 150px 6vw 60px;
  }

  .hero::after {
    top: 170px;
    right: -40vw;
    width: 100vw;
    height: 100vw;
  }

  .hero h1 {
    font-size: 50px;
  }

  .hero-actions,
  .map-toolbar,
  .closing-cta {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-stats {
    margin-top: 55px;
    gap: 18px;
  }

  .hero-stats div {
    padding-right: 18px;
  }

  .map-section {
    padding: 75px 4vw;
  }

  .map-toolbar {
    gap: 25px;
  }

  .map-shell {
    height: 650px;
  }

  .map-canvas {
    width: 1150px;
    left: -390px;
  }

  .story-preview {
    top: auto;
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
    padding: 27px;
    transform: none;
  }

  .story-preview.closed {
    transform: translateY(30px);
  }

  .portrait {
    float: left;
    width: 56px;
    height: 68px;
    margin: 0 18px 12px 0;
  }

  blockquote {
    clear: both;
  }

  .belief-section {
    padding: 85px 6vw;
  }

  .belief-grid {
    margin-top: 60px;
    grid-template-columns: 1fr;
  }

  .belief-grid article,
  .belief-grid article:first-child,
  .belief-grid article:last-child {
    padding: 30px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .closing-cta {
    gap: 35px;
  }

  footer {
    gap: 20px;
    flex-direction: column;
    text-align: center;
  }

  .contribute-dialog {
    padding: 38px 24px;
  }

  .release-options {
    grid-template-columns: 1fr;
  }

  .depth-tabs,
  .visibility-options,
  .life-detail-grid {
    grid-template-columns: 1fr;
  }

  .identity-fields {
    grid-template-columns: 1fr;
  }

  .draft-safety {
    grid-template-columns: auto 1fr;
  }

  .draft-safety button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .avatar-upload {
    display: grid;
    grid-template-columns: 112px 1fr;
    align-items: start;
    column-gap: 12px;
  }

  .avatar-upload > span {
    grid-column: 1 / -1;
  }

  .avatar-actions,
  .upload-hint {
    width: auto;
    max-width: none;
  }

  .editor-toolbar {
    flex-wrap: wrap;
  }

  .toolbar-spacer {
    display: none;
  }

  .editor-toolbar .insert-photo-button {
    margin-left: auto;
  }

  .depth-tab > span,
  .visibility-option > span {
    min-height: 0;
  }

  .release-option > span {
    min-height: 0;
  }

  .release-years > div {
    grid-template-columns: repeat(3, 1fr);
  }

  .capsule-preview div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* Warmer, photo-led edition */
:root {
  --ink: #48382f;
  --muted: #7a6a5e;
  --paper: #fbf4e8;
  --paper-deep: #f0e1ce;
  --green: #68775a;
  --green-dark: #4e5d45;
  --gold: #c78152;
  --line: rgba(91, 66, 49, 0.16);
}

body {
  background:
    radial-gradient(circle at 12% 5%, #fffdf8 0, transparent 29%),
    #fbf4e8;
}

.hero {
  min-height: 830px;
  padding-right: 53vw;
  background:
    radial-gradient(circle at 75% 35%, rgba(230, 179, 129, 0.17), transparent 30%),
    linear-gradient(135deg, rgba(255, 252, 246, 0.86), rgba(247, 231, 211, 0.4));
}

.hero::after {
  top: 105px;
  right: 2vw;
  width: min(44vw, 650px);
  height: 650px;
  border-color: rgba(174, 116, 76, 0.13);
  background: repeating-radial-gradient(
    circle at 52% 48%,
    transparent 0 58px,
    rgba(174, 116, 76, 0.08) 59px 60px
  );
}

.hero h1 {
  min-width: 570px;
  color: #48382f;
  font-size: clamp(54px, 5.6vw, 82px);
}

.hero h1 em {
  color: #a75e3c;
}

.hero-copy {
  min-width: 520px;
}

.hero-stats {
  min-width: 590px;
}

.hero-memory-photos {
  position: absolute;
  z-index: 2;
  top: 125px;
  right: 5.5vw;
  width: min(40vw, 580px);
  height: 620px;
}

.memory-photo {
  position: absolute;
  margin: 0;
  padding: 10px 10px 42px;
  background: #fffaf2;
  box-shadow: 0 24px 60px rgba(91, 63, 43, 0.2);
}

.memory-photo::after {
  position: absolute;
  top: -13px;
  left: 50%;
  width: 75px;
  height: 27px;
  background: rgba(224, 194, 151, 0.65);
  content: "";
  transform: translateX(-50%) rotate(-2deg);
}

.memory-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.memory-photo figcaption {
  display: flex;
  position: absolute;
  right: 14px;
  bottom: 11px;
  left: 14px;
  align-items: center;
  justify-content: space-between;
  font-family: var(--serif);
  font-size: 11px;
}

.memory-photo figcaption span {
  color: var(--muted);
  font-size: 9px;
}

.photo-main {
  top: 20px;
  right: 20px;
  width: 68%;
  height: 480px;
  transform: rotate(2.5deg);
}

.photo-small {
  bottom: 10px;
  left: 0;
  width: 43%;
  height: 285px;
  transform: rotate(-5deg);
}

.photo-third {
  z-index: 3;
  right: 0;
  bottom: 36px;
  width: 35%;
  height: 235px;
  transform: rotate(5deg);
}

.hand-note {
  position: absolute;
  right: 29%;
  bottom: 0;
  color: #a75e3c;
  font-family: "Kaiti SC", "STKaiti", var(--serif);
  font-size: 15px;
  line-height: 1.7;
  transform: rotate(-4deg);
}

.time-lock-feature {
  position: relative;
  display: grid;
  padding: 115px 8vw;
  overflow: hidden;
  grid-template-columns: minmax(0, 0.82fr) minmax(520px, 1.18fr);
  align-items: center;
  gap: clamp(60px, 8vw, 130px);
  background:
    radial-gradient(circle at 78% 45%, rgba(218, 162, 113, 0.2), transparent 27%),
    linear-gradient(135deg, #fffaf2 0%, #f6e8d6 100%);
}

.time-lock-feature::before {
  position: absolute;
  top: -170px;
  right: -100px;
  width: 560px;
  height: 560px;
  border: 1px solid rgba(167, 94, 60, 0.1);
  border-radius: 50%;
  box-shadow:
    0 0 0 70px rgba(167, 94, 60, 0.035),
    0 0 0 140px rgba(167, 94, 60, 0.025);
  content: "";
}

.time-lock-copy {
  position: relative;
  z-index: 1;
}

.time-lock-copy .section-kicker {
  margin-bottom: 18px;
}

.time-lock-copy h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(42px, 5vw, 70px);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1.25;
}

.time-lock-copy h2 em {
  display: block;
  color: #a75e3c;
  font-style: normal;
}

.time-lock-lead {
  max-width: 550px;
  margin: 28px 0 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 14px;
  line-height: 2;
}

.time-lock-lead span {
  display: block;
}

.time-lock-value {
  margin: 30px 0 0;
  padding-left: 20px;
  border-left: 3px solid var(--gold);
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(18px, 2vw, 25px);
  line-height: 1.75;
}

.time-lock-cta {
  margin-top: 34px;
}

.time-lock-visual {
  position: relative;
  z-index: 1;
}

.lock-card {
  position: relative;
  padding: 34px;
  border: 1px solid rgba(121, 89, 71, 0.18);
  border-radius: 3px;
  background:
    linear-gradient(rgba(255, 253, 248, 0.95), rgba(255, 250, 242, 0.95)),
    repeating-linear-gradient(
      135deg,
      transparent 0 14px,
      rgba(199, 129, 82, 0.05) 15px 16px
    );
  box-shadow: 0 35px 80px rgba(91, 63, 43, 0.18);
  transform: rotate(1deg);
}

.lock-card::before {
  position: absolute;
  top: -14px;
  left: 50%;
  width: 115px;
  height: 28px;
  background: rgba(222, 188, 144, 0.58);
  content: "";
  transform: translateX(-50%) rotate(-2deg);
}

.lock-card-top {
  display: flex;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  align-items: center;
  gap: 13px;
}

.lock-seal {
  display: grid;
  width: 45px;
  height: 45px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #fffaf2;
  background: #a75e3c;
  box-shadow: 0 0 0 6px rgba(167, 94, 60, 0.1);
  font-size: 20px;
}

.lock-card-top small,
.lock-card-top strong {
  display: block;
}

.lock-card-top small {
  color: var(--gold);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.lock-card-top strong {
  margin-top: 4px;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
}

.privacy-badge {
  margin-left: auto;
  padding: 6px 10px;
  border-radius: 20px;
  color: var(--green-dark);
  background: rgba(104, 119, 90, 0.13);
  font-size: 9px;
  white-space: nowrap;
}

.release-timeline {
  display: grid;
  padding: 30px 0 26px;
  grid-template-columns: 1fr 90px 1fr;
  align-items: center;
  gap: 18px;
}

.timeline-now,
.timeline-future {
  min-height: 120px;
  padding: 17px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.58);
}

.timeline-now > span,
.timeline-future > span,
.timeline-now strong,
.timeline-future strong,
.timeline-now small,
.timeline-future small {
  display: block;
}

.timeline-now > span,
.timeline-future > span {
  color: var(--gold);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.timeline-now strong,
.timeline-future strong {
  margin-top: 11px;
  font-family: var(--serif);
  font-size: 14px;
}

.timeline-now small,
.timeline-future small {
  margin-top: 8px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.timeline-line {
  display: grid;
  align-items: center;
  grid-template-columns: 1fr;
  text-align: center;
}

.timeline-line span {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.timeline-line i {
  padding: 8px 0;
  color: #a75e3c;
  font-family: var(--serif);
  font-size: 9px;
  font-style: normal;
  white-space: nowrap;
}

.year-examples {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}

.year-examples span {
  padding: 9px 4px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.45);
  font-size: 9px;
  text-align: center;
}

.year-examples span.active {
  border-color: var(--green);
  color: #fff;
  background: var(--green);
}

.lock-promises {
  display: flex;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 9px;
}

.time-lock-caption {
  margin: 22px 0 0;
  color: #a75e3c;
  font-family: "Kaiti SC", "STKaiti", var(--serif);
  font-size: 15px;
  text-align: center;
  transform: rotate(-1deg);
}

.map-section {
  background:
    linear-gradient(rgba(247, 231, 211, 0.73), rgba(247, 231, 211, 0.73)),
    #f4e6d5;
}

.map-shell {
  border: 8px solid #fff8ee;
  background: #e8ded0;
  box-shadow:
    0 35px 90px rgba(94, 67, 45, 0.18),
    0 0 0 1px rgba(91, 66, 49, 0.12);
}

#realMap {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #e5ddd0;
  font-family: var(--sans);
}

#realMap .leaflet-tile-pane {
  filter: sepia(0.18) saturate(0.72) brightness(1.04);
}

#realMap .leaflet-control-zoom a {
  color: var(--ink);
  background: #fffaf2;
}

#realMap .leaflet-control-attribution {
  color: var(--muted);
  background: rgba(255, 250, 242, 0.85);
  font-size: 9px;
}

.life-map-icon {
  background: transparent;
  border: 0;
}

.map-person {
  position: relative;
  display: block;
  width: 52px;
  height: 52px;
  padding: 3px;
  border: 2px solid #fffaf2;
  border-radius: 50%;
  background: #fffaf2;
  box-shadow:
    0 7px 18px rgba(76, 53, 37, 0.28),
    0 0 0 5px rgba(199, 129, 82, 0.2);
  cursor: pointer;
}

.map-person.living {
  box-shadow:
    0 7px 18px rgba(76, 53, 37, 0.28),
    0 0 0 5px rgba(104, 119, 90, 0.22);
}

.map-person img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.map-person span {
  position: absolute;
  top: 57px;
  left: 50%;
  padding: 4px 8px;
  border-radius: 14px;
  color: var(--ink);
  background: rgba(255, 250, 242, 0.95);
  box-shadow: 0 3px 10px rgba(76, 53, 37, 0.13);
  font-family: var(--serif);
  font-size: 10px;
  white-space: nowrap;
  transform: translateX(-50%);
}

.map-hint {
  z-index: 5;
  padding: 7px 11px;
  border-radius: 16px;
  background: rgba(255, 250, 242, 0.9);
}

.story-preview {
  z-index: 6;
  color: #fff9f0;
  background: rgba(84, 67, 53, 0.96);
}

.portrait {
  display: block;
  width: 88px;
  height: 106px;
  border: 5px solid #f8ecdb;
  background: #d9c4a7;
  box-shadow: 0 8px 22px rgba(27, 18, 12, 0.22);
  object-fit: cover;
  transform: rotate(-2deg);
}

.belief-section {
  background:
    radial-gradient(circle at 14% 20%, rgba(231, 185, 139, 0.17), transparent 22%),
    #fffaf2;
}

.closing-cta {
  background: #795947;
}

@media (max-width: 1050px) {
  .hero {
    padding-right: 48vw;
  }

  .hero h1 {
    min-width: 510px;
    font-size: 58px;
  }

  .hero-memory-photos {
    right: 3vw;
    width: 42vw;
  }

  .time-lock-feature {
    padding: 90px 6vw;
    grid-template-columns: 1fr;
    gap: 60px;
  }

  .time-lock-copy {
    max-width: 690px;
  }
}

@media (max-width: 800px) {
  .hero {
    min-height: 1080px;
    padding-right: 6vw;
  }

  .hero h1,
  .hero-copy,
  .hero-stats {
    min-width: 0;
  }

  .hero h1 {
    font-size: 48px;
  }

  .hero-memory-photos {
    top: 685px;
    right: 5vw;
    left: 5vw;
    width: 90vw;
    height: 350px;
  }

  .photo-main {
    width: 60%;
    height: 310px;
  }

  .photo-small {
    top: 8px;
    right: 0;
    bottom: auto;
    left: auto;
    width: 37%;
    height: 185px;
  }

  .photo-third {
    right: 2%;
    bottom: 0;
    width: 39%;
    height: 185px;
  }

  .hand-note {
    display: none;
  }

  .time-lock-feature {
    padding: 75px 5vw;
    gap: 48px;
  }

  .time-lock-copy h2 {
    font-size: 45px;
  }

  .lock-card {
    padding: 24px 18px;
    transform: none;
  }

  .release-timeline {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .timeline-line {
    grid-template-columns: 1fr auto 1fr;
    gap: 8px;
  }

  .timeline-now,
  .timeline-future {
    min-height: 0;
  }

  .year-examples {
    grid-template-columns: repeat(3, 1fr);
  }

  .lock-promises {
    align-items: flex-start;
    flex-direction: column;
  }

  .map-shell {
    height: 680px;
  }

  #realMap {
    width: 100%;
  }

  .story-preview {
    z-index: 800;
  }

  .portrait {
    width: 68px;
    height: 82px;
  }
}

/* Positioning update layout refinements */
.hero {
  min-height: 930px;
}

.hero h1 {
  font-size: clamp(48px, 5vw, 72px);
  line-height: 1.08;
}

.hero-copy {
  max-width: 680px;
  line-height: 1.8;
}

@media (max-width: 1050px) {
  .hero {
    min-height: 980px;
  }

  .hero h1 {
    min-width: 470px;
    font-size: 52px;
  }
}

@media (max-width: 800px) {
  .hero {
    min-height: 1240px;
    padding-top: 150px;
  }

  .hero h1 {
    min-width: 0;
    font-size: 44px;
  }

  .hero-memory-photos {
    top: 830px;
  }

  .demo-label {
    top: -24px;
    left: 0;
    right: auto;
  }
}

@media (max-width: 520px) {
  .site-header .primary-button.small {
    display: none;
  }

  .site-header .brand {
    max-width: 190px;
    font-size: 12px;
    line-height: 1.25;
  }

  .hero {
    min-height: 1280px;
    padding-top: 135px;
  }

  .hero h1 {
    font-size: 38px;
  }

  .hero-copy {
    font-size: 13px;
  }

  .hero-memory-photos {
    top: 860px;
  }
}
