:root {
  --page: #faf8f5;
  --card: #fffefa;
  --ink: #302b29;
  --muted: #766e68;
  --line: #e6dfd8;
  --wine: #a44552;
  --pink: #f3e4e4;
  --side: 218px;
  --serif: Georgia, "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--page);
  font-size: 16px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  color: inherit;
}
button:disabled {
  cursor: wait;
  opacity: 0.6;
}
a {
  color: var(--wine);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #b86671;
  outline-offset: 3px;
}
button {
  border: 0;
  background: none;
}
h1,
h2,
h3,
p {
  margin: 0;
}
button svg,
.icon {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
img {
  display: block;
  max-width: 100%;
}
.loading,
.gate {
  min-height: 100svh;
  display: grid;
  place-items: center;
}
.shell {
  display: grid;
  grid-template-columns: var(--side) minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 34px 18px 20px;
  background: #f3efea;
  border-right: 1px solid var(--line);
  z-index: 4;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  padding: 0 6px;
}
.brand img {
  width: 39px;
  height: 39px;
}
.brand strong {
  font-family: var(--serif);
  font-size: 1.24rem;
  letter-spacing: 0.05em;
}
.side-nav {
  display: grid;
  gap: 8px;
  margin: 52px 0 20px;
}
.nav-item,
.side-setting {
  display: flex;
  align-items: center;
  gap: 13px;
  text-align: left;
  border-radius: 9px;
  padding: 13px 16px;
  font-size: 0.97rem;
}
.nav-item.active {
  background: #eadad9;
  color: #8c3645;
  font-weight: 650;
}
.nav-item:not(.active):hover,
.side-setting:hover {
  background: #eae4dd;
}
.side-foot {
  margin-top: auto;
}
.side-setting {
  width: 100%;
  margin-bottom: 16px;
}
.profile {
  display: flex;
  align-items: center;
  gap: 11px;
  border-top: 1px solid var(--line);
  padding: 18px 5px 0;
}
.profile small {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 3px;
}
.avatar {
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  width: 37px;
  height: 37px;
  background: #f0d5cf;
  color: #8e4652;
  font-family: var(--serif);
  font-weight: bold;
}
.avatar.b {
  background: #dfe7dd;
  color: #4f6957;
}
.main {
  width: 100%;
  max-width: 1550px;
  margin: 0 auto;
  padding: 0 clamp(24px, 3.4vw, 62px) 45px;
}
.topline {
  height: 69px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  font-size: 0.86rem;
  color: var(--muted);
}
.topline span,
.inline,
.act,
.textlink,
.chip,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.topline .icon {
  width: 16px;
  height: 16px;
}
.mobile-brand,
.mobile-nav,
.mobile-settings {
  display: none;
}
.titlebar,
.section-head,
.row,
.between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.titlebar {
  margin: 26px 0 20px;
}
.titlebar h1,
.gate h1 {
  font: 600 clamp(1.9rem, 2.7vw, 2.75rem)/1.25 var(--serif);
  letter-spacing: 0.035em;
}
.controls {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}
.act,
.textlink,
.square,
.chip {
  justify-content: center;
}
.act {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 9px;
  min-height: 41px;
  padding: 9px 15px;
  font-size: 0.9rem;
  font-weight: 550;
}
.act:hover,
.chip:hover,
.square:hover {
  border-color: #c5ada9;
  background: #f8eeec;
}
.act.primary {
  background: var(--wine);
  border-color: var(--wine);
  color: #fff;
}
.act.primary:hover {
  background: #893845;
  color: #fff;
}
.square {
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  width: 37px;
  height: 37px;
  border-radius: 9px;
  background: var(--card);
}
.textlink {
  font-size: 0.86rem;
  color: var(--muted);
  padding: 5px 0;
}
.textlink .icon {
  width: 15px;
}
.feature {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(220px, 1fr);
  gap: 18px;
}
.hero {
  isolation: isolate;
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  min-height: 282px;
  background: #554c44;
  color: white;
  display: flex;
  align-items: flex-end;
  padding: 25px 30px;
}
.hero > img {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 54%;
}
.hero:after {
  content: "";
  z-index: -1;
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(36, 23, 26, 0.24), transparent 76%),
    linear-gradient(0deg, rgba(33, 25, 24, 0.76), transparent 72%);
}
.hero-names {
  font-size: 0.94rem;
  font-weight: 550;
  letter-spacing: 0.08em;
}
.hero h2 {
  font:
    400 clamp(2.55rem, 4.4vw, 4.6rem)/1.15 Georgia,
    serif;
  letter-spacing: -0.035em;
  margin: 4px 0 5px;
}
.hero h2 small {
  font: 500 1.35rem var(--serif);
  letter-spacing: 0;
  margin-left: 6px;
}
.hero time {
  font-size: 0.81rem;
  letter-spacing: 0.08em;
  color: #fff1e7;
}
.cover-edit {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 34px;
  height: 34px;
  background: #31272a50;
  color: white;
  border: 1px solid #ffffff66;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.cover-edit .icon {
  width: 16px;
}
.event-feature {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #f1e3df;
  border-radius: 15px;
  padding: 21px 22px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.event-feature h3 {
  position: relative;
  font: 600 1.36rem var(--serif);
  margin: 11px 0 4px;
}
.event-feature .small-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  color: #86575a;
}
.event-feature .small-label svg {
  width: 16px;
}
.event-feature time {
  position: relative;
  color: #785e59;
  font-size: 0.83rem;
}
.count-line {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: auto;
  color: #733d42;
}
.count-line strong {
  font:
    500 3.4rem/1 Georgia,
    serif;
  letter-spacing: -0.05em;
}
.count-line span {
  font-size: 0.88rem;
}
.event-feature .textlink {
  align-self: flex-start;
  margin-top: 8px;
  color: #72484c;
}
.envelope {
  position: absolute;
  bottom: 38px;
  right: -7px;
  width: 100px;
  height: 69px;
  transform: rotate(-16deg);
  background: #d7a391;
  border: 1px solid #c49080;
  z-index: -1;
  box-shadow: 0 4px 8px #70453817;
}
.envelope:before {
  content: "";
  position: absolute;
  top: -24px;
  left: 9px;
  right: 8px;
  height: 65px;
  background:
    repeating-linear-gradient(0deg, #c9ae9d 0 1px, transparent 1px 9px) 12px
      13px/60px 33px no-repeat,
    #fff6e8;
  transform: rotate(9deg);
  box-shadow: 0 0 0 1px #d5b69e;
}
.envelope:after {
  content: "♥";
  display: grid;
  place-items: center;
  color: #a85f64;
  font-size: 1.35rem;
  position: absolute;
  inset: 0;
  background:
    linear-gradient(32deg, #e9beac 49%, transparent 50%) left/51% 100% no-repeat,
    linear-gradient(-32deg, #edc6b6 49%, transparent 50%) right/51% 100%
      no-repeat;
  line-height: 75px;
}
.section-head {
  margin: 28px 0 14px;
}
.section-head h2,
.panel-title {
  font: 600 1.42rem var(--serif);
}
.photos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}
.photo-card {
  min-width: 0;
  text-align: left;
  padding: 0;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.photo-card img {
  width: 100%;
  aspect-ratio: 1.83;
  object-fit: cover;
  transition: transform 0.3s;
}
.photo-card:hover img {
  transform: scale(1.025);
}
.photo-copy {
  padding: 12px 14px 14px;
}
.photo-copy small,
.muted,
.meta {
  color: var(--muted);
}
.photo-copy small,
.meta {
  font-size: 0.81rem;
}
.photo-copy strong {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 1rem;
  font-family: var(--serif);
  margin-top: 5px;
}
.albumgrid .photo-card img {
  aspect-ratio: 1.4;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 20px;
}
.chip {
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 99px;
  font-size: 0.88rem;
  background: var(--card);
}
.chip.active {
  background: var(--pink);
  border-color: #dab5b9;
  color: var(--wine);
}
.panel,
.note,
.event-card,
.empty {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 18px 20px;
}
.note + .note,
.event-card + .event-card {
  margin-top: 12px;
}
.note-head {
  display: flex;
  align-items: center;
  gap: 9px;
}
.note-head .avatar {
  width: 32px;
  height: 32px;
}
.note-head .meta {
  margin-left: auto;
}
.note p,
.letter-text,
.reply p,
.wrap {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.75;
}
.note > p {
  margin: 11px 0;
}
.note .textlink {
  margin-right: 16px;
}
.replies {
  border-left: 2px solid var(--line);
  padding-left: 13px;
  margin: 12px 0 2px;
}
.replies p {
  margin: 5px 0;
  overflow-wrap: anywhere;
}
.note-photo {
  width: 110px;
  padding: 0;
  margin: 5px 0 10px;
}
.note-photo img {
  border-radius: 7px;
  width: 100%;
}
.empty {
  color: var(--muted);
  text-align: center;
  padding: 30px 16px;
}
.empty p {
  margin-bottom: 10px;
}
.event-card {
  display: flex;
  align-items: center;
  gap: 18px;
}
.date-tile {
  min-width: 60px;
  text-align: center;
  padding: 8px;
  background: #f5e9e7;
  color: var(--wine);
  border-radius: 9px;
}
.date-tile b {
  display: block;
  font:
    1.9rem/1.05 Georgia,
    serif;
}
.event-details {
  flex: 1;
  min-width: 0;
}
.event-details h3 {
  font: 600 1.14rem var(--serif);
  margin: 0 0 6px;
  overflow-wrap: anywhere;
}
.event-card .controls {
  justify-content: flex-end;
}
.top-tag {
  padding: 3px 9px;
  border-radius: 20px;
  background: #efe0da;
  color: #91525b;
  font-size: 0.77rem;
}
.small-label {
  font-weight: 600;
}
.gate {
  background:
    linear-gradient(#241f2638, #211a24a8),
    url("/samples/seaside.jpg") center/cover;
  padding: 24px;
}
.gate-card {
  width: min(100%, 425px);
  border-radius: 18px;
  background: var(--page);
  padding: 30px;
  box-shadow: 0 20px 70px #1a101a45;
}
.gate-card > img {
  width: 46px;
  margin-bottom: 18px;
}
.gate-card h1 {
  font-size: 1.9rem;
}
.gate-card .muted {
  font-size: 0.92rem;
  margin: 10px 0 20px;
  line-height: 1.6;
}
.gate-card .act {
  width: 100%;
}
dialog {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--page);
  color: var(--ink);
  width: min(520px, calc(100% - 26px));
  max-height: 88svh;
  box-shadow: 0 18px 80px #1a0d182c;
}
dialog::backdrop {
  background: #30232b72;
  backdrop-filter: blur(3px);
}
.modal-head {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--page);
  padding: 16px 21px;
  border-bottom: 1px solid var(--line);
  z-index: 1;
}
.modal-head h2 {
  font: 600 1.35rem var(--serif);
}
.modal-head .square {
  height: 31px;
  width: 31px;
  border: 0;
  background: transparent;
}
.modal-body {
  padding: 20px;
}
.field {
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 550;
  margin: 0 0 14px;
}
.field input,
.field select,
.field textarea,
.reply-form input {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #d9cec4;
  background: var(--card);
  color: var(--ink);
  border-radius: 8px;
  font-weight: 400;
  min-height: 41px;
}
.field textarea {
  resize: vertical;
  min-height: 84px;
}
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 15px;
}
.feedback {
  color: #923847;
  font-size: 0.88rem;
  line-height: 1.6;
  white-space: pre-line;
  margin: 8px 0;
}
.settings-group {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 14px;
}
.full-photo,
.letter-cover {
  width: 100%;
  max-height: 48vh;
  object-fit: contain;
  border-radius: 8px;
  background: #ede7e1;
}
.reply-form {
  display: flex;
  gap: 7px;
  margin-top: 12px;
}
.reply-form input {
  flex: 1;
}
.hint {
  font-size: 0.83rem;
  color: var(--muted);
  line-height: 1.65;
}
.detail-caption {
  font-size: 1.08rem;
  margin: 13px 0 5px;
}
.letter {
  padding: 12px 8px;
}
.letter-text {
  font: 1.14rem/2 var(--serif);
  margin: 18px 0 8px;
}
.letter-cover {
  max-height: 180px;
  object-fit: cover;
}
.letter-stage {
  min-height: 200px;
}
.wish {
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: #432e31;
  color: white;
  padding: 11px 19px;
  border-radius: 10px;
  pointer-events: none;
  opacity: 0;
  z-index: 30;
  transition: opacity 0.2s;
  max-width: 90%;
  font-size: 0.9rem;
}
#toast.show {
  opacity: 1;
}
.fx {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 5;
}
.petal,
.spark {
  position: absolute;
  left: var(--x);
  top: -10px;
  width: 10px;
  height: 15px;
  border-radius: 70% 25% 75% 25%;
  background: var(--c);
  animation: fall 3.5s ease-in var(--d) both;
}
.spark {
  height: 5px;
  width: 5px;
  border-radius: 50%;
  top: var(--y);
  animation: burst 1.3s ease-out var(--d) both;
}
@keyframes fall {
  from {
    opacity: 0;
  }
  12% {
    opacity: 0.95;
  }
  to {
    transform: translate(70px, 95vh) rotate(320deg);
    opacity: 0;
  }
}
@keyframes burst {
  from {
    opacity: 0;
    transform: translate(0, 0);
  }
  12% {
    opacity: 1;
  }
  to {
    opacity: 0;
    transform: translate(var(--dx), var(--dy));
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .fx {
    display: none;
  }
}
@media (min-width: 1500px) {
  .hero {
    min-height: 330px;
  }
  .sidebar {
    padding-top: 40px;
  }
  .main {
    padding-left: 55px;
    padding-right: 55px;
  }
}
@media (max-width: 1050px) {
  :root {
    --side: 182px;
  }
  .sidebar {
    padding-left: 12px;
    padding-right: 12px;
  }
  .feature {
    grid-template-columns: minmax(0, 1.7fr) minmax(195px, 1fr);
  }
  .main {
    padding-left: 22px;
    padding-right: 22px;
  }
  .hero {
    min-height: 250px;
  }
  .envelope {
    width: 78px;
    height: 52px;
    right: -8px;
    bottom: 32px;
  }
  .photos {
    gap: 10px;
  }
}
@media (max-width: 760px) {
  .shell {
    display: block;
  }
  .sidebar {
    display: none;
  }
  .main {
    padding: 0 17px calc(86px + env(safe-area-inset-bottom));
  }
  .mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fffdf9f7;
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
    padding: 5px 8px calc(5px + env(safe-area-inset-bottom));
    justify-content: space-around;
    z-index: 4;
  }
  .mobile-nav .nav-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.76rem;
    padding: 6px 15px;
    line-height: 1.3;
    background: none;
  }
  .mobile-nav .active {
    color: var(--wine);
  }
  .mobile-nav .active svg {
    stroke-width: 2.3;
  }
  .desktop-only {
    display: none !important;
  }
  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--serif);
    font-weight: 700;
    font-size: 1.03rem;
    color: var(--ink);
  }
  .mobile-brand img {
    width: 28px;
    height: 28px;
  }
  .mobile-settings {
    display: grid;
  }
  .topline {
    height: 55px;
  }
  .titlebar {
    margin: 19px 0 15px;
    gap: 8px;
  }
  .titlebar h1 {
    font-size: 1.76rem;
  }
  .titlebar .controls {
    gap: 5px;
  }
  .act {
    font-size: 0.84rem;
    min-height: 37px;
    padding: 8px 10px;
  }
  .act svg {
    width: 16px;
    height: 16px;
  }
  .feature {
    grid-template-columns: 1fr;
    gap: 11px;
  }
  .hero {
    min-height: 218px;
    padding: 21px;
  }
  .hero h2 {
    font-size: 3.25rem;
  }
  .event-feature {
    padding: 13px 16px 13px 18px;
    min-height: 92px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 10px;
    align-items: center;
  }
  .event-feature .small-label {
    grid-column: 1;
    grid-row: 1;
    font-size: 0.77rem;
  }
  .event-feature h3 {
    grid-column: 1;
    grid-row: 2;
    margin: 3px 0;
    font-size: 1.12rem;
  }
  .event-feature time {
    grid-column: 1;
    grid-row: 3;
    font-size: 0.75rem;
  }
  .event-feature .count-line {
    grid-column: 2;
    grid-row: 1 / span 2;
    margin: 0;
  }
  .event-feature .count-line strong {
    font-size: 2.1rem;
  }
  .event-feature .textlink {
    grid-column: 2;
    grid-row: 3;
    margin: 0;
    padding: 0;
    text-align: right;
    font-size: 0.74rem;
  }
  .event-feature .envelope {
    display: none;
  }
  .section-head {
    margin: 21px 0 11px;
  }
  .section-head h2 {
    font-size: 1.27rem;
  }
  .photos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .home-photos .photo-card:nth-child(3) {
    display: none;
  }
  .photo-copy {
    padding: 9px 10px 11px;
  }
  .photo-copy strong {
    font-size: 0.92rem;
  }
  .photo-copy small {
    font-size: 0.73rem;
  }
  .photo-card img {
    aspect-ratio: 1.45;
  }
  .note,
  .event-card,
  .panel {
    padding: 14px;
  }
  .event-card {
    gap: 10px;
    flex-wrap: wrap;
  }
  .event-card .controls {
    width: 100%;
    justify-content: flex-start;
  }
  .date-tile {
    min-width: 47px;
  }
  .two {
    gap: 7px;
  }
  .modal-body {
    padding: 16px;
  }
  .gate-card {
    padding: 23px;
  }
  #toast {
    bottom: 85px;
  }
  .controls .act {
    white-space: nowrap;
  }
}
@media (min-width: 761px) {
  .topline .mobile-settings {
    display: none;
  }
  .brand {
    gap: 8px;
    padding: 0;
    width: 100%;
  }
  .brand img {
    width: 34px;
    height: 34px;
    flex: none;
  }
  .brand strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1.05rem;
    letter-spacing: 0;
  }
}
