:root {
  --bg: #f6f7f4;
  --surface: #ffffff;
  --surface-alt: #eef1ec;
  --ink: #16241e;
  --text: #2a3a32;
  --muted: #52635a;
  --line: #d5ded6;
  --line-strong: #bcc8be;
  --accent: #1d4d3c;
  --accent-hover: #14382b;
  --accent-soft: #e6efe9;
  --award-bg: #f6eedb;
  --award-border: #dfc99b;
  --award-ink: #684b10;
  --gutter: 32px;
  --control-size: 52px;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
  color-scheme: light;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

body:has(dialog[open]) {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: transparent;
  cursor: pointer;
}

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

button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

.wrap {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.skip-link {
  position: absolute;
  top: -80px;
  left: 24px;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  z-index: 100;
}

.skip-link:focus {
  top: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  min-height: 76px;
  padding-top: 12px;
  padding-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.header-top {
  display: contents;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: var(--control-size);
  flex-shrink: 0;
}

.brand-emblem {
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-title {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.brand-sub {
  font-size: 16px;
  font-weight: 500;
  color: var(--muted);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.site-nav a,
.header-external {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--control-size);
  padding: 0 14px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  transition: background-color 0.15s, color 0.15s;
}

.site-nav a:hover {
  background: var(--surface-alt);
  color: var(--ink);
}

.header-external {
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
  order: 2;
}

.header-external:hover {
  background: #d7e6dd;
  color: var(--accent-hover);
}

/* Language controls */
.header-tools,
.dialog-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.header-tools {
  order: 2;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-alt);
  flex-shrink: 0;
}

.language-switch button {
  min-height: 44px;
  padding: 0 10px;
  border-radius: 5px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  color: var(--muted);
}

.language-switch button[aria-pressed="true"] {
  color: #fff;
  background: var(--accent);
}

/* Page Intro */
.page-intro {
  position: relative;
  padding-top: 40px;
  padding-bottom: 28px;
}

.page-intro::after {
  content: "";
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 0;
  height: 1px;
  background: var(--line);
}

.page-intro h1 {
  font-size: clamp(28px, 3.2vw, 38px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  color: var(--ink);
}

.page-intro p {
  font-size: 18px;
  line-height: 1.65;
  color: var(--text);
  margin: 0;
  max-width: 780px;
}

/* Section Headers */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.section-header h2 {
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}

.result-count {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* Projects Section & Filter Bar */
.projects-section {
  padding-top: 36px;
  padding-bottom: 64px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 28px;
}

.period-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background: var(--surface-alt);
  padding: 4px;
  border-radius: 8px;
}

.period {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  transition: background-color 0.15s, color 0.15s;
}

.period:hover:not(.active) {
  background: rgba(255, 255, 255, 0.65);
  color: var(--ink);
}

.period.active {
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
}

.filter-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 340px;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--control-size);
  padding: 0 14px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  min-width: 0;
}

.search-box:focus-within {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 2px rgba(29, 77, 60, 0.15);
}

.search-box svg {
  flex-shrink: 0;
}

.search-box input {
  width: 100%;
  min-width: 0;
  height: calc(var(--control-size) - 2px);
  padding: 0;
  line-height: 1.5;
  border: 0;
  background: transparent;
  font-size: 16px;
  color: var(--ink);
  outline: none;
}

.search-box input::placeholder {
  color: var(--muted);
}

.select-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10em), 1fr));
  gap: 12px;
  width: 340px;
  font-size: 16px;
}

.select-group select {
  width: 100%;
  min-width: 0;
  min-height: var(--control-size);
  line-height: 1.5;
  padding: 0 34px 0 14px;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%232a3a32' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  appearance: none;
  cursor: pointer;
}

.select-group select:hover {
  border-color: var(--accent);
}

/* Project Cards Grid */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 24px;
}

.project-card {
  min-width: 0;
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 5;
  row-gap: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.project-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 6px 20px rgba(22, 36, 30, 0.06);
}

.project-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--card-bg, #e6eadf);
  padding: 0;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 18px;
  filter: drop-shadow(0 1px 3px rgba(16, 28, 22, 0.16));
  transition: transform 0.3s ease;
}

.project-image.cover-photo img {
  object-fit: cover;
  padding: 0;
  filter: none;
}

.project-image:hover img {
  transform: scale(1.03);
}

.project-body {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: 2 / span 4;
  row-gap: 0;
  min-width: 0;
  padding: 20px;
}

.project-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  align-self: start;
  gap: 8px;
  margin-bottom: 12px;
}

.project-year {
  grid-column: 1;
  grid-row: 1;
  font-size: 17px;
  line-height: 28px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

.project-category {
  grid-column: 1 / -1;
  grid-row: 2;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 500;
  color: var(--muted);
}

.award-badge {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  background: var(--award-bg);
  color: var(--award-ink);
  border: 1px solid var(--award-border);
  padding: 3px 9px;
  border-radius: 5px;
}

.award-badge.award-pending {
  background: var(--surface-alt);
  color: var(--muted);
  border-color: var(--line);
}

.project-card h3 {
  font-size: 21px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 12px;
  overflow-wrap: anywhere;
}

.project-title {
  padding: 0;
  text-align: left;
  font: inherit;
  color: var(--ink);
}

.project-title:hover {
  color: var(--accent);
}

.project-summary {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  margin: 0 0 20px;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.card-doc-count {
  font-size: 16px;
  line-height: 1.5;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.card-action {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  transition: background-color 0.15s, color 0.15s;
}

.card-action:hover {
  background: var(--accent);
  color: #ffffff;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 56px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.empty-state p {
  margin: 0 0 16px;
  font-size: 17px;
  color: var(--muted);
}

.empty-state button {
  min-height: 44px;
  padding: 0 20px;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-size: 16px;
  font-weight: 500;
}

.noscript-note {
  margin-top: 20px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 16px;
}

.noscript-note a {
  color: var(--accent);
  text-decoration: underline;
}

/* Early Photos Section */
.memories-section {
  background: var(--surface-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 52px 0 56px;
}

.memory-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.memory-card {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 2;
  row-gap: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.memory-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 6px 20px rgba(22, 36, 30, 0.06);
}

.memory-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.memory-caption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 12px 20px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  border-top: 1px solid var(--line);
}

.caption-link {
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
}

/* Downloads Section */
.resources-section {
  padding-top: 52px;
  padding-bottom: 60px;
}

.resource-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.resource-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color 0.15s, background-color 0.15s;
}

.resource-item:hover {
  border-color: var(--accent);
  background: #fbfcfa;
}

.resource-info h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--ink);
}

.resource-info p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

.resource-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 16px;
  font-weight: 600;
  flex-shrink: 0;
  transition: background-color 0.15s, color 0.15s;
}

.resource-item:hover .resource-action {
  background: var(--accent);
  color: #ffffff;
}

.source-note {
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
  margin: 24px 0 0;
  max-width: 860px;
}

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 24px 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-brand {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 24px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  border-radius: 6px;
  font-size: 16px;
  color: var(--muted);
}

.footer-links a:hover {
  background: var(--surface-alt);
  color: var(--ink);
}

/* Project Detail Dialog */
dialog {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  border-radius: 12px;
  width: 880px;
  max-width: calc(100vw - 32px);
  max-height: 88vh;
  padding: 0;
  box-shadow: 0 24px 64px rgba(16, 28, 22, 0.24);
  overscroll-behavior: contain;
}

dialog::backdrop {
  background: rgba(18, 30, 24, 0.55);
  backdrop-filter: blur(3px);
}

.dialog-top {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--surface);
  padding: 12px 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

#detail-kicker {
  font-size: 16px;
  font-weight: 600;
  color: var(--muted);
}

.close-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--control-size);
  padding: 0 14px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  background: var(--surface-alt);
}

.close-button:hover {
  background: var(--line);
  color: var(--ink);
}

.detail-body {
  padding: 28px 24px;
}

.detail-hero {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
  align-items: start;
  margin-bottom: 24px;
}

.detail-image {
  background: var(--card-bg, #e5e9db);
  aspect-ratio: 16 / 11;
  border-radius: 8px;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.detail-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 18px;
  filter: drop-shadow(0 1px 3px rgba(16, 28, 22, 0.16));
}

.detail-image.cover-photo img {
  object-fit: cover;
  padding: 0;
  filter: none;
}

.detail-summary h2 {
  font-size: clamp(24px, 2.8vw, 30px);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 12px;
  overflow-wrap: anywhere;
}

.detail-description {
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
  margin: 0 0 20px;
}

.detail-actions {
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: 1fr;
  gap: 12px;
}

.detail-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--control-size);
  line-height: 1.5;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  transition: background-color 0.15s, border-color 0.15s;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--line-strong);
}

.btn-secondary:hover {
  background: var(--surface-alt);
  border-color: var(--accent);
}

.detail-section {
  border-top: 1px solid var(--line);
  padding: 20px 0;
}

.detail-section h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--ink);
}

.awards-list,
.document-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.awards-list a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  background: var(--award-bg);
  color: var(--award-ink);
  border: 1px solid var(--award-border);
}

.awards-list a:hover {
  background: #efe2c4;
}

.document-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
  background: var(--surface-alt);
  color: var(--ink);
  border: 1px solid var(--line);
}

.document-links a:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

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

.archive-links a {
  min-width: 0;
  min-height: 44px;
  font-size: 16px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.detail-archive-note {
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
  margin: 14px 0 0;
}

.detail-sources {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  font-size: 15px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.detail-sources summary {
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  min-height: 40px;
  display: flex;
  align-items: center;
}

.detail-sources ul {
  margin: 8px 0 0;
  padding-left: 20px;
  color: var(--text);
}

.detail-sources li {
  margin-bottom: 6px;
}

.detail-sources a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.detail-gaps {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.dialog-bottom {
  position: sticky;
  bottom: 0;
  background: var(--surface);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding: 12px 24px;
}

.dialog-bottom button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  min-height: var(--control-size);
  padding: 0 16px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  background: var(--surface-alt);
  color: var(--ink);
}

.dialog-bottom button:hover:not(:disabled) {
  background: var(--accent-soft);
  color: var(--accent);
}

.dialog-bottom button:disabled {
  opacity: 0.45;
  cursor: default;
}

/* Responsive Breakpoints */
@media (max-width: 1060px) {
  .brand-text {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .brand-title {
    font-size: 19px;
    line-height: 1.2;
  }

  .brand-sub {
    font-size: 14px;
    line-height: 1.2;
  }
}

@media (max-width: 1024px) {
  :root {
    --gutter: 24px;
  }

  .site-nav {
    gap: 4px;
  }

  .site-nav a,
  .header-external {
    padding: 0 10px;
  }

  .filter-controls {
    width: 100%;
  }
}

@media (max-width: 980px) {
  .header-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 8px;
  }

  .site-nav {
    width: 100%;
    margin-left: 0;
    justify-content: center;
  }

  .site-nav a {
    flex: 1;
  }
}

@media (max-width: 680px) {
  body {
    font-size: 16px;
  }

  :root {
    --gutter: 16px;
  }

  .header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .header-top {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: space-between;
  }

  .header-tools .header-external {
    display: none;
  }

  .brand-text {
    flex-direction: column;
    gap: 1px;
  }

  .brand-title {
    font-size: 19px;
    line-height: 1.2;
  }

  .brand-sub {
    font-size: 14px;
    line-height: 1.2;
  }

  .site-nav {
    width: 100%;
    margin-left: 0;
    gap: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--line);
  }

  .site-nav a {
    flex: 1;
    padding: 0 6px;
    font-size: 16px;
    background: var(--bg);
  }

  .page-intro {
    padding-top: 28px;
    padding-bottom: 24px;
  }

  .page-intro p {
    font-size: 16px;
  }

  .projects-section {
    padding-top: 28px;
    padding-bottom: 48px;
  }

  .filter-bar {
    padding: 12px;
    gap: 12px;
  }

  .period-filters {
    width: 100%;
  }

  .period {
    flex: 1 1 auto;
    padding: 0 8px;
    font-size: 16px;
    text-align: center;
  }

  .filter-controls {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .search-box {
    min-width: 0;
    width: 100%;
  }

  .select-group {
    width: 100%;
  }

  .project-grid {
    gap: 20px;
  }

  .memories-section {
    padding: 40px 0;
  }

  .memory-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .resources-section {
    padding-top: 40px;
    padding-bottom: 48px;
  }

  .resource-item {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    gap: 16px;
  }

  .resource-action {
    width: 100%;
  }

  dialog {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    max-height: 92dvh;
  }

  .dialog-top {
    padding: 10px 16px;
    flex-wrap: wrap;
    gap: 8px;
  }

  #detail-kicker {
    flex-basis: 100%;
  }

  .dialog-tools {
    width: 100%;
    justify-content: space-between;
  }

  .detail-body {
    padding: 20px 16px;
  }

  .detail-hero {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .detail-image {
    aspect-ratio: 16 / 10;
    max-height: 220px;
  }

  .detail-description {
    font-size: 16px;
  }

  .archive-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .dialog-bottom {
    padding: 10px 16px;
  }

  .dialog-bottom button {
    min-width: 0;
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation: none !important;
    transition: none !important;
  }
}
