html { color-scheme: light; }
:root {
  --ink: #202523;
  --muted: #65716b;
  --paper: #fffdf8;
  --sand: #eef1ea;
  --line: #ddd4c5;
  --green: #1f7668;
  --blue: #376b8d;
  --gold: #c48d2c;
  --coral: #b45d4a;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background:
    linear-gradient(180deg, #f6f8f5 0%, #e8eee9 54%, #eef0e8 100%);
  color: var(--ink);
}
a { color: var(--green); }
.site-index, .photo-page { max-width: 1180px; margin: 0 auto; padding: 24px 20px 56px; }
.site-hero {
  min-height: 300px;
  display: grid;
  align-items: end;
  padding: 34px;
  border-radius: 8px;
  color: #fff8e6;
  background:
    linear-gradient(135deg, rgba(12, 18, 16, .96), rgba(42, 65, 59, .86)),
    linear-gradient(90deg, rgba(196, 141, 44, .26), rgba(55, 107, 141, .18)),
    #101614;
  overflow: hidden;
}
.site-hero h1, .photo-page h1 { letter-spacing: 0; margin: 0; }
.site-hero h1 { font-size: 68px; line-height: .95; max-width: 850px; }
.photo-page h1 { font-size: 42px; line-height: 1.04; }
.site-hero p { max-width: 760px; font-size: 18px; line-height: 1.55; color: #dce4dc; }
.summary { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 8px; }
.summary span, .chip {
  background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  padding: 8px 12px;
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
}
.toolbar input {
  min-width: min(100%, 360px);
  flex: 1;
  border: 1px solid #d2cabc;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 16px;
  background: var(--paper);
}
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); gap: 18px; }
.tile {
  --rx: 0deg;
  --ry: 0deg;
  --lift: 0px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 12px 34px rgba(42, 34, 18, .08);
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry)) translateY(var(--lift));
  transform-style: preserve-3d;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.tile:hover { --lift: -2px; border-color: #c9bca8; box-shadow: 0 18px 42px rgba(42, 34, 18, .14); }
.tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: #111; }
.tile div { padding: 13px; }
.tile strong { display: block; font-size: 16px; margin-bottom: 5px; }
.tile span { color: var(--muted); font-size: 13px; line-height: 1.35; }
.tile .badges { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.tile .badges b { font-size: 11px; color: #42514a; background: #ede7da; border-radius: 999px; padding: 4px 7px; }
.top-nav, .page-nav { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 8px 0 18px; color: #6b746f; }
.back, .nav-link { color: var(--green); text-decoration: none; font-weight: 700; }
.detail-hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, .8fr); gap: 18px; align-items: stretch; }
.image-stage, .story-panel {
  --rx: 0deg;
  --ry: 0deg;
  --lift: 0px;
  transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry)) translateY(var(--lift));
  transform-style: preserve-3d;
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.image-stage, .panel, .story-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 45px rgba(42, 34, 18, .08);
}
.image-stage { display: grid; place-items: center; min-height: 52vh; padding: 12px; background: #101614; }
.image-stage:hover, .story-panel:hover { --lift: -2px; box-shadow: 0 20px 48px rgba(42, 34, 18, .14); }
.hero { width: 100%; max-height: 82vh; object-fit: contain; border-radius: 6px; }
.story-panel { padding: 24px; background: linear-gradient(180deg, #fffdf8, #f5efe4); }
.eyebrow { margin: 0 0 10px; text-transform: uppercase; letter-spacing: 0; font-size: 12px; color: #69746f; font-weight: 800; }
.caption { font-size: 19px; line-height: 1.55; color: #38403c; }
.meta-line { color: #59645f; line-height: 1.45; margin-top: 16px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid #cfc5b2;
  padding: 11px 13px;
  text-decoration: none;
  font-weight: 800;
  background: #fffaf0;
  color: #25302b;
}
.button.primary { background: var(--green); color: white; border-color: var(--green); }
.button.disabled { opacity: .55; cursor: default; }
.hint { font-size: 13px; color: #727c76; line-height: 1.4; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.panel { padding: 22px; margin-top: 18px; }
.panel h2 { margin-top: 0; }
.facts div { display: grid; grid-template-columns: 130px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid #eee6d8; }
.facts dt { color: var(--muted); font-weight: 700; }
.facts dd { margin: 0; }
.location-panel {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(260px, 1.1fr);
  gap: 18px;
  align-items: stretch;
}
.map-preview {
  position: relative;
  min-height: 220px;
  border-radius: 8px;
  overflow: hidden;
  color: #fbf7ef;
  text-decoration: none;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  background:
    linear-gradient(135deg, rgba(31, 118, 104, .94), rgba(55, 107, 141, .92)),
    #234f57;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.map-preview:hover { box-shadow: 0 18px 42px rgba(42, 34, 18, .16); }
.map-preview.is-disabled { background: linear-gradient(135deg, #72695d, #454a48); }
.map-grid {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,.13) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,.13) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: .55;
}
.map-pin {
  position: absolute;
  width: 22px;
  height: 22px;
  left: 52%;
  top: 42%;
  border-radius: 50% 50% 50% 0;
  background: #f2b84b;
  transform: rotate(-45deg);
  box-shadow: 0 8px 18px rgba(0,0,0,.26);
}
.map-pin::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  left: 7px;
  top: 7px;
  border-radius: 50%;
  background: #25302b;
}
.map-preview strong, .map-preview small { position: relative; z-index: 1; text-shadow: 0 1px 8px rgba(0,0,0,.28); }
.map-preview strong { font-size: 20px; }
.map-preview small { margin-top: 4px; color: #efe9d8; }
table { width: 100%; border-collapse: collapse; overflow: hidden; }
th, td { text-align: left; border-bottom: 1px solid #eee6d8; padding: 10px 0; vertical-align: top; }
th { width: 180px; color: var(--muted); }
.file-list { padding-left: 18px; }
li { margin: 8px 0; }
@media (max-width: 820px) {
  .site-index, .photo-page { padding: 14px 12px 40px; }
  .site-hero { padding: 24px; min-height: 250px; }
  .site-hero h1 { font-size: 42px; }
  .photo-page h1 { font-size: 34px; }
  .detail-hero, .two-col, .location-panel { grid-template-columns: 1fr; }
  .image-stage { min-height: 34vh; }
}
@media (prefers-reduced-motion: reduce) {
  .tile, .image-stage, .story-panel, .map-preview { transition: none; transform: none; }
}
