.feature-card {
  padding: 1.35rem;
  background: linear-gradient(180deg, rgba(255, 250, 241, 0.86), rgba(245, 232, 211, 0.7));
  border: 1px solid rgba(29, 43, 42, 0.08);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.feature-card h3 {
  margin: 0 0 0.55rem;
  font-family: "Fraunces", serif;
}

.feature-card p {
  margin: 0 0 1rem;
  color: var(--ink-soft);
  line-height: 1.65;
}

.feature-card .text-link {
  font-size: 0.94rem;
}

.detail-cover {
  width: 100%;
  max-width: 420px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(29, 43, 42, 0.09);
}

.breadcrumb-trail {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin-bottom: 1rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.breadcrumb-item a {
  color: var(--forest);
  font-weight: 700;
}

.breadcrumb-item span[aria-current="page"] {
  color: var(--umber);
  font-weight: 700;
}

.breadcrumb-separator {
  color: rgba(29, 43, 42, 0.35);
}

.detail-header-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr);
  gap: 1.2rem;
  align-items: center;
}

.profile-mosaic {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.profile-panel {
  padding: 1.1rem;
  border-radius: 24px;
  border: 1px solid rgba(29, 43, 42, 0.08);
  background: linear-gradient(180deg, rgba(255, 250, 241, 0.84), rgba(245, 232, 211, 0.68));
  box-shadow: var(--shadow);
}

.profile-panel > * + * {
  margin-top: 0.9rem;
}

.directory-panel {
  margin-bottom: 1.4rem;
  padding: 1rem 1.1rem;
  border-radius: 24px;
  border: 1px solid rgba(29, 43, 42, 0.08);
  background: rgba(255, 250, 241, 0.78);
  box-shadow: var(--shadow);
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.fact-card {
  padding: 0.9rem 1rem;
  border-radius: 18px;
  background: rgba(255, 252, 245, 0.9);
  border: 1px solid rgba(29, 43, 42, 0.08);
}

.fact-card span {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.fact-card strong {
  font-family: "Fraunces", serif;
  font-size: 1.04rem;
}

.inline-links-rich {
  margin-top: 0.85rem;
}

.inline-links-rich span,
.inline-links-rich a {
  background: rgba(138, 75, 45, 0.08);
  color: var(--umber);
}

.directory-links a {
  background: rgba(51, 93, 84, 0.12);
  color: var(--forest);
}

.card-link-shell {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.card-link-shell .text-link {
  margin-top: auto;
}

.card-location {
  margin: 0 0 0.5rem;
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.commune-deep-grid {
  align-items: start;
}

.empty-state {
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(29, 43, 42, 0.16);
  color: var(--ink-soft);
  background: rgba(255, 250, 241, 0.62);
}

.inline-links {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.inline-links a {
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: rgba(51, 93, 84, 0.1);
  color: var(--forest);
  font-weight: 700;
}

.inline-links span {
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: rgba(51, 93, 84, 0.1);
  color: var(--forest);
  font-weight: 700;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.filter-btn {
  padding: 0.45rem 1rem;
  border: 2px solid var(--forest, #335d54);
  border-radius: 999px;
  background: transparent;
  color: var(--forest, #335d54);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.filter-btn:hover {
  background: rgba(51, 93, 84, 0.08);
}

.filter-btn.is-active {
  background: var(--forest, #335d54);
  color: #fff;
}

.gallery-source {
  font-size: 0.8rem;
  color: var(--text-muted, #777);
  margin-top: 0.4rem;
  line-height: 1.4;
}

.gallery-card button {
  width: 100%;
  margin-top: 0.85rem;
}

.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 1rem;
  background: rgba(18, 25, 24, 0.82);
  z-index: 50;
}

.lightbox.is-open {
  display: grid;
}

.lightbox-dialog {
  width: min(960px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  overflow: auto;
  padding: 1rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 250, 241, 0.98);
}

.lightbox-dialog img {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.lightbox-caption {
  margin-top: 0.8rem;
  color: var(--ink-soft);
}

.lightbox-close {
  margin-top: 0.8rem;
}

@media (max-width: 720px) {
  .detail-header-grid {
    grid-template-columns: 1fr;
  }

  .profile-mosaic {
    grid-template-columns: 1fr;
  }

  .fact-grid {
    grid-template-columns: 1fr;
  }
}