/* Cavallaro Place – interactive family tree */
.cav-tree { margin: 10px 0 20px; }
.cav-search { position: relative; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; padding: 10px 12px; background: rgba(255, 248, 230, .55); border: 1px solid rgba(90, 50, 20, .3); border-radius: 6px; }
.cav-search label { font-weight: bold; }
.cav-search input { flex: 1; min-width: 220px; padding: 7px 9px; font: inherit; border: 1px solid #8a5a2b; border-radius: 4px; background: #fffaf0; }
.cav-search .cav-count { font-size: 85%; opacity: .75; }
.cav-results { position: absolute; z-index: 20; left: 12px; right: 12px; top: 100%; margin: 2px 0 0 !important; padding: 4px 0; list-style: none; background: #fffaf0; border: 1px solid #8a5a2b; border-radius: 4px; box-shadow: 0 6px 14px rgba(0, 0, 0, .25); max-height: 320px; overflow-y: auto; }
.cav-results li { list-style: none !important; margin: 0; }
.cav-results button { display: block; width: 100%; text-align: left; padding: 6px 10px; border: 0; background: none; font: inherit; cursor: pointer; color: #3b1f0e; }
.cav-results button:hover, .cav-results button:focus { background: #f1dcb4; }
.cav-results .cav-none { padding: 6px 10px; opacity: .7; }

.cav-chart { display: flex; flex-direction: column; gap: 6px; }
.cav-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; position: relative; }
.cav-row + .cav-row::before { content: ""; position: absolute; left: 50%; top: -6px; height: 8px; border-left: 2px solid rgba(90, 50, 20, .35); }
.cav-row-label { width: 110px; flex: none; font-size: 80%; text-transform: uppercase; letter-spacing: .5px; opacity: .7; text-align: right; }
.cav-row-cards { flex: 1; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }

.cav-card { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 120px; max-width: 170px; padding: 7px 10px; background: #fbf0d8; border: 1px solid #a9774a; border-top: 4px solid #a9774a; border-radius: 6px; box-shadow: 0 2px 3px rgba(0, 0, 0, .18); cursor: pointer; font: inherit; color: #3b1f0e; text-align: center; line-height: 1.25; }
.cav-card:hover, .cav-card:focus { background: #fff7e6; box-shadow: 0 3px 8px rgba(0, 0, 0, .3); outline: none; }
.cav-card.cav-m { border-top-color: #4d6b8a; }
.cav-card.cav-f { border-top-color: #9c4b4b; }
.cav-card.cav-empty { opacity: .45; cursor: default; box-shadow: none; border-style: dashed; }
.cav-card-name { font-weight: bold; font-size: 14px; }
.cav-card-years { font-size: 12px; opacity: .8; margin-top: 2px; }
.cav-card-place { font-size: 11px; opacity: .75; margin-top: 3px; }
.cav-card.cav-focus { min-width: 190px; max-width: 240px; padding: 10px 14px; background: #fff3d6; border-width: 2px; border-top-width: 6px; box-shadow: 0 3px 10px rgba(0, 0, 0, .3); }
.cav-card.cav-focus .cav-card-name { font-size: 17px; }
.cav-card.cav-spouse { border-style: solid; }
.cav-card.cav-small { min-width: 100px; padding: 5px 8px; }
.cav-card.cav-small .cav-card-name { font-size: 12.5px; }

.cav-details { margin-top: 14px; padding: 12px 16px; background: rgba(255, 248, 230, .6); border: 1px solid rgba(90, 50, 20, .3); border-radius: 6px; }
.cav-details h3 { margin: 0 0 6px !important; }
.cav-details ul { margin: 0 0 8px 18px !important; }
.cav-details li { list-style: disc !important; margin: 2px 0; }
.cav-details .cav-private { list-style: none !important; font-style: italic; opacity: .8; }
.cav-links a { margin-right: 16px; font-weight: bold; }

@media (max-width: 700px) {
	.cav-row { flex-direction: column; align-items: stretch; }
	.cav-row-label { width: auto; text-align: center; }
	.cav-row + .cav-row::before { display: none; }
}

.cav-gp .cav-row-cards, .cav-par .cav-row-cards { flex-wrap: nowrap; }
.cav-gp .cav-card { min-width: 0; flex: 0 1 140px; padding: 6px 7px; }
.cav-gp .cav-card-name { font-size: 12.5px; }
.cav-gp .cav-row-cards > .cav-card:nth-child(2) { margin-right: 18px; }

/* mobile gp */
@media (max-width: 700px) {
	.cav-gp .cav-row-cards, .cav-par .cav-row-cards { flex-wrap: wrap; }
	.cav-gp .cav-card { flex: 0 1 45%; }
	.cav-gp .cav-row-cards > .cav-card:nth-child(2) { margin-right: 0; }
	.cav-card { min-width: 0; flex: 0 1 45%; }
	.cav-card.cav-focus { flex: 0 1 80%; max-width: none; }
	.cav-search label { width: 100%; }
	.cav-search input { min-width: 0; }
}

/* photos */
.cav-card-photo { width: 54px; height: 54px; object-fit: cover; object-position: center 25%; border-radius: 50%; border: 2px solid #fff8e8; box-shadow: 0 1px 3px rgba(0,0,0,.35); margin-bottom: 5px; background: #e9d6b0; }
.cav-card.cav-focus .cav-card-photo { width: 84px; height: 84px; }
.cav-card.cav-small .cav-card-photo, .cav-gp .cav-card-photo { width: 40px; height: 40px; }
.cav-details-photo { float: right; margin: 0 0 10px 14px; }
.cav-details-photo img { display: block; max-width: 220px; max-height: 180px; border: 4px solid #fffaf0; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.cav-details::after { content: ""; display: block; clear: both; }
@media (max-width: 600px) { .cav-details-photo { float: none; margin: 0 0 10px; } .cav-details-photo img { max-width: 100%; } }
