:root {
    color-scheme: light;
    --paper: #f7f7f3;
    --surface: #ffffff;
    --ink: #202421;
    --muted: #6e756f;
    --line: #dfe3dc;
    --moss: #42624d;
    --moss-dark: #294133;
    --coral: #c8654f;
    --gold: #bd913f;
    --header-height: 68px;
    --content-width: 1160px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.7;
    text-rendering: optimizeLegibility;
}

body.nav-open {
    overflow: hidden;
}

button,
input,
textarea {
    font: inherit;
}

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

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--header-height);
    background: rgba(247, 247, 243, 0.96);
    border-bottom: 1px solid rgba(32, 36, 33, 0.1);
    backdrop-filter: blur(12px);
}

.nav-shell {
    width: min(calc(100% - 40px), var(--content-width));
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    font-family: Georgia, "Songti SC", serif;
    font-size: 19px;
    font-weight: 700;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    background: var(--moss-dark);
    color: #fff;
    border-radius: 50%;
    font-family: "Songti SC", serif;
    font-size: 16px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.site-nav a {
    position: relative;
    padding: 20px 0 18px;
    color: #59605a;
    font-size: 14px;
}

.site-nav a::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 13px;
    left: 0;
    height: 2px;
    background: var(--coral);
    transform: scaleX(0);
    transition: transform 180ms ease;
}

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

.site-nav a:hover::after,
.site-nav a.is-active::after {
    transform: scaleX(1);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 10px;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 4px 0;
    background: var(--ink);
    transition: transform 180ms ease, opacity 180ms ease;
}

.home-hero {
    position: relative;
    min-height: min(68vh, 680px);
    display: flex;
    align-items: center;
    overflow: hidden;
    isolation: isolate;
    background: url("../img/bgCover.png") center 56% / cover no-repeat;
}

.hero-shade {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(23, 36, 28, 0.43);
}

.hero-content {
    width: min(calc(100% - 40px), var(--content-width));
    margin: 0 auto;
    padding: 72px 0 84px;
    color: #fff;
}

.hero-content h1 {
    max-width: 760px;
    margin: 10px 0 16px;
    font-family: Georgia, "Songti SC", serif;
    font-size: 58px;
    line-height: 1.18;
    letter-spacing: 0;
}

.hero-content > p:not(.eyebrow) {
    max-width: 600px;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 17px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--coral);
    font-family: Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hero-content .eyebrow {
    color: #f2d68f;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button-primary {
    background: #fff;
    color: var(--moss-dark);
}

.button-quiet {
    border-color: rgba(255, 255, 255, 0.72);
    color: #fff;
}

.button-quiet:hover {
    background: rgba(255, 255, 255, 0.12);
}

.button-dark {
    background: var(--moss-dark);
    color: #fff;
}

.button-dark:hover {
    background: #1d3025;
}

.memory-stats {
    width: min(calc(100% - 40px), 840px);
    min-height: 116px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
    align-items: center;
}

.memory-stats div {
    min-width: 0;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    border-right: 1px solid var(--line);
}

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

.memory-stats strong {
    font-family: Georgia, serif;
    font-size: 31px;
    color: var(--moss-dark);
}

.memory-stats span {
    color: var(--muted);
    font-size: 13px;
}

.section-shell {
    width: min(calc(100% - 40px), var(--content-width));
    margin-right: auto;
    margin-left: auto;
}

.section-block {
    padding: 74px 0 90px;
}

.section-heading {
    margin-bottom: 26px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.section-heading h2,
.story-copy h2,
.page-intro h1 {
    margin: 0;
    font-family: Georgia, "Songti SC", serif;
    font-size: 36px;
    line-height: 1.3;
    letter-spacing: 0;
}

.text-link {
    color: var(--moss);
    font-size: 14px;
    font-weight: 700;
}

.text-link:hover {
    color: var(--coral);
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.photo-card {
    min-width: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
    color: inherit;
    text-align: left;
    cursor: zoom-in;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.photo-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 34px rgba(35, 51, 40, 0.12);
}

.photo-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: #e8e9e4;
}

.photo-card:nth-child(3n + 2) img {
    object-position: center 38%;
}

.photo-meta {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
}

.photo-meta strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15px;
}

.photo-meta time {
    flex: 0 0 auto;
    color: var(--muted);
    font-family: Georgia, serif;
    font-size: 12px;
}

.photo-facts {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    color: var(--muted);
}

.photo-facts small {
    max-width: 130px;
    margin-top: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
}

.story-band {
    padding: 88px 0;
    background: #e8ede7;
    border-top: 1px solid #d9dfd8;
    border-bottom: 1px solid #d9dfd8;
}

.story-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
    gap: 90px;
    align-items: center;
}

.story-copy p:not(.eyebrow) {
    max-width: 500px;
    margin: 18px 0 28px;
    color: #59615b;
}

.memory-preview {
    margin: 0;
    padding: 0;
    border-top: 1px solid #c8d0c7;
    list-style: none;
}

.memory-preview li {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 16px;
    padding: 18px 0;
    border-bottom: 1px solid #c8d0c7;
    font-size: 15px;
}

.memory-preview li div {
    min-width: 0;
}

.memory-preview li strong,
.memory-preview li small {
    display: block;
}

.memory-preview li small {
    margin-top: 4px;
    color: #737b74;
    font-size: 11px;
}

.memory-preview span {
    color: var(--coral);
    font-family: Georgia, serif;
}

.page-intro {
    padding-top: 86px;
    padding-bottom: 46px;
    border-bottom: 1px solid var(--line);
}

.page-intro h1 {
    font-size: 46px;
}

.page-intro > p:last-child {
    max-width: 620px;
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 16px;
}

.gallery-section,
.timeline-section {
    padding-top: 34px;
    padding-bottom: 100px;
}

.gallery-toolbar {
    margin-bottom: 22px;
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-size: 13px;
}

.photo-grid-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.photo-dialog {
    width: min(92vw, 1040px);
    max-height: 92vh;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 6px;
    background: #111411;
    color: #fff;
}

.photo-dialog::backdrop {
    background: rgba(12, 14, 12, 0.82);
}

.photo-dialog img {
    width: 100%;
    max-height: 76vh;
    object-fit: contain;
    background: #111411;
}

.dialog-caption {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 20px;
}

.dialog-caption time {
    color: #aeb8b0;
    font-family: Georgia, serif;
}

.dialog-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    background: rgba(17, 20, 17, 0.7);
    color: #fff;
    font-size: 27px;
    line-height: 1;
    cursor: pointer;
}

.memory-timeline {
    width: min(100%, 1060px);
    margin: 0 auto;
    padding: 0;
    list-style: none;
}

.memory-timeline li {
    position: relative;
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 22px;
    min-height: 142px;
    padding: 6px 0 54px;
}

.memory-timeline li::before {
    content: "";
    position: absolute;
    top: 38px;
    bottom: 0;
    left: 26px;
    width: 1px;
    background: var(--line);
}

.memory-timeline li:last-child::before {
    display: none;
}

.timeline-index {
    width: 52px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid #cbd3ca;
    border-radius: 50%;
    background: var(--paper);
    color: var(--coral);
    font-family: Georgia, serif;
    font-size: 13px;
}

.memory-timeline h2 {
    margin: 8px 0 10px;
    font-family: Georgia, "Songti SC", serif;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0;
}

.timeline-entry {
    min-width: 0;
}

.memory-timeline .has-photo .timeline-entry {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.82fr);
    gap: 34px;
    align-items: center;
}

.memory-timeline li:nth-child(even) .timeline-copy {
    order: 2;
}

.memory-timeline li:nth-child(even) .timeline-photo {
    order: 1;
}

.timeline-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    color: var(--coral);
    font-family: Georgia, "Songti SC", serif;
    font-size: 13px;
}

.timeline-facts span::before {
    content: "地点 · ";
    color: var(--muted);
}

.timeline-copy p {
    max-width: 620px;
    margin: 0;
    color: #59615b;
    line-height: 1.85;
}

.timeline-photo {
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}

.timeline-photo img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 12px 28px rgba(35, 51, 40, 0.12);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.timeline-photo:hover img {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(35, 51, 40, 0.17);
}

.message-layout {
    padding-top: 42px;
    padding-bottom: 100px;
    display: grid;
    grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1.2fr);
    gap: 72px;
    align-items: start;
}

.message-form {
    position: sticky;
    top: calc(var(--header-height) + 28px);
    padding-right: 48px;
    border-right: 1px solid var(--line);
}

.form-heading {
    margin-bottom: 26px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
}

.form-heading h2 {
    margin: 0;
    font-family: Georgia, "Songti SC", serif;
    font-size: 25px;
}

.form-heading span {
    color: var(--muted);
    font-size: 12px;
}

.message-form label {
    display: block;
    margin-bottom: 18px;
}

.message-form label > span {
    display: block;
    margin-bottom: 7px;
    color: #4c544e;
    font-size: 13px;
    font-weight: 700;
}

.message-form input,
.message-form textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #cfd5ce;
    border-radius: 4px;
    background: #fff;
    color: var(--ink);
    outline: none;
    resize: vertical;
}

.message-form input:focus,
.message-form textarea:focus {
    border-color: var(--moss);
    box-shadow: 0 0 0 3px rgba(66, 98, 77, 0.12);
}

.message-form .button {
    width: 100%;
    border: 0;
}

.message-form .button:disabled {
    cursor: wait;
    opacity: 0.6;
}

.form-status {
    min-height: 24px;
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.form-status.is-error {
    color: #a54232;
}

.form-status.is-success {
    color: var(--moss);
}

.message-list {
    border-top: 1px solid var(--line);
}

.message-item {
    padding: 24px 0 26px;
    border-bottom: 1px solid var(--line);
}

.message-item header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
}

.message-item header strong {
    font-family: Georgia, "Songti SC", serif;
    font-size: 17px;
}

.message-item time {
    color: var(--muted);
    font-family: Georgia, serif;
    font-size: 12px;
}

.message-item p {
    margin: 10px 0 0;
    color: #505750;
}

.empty-state {
    min-height: 260px;
    display: grid;
    place-content: center;
    text-align: center;
    color: var(--muted);
}

.empty-state strong {
    color: var(--ink);
    font-size: 20px;
}

.empty-state p {
    margin: 8px 0 0;
}

.site-footer {
    background: #222823;
    color: #fff;
}

.footer-inner {
    width: min(calc(100% - 40px), var(--content-width));
    min-height: 150px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.footer-inner strong {
    font-family: Georgia, "Songti SC", serif;
    font-size: 18px;
}

.footer-inner p {
    margin: 4px 0 0;
    color: #adb6ae;
    font-size: 13px;
}

.footer-inner a {
    padding-bottom: 2px;
    border-bottom: 1px solid #78857a;
    color: #dce2dc;
    font-size: 13px;
}

:focus-visible {
    outline: 3px solid rgba(200, 101, 79, 0.45);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 820px) {
    .nav-toggle {
        display: block;
    }

    .nav-toggle[aria-expanded="true"] span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .nav-toggle[aria-expanded="true"] span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle[aria-expanded="true"] span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    .site-nav {
        position: fixed;
        top: var(--header-height);
        right: 0;
        left: 0;
        display: none;
        padding: 18px 20px 24px;
        background: var(--paper);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 16px 30px rgba(32, 36, 33, 0.1);
    }

    .site-nav.is-open {
        display: grid;
    }

    .site-nav a {
        padding: 11px 4px;
    }

    .site-nav a::after {
        display: none;
    }

    .hero-content h1 {
        font-size: 44px;
    }

    .story-layout,
    .message-layout {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .story-layout {
        gap: 54px;
    }

    .message-form {
        position: static;
        padding: 0 0 42px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .photo-grid,
    .photo-grid-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .memory-timeline .has-photo .timeline-entry {
        grid-template-columns: minmax(0, 1fr) minmax(220px, 0.78fr);
        gap: 22px;
    }
}

@media (max-width: 560px) {
    .nav-shell,
    .section-shell,
    .hero-content,
    .footer-inner,
    .memory-stats {
        width: min(calc(100% - 28px), var(--content-width));
    }

    .home-hero {
        min-height: 590px;
        align-items: flex-end;
        background-position: 58% center;
    }

    .hero-content {
        padding: 80px 0 58px;
    }

    .hero-content h1 {
        font-size: 39px;
    }

.hero-content > p:not(.eyebrow) {
        font-size: 15px;
    }

    .memory-stats {
        min-height: 94px;
    }

    .memory-stats div {
        gap: 4px;
        flex-direction: column;
        align-items: center;
    }

    .memory-stats strong {
        font-size: 25px;
        line-height: 1.1;
    }

    .section-block,
    .story-band {
        padding-top: 58px;
        padding-bottom: 66px;
    }

    .section-heading h2,
    .story-copy h2 {
        font-size: 30px;
    }

    .page-intro {
        padding-top: 58px;
        padding-bottom: 34px;
    }

    .page-intro h1 {
        font-size: 37px;
    }

    .gallery-toolbar span:last-child {
        display: none;
    }

    .photo-grid,
    .photo-grid-gallery {
        grid-template-columns: 1fr;
    }

    .photo-card img {
        aspect-ratio: 4 / 3;
    }

    .photo-meta {
        min-height: 64px;
    }

    .memory-timeline li {
        grid-template-columns: 56px 1fr;
        gap: 14px;
    }

    .memory-timeline .has-photo .timeline-entry {
        display: flex;
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
    }

    .memory-timeline li:nth-child(even) .timeline-copy,
    .memory-timeline li:nth-child(even) .timeline-photo {
        order: initial;
    }

    .timeline-photo img {
        aspect-ratio: 4 / 3;
    }

    .timeline-index {
        width: 44px;
    }

    .memory-timeline li::before {
        left: 22px;
    }

    .memory-timeline h2 {
    font-size: 17px;
    overflow-wrap: anywhere;
    }

    .footer-inner {
        min-height: 180px;
        align-items: flex-start;
        justify-content: center;
        flex-direction: column;
    }

    .dialog-caption {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
    }
}
