:root { color-scheme: light; --paper: #f8f7f4; --ink: #282b26; --muted: #797b73; --line: #e1e2db; --accent: #4e6047; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 20px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; -webkit-font-smoothing: antialiased; overflow-y: scroll; }
button, select, a, summary { -webkit-tap-highlight-color: transparent; }
button, select { font: inherit; color: inherit; }
button, a, summary { touch-action: manipulation; }
button, summary { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button { border: 0; }
button:focus-visible, a:focus-visible, select:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
[hidden] { display: none !important; }
.page-width { width: min(1440px, calc(100% - 48px)); margin-inline: auto; }
.skip-link { position: fixed; top: -60px; left: 20px; z-index: 50; background: var(--ink); color: white; padding: 12px 20px; }
.skip-link:focus { top: 12px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.gallery-header { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 27px 0 23px; }
h1 { margin: 0; font-size: 24px; font-weight: 550; letter-spacing: -.6px; line-height: 1.4; }
.gallery-settings > summary { display: flex; align-items: center; gap: 7px; padding: 8px 0 8px 8px; color: var(--muted); font-size: 12px; list-style: none; white-space: nowrap; }
.gallery-settings > summary::-webkit-details-marker { display: none; }
.gallery-settings > summary::after { content: ''; width: 5px; height: 5px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.gallery-settings[open] > summary::after { transform: translateY(1px) rotate(225deg); }
.collection-toolbar { position: absolute; top: calc(100% - 10px); right: 0; z-index: 10; width: min(380px, calc(100vw - 32px)); padding: 0 18px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); box-shadow: 0 8px 30px rgb(0 0 0 / 7%); }
.year-filters { display: flex; align-items: center; gap: 24px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.year-filter { position: relative; display: flex; align-items: center; gap: 5px; padding: 17px 0; background: transparent; color: var(--muted); font-size: 12px; white-space: nowrap; }
.year-filter span { font-size: 9px; opacity: .65; font-variant-numeric: tabular-nums; align-self: flex-start; }
.year-filter:hover, .year-filter.is-active { color: var(--ink); }
.year-filter.is-active { font-weight: 600; }
.year-filter.is-active::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--accent); }
.view-controls { display: flex; align-items: center; gap: 14px; padding-top: 12px; }
.sort-control { display: flex; align-items: center; gap: 7px; position: relative; color: #65695e; }
.sort-control select { appearance: none; background: transparent; border: 0; cursor: pointer; font-size: 11px; padding: 12px 16px 12px 0; }
.select-arrow { position: absolute; right: 0; pointer-events: none; }
.control-divider { width: 1px; height: 17px; background: var(--line); }
.details-toggle { display: flex; align-items: center; gap: 6px; background: transparent; color: var(--muted); padding: 10px 0; font-size: 11px; }
.details-toggle[aria-pressed="true"] { color: var(--accent); }
.layout-controls { display: flex; gap: 3px; margin-left: auto; padding: 3px; border: 1px solid var(--line); border-radius: 5px; }
.icon-button { width: 30px; height: 29px; display: grid; place-items: center; color: #95988e; border-radius: 3px; background: transparent; }
.icon-button.is-active { background: #e8ebe3; color: var(--accent); }
.icon-button:hover { color: var(--accent); }
#photo-list { list-style: none; margin: 0; padding: 0; position: relative; width: 100%; }
.photo-card { position: absolute; top: 0; left: 0; }
.photo-button { position: relative; width: 100%; height: 100%; padding: 0; background: transparent; display: block; text-align: left; border-radius: 3px; }
.photo-frame { position: relative; display: block; width: 100%; overflow: hidden; border-radius: 3px; background: #e9e9e2; }
.photo-frame::after { content: ''; position: absolute; inset: 0; border: 1px solid rgb(0 0 0 / 3%); border-radius: inherit; pointer-events: none; }
.photo-frame img { width: 100%; height: 100%; display: block; object-fit: cover; opacity: 0; transition: opacity .35s, transform .5s cubic-bezier(.2,.7,.2,1); }
.photo-frame img.is-loaded { opacity: 1; }
.photo-open { position: absolute; right: 12px; bottom: 12px; width: 29px; height: 29px; display: grid; place-items: center; background: rgb(248 247 244 / 90%); border: 1px solid rgb(255 255 255 / 40%); color: var(--ink); border-radius: 50%; opacity: 0; transform: translateY(5px); transition: opacity .2s, transform .2s; }
@media (hover: hover) { .photo-button:hover img { transform: scale(1.025); } .photo-button:hover .photo-open { opacity: 1; transform: translateY(0); } }
.photo-button:focus-visible .photo-open { opacity: 1; transform: none; }
.photo-caption { display: flex; justify-content: space-between; align-items: center; height: 32px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; letter-spacing: .25px; color: #686d62; }
.photo-number { color: #979a90; font-size: 9px; }
.photo-exif { display: flex; gap: 8px; overflow: hidden; white-space: nowrap; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 9px; height: 24px; padding-top: 1px; }
.photo-exif span + span::before { content: '·'; margin-right: 8px; color: #b1b2a8; }
.photo-error { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 12px; text-align: center; line-height: 1.8; padding: 10px; }
.gallery-message { text-align: center; padding: 80px 20px; color: var(--muted); font-size: 13px; line-height: 2; }
.retry-button { display: block; margin: 20px auto 0; background: var(--accent); color: white; padding: 10px 22px; border-radius: 4px; }
.collection-end { text-align: center; padding: 30px 0 40px; margin: 0; color: var(--muted); font-size: 11px; }
.back-to-top { position: fixed; right: 22px; bottom: 24px; display: grid; place-items: center; width: 40px; height: 40px; background: var(--paper); color: var(--accent); border: 1px solid var(--line); border-radius: 50%; box-shadow: 0 3px 15px rgb(0 0 0 / 5%); z-index: 5; }
@media (max-width: 720px) {
    .page-width { width: calc(100% - 32px); }
    .gallery-header { padding: 20px 0 18px; }
    h1 { font-size: 21px; }
    .back-to-top { right: 14px; bottom: 18px; }
}
@media (max-width: 430px) {
    .photo-caption { font-size: 9px; }
    .photo-number { font-size: 8px; }
    .photo-exif { gap: 4px; font-size: 8px; }
    .photo-exif span + span::before { margin-right: 4px; }
    .view-controls { gap: 10px; }
    .collection-toolbar { padding-inline: 12px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
