.media-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,250px),1fr));gap:20px;margin-top:24px}.media-card{border:1px solid #dfe7df;border-radius:16px;overflow:hidden;min-width:0;background:#fff}.media-preview{display:block;width:100%;padding:0;border:0;background:#f3f6ef;cursor:zoom-in;aspect-ratio:4/3}.media-preview img{display:block;width:100%;height:100%;object-fit:contain}.media-card-body{display:flex;flex-direction:column;gap:9px;padding:16px}.media-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.media-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:5px}.media-actions form{margin:0}.media-eye{display:inline-flex;align-items:center;justify-content:center;min-width:40px;min-height:40px}.media-default{align-self:flex-start;background:#e5f0df;color:#164d3d}.media-video{width:100%;aspect-ratio:16/9;border:0;display:block;background:#102e26}.media-document{display:flex;align-items:center;justify-content:center;min-height:110px;background:#f3f6ef;font-weight:600}.media-empty{grid-column:1/-1;padding:32px;text-align:center;border:1px dashed #cbd8ca;border-radius:14px;color:#637364}.media-upload{display:grid;gap:14px;padding:24px;background:#f7f9f4;border:1px dashed #cbd8ca;border-radius:16px}.media-upload label{display:grid;gap:8px}.media-upload .button{justify-self:start}.media-upload [hidden]{display:none!important}.media-dialog{width:min(1000px,94vw);max-height:92vh;border:0;border-radius:18px;padding:20px;background:#fff;color:#193d33;box-shadow:0 24px 80px #0005}.media-dialog::backdrop{background:#071b16c9;backdrop-filter:blur(4px)}.media-dialog-top{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px}.media-dialog img{display:block;max-width:100%;max-height:70vh;object-fit:contain;margin:auto}.media-dialog-caption{overflow-wrap:anywhere;margin:12px 0 0}.media-upload-status:empty{display:none}.media-tabs{overflow-x:auto;white-space:nowrap}@media(max-width:600px){.media-panel .panel-header{align-items:flex-start;flex-direction:column;gap:12px}.media-upload{padding:16px}.media-dialog{padding:14px}.media-actions .button{min-height:40px}}

.tree-node .tree-bird{display:flex;align-items:center;gap:12px}.tree-node:has(.tree-bird){min-width:220px}.tree-bird-details{min-width:0;max-width:180px;overflow-wrap:anywhere}.tree-bird-details strong{display:block}.tree-bird-details .badge{margin-top:3px}

.bird-heading{display:flex;justify-content:center;align-items:center;gap:12px}.bird-picker{position:relative}.bird-picker summary{display:flex;align-items:center;min-height:48px;padding:10px 12px;border:1px solid #dce4dc;border-radius:7px;cursor:pointer;background:white}.bird-picker summary:after{content:'?';margin-left:auto}.bird-picker-options{position:absolute;top:100%;left:0;right:0;z-index:30;background:white;max-height:320px;overflow:auto;border:1px solid #dce4dc;border-radius:7px;box-shadow:0 8px 24px #0002}.bird-picker-options button{width:100%;border:0;background:white;text-align:left;padding:10px 12px}.bird-picker-options button:hover,.bird-picker-options button:focus{background:#edf3e8}.bird-picker [data-bird-selection]{display:flex;align-items:center;gap:12px}.bird-picker small{display:block;color:var(--muted)}
.tree-node .tree-bird{flex-direction:column;align-items:stretch}.tree-node:has(.tree-bird){width:292px;min-width:292px;padding:16px}.tree-node .bird-photo{display:block;width:258px;height:258px;max-width:100%;object-fit:contain;border-radius:8px}.tree-photo-preview{display:block;padding:0;border:0;border-radius:8px;background:transparent;cursor:zoom-in;width:100%}.tree-photo-preview:disabled{opacity:1;cursor:default}.tree-bird-details{max-width:none}.tree-parents .tree-node:has(.tree-bird){width:252px;min-width:252px}.tree-parents .tree-node .bird-photo{width:218px;height:218px}.tree-parents .tree-parents .tree-node:has(.tree-bird){width:192px;min-width:192px}.tree-parents .tree-parents .tree-node .bird-photo{width:158px;height:158px}
/* Keep each ancestor in the original father's or mother's branch. */
.pedigree-line-father{--pedigree-border:#769780;--pedigree-surface:#eef4ec;--pedigree-accent:#315d45}.pedigree-line-mother{--pedigree-border:#c397a6;--pedigree-surface:#faf0f3;--pedigree-accent:#875569}.pedigree-tree .pedigree-line-father>.tree-node,.pedigree-tree .pedigree-line-mother>.tree-node,.tree-node.pedigree-line-father,.tree-node.pedigree-line-mother{background:var(--pedigree-surface);border-color:var(--pedigree-border);border-left:3px solid var(--pedigree-accent)}.pedigree-line-father>.tree-node .pedigree-line-label,.pedigree-line-mother>.tree-node .pedigree-line-label{color:var(--pedigree-accent);font-weight:700;margin-bottom:9px;letter-spacing:.3px}.pedigree-line-father>.tree-node+.tree-node,.pedigree-line-mother>.tree-node+.tree-node{border-color:var(--pedigree-border)}.pedigree-line-father>details>.tree-parents,.pedigree-line-mother>details>.tree-parents{border-left:2px solid var(--pedigree-border)}.pedigree-line-father>details>summary,.pedigree-line-mother>details>summary{color:var(--pedigree-accent)}
