﻿/*
 * Memories and comments experience
 */

/* 现代化详情页重构样式 (Modern Memorial Layout) */
/* ========================================= */
.modern-memorial-shell { display: flex; flex-direction: column; gap: 1.5rem; padding: 0; background: transparent; align-items: stretch; }
.modern-memorial-hero { position: relative; width: 100%; background: transparent; border-radius: 0; padding: 0; box-shadow: none; }
.modern-hero-actions { display: flex; justify-content: flex-end; z-index: 10; }
.modern-hero-actions:empty { display: none; }
.modern-scene-container { width: 100%; max-width: 800px; margin: 0 auto; min-height: 480px; display: flex; justify-content: center; align-items: center; overflow: hidden; border-radius: 1rem; }
.modern-scene-container .grave-scene-shell { width: 100%; height: 100%; border: none; box-shadow: none; }
.modern-decor-panel { max-width: 800px; margin: 1.5rem auto 0 auto; background: rgba(255,255,255,0.8); border-radius: 1rem; padding: 1rem; box-shadow: 0 2px 8px rgba(0,0,0,0.02); }
.modern-memorial-info { min-width: 0; min-height: 100%; background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(250,249,247,0.94)); border: 1px solid rgba(229,220,212,0.72); border-radius: 1.5rem; padding: 2.25rem 2rem; box-shadow: 0 10px 28px rgba(86, 67, 52, 0.05); text-align: left; position: relative; display: flex; flex-direction: column; }
.modern-info-header { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 1rem 1.2rem; align-items: start; margin-bottom: 1.6rem; }
.modern-info-header__copy { min-width: 0; display: grid; gap: 0.2rem; }
.modern-memorial-info--owner .modern-info-header__copy { padding-right: 9rem; }
.modern-memorial-info--owner .modern-hero-actions { position: absolute; top: 1.8rem; right: 1.8rem; margin: 0; }
.modern-pet-avatar { width: 96px; height: 96px; border-radius: 999px; overflow: hidden; border: 3px solid rgba(255,255,255,0.94); background: linear-gradient(135deg, rgba(243,230,224,0.94) 0%, rgba(236,244,238,0.94) 100%); box-shadow: 0 16px 34px rgba(88, 69, 60, 0.12), inset 0 1px 0 rgba(255,255,255,0.82); }
.modern-pet-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
.modern-pet-avatar--placeholder { display: inline-flex; align-items: center; justify-content: center; color: #b09b90; font-size: 2rem; }
.modern-pet-name { font-size: 2.35rem; color: #2c2c2c; margin: 0 0 0.55rem 0; font-family: 'Georgia', serif; letter-spacing: 1px; }
.modern-pet-epitaph { font-size: 1.02rem; color: #7f7a74; font-style: italic; margin: 0; max-width: none; line-height: 1.65; }
.modern-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.2rem; border-top: 1px solid rgba(0,0,0,0.05); border-bottom: 1px solid rgba(0,0,0,0.05); padding: 1.45rem 0; margin-bottom: 1.35rem; }
.modern-info-item { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.modern-info-item .m-label { font-size: 0.8rem; color: #a69a92; text-transform: uppercase; letter-spacing: 0.06em; }
.modern-info-item .m-value { font-size: 1rem; color: #4f453f; font-weight: 500; line-height: 1.65; word-break: break-word; }
.modern-pet-bio { text-align: left; line-height: 1.82; color: #555; font-size: 0.98rem; max-width: none; margin: 0; background: rgba(247,245,242,0.94); border: 1px solid rgba(228,220,212,0.86); padding: 1.25rem 1.2rem; border-radius: 1rem; }
.modern-pet-bio .m-bio-title { font-size: 1.1rem; font-weight: 600; color: #333; margin-bottom: 1rem; text-transform: uppercase; }
.modern-support-note { margin-top: 1rem; display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; padding: 0.95rem 1rem; border-radius: 1rem; background: rgba(248, 245, 242, 0.92); border: 1px solid rgba(230, 221, 213, 0.88); }
.modern-support-note__copy { display: grid; gap: 0.28rem; min-width: 0; }
.modern-support-note__label { display: block; color: #60534a; font-size: 0.9rem; font-weight: 600; }
.modern-support-note__copy p { margin: 0; color: #87776f; font-size: 0.88rem; line-height: 1.6; }
.modern-support-note__button { flex: 0 0 auto; min-height: 40px; padding: 0.62rem 0.95rem; border-radius: 8px; border: 1px solid rgba(214, 195, 188, 0.9); background: rgba(255, 255, 255, 0.86); color: #7b5d65; font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease; }
.modern-support-note__button:hover { background: rgba(255, 249, 247, 0.98); border-color: rgba(201, 172, 181, 0.98); color: #6f505b; transform: translateY(-1px); }
.modern-memory-wall-shell { min-width: 0; width: 100%; }
.memory-photo-wall { position: relative; overflow: hidden; display: grid; gap: 0.75rem; padding: 0.8rem; border-radius: 1.35rem; background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,244,239,0.94)); border: 1px solid rgba(229,221,213,0.82); box-shadow: 0 14px 28px rgba(96, 84, 71, 0.05); }
.memory-photo-wall::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 12% 18%, rgba(255,255,255,0.68), rgba(255,255,255,0)), radial-gradient(circle at 88% 82%, rgba(255,244,238,0.34), rgba(255,244,238,0)); pointer-events: none; }
.memory-photo-wall__surface { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-flow: dense; gap: 0.72rem; padding: 0.78rem; border-radius: 1rem; background: linear-gradient(180deg, rgba(244,237,231,0.96), rgba(236,227,219,0.88)); border: 1px solid rgba(222,211,201,0.92); box-shadow: inset 0 1px 0 rgba(255,255,255,0.78); }
.memory-photo-wall__surface::before,
.memory-photo-wall__surface::after { display: none; }
.memory-photo-wall__photo { --wall-tilt: 0deg; position: relative; display: block; align-self: start; grid-column: span 2; width: 100%; padding: 0.32rem 0.32rem 0.6rem; border: none; border-radius: 9px; background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(250,246,240,0.98)); box-shadow: 0 10px 20px rgba(90, 73, 62, 0.14), 0 2px 4px rgba(90, 73, 62, 0.05); cursor: zoom-in; transform: rotate(var(--wall-tilt)); transition: transform 0.18s ease, box-shadow 0.18s ease; }
.memory-photo-wall__photo:hover { transform: translateY(-2px) rotate(var(--wall-tilt)); box-shadow: 0 16px 28px rgba(90, 73, 62, 0.18), 0 4px 10px rgba(90, 73, 62, 0.08); }
.memory-photo-wall__photo:focus-visible { outline: 2px solid rgba(185, 148, 162, 0.65); outline-offset: 3px; }
.memory-photo-wall__photo--1,
.memory-photo-wall__photo--5,
.memory-photo-wall__photo--8,
.memory-photo-wall__photo--10,
.memory-photo-wall__photo--12 { grid-column: span 3; }
.memory-photo-wall__photo--1 { --wall-tilt: -2.6deg; }
.memory-photo-wall__photo--2 { --wall-tilt: 1.8deg; }
.memory-photo-wall__photo--3 { --wall-tilt: -1.4deg; }
.memory-photo-wall__photo--4 { --wall-tilt: 2.4deg; }
.memory-photo-wall__photo--5 { --wall-tilt: 1.1deg; }
.memory-photo-wall__photo--6 { --wall-tilt: -2deg; }
.memory-photo-wall__photo--7 { --wall-tilt: 1.2deg; }
.memory-photo-wall__photo--8 { --wall-tilt: -1.8deg; }
.memory-photo-wall__photo--9 { --wall-tilt: 2deg; }
.memory-photo-wall__photo--10 { --wall-tilt: -1deg; }
.memory-photo-wall__photo--11 { --wall-tilt: 1.5deg; }
.memory-photo-wall__photo--12 { --wall-tilt: -1.2deg; }
.memory-photo-wall__pin { position: absolute; left: 50%; top: 0.24rem; width: 10px; height: 10px; border-radius: 999px; background: linear-gradient(180deg, rgba(236, 201, 210, 0.98), rgba(201, 165, 176, 0.98)); box-shadow: inset 0 1px 0 rgba(255,255,255,0.78), 0 2px 5px rgba(129, 94, 102, 0.18); transform: translateX(-50%); z-index: 1; }
.memory-photo-wall__frame { display: block; overflow: hidden; border-radius: 6px; background: rgba(244,238,232,0.92); box-shadow: inset 0 0 0 1px rgba(236,228,221,0.9); }
.memory-photo-wall__photo--1 .memory-photo-wall__frame,
.memory-photo-wall__photo--5 .memory-photo-wall__frame,
.memory-photo-wall__photo--8 .memory-photo-wall__frame,
.memory-photo-wall__photo--10 .memory-photo-wall__frame,
.memory-photo-wall__photo--12 .memory-photo-wall__frame { aspect-ratio: 6 / 5; }
.memory-photo-wall__photo--3 .memory-photo-wall__frame,
.memory-photo-wall__photo--6 .memory-photo-wall__frame,
.memory-photo-wall__photo--9 .memory-photo-wall__frame,
.memory-photo-wall__photo--11 .memory-photo-wall__frame { aspect-ratio: 3 / 4; }
.memory-photo-wall__photo:not(.memory-photo-wall__photo--1):not(.memory-photo-wall__photo--5):not(.memory-photo-wall__photo--8):not(.memory-photo-wall__photo--12):not(.memory-photo-wall__photo--3):not(.memory-photo-wall__photo--6):not(.memory-photo-wall__photo--9):not(.memory-photo-wall__photo--11) .memory-photo-wall__frame { aspect-ratio: 1 / 1; }
.memory-photo-wall__frame img { width: 100%; height: 100%; display: block; object-fit: cover; }
.memory-photo-wall__more { position: absolute; right: 0.55rem; bottom: 0.7rem; min-width: 2.35rem; height: 1.85rem; padding: 0 0.62rem; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: rgba(53, 41, 37, 0.72); color: #fff8f5; font-size: 0.8rem; font-weight: 700; box-shadow: 0 8px 16px rgba(53, 41, 37, 0.22); }
.modern-memorial-layout { display: contents; }
.modern-memorial-main { min-width: 0; }
.modern-memorial-side { min-width: 0; }
.modern-memories-section { position: relative; overflow: hidden; background: linear-gradient(180deg, rgba(255,255,255,0.97), rgba(247,249,246,0.95)); border: 1px solid rgba(220,229,223,0.92); border-radius: 1.5rem; padding: 1.75rem; box-shadow: 0 14px 34px rgba(86, 67, 52, 0.05); }
.modern-ritual-panel { min-height: 100%; position: relative; overflow: hidden; background: linear-gradient(180deg, rgba(255,255,255,0.97), rgba(247,250,249,0.94)); border-radius: 1.5rem; padding: 1.55rem 1.3rem 1.2rem; box-shadow: 0 14px 30px rgba(86, 67, 52, 0.05); border: 1px solid rgba(214,226,218,0.82); }
.modern-ritual-panel::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 92px; background: linear-gradient(180deg, rgba(231,241,236,0.92), rgba(231,241,236,0)); pointer-events: none; }
.modern-ritual-panel > * { position: relative; z-index: 1; }
.modern-ritual-panel .pet-detail-section__eyebrow { margin-bottom: 0.7rem; color: #7f9188; }
.modern-ritual-panel .ritual-action-grid { grid-template-columns: 1fr; margin-top: 1rem; }
.modern-ritual-panel .ritual-action-btn[data-ritual-action="flower"] { position: relative; width: 100%; min-height: 92px; padding: 0.9rem 1rem; display: grid !important; grid-template-columns: 52px 1fr 18px; align-items: center; gap: 0.9rem; text-align: left; border-radius: 20px; background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(245,250,247,0.96)) !important; color: #496056 !important; border: 1px solid rgba(198,216,208,0.96) !important; box-shadow: inset 0 1px 0 rgba(255,255,255,0.95), 0 12px 24px rgba(121, 149, 136, 0.12) !important; }
.modern-ritual-panel .ritual-action-btn[data-ritual-action="flower"]::after { content: ''; justify-self: end; width: 10px; height: 10px; border-radius: 999px; background: linear-gradient(180deg, rgba(181, 209, 196, 0.98), rgba(143, 180, 164, 0.98)); box-shadow: 0 0 0 4px rgba(226, 238, 232, 0.92); }
.modern-ritual-panel .ritual-action-btn[data-ritual-action="flower"] .ritual-action-btn__icon { width: 52px; height: 52px; display: inline-flex; align-items: center; justify-content: center; border-radius: 16px; font-size: 1.2rem; color: #567a6a; background: linear-gradient(180deg, rgba(235,245,240,0.98), rgba(217,231,224,0.96)); box-shadow: inset 0 1px 0 rgba(255,255,255,0.85); filter: none !important; }
.modern-ritual-panel .ritual-action-btn[data-ritual-action="flower"] .ritual-action-btn__label { font-size: 1rem; letter-spacing: 0; font-weight: 700; line-height: 1.35; }
.modern-ritual-panel .ritual-action-btn[data-ritual-action="flower"]:hover:not(:disabled) { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255,255,255,0.92), 0 16px 28px rgba(121, 149, 136, 0.16) !important; }
.modern-ritual-panel .ritual-panel__remaining { margin-top: 0.9rem; padding: 0.78rem 0.9rem; border-radius: 16px; background: rgba(255,255,255,0.76); border: 1px solid rgba(220,231,226,0.94); color: #6c7c74; }
.modern-ritual-panel .ritual-panel__remaining-label { font-size: 0.76rem; letter-spacing: 0.12em; color: #8c9d95; }
.modern-ritual-panel .ritual-panel__remaining-value { font-size: 1rem; color: #4f665c; }
.modern-ritual-panel .ritual-panel__remaining.is-limit { background: rgba(255, 245, 242, 0.9); border-color: rgba(236, 209, 202, 0.9); color: #9a6f63; }
.modern-ritual-panel .worship-records-container { margin-top: 1.05rem; padding-top: 1rem; border-top: 1px solid rgba(219, 228, 224, 0.92); }
.modern-ritual-panel .ritual-records-title { margin-top: 0; margin-bottom: 0.65rem; font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: #8b9a93; }
.modern-ritual-panel .worship-records-scroll { margin-top: 0; max-height: 320px; padding: 0.15rem 0; }
.modern-ritual-panel .worship-record-item { gap: 0.7rem; padding: 0.78rem 0.1rem; background: transparent; border: none; border-radius: 0; border-bottom: 1px solid rgba(230, 235, 232, 0.86); }
.modern-ritual-panel .worship-record-item:last-child { border-bottom: none; }
.modern-ritual-panel .worship-record-avatar { width: 36px; height: 36px; background: rgba(242, 247, 244, 0.98); border-color: rgba(213, 225, 220, 0.94); }
.modern-ritual-panel .worship-record-avatar__fallback { color: #88a094; font-size: 0.82rem; }
.modern-ritual-panel .worship-record-meta { align-items: flex-start; gap: 0.45rem 0.8rem; }
.modern-ritual-panel .worship-record-user { color: #4f5c56; font-size: 0.92rem; }
.modern-ritual-panel .worship-record-tag { font-size: 0.72rem; padding: 0.2rem 0.5rem; background: rgba(241, 246, 243, 0.96); color: #71857b; border: 1px solid rgba(216, 226, 221, 0.94); }
.modern-ritual-panel .worship-record-tag--flower { background: rgba(241, 247, 243, 0.98); color: #6b8e7b; }
.modern-ritual-panel .worship-record-tag--candle { background: rgba(251, 246, 233, 0.98); color: #9b8653; }
.modern-ritual-panel .worship-record-tag--prayer { background: rgba(238, 243, 250, 0.98); color: #66829d; }
.modern-ritual-panel .worship-record-tag--message { background: rgba(243, 240, 250, 0.98); color: #7b6c9d; }
.modern-ritual-panel .worship-record-message { margin-top: 0.42rem; color: #66716c; font-size: 0.92rem; line-height: 1.6; }
.modern-ritual-panel .worship-record-time { margin-top: 0.32rem; font-size: 0.74rem; color: #95a29c; }
.modern-ritual-panel .ritual-records-empty { background: rgba(247, 250, 248, 0.95); border: 1px dashed rgba(211, 223, 218, 0.96); color: #7b8f86; }
.modern-ritual-panel .ritual-records-empty__title { color: #61766d; }
.modern-ritual-panel .ritual-records-empty__desc { color: #8a9a94; }

@media (max-width: 1120px) {
  .modern-memorial-shell { gap: 1.25rem; }
}

@media (max-width: 720px) {
  .modern-memorial-info { padding: 1.65rem 1.25rem; }
  .modern-info-header { grid-template-columns: 72px minmax(0, 1fr); gap: 0.9rem; align-items: start; }
  .modern-memorial-info--owner .modern-info-header__copy { padding-right: 7.25rem; }
  .modern-memorial-info--owner .modern-hero-actions { top: 1.3rem; right: 1.15rem; }
  .modern-pet-avatar { width: 72px; height: 72px; }
  .modern-pet-name { font-size: 2rem; }
  .modern-info-grid { grid-template-columns: 1fr; gap: 0.9rem; padding: 1.1rem 0; }
  .modern-support-note { flex-direction: column; align-items: stretch; }
  .modern-support-note__button { width: 100%; }
  .memory-photo-wall { padding: 0.8rem; }
  .memory-photo-wall__surface { width: 100%; margin: 0; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.62rem; padding: 0.62rem; }
  .memory-photo-wall__photo { grid-column: span 2; }
  .memory-photo-wall__photo--1,
  .memory-photo-wall__photo--5,
  .memory-photo-wall__photo--8,
  .memory-photo-wall__photo--12 { grid-column: span 2; }
  .memory-photo-wall__photo .memory-photo-wall__frame,
  .memory-photo-wall__photo--1 .memory-photo-wall__frame,
  .memory-photo-wall__photo--5 .memory-photo-wall__frame,
  .memory-photo-wall__photo--8 .memory-photo-wall__frame,
  .memory-photo-wall__photo--12 .memory-photo-wall__frame,
  .memory-photo-wall__photo--3 .memory-photo-wall__frame,
  .memory-photo-wall__photo--6 .memory-photo-wall__frame,
  .memory-photo-wall__photo--11 .memory-photo-wall__frame,
  .memory-photo-wall__photo--9 .memory-photo-wall__frame { aspect-ratio: 1 / 1; }
  .modern-memories-section { padding: 1.2rem; }
}

/* Hide redundant UI elements */
.grave-mode-note, .ritual-summary-grid { display: none !important; }

/* Detail memories refresh */
.modern-memories-section > .memory-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.1rem;
  padding-bottom: 0;
  border-bottom: none;
}

.modern-memories-section .memories-title {
  margin: 0;
  gap: 0.7rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: #46564e;
}

.modern-memories-section .memories-title i {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #6c8578;
  background: linear-gradient(180deg, rgba(242, 247, 244, 0.98), rgba(226, 235, 230, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.modern-memories-section .memory-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.modern-memories-section .sort-btn {
  min-height: 36px;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(214, 224, 219, 0.92);
  background: rgba(255, 255, 255, 0.78);
  color: #697971;
  box-shadow: none;
}

.modern-memories-section .sort-btn:hover {
  background: rgba(244, 248, 246, 0.96);
  border-color: rgba(190, 207, 198, 0.96);
  color: #4f635a;
  transform: translateY(-1px);
}

.modern-memories-section .sort-btn.active {
  background: linear-gradient(135deg, rgba(226, 237, 231, 0.98), rgba(211, 225, 218, 0.98));
  border-color: rgba(184, 202, 193, 0.98);
  color: #456055;
}

.modern-memories-section .add-memory {
  margin: 0 0 1.2rem;
  padding: 1.2rem;
  background: linear-gradient(180deg, rgba(251, 252, 250, 0.84), rgba(245, 248, 246, 0.78));
  border: 1px solid rgba(231, 237, 233, 0.94);
  border-radius: 1.25rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
}

.modern-memories-section .add-memory h3 {
  margin: 0 0 0.8rem;
  font-size: 1rem;
  color: #4d5d55;
}

.modern-memories-section .add-memory textarea {
  min-height: 138px;
  margin-bottom: 0.9rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(213, 223, 218, 0.96);
  background: rgba(255, 255, 255, 0.84);
  color: #45524c;
  line-height: 1.8;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.modern-memories-section .add-memory textarea:focus,
.modern-memories-section .comment-input:focus {
  outline: none;
  border-color: rgba(145, 179, 164, 0.94);
  box-shadow: 0 0 0 4px rgba(213, 228, 220, 0.45);
}

.modern-memories-section .photo-upload-row {
  margin-bottom: 0.95rem;
  gap: 0.75rem;
}

.modern-memories-section .file-label {
  min-height: 38px;
  padding: 0.45rem 1rem;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(213, 223, 218, 0.96);
  color: #56695f;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.modern-memories-section .file-name {
  color: #7a877f;
}

.modern-memories-section #memoryPhotoPreview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0.2rem 0 0.9rem;
}

.modern-memories-section #memoryPhotoPreview img,
.modern-memories-section .photo-preview-mini {
  width: 86px;
  height: 86px;
  object-fit: cover;
  border-radius: 1rem;
  border: 1px solid rgba(220, 229, 223, 0.96);
  box-shadow: 0 10px 18px rgba(96, 108, 100, 0.08);
}

.modern-memories-section .memory-edit-note {
  margin: 0 0 0.8rem;
  padding: 0.72rem 0.9rem;
  border-radius: 0.9rem;
  background: rgba(241, 246, 243, 0.96);
  border: 1px solid rgba(214, 224, 219, 0.92);
  color: #607269;
  font-size: 0.88rem;
  line-height: 1.65;
}

.modern-memories-section .memory-edit-note[hidden] {
  display: none;
}

.modern-memories-section .add-memory.is-editing {
  border-color: rgba(191, 158, 169, 0.72);
  box-shadow: 0 12px 26px rgba(145, 117, 126, 0.12);
}

.modern-memories-section .add-memory.is-editing h3 {
  color: #8a6170;
}

.modern-memories-section .save-memory-btn {
  display: flex;
  justify-content: flex-end;
}

.modern-memories-section .save-memory-btn button {
  min-height: 42px;
  padding: 0 1.35rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #7d9b8d, #688578);
  color: #fff;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 24px rgba(110, 138, 126, 0.18);
}

.modern-memories-section .save-memory-btn button:hover,
.modern-memories-section .comment-submit:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.modern-memories-section .memory-editor-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.7rem;
}

.modern-memories-section .memory-edit-cancel {
  min-height: 36px;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(213, 223, 218, 0.96);
  background: rgba(255, 255, 255, 0.84);
  color: #62746b;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.modern-memories-section .memory-edit-cancel:hover {
  background: rgba(244, 248, 246, 0.96);
  border-color: rgba(184, 202, 193, 0.98);
  color: #50645a;
  transform: translateY(-1px);
}

.modern-memories-section #memoriesList {
  display: grid;
  gap: 1rem;
}

.modern-memories-section .memory-item {
  position: relative;
  overflow: hidden;
  display: flex !important;
  flex-direction: column;
  gap: 0.95rem;
  margin: 0 !important;
  padding: 1.3rem 1.35rem 1.2rem !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(249, 248, 245, 0.9)) !important;
  border: 1px solid rgba(238, 241, 238, 0.88) !important;
  border-radius: 1.25rem !important;
  box-shadow: 0 18px 36px rgba(96, 84, 71, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(10px);
}

.modern-memories-section .memory-item::before {
  display: none;
}

.modern-memories-section .memory-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(96, 84, 71, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.92) !important;
}

.modern-memories-section .memory-content {
  display: grid;
  gap: 0.9rem;
}

.modern-memories-section .memory-meta {
  display: flex;
  align-items: center;
  margin-top: -0.1rem;
}

.modern-memories-section .memory-text {
  margin: 0;
  color: #44504a;
  font-size: 1.02rem;
  line-height: 1.92;
  white-space: pre-line;
  font-family: 'Noto Serif SC', 'Georgia', serif;
}

.modern-memories-section .memory-text--preview {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;
  overflow: hidden;
}

.modern-memories-section .memory-readmore {
  width: fit-content;
  padding: 0;
  margin-top: -0.35rem;
  border: none;
  background: transparent;
  color: #6d8076;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}

.modern-memories-section .memory-readmore:hover {
  color: #4d695c;
}

.modern-memories-section .memory-footer {
  margin-top: 0;
  padding: 0.05rem 0 0;
  border-top: none;
  border-bottom: none;
  justify-content: flex-end;
}

.modern-memories-section .memory-time {
  display: inline-flex;
  align-items: center;
  font-style: normal;
  letter-spacing: 0;
}

.modern-memories-section .memory-time__label,
.modern-memories-section .comment-time,
.modern-memories-section .memory-comments-drawer__time {
  white-space: nowrap;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0;
}

.modern-memories-section .memory-time__label {
  color: #728079;
}

.modern-memories-section .memory-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  margin-top: 0.25rem;
  padding: 0.8rem 0 0.05rem;
  border-top: 1px solid rgba(229, 236, 232, 0.94);
}

.modern-memories-section .memory-feedback {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  min-width: 0;
}

.modern-memories-section .memory-like-btn,
.modern-memories-section .memory-comment-count {
  min-height: 34px;
  padding: 0 0.62rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #697b73;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.modern-memories-section .memory-like-btn i,
.modern-memories-section .memory-comment-count i {
  font-size: 0.88rem;
}

.modern-memories-section .memory-like-btn:hover,
.modern-memories-section .memory-comment-count:hover {
  color: #527164;
  background: rgba(241, 246, 243, 0.94);
}

.modern-memories-section .memory-like-btn.liked {
  color: #b86d7e;
  background: rgba(253, 244, 247, 0.96);
}

.modern-memories-section .memory-comment-count {
  color: #6b7b74;
}

.modern-memories-section .memory-comment-count:active,
.modern-memories-section .memory-like-btn:active {
  transform: translateY(0);
}

.modern-memories-section .memory-media {
  display: grid;
  gap: 0.72rem;
}

.modern-memories-section .memory-media--card {
  width: 100%;
  max-width: none;
}

.modern-memories-section .memory-media--drawer {
  width: min(100%, 820px);
}

.modern-memories-section .memory-media__lead {
  position: relative;
  width: min(100%, 800px);
  padding: 0;
  border: none;
  background: transparent;
  display: block;
  cursor: pointer;
  overflow: hidden;
  border-radius: 8px;
}

.modern-memories-section .memory-photo {
  width: 100%;
  max-width: none;
  max-height: none;
  height: auto;
  display: block;
  margin-top: 0;
  border-radius: 8px;
  border: 1px solid rgba(232, 237, 233, 0.96);
  box-shadow: 0 10px 22px rgba(86, 67, 52, 0.06);
  object-fit: cover;
  aspect-ratio: 5 / 4;
  transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease, opacity 0.18s ease;
}

.modern-memories-section .memory-photo--card {
  aspect-ratio: 5 / 4;
}

.modern-memories-section .memory-photo--drawer {
  aspect-ratio: 4 / 3;
}

.modern-memories-section .memory-media--drawer .memory-media__lead {
  width: 100%;
}

.modern-memories-section .memory-media__thumbs {
  display: flex;
  gap: 0.62rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.08rem 0 0.06rem;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.modern-memories-section .memory-media__thumbs::-webkit-scrollbar {
  height: 0;
}

.modern-memories-section .memory-media__thumb {
  position: relative;
  flex: 0 0 4.85rem;
  width: 4.85rem;
  padding: 0;
  border: 1px solid rgba(228, 234, 230, 0.98);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(86, 67, 52, 0.04);
  opacity: 0.76;
  scroll-snap-align: start;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.modern-memories-section .memory-media__thumb.is-active {
  border-color: rgba(123, 150, 138, 0.98);
  box-shadow: 0 8px 18px rgba(86, 67, 52, 0.1);
  opacity: 1;
}

.modern-memories-section .memory-media__thumb-image {
  width: 100%;
  display: block;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.modern-memories-section .memory-media__thumb:not(.is-active) .memory-media__thumb-image {
  filter: saturate(0.94) brightness(0.985);
}

.modern-memories-section .memory-media__lead:hover .memory-photo,
.modern-memories-section .memory-media__thumb:hover {
  transform: translateY(-1px);
}

.modern-memories-section .memory-media__lead:hover .memory-photo {
  box-shadow: 0 14px 26px rgba(86, 67, 52, 0.08);
  filter: brightness(1.01);
}

.modern-memories-section .memory-photo.is-switching {
  opacity: 0.72;
  transform: scale(0.992);
  filter: saturate(0.94);
}

.modern-memories-section .memory-media__thumb:hover {
  border-color: rgba(180, 194, 187, 0.98);
  box-shadow: 0 8px 16px rgba(86, 67, 52, 0.08);
  opacity: 0.94;
}

body.memory-comments-modal-open {
  overflow: hidden;
}

.modern-memories-section .memory-comments {
  padding: 0.82rem 0 0;
  border-top: 1px solid rgba(229, 236, 232, 0.94);
  background: transparent;
  border-radius: 0;
}

.modern-memories-section .memory-comments-caption {
  margin-bottom: 0.75rem;
  color: #8a9690;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.modern-memories-section .comments-list {
  display: grid;
  gap: 0;
}

.modern-memories-section .comment-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 0.3rem 0.5rem;
  align-items: start;
  margin-bottom: 0;
  padding: 0.82rem 0;
  background: transparent;
  border: none;
  border-radius: 0;
  border-bottom: 1px solid rgba(234, 238, 235, 0.92);
}

.modern-memories-section .comment-item:last-child {
  border-bottom: none;
}

.modern-memories-section .comment-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(220, 229, 224, 0.96);
  background: rgba(246, 249, 247, 0.94);
}

.modern-memories-section .comment-avatar__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.modern-memories-section .comment-avatar__fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #91a39b;
  font-size: 0.8rem;
}

.modern-memories-section .comment-content {
  min-width: 0;
  display: grid;
  gap: 0.22rem;
}

.modern-memories-section .comment-head {
  display: flex;
  align-items: center;
  gap: 0.28rem;
  min-width: 0;
  flex-wrap: nowrap;
}

.modern-memories-section .comment-head__dot {
  display: none;
}

.modern-memories-section .comment-user {
  color: #4e5d56;
  min-width: 0;
  max-width: 100%;
  font-size: 0.86rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modern-memories-section .comment-main {
  min-width: 0;
  display: grid;
  gap: 0.38rem;
}

.modern-memories-section .comment-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  min-height: 0;
  margin-top: 0.14rem;
}

.modern-memories-section .comment-like-btn {
  min-height: 30px;
  padding: 0 0.2rem 0 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #697b73;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
  font-size: 0.79rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.modern-memories-section .comment-like-btn i {
  font-size: 0.82rem;
}

.modern-memories-section .comment-like-btn:hover {
  color: #c46d82;
  transform: translateY(-1px);
}

.modern-memories-section .comment-like-btn.liked,
.modern-memories-section .comment-like-btn[aria-pressed="true"] {
  color: #b85f77;
}

.modern-memories-section .comment-text {
  color: #44514b;
  font-size: 0.92rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.modern-memories-section .comment-text--collapsible {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: var(--comment-lines, 3);
  overflow: hidden;
}

.modern-memories-section .comment-text--preview {
  --comment-lines: 2;
}

.modern-memories-section .comment-text--drawer {
  --comment-lines: 6;
}

.modern-memories-section .comment-item--preview .comment-avatar {
  width: 26px;
  height: 26px;
}

.modern-memories-section .comment-item--preview .comment-user,
.modern-memories-section .comment-item--preview .comment-time {
  font-size: 0.8rem;
}

.modern-memories-section .comment-item--preview .comment-text {
  font-size: 0.9rem;
}

.modern-memories-section .comment-item--drawer {
  position: relative;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 0.34rem 0.54rem;
}

.modern-memories-section .comment-thread-guide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  display: none;
  z-index: 0;
}

.modern-memories-section .comment-item--drawer.comment-item--thread-ready .comment-thread-guide {
  display: block;
}

.modern-memories-section .comment-thread-guide__path,
.modern-memories-section .comment-thread-guide__connector {
  fill: none;
  stroke: rgba(214, 223, 218, 0.82);
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.modern-memories-section .comment-item--drawer > .comment-avatar,
.modern-memories-section .comment-item--drawer > .comment-content,
.modern-memories-section .comment-item--reply > .comment-avatar,
.modern-memories-section .comment-item--reply > .comment-content {
  position: relative;
  z-index: 1;
}

.modern-memories-section .comment-item--drawer .comment-avatar {
  width: 32px;
  height: 32px;
}

.modern-memories-section .comment-item--drawer .comment-user {
  font-size: 0.88rem;
}

.modern-memories-section .comment-item--drawer .comment-text {
  font-size: 0.95rem;
  line-height: 1.65;
}

.modern-memories-section .comment-item--drawer .comment-actions {
  margin-top: 0.12rem;
}

.modern-memories-section .comment-item--reply {
  position: relative;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 0.22rem 0.3rem;
}

.modern-memories-section .comment-item--reply .comment-avatar {
  width: 24px;
  height: 24px;
  margin-top: 0.1rem;
}

.modern-memories-section .comment-item--reply .comment-content {
  gap: 0.22rem;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.modern-memories-section .comment-item--reply .comment-user,
.modern-memories-section .comment-item--reply .comment-time {
  font-size: 0.8rem;
}

.modern-memories-section .comment-item--reply .comment-text {
  font-size: 0.91rem;
  line-height: 1.58;
}

.modern-memories-section .comment-thread {
  display: grid;
  gap: 0.48rem;
  margin-top: 0.24rem;
  margin-left: 0;
  padding-left: 0;
}

.modern-memories-section .comment-thread[hidden] {
  display: none;
}

.modern-memories-section .comment-thread::before {
  display: none;
}

.modern-memories-section .comment-replies {
  display: grid;
  gap: 0.56rem;
  margin-top: 0;
  margin-left: 0;
  padding-left: 0;
}

.modern-memories-section .comment-item.is-expanded .comment-text--collapsible {
  display: block;
  overflow: visible;
}

.modern-memories-section .comment-text-toggle {
  width: fit-content;
  padding: 0;
  border: none;
  background: transparent;
  color: #6f8378;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.modern-memories-section .comment-text-toggle:hover {
  color: #537262;
}

.modern-memories-section .comment-reply-btn {
  color: #73867d;
}

.modern-memories-section .comment-reply-btn.is-active {
  color: #51685c;
}

.modern-memories-section .comment-inline-reply {
  display: grid;
  gap: 0.18rem;
  margin-top: 0.12rem;
}

.modern-memories-section .comment-inline-reply[hidden] {
  display: none;
}

.modern-memories-section .comment-inline-reply__row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 0.54rem;
  align-items: start;
}

.modern-memories-section .comment-inline-reply__avatar {
  position: relative;
  z-index: 1;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(220, 229, 224, 0.96);
  background: rgba(246, 249, 247, 0.94);
}

.modern-memories-section .comment-inline-reply__body {
  min-width: 0;
  display: grid;
  gap: 0.34rem;
}

.modern-memories-section .comment-inline-reply__field {
  display: flex;
  align-items: flex-start;
  min-width: 0;
  gap: 0.46rem;
  padding: 0.08rem 0 0.46rem;
  border-bottom: 1px solid rgba(208, 218, 213, 0.96);
}

.modern-memories-section .comment-inline-reply__mention {
  color: #5f7669;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.75rem;
  white-space: nowrap;
}

.modern-memories-section .comment-input--inline-reply {
  flex: 1;
  min-height: 2rem;
  padding: 0.08rem 0 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  resize: none;
  font: inherit;
  line-height: 1.5;
}

.modern-memories-section .comment-input--inline-reply:focus {
  outline: none;
  border: none;
}

.modern-memories-section .comment-inline-reply__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.7rem;
}

.modern-memories-section .comment-inline-reply__cancel {
  padding: 0;
  border: none;
  background: transparent;
  color: #72857b;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.modern-memories-section .comment-submit--inline {
  min-width: 64px;
  min-height: 34px;
  padding: 0 0.86rem;
  border-radius: 999px;
  font-size: 0.82rem;
  box-shadow: none;
}

.modern-memories-section .comment-main--reply {
  gap: 0.24rem;
}

.modern-memories-section .comment-mention {
  color: #5f7669;
  font-weight: 600;
}

.modern-memories-section .comment-reply-context {
  display: none;
}

.modern-memories-section .comment-reply-context strong {
  color: inherit;
  font-weight: inherit;
}

.modern-memories-section .comment-time {
  color: #9eaaa4;
  flex-shrink: 0;
  margin-left: 0;
  font-size: 0.8rem;
}

.modern-memories-section .no-comments,
.modern-memories-section .memory-comments-drawer__empty {
  margin: 0;
  padding: 0.25rem 0;
  color: #9ca6a1;
  font-size: 0.85rem;
  line-height: 1.6;
}

.modern-memories-section .memory-comment-actions {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  flex-wrap: wrap;
  margin-left: auto;
}

.modern-memories-section .memory-owner-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.modern-memories-section .memory-owner-action {
  min-height: 34px;
  padding: 0.46rem 0.82rem;
  border-radius: 8px;
  border: 1px solid rgba(213, 222, 217, 0.96);
  background: rgba(255, 255, 255, 0.76);
  color: #65776e;
  font: inherit;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.modern-memories-section .memory-owner-action:hover {
  background: rgba(244, 248, 246, 0.96);
  border-color: rgba(184, 202, 193, 0.98);
  color: #4f655a;
  transform: translateY(-1px);
}

.modern-memories-section .memory-owner-action--danger {
  color: #9b6770;
  border-color: rgba(231, 207, 213, 0.96);
  background: rgba(255, 249, 250, 0.92);
}

.modern-memories-section .memory-owner-action--danger:hover {
  color: #87515b;
  border-color: rgba(218, 182, 190, 0.98);
  background: rgba(255, 243, 245, 0.98);
}

.modern-memories-section .memory-inline-editor {
  display: grid;
  gap: 0.9rem;
}

.modern-memories-section .memory-inline-editor__note {
  margin: 0;
  padding: 0.8rem 0.95rem;
  border-radius: 12px;
  background: rgba(252, 247, 244, 0.98);
  border: 1px solid rgba(231, 219, 213, 0.94);
  color: #7b6a62;
  font-size: 0.87rem;
  line-height: 1.65;
}

.modern-memories-section .memory-inline-editor__text {
  width: 100%;
  min-height: 180px;
  resize: vertical;
  padding: 1rem 1.05rem;
  border-radius: 14px;
  border: 1px solid rgba(218, 225, 220, 0.96);
  background: rgba(255, 255, 255, 0.98);
  color: #4b574f;
  font: inherit;
  line-height: 1.8;
}

.modern-memories-section .memory-inline-editor__upload-row {
  margin-top: 0;
}

.modern-memories-section .memory-inline-editor__preview {
  display: none;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.modern-memories-section .memory-inline-editor__preview-item {
  position: relative;
  display: inline-flex;
}

.modern-memories-section .memory-inline-editor__remove-photo {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: rgba(56, 46, 41, 0.76);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.modern-memories-section .memory-inline-editor__remove-photo:hover {
  background: rgba(134, 82, 92, 0.92);
  transform: scale(1.04);
}

.modern-memories-section .memory-inline-editor__preview.is-visible,
.modern-memories-section .memory-inline-editor__preview[style*="display: flex"] {
  display: flex;
}

.modern-memories-section .memory-item--editing {
  border-color: rgba(208, 190, 182, 0.94) !important;
  box-shadow: 0 20px 38px rgba(96, 84, 71, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.92) !important;
}

.modern-memories-section .memory-item--editing .memory-meta {
  padding-top: 0.15rem;
}

.modern-memories-section .memory-inline-editor__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.modern-memories-section .memory-comment-entry,
.modern-memories-section .toggle-comments {
  min-height: 34px;
  padding: 0.48rem 0.82rem;
  border-radius: 8px;
  border: 1px solid rgba(213, 222, 217, 0.96);
  background: rgba(255, 255, 255, 0.78);
  color: #5f7167;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.modern-memories-section .memory-comment-entry {
  background: rgba(245, 249, 246, 0.96);
  color: #4f6659;
  font-weight: 700;
}

.modern-memories-section .memory-comment-entry:hover,
.modern-memories-section .toggle-comments:hover {
  background: rgba(244, 248, 245, 0.96);
  color: #486458;
  border-color: rgba(173, 196, 185, 0.96);
  transform: translateY(-1px);
}

.modern-memories-section .comment-input {
  min-height: 96px;
  padding: 0.85rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(214, 223, 218, 0.96);
  background: rgba(255, 255, 255, 0.9);
  color: #4b574f;
  resize: vertical;
  font: inherit;
}

.modern-memories-section .comment-submit {
  min-width: 104px;
  min-height: 46px;
  padding: 0 1.1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #7d9b8d, #688578);
  box-shadow: 0 14px 24px rgba(110, 138, 126, 0.18);
}

.modern-memories-section .memory-comments-drawer {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: flex-end;
  opacity: 0;
  pointer-events: none;
  z-index: 1400;
  transition: opacity 0.24s ease;
}

.modern-memories-section .memory-comments-drawer.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modern-memories-section .memory-comments-drawer__backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: rgba(56, 68, 62, 0.28);
}

.modern-memories-section .memory-comments-drawer__panel {
  position: relative;
  width: min(680px, calc(100vw - 24px));
  height: 100%;
  margin-left: auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,249,247,0.98));
  box-shadow: -12px 0 36px rgba(76, 89, 81, 0.18);
  transform: translateX(100%);
  transition: transform 0.24s ease;
}

.modern-memories-section .memory-comments-drawer.is-open .memory-comments-drawer__panel {
  transform: translateX(0);
}

.modern-memories-section .memory-comments-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.2rem 0.8rem;
  border-bottom: 1px solid rgba(228, 235, 231, 0.94);
}

.modern-memories-section .memory-comments-drawer__eyebrow {
  color: #6e7f77;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.modern-memories-section .memory-comments-drawer__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.modern-memories-section .memory-comments-drawer__memory {
  display: grid;
  gap: 0.9rem;
  padding: 0.95rem 1.2rem 1rem;
  border-bottom: 1px solid rgba(233, 239, 235, 0.92);
  align-items: start;
}

.modern-memories-section .memory-comments-drawer__memory.has-photos {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 268px);
}

.modern-memories-section .memory-comments-drawer__memory.is-long,
.modern-memories-section .memory-comments-drawer__memory.has-photos.is-long {
  grid-template-columns: 1fr;
}

.modern-memories-section .memory-comments-drawer__time {
  color: #8f9d97;
  font-size: 0.78rem;
  font-weight: 600;
}

.modern-memories-section .memory-comments-drawer__close {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(221, 229, 224, 0.96);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #61736a;
  cursor: pointer;
}

.modern-memories-section .memory-comments-drawer__summary {
  min-width: 0;
  display: grid;
  gap: 0.38rem;
}

.modern-memories-section .memory-comments-drawer__memory-text {
  color: #435048;
  line-height: 1.78;
  font-size: 0.96rem;
  white-space: pre-line;
}

.modern-memories-section .memory-comments-drawer__memory.has-photos .memory-comments-drawer__memory-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}

.modern-memories-section .memory-comments-drawer__memory.is-long .memory-comments-drawer__memory-text,
.modern-memories-section .memory-comments-drawer__memory.has-photos.is-long .memory-comments-drawer__memory-text {
  display: block;
  overflow: visible;
}

.modern-memories-section .memory-comments-drawer__media {
  min-width: 0;
}

.modern-memories-section .memory-comments-drawer__memory .memory-media {
  width: 100%;
  gap: 0.5rem;
}

.modern-memories-section .memory-comments-drawer__memory .memory-media__thumb {
  flex-basis: 3.65rem;
  width: 3.65rem;
}

.modern-memories-section .memory-comments-drawer__memory .memory-media__thumbs {
  gap: 0.45rem;
  padding-top: 0;
  padding-bottom: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: visible;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.modern-memories-section .memory-comments-drawer__memory .memory-media__thumbs::-webkit-scrollbar {
  height: 0;
}

.modern-memories-section .memory-comments-drawer__memory .memory-photo--drawer {
  aspect-ratio: 4 / 3;
  box-shadow: 0 8px 18px rgba(86, 67, 52, 0.05);
}

.modern-memories-section .memory-comments-drawer__list {
  padding: 0.35rem 1.2rem 0.8rem;
  display: grid;
  gap: 0.78rem;
}

.modern-memories-section .memory-comments-drawer__composer {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
  padding: 1rem 1.2rem 1.2rem;
  border-top: 1px solid rgba(228, 235, 231, 0.94);
  background: rgba(250, 252, 251, 0.96);
}

.modern-memories-section .memory-comments-drawer__composer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
}

.modern-memories-section .memory-comments-drawer__replying {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  background: rgba(239, 245, 241, 0.96);
  color: #5a6f64;
  font-size: 0.82rem;
}

.modern-memories-section .memory-comments-drawer__replying[hidden] {
  display: none;
}

.modern-memories-section .memory-comments-drawer__replying strong {
  color: #475a51;
  font-weight: 700;
}

.modern-memories-section .memory-comments-drawer__replying button {
  padding: 0;
  border: none;
  background: transparent;
  color: #6f8378;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.modern-memories-section .memories-empty {
  margin: 0;
  padding: 1rem 0 0.2rem;
  color: #93a099;
}

@media (max-width: 900px) {
  .modern-memories-section > .memory-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .modern-memories-section .memory-actions {
    justify-content: flex-start;
  }

  .modern-memories-section .memory-comment-actions {
    align-items: stretch;
    margin-left: 0;
  }

  .modern-memories-section .memory-action-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
  }

  .modern-memories-section .memory-feedback {
    justify-content: flex-start;
  }

  .modern-memories-section .comment-item,
  .modern-memories-section .comment-item--drawer {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 0.34rem 0.5rem;
  }

  .modern-memories-section .comment-avatar,
  .modern-memories-section .comment-item--drawer .comment-avatar {
    width: 30px;
    height: 30px;
  }

  .modern-memories-section .comment-item--reply {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .modern-memories-section .comment-thread {
    margin-left: 0;
    padding-left: 0;
  }

  .modern-memories-section .comment-item--reply .comment-avatar {
    width: 24px;
    height: 24px;
    margin-top: 0.08rem;
  }

  .modern-memories-section .memory-comments-drawer {
    align-items: flex-end;
    justify-content: stretch;
  }

  .modern-memories-section .memory-comments-drawer__panel {
    width: 100%;
    max-height: min(86vh, 760px);
    height: auto;
    border-radius: 24px 24px 0 0;
    transform: translateY(100%);
  }

  .modern-memories-section .memory-comments-drawer__memory.has-photos {
    grid-template-columns: 1fr;
  }

  .modern-memories-section .memory-comments-drawer__memory.has-photos .memory-comments-drawer__memory-text {
    -webkit-line-clamp: 5;
  }

  .modern-memories-section .memory-comments-drawer.is-open .memory-comments-drawer__panel {
    transform: translateY(0);
  }

  .modern-memories-section .memory-comments-drawer__composer-row {
    grid-template-columns: 1fr;
  }

  .modern-memories-section .comment-submit {
    width: 100%;
  }

  .modern-memories-section .comment-submit--inline {
    width: auto;
  }

}

@media (max-width: 720px) {
  .modern-memories-section {
    padding: 1.2rem;
  }

  .modern-memories-section .add-memory {
    padding: 1rem;
  }

  .modern-memories-section .memory-item {
    padding: 1rem !important;
  }

  .modern-memories-section .memory-text {
    font-size: 0.98rem;
    line-height: 1.82;
  }

  .modern-memories-section .memory-text--preview {
    -webkit-line-clamp: 5;
  }

  .modern-memories-section .memory-photo--card,
  .modern-memories-section .memory-photo--drawer {
    aspect-ratio: 4 / 3;
  }

  .modern-memories-section .memory-media__thumb {
    flex-basis: 4rem;
    width: 4rem;
  }

  .modern-memories-section .memory-comment-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .modern-memories-section .memory-owner-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .modern-memories-section .memory-comment-entry,
  .modern-memories-section .toggle-comments,
  .modern-memories-section .memory-owner-action,
  .modern-memories-section .comment-submit,
  .modern-memories-section .save-memory-btn button {
    width: 100%;
  }

  .modern-memories-section .memory-editor-actions {
    justify-content: stretch;
  }

  .modern-memories-section .memory-edit-cancel {
    width: 100%;
  }

  .modern-memories-section .memory-comments-drawer__header,
  .modern-memories-section .memory-comments-drawer__memory,
  .modern-memories-section .memory-comments-drawer__list,
  .modern-memories-section .memory-comments-drawer__composer {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

