
:root {
  --bg: #f7f3ee;
  --paper: #fffdfa;
  --ink: #1d3357;
  --muted: #5c6a7d;
  --accent: #9d3a27;
  --accent-soft: #c95a42;
  --line: #d7cfc5;
  --shadow: 0 8px 24px rgba(18, 34, 52, 0.08);
  --menu-width: 220px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  background: linear-gradient(180deg, #f3eee7 0%, var(--bg) 180px, #faf8f4 100%);
  color: #2d2d2d;
  line-height: 1.65;
}
a { color: var(--ink); }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
.wrapper { max-width: 1200px; margin: 0 auto; padding: 0 18px 40px; }
.site-header {
  padding: 18px 0 8px;
  border-bottom: 1px solid rgba(29,51,87,0.08);
}
.brand-row {
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand-mark {
  width: clamp(240px, 34vw, 420px);
  flex: 0 0 auto;
  opacity: 0.98;
}
.brand-text { flex: 1 1 auto; }
.brand-title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1;
  color: var(--ink);
  letter-spacing: 0.04em;
}
.brand-tag {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}
.hero-strip {
  margin-top: 10px;
  display: flex;
  justify-content: center;
}
.hero-strip img {
  max-width: 420px;
  opacity: 0.9;
}
.layout {
  display: grid;
  grid-template-columns: var(--menu-width) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  margin-top: 20px;
}
.sidebar {
  position: sticky;
  top: 16px;
}
.menu-box, .side-box, .content-card, .intro-panel, .gallery-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.menu-box {
  padding: 14px;
}
.menu-title {
  margin: 0 0 12px;
  font-size: 0.95rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.site-menu a {
  display: block;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(180deg, #274879 0%, #1c3559 100%);
  margin-bottom: 8px;
  padding: 11px 14px;
  border: 1px solid #132742;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 2px 4px rgba(0,0,0,.08);
  font-size: 1rem;
  letter-spacing: 0.02em;
}
.site-menu a:hover, .site-menu a.current {
  background: linear-gradient(180deg, #9d3a27 0%, #7e2d1e 100%);
}
.side-box {
  margin-top: 16px;
  padding: 14px;
  font-size: 0.95rem;
}
.side-box h3 { margin: 0 0 8px; color: var(--ink); font-size: 1.05rem; }
.side-box p:last-child { margin-bottom: 0; }
.content h1, .content h2, .content h3 {
  color: var(--ink);
  line-height: 1.2;
}
.content h1 { margin-top: 0; font-size: clamp(1.9rem, 3vw, 2.6rem); }
.content h2 { font-size: 1.55rem; margin-top: 28px; padding-top: 2px; border-top: 1px solid #e9e1d8; }
.content h3 { font-size: 1.18rem; margin-bottom: 6px; }
.content-card {
  padding: 26px 28px;
}
.lead {
  font-size: 1.12rem;
  color: #39465a;
}
.intro-grid, .two-col, .cards, .gallery-grid, .timeline {
  display: grid;
  gap: 18px;
}
.intro-grid { grid-template-columns: 1.2fr .8fr; align-items: center; }
.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cards { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 18px; }
.card, .mini-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #fffdfa, #fbf8f3);
  padding: 16px;
}
.card h3, .mini-card h3 { margin-top: 0; }
.note { font-size: .95rem; color: var(--muted); }
.callout {
  border-left: 5px solid var(--accent);
  background: #fbf3f0;
  padding: 14px 16px;
  margin: 20px 0;
}
.hero-photo {
  min-height: 300px;
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  background: #dbe3ec;
}
.hero-photo img {
  width: 100%;
  height: 100%;
  min-height: 300px;
  object-fit: cover;
  display: block;
}
.hero-photo-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 48px 18px 16px;
  background: linear-gradient(180deg, rgba(10,18,29,0) 0%, rgba(10,18,29,0.72) 100%);
}
.hero-photo-title {
  margin: 0;
  color: rgba(255,255,255,.96);
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  line-height: 1.25;
}
.timeline {
  grid-template-columns: 1fr;
  position: relative;
  margin-top: 12px;
}
.timeline-item {
  border-left: 4px solid var(--accent-soft);
  padding: 2px 0 14px 16px;
  margin-left: 8px;
}
.timeline-item strong { color: var(--ink); }
.gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gallery-item {
  border: 1px solid var(--line);
  background: #fff;
  overflow: hidden;
}
.gallery-placeholder {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #efe5d9, #e8eef7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  text-align: center;
  padding: 12px;
  font-size: 1.02rem;
}
.gallery-item figcaption { padding: 10px 12px 14px; font-size: .95rem; }
.footer {
  margin-top: 30px;
  padding: 18px 0 40px;
  border-top: 1px solid rgba(29,51,87,0.08);
  color: var(--muted);
  font-size: 0.95rem;
}
.source-list li { margin-bottom: 10px; }
.edit-hint {
  font-size: .92rem;
  color: var(--muted);
  background: #f8f4ef;
  border: 1px dashed #cdbfb1;
  padding: 10px 12px;
}
@media (max-width: 980px) {
  .layout, .intro-grid, .two-col, .cards, .gallery-grid, .gallery-overview { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .brand-row { align-items: flex-start; }
}
@media (max-width: 640px) {
  .wrapper { padding-left: 12px; padding-right: 12px; }
  .brand-row { align-items: flex-start; gap: 14px; }
  .brand-mark { width: min(56vw, 260px); }
  .content-card { padding: 20px 18px; }
}


.gallery-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0 30px;
}
.gallery-overview-card {
  display: block;
  text-decoration: none;
  background: linear-gradient(180deg, #fffdfa, #f8f3ec);
  border: 1px solid var(--line);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.gallery-overview-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.gallery-overview-title {
  display: block;
  font-size: 1.18rem;
  font-weight: bold;
  color: var(--ink);
}
.gallery-overview-meta {
  display: block;
  margin-top: 4px;
  color: var(--accent);
  font-size: 0.94rem;
}
.gallery-sections {
  display: grid;
  gap: 28px;
}
.gallery-section {
  border-top: 1px solid #e7ddd2;
  padding-top: 6px;
}
.gallery-section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.gallery-folder-name {
  color: var(--muted);
  font-size: 0.92rem;
}
.gallery-section-text {
  margin-top: 8px;
  color: #39465a;
}
.gallery-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #f2ede6;
}
.gallery-comment {
  display: inline;
}
.gallery-empty {
  border: 1px dashed #cdbfb1;
  background: #f8f4ef;
  padding: 16px;
  color: var(--muted);
}



.gallery-overview-preview {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  margin: -16px -18px 14px;
  background: #f2ede6;
  border-bottom: 1px solid var(--line);
}
.gallery-overview-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-overview-preview-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.gallery-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0 30px;
}

.gallery-overview-card {
  display: block;
  width: 100%;
  text-align: left;
  text-decoration: none;
  background: linear-gradient(180deg, #fffdfa, #f8f3ec);
  border: 1px solid var(--line);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.gallery-overview-card:hover,
.gallery-overview-card:focus {
  transform: translateY(-2px);
}

.gallery-overview-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.gallery-overview-title {
  display: block;
  font-size: 1.18rem;
  font-weight: bold;
  color: var(--ink);
}

.gallery-overview-meta {
  display: block;
  margin-top: 4px;
  color: var(--accent);
  font-size: 0.94rem;
}

.gallery-overview-preview {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  margin: -16px -18px 14px;
  background: #f2ede6;
  border-bottom: 1px solid var(--line);
}

.gallery-overview-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-overview-preview-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.gallery-view {
  margin-top: 8px;
}

.gallery-view-hidden {
  display: none;
}

.gallery-view-top {
  margin-bottom: 18px;
}

.gallery-back-button {
  border: 1px solid var(--line);
  background: #f8f3ec;
  color: var(--ink);
  padding: 10px 14px;
  font: inherit;
  cursor: pointer;
}

.gallery-view-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid #e7ddd2;
  padding-top: 14px;
}

.gallery-view-meta {
  margin: 6px 0 0;
  color: var(--accent);
}

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

.gallery-thumb {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  background: #fffdfa;
  box-shadow: var(--shadow);
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.gallery-thumb-image-wrap {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f2ede6;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-thumb-text {
  display: block;
  padding: 10px 12px 14px;
  font-size: 0.95rem;
}

.gallery-thumb-caption {
  display: inline;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox-hidden {
  display: none;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
}

.lightbox-dialog {
  position: relative;
  z-index: 1;
  width: min(1200px, 100%);
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 64px;
  align-items: center;
  gap: 12px;
}

.lightbox-figure {
  margin: 0;
  background: #111;
  padding: 18px 18px 12px;
}

.lightbox-figure img {
  display: block;
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  margin: 0 auto;
}

.lightbox-caption {
  color: #fff;
  margin-top: 12px;
  text-align: center;
}

.lightbox-close,
.lightbox-nav {
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  font: inherit;
}

.lightbox-close {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 42px;
  height: 42px;
  font-size: 1.8rem;
  line-height: 1;
}

.lightbox-nav {
  width: 56px;
  height: 56px;
  font-size: 2rem;
}

body.lightbox-open {
  overflow: hidden;
}

@media (max-width: 900px) {
  .gallery-view-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lightbox-dialog {
    grid-template-columns: 48px minmax(0, 1fr) 48px;
  }

  .lightbox-nav {
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 640px) {
  .gallery-overview,
  .gallery-view-grid {
    grid-template-columns: 1fr;
  }

  .lightbox {
    padding: 10px;
  }

  .lightbox-dialog {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .lightbox-prev,
  .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
  }

  .lightbox-prev {
    left: 8px;
  }

  .lightbox-next {
    right: 8px;
  }
}
