.cb-brand { color: #203d38; font-size: 1.45rem; font-weight: 700; }
.cb-header-actions { display: flex; align-items: center; gap: 1rem; padding: 0 1rem; min-height: 56px; }
.cb-header-actions form { margin: 0; }
.cb-intro { font-size: 16px; }
.body-sign .cb-brand { float: none; display: inline-block; margin-bottom: 1rem; font-size: 24px; }
@media (max-width: 767px) {
    .cb-header-actions { min-height: 44px; }
}

.cb-album-sources { columns: 2; list-style: none; margin: 0; padding: 0; }
.cb-album-sources li { break-inside: avoid; padding: 2px 0; }
.cb-album-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 14px; list-style: none; padding: 0; }
.cb-album-photos figure { margin: 0; }
.cb-album-photos img { width: 100%; height: 120px; object-fit: contain; background: #f4f4f4; }
.cb-album-photos figcaption { padding-top: 4px; overflow-wrap: anywhere; }
@media (max-width: 600px) { .cb-album-sources { columns: 1; } }

.cb-album-photos > li > a { display: block; }
.cb-photo-record-image { margin: 0; }
.cb-photo-record-image img { display: block; max-width: 100%; height: auto; }

.cb-tree-alphabet { display: flex; flex-wrap: wrap; gap: 4px; }

.cb-family-diagram { display: grid; grid-template-columns: minmax(0, 1fr) minmax(100px, 0.55fr) minmax(0, 1fr); gap: 14px; align-items: end; }
.cb-family-branch:first-child { grid-column: 1; grid-row: 1; }
.cb-family-branch:nth-child(2) { grid-column: 3; grid-row: 1; }
.cb-family-grandparents, .cb-family-columns { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.cb-family-role { text-align: center; font-weight: 600; margin: 0 0 4px; }
.cb-family-card { display: flex; flex-direction: column; gap: 3px; align-items: center; justify-content: center; text-align: center; padding: 10px; min-height: 76px; border-radius: 3px; overflow-wrap: anywhere; color: #233144; }
.cb-family-card a { color: #203d55; text-decoration: underline; }
.cb-family-grandparents .cb-family-card { min-height: 100px; }
.cb-family-branch > .cb-family-slot .cb-family-card { min-height: 112px; }
.cb-family-blue { background: #c4d6f8; }
.cb-family-pink { background: #f2d1e1; }
.cb-family-neutral { background: #e9eef3; }
.cb-family-place { font-style: italic; }
.cb-family-couple-note { min-height: 47px; padding: 4px 0; text-align: center; }
.cb-family-couple-note span, .cb-family-marriage span { display: block; }
.cb-family-connector { border: 2px solid #25443f; border-top: 0; height: 9px; width: 52%; margin: 0 auto 12px; position: relative; }
.cb-family-connector::after, .cb-family-children > h4::after { content: ""; position: absolute; width: 2px; height: 8px; background: #25443f; left: calc(50% - 1px); top: 100%; }
.cb-family-marriage { grid-column: 2; grid-row: 1; align-self: end; display: grid; place-content: center; min-height: 112px; text-align: center; overflow-wrap: anywhere; }
.cb-family-children { text-align: center; margin: 17px 0 4px; }
.cb-family-children > h4 { position: relative; margin-bottom: 16px; }
.cb-family-child-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; padding-top: 10px; border-top: 2px solid #25443f; }
.cb-family-info { padding: 10px 14px; border: 1px solid #e1e5e9; background: #fafbfc; overflow-wrap: anywhere; }
.cb-family-info h4 { margin-top: 0; }
.cb-family-info p { white-space: pre-line; }
.cb-family-info p + p, .cb-family-info li + li { border-top: 1px solid #e1e5e9; padding-top: 6px; }
@media (max-width: 900px) {
    .cb-family-diagram { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .cb-family-branch:nth-child(2) { grid-column: 2; }
    .cb-family-marriage { grid-column: 1 / -1; grid-row: 2; min-height: 0; }
}
@media (max-width: 560px) {
    .cb-family-diagram, .cb-family-columns { grid-template-columns: minmax(0,1fr); }
    .cb-family-branch:nth-child(2) { grid-column: 1; grid-row: 2; }
    .cb-family-marriage { grid-row: 3; }
    .cb-family-columns > div:empty { display: none; }
}
