/* ── O-8 Hub ── */
.o8-intro {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 28px;
  max-width: 720px;
}

/* Widen the card area (this page only) so 16px captions stay on one line */
.page-body-inner {
  max-width: 1180px;
}

.o8-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.family-tile {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s;
  text-decoration: none;
  color: inherit;
}

.family-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.family-tile-photo {
  height: 140px;
  background: linear-gradient(135deg, var(--color-brown-600), var(--accent-forest));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  overflow: hidden;
  position: relative;
  padding: 14px;
}

.family-tile-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
  transition: transform 0.3s ease;
}

.family-tile:hover .family-tile-photo img {
  transform: scale(1.04);
}

/* In-memoriam tiles keep the "In memoriam" text label but are no longer
   dimmed/desaturated — photos display in full color like the others. */

.family-tile-photo .photo-fallback {
  font-size: 38px;
  position: absolute;
}

.family-tile-photo img ~ .photo-fallback {
  display: none;
}

.family-tile-info {
  padding: 13px 14px;
  border-top: 3px solid var(--accent-primary);
}

.family-tile.in-memoriam .family-tile-info {
  border-color: #aaa;
}

.family-tile-info h3 {
  font-family: var(--font-display);
  font-size: 14.5px;
  color: var(--surface-mid);
  margin-bottom: 3px;
}

.family-tile-info .family-role {
  font-size: 16px;
  color: var(--text-muted);
  font-style: italic;
}

.o8-note {
  margin-top: 18px;
  font-size: 12.5px;
  color: var(--text-muted);
  font-style: italic;
}

/* ── Individual Family Page ── */
.family-hero-inner {
  display: flex;
  align-items: center;
  gap: 22px;
}

.family-hero-avatar {
  font-size: 52px;
}

.back-link {
  color: var(--accent-primary);
  font-style: normal;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.85;
  transition: opacity var(--transition-fast);
}

.back-link:hover {
  opacity: 1;
}

.access-block {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.access-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
}

.access-header.level-a { background: var(--color-forest-900); }
.access-header.level-b { background: var(--surface-mid); }
.access-header.level-c { background: #3a3030; }

.access-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: var(--surface-dark);
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.access-header h3 {
  font-family: var(--font-display);
  font-size: 15.5px;
  color: var(--text-on-dark);
  font-weight: 600;
}

.access-header .access-icon {
  margin-left: auto;
  font-size: 17px;
}

.access-body {
  padding: 6px 22px 18px;
}

.content-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--surface-border);
  font-size: 13.5px;
  color: #444;
}

.content-row:last-child {
  border-bottom: none;
}

.content-row .row-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.access-locked {
  margin-top: 12px;
  background: var(--surface-page);
  border-radius: 6px;
  padding: 14px 18px;
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
  font-size: 13px;
}

.locked-row {
  opacity: 0.35;
  cursor: not-allowed;
}

@media (max-width: 720px) {
  .o8-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Site-admin cameo editing on O-8 cards (page-photo-editor.js) ── */
.cameo-edit { display: none; }
body.is-site-admin .section-photo-zone .cameo-edit {
  display: flex;
  gap: 6px;
  position: absolute;
  bottom: 6px;
  right: 6px;
  z-index: 3;
}
body.is-site-admin .section-photo-zone .cameo-edit button {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  padding: 4px 8px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.92);
  color: var(--surface-mid);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.35);
}
body.is-site-admin .section-photo-zone .cameo-edit .btn-photo-remove {
  background: rgba(198, 40, 40, 0.92);
  color: #fff;
}
/* After a delete, show the emoji fallback again */
.family-tile-photo.no-photo img { display: none; }
.family-tile-photo.no-photo .photo-fallback { display: block !important; }
