.message-board-section {
  position: relative;
  z-index: 2;
  min-height: 941px;
  height: 941px;
  padding-top: 38px;
  overflow: hidden;
  background: transparent;
  color: #261e16;
  font-family: "Times New Roman", Times, serif;
}

.message-board-prop {
  position: absolute;
  z-index: 0;
  max-width: none;
  pointer-events: none;
  user-select: none;
}

.message-board-prop--left {
  top: 100px;
  left: 0;
  width: min(640px, 42vw);
  height: auto;
}

.message-board-prop--right {
  top: 420px;
  right: -115px;
  width: 750px;
  height: 600px;
}

.message-board-sign-copy,
.message-board-mug-copy {
  position: absolute;
  z-index: 1;
  margin: 0;
  color: #271e15;
  font-family: "Arial Narrow", Impact, sans-serif;
  font-weight: 800;
  line-height: 1.02;
  text-align: center;
  text-transform: uppercase;
  pointer-events: none;
}

.message-board-sign-copy {
  top: 239px;
  left: 61px;
  width: 174px;
  font-size: 19px;
  letter-spacing: -0.5px;
  transform: rotate(-2deg);
}

.message-board-mug-copy {
  top: 623px;
  right: 28px;
  width: 130px;
  color: #d2c4a6;
  font-size: 15px;
  line-height: 1.08;
  letter-spacing: 0.3px;
  transform: rotate(-2deg);
}

.message-board-paper {
  position: relative;
  z-index: 1;
  width: min(1176px, calc(100% - 32px));
  height: 903px;
  margin-inline: auto;
  overflow: hidden;
  border-top: 1px solid rgba(255, 248, 232, 0.93);
  border-radius: 7px 7px 0 0;
  background:
    radial-gradient(ellipse at 54% 17%, rgba(255, 250, 239, 0.985), transparent 62%),
    linear-gradient(105deg, rgba(240, 226, 204, 0.975), rgba(255, 247, 230, 0.975) 48%, rgba(244, 230, 208, 0.97));
  box-shadow: 0 0 18px rgba(255, 241, 214, 0.31), inset 0 0 20px rgba(255, 255, 247, 0.45);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

.message-board-paper::after {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: 0;
  left: 0;
  height: 150px;
  background: linear-gradient(to bottom, rgba(246, 235, 216, 0) 2%, rgba(246, 235, 216, 0.42) 42%, rgba(246, 235, 216, 0.94) 100%);
  content: "";
  pointer-events: none;
}

.message-board-intro {
  position: relative;
  height: 239px;
  padding: 57px 5px 0;
}

.message-board-eyebrow {
  display: flex;
  align-items: center;
  gap: 13px;
  width: max-content;
  margin: 0 0 4px;
  color: #30271d;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 5.4px;
  line-height: 20px;
  text-transform: uppercase;
}

.message-board-eyebrow span {
  width: 39px;
  height: 1px;
  background: #ae7e33;
}

.message-board-eyebrow::after {
  position: absolute;
  top: 91px;
  left: 5px;
  width: 104px;
  height: 1px;
  background: #b38a4e;
  content: "";
}

.message-board-intro h2 {
  margin: 18px 0 0;
  color: #211911;
  font-size: 51px;
  font-weight: 400;
  letter-spacing: -1.15px;
  line-height: 1.12;
}

.message-board-subtitle {
  margin: 7px 0 0;
  color: #3f352a;
  font-size: 27px;
  font-style: italic;
  line-height: 1.12;
}

.message-board-script {
  position: absolute;
  top: 52px;
  left: 76.4%;
  z-index: 1;
  margin: 0;
  color: #33291f;
  font-family: "Times New Roman", Times, serif;
  font-size: 31px;
  font-style: italic;
  line-height: 0.96;
  transform: rotate(-8deg);
  white-space: nowrap;
}

.message-board-script::after {
  position: absolute;
  right: 2px;
  bottom: -9px;
  width: 145px;
  height: 1px;
  background: #a47b3b;
  content: "";
  transform: rotate(-4deg);
}

.message-board-island {
  position: absolute;
  top: 45px;
  right: 5px;
  width: 136px;
  height: 94px;
  opacity: 0.82;
}

.message-board-list {
  position: absolute;
  top: 239px;
  right: 0;
  left: 0;
  z-index: 1;
  overflow: hidden;
  border: 2px solid rgba(255, 249, 237, 0.9);
  border-radius: 24px;
  background: rgba(249, 239, 221, 0.48);
  box-shadow: 0 1px 4px rgba(94, 67, 35, 0.12), inset 0 0 10px rgba(255, 255, 246, 0.28);
}

.message-board-list-heading {
  display: flex;
  height: 54px;
  align-items: center;
  justify-content: space-between;
  padding: 0 27px;
  background: rgba(213, 193, 160, 0.48);
}

.message-board-list-heading h3,
.message-board-list-heading p {
  margin: 0;
  color: #393025;
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 3.6px;
  line-height: 1;
  text-transform: uppercase;
}

.message-board-list-heading p {
  font-size: 12px;
  letter-spacing: 3.2px;
}

.message-board-rows {
  margin: 0;
  padding: 0 27px;
  list-style: none;
}

.message-row {
  display: grid;
  min-height: 91px;
  grid-template-columns: 72px 170px minmax(0, 1fr) 36px;
  align-items: center;
  column-gap: 20px;
  border-bottom: 1px solid rgba(151, 119, 76, 0.24);
}

.message-row:last-child {
  border-bottom: 0;
}

.message-avatar {
  display: grid;
  width: 70px;
  height: 70px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(104, 77, 46, 0.22);
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(45, 34, 24, 0.18);
  transform: translateX(18px);
}

.message-avatar svg,
.message-avatar img {
  width: 100%;
  height: 100%;
  max-width: none;
}

.avatar-paw {
  background: #c6ac87;
}

.avatar-paw img {
  width: 43px;
  height: 43px;
  object-fit: contain;
  opacity: 0.76;
}

.message-author {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-left: 26px;
  color: #30271e;
  font-size: 20px;
  line-height: 1.08;
  white-space: nowrap;
}

.message-author time {
  color: #55493c;
  font-size: 18px;
  font-style: italic;
}

.message-copy {
  width: min(690px, 100%);
  margin: 0;
  padding-left: 25px;
  color: #2d251d;
  font-size: 20px;
  line-height: 1.38;
}

.blue-heart {
  color: #1a7190;
  font-family: Arial, sans-serif;
  font-size: 17px;
}

.message-heart {
  display: grid;
  width: 34px;
  height: 38px;
  padding: 3px;
  place-items: center;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.message-heart img {
  width: 27px;
  height: 25px;
  transition: transform 120ms ease, filter 120ms ease;
}

.message-heart:hover img {
  transform: scale(1.12);
}

.message-heart[aria-pressed="true"] img {
  filter: brightness(0) saturate(100%) invert(57%) sepia(45%) saturate(669%) hue-rotate(2deg) brightness(95%);
  transform: scale(1.07);
}

@media (max-width: 1000px) {
  .message-board-section {
    height: auto;
    min-height: 941px;
    padding-top: 26px;
  }

  .message-board-paper {
    width: min(860px, calc(100% - 28px));
    height: auto;
    min-height: 900px;
    padding-bottom: 80px;
  }

  .message-board-prop--left {
    width: min(480px, 51vw);
  }

  .message-board-prop--right {
    right: -225px;
    width: 620px;
    height: 496px;
  }

  .message-board-intro {
    height: 250px;
    padding-top: 40px;
  }

  .message-board-intro h2 {
    max-width: 68%;
    font-size: clamp(35px, 5.2vw, 48px);
  }

  .message-board-subtitle {
    max-width: 65%;
    font-size: clamp(20px, 2.9vw, 26px);
  }

  .message-board-script {
    left: auto;
    right: 18%;
    font-size: clamp(23px, 3.3vw, 30px);
  }

  .message-board-island {
    top: 132px;
    right: 10px;
    width: 110px;
  }

  .message-board-list {
    position: relative;
    top: auto;
    margin-top: 0;
  }

  .message-row {
    grid-template-columns: 64px 142px minmax(0, 1fr) 34px;
    column-gap: 12px;
    min-height: 100px;
  }

  .message-avatar {
    width: 60px;
    height: 60px;
    transform: none;
  }

  .message-author,
  .message-copy {
    padding-left: 0;
  }
}

@media (max-width: 650px) {
  .message-board-section {
    min-height: 0;
    padding-top: 12px;
    padding-bottom: 18px;
  }

  .message-board-paper {
    width: calc(100% - 16px);
    min-height: 0;
    padding-bottom: 8px;
    border-radius: 5px 5px 0 0;
  }

  .message-board-paper::after {
    height: 85px;
  }

  .message-board-intro {
    height: 205px;
    padding: 27px 13px 0;
  }

  .message-board-eyebrow {
    gap: 7px;
    font-size: 11px;
    letter-spacing: 3px;
  }

  .message-board-eyebrow span {
    width: 22px;
  }

  .message-board-eyebrow::after {
    top: 57px;
    left: 13px;
    width: 74px;
  }

  .message-board-intro h2 {
    max-width: 100%;
    margin-top: 10px;
    font-size: clamp(29px, 8vw, 39px);
    letter-spacing: -0.5px;
    line-height: 0.99;
  }

  .message-board-subtitle {
    max-width: 78%;
    margin-top: 8px;
    font-size: 18px;
    line-height: 1.08;
  }

  .message-board-script,
  .message-board-island {
    display: none;
  }

  .message-board-prop--left {
    top: 205px;
    width: 300px;
    opacity: 0.55;
  }

  .message-board-prop--right {
    top: auto;
    right: -255px;
    bottom: -20px;
    width: 420px;
    height: 336px;
    opacity: 0.65;
  }

  .message-board-sign-copy,
  .message-board-mug-copy {
    display: none;
  }

  .message-board-list {
    border-radius: 14px;
  }

  .message-board-list-heading {
    height: 45px;
    padding: 0 13px;
  }

  .message-board-list-heading h3 {
    font-size: 12px;
    letter-spacing: 2px;
  }

  .message-board-list-heading p {
    font-size: 9px;
    letter-spacing: 1.2px;
  }

  .message-board-rows {
    padding: 0 11px;
  }

  .message-row {
    position: relative;
    min-height: 0;
    grid-template-columns: 51px minmax(0, 1fr) 35px;
    grid-template-rows: auto auto;
    column-gap: 10px;
    row-gap: 2px;
    padding: 12px 0 13px;
    align-items: start;
  }

  .message-avatar {
    width: 48px;
    height: 48px;
    grid-row: 1 / span 2;
  }

  .message-author {
    grid-column: 2;
    grid-row: 1;
    gap: 2px;
    font-size: 17px;
  }

  .message-author time {
    font-size: 14px;
  }

  .message-copy {
    grid-column: 2 / 4;
    grid-row: 2;
    padding-right: 4px;
    font-size: 16px;
    line-height: 1.3;
  }

  .message-heart {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    width: 32px;
    height: 30px;
  }

  .message-heart img {
    width: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .message-heart img {
    transition: none;
  }
}

.message-board-paper::after { display: none; }
.message-board-island { right: -2px; width: 88px; height: 65px; }
.message-copy { width: min(740px, 100%); overflow-wrap: anywhere; white-space: pre-line; }
.message-author { white-space: normal; overflow-wrap: anywhere; }
.message-author small { color: #675845; font-size: 13px; font-style: italic; }
.message-board-rows { height: 550px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.message-board-tools { display: flex; align-items: center; gap: 16px; }
.message-board-tools button, .message-pagination button, .memory-form-actions button { border: 1px solid #957440; border-radius: 5px; padding: 6px 12px; color: #30271d; background: #f3e4cb; font: inherit; cursor: pointer; }
.message-board-tools button { font-size: 14px; }
.message-pagination { display: flex; align-items: center; justify-content: center; gap: 22px; height: 36px; border-top: 1px solid #cfbfa5; background: #eee0c8; }
.message-pagination button { padding: 3px 12px; font-size: 14px; }
.message-pagination button:disabled { opacity: .45; cursor: default; }
.message-preview-note { height: 18px; margin: 0; text-align: center; font-size: 12px; line-height: 18px; color: #675845; }
.memory-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.message-board-rows:focus-visible, .message-board-tools button:focus-visible, .message-pagination button:focus-visible, #memory-dialog :focus-visible { outline: 2px solid #805622; outline-offset: 2px; }
#memory-dialog { width: min(520px, calc(100% - 32px)); max-height: calc(100svh - 40px); padding: 26px; overflow-y: auto; border: 1px solid #967a50; border-radius: 12px; background: #f6ebd7; color: #30271d; font-family: 'Times New Roman', serif; }
#memory-dialog::backdrop { background: rgba(25, 19, 12, .65); }
#memory-dialog h2 { margin: 0; font-size: 28px; font-weight: normal; }
#memory-dialog label { display: block; margin: 18px 0 6px; font-size: 18px; }
#memory-dialog label span { font-size: 14px; color: #675845; }
#memory-dialog input, #memory-dialog textarea { width: 100%; box-sizing: border-box; padding: 10px; border: 1px solid #a08b6e; border-radius: 4px; background: #fffbf2; color: #30271d; font: 17px 'Times New Roman', serif; }
#memory-dialog textarea { resize: vertical; }
.memory-form-actions { display: flex; justify-content: flex-end; gap: 12px; }
.memory-form-error { color: #862b1a; }
@media(max-width:650px) {
  .message-board-tools { gap: 8px; }
  .message-board-tools > p { display: none; }
  .message-board-tools button { padding: 5px 8px; font-size: 12px; }
  .message-board-rows { height: 550px; }
  .message-pagination { gap: 13px; }
  .message-preview-note { height: auto; padding: 3px 8px; line-height: 1.3; }
  #memory-dialog { padding: 20px; }
}

/* Reference geometry refinements preserve the paginated archive controls. */
@font-face {
  font-family: "Allura Memorial";
  src: url("assets/memorial/fonts/Allura-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@media(min-width:1001px) {
 .message-board-intro h2 { font-size:54px; letter-spacing:-.3px; }
 .message-board-subtitle { font-size:28px; }
 .message-board-script { font-family:"Allura Memorial",cursive; font-size:43px; font-style:normal; font-weight:400; letter-spacing:0; line-height:.9; top:61px; left:76.4%; transform:scaleX(.92) rotate(-8deg); transform-origin:top left; }
 .message-board-island { position:absolute; z-index:2; top:80px; right:20px; width:280px; height:190px; opacity:.78; pointer-events:none; }
 .message-author,.message-copy,.message-heart { translate:0 4px; }
 .message-avatar { transform:translate(18px,4px); }
 .message-copy { padding-left:27px; }
 .message-heart { transform:translateX(-16px); }
}

@media(min-width:1001px) {
 .message-board-prop--right { top:482px; right:-151px; width:600px; height:400px; }
 .message-board-mug-copy { top:655px; right:37px; width:110px; font-size:21px; line-height:1.13; letter-spacing:0; }
}

.message-board-paper::before { position:absolute; inset:0; background:url("assets/memorial/icons/paper-grain.svg") repeat; mix-blend-mode:multiply; content:""; pointer-events:none; }
.message-board-intro { z-index:1; }

.board-props-reconstruction { display:none; }
@media(min-width:1001px) {
 .message-board-island { top:73px; right:22px; width:300px; height:200px; object-fit:contain; opacity:.75; filter:grayscale(.6); }
 .message-board-prop--left { display:none; }
 .board-props-reconstruction { position:absolute; inset:0; display:block; z-index:0; pointer-events:none; }
 .board-props-tree { position:absolute; top:-100px; left:-15px; height:1100px; width:auto; max-width:none; mask-image:linear-gradient(to right,#000 0 24%,transparent 36%); }
 .board-props-sign { position:absolute; top:243px; left:-3px; width:184px; height:257px; object-fit:fill; transform:rotate(-2deg); }
 .board-props-lantern { position:absolute; top:520px; left:54px; width:132px; height:230px; background:url("assets/memorial/generated/board-left-props-v2.png") -180px -506px / 712px 1067px no-repeat; }
 .board-props-box { position:absolute; top:763px; left:51px; width:192px; height:116px; background:url("assets/memorial/generated/board-left-props-v2.png") -87px -338px / 334px 501px no-repeat; }
 .message-board-sign-copy { top:258px; left:1px; width:172px; font-size:32px; line-height:1.37; letter-spacing:-.7px; z-index:1; }
}

@media(min-width:1001px) {
  .message-board-sign-copy { transform: rotate(-2deg) scaleX(.82); transform-origin: center; }
  .message-board-mug-copy { top: 640px; font-size: 18px; line-height: 1.08; }
  .board-props-lantern {
    top: 507px;
    left: 48px;
    width: 142px;
    height: 248px;
    background-position: -157.78px -435.47px;
    background-size: 646.26px 969.39px;
    mask-image: linear-gradient(to bottom, #000 calc(100% - 5px), transparent);
  }
  .board-props-box {
    height: 146px;
    background-position: -80.52px -322.06px;
    background-size: 317.11px 475.67px;
    mask-image: linear-gradient(to bottom, #000 calc(100% - 8px), transparent);
  }
}
@media(min-width:1001px) and (max-width:1450px) {
 .message-board-paper { width:calc(100% - 190px); }
 .message-board-intro h2 { max-width:75%; font-size:clamp(34px,3.22vw,54px); }
 .message-board-subtitle { max-width:75%; font-size:24px; }
 .message-board-script { left:auto; right:20px; font-size:35px; }
 .message-board-island { right:0; width:180px; }
 .message-row { grid-template-columns:60px 120px minmax(0,1fr) 32px; column-gap:12px; }
 .message-author, .message-copy { padding-left:8px; font-size:18px; }
 .message-avatar { width:54px; height:54px; transform:translate(0,4px); }
 .message-board-rows { padding:0 18px; }
}
@media(max-width:1000px) {
 .message-board-section { padding-bottom:260px; }
 .message-board-prop--left { top:auto; bottom:-45px; left:-35px; width:290px; opacity:1; }
 .message-board-prop--right { top:auto; bottom:-8px; right:-70px; width:340px; height:auto; opacity:1; }
 .message-board-sign-copy { display:block; top:auto; bottom:156px; left:4px; width:90px; font-size:13px; }
 .message-board-mug-copy { display:block; top:auto; bottom:85px; right:5px; width:65px; font-size:10px; }
 .message-board-paper { padding-bottom:12px; }
 .message-board-intro { height:280px; }
 .message-board-script { display:block; top:173px; left:20px; right:auto; font-family:"Allura Memorial",cursive; font-size:28px; font-style:normal; line-height:.85; }
 .message-board-island { display:block; top:175px; right:20px; width:140px; height:100px; object-fit:contain; }
}
@media(max-width:1000px) { .message-board-island { z-index:2; } }
@media(min-width:1001px) and (max-width:1450px) {
 .board-props-reconstruction { transform:scale(.52); transform-origin:top left; }
 .board-props-tree { height:2115px; top:-192px; }
 .board-props-sign { top:467px; }
 .board-props-lantern { top:975px; left:18px; }
 .board-props-box { top:1467px; left:0; }
 .message-board-sign-copy { top:253px; left:0; width:90px; font-size:17px; }
 .message-board-prop--right { top:560px; right:-74px; width:300px; height:200px; }
 .message-board-mug-copy { top:641px; right:14px; width:51px; font-size:10px; }
}
@media(max-width:1000px) {
 .message-board-sign-copy { padding:8px 3px; background:url("assets/memorial/generated/wood-tile.png") center / 100% 100%; }
 .message-board-mug-copy { right:42px; width:58px; bottom:90px; }
}
@media(min-width:651px) and (max-width:1000px) {
 .message-board-intro { height:340px; padding-inline:18px; }
 .message-board-eyebrow::after { top:74px; left:18px; }
 .message-board-script { top:235px; }
 .message-board-island { top:240px; }
 .message-copy { font-size:18px; }
}

/* Let the page continue scrolling when the current message list reaches its edge. */
.message-board-rows { overscroll-behavior-y: auto; }
@media(min-width:1001px) {
  .message-board-section { overflow:visible; }
  .board-props-reconstruction { clip-path:inset(-600px 0 0 0); }
  .board-props-tree { top:-500px; height:1500px; }
  .message-board-prop--right { clip-path:inset(0 0 0 0); }
}
@media(min-width:1001px) and (max-width:1450px) {
  .board-props-tree { top:-961px; height:2884px; }
}
@media(min-width:1001px) {
  .message-board-section { clip-path:inset(-600px 0 0 0); }
  .memorial-stage .hero-scroll-runway { position:relative; z-index:3; }
}
@media(min-width:1001px) { .message-board-section { overflow-x:clip; overflow-y:visible; } }
