:root{--ink:#15241f;--muted:#6b7772;--green:#174d3a;--green2:#27644f;--soft:#edf3ef;--line:#dce5df;--paper:#fbfcfa;--white:#fff;--danger:#a83d3d;--shadow:0 12px 32px rgba(21,36,31,.08);--r:18px}
*{box-sizing:border-box}
html{background:#f4f7f4;color:var(--ink);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
body{margin:0}
a{color:inherit}
button,input,select,textarea{font:inherit;color:inherit}
button,a{-webkit-tap-highlight-color:transparent}
.topbar{height:72px;display:flex;align-items:center;gap:26px;padding:0 28px;background:rgba(255,255,255,.96);border-bottom:1px solid var(--line);position:sticky;top:0;z-index:30}
.brand{display:flex;align-items:center;gap:10px;text-decoration:none;font-weight:800;letter-spacing:.02em;white-space:nowrap}
.brand.big{font-size:1.15rem;margin-bottom:26px}
.brand-mark{width:34px;height:34px;display:grid;place-items:center;background:var(--green);color:white;border-radius:11px;font-size:1.3rem}
.desktop-nav{display:flex;gap:4px}
.nav-link{padding:24px 12px 21px;text-decoration:none;color:#4d5a55;font-weight:650;border-bottom:3px solid transparent}
.nav-link.active{color:var(--green);border-color:var(--green)}
.search-open{margin-left:auto;min-width:230px;border:1px solid var(--line);background:#f8faf8;border-radius:12px;padding:10px 14px;text-align:left;color:var(--muted);cursor:pointer}
.user-menu{display:grid;grid-template-columns:auto auto;column-gap:10px;line-height:1.2;font-size:.82rem}
.user-menu small{color:var(--muted)}
.user-menu a{grid-column:2;text-align:right;color:var(--green);font-size:.75rem}
.page-shell{max-width:1440px;margin:0 auto;padding:32px 28px 110px}
.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:22px}
.page-head h1{font-size:clamp(2rem,4vw,3.4rem);margin:.1em 0}
.eyebrow{text-transform:uppercase;letter-spacing:.14em;font-size:.72rem;font-weight:800;color:var(--green);margin:0 0 6px}
.muted{color:var(--muted)}
.btn{display:inline-flex;align-items:center;justify-content:center;border:1px solid #cbd8d0;background:white;border-radius:11px;padding:10px 15px;text-decoration:none;font-weight:700;cursor:pointer}
.btn.primary{background:var(--green);border-color:var(--green);color:white}
.btn.small{padding:7px 10px;font-size:.82rem}
.btn.large{padding:13px 16px}
.card,.loading-card,.people-card,.birthday-card{background:white;border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow)}
.loading-card{padding:50px;text-align:center}
.tree-summary{display:grid;grid-template-columns:repeat(3,minmax(120px,180px)) 1fr;gap:12px;margin-bottom:14px}
.stat{padding:15px 18px;background:white;border:1px solid var(--line);border-radius:14px}
.stat strong{font-size:1.3rem;display:block}
.stat span{font-size:.78rem;color:var(--muted)}
.tree-summary .btn{justify-self:end;align-self:center}
.tree-canvas{background:linear-gradient(rgba(247,250,247,.94),rgba(247,250,247,.94)),radial-gradient(circle at center,#b9cfbe 1px,transparent 1.5px);background-size:auto,24px 24px;border:1px solid var(--line);border-radius:22px;min-height:620px;padding:20px;overflow:auto}
.tree-toolbar{display:flex;justify-content:space-between;align-items:center}
.tree-toolbar div{display:flex;gap:8px;align-items:baseline}
.tree-toolbar small{color:var(--muted)}
.tree-level{display:flex;justify-content:center;gap:14px;min-width:900px}
.tree-level.grandparents{margin-top:44px}
.tree-line{width:2px;height:34px;background:#9bb8a5;margin:0 auto}
.tree-person{display:flex;align-items:stretch;border:1px solid #d2ddd5;background:white;border-radius:13px;box-shadow:0 7px 18px rgba(24,56,44,.07);overflow:hidden;min-width:210px}
.tree-person.focus{border:2px solid var(--green);box-shadow:0 10px 28px rgba(23,77,58,.15)}
.tree-person button{display:flex;align-items:center;gap:10px;padding:10px;border:0;background:none;text-align:left;cursor:pointer;flex:1}
.tree-person a{display:grid;place-items:center;padding:0 10px;text-decoration:none;border-left:1px solid var(--line);color:var(--green)}
.tree-person strong,.tree-person small{display:block}
.tree-person small{color:var(--muted);font-size:.72rem}
.tree-empty,.tree-more{padding:20px;color:var(--muted)}
.avatar{width:42px;height:42px;border-radius:50%;background:#dce8df;color:var(--green);display:grid;place-items:center;font-weight:800;overflow:hidden;flex:0 0 auto}
.avatar img{width:100%;height:100%;object-fit:cover}
.avatar.lg{width:66px;height:66px}
.avatar.xl{width:112px;height:112px;font-size:1.5rem}
.birthday-card{padding:20px;margin-bottom:18px}
.section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}
.section-head h2,.card h2{margin:2px 0 14px}
.birthday-strip{display:grid;grid-template-columns:repeat(4,1fr);gap:9px}
.birthday-strip a{display:flex;gap:10px;align-items:center;padding:11px;background:var(--soft);border-radius:13px;text-decoration:none}
.birthday-strip strong,.birthday-strip small{display:block}
.birthday-strip small{color:var(--muted);font-size:.74rem}
.birthday-calendar{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-top:18px}
.birthday-calendar>div{padding:14px;background:#f8faf8;border-radius:12px}
.birthday-calendar h3{text-transform:capitalize;margin:0 0 8px}
.birthday-calendar a{display:flex;gap:8px;text-decoration:none;font-size:.82rem;padding:4px 0}
.birthday-calendar a span{width:22px;color:var(--green);font-weight:800}
.people-card{padding:18px}
.people-toolbar{display:grid;grid-template-columns:1fr 180px 180px;gap:10px}
.search-field{display:flex;align-items:center;border:1px solid #cfdad3;border-radius:12px;background:white;padding:0 13px}
.search-field input{width:100%;border:0;outline:0;padding:13px;background:transparent}
.people-toolbar select,.research-controls select,.form-grid input,.form-grid select,.form-grid textarea,.stack input,.user-row input,.user-row select{width:100%;border:1px solid #cfdad3;border-radius:10px;background:white;padding:11px}
.people-result-head{display:flex;justify-content:space-between;gap:12px;padding:18px 2px 10px}
.people-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}
.person-card{display:flex;align-items:center;gap:11px;padding:11px;border:1px solid var(--line);border-radius:13px;background:white;text-decoration:none;min-width:0}
.person-card>span:nth-child(2){min-width:0;flex:1}
.person-card strong,.person-card small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.person-card small{color:var(--muted);font-size:.74rem}
.person-card .arrow{color:var(--green);font-size:1.4rem}
.profile-hero{display:flex;align-items:center;gap:20px;padding:24px;background:white;border:1px solid var(--line);border-radius:22px;box-shadow:var(--shadow);margin-bottom:16px}
.profile-hero h1{font-size:clamp(2rem,4vw,3.2rem);margin:0}
.grow{flex:1}
.profile-meta{display:flex;gap:14px;color:var(--muted);margin-top:6px}
.profile-layout{display:grid;grid-template-columns:290px 1fr;gap:16px}
.profile-side,.profile-main>.card,.profile-two>.card,.editor-zone{padding:20px}
.relation-row{display:flex;align-items:center;gap:10px;text-decoration:none;padding:9px 0}
.relation-row small,.relation-row strong,.relation-row em{display:block}
.relation-row small,.relation-row em{font-size:.7rem;color:var(--muted);font-style:normal}
.facts{display:grid;grid-template-columns:60px 1fr;gap:10px;font-size:.84rem}
.facts dt{font-weight:800}
.facts dd{margin:0;color:var(--muted)}
hr{border:0;border-top:1px solid var(--line);margin:18px 0}
.prose{font-size:1.02rem;line-height:1.75;max-width:78ch}
.story-block{border-top:1px solid var(--line);padding:18px 0;position:relative}
.story-block h3{margin:2px 0}
.timeline{position:relative;margin-left:10px}
.timeline:before{content:"";position:absolute;left:5px;top:8px;bottom:8px;width:2px;background:#b5cbbd}
.timeline-item{position:relative;padding:0 0 22px 28px}
.timeline-dot{position:absolute;left:0;top:7px;width:12px;height:12px;background:var(--green);border-radius:50%;outline:4px solid #e7f0ea}
.timeline-item h3{margin:2px 0 4px}
.timeline-item small{color:var(--muted)}
/* V12: ét kort med portræt, dato og relation – uden gentagne navne eller ekstra billedknap. */
.timeline-relationship-card{display:flex;align-items:flex-start;gap:14px;padding:14px 16px;margin:7px 0 10px;max-width:680px;border:1px solid #d8e5db;border-radius:16px;background:linear-gradient(120deg,#f5faf6,#fff);box-shadow:0 4px 14px rgba(24,67,43,.035)}
.timeline-relationship-portrait{flex:0 0 auto;display:inline-flex;border-radius:50%;outline-offset:3px;text-decoration:none}
.timeline-relationship-avatar{width:60px;height:60px;flex:0 0 60px;font-size:.83rem;box-shadow:0 0 0 2px #fff,0 0 0 3px #d4e3d8}
.timeline-relationship-details{min-width:0;flex:1;padding-top:2px}
.timeline-relationship-date{display:block;color:var(--muted);font-size:.76rem;line-height:1.4;margin-bottom:5px}
.timeline-relationship-card h3{font-size:1.01rem;line-height:1.38;margin:0;overflow-wrap:anywhere}
.timeline-relationship-card h3 .timeline-person-link{text-decoration:none;color:var(--green);text-underline-offset:3px}
.timeline-relationship-card h3 .timeline-person-link:hover{text-decoration:underline}
.timeline-relationship-place{font-size:.78rem;color:var(--muted);margin:6px 0 0;overflow-wrap:anywhere}
.timeline-relationship-note{font-size:.85rem;margin:8px 0 0}
@media(max-width:580px){.timeline-relationship-card{gap:11px;padding:12px}.timeline-relationship-avatar{width:48px;height:48px;flex-basis:48px}.timeline-relationship-card h3{font-size:.96rem}}
.profile-two{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:16px}
.link-card,.personal-relation{border-top:1px solid var(--line);padding:12px 0;display:flex;justify-content:space-between;gap:10px}
.link-card a{display:block;text-decoration:none}
.link-card small,.personal-relation small,.personal-relation strong{display:block}
.tags{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:15px}
.tags span{background:var(--soft);border-radius:999px;padding:6px 10px;font-size:.8rem}
.editor-zone{margin-top:16px}
.editor-zone details{border-top:1px solid var(--line);padding:14px 0}
.editor-zone summary{font-weight:800;cursor:pointer}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:14px}
.form-grid label,.stack label{display:grid;gap:5px;font-weight:700;font-size:.83rem}
.form-grid label small,.stack label small{color:var(--muted);font-weight:400}
.form-grid .wide{grid-column:1/-1}
.form-grid button{justify-self:start}
.inline-delete{margin-left:auto}
.inline-delete button{border:0;background:none;color:var(--danger);cursor:pointer}
.research-controls{margin-bottom:14px}
.research-controls select{max-width:600px}
.research-grid{display:grid;grid-template-columns:1.5fr .8fr;gap:16px}
.research-grid>.card{padding:20px}
.research-hero{display:flex;align-items:center;gap:13px}
.research-hero .btn{margin-left:auto}
.mini-timeline>div{display:grid;grid-template-columns:110px 160px 1fr;gap:12px;padding:10px 0;border-top:1px solid var(--line)}
.missing{display:flex;justify-content:space-between;padding:10px;border-bottom:1px solid var(--line)}
.missing em{font-style:normal;color:#945d21;background:#fff2df;border-radius:999px;padding:3px 8px;font-size:.72rem}
.admin-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:16px}
.admin-grid{display:grid;grid-template-columns:1.35fr .8fr;gap:16px}
.admin-grid>.card{padding:20px}
.user-row{display:grid;grid-template-columns:minmax(170px,1fr) 130px 170px 100px auto;align-items:center;gap:8px;padding:12px 0;border-top:1px solid var(--line)}
.user-row strong,.user-row small{display:block}
.user-row small{color:var(--muted)}
.check{display:flex!important;align-items:center;gap:6px}
.check input{width:auto!important}
.add-user{margin-top:12px;border-top:1px solid var(--line);padding-top:14px}
.add-user summary{font-weight:800;cursor:pointer}
.activity{display:flex;gap:10px;padding:10px 0;border-top:1px solid var(--line)}
.activity-dot{width:9px;height:9px;margin-top:6px;border-radius:50%;background:var(--green)}
.activity strong,.activity small{display:block}
.activity small{color:var(--muted);margin-top:2px}
.flash{max-width:1384px;margin:14px auto 0;padding:12px 16px;background:#e8f4ec;border:1px solid #cbe0d2;border-radius:12px}
.flash.error,.notice.error{background:#fff0f0;border-color:#f0cccc;color:#7c2f2f}
.notice{padding:12px;border-radius:10px}
.search-dialog{width:min(620px,calc(100% - 24px));border:0;border-radius:20px;padding:24px;box-shadow:0 30px 100px rgba(0,0,0,.25)}
.search-dialog::backdrop{background:rgba(15,29,24,.48);backdrop-filter:blur(4px)}
.dialog-close{float:right;border:0;background:none;font-size:1.6rem}
.search-dialog input{width:100%;padding:14px;border:1px solid #cfdad3;border-radius:12px}
.search-results{display:grid;gap:7px;margin-top:10px;max-height:55vh;overflow:auto}
.auth-body{min-height:100vh;display:grid;place-items:center;padding:20px;background:radial-gradient(circle at top,#eef6ef,#e6eee8 45%,#f8faf8)}
.auth-card{width:min(460px,100%);background:white;border:1px solid var(--line);border-radius:24px;box-shadow:0 25px 70px rgba(25,58,45,.12);padding:34px}
.auth-card h1{font-size:2.1rem;margin:.1em 0}
.stack{display:grid;gap:13px;margin-top:20px}
.mobile-nav{display:none}
.empty-state{padding:32px;text-align:center;color:var(--muted)}

@media(max-width:980px){.desktop-nav,.user-menu,.search-open span{display:none}.search-open{min-width:auto;margin-left:auto}.page-shell{padding:22px 16px 100px}.birthday-strip{grid-template-columns:repeat(2,1fr)}.birthday-calendar{grid-template-columns:repeat(3,1fr)}.people-grid{grid-template-columns:repeat(2,1fr)}.profile-layout{grid-template-columns:1fr}.profile-side{order:2}.profile-two,.research-grid,.admin-grid{grid-template-columns:1fr}.user-row{grid-template-columns:1fr 120px}.user-row input,.user-row .check{grid-column:1}.tree-canvas{margin:0 -16px;border-radius:0;border-left:0;border-right:0}.mobile-nav{position:fixed;bottom:0;left:0;right:0;z-index:40;height:66px;background:rgba(255,255,255,.97);border-top:1px solid var(--line);display:flex;justify-content:space-around;padding-bottom:env(safe-area-inset-bottom)}.mobile-nav a,.mobile-nav button{flex:1;border:0;background:none;text-decoration:none;display:grid;place-items:center;align-content:center;gap:2px;font-size:1.05rem}.mobile-nav span{font-size:.65rem}.mobile-nav .active{color:var(--green);font-weight:800}.admin-stats{grid-template-columns:1fr 1fr}}

@media(max-width:640px){.topbar{height:60px;padding:0 14px}.brand span:last-child{font-size:.9rem}.page-head{align-items:flex-start}.page-head>.btn{display:none}.tree-summary{grid-template-columns:repeat(3,1fr)}.tree-summary .btn{display:none}.tree-summary .stat{padding:10px}.tree-summary .stat strong{font-size:1rem}.tree-level{min-width:740px;justify-content:flex-start}.tree-level.focus-row{justify-content:center}.birthday-strip{display:flex;overflow:auto;padding-bottom:4px}.birthday-strip a{min-width:260px}.birthday-calendar{grid-template-columns:1fr 1fr}.people-toolbar{grid-template-columns:1fr 1fr}.people-toolbar .search-field{grid-column:1/-1}.people-result-head{display:block}.people-result-head span{display:block;margin-top:4px}.people-grid{grid-template-columns:1fr}.profile-hero{align-items:flex-start;flex-wrap:wrap}.avatar.xl{width:82px;height:82px}.profile-hero .btn{width:100%}.profile-meta{display:block}.profile-two{grid-template-columns:1fr}.form-grid{grid-template-columns:1fr}.form-grid .wide{grid-column:auto}.mini-timeline>div{grid-template-columns:80px 1fr}.mini-timeline>div span{grid-column:2}.admin-stats{grid-template-columns:1fr 1fr}.user-row{grid-template-columns:1fr}.auth-card{padding:24px}.birthday-card,.people-card{padding:14px}.research-hero{align-items:flex-start;flex-wrap:wrap}.research-hero .btn{margin-left:0}.section-head{align-items:center}}


/* v3: sammenfoldelig fødselsdag, medier og automatisk livshistorie */

.birthday-details{padding:0;overflow:hidden}
.birthday-details>summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:18px;padding:18px 20px}
.birthday-details>summary::-webkit-details-marker{display:none}
.birthday-details>summary>span:first-child{display:grid;gap:2px}
.birthday-details>summary strong{font-size:1.12rem}
.birthday-details>summary small{color:var(--muted)}
.birthday-open-label{font-size:.82rem;font-weight:800;color:var(--green);white-space:nowrap}
.birthday-details[open] .birthday-open-label:before{content:'Skjul ';font-size:0}
.birthday-details[open] .birthday-open-label{font-size:0}
.birthday-details[open] .birthday-open-label:after{content:'Skjul oversigt';font-size:.82rem}
.birthday-content{border-top:1px solid var(--line);padding:18px 20px}
.birthday-months{margin-top:14px;border-top:1px solid var(--line);padding-top:12px}
.birthday-months>summary{cursor:pointer;font-weight:800;color:var(--green)}

.timeline-item.auto-event .timeline-dot{background:#6d9c7b}
.timeline-item.auto-event small{color:#668173}
.timeline-item.manual-event .timeline-dot{background:var(--green)}

.media-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.media-card{position:relative;margin:0;border:1px solid var(--line);border-radius:14px;overflow:hidden;background:#f7faf8}
.media-card img,.media-card video{display:block;width:100%;aspect-ratio:4/3;object-fit:cover;background:#101714}
.media-card figcaption{padding:10px;display:grid;gap:3px}
.media-card figcaption small{color:var(--muted)}
.media-card .inline-delete{position:absolute;right:7px;top:7px;background:rgba(255,255,255,.92);border-radius:8px;padding:3px 6px}
.compact{gap:8px}
.compact input[type=file]{font-size:.78rem}
.admin-grid code{background:var(--soft);padding:2px 5px;border-radius:5px}

@media(max-width:900px){.media-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.birthday-strip{grid-template-columns:repeat(2,1fr)}}

@media(max-width:600px){.media-grid{grid-template-columns:1fr}.birthday-strip{grid-template-columns:1fr}.birthday-details>summary{align-items:flex-start}.birthday-open-label{padding-top:3px}}


/* Mobiltræ v3.1: fokusbaseret og uden vandret scrolling */

.tree-app{max-width:100%}
.tree-desktop{display:block}
.mobile-family-tree{display:none}

@media(max-width:640px){
  html,body{max-width:100%;overflow-x:hidden}
  .page-shell{max-width:100%;overflow-x:hidden;padding-left:14px;padding-right:14px}
  .page-head{margin-bottom:16px}.page-head h1{font-size:2.05rem;line-height:1.05;margin:.18em 0}.page-head .muted{font-size:.94rem;line-height:1.45;margin-top:8px}
  .tree-app{width:100%;overflow:hidden}
  .tree-summary{display:flex;background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow);gap:0;margin-bottom:12px;padding:6px}
  .tree-summary .stat{flex:1;min-width:0;text-align:center;border:0;border-right:1px solid var(--line);border-radius:0;padding:7px 5px;background:transparent}
  .tree-summary .stat:nth-child(3){border-right:0}.tree-summary .stat strong{font-size:.98rem;line-height:1.12}.tree-summary .stat span{font-size:.64rem}
  .tree-desktop{display:none}.mobile-family-tree{display:block;width:100%;overflow:hidden;background:linear-gradient(rgba(248,251,248,.96),rgba(248,251,248,.96)),radial-gradient(circle at center,#bfd1c4 1px,transparent 1.3px);background-size:auto,22px 22px;border:1px solid var(--line);border-radius:20px;padding:14px 12px 18px;box-shadow:var(--shadow)}
  .mobile-tree-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:2px 2px 14px;border-bottom:1px solid rgba(220,229,223,.85);margin-bottom:15px}.mobile-tree-toolbar>div{min-width:0}.mobile-tree-toolbar small,.mobile-tree-toolbar strong{display:block}.mobile-tree-toolbar small{font-size:.66rem;color:var(--muted);margin-bottom:2px}.mobile-tree-toolbar strong{font-size:.92rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-tree-toolbar .btn{flex:0 0 auto;padding:7px 10px;font-size:.72rem}
  .mobile-tree-group{position:relative;margin:0 auto}.mobile-tree-label{text-align:center;text-transform:uppercase;letter-spacing:.12em;font-size:.62rem;font-weight:800;color:var(--green);margin:0 0 8px}.mobile-tree-label small{display:inline-grid;place-items:center;min-width:18px;height:18px;padding:0 5px;margin-left:3px;border-radius:999px;background:#e5efe8;color:var(--green);font-size:.61rem;letter-spacing:0}
  .mobile-tree-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:100%}.mobile-tree-grid.one{grid-template-columns:minmax(0,270px);justify-content:center}.mobile-tree-person{display:flex;min-width:0;min-height:67px;background:rgba(255,255,255,.96);border:1px solid #d5e0d8;border-radius:15px;box-shadow:0 6px 16px rgba(24,56,44,.06);overflow:hidden}.mobile-tree-person.focus{border:2px solid var(--green);box-shadow:0 9px 24px rgba(23,77,58,.14);background:#fff}.mobile-tree-person button{display:flex;align-items:center;gap:8px;min-width:0;flex:1;border:0;background:none;text-align:left;padding:9px 7px 9px 9px;cursor:pointer}.mobile-tree-person button>span:last-child{min-width:0}.mobile-tree-person .avatar{width:42px;height:42px;font-size:.72rem}.mobile-tree-person.has-photo .avatar{width:46px;height:46px}.mobile-tree-person strong,.mobile-tree-person small{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis}.mobile-tree-person strong{font-size:.82rem;line-height:1.12;white-space:nowrap}.mobile-tree-person small{margin-top:3px;font-size:.63rem;white-space:nowrap;color:var(--muted)}.mobile-tree-person a{display:grid;place-items:center;flex:0 0 28px;text-decoration:none;border-left:1px solid var(--line);font-size:1.25rem;color:var(--green)}
  .focus-group{margin-top:0}.focus-group .mobile-tree-person{min-height:76px}.focus-group .mobile-tree-person .avatar{width:50px;height:50px}.focus-group .mobile-tree-person strong{font-size:.93rem}.mobile-profile-link{display:block;width:max-content;max-width:100%;margin:8px auto 0;padding:6px 10px;border-radius:999px;background:#e8f1eb;text-decoration:none;color:var(--green);font-weight:800;font-size:.68rem}
  .mobile-tree-connector{width:2px;height:24px;margin:0 auto;background:#8eaf9b}.mobile-tree-connector.short{height:16px}.mobile-tree-group.partners,.mobile-tree-group.children{margin-top:0}.mobile-tree-empty{text-align:center;padding:10px;border:1px dashed #cbd9d0;border-radius:12px;color:var(--muted);font-size:.78rem}
  .mobile-tree-more-sections{display:grid;gap:8px;margin-top:16px;padding-top:12px;border-top:1px solid var(--line)}.mobile-tree-more-sections details{background:rgba(255,255,255,.9);border:1px solid var(--line);border-radius:13px;padding:0 10px}.mobile-tree-more-sections summary{list-style:none;display:flex;align-items:center;justify-content:space-between;padding:10px 2px;cursor:pointer;font-size:.79rem;font-weight:800}.mobile-tree-more-sections summary::-webkit-details-marker{display:none}.mobile-tree-more-sections summary span{display:grid;place-items:center;min-width:22px;height:22px;border-radius:999px;background:var(--soft);color:var(--green);font-size:.68rem}.mobile-tree-more-sections details[open] summary{border-bottom:1px solid var(--line);margin-bottom:9px}.mobile-tree-more-sections .mobile-tree-grid{padding-bottom:10px}
  .mobile-tree-help{text-align:center;color:var(--muted);font-size:.68rem;line-height:1.4;margin:15px 12px 0}
}

@media(max-width:370px){
  .mobile-tree-grid{gap:6px}.mobile-tree-person button{padding:8px 5px 8px 7px;gap:6px}.mobile-tree-person .avatar,.mobile-tree-person.has-photo .avatar{width:38px;height:38px}.mobile-tree-person strong{font-size:.76rem}.mobile-tree-person small{font-size:.59rem}.mobile-tree-person a{flex-basis:24px}.tree-summary .stat strong{font-size:.88rem}
}


/* v3.2: forskningsværktøjer og personopdelt mediebibliotek */

.research-tools{padding:20px;margin-bottom:22px}
.research-tools .section-head{margin-bottom:14px}
.research-tools .section-head h2{margin-bottom:5px}
.research-tool-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.research-tool{display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:12px;padding:14px;border:1px solid var(--line);border-radius:15px;background:#fbfcfb;text-decoration:none;transition:transform .14s ease,border-color .14s ease,box-shadow .14s ease}
.research-tool:hover{transform:translateY(-1px);border-color:#b9cdc0;box-shadow:0 10px 24px rgba(21,36,31,.07)}
.research-tool .tool-icon{width:42px;height:42px;display:grid;place-items:center;border-radius:12px;background:var(--soft);color:var(--green);font-size:1.15rem;font-weight:800}
.research-tool>span:nth-child(2){min-width:0;display:grid;gap:2px}
.research-tool small{color:var(--green);font-weight:800;font-size:.68rem;text-transform:uppercase;letter-spacing:.07em}
.research-tool strong{font-size:.96rem}
.research-tool em{font-style:normal;color:var(--muted);font-size:.78rem;line-height:1.35}
.research-tool b{font-size:1.05rem;color:var(--green)}
.research-work-head{margin:28px 2px 12px}
.research-work-head h2{margin:2px 0}
.media-admin-stats{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}
.media-admin-stats span{display:inline-flex;gap:5px;align-items:center;padding:7px 10px;border-radius:999px;background:var(--soft);font-size:.78rem;color:var(--muted)}
.media-admin-stats strong{color:var(--ink)}
.media-admin-stats .warn{background:#fff2df;color:#85571f}
.media-organize-form{margin-top:12px}
.notice.ok{background:#edf6f0;border:1px solid #cce2d3;color:#28543f;margin-top:12px}

@media(max-width:900px){.research-tool-grid{grid-template-columns:1fr}}

@media(max-width:640px){.research-tools{padding:14px}.research-tool{grid-template-columns:36px minmax(0,1fr) auto;padding:12px 10px;gap:9px}.research-tool .tool-icon{width:36px;height:36px}.research-tool em{font-size:.73rem}.research-work-head{margin-top:22px}.media-admin-stats{display:grid;grid-template-columns:1fr 1fr}.media-admin-stats span{border-radius:10px;display:block}}

.timeline-person-link{color:var(--green);text-decoration:none;border-bottom:1px solid rgba(23,77,58,.28)}
.timeline-person-link:hover{border-bottom-color:currentColor}


/* v3.3: personcentreret forsknings-dashboard */

.research-work-head{margin:0 2px 12px}
.research-work-head p:last-child{margin:.35rem 0 0}
.research-finder{position:relative;padding:16px;margin-bottom:14px;z-index:8}
.research-live-search{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px;border:1px solid #cfdad3;border-radius:14px;background:#fff;padding:0 12px;box-shadow:0 5px 18px rgba(21,36,31,.04)}
.research-live-search>span{font-size:1.25rem;color:var(--green)}
.research-live-search input{border:0;outline:0;background:transparent;width:100%;padding:14px 2px;font-size:1rem}
.research-live-search kbd{border:1px solid var(--line);border-bottom-width:2px;border-radius:7px;background:#f7f9f7;color:var(--muted);font:600 .67rem/1 ui-sans-serif,system-ui;padding:5px 7px}
.research-live-results{position:absolute;left:16px;right:16px;top:70px;z-index:12;background:#fff;border:1px solid var(--line);border-radius:15px;box-shadow:0 18px 50px rgba(21,36,31,.17);max-height:440px;overflow:auto;padding:6px}
.research-search-result{width:100%;border:0;background:#fff;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:11px;padding:10px;border-radius:11px;text-align:left;cursor:pointer}
.research-search-result:hover,.research-search-result:focus{background:var(--soft);outline:0}
.research-search-result .avatar{width:42px;height:42px}
.research-search-result span:nth-child(2){min-width:0}
.research-search-result strong,.research-search-result small,.research-search-result em{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.research-search-result small{color:var(--muted);font-size:.76rem;margin-top:2px}
.research-search-result em{font-style:normal;color:#7c8882;font-size:.68rem;margin-top:2px}
.research-search-result b{font-size:1.25rem;color:var(--green)}
.research-search-empty{padding:18px;text-align:center;color:var(--muted)}
.research-recent{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-top:11px}
.research-recent>span{font-size:.72rem;color:var(--muted)}
.research-recent button{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--line);background:#fbfcfb;border-radius:999px;padding:5px 9px 5px 6px;cursor:pointer;font-size:.72rem}
.research-recent button:hover{border-color:#adc4b5;background:var(--soft)}
.research-recent .avatar{width:25px;height:25px;font-size:.55rem}
.research-body{display:grid;gap:14px}
.research-person-hero{padding:18px 20px;display:flex;align-items:center;gap:14px}
.research-person-hero h2{margin:.08rem 0 .2rem}
.research-person-actions{display:flex;gap:7px;margin-left:auto}
.research-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.research-metrics>div{background:#fff;border:1px solid var(--line);border-radius:14px;padding:13px 15px;display:grid;gap:2px}
.research-metrics strong{font-size:1.25rem}
.research-metrics span{font-size:.72rem;color:var(--muted)}
.research-dashboard{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(285px,.75fr);gap:14px;align-items:start}
.research-main-column,.research-side-column{display:grid;gap:14px}
.research-section{padding:20px}
.research-section .section-head{align-items:flex-start;margin-bottom:14px}
.research-section .section-head h2{margin:.12rem 0 .25rem}
.research-section-count{display:grid;place-items:center;min-width:32px;height:32px;padding:0 8px;border-radius:999px;background:var(--soft);font-size:.76rem;font-weight:800;color:var(--green)}
.research-suggestions{display:grid;gap:9px}
.research-suggestion{border:1px solid var(--line);border-radius:14px;padding:14px;background:#fbfcfb;border-left:4px solid #9aab9f}
.research-suggestion.priority-high{border-left-color:#9d523d}
.research-suggestion.priority-medium{border-left-color:#ad7b35}
.research-suggestion.priority-low{border-left-color:#789686}
.research-suggestion-top{display:flex;justify-content:space-between;gap:8px;align-items:center}
.research-suggestion-top>span:first-child{font-size:.63rem;text-transform:uppercase;letter-spacing:.08em;font-weight:800;color:var(--muted)}
.research-task-linked{background:#e8f1eb;color:var(--green)!important;border-radius:999px;padding:4px 7px;text-transform:none!important;letter-spacing:0!important}
.research-suggestion h3{margin:.35rem 0 .3rem;font-size:1rem}
.research-suggestion p{margin:0;color:var(--muted);font-size:.82rem;line-height:1.45}
.research-expected{display:block;margin-top:7px;color:#64736c}
.research-suggestion-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-top:10px}
.research-suggestion-actions>a{display:inline-flex;padding:6px 8px;border:1px solid var(--line);border-radius:8px;text-decoration:none;font-size:.7rem;font-weight:700;background:#fff}
.research-suggestion-actions>a:hover{border-color:#aac3b3;color:var(--green)}
.research-suggestion-add{margin-left:auto}
.research-empty-good{padding:18px;border-radius:12px;background:#edf6f0;color:#28543f}
.research-status-list{display:grid}
.research-status-row{display:grid;grid-template-columns:28px minmax(0,1fr) auto;gap:8px;align-items:center;padding:10px 0;border-top:1px solid var(--line)}
.research-status-row:first-child{border-top:0}
.research-status-icon{width:24px;height:24px;border-radius:50%;display:grid;place-items:center;background:#edf3ef;color:var(--green);font-weight:900;font-size:.75rem}
.research-status-row.missing .research-status-icon{background:#fff1e5;color:#8a5422}
.research-status-row.partial .research-status-icon{background:#fff6df;color:#8a6b22}
.research-status-row.na .research-status-icon{background:#f1f3f2;color:#8a918e}
.research-status-row strong,.research-status-row small{display:block}
.research-status-row strong{font-size:.82rem}
.research-status-row small{font-size:.7rem;color:var(--muted);margin-top:2px}
.research-status-row em{font-style:normal;font-size:.63rem;color:var(--muted)}
.research-sources{display:grid;gap:7px}
.research-source{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;text-decoration:none;border:1px solid var(--line);border-radius:11px;padding:10px}
.research-source:hover{border-color:#aac3b3;background:#fbfcfb}
.research-source small,.research-source strong,.research-source em{display:block}
.research-source small{font-size:.62rem;text-transform:uppercase;letter-spacing:.06em;color:var(--green);font-weight:800}
.research-source strong{font-size:.8rem;margin-top:2px}
.research-source em{font-size:.68rem;color:var(--muted);font-style:normal;margin-top:2px}
.research-source b{color:var(--green)}
.text-link{display:inline-block;margin-top:12px;color:var(--green);font-weight:800;text-decoration:none;font-size:.76rem}
.research-timeline{position:relative}
.research-timeline:before{content:"";position:absolute;left:110px;top:9px;bottom:9px;width:1px;background:#cad9cf}
.research-timeline-item{display:grid;grid-template-columns:94px 14px minmax(0,1fr);gap:9px;position:relative;padding:9px 0}
.research-timeline-item time{text-align:right;color:var(--muted);font-size:.72rem;padding-top:2px}
.research-timeline-dot{width:9px;height:9px;border-radius:50%;background:var(--green);margin-top:5px;z-index:1;box-shadow:0 0 0 3px #edf3ef}
.research-timeline-item strong,.research-timeline-item small{display:block}
.research-timeline-item strong{font-size:.84rem}
.research-timeline-item small{font-size:.7rem;color:var(--muted);margin-top:3px}
.research-timeline-item p{font-size:.75rem;color:var(--muted);line-height:1.4;margin:.3rem 0 0}
.research-tasks-section{margin-bottom:4px}
.research-task-list{display:grid;gap:8px}
.research-task{display:flex;align-items:center;gap:10px;border:1px solid var(--line);border-radius:12px;padding:11px 12px;background:#fbfcfb}
.research-task strong{font-size:.86rem}
.research-task p{margin:.25rem 0 0;color:var(--muted);font-size:.75rem;line-height:1.4}
.research-task-update{display:flex;gap:6px;align-items:center;margin-left:auto}
.research-task-update select{padding:7px 8px;border:1px solid var(--line);border-radius:8px;background:#fff;font-size:.72rem}
.task-status{white-space:nowrap;border-radius:999px;padding:5px 8px;background:var(--soft);font-size:.67rem;font-weight:800}
.status-searching{background:#fff6df}
.status-possible{background:#eaf1fb}
.status-confirmed{background:#e8f3eb;color:#24533b}
.research-add-task{margin-top:12px;border-top:1px solid var(--line);padding-top:12px}
.research-add-task>summary{cursor:pointer;color:var(--green);font-size:.8rem;font-weight:800}
.research-add-task textarea{resize:vertical}
.research-error{padding:22px;color:var(--danger)}

.research-tools-collapsed{padding:0;margin-top:16px;margin-bottom:0}
.research-tools-collapsed>summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:17px 20px}
.research-tools-collapsed>summary::-webkit-details-marker{display:none}
.research-tools-collapsed>summary>span:first-child{display:grid;gap:2px}
.research-tools-collapsed>summary strong{font-size:.98rem}
.research-tools-collapsed>summary small{color:var(--muted);font-size:.75rem;font-weight:400}
.research-open-label{font-size:.75rem;font-weight:800;color:var(--green);white-space:nowrap}
.research-tools-collapsed[open] .research-open-label{font-size:0}
.research-tools-collapsed[open] .research-open-label:after{content:'Skjul genveje';font-size:.75rem}
.research-tools-body{border-top:1px solid var(--line);padding:16px 20px 20px}

@media(max-width:980px){.research-dashboard{grid-template-columns:1fr}.research-side-column{grid-template-columns:1fr 1fr}.research-person-actions{flex-wrap:wrap;justify-content:flex-end}}

@media(max-width:640px){.research-live-search kbd{display:none}.research-live-search{grid-template-columns:auto minmax(0,1fr)}.research-finder{padding:12px}.research-live-results{left:12px;right:12px;top:64px}.research-recent{flex-wrap:nowrap;overflow:auto;padding-bottom:2px}.research-recent>span{flex:0 0 auto}.research-recent button{flex:0 0 auto;max-width:190px}.research-recent button>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.research-person-hero{align-items:flex-start;flex-wrap:wrap;padding:15px}.research-person-hero .avatar.lg{width:60px;height:60px}.research-person-actions{width:100%;margin:0}.research-person-actions .btn{flex:1;text-align:center}.research-metrics{grid-template-columns:1fr 1fr}.research-dashboard{grid-template-columns:1fr}.research-side-column{grid-template-columns:1fr}.research-section{padding:15px}.research-suggestion-add{width:100%;margin-left:0}.research-suggestion-add .btn{width:100%}.research-timeline:before{left:79px}.research-timeline-item{grid-template-columns:64px 12px minmax(0,1fr);gap:7px}.research-timeline-item time{font-size:.64rem}.research-task{align-items:flex-start;flex-wrap:wrap}.research-task-update{order:3;width:100%;margin:0}.research-task-update select{flex:1}.research-task .inline-delete{margin-left:auto}.research-tools-collapsed>summary{padding:14px}.research-tools-body{padding:12px}.research-tools-collapsed>summary small{display:none}}


/* v3.4: personligt startpunkt og breddeoptimeret desktop-træ */

.tree-page{max-width:1600px;padding-top:18px}

.start-person-dialog{max-width:620px}
.start-person-dialog>p.muted{margin:-6px 0 16px;line-height:1.45}
.start-person-search{margin-bottom:10px}
.start-person-results{display:grid;gap:7px;max-height:50vh;overflow:auto}
.start-person-result{margin:0}
.start-person-result button{width:100%;border:1px solid var(--line);background:#fff;border-radius:12px;padding:9px 10px;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px;text-align:left;cursor:pointer}
.start-person-result button:hover,.start-person-result button:focus{background:var(--soft);border-color:#adc4b5;outline:0}
.start-person-result button>span{min-width:0}
.start-person-result strong,.start-person-result small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.start-person-result small{font-size:.72rem;color:var(--muted);margin-top:2px}
.start-person-result b{color:var(--green);font-size:.72rem}


@media(min-width:641px){
  .tree-summary{grid-template-columns:repeat(3,minmax(0,1fr));max-width:560px;margin:0 auto 12px}
  .tree-summary .stat{text-align:center;padding:10px 14px}
  .tree-canvas{min-height:0;padding:16px 22px 26px;overflow:hidden}
  .tree-toolbar{display:flex;align-items:center;justify-content:space-between;gap:18px;padding-bottom:14px;margin-bottom:10px;border-bottom:1px solid rgba(220,229,223,.8)}
  .tree-toolbar .tree-toolbar-copy{display:grid;gap:1px;min-width:0;align-items:initial}
  .tree-toolbar .tree-toolbar-copy small{font-size:.68rem}
  .tree-toolbar .tree-toolbar-copy strong{font-size:1rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .tree-toolbar .tree-toolbar-copy span{font-size:.68rem;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .tree-toolbar .tree-toolbar-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
  .tree-generation{display:grid;justify-items:center;margin:0 auto;width:100%}
  .tree-generation-label{margin:7px 0 8px;text-transform:uppercase;letter-spacing:.11em;font-size:.62rem;font-weight:800;color:#6f8178}
  .tree-level{display:grid;grid-template-columns:repeat(auto-fit,minmax(155px,1fr));justify-content:center;align-items:stretch;gap:9px;width:100%;min-width:0;margin:0 auto}
  .tree-level.grandparents{max-width:900px;margin-top:0}
  .tree-level.parents{max-width:520px}
  .tree-level.focus-row{max-width:760px}
  .tree-level.children{max-width:1180px}
  .tree-line{height:24px}
  .tree-person{width:100%;min-width:0;max-width:230px;justify-self:center}
  .tree-person button{min-width:0;padding:9px;gap:8px}
  .tree-person button>span:last-child{min-width:0}
  .tree-person strong{font-size:.86rem;line-height:1.18;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .tree-person small{font-size:.66rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .tree-person .avatar{width:38px;height:38px;font-size:.7rem}
  .tree-person a{padding:0 8px}
  .tree-empty{grid-column:1/-1;padding:12px 18px;border:1px dashed #cad8cf;border-radius:12px;background:rgba(255,255,255,.65);text-align:center;width:min(100%,320px)}
}

@media(min-width:641px) and (max-width:900px){
  .tree-page{padding-left:16px;padding-right:16px}
  .tree-canvas{margin:0;border-left:1px solid var(--line);border-right:1px solid var(--line);border-radius:18px;padding-left:12px;padding-right:12px}
  .tree-level{grid-template-columns:repeat(auto-fit,minmax(140px,1fr))}
  .tree-toolbar{align-items:flex-start}
  .tree-toolbar-actions .btn{padding:6px 8px;font-size:.72rem}
}

@media(max-width:640px){
  .tree-page{padding-top:12px}
  .mobile-tree-toolbar-actions{display:flex!important;gap:5px!important;align-items:center!important;flex:0 0 auto}
  .mobile-tree-toolbar-actions .btn{padding:6px 8px;font-size:.66rem}
  .start-person-dialog{padding:20px}
}


/* v3.5: slægtsbog */

.profile-hero-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end}

.book-back{margin-left:auto}
.book-create-shell{max-width:1320px;margin:0 auto;padding:36px 28px 100px}
.book-create-head{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:20px}
.book-create-head h1{font-size:clamp(2.1rem,4vw,3.5rem);margin:.08em 0}
.book-create-head>div:first-child{max-width:760px}
.book-create-head>div:first-child>p:last-child{color:var(--muted);font-size:1.02rem;line-height:1.6}
.book-person-chip{display:flex;align-items:center;gap:12px;background:white;border:1px solid var(--line);border-radius:18px;padding:11px 14px;box-shadow:var(--shadow);min-width:260px}
.book-person-chip strong,.book-person-chip small{display:block}
.book-person-chip small{color:var(--muted);margin-top:3px}
.book-builder-form{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:18px;align-items:start}
.book-builder-main{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(280px,.65fr);gap:16px}
.book-options-card,.book-family-card{padding:22px}
.book-title-field{display:grid;gap:6px;font-size:.82rem;font-weight:800;margin:0 0 18px}
.book-title-field input,.book-family-card select{width:100%;padding:11px 12px;border:1px solid #cfdad3;border-radius:10px;background:white}
.book-option-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.book-option{display:grid;grid-template-columns:auto 1fr;gap:10px;align-items:start;padding:12px;border:1px solid var(--line);border-radius:13px;background:#fbfcfb;cursor:pointer}
.book-option.featured{background:#f3f7f4;border-color:#c9d9ce}
.book-option input{width:18px;height:18px;margin-top:2px;accent-color:var(--green)}
.book-option b,.book-option small{display:block}
.book-option b{font-size:.87rem}
.book-option small{color:var(--muted);font-size:.72rem;line-height:1.4;margin-top:3px}
.book-family-card>label{display:grid;gap:6px;font-size:.82rem;font-weight:800;margin:0 0 16px}
.book-family-toggles{display:grid;gap:8px;padding:13px;background:var(--soft);border-radius:12px;margin-bottom:17px}
.book-family-toggles label{font-size:.8rem;display:flex;align-items:center;gap:8px}
.book-family-toggles input{accent-color:var(--green)}
.book-note{border-top:1px solid var(--line);padding-top:15px;margin-top:8px}
.book-note strong{font-size:.83rem}
.book-note p{font-size:.76rem;color:var(--muted);line-height:1.5;margin:.4rem 0 0}
.book-builder-side{position:sticky;top:92px}
.book-preview-card{background:white;border:1px solid var(--line);border-radius:20px;box-shadow:var(--shadow);overflow:hidden}
.book-preview-cover{position:relative;min-height:310px;padding:25px 22px;background:linear-gradient(155deg,#174d3a 0 45%,#fbfcfa 45% 100%);overflow:hidden}
.book-preview-cover>span{display:block;color:white;font-size:.62rem;font-weight:800;letter-spacing:.14em}
.book-preview-cover>small{display:block;color:#dbe9df;font-size:.56rem;font-weight:800;letter-spacing:.13em;margin-top:28px}
.book-preview-cover h2{color:white;font-size:1.6rem;line-height:1.05;max-width:190px;margin:8px 0 5px}
.book-preview-cover em{color:#dbe9df;font-style:normal;font-size:.78rem}
.book-preview-cover .avatar.xl{position:absolute;right:20px;bottom:26px;width:105px;height:130px;border-radius:8px;border:5px solid white;background:#dce8df;box-shadow:0 10px 28px rgba(21,36,31,.18)}
.book-preview-copy{padding:16px 18px}
.book-preview-copy strong{font-size:.86rem}
.book-preview-copy p{font-size:.75rem;color:var(--muted);line-height:1.5;margin:.35rem 0 0}
.book-generate{width:100%;margin-top:12px}
.book-private-note{font-size:.69rem;color:var(--muted);line-height:1.45;text-align:center;padding:0 10px}
.book-create-shell .card h2{margin-top:2px}

@media(max-width:1080px){.book-builder-form{grid-template-columns:1fr}.book-builder-side{position:static;display:grid;grid-template-columns:260px minmax(0,1fr);gap:12px;align-items:start}.book-generate{margin-top:0;align-self:start}.book-private-note{grid-column:2;text-align:left;margin-top:-70px}.book-builder-main{grid-template-columns:1fr 1fr}}

@media(max-width:760px){.profile-hero-actions{width:100%;justify-content:stretch}.profile-hero-actions .btn{flex:1}.book-create-shell{padding:20px 14px 90px}.book-create-head{align-items:flex-start;flex-direction:column}.book-person-chip{width:100%}.book-builder-main{grid-template-columns:1fr}.book-option-grid{grid-template-columns:1fr}.book-builder-side{display:block}.book-preview-card{display:none}.book-generate{position:sticky;bottom:76px;z-index:10;box-shadow:0 10px 30px rgba(23,77,58,.26)}.book-private-note{margin:9px 0 0;text-align:center}.book-back{margin-left:auto}.book-create-shell .topbar{padding:0 12px}}

.book-format-warning{font-size:.7rem;line-height:1.45;background:#fff6df;border:1px solid #ecdcae;border-radius:10px;padding:10px 11px;color:#6f5a25}
.book-format-warning strong{display:block;margin-bottom:2px}


/* v3.6.1: sikker HTML i redaktionelle fritekstfelter */

.rich-content{line-height:1.7;color:inherit;overflow-wrap:anywhere}
.rich-content>:first-child{margin-top:0}
.rich-content>:last-child{margin-bottom:0}
.rich-content p{margin:.55em 0}
.rich-content h2,.rich-content h3,.rich-content h4{margin:1.05em 0 .42em;line-height:1.18;color:var(--ink)}
.rich-content h2{font-size:1.35em}
.rich-content h3{font-size:1.16em}
.rich-content h4{font-size:1.02em}
.rich-content ul,.rich-content ol{margin:.6em 0 .8em;padding-left:1.35em}
.rich-content li+li{margin-top:.22em}
.rich-content blockquote{margin:.8em 0;padding:.7em 1em;border-left:3px solid #9dbbab;background:var(--soft);border-radius:0 10px 10px 0;color:#52635b}
.rich-content a{color:var(--green);text-decoration-thickness:1px;text-underline-offset:2px}
.rich-content hr{border:0;border-top:1px solid var(--line);margin:1.1em 0}
.rich-content code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;background:#f0f4f1;border:1px solid var(--line);border-radius:5px;padding:.08em .3em;font-size:.9em}
.rich-compact{font-size:.92em;line-height:1.55;margin-top:.35em}
.rich-compact p{margin:.3em 0}
.rich-compact h2,.rich-compact h3,.rich-compact h4{font-size:1em;margin:.55em 0 .25em}
.rich-caption{font-weight:700;font-size:.84rem;line-height:1.35}
.rich-caption p{margin:0}
.rich-inline p{display:inline;margin:0}
.rich-inline br{display:none}
.editor-html-help{margin:8px 0 14px;padding:11px 13px;border:1px solid #d8e3dc;border-radius:12px;background:#f7faf8;color:var(--muted);font-size:.76rem;line-height:1.55}
.editor-html-help strong{color:var(--ink)}
.editor-html-help code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;background:#e9f1ec;border-radius:4px;padding:1px 4px;color:var(--green)}
.html-editor{font-family:inherit;line-height:1.55;tab-size:2}
.form-grid label>small{font-weight:500;color:var(--muted)}
.research-source-note{font-style:normal;margin-top:.28rem}
.research-source-note a{pointer-events:none}

@media(max-width:640px){.editor-html-help{font-size:.72rem}.rich-content h2{font-size:1.22em}.rich-content h3{font-size:1.1em}}


/* v3.7: stabilisering, datakontrol og redigering */

.person-picker{position:relative;display:grid;gap:5px}
.person-picker>input[type=search]{width:100%;border:1px solid #cfdad3;border-radius:10px;background:#fff;padding:11px}
.person-picker-chosen{color:var(--green)!important;font-weight:700!important}
.person-picker-results{position:absolute;z-index:45;top:100%;left:0;right:0;margin-top:5px;padding:6px;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:0 16px 40px rgba(21,36,31,.16);max-height:310px;overflow:auto}
.person-picker-results[hidden]{display:none}
.person-picker-results button{display:flex;width:100%;align-items:center;gap:9px;border:0;background:#fff;border-radius:9px;padding:8px;text-align:left;cursor:pointer}
.person-picker-results button:hover,.person-picker-results button:focus{background:var(--soft);outline:0}
.person-picker-results button>span:nth-child(2){min-width:0;flex:1}
.person-picker-results strong,.person-picker-results small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.person-picker-results small{color:var(--muted);font-size:.7rem}
.edit-existing>summary{display:flex;gap:8px;align-items:center}
.edit-existing>summary span{margin-left:auto;background:var(--soft);color:var(--green);border-radius:999px;padding:2px 8px;font-size:.72rem}
.edit-existing-list{display:grid;gap:7px;margin-top:12px}
.edit-item{border:1px solid var(--line)!important;border-radius:12px;padding:0!important;background:#fbfcfb}
.edit-item>summary{display:grid!important;grid-template-columns:90px 1fr auto;gap:9px;align-items:center;padding:11px 12px!important}
.edit-item>summary>span{margin:0!important;padding:0!important;background:none!important;color:var(--green)!important;font-size:.68rem!important;text-transform:uppercase;letter-spacing:.08em}
.edit-item>summary>strong{font-size:.84rem;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.edit-item>summary>small{color:var(--muted);font-size:.7rem}
.edit-item>form{padding:0 12px 12px;border-top:1px solid var(--line)}
.data-health{margin-top:16px;padding:20px}
.health-badge{border-radius:999px;padding:7px 11px;font-size:.72rem;font-weight:800;white-space:nowrap}
.health-badge.good{background:#e4f2e8;color:#22603e}
.health-badge.warn{background:#fff1df;color:#8a5b15}
.health-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:14px}
.health-item{border:1px solid var(--line);border-radius:13px;padding:14px;background:#fbfcfb}
.health-item strong,.health-item span,.health-item small{display:block}
.health-item strong{font-size:1.5rem;line-height:1}
.health-item span{font-weight:800;font-size:.8rem;margin-top:6px}
.health-item small{color:var(--muted);font-size:.7rem;line-height:1.4;margin-top:4px}
.health-item.good{border-color:#d8e8dd}
.health-item.warn{background:#fffaf2;border-color:#efdfc3}
.health-item.note{background:#f7f8fb}
.health-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
.health-actions form{margin:0}
.health-details{border-top:1px solid var(--line);margin-top:15px;padding-top:12px}
.health-details summary{cursor:pointer;font-weight:800}
.health-warning-list{display:grid;grid-template-columns:repeat(2,1fr);gap:7px;margin-top:10px}
.health-warning-list a{display:flex;justify-content:space-between;gap:12px;text-decoration:none;border:1px solid var(--line);border-radius:10px;padding:9px 10px;background:#fff;font-size:.76rem}
.health-warning-list span{color:var(--muted);text-align:right}
.user-row .admin-protect-note{grid-column:1/-1;color:var(--muted);font-size:.7rem}
.notice.info{background:#eef5f1;color:#315447;border:1px solid #d5e4db}

@media(max-width:900px){.health-grid{grid-template-columns:repeat(2,1fr)}.health-warning-list{grid-template-columns:1fr}.edit-item>summary{grid-template-columns:70px 1fr}.edit-item>summary>small{grid-column:2}}

@media(max-width:640px){.health-grid{grid-template-columns:1fr}.data-health{padding:16px}.health-actions{display:grid}.health-actions .btn{width:100%}.edit-item>summary{grid-template-columns:1fr}.edit-item>summary>span,.edit-item>summary>small{grid-column:auto}.person-picker-results{position:fixed;left:12px;right:12px;top:auto;max-height:42vh}}

.research-task-edit{margin-top:8px;border-top:1px solid var(--line);padding-top:7px}
.research-task-edit>summary{cursor:pointer;color:var(--green);font-size:.72rem;font-weight:800}
.research-task-edit .form-grid{margin-top:9px;grid-template-columns:1fr 180px}
.research-task-edit textarea{min-height:76px}

@media(max-width:640px){.research-task-edit .form-grid{grid-template-columns:1fr}.research-task-edit .form-grid .wide{grid-column:auto}}


/* v3.8: udvidet visuelt træ */

@media(min-width:641px){
  .tree-depth-panel{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap;margin:0 0 18px;padding:10px 12px;border:1px solid rgba(208,222,213,.9);border-radius:14px;background:rgba(255,255,255,.72);box-shadow:0 5px 18px rgba(21,36,31,.035)}
  .tree-depth-control{display:flex;align-items:center;gap:6px;padding:5px 7px 5px 10px;border:1px solid var(--line);border-radius:11px;background:#fff}
  .tree-depth-control>span{font-size:.72rem;font-weight:800;color:#4e6158;margin-right:2px}
  .tree-depth-control>button{width:27px;height:27px;display:grid;place-items:center;border:1px solid #cbd8d0;border-radius:8px;background:#f8faf8;color:var(--green);font-size:1rem;font-weight:800;line-height:1;cursor:pointer}
  .tree-depth-control>button:hover:not(:disabled){background:var(--soft);border-color:#abc2b3}
  .tree-depth-control>button:disabled{opacity:.32;cursor:default}
  .tree-depth-control>strong{min-width:18px;text-align:center;color:var(--green);font-size:.88rem}
  .tree-depth-control>small{color:var(--muted);font-size:.64rem;margin-right:3px}
  .tree-depth-actions{display:flex;gap:6px;margin-left:4px}
  .tree-depth-actions .btn:disabled{opacity:.42;cursor:default}
  .tree-visual-stack{position:relative;padding:2px 0 4px}
  .tree-visual-stack:before{content:"";position:absolute;left:50%;top:17px;bottom:17px;width:1px;background:linear-gradient(to bottom,transparent,#b7cabd 4%,#8faf9a 50%,#b7cabd 96%,transparent);z-index:0}
  .tree-generation{position:relative;z-index:1;padding:2px 0}
  .tree-generation-label{display:flex;align-items:center;justify-content:center;gap:6px;position:relative;width:max-content;max-width:100%;padding:2px 8px;margin:5px auto 8px;background:#f7faf7;border-radius:999px}
  .tree-generation-label small{display:grid;place-items:center;min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:#e5efe8;color:var(--green);font-size:.62rem;letter-spacing:0}
  .tree-line{position:relative;z-index:1;background:#91ae9b}
  .tree-level.ancestors.depth-1{max-width:540px}
  .tree-level.ancestors.depth-2{max-width:900px}
  .tree-level.ancestors.depth-3{max-width:1120px}
  .tree-level.ancestors.depth-4,.tree-level.ancestors.depth-5{max-width:1320px}
  .tree-level.descendants.depth-1{max-width:1180px}
  .tree-level.descendants.depth-2,.tree-level.descendants.depth-3{max-width:1320px}
  .tree-level.dense{grid-template-columns:repeat(auto-fit,minmax(132px,1fr));gap:7px}
  .tree-level.very-dense{grid-template-columns:repeat(auto-fit,minmax(112px,1fr));gap:6px}
  .tree-level.dense .tree-person,.tree-level.very-dense .tree-person{max-width:205px}
  .tree-level.dense .tree-person button,.tree-level.very-dense .tree-person button{padding:7px 6px;gap:6px}
  .tree-level.dense .tree-person .avatar{width:32px;height:32px;font-size:.62rem}
  .tree-level.very-dense .tree-person .avatar{width:28px;height:28px;font-size:.58rem}
  .tree-level.dense .tree-person strong{font-size:.76rem}
  .tree-level.very-dense .tree-person strong{font-size:.7rem;-webkit-line-clamp:2}
  .tree-level.dense .tree-person small,.tree-level.very-dense .tree-person small{font-size:.59rem}
  .tree-level.very-dense .tree-person a{padding:0 6px}
}

@media(min-width:641px) and (max-width:900px){
  .tree-depth-panel{justify-content:flex-start;padding:9px;gap:7px}
  .tree-depth-control{padding-left:8px}
  .tree-depth-control>small{display:none}
  .tree-depth-actions{width:100%;margin-left:0}
  .tree-depth-actions .btn{flex:1}
  .tree-level.dense,.tree-level.very-dense{grid-template-columns:repeat(auto-fit,minmax(120px,1fr))}
}

@media(max-width:640px){
  .mobile-tree-more-sections details.great-grandparents summary,
  .mobile-tree-more-sections details.great-great-grandparents summary,
  .mobile-tree-more-sections details.great-great-great-grandparents summary{color:#244f40}
  .mobile-tree-more-sections details[open] .mobile-tree-grid{animation:treeFoldIn .16s ease-out}
}

@keyframes treeFoldIn{from{opacity:.45;transform:translateY(-3px)}to{opacity:1;transform:none}}


/* v4.0: personoprettelse, sikker sletning og historiske perioder */

.new-person-panel,.period-summary,.period-results,.period-admin{padding:22px;margin-top:18px}

.new-person-panel>summary,.period-admin>details>summary{cursor:pointer;font-weight:800;font-size:1.05rem;list-style-position:inside;color:var(--green)}

.new-person-panel>summary small,.period-admin summary small{color:var(--muted);font-weight:500;font-size:.8rem;margin-left:8px}

.new-person-form{margin-top:18px}
.new-person-relations h3{margin:8px 0 0}
.new-person-relations p{margin:4px 0}

.btn.danger{border-color:#b64646;color:#982d2d;background:#fff3f3}
.btn.danger:hover{background:#ffe3e3}

.delete-person-zone{margin-top:18px;padding:20px;border-color:#e7caca;background:#fffafa}

.delete-person-zone>details>summary{font-weight:800;color:#9d3737;cursor:pointer}
.delete-person-zone p{max-width:72ch;line-height:1.6}

.delete-person-form{display:grid;gap:12px;max-width:530px}
.delete-person-form>label{display:grid;gap:7px;font-weight:650}

.delete-person-form input[type=text]{padding:12px;border:1px solid #d9b8b8;border-radius:10px;width:100%}

.delete-person-form .check{display:flex;align-items:flex-start;gap:8px;font-size:.9rem}
.delete-person-form .check input{margin-top:4px}

.delete-person-form .btn{justify-self:start}

.profile-period-badges{display:flex;flex-wrap:wrap;gap:10px;margin-top:13px}

.period-tag{--badge-bg:#eef5ef;--badge-border:#ccded1;--badge-ink:#24533a;display:inline-flex;align-items:center;gap:10px;max-width:100%;padding:5px 12px 5px 6px;border-radius:999px;font-size:.73rem;line-height:1.3;text-decoration:none;font-style:normal;font-weight:760;border:1px solid var(--badge-border);background:linear-gradient(180deg,#fff 0%,var(--badge-bg) 100%);color:var(--badge-ink);box-shadow:0 2px 10px rgba(20,38,31,.06);white-space:normal}

.period-tag-label{min-width:0;overflow-wrap:anywhere}

.period-tag-rosette{position:relative;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;min-width:28px;border-radius:50%;background:#fff;border:1px solid var(--badge-border);box-shadow:inset 0 0 0 5px var(--badge-bg)}

.period-tag-rosette::before,.period-tag-rosette::after{content:"";position:absolute;bottom:-8px;width:10px;height:13px;background:var(--badge-bg);border:1px solid var(--badge-border);border-top:none;clip-path:polygon(0 0,100% 0,50% 100%)}

.period-tag-rosette::before{left:4px}

.period-tag-rosette::after{right:4px}

.period-tag-rosette>span{position:relative;z-index:1;font-size:.62rem;line-height:1;font-weight:900;letter-spacing:-.02em}

.period-tag.died{--badge-bg:#fff0ec;--badge-border:#eed0c5;--badge-ink:#8e4030}

.period-tag.survived{--badge-bg:#eef5ef;--badge-border:#ccded1;--badge-ink:#24533a}

.period-tag.lived{--badge-bg:#f0f1fb;--badge-border:#d6d7eb;--badge-ink:#4d4a84}

.period-tag.possible{--badge-bg:#f5f5f3;--badge-border:#e1e3dc;--badge-ink:#6b6c65}

.period-tag.infant-death{--badge-bg:#fff1f6;--badge-border:#f0d3df;--badge-ink:#a04372}

.period-tag.child-death{--badge-bg:#fff8e9;--badge-border:#eedfb8;--badge-ink:#8a6420}

.period-tag.early-death{--badge-bg:#fff2e8;--badge-border:#f0d8c4;--badge-ink:#99512d}

.period-tag.longevity{--badge-bg:#ecf6fb;--badge-border:#cfe3ec;--badge-ink:#285f7d}

.period-tag.longevity .period-tag-rosette>span{font-size:.56rem}

.profile-period-badges .period-tag:hover,.period-person:hover .period-tag,.history-period-card:hover .period-tag{border-color:var(--green)}

.periods-nav{display:flex;gap:9px;overflow:auto;padding:4px 0 8px;scrollbar-width:thin}

.period-nav-item{min-width:155px;display:grid;gap:3px;align-content:center;padding:12px 14px;background:#fff;border:1px solid var(--line);border-radius:14px;text-decoration:none;font-weight:800;font-size:.86rem}

.period-nav-item small{font-weight:500;color:var(--muted)}
.period-nav-item.active{background:var(--green);color:#fff;border-color:var(--green)}
.period-nav-item.active small{color:#d9e8dc}

.period-summary{margin:16px 0}
.period-summary h2{font-size:1.6rem;margin:0 0 8px}
.period-summary p{margin:6px 0}

.period-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
.period-stat{display:grid;gap:8px;padding:17px 15px;background:#fff;border:1px solid var(--line);border-radius:14px;text-decoration:none}

.period-stat strong{font-size:1.8rem}
.period-stat span{font-size:.8rem;color:var(--muted)}
.period-stat.active{outline:2px solid var(--green)}

.period-results .section-head{margin-bottom:15px}
.period-results .section-head .muted{max-width:80ch;font-size:.84rem;line-height:1.5}

.period-person-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}

.period-person{display:flex;gap:10px;align-items:flex-start;border:1px solid var(--line);border-radius:12px;padding:12px;text-decoration:none;min-width:0}

.period-person>span:last-child{display:grid;gap:5px;min-width:0}
.period-person strong{overflow-wrap:anywhere}
.period-person small{color:var(--muted)}
.period-person .period-tag{justify-self:start}

.period-admin>details>summary{margin-bottom:10px}
.period-admin .period-edit{border-top:1px solid var(--line);padding:14px 0}

.period-admin .period-edit>summary{cursor:pointer;font-weight:750}
.period-admin .period-delete{margin-top:12px}
.period-admin h3{margin:24px 0 10px}

@media(max-width:1050px){.period-person-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

@media(max-width:700px){.period-stats{grid-template-columns:repeat(2,1fr)}.period-person-grid{grid-template-columns:1fr}.period-results .section-head{display:block}.periods-page .page-head{align-items:flex-start}.profile-period-badges{margin-top:12px}.new-person-panel,.period-summary,.period-results,.period-admin{padding:16px}.new-person-form .wide{grid-column:1/-1}}


/* Version 4.1/4.2: papirkurv, versionshistorik og forskningsstatus */

.safety-panel{margin-top:22px}

.safety-count{font-size:.88rem;color:var(--muted,#6a6b72);white-space:nowrap}

.safety-list{border-top:1px solid var(--line,#e4e3df);margin-top:18px}

.safety-row{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:14px;padding:14px 0;border-bottom:1px solid var(--line,#e4e3df)}

.safety-row>div{display:flex;flex-direction:column;gap:4px;min-width:0}
.safety-row small{color:var(--muted,#6a6b72);overflow-wrap:anywhere}

.safety-row form,.backup-actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap}

.backup-actions{margin:16px 0}
.backup-actions .check{margin-right:12px}

.profile-quality{margin:16px 0}
.profile-quality h3{margin-bottom:12px}
.profile-quality h4{margin:16px 0 8px;font-size:.92rem}

.quality-progress-title{display:flex;justify-content:space-between;align-items:baseline;gap:8px;margin-bottom:9px}

.quality-progress-title strong{font-size:1.3rem}
.quality-progress-title span{font-size:.82rem;color:var(--muted,#777)}

.quality-meter{height:10px;background:#e8e7df;border-radius:999px;overflow:hidden}
.quality-meter span{display:block;height:100%;border-radius:999px;background:#2d806e}

.quality-checks,.quality-suggestions{list-style:none;padding:0;margin:12px 0;display:flex;flex-direction:column;gap:8px;font-size:.88rem}

.quality-checks li{display:flex;gap:8px;align-items:center}
.quality-checks li span{width:18px;text-align:center;font-weight:bold}
.quality-checks .is-done span{color:#2d806e}
.quality-checks .is-missing span{color:#9b6945}

.small-note{font-size:.78rem}
.quality-suggestions{list-style:disc;padding-left:18px}
.quality-dupe{display:flex;flex-direction:column;gap:4px;padding:10px 12px;border-bottom:1px solid var(--line,#e5e3e0)}
.quality-dupe span{font-size:.85rem;color:var(--muted,#777)}

@media(max-width:640px){.safety-row,.safety-row form{align-items:flex-start}.safety-row form{width:100%}}


/* Version 4.3: administration og historisk kontekst */

/* Tidligere lå sikkerhedskortene uden for .admin-grid og arvede derfor ingen padding. */

#papirkurv,#sikkerhedskopi,#versionshistorik{padding:clamp(17px,2.5vw,26px);min-width:0;overflow-wrap:anywhere;scroll-margin-top:92px}

#papirkurv>.section-head{align-items:start;gap:14px;flex-wrap:wrap}

#papirkurv .safety-list,#versionshistorik .safety-list{max-width:100%;min-width:0}

#papirkurv .safety-row,#versionshistorik .safety-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:center}

#papirkurv .safety-row>div,#versionshistorik .safety-row>div{min-width:0}

#papirkurv .safety-row strong,#versionshistorik .safety-row strong{overflow-wrap:anywhere}

#papirkurv .safety-row form,#versionshistorik .safety-row form{display:flex;flex-wrap:wrap;gap:9px;justify-content:flex-end;align-items:center;max-width:100%}

#sikkerhedskopi .backup-actions{display:flex;flex-wrap:wrap;align-items:center;gap:14px 20px;margin:18px 0}

#sikkerhedskopi .backup-actions>.check{display:flex;align-items:flex-start;gap:10px;margin:0;flex:1 1 280px;min-width:0;line-height:1.5;font-weight:500}

#sikkerhedskopi .backup-actions>.check input{flex-shrink:0;margin-top:4px}

#sikkerhedskopi .backup-actions>.btn{white-space:normal;text-align:center;flex-shrink:0}

.admin-grid>.admin-log{padding:0;min-width:0;align-self:start;overflow:hidden}

.admin-log>summary{list-style:none;cursor:pointer;padding:20px;display:flex;align-items:center;justify-content:space-between;gap:12px}

.admin-log>summary::-webkit-details-marker{display:none}

.admin-log>summary>span:first-child{display:grid;gap:4px;min-width:0}

.admin-log>summary strong{font-size:1.15rem}

.admin-log>summary small{color:var(--muted);font-size:.79rem}

.admin-log-toggle{border:solid var(--green);border-width:0 2px 2px 0;transform:rotate(45deg);width:10px;height:10px;flex:none;transition:transform .16s;margin:0 5px}

.admin-log[open] .admin-log-toggle{transform:rotate(225deg)}

.admin-log-body{border-top:1px solid var(--line);padding:7px 20px 20px;max-height:65vh;overflow-y:auto}

.admin-log .activity{overflow-wrap:anywhere}

.person-history,.contemporaries{margin-top:16px;min-width:0}

.person-history>.section-head,.contemporaries>.section-head{gap:16px;flex-wrap:wrap}

.person-history>.section-head .muted,.contemporaries>.section-head .muted{max-width:72ch;line-height:1.55}

/* Personprofil: små, klikbare periodeikoner i stedet for store kort. */

.history-period-icons{display:flex;flex-wrap:wrap;gap:5px;margin-top:10px;align-items:center}

.history-period-icons .history-period-icon{display:inline-flex;flex:0 0 32px;align-items:center;justify-content:center;width:32px;height:32px;padding:3px;border:0;border-radius:50%;background:transparent;box-shadow:none;line-height:1;gap:0}

.history-period-icons .history-period-icon .period-tag-rosette{width:23px;height:23px;min-width:23px;box-shadow:inset 0 0 0 4px var(--badge-bg)}

.history-period-icons .history-period-icon .period-tag-rosette:before,.history-period-icons .history-period-icon .period-tag-rosette:after{bottom:-5px;width:7px;height:9px}

.history-period-icons .history-period-icon .period-tag-rosette:before{left:3px}

.history-period-icons .history-period-icon .period-tag-rosette:after{right:3px}

.history-period-icons .history-period-icon .period-tag-rosette>span{font-size:.65rem}

.history-period-icons .history-period-icon:hover,.history-period-icons .history-period-icon:focus-visible{background:var(--soft);outline:2px solid var(--green);outline-offset:1px}

.recollection:hover{border-color:#9ebdab;background:#f3f8f4}

.history-uncertain{border-top:1px solid var(--line);padding-top:14px;margin-top:18px}

.history-uncertain>summary{cursor:pointer;font-size:.85rem;font-weight:750;color:var(--green);padding:7px 0}

.history-uncertain-links{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}

.history-uncertain-links a{border:1px solid var(--line);padding:7px 9px;border-radius:9px;font-size:.79rem;text-decoration:none}

.person-history>h3{font-size:1rem;margin:22px 0 12px}

.historical-notes{display:grid;gap:10px}
.historical-note{padding:14px;border-left:3px solid var(--green);border-radius:8px;background:var(--soft);overflow-wrap:anywhere}

.historical-note-header{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap}
.historical-note-header span,.historical-note>small{font-size:.76rem;color:var(--muted)}
.historical-note>.rich-content{margin-top:8px}
.historical-note>a{font-size:.83rem;color:var(--green)}

.contemporary-summary{display:flex;flex-wrap:wrap;align-items:center;gap:6px 9px;margin:10px 0 15px;font-size:.81rem;color:var(--muted)}
.contemporary-summary strong{font-size:1.15rem;color:var(--green)}

.contemporary-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:8px}

.contemporary-list>a{display:flex;align-items:center;gap:9px;border:1px solid var(--line);border-radius:11px;padding:10px;text-decoration:none;min-width:0}

.contemporary-list>a:hover{border-color:#a4bfab}
.contemporary-list>a>span{min-width:0;flex:1;overflow-wrap:anywhere}
.contemporary-list>a strong,.contemporary-list>a small{display:block;font-size:.8rem}
.contemporary-list>a small{margin-top:3px;font-size:.72rem;color:var(--muted)}

.contemporary-list>a em{font-size:.67rem;color:var(--green);font-style:normal;font-weight:700;max-width:94px;text-align:right}

.timeline-item.historical-marker .timeline-dot{background:#ac8052;box-shadow:0 0 0 4px #fff2e4}

.timeline-item.historical-manual .timeline-dot{background:#7c67a3;box-shadow:0 0 0 4px #f2eafa}

.history-editor{margin:16px 0;border:1px solid var(--line);border-radius:12px;padding:14px}

.history-editor>summary{cursor:pointer;font-weight:800;color:var(--green)}
.history-editor>.muted{line-height:1.5}

.history-delete-form{margin:6px 0 15px}
.edit-historical-actions{display:flex;gap:10px}

.recollections-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:10px;margin-top:14px}

.recollection{border:1px solid var(--line);border-radius:12px;padding:14px;min-width:0}
.recollection>a{text-decoration:none;color:var(--green)}
.recollection>span{display:block;font-size:.73rem;margin-top:5px}
.recollection h3{font-size:.96rem;margin:10px 0 0}

@media(max-width:720px){
  #papirkurv .safety-row,#versionshistorik .safety-row{grid-template-columns:minmax(0,1fr)}
  #papirkurv .safety-row form,#versionshistorik .safety-row form{justify-content:flex-start;width:100%}
  #sikkerhedskopi .backup-actions>.btn{width:100%;flex-shrink:1}
  .admin-grid>.admin-log{grid-column:1/-1}
  .admin-log>summary{padding:16px}.admin-log-body{padding:7px 16px 16px}
  .contemporary-list,.recollections-grid{grid-template-columns:1fr}
  .contemporary-list>a em{max-width:80px}
}


/* Version 4.4 – statistik, familier, invitationer og administration */

.admin-shortcuts{display:flex;flex-wrap:wrap;gap:8px;margin:2px 0 18px}

.admin-shortcuts a,.people-switch a{white-space:nowrap}

.admin-shortcuts a{padding:9px 13px;border:1px solid #cbd8d0;background:#fff;border-radius:999px;text-decoration:none;font-weight:750;font-size:.82rem;color:var(--green)}

.admin-shortcuts a:hover{background:var(--soft)}

#admin-users,#slaegtskontrol,#datakontrol,#admin-log{scroll-margin-top:96px}

#admin-users{min-width:0}
#admin-users .user-row{overflow-wrap:anywhere}

#admin-users .user-row>div{min-width:0}
#admin-users .user-row small{display:block;overflow-wrap:anywhere}

.user-menu{display:flex;flex-direction:column;align-items:flex-end;gap:3px;min-width:105px}

.user-menu span{font-weight:700}
.user-menu small{font-size:.68rem}

.user-menu a{display:inline;color:var(--green);font-size:.72rem;line-height:1.1}

.stats-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:10px}

.stat-tile{padding:20px;min-width:0}
.stat-tile strong{display:block;font-size:clamp(1.6rem,3vw,2.4rem);color:var(--green);font-variant-numeric:tabular-nums}
.stat-tile span{display:block;color:var(--muted);font-size:.85rem;margin-top:5px}

.stats-panels{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:22px}
.stats-panels>.card{padding:21px;min-width:0}
.stats-panels>.card h2{font-size:1.16rem}

.stat-bar-row{display:grid;grid-template-columns:92px minmax(0,1fr) 48px;gap:11px;align-items:center;padding:10px 0;font-size:.83rem}
.stat-bar-row strong{text-align:right}

.stat-bar-track{height:13px;background:#edf3ed;border-radius:999px;overflow:hidden}
.stat-bar-track>span{display:block;height:100%;background:#3a8365;border-radius:999px;min-width:2px}

.stat-records{padding:0;margin:8px 0 0;list-style:none}
.stat-records li{padding:11px 0;display:flex;flex-wrap:wrap;gap:8px;justify-content:space-between;align-items:baseline;border-bottom:1px solid var(--line);min-width:0}

.stat-records li a,.stat-records li span{font-weight:700;overflow-wrap:anywhere}
.stat-records li strong{color:var(--green);margin-left:auto}
.stat-records li small{color:var(--muted)}

.family-directory{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.family-directory-card{padding:21px;min-width:0}
.family-directory-card h3{margin:0 0 12px;font-size:1.12rem}
.family-directory-card>small{display:block;margin:13px 0 9px;color:var(--muted)}

.family-links{display:flex;flex-wrap:wrap;gap:8px}
.family-links a{display:inline-flex;align-items:center;gap:7px;padding:7px 10px 7px 7px;min-width:0;max-width:100%;border:1px solid var(--line);border-radius:10px;text-decoration:none;background:#fbfdfb;font-size:.81rem;font-weight:650}
.family-links a:hover{background:var(--soft);border-color:#a6c1ab}
.family-links .avatar{width:28px;height:28px;font-size:.66rem}

.people-switch{display:flex;flex-wrap:wrap;gap:8px;margin-top:13px}
.profile-family-group{border-top:1px solid var(--line);padding:13px 0}
.profile-family-group h3{font-size:.88rem;margin:0 0 9px}

.account-card{padding:24px;max-width:700px}
.account-card .form-grid{max-width:590px}
.account-card label{min-width:0}
.invite-copy{width:100%;padding:12px;font-size:.82rem;margin-top:10px;border:1px solid var(--line);border-radius:9px}

.tree-toolbar-actions{display:flex;flex-wrap:wrap;gap:7px;justify-content:flex-end}

@media(max-width:1120px){.desktop-nav{gap:0}.desktop-nav .nav-link{padding-left:7px;padding-right:7px;font-size:.82rem}.search-open{min-width:100px}.topbar{gap:12px}}

@media(max-width:900px){.family-directory,.stats-panels{grid-template-columns:1fr}.stats-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.admin-shortcuts{overflow-x:auto;flex-wrap:nowrap;padding-bottom:5px}}

@media(max-width:640px){.stats-cards{gap:8px}.stat-tile{padding:14px}.stat-tile strong{font-size:1.55rem}.stats-panels>.card{padding:16px}.stat-bar-row{grid-template-columns:82px minmax(0,1fr) 35px;gap:7px}.account-card{padding:16px}.family-directory-card{padding:16px}.admin-shortcuts{margin-top:0}}


.admin-member{margin:9px 0;border:1px solid var(--line);border-radius:12px;overflow:hidden}

.admin-member>summary{cursor:pointer;display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px;padding:13px;background:#f8faf8;font-size:.9rem}

.admin-member>summary span{color:var(--muted);font-size:.76rem}

.admin-member[open]>summary{border-bottom:1px solid var(--line);background:var(--soft)}

.admin-member>.user-row{padding:14px;margin:0;display:grid;grid-template-columns:1fr 1fr;gap:12px}

.admin-member .user-row>div{grid-column:1/-1}
.admin-member .user-row .btn{justify-self:end}

.admin-member>.user-row select,.admin-member>.user-row input{min-width:0}

@media(max-width:640px){.admin-member>.user-row{grid-template-columns:1fr}.admin-member .user-row .btn{justify-self:stretch}}


.mobile-account-menu{display:none;position:relative}
.mobile-account-menu>summary{cursor:pointer;list-style:none;border:1px solid var(--line);border-radius:9px;background:white;padding:8px 12px;font-size:1.05rem}
.mobile-account-menu>summary::-webkit-details-marker{display:none}

.mobile-account-menu nav{position:absolute;right:0;top:calc(100% + 8px);z-index:50;min-width:205px;padding:8px;display:grid;gap:3px;background:white;border:1px solid var(--line);border-radius:13px;box-shadow:var(--shadow)}

.mobile-account-menu nav a{display:block;text-decoration:none;border-radius:8px;padding:10px 12px;font-size:.88rem;font-weight:650}
.mobile-account-menu nav a:hover{background:var(--soft)}

@media(max-width:980px){.user-menu{display:none}.mobile-account-menu{display:block}.topbar{gap:10px;padding:0 14px}}


/* Version 4.5 – samlet brugermenu: rolig dropdown på desktop og mobil */

.topbar{overflow:visible}

.user-menu{position:relative;display:block;flex:0 0 auto;margin-left:0;min-width:0;font-size:.875rem;line-height:1.35;z-index:60}

.user-menu>summary{display:flex;align-items:center;gap:10px;cursor:pointer;list-style:none;white-space:nowrap;padding:7px 10px;border-radius:13px;border:1px solid transparent;min-width:0;max-width:228px;background:transparent;transition:background .15s,border-color .15s;outline-offset:3px}

.user-menu>summary::-webkit-details-marker{display:none}

.user-menu>summary:hover,.user-menu[open]>summary{background:#f3f7f3;border-color:var(--line)}

.user-menu>summary:focus-visible{outline:2px solid var(--green)}

.user-menu-avatar{position:relative;display:block;width:34px;height:34px;flex:0 0 34px;border-radius:11px;background:var(--soft);border:1px solid #bed3c3;overflow:hidden}

.user-menu-head{position:absolute;top:6px;left:12px;width:10px;height:10px;border-radius:50%;background:var(--green)}

.user-menu-shoulders{position:absolute;left:7px;bottom:4px;width:20px;height:13px;border-radius:12px 12px 5px 5px;background:var(--green)}

.user-menu-identity{display:flex;flex-direction:column;align-items:flex-start;min-width:0;max-width:144px}

.user-menu-identity strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%;font-size:.83rem;color:var(--ink);font-weight:750}

.user-menu-identity small{font-size:.71rem;line-height:1.2;color:var(--muted)}

.user-menu-chevron{color:var(--muted);font-size:1.15rem;line-height:1;transition:transform .15s}

.user-menu[open] .user-menu-chevron{transform:rotate(180deg)}

.user-menu-popover{position:absolute;right:0;top:calc(100% + 9px);width:244px;max-width:calc(100vw - 20px);padding:8px;background:white;border:1px solid #d4e1d6;border-radius:16px;box-shadow:0 18px 48px rgba(15,46,29,.17);display:flex;flex-direction:column;gap:2px}

.user-menu .user-menu-popover a{display:flex;align-items:center;text-align:left;font-size:.86rem;line-height:1.4;font-weight:650;letter-spacing:0;color:var(--ink);text-decoration:none;border-radius:9px;padding:10px 12px;min-height:41px}

.user-menu .user-menu-popover a:hover,.user-menu .user-menu-popover a:focus-visible{background:var(--soft);color:var(--green)}

.user-menu .user-menu-popover .user-menu-logout{border-top:1px solid var(--line);border-radius:0;margin-top:5px;padding-top:13px;color:#9b3038}

@media(max-width:1120px){.user-menu>summary{padding:6px;gap:7px}}

@media(max-width:980px){.user-menu{display:block}.mobile-account-menu{display:none}.user-menu-identity{display:none}.user-menu>summary{gap:4px;padding:4px 7px}.user-menu-avatar{width:34px;height:34px}.user-menu-popover{right:-3px}}

@media(max-width:380px){.brand span:last-child{max-width:158px;overflow:hidden;text-overflow:ellipsis}.topbar{gap:7px}}


/* Version 4.5 – forklarlige, prioriterede forskningsforslag */

.research-plan-heading{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 13px;margin:6px 0 15px}

.research-plan-heading strong{font-size:.92rem;color:var(--green)}

.research-plan-heading small{font-size:.76rem;color:var(--muted)}

.research-guide{min-width:0}

.research-guide-details{border:1px solid var(--line);border-radius:11px;background:#f9fbf9;padding:0;margin:12px 0;overflow:hidden}

.research-guide-details>summary{cursor:pointer;list-style:none;position:relative;display:block;color:var(--green);font-size:.81rem;font-weight:800;padding:12px 34px 12px 13px}

.research-guide-details>summary::-webkit-details-marker{display:none}

.research-guide-details>summary:after{content:'+';position:absolute;right:13px;font-size:1rem;line-height:1;top:12px}

.research-guide-details[open]>summary:after{content:'−'}

.research-guide-details[open]>summary{border-bottom:1px solid var(--line)}

.research-guide-details>p{margin:12px 14px;line-height:1.5;font-size:.81rem;color:#405449}

.research-guide-steps{padding:0 18px 0 34px;margin:9px 0 14px;display:grid;gap:9px}

.research-guide-steps li{font-size:.81rem;line-height:1.5;padding-left:2px}

.research-search-hint{display:block;margin:14px;padding:0;font-size:.77rem;font-weight:750;color:var(--muted)}

.research-search-hint input{display:block;width:100%;padding:10px 11px;border:1px solid #cbd9cd;border-radius:9px;margin-top:6px;background:white;font-size:.82rem;color:var(--ink);cursor:text}

.research-guide-details .research-guide-caution{padding:10px 11px;margin:12px 14px 14px;background:#edf3ee;border-radius:9px;font-size:.76rem}

.research-more-suggestions{margin-top:13px;border-top:1px solid var(--line);padding:13px 0 0}

.research-more-suggestions>summary{cursor:pointer;font-size:.85rem;color:var(--green);font-weight:800;padding:10px 2px}

.research-more-suggestions>.research-suggestions{margin-top:9px}

.research-suggestion-actions{flex-wrap:wrap}

.research-suggestion-add{max-width:100%}

@media(max-width:640px){.research-guide-steps{padding-right:12px}.research-search-hint{margin-left:10px;margin-right:10px}}

.user-menu:not([open])>.user-menu-popover{display:none}


/* 4.6 – hurtig oprettelse, invitationer og mobilhandlinger */

.people-add-button{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap}

.people-page .page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}

.people-page .people-add-button{flex:0 0 auto;min-height:43px}

.quick-relation-context{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;padding:13px 15px;border:1px solid #b6d4c3;border-radius:12px;background:#eff7f0}

.quick-relation-context strong{font-size:.96rem}

.profile-quick-add{display:flex;align-items:center;flex-wrap:wrap;gap:9px;margin:0 0 16px;padding:11px 14px;border-radius:14px;background:#edf4ef;border:1px solid #d4e4d9}

.profile-quick-add span{font-size:.88rem;font-weight:750;margin-right:5px;color:var(--ink)}

.profile-quick-add .btn{background:white}

.profile-invite-link{white-space:nowrap}

.invite-card{max-width:770px}

.invite-card label>small{display:block;color:var(--muted);font-size:.78rem;margin-top:5px;line-height:1.45}

.invite-card .person-picker{min-width:0}

.invite-result{border-top:1px solid var(--line);margin-top:23px;padding-top:20px}

.invite-result h3{margin-top:0}

.invite-result-grid{display:grid;grid-template-columns:236px minmax(0,1fr);gap:20px;margin-top:14px;align-items:start}

.invite-qr{padding:12px;background:#fff;border:1px solid var(--line);border-radius:15px;display:flex;flex-direction:column;align-items:center;gap:7px}

.invite-qr svg{display:block;width:100%;max-width:220px;height:auto;aspect-ratio:1}

.invite-qr small{font-size:.76rem;color:var(--muted);text-align:center}

.invite-result-link{min-width:0}

.invite-result-link input{max-width:100%;width:100%;box-sizing:border-box;font-size:.81rem;padding:11px;border-radius:9px;border:1px solid var(--line)}

.invite-result-link .btn{margin-top:9px}

.invite-person-banner{padding:14px 16px;border-radius:12px;background:#eff7f0;border:1px solid #c4dfc9;margin:18px 0}

.invite-person-banner strong,.invite-person-banner small{display:block;margin:4px 0}

.invite-person-banner p{margin:10px 0 0;font-size:.89rem;color:var(--muted)}

@media(max-width:640px){
 .people-page .page-head{align-items:flex-start;flex-wrap:wrap;gap:12px}
 .people-page .page-head>.people-add-button{display:inline-flex!important;width:100%;min-height:47px;margin-top:3px}
 .profile-quick-add{padding:11px;gap:7px}
 .profile-quick-add span{flex-basis:100%;margin:0}
 .invite-result-grid{grid-template-columns:1fr}
 .invite-qr{width:min(260px,100%);margin:auto}
 .quick-relation-context>.btn{width:100%}
}

.profile-quick-add small{color:var(--muted);font-size:.8rem}


/* 4.6.2: tydeligt, sikkert workflow for kontosletning */

.admin-user-delete{margin:0 14px 14px;border:1px solid #e8c8c8;border-radius:10px;background:#fffafa;overflow:hidden}

.admin-user-delete>summary{cursor:pointer;padding:12px 14px;color:#982d2d;font-size:.82rem;font-weight:800;list-style:revert}

.admin-user-delete[open]>summary{border-bottom:1px solid #e8c8c8}

.admin-user-delete-body{padding:12px 14px 16px}

.admin-user-delete-body p{margin:0 0 14px;font-size:.8rem;line-height:1.5;color:#655050}

.admin-user-delete-form{display:grid;gap:12px;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:end}

.admin-user-delete-form label{display:grid;gap:5px;font-size:.78rem;font-weight:700;min-width:0}

.admin-user-delete-form input{min-width:0;width:100%;border:1px solid #d8bdbd;border-radius:8px;background:#fff;padding:10px}

.admin-user-delete-form .btn{grid-column:1/-1;justify-self:start}

.admin-user-self-note{margin:0 14px 14px;color:var(--muted);font-size:.73rem}

@media(max-width:640px){.admin-user-delete-form{grid-template-columns:1fr}.admin-user-delete-form .btn{width:100%;justify-self:stretch;text-align:center}}


/* 4.6.3 – personkobling og personligt fokus */

.admin-user-profile,.invite-pending-item{border:1px solid var(--line);border-radius:12px;margin:12px 0;background:#fcfdfc;min-width:0}

.admin-user-profile>summary,.invite-pending-item>summary{cursor:pointer;padding:12px 14px;font-weight:800}

.admin-user-profile>p{margin:0;padding:0 14px 8px}

.admin-user-profile-form,.invite-pending-form{display:grid;gap:12px;padding:12px 14px 15px;min-width:0}

.admin-user-profile-form label,.invite-pending-form label{display:grid;gap:6px;min-width:0}

.admin-user-profile-actions{display:flex;gap:9px;flex-wrap:wrap}

.invite-pending{margin-top:18px;min-width:0}

.invite-pending-item>summary{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px}

.invite-pending-item>summary strong,.invite-pending-item>summary small{display:block;overflow-wrap:anywhere}

.invite-pending-item>summary small,.invite-pending-item>summary>span:last-child{font-size:.75rem;color:var(--muted)}

.invite-pending-item>p{padding:0 14px 12px;margin:0}

.invite-pending-form .btn{justify-self:start}

@media(max-width:640px){.admin-user-profile-actions{display:grid}.admin-user-profile-actions .btn,.invite-pending-form .btn{width:100%}.invite-pending-item>summary{align-items:start;flex-direction:column}}


.invite-revoke-form{display:flex;gap:10px;align-items:center;justify-content:space-between;flex-wrap:wrap;padding:12px 14px;border-top:1px solid var(--line)}

.invite-revoke-form label{font-size:.76rem;display:flex;align-items:center;gap:7px}

@media(max-width:640px){.invite-revoke-form{display:grid}.invite-revoke-form .btn{width:100%}}


/* 4.7: typebestemte familierelationer */

.parent-relations-card{min-width:0}

.parent-relations-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,245px),1fr));gap:12px}

.parent-relation-item{min-width:0;border:1px solid var(--line);border-left:4px solid #9aaea2;border-radius:12px;padding:14px;background:#fff}

.parent-relation-item.rel-biological{border-left-color:#447ab4}

.parent-relation-item.rel-adoptive{border-left-color:#479968}

.parent-relation-item.rel-step,.parent-relation-item.rel-foster{border-left-color:#ac8c4b}

.parent-relation-item>a{display:flex;align-items:center;gap:10px;text-decoration:none;color:inherit;min-width:0}

.parent-relation-item>a span:last-child{min-width:0;overflow-wrap:anywhere}

.parent-relation-item>a strong,.parent-relation-item>a small{display:block}

.parent-relation-item>a small{font-size:.75rem;color:var(--muted);margin-top:3px}

.parent-relation-item p{overflow-wrap:anywhere;margin:9px 0}

.parent-relation-edit,.parent-relation-add{margin-top:13px;border-top:1px solid var(--line);padding-top:12px}

.parent-relation-edit>summary,.parent-relation-add>summary{cursor:pointer;font-weight:700;font-size:.88rem}

.parent-relation-edit .form-grid,.parent-relation-add .form-grid{margin-top:12px}

.parent-relation-remove{margin-top:8px}

.parent-relations-family-children{padding:12px 0;border-top:1px solid var(--line);margin-top:16px}

.parent-relations-family-children .family-links small{display:block;color:var(--muted);font-size:.72rem}

/* Særskilt, responsivt panel for forældrerelationer og slægtsgrene. */

#relationTreePanel{
  width:100%;max-width:100%;min-width:0;
  margin-top:22px;padding:clamp(16px,2.5vw,28px);
  overflow:visible;
}

#relationTreePanel[hidden]{display:none!important}

#relationTreePanel>.section-head{display:block;min-width:0;margin-bottom:18px}

#relationTreePanel>.section-head>div{min-width:0}

#relationTreePanel>.section-head h2{margin:4px 0 8px;line-height:1.25}

#relationTreePanel>.section-head .muted{margin:0;max-width:75ch;line-height:1.55;overflow-wrap:anywhere}

.relation-tree-toolbar{display:flex;align-items:end;justify-content:space-between;flex-wrap:wrap;gap:12px;margin:0 0 16px}

.relation-tree-toolbar label{display:grid;gap:6px;font-size:.82rem;font-weight:750;min-width:0}

.relation-tree-toolbar select{width:min(100%,300px);min-width:230px;max-width:100%;padding:10px 12px;border:1px solid #cbd8d0;border-radius:10px;background:#fff}

.relation-tree-toolbar .btn{min-height:42px;white-space:normal;text-align:center;max-width:100%}

.relation-tree-legend{display:flex;align-items:center;flex-wrap:wrap;gap:8px 16px;font-size:.78rem;color:var(--muted);margin:0 0 16px}

.relation-tree-legend span{display:inline-flex;align-items:center;gap:7px}

.relation-tree-legend i{display:inline-block;width:22px;border-top:3px solid #447ab4}

.relation-tree-legend i.line-adoptive{border-color:#479968;border-top-style:dashed}

.relation-tree-legend i.line-unspecified{border-color:#9aaea2;border-top-style:dotted}

#relationTreePanel .small-note{font-size:.8rem;line-height:1.5;overflow-wrap:anywhere}

#relationTreePanel>.small-note:last-child{margin:14px 0 0}

.relation-visual-stack{
  display:grid;gap:11px;width:100%;max-width:100%;min-width:0;
  padding:clamp(10px,2vw,20px);border:1px solid var(--line);border-radius:14px;
  background:#f7faf7;overflow:visible;
}

.relation-visual-stack .relation-generation{
  display:block;width:100%;min-width:0;margin:0;
}

.relation-visual-stack .relation-generation-label{margin:6px auto 10px}

.relation-visual-stack .relation-level{
  display:flex;flex-wrap:wrap;
  justify-content:center;align-items:stretch;gap:10px;
  width:100%;max-width:100%;min-width:0;margin:0 auto;
}

.relation-visual-stack .relation-generation.depth-0 .relation-level{max-width:330px}

.relation-visual-stack .relation-tree-person{
  display:flex;flex:1 1 200px;width:auto;max-width:260px;min-width:0;min-height:66px;
  border-left:4px solid #9aaea2;overflow:hidden;
}

.relation-visual-stack .relation-tree-person.focus{border-left-color:var(--green)}

.relation-visual-stack .relation-tree-person.rel-adoptive{border-left-color:#479968}

.relation-visual-stack .relation-tree-person.rel-biological{border-left-color:#447ab4}

.relation-visual-stack .relation-tree-person button{display:flex;align-items:center;gap:10px;min-width:0;width:100%;padding:10px;cursor:pointer;text-align:left}

.relation-visual-stack .relation-tree-person button>span:last-child{flex:1;min-width:0;overflow-wrap:anywhere}

.relation-visual-stack .relation-tree-person .avatar{width:42px;height:42px;flex:0 0 42px;font-size:.72rem}
.relation-visual-stack .relation-tree-person.has-photo .avatar{width:46px;height:46px;flex-basis:46px}
.relation-visual-stack .relation-tree-person strong{display:block;line-height:1.3;overflow-wrap:anywhere}

.relation-visual-stack .relation-tree-person small{display:block;white-space:normal;margin-top:3px;line-height:1.3}

.relation-visual-stack .relation-tree-person a{flex:0 0 35px;padding:0 9px}

.relation-person-initials{display:flex;align-items:center;justify-content:center;background:#e6eee9;border-radius:50%;width:35px;height:35px;flex:0 0 35px;font-size:.75rem;color:#346547;font-weight:800}

.relation-tree-person .relation-type-chip{display:block;width:fit-content;max-width:100%;font-style:normal;font-size:.68rem;font-weight:700;border-radius:6px;padding:3px 6px;background:#e8f0f8;color:#325e8b;margin-top:5px;white-space:normal}

.relation-tree-person .relation-type-chip.relation-adoptive{background:#e1f2e9;color:#287249}

.relation-tree-person .relation-type-chip.relation-step,.relation-tree-person .relation-type-chip.relation-foster{background:#f5eedf;color:#826526}

.relation-tree-person .relation-type-chip.relation-unspecified{background:#edf0ee;color:#5a6960}

@media(max-width:640px){
  #relationTreePanel{padding:16px 12px;margin-top:14px;border-radius:14px}
  #relationTreePanel>.section-head{margin-bottom:14px}
  .relation-tree-toolbar{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
  .relation-tree-toolbar label,.relation-tree-toolbar select,.relation-tree-toolbar .btn{width:100%;min-width:0;max-width:100%}
  .relation-tree-legend{gap:8px 12px}
  .relation-visual-stack{padding:10px 8px;gap:8px}
  .relation-visual-stack .relation-level{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}
  .relation-visual-stack .relation-tree-person{width:100%;max-width:none;min-height:60px}
  .relation-visual-stack .relation-tree-person button{padding:9px 7px;gap:8px}
  .relation-visual-stack .relation-tree-person .avatar,.relation-visual-stack .relation-tree-person.has-photo .avatar{width:38px;height:38px;flex-basis:38px}
  .relation-visual-stack .relation-tree-person a{flex-basis:32px;padding:0 7px}
  .parent-relations-grid{grid-template-columns:1fr}
}

.typed-family-card{border-left:4px solid #479968}

.typed-family-card h3 a{text-decoration:none}

.typed-family-card .family-links small{display:block;color:var(--muted);font-size:.74rem}


/* 4.8 – Min slægt som standard, med samme overblik som Alle personer. */

.people-switch{align-items:center}

.people-switch .btn.is-active{background:var(--green);border-color:var(--green);color:#fff}

.people-switch .btn:focus-visible{outline:3px solid #7daf94;outline-offset:2px}

.my-family-intro{padding:18px 20px;margin-bottom:12px;display:flex;align-items:center;justify-content:space-between;gap:16px}

.my-family-intro h2{font-size:1.2rem;margin:0 0 4px}

.my-family-intro .muted{font-size:.82rem;line-height:1.45;margin:0}

.my-family-intro .btn{flex:0 0 auto}

.my-family-note{font-size:.78rem;color:var(--muted);margin:0 0 15px;line-height:1.5}

.my-family-empty{padding:25px;line-height:1.5}

.my-family-empty p{max-width:750px}

.my-family-empty a{color:var(--green);font-weight:700}

.my-family-directory [data-my-person][hidden]{display:none!important}

.my-family-directory .empty-state[hidden]{display:none!important}

.my-family-directory .empty-state:not([hidden]){display:block;border-top:1px solid var(--line)}

@media(max-width:640px){
  .people-page .people-switch{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;width:100%}
  .people-page .people-switch .btn{white-space:normal;text-align:center;min-height:40px;padding:8px}
  .people-page .people-switch .btn:last-child{grid-column:1/-1}
  .my-family-intro{align-items:flex-start;flex-wrap:wrap;padding:16px}
  .my-family-intro .btn{margin-left:auto}
}


/* Personprofil: eneste aktive regelsæt til navigation, familie og søskende/børn. */

.person-page .profile-layout {
  display: grid;
  grid-template-columns: minmax(240px, 290px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.person-page .profile-layout,
.person-page .profile-main,
.person-page .profile-side,
.person-page .profile-sibling-card,
.person-page .parent-relations-card { min-width: 0; }

.person-page .profile-hero,
.person-page .profile-hero .grow { min-width: 0; }

.person-page .profile-hero .grow { overflow-wrap: anywhere; }

.person-page .profile-hero-actions { min-width: 0; }

.person-page .profile-side .relation-row > span { min-width: 0; overflow-wrap: anywhere; }

.person-page .profile-side .relation-row .avatar { flex: 0 0 42px; }


.person-page > nav.profile-section-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0 0 18px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(21,36,31,.035);
}

.person-page > nav.profile-section-nav > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  max-width: 100%;
  padding: 9px 13px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: #edf4ef;
  color: var(--green);
  font-size: .86rem;
  line-height: 1.35;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.person-page > nav.profile-section-nav > a:hover { background: #e0ebe3; border-color: #cadccf; }

.person-page > nav.profile-section-nav > a:focus-visible,
.person-page .profile-sibling-item:focus-visible { outline: 3px solid #6f9d80; outline-offset: 2px; }

.person-page .profile-main > .card { margin-bottom: 16px; }

.person-page .profile-main > .card:last-child { margin-bottom: 0; }

.person-page .profile-main > section.profile-sibling-card { padding: 22px 24px; }

.person-page .profile-sibling-card .section-head { margin-bottom: 17px; }

.person-page .profile-sibling-card .section-head h2 { margin: 2px 0 9px; }

.person-page .profile-sibling-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr));
  gap: 11px;
  min-width: 0;
}

.person-page .profile-sibling-grid > a.profile-sibling-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 76px;
  padding: 12px;
  border: 1px solid #dbe7de;
  border-radius: 12px;
  background: #f8fbf9;
  color: var(--ink);
  text-decoration: none;
}

.person-page .profile-sibling-grid > a.profile-sibling-item:hover { background: #edf5ee; border-color: #aac8b2; }

.person-page .profile-sibling-grid > a.profile-sibling-item > .avatar {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
}

.person-page .profile-sibling-grid > a.profile-sibling-item > span:not(.avatar) {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}

.person-page .profile-sibling-grid > a.profile-sibling-item strong {
  display: block;
  font-size: .92rem;
  line-height: 1.3;
  font-weight: 750;
  color: var(--ink);
}

.person-page .profile-sibling-grid > a.profile-sibling-item small {
  display: block;
  margin-top: 5px;
  font-size: .78rem;
  line-height: 1.35;
  color: var(--muted);
}

.person-page #profil-familie,
.person-page #profil-soeskende,
.person-page #profil-boern,
.person-page #foraeldrerelationer,
.person-page #livslinje,
.person-page #rediger { scroll-margin-top: 110px; }


@media (max-width: 980px) {
  .person-page .profile-layout { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .person-page > nav.profile-section-nav {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 7px;
  }
  .person-page > nav.profile-section-nav > a { padding: 9px 8px; }
  .person-page .profile-main > section.profile-sibling-card { padding: 18px; }
  .person-page .profile-sibling-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 380px) {
  .person-page > nav.profile-section-nav { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .person-page > nav.profile-section-nav > a,
  .person-page .profile-sibling-grid > a.profile-sibling-item { transition: none; }
}


/* Hurtig oprettelse af søskende: tydeligt valg af fælles forældre. */

.sibling-shared-parents{border:1px solid var(--line);border-radius:12px;padding:14px 16px;margin:0;min-width:0}

.sibling-shared-parents legend{padding:0 6px;font-weight:800}

.sibling-shared-parents p{margin:0 0 12px;line-height:1.5;font-size:.88rem;font-weight:400}

.sibling-shared-parents .check{padding:7px 0;font-weight:600;font-size:.9rem;cursor:pointer}

.sibling-shared-parents .check input{accent-color:var(--green);width:18px!important;height:18px;flex:0 0 auto}

.sibling-shared-parents .check small{color:var(--muted);font-weight:400}


/* Administrator: gennemgå sikker import af personer fra folketællinger */

.people-import-panel{padding:24px;margin-bottom:18px;scroll-margin-top:90px}

.people-import-panel .section-head{margin-bottom:12px}

.people-import-help{padding:14px 16px;background:var(--soft);border:1px solid var(--line);border-radius:12px;line-height:1.7;font-size:.9rem}

.people-import-help a{color:var(--green);font-weight:750;text-underline-offset:3px}

.people-import-help code{font-family:ui-monospace,monospace;background:#fff;border:1px solid var(--line);padding:2px 5px;border-radius:5px}

.people-import-form{margin-top:20px;max-width:900px}

.people-import-form label,.people-import-row label{min-width:0}

.people-import-form input[type=file]{padding:11px;background:#f9fbfa}

.people-import-preview-head{display:flex;justify-content:space-between;align-items:center;gap:15px;margin:20px 0 6px;flex-wrap:wrap}

.people-import-preview-head h3{margin:0 0 5px}

.people-import-preview-head p{margin:0}

.people-import-totals{display:flex;flex-wrap:wrap;gap:7px}

.people-import-totals span{background:var(--soft);border:1px solid var(--line);border-radius:10px;padding:8px 12px;font-size:.82rem;font-weight:700}

.people-import-reminder{font-size:.87rem;color:var(--muted);line-height:1.65;margin:15px 0}

.people-import-list{display:grid;gap:9px;margin:16px 0}

.people-import-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(220px,410px);gap:18px;align-items:center;border:1px solid var(--line);background:#fbfcfb;border-radius:12px;padding:14px}

.people-import-row.has-match{background:#fffaf1;border-color:#ead9b2}

.people-import-row.has-error{background:#fff2f2;border-color:#e9c6c6}

.people-import-person{display:grid;gap:5px;min-width:0}

.people-import-person strong{overflow-wrap:anywhere}

.people-import-person small{color:var(--muted)}

.people-import-warning{font-size:.8rem;color:#8b5b1c;overflow-wrap:anywhere}

.people-import-warning a{color:#704d17;font-weight:750}

.people-import-row.has-error .people-import-warning{color:#943636}

.people-import-row label{display:grid;gap:6px;font-size:.82rem;font-weight:750}

.people-import-row select{max-width:100%;width:100%;padding:11px;border:1px solid #cbd8d0;border-radius:10px;background:#fff}

.people-import-ack{margin:17px 0!important;font-size:.9rem;font-weight:650}

.people-import-cancel{margin-top:12px}

@media(max-width:720px){.people-import-panel{padding:16px}.people-import-row{grid-template-columns:1fr;gap:12px}.people-import-preview-head{align-items:flex-start}}


/* Personprofil, oktober 2026: samlet partnerredigering og overskueligt redaktørområde. */

.person-page #profil-familie .profile-partners-heading { margin-bottom: 13px; }

.person-page #profil-familie .profile-partners-heading h3 { font-size: 1.12rem; line-height: 1.32; margin: 0; letter-spacing: -.02em; overflow-wrap: anywhere; }

.person-page .profile-partners-list { display: grid; gap: 9px; }

.person-page .profile-partner-item { min-width: 0; padding: 11px 12px; border: 1px solid #dce8df; border-radius: 13px; background: #f8fbf9; }

.person-page .profile-partner-person { display: flex; gap: 10px; align-items: center; min-width: 0; }

.person-page .profile-partner-avatar { flex: 0 0 42px; display: inline-flex; text-decoration: none; }

.person-page .profile-partner-description { min-width: 0; overflow-wrap: anywhere; }

.person-page .profile-partner-description small { display: block; color: var(--muted); font-size: .74rem; line-height: 1.3; margin-bottom: 3px; }

.person-page .profile-partner-name { display: block; color: var(--ink); font-size: .9rem; font-weight: 800; line-height: 1.4; text-decoration: none; }

.person-page a.profile-partner-name:hover { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }

.person-page .profile-partner-note { margin-top: 8px; font-size: .81rem; color: #4d5e54; line-height: 1.5; overflow-wrap: anywhere; }

.person-page .profile-partner-note p { margin: 4px 0; }

.person-page .profile-partner-hint { font-size: .72rem; color: var(--muted); line-height: 1.45; margin: 10px 0 0; }

.person-page .profile-partner-hint a { color: var(--green); font-weight: 750; }

.person-page .profile-partner-edit { border-top: 1px solid #dce8df; margin-top: 10px; padding-top: 8px; }

.person-page .profile-partner-edit > summary { color: var(--green); font-size: .78rem; font-weight: 800; cursor: pointer; padding: 3px 0; }

.person-page .profile-partner-edit[open] > summary { margin-bottom: 12px; }

.person-page .profile-partner-form { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 12px; }

.person-page .profile-partner-form label { min-width: 0; font-size: .78rem; }

.person-page .profile-partner-form input,
.person-page .profile-partner-form select,
.person-page .profile-partner-form textarea { font-size: .84rem; padding: 9px 10px; }

.person-page .profile-partner-form .person-picker input[type="search"] { padding: 9px 10px; font-size: .84rem; }

.person-page .profile-partner-form .btn { width: 100%; }

.person-page .profile-partner-remove { margin-top: 12px; border-top: 1px solid #dfebe2; padding-top: 10px; display: grid; gap: 9px; }

.person-page .profile-partner-remove .check { font-size: .75rem; font-weight: 600; align-items: flex-start; }

.person-page .profile-partner-remove .check input { width: 16px !important; flex: 0 0 auto; }

.person-page .profile-partner-remove .btn { justify-self: start; font-size: .73rem; }

.person-page .profile-partners-empty { font-size: .82rem; margin: 12px 0 0; line-height: 1.5; }

.person-page .profile-partner-add { margin-top: 14px; padding: 0; border: 1px solid #bcd1c3; border-radius: 11px; background: #eff6f1; }

.person-page .profile-partner-add > summary { display: block; cursor: pointer; padding: 11px; color: var(--green); font-size: .8rem; font-weight: 800; list-style: none; }

.person-page .profile-partner-add > summary::-webkit-details-marker { display: none; }

.person-page .profile-partner-add > summary:hover { background: #e6f0e9; border-radius: 10px; }

.person-page .profile-partner-add[open] { padding-bottom: 12px; }

.person-page .profile-partner-add .profile-partner-form { margin: 0 11px; padding-top: 12px; border-top: 1px solid #cadccf; }

.person-page .profile-partner-add .profile-partner-form .person-picker-results { max-height: 225px; }

.person-page .profile-two { display: block; margin-top: 16px; }

.person-page .profile-two .profile-links { min-width: 0; }

.person-page .profile-two .profile-links .link-card { overflow-wrap: anywhere; }

.person-page .profile-biography { margin: 2px 0 24px; padding: 16px 19px; border-left: 3px solid #90b49e; border-radius: 0 11px 11px 0; background: #f5f9f6; font-size: .95rem; }

.person-page .profile-biography > :first-child { margin-top: 0; }

.person-page .profile-biography > :last-child { margin-bottom: 0; }


/* Rediger: lettere navigation, store klikflader og tydeligt afgrænsede formularer. */

.person-page .editor-zone { margin-top: 20px; padding: 24px; background: #fbfdfb; border-color: #d4e3d9; }

.person-page .editor-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }

.person-page .editor-header h2 { font-size: clamp(1.35rem,2.4vw,1.8rem); letter-spacing: -.025em; margin: 2px 0 7px; }

.person-page .editor-header p.muted { margin: 0; font-size: .86rem; line-height: 1.55; }

.person-page .editor-header-mark { display: grid; place-items: center; flex: 0 0 43px; height: 43px; border: 1px solid #cadfd0; border-radius: 13px; background: #eaf3ed; color: var(--green); font-size: 1.4rem; }

.person-page .editor-zone > details:not(.editor-help) { margin: 10px 0; padding: 0; border: 1px solid #dae6dd; background: #fff; border-radius: 13px; overflow: clip; scroll-margin-top: 112px; }

.person-page .editor-zone > details:not(.editor-help)[open] { box-shadow: 0 7px 20px rgba(21,36,31,.045); border-color: #afcbbb; }

.person-page .editor-zone > details:not(.editor-help) > summary { position: relative; display: grid; gap: 4px; margin: 0; padding: 15px 46px 15px 18px; list-style: none; font-size: .94rem; line-height: 1.35; cursor: pointer; }

.person-page .editor-zone > details:not(.editor-help) > summary::-webkit-details-marker { display: none; }

.person-page .editor-zone > details:not(.editor-help) > summary::after { content: '+'; position: absolute; right: 17px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: #edf4ef; color: var(--green); font-weight: 500; font-size: 1.25rem; }

.person-page .editor-zone > details:not(.editor-help)[open] > summary::after { content: '−'; }

.person-page .editor-zone > details:not(.editor-help) > summary:hover { background: #f6faf7; }

.person-page .editor-zone .editor-summary-title { display: block; color: var(--ink); font-weight: 800; }

.person-page .editor-zone > details:not(.editor-help) > summary > small { display: block; font-weight: 450; font-size: .79rem; color: var(--muted); }

.person-page .editor-zone > details:not(.editor-help) > form,
.person-page .editor-zone > details:not(.editor-help) > .edit-existing-list { margin: 0; padding: 18px; border-top: 1px solid #e1ebe4; }

.person-page .editor-zone > details:not(.editor-help) > p.muted { margin: 15px 18px 0; line-height: 1.55; }

.person-page .editor-zone > details:not(.editor-help) .form-grid label { min-width: 0; line-height: 1.4; }

.person-page .editor-zone .form-grid input:focus-visible,
.person-page .editor-zone .form-grid textarea:focus-visible,
.person-page .editor-zone .form-grid select:focus-visible { outline: 2px solid #7da98a; outline-offset: 1px; }

.person-page .editor-zone .form-grid textarea { resize: vertical; }

.person-page .editor-zone > details:not(.editor-help) .form-grid button { min-height: 41px; }

.person-page .editor-zone > details.editor-help { margin: 15px 0; padding: 0; border: 0; }

.person-page .editor-zone > details.editor-help > summary { color: var(--green); font-size: .78rem; font-weight: 750; cursor: pointer; }

.person-page .editor-zone > details.editor-help > .editor-html-help { margin: 10px 0; }

.person-page .editor-zone .edit-existing > summary .editor-summary-title { margin: 0!important; padding: 0!important; background: none!important; color: var(--ink)!important; font-size: .94rem!important; text-transform: none; letter-spacing: normal; }

.person-page .editor-zone .edit-existing > summary .editor-existing-count { position: absolute; top: 16px; right: 58px; margin: 0; padding: 3px 8px; border-radius: 999px; background: #eaf3ed; color: var(--green); font-size: .75rem; font-weight: 800; }

.person-page .editor-zone .edit-existing-list { gap: 9px; }

.person-page .editor-zone .edit-existing-list > details { padding: 0!important; }

.person-page .editor-zone .edit-existing-list > .edit-item > summary { display: grid; grid-template-columns: minmax(58px,80px) minmax(0,1fr) auto; min-height: 47px; gap: 10px; align-items: center; padding: 11px 14px!important; }

.person-page .editor-zone .edit-existing-list > .edit-item > form { padding: 16px; margin: 0; }

.person-page .editor-zone .edit-existing-list .history-delete-form { margin: 0 16px 16px!important; }

.person-page #edit-basics, .person-page #edit-bio, .person-page #edit-events, .person-page #edit-links, .person-page #edit-media, .person-page #edit-existing { scroll-margin-top: 112px; }

@media(max-width:980px){
  /* Relationsboksen skal være tilgængelig før resten af den lange profil på mobil. */
  .person-page .profile-layout > .profile-side { order: 0; }
  .person-page .profile-layout > .profile-main { order: 1; }
}

@media(max-width:640px){
  .person-page .editor-zone { padding: 16px; }
  .person-page .editor-header-mark { display: none; }
  .person-page .editor-zone > details:not(.editor-help) > summary { padding: 14px 43px 14px 13px; }
  .person-page .editor-zone > details:not(.editor-help) > form,
  .person-page .editor-zone > details:not(.editor-help) > .edit-existing-list { padding: 13px; }
  .person-page .editor-zone .edit-existing-list > .edit-item > summary { grid-template-columns: 1fr auto; gap: 4px; }
  .person-page .editor-zone .edit-existing-list > .edit-item > summary > span { grid-column: 1 / -1; }
  .person-page .editor-zone .edit-existing-list > .edit-item > summary > strong { white-space: normal; overflow-wrap: anywhere; }
}



/* Forskningssiden: samme rolige genvejsnavigation som personprofilen. */

.research-page > nav.research-section-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0 0 23px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(21,36,31,.035);
}

.research-page > nav.research-section-nav > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 13px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: #edf4ef;
  color: var(--green);
  font-size: .86rem;
  line-height: 1.35;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.research-page > nav.research-section-nav > a:hover { background: #e0ebe3; border-color: #cadccf; }

.research-page > nav.research-section-nav > a:focus-visible { outline: 3px solid #6f9d80; outline-offset: 2px; }

.research-page > nav.research-section-nav > a[href="#research-tools"] { margin-left: auto; background: var(--green); color: #fff; }

.research-page > nav.research-section-nav > a[href="#research-tools"]:hover { background: var(--green2); }

.research-page #research-person-search,
.research-page #research-possibilities,
.research-page #research-timeline-section,
.research-page #research-status-section,
.research-page #research-sources-section,
.research-page #researchTasks,
.research-page #research-tools { scroll-margin-top: 96px; }

@media (max-width: 760px) {
  .research-page > nav.research-section-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .research-page > nav.research-section-nav > a { min-width: 0; padding: 9px 8px; }
  .research-page > nav.research-section-nav > a[href="#research-tools"] { margin-left: 0; grid-column: 1 / -1; }
}

@media (max-width: 380px) {
  .research-page > nav.research-section-nav { grid-template-columns: 1fr; }
  .research-page > nav.research-section-nav > a[href="#research-tools"] { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .research-page > nav.research-section-nav > a { transition: none; }
}


/* Statistik: livsforløbsbadges og personlister */

.stats-life-section{padding:23px;margin:20px 0}

.stats-life-section>.section-head{margin-bottom:18px}

.stats-life-section>.section-head h2{margin:2px 0 8px}

.stats-life-filters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}

.stats-life-filter{display:flex;flex-direction:column;align-items:flex-start;gap:8px;padding:15px;border:1px solid var(--line);border-radius:15px;background:#fbfdfb;text-decoration:none;transition:border-color .15s,background .15s}

.stats-life-filter:hover,.stats-life-filter.active{border-color:var(--green);background:#f1f8f2}

.stats-life-filter.active{box-shadow:inset 0 0 0 1px var(--green)}

.stats-life-filter>strong{font-size:1.8rem;line-height:1.1}

.stats-life-filter>small{color:var(--muted);line-height:1.4}

.stats-life-results{margin-top:20px;padding-top:18px;border-top:1px solid var(--line)}

.stats-life-results h3{margin:0}
.stats-life-results h3 small{color:var(--muted);font-size:.8rem;font-weight:500}

.stats-life-person-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-top:14px}

.stats-life-person{display:flex;align-items:center;gap:11px;min-width:0;padding:10px;border:1px solid var(--line);border-radius:12px;text-decoration:none}

.stats-life-person:hover{border-color:var(--green);background:#f7faf7}

.stats-life-person>span:nth-child(2){display:grid;gap:4px;min-width:0;flex:1}

.stats-life-person strong{overflow-wrap:anywhere}
.stats-life-person small{color:var(--muted)}

.stats-life-person-arrow{margin-left:auto;color:var(--green)}

@media(max-width:900px){.stats-life-filters{grid-template-columns:repeat(2,minmax(0,1fr))}}

@media(max-width:620px){.stats-life-filters,.stats-life-person-list{grid-template-columns:1fr}.stats-life-section{padding:16px}}


/* Kirkebogskilde markeret på personkort og personprofil */

.church-book-check{display:inline-flex;align-items:center;justify-content:center;flex:none;vertical-align:middle;width:13px;height:13px;margin-inline-start:3px;border-radius:50%;background:#178047;color:#fff;font-size:9px;font-family:system-ui,sans-serif;line-height:1;font-weight:800;box-shadow:0 1px 2px #123e251e}

.profile-hero h1 .church-book-check{width:18px;height:18px;font-size:12px;margin-inline-start:6px}

.tree-person .church-book-check,.mobile-tree-person .church-book-check,.relation-tree-person .church-book-check{width:12px;height:12px;font-size:8px;margin-inline-start:2px}


/* Familietavle 2026-10: levetid, kildeoverblik, verificering og levesteder */

.profile-hero .profile-age{font-size:clamp(.92rem,1.5vw,1.25rem);font-weight:650;color:var(--muted);white-space:normal}

.cause-note{display:block;margin-top:5px;font-size:.78rem;line-height:1.45;color:var(--muted)}

.life-places-section,.profile-sources-section,.profile-time-section{padding:23px;margin-top:16px}

.life-places-section .section-head,.profile-sources-section .section-head,.profile-time-section .section-head{margin-bottom:16px}

.life-place-list{display:grid;gap:10px}

.life-place-item{display:flex;gap:12px;align-items:flex-start;padding:15px;border:1px solid var(--line);border-radius:13px;background:#fbfcfa;min-width:0}

.life-place-symbol{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:#eaf3ed;color:var(--green);font-size:1.35rem;flex-shrink:0}

.life-place-item>div{min-width:0;flex:1}
.life-place-item strong,.life-place-item small{display:block;overflow-wrap:anywhere}
.life-place-item small{font-size:.77rem;color:var(--muted);margin-bottom:4px}

.place-map-links{display:flex;flex-wrap:wrap;gap:12px;margin-top:10px;align-items:center}

.place-map-links>a{color:var(--green);font-size:.83rem;font-weight:700}

.inline-place-map{display:block;flex:0 0 100%;width:100%;height:290px;border:1px solid var(--line);border-radius:12px;background:#edf3ef}

.verification-line{display:flex;align-items:center;gap:7px;flex-wrap:wrap}

.profile-record-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin:15px 0}

.record-status{border-radius:11px;padding:10px 8px;border:1px solid var(--line);font-size:.79rem;font-weight:650;background:#fafbfa;display:flex;align-items:center;gap:6px}

.record-status b{display:grid;place-items:center;width:22px;height:22px;border-radius:50%;font-weight:900;flex-shrink:0}

.record-status.has-record b{background:#d5ebda;color:#1b7040}
.record-status.no-record b{background:#f0f2f0;color:#73827b}

.verification-form{display:grid;gap:12px;border-top:1px solid var(--line);padding-top:15px;margin-top:16px}

.verification-form>label:not(.check){display:grid;gap:7px;font-size:.84rem;font-weight:700}
.verification-form>label small{font-weight:400;color:var(--muted)}

.verification-form button{justify-self:start}

.profile-time-editors>div{display:flex;align-items:center;justify-content:space-between;padding:9px 0;border-top:1px solid var(--line);gap:12px}

.profile-time-section .section-head>strong{font-size:1.18rem;white-space:nowrap}

.residence-edit{padding:11px 0;margin-top:12px;border-top:1px solid var(--line)}
.residence-edit summary{cursor:pointer}
.residence-delete{margin-top:10px}

.source-coverage-section{padding:23px;margin:20px 0}
.source-coverage-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}

.source-count{display:flex;flex-direction:column;gap:7px;border:1px solid var(--line);padding:16px;border-radius:13px;text-decoration:none;background:#fbfdfb}

.source-count:hover,.source-count.active{border-color:var(--green);background:#f1f8f2}

.source-count strong{font-size:1.65rem}
.source-count span{font-weight:750}
.source-count small{color:var(--muted)}

.source-coverage-results{padding-top:18px;margin-top:20px;border-top:1px solid var(--line)}

.source-coverage-results .section-head{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.source-coverage-results h3{margin:0}

.source-switch{display:flex;gap:7px}
.source-result-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px 0}

.source-result-list a{display:flex;align-items:center;gap:9px;padding:9px;border:1px solid var(--line);border-radius:11px;text-decoration:none;min-width:0}

.source-result-list a span:nth-child(2){font-weight:700;min-width:0;flex:1;overflow-wrap:anywhere}
.source-result-list a small{color:var(--green);font-size:.72rem}

.source-coverage-section>.small-note{margin-top:15px}

@media(max-width:960px){.profile-record-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.source-coverage-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

@media(max-width:620px){.life-places-section,.profile-sources-section,.profile-time-section,.source-coverage-section{padding:16px}.profile-record-grid,.source-coverage-grid,.source-result-list{grid-template-columns:1fr}.source-result-list a small{display:none}.life-place-item{padding:12px}.profile-time-section .section-head{align-items:flex-start;flex-wrap:wrap}}


/* Versionshistorik: person og ændret felt i stedet for blot filnavn. */

.revision-list{display:grid;gap:12px}

.revision-row{align-items:start!important}

.revision-info{min-width:0}

.revision-info>strong{display:block;font-size:.94rem;margin-bottom:3px}

.revision-info>small{display:block;color:var(--muted);font-size:.74rem;line-height:1.5}

.revision-changes{list-style:none;display:grid;gap:5px;margin:9px 0 6px;padding:0}

.revision-changes li{display:flex;flex-wrap:wrap;gap:3px 9px;font-size:.82rem;line-height:1.4}

.revision-changes li>a,.revision-changes .revision-person{font-weight:760;color:var(--green)}

.revision-changes li>span:last-child{color:var(--muted)}

.revision-inferred{font-style:italic;margin-top:4px}

@media(max-width:680px){#versionshistorik .revision-row{grid-template-columns:minmax(0,1fr)}#versionshistorik .revision-row form{justify-content:flex-start}}


/* Billedbilag til biografi, historier, begivenheder og kilder */

.profile-attachments { display:flex; flex-wrap:wrap; align-items:flex-start; gap:12px; margin:12px 0 4px; }

.profile-attachment { margin:0; width:clamp(130px,24%,195px); min-width:130px; max-width:195px; }

.profile-attachment > a { display:block; border-radius:10px; overflow:hidden; border:1px solid #d7e3da; background:#f5f8f6; }

.profile-attachment img { display:block; width:100%; height:125px; object-fit:cover; transition:transform .2s ease; }

.profile-attachment > a:hover img { transform:scale(1.04); }

.profile-attachment figcaption { padding:4px 1px 0; font-size:.81rem; line-height:1.35; color:#53665b; overflow-wrap:anywhere; }

.profile-attachment .attachment-delete { margin-top:6px; }

.profile-attachment .attachment-delete button { font-size:.74rem; padding:4px 8px; }

.profile-attachment-input input[type="file"] { max-width:100%; }

@media(max-width:520px){.profile-attachment{width:46%;min-width:105px}.profile-attachment img{height:105px}}


/* Rettelse 27-10-2026: cacheopdatering efter ændring af filrettigheder (403). */


/* Personprofil: sletning af eksisterende indhold og billedvisning i livslinjen */

.edit-existing .edit-item-delete{display:flex;align-items:center;gap:10px;justify-content:space-between;flex-wrap:wrap;margin:12px 0 0;padding:13px 0 3px;border-top:1px solid var(--line)}

.edit-existing .edit-item-delete p{margin:0;flex:1 1 220px;font-size:.78rem;line-height:1.45}

.edit-existing .edit-item-delete .btn{flex:0 0 auto;border-color:#e6bcbc;color:#a03434;background:#fff7f7}

.edit-existing .edit-item-delete .btn:hover{background:#fae9e9}

.profile-timeline-section .timeline-photo-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,200px));align-items:start;gap:11px;margin:15px 0 12px;max-width:690px}

.profile-timeline-section .timeline-photo-gallery .profile-attachment{width:100%;min-width:0;max-width:none;background:#fff;border:1px solid #dde7df;border-radius:13px;padding:5px;box-shadow:0 5px 16px rgba(21,36,31,.06);overflow:hidden}

.profile-timeline-section .timeline-photo-gallery .profile-attachment>a{position:relative;display:block;border:0;border-radius:9px;overflow:hidden;background:#eef4ef}

.profile-timeline-section .timeline-photo-gallery .profile-attachment>a:after{content:'↗';position:absolute;right:8px;bottom:8px;display:grid;place-items:center;width:26px;height:26px;background:rgba(18,35,26,.76);color:#fff;border-radius:8px;font-size:.8rem;transition:background .2s}

.profile-timeline-section .timeline-photo-gallery .profile-attachment>a:hover:after{background:#174d3a}

.profile-timeline-section .timeline-photo-gallery .profile-attachment img{height:145px;object-fit:cover;border-radius:9px}

.profile-timeline-section .timeline-photo-gallery .profile-attachment figcaption{font-size:.75rem;padding:7px 5px 1px;color:#4c6354}

.profile-timeline-section .timeline-photo-gallery .attachment-delete{margin:4px 5px 5px}

.profile-timeline-section .timeline-photo-gallery .attachment-delete button{font-size:.7rem}

.timeline-image-viewer{border:0;border-radius:16px;padding:0;max-width:min(94vw,1100px);max-height:94vh;background:#13231b;color:white;box-shadow:0 25px 95px rgba(0,0,0,.5);overflow:hidden}

.timeline-image-viewer::backdrop{background:rgba(7,19,12,.84)}

.timeline-image-viewer .timeline-image-viewer-close{position:absolute;top:11px;right:11px;width:36px;height:36px;border:0;border-radius:50%;color:#fff;background:#284337;cursor:pointer;font-size:1.6rem;display:grid;place-items:center;z-index:2}

.timeline-image-viewer img{display:block;width:auto;max-width:94vw;max-height:calc(94vh - 55px);object-fit:contain;margin:auto}

.timeline-image-viewer p{margin:0;padding:12px 20px;text-align:center;color:#eef4ef;font-size:.86rem;overflow-wrap:anywhere}

.timeline-image-viewer p:empty{display:none}

@media(max-width:540px){.profile-timeline-section .timeline-photo-gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.profile-timeline-section .timeline-photo-gallery .profile-attachment img{height:130px}.edit-existing .edit-item-delete{align-items:start;flex-direction:column}.timeline-image-viewer img{max-height:calc(94vh - 70px)}}


/* Redigeringsområdet: billeder hører til deres indhold, ikke egne fold-ud poster. */

.person-page .edit-existing-list .edit-attachment-gallery{margin:12px 16px 4px;padding:12px;gap:12px;border:1px solid #dfe9e2;border-radius:13px;background:#f7faf8}

.person-page .edit-existing-list .edit-attachment-gallery .profile-attachment{max-width:185px;min-width:115px;width:calc(25% - 12px)}

.person-page .edit-existing-list .edit-attachment-gallery .profile-attachment img{height:116px}

.person-page .edit-existing-list .edit-attachment-gallery .attachment-delete{padding:0;border:0;margin:6px 0 0}

.person-page .edit-existing-list .edit-attachment-gallery .attachment-delete button{background:#fff7f7;border:1px solid #e6bcbc;color:#9e3434}

.person-page .edit-existing-list .edit-item > form select[name=replace_attachment_id]{max-width:100%;background:#fff}

.person-page .timeline-linked-source{margin-top:9px;padding:8px 0;border-top:1px dashed #dce8de}

.person-page .timeline-linked-source .timeline-photo-gallery{margin:9px 0 4px}

@media(max-width:600px){.person-page .edit-existing-list .edit-attachment-gallery .profile-attachment{width:calc(50% - 6px)}}


.person-page .edit-existing-list .unattached-media-preview{padding:12px 16px 0}

.person-page .edit-existing-list .unattached-media-preview img{width:170px;max-width:100%;height:110px;object-fit:cover;border:1px solid #d9e6dc;border-radius:10px}


/* Opdatering 2: billeder redigeres i samme formular som den tilhørende post. */

.person-page .edit-existing-list .attachment-editor{border:1px solid #dfe9e2;border-radius:14px;background:#f7faf8;padding:12px 14px;margin:8px 0;min-width:0}

.person-page .edit-existing-list .attachment-editor legend{font-weight:650;padding:0 7px;color:var(--text,#243b2c)}

.person-page .edit-existing-list .attachment-editor > p{margin:2px 0 10px}

.person-page .edit-existing-list .attachment-editor .edit-attachment-gallery{margin:0 0 9px;padding:0;border:0;background:transparent;display:grid;grid-template-columns:repeat(auto-fill,minmax(144px,1fr));gap:12px}

.person-page .edit-existing-list .attachment-editor .profile-attachment{width:auto;max-width:none;min-width:0;margin:0;padding:7px;border:1px solid #d9e5db;border-radius:12px;background:#fff}

.person-page .edit-existing-list .attachment-editor .profile-attachment img{width:100%;height:112px;object-fit:cover;border-radius:8px}

.person-page .edit-existing-list .attachment-editor-actions{display:flex;gap:6px;flex-wrap:wrap;align-items:center;justify-content:space-between;margin-top:9px}

.person-page .edit-existing-list .attachment-editor-actions .btn{font-size:.76rem;padding:5px 9px;background:#fff8f8;color:#953737;border-color:#e3bdbd}

.person-page .edit-existing-list .attachment-replace-choice,.person-page .edit-existing-list .attachment-add-choice{display:flex;align-items:center;gap:6px;cursor:pointer;font-size:.84rem;color:#334b3a}

.person-page .edit-existing-list .attachment-replace-choice input,.person-page .edit-existing-list .attachment-add-choice input{accent-color:#23734c;width:16px;height:16px}

.person-page .edit-existing-list .attachment-add-choice{border-top:1px solid #dfe9e2;padding-top:10px}

.person-page .attachment-delete-remote{display:none}

@media(max-width:580px){.person-page .edit-existing-list .attachment-editor .edit-attachment-gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.person-page .edit-existing-list .attachment-editor{padding:9px}.person-page .edit-existing-list .attachment-editor .profile-attachment img{height:90px}}


/* V5: editing generated timeline events in place, safe on desktop and mobile. */
.timeline-inline-editor{margin-top:.85rem;border-top:1px solid var(--border,#ddd);padding-top:.65rem;max-width:100%}
.timeline-inline-editor>summary{cursor:pointer;color:var(--accent,#285e49);font-weight:650;font-size:.89rem;list-style-position:inside}
.timeline-inline-editor[open]>summary{margin-bottom:.7rem}
.timeline-inline-editor .form-grid{margin:.6rem 0;max-width:100%;gap:.7rem}
.timeline-edit-actions{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}
.timeline-reset-form{margin:.5rem 0 0}
.timeline-hidden-list{margin-top:1.25rem;border-top:1px solid var(--border,#ddd);padding-top:.85rem}
.timeline-hidden-list>summary{cursor:pointer;font-weight:600}
.timeline-hidden-items>div{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:.6rem 0;border-bottom:1px solid var(--border,#ddd)}
.timeline-hidden-items form{margin:0}
.timeline-edit-shortcut{display:inline-block;margin-top:.75rem}


/* V6 · Fælles forskningsoversigt */
.research-family-board{margin:20px 0 28px;padding:clamp(16px,3vw,28px);scroll-margin-top:94px}
.research-family-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:18px 0}
.research-family-stat{display:flex;flex-direction:column;gap:5px;padding:15px 16px;text-decoration:none;color:inherit;border:1px solid var(--border, #dedbd2);border-radius:13px;background:var(--card,#fff);min-height:95px;transition:border-color .15s,background .15s}
.research-family-stat strong{font-size:clamp(1.35rem,3vw,1.8rem);line-height:1.2;font-variant-numeric:tabular-nums}
.research-family-stat span{font-size:.83rem;color:var(--muted,#5c6864)}
.research-family-stat:hover,.research-family-stat.active{border-color:var(--green,#47876b);background:rgba(92,148,118,.08)}
.research-family-filters{display:flex;gap:12px;flex-wrap:wrap;align-items:end;margin:16px 0;padding:14px;border:1px solid var(--border,#dedbd2);border-radius:12px}
.research-family-filters label{display:grid;gap:5px;flex:1 1 175px;font-weight:600;font-size:.83rem}
.research-family-filters input,.research-family-filters select{width:100%;min-height:41px;padding:8px 10px;border:1px solid var(--border,#dedbd2);border-radius:8px;background:var(--card,#fff);color:inherit;font:inherit}
.research-family-filters button{min-height:41px}
.research-family-result-head{display:flex;justify-content:space-between;gap:12px;font-size:.88rem;margin:0 0 8px}
.research-family-result-head span{color:var(--muted,#5c6864)}
.research-family-people{display:grid;gap:8px}
.research-family-person{border:1px solid var(--border,#dedbd2);border-radius:11px;padding:13px 16px;display:grid;gap:8px}
.research-family-person-top{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px;align-items:baseline}
.research-family-person-top a{color:inherit;text-underline-offset:3px}
.research-family-person-top small{color:var(--muted,#5c6864)}
.research-family-issues{display:flex;flex-wrap:wrap;gap:6px}
.research-family-issues span{display:inline-flex;padding:4px 9px;border-radius:999px;background:rgba(177,134,73,.12);font-size:.76rem;line-height:1.4}
.research-family-issues span.ok{background:rgba(59,129,91,.12)}
.research-family-issues small{padding:4px}
.research-family-person>.text-link{justify-self:start;font-size:.84rem}
.research-family-pagination{display:flex;align-items:center;justify-content:center;gap:20px;margin:16px 0}
.research-family-pagination a{font-weight:600}
.research-legacy-audit{margin-top:18px;border-top:1px solid var(--border,#dedbd2);padding-top:14px}
.research-legacy-audit summary{font-weight:700;cursor:pointer}
.research-legacy-explainer{padding:8px 0 0;font-size:.9rem;line-height:1.6}
@media(max-width:700px){.research-family-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.research-family-filters{display:grid;grid-template-columns:1fr}.research-family-result-head{flex-direction:column;gap:2px}}
@media(max-width:375px){.research-family-stats{grid-template-columns:1fr}}

/* V7: Bildets fokalpunkt er præsentation, ikke billedbeskæring. */
.image-focus-trigger{margin:5px 2px 6px 0;white-space:normal;line-height:1.25}
.profile-attachment .image-focus-trigger{font-size:.72rem;padding:5px 8px}
.attachment-editor-actions{flex-wrap:wrap}
.timeline-hidden-items>div{justify-content:flex-start;flex-wrap:wrap}
.timeline-hidden-items>div>span{flex:1;min-width:180px}
.timeline-hidden-items form{display:inline-flex}
.image-focus-dialog{width:min(96vw,600px);max-height:min(94dvh,780px);padding:22px;border:1px solid #cddbd0;border-radius:18px;background:#fff;color:#21392c;box-shadow:0 24px 80px rgba(0,0,0,.26);overflow-y:auto}
.image-focus-dialog::backdrop{background:rgba(12,28,20,.65)}
.image-focus-header{display:flex;align-items:start;justify-content:space-between;gap:12px;margin-bottom:12px}
.image-focus-header h2{margin:0;font-size:1.25rem}
.image-focus-dialog .image-focus-close{background:transparent;border:1px solid #d3dfd4;border-radius:8px;font-size:1.35rem;cursor:pointer;min-width:35px;height:35px}
.image-focus-previews{display:grid;grid-template-columns:minmax(0,2fr) minmax(105px,1fr);gap:15px;align-items:center;margin:15px 0}
.image-focus-preview-landscape{aspect-ratio:4/3;border-radius:12px;overflow:hidden;background:#e9f1e9}
.image-focus-preview-avatar{aspect-ratio:1;border-radius:50%;overflow:hidden;background:#e9f1e9}
.image-focus-previews img{width:100%;height:100%;object-fit:cover;display:block}
.image-focus-controls label{display:block;margin:13px 0 5px;font-weight:600}
.image-focus-controls input[type=range]{width:100%;accent-color:#216c4f;cursor:pointer}
.image-focus-dialog .image-focus-actions{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px;margin-top:17px}
@media(max-width:540px){.image-focus-dialog{padding:15px}.image-focus-previews{gap:10px;grid-template-columns:minmax(0,1fr) 95px}}

/* Opdatering 9: adaptive, pladsbesparende kort til oldeforældre og tidligere generationer.
   Forældre, bedsteforældre og fokuspersonen beholder det oprindelige layout. */
.relation-visual-stack .relation-generation.compact-ancestors .relation-level{
  display:grid;
  grid-template-columns:repeat(var(--rel-cols-large,8),minmax(0,1fr));
  gap:8px;
  justify-content:center;
  align-items:stretch;
}
.relation-visual-stack .relation-generation.compact-ancestors .relation-tree-person{
  position:relative;display:flex;flex-direction:column;
  flex:none;width:100%;max-width:none;min-width:0;min-height:108px;
}
.relation-visual-stack .relation-generation.compact-ancestors .relation-tree-person button{
  display:flex;flex:1 1 auto;flex-direction:column;justify-content:flex-start;
  align-items:center;min-width:0;width:100%;gap:4px;
  padding:8px 4px 7px;text-align:center;
}
.relation-visual-stack .relation-generation.compact-ancestors .relation-tree-person .avatar,
.relation-visual-stack .relation-generation.compact-ancestors .relation-tree-person.has-photo .avatar{
  width:34px;height:34px;flex:0 0 34px;font-size:.64rem;
}
.relation-visual-stack .relation-generation.compact-ancestors .relation-tree-person button>span:last-child{
  display:flex;flex-direction:column;align-items:center;justify-content:flex-start;
  gap:1px;width:100%;min-width:0;
}
.relation-visual-stack .relation-generation.compact-ancestors .relation-tree-person strong{
  display:block;max-width:100%;font-size:.75rem;line-height:1.15;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.relation-visual-stack .relation-generation.compact-ancestors .relation-tree-person small{
  display:block;max-width:100%;margin-top:0;
  font-size:.65rem;line-height:1.2;white-space:nowrap;
  overflow:hidden;text-overflow:ellipsis;
}
.relation-visual-stack .relation-generation.compact-ancestors .relation-type-chip{
  margin:3px auto 0;padding:2px 4px;font-size:.61rem;
  line-height:1.25;max-width:100%;
}
.relation-visual-stack .relation-generation.compact-ancestors .relation-tree-person a{
  display:grid;place-items:center;position:absolute;right:2px;top:2px;
  width:24px;height:24px;flex:none;padding:0;
  border:0;border-radius:7px;background:rgba(255,255,255,.88);
  font-size:.8rem;
}
.relation-visual-stack .relation-generation.compact-ancestors .relation-tree-person a:hover{
  background:#e7f2e9;
}
@media(max-width:1239px){
  .relation-visual-stack .relation-generation.compact-ancestors .relation-level{
    grid-template-columns:repeat(var(--rel-cols-mid,8),minmax(0,1fr));
  }
}
@media(max-width:839px){
  .relation-visual-stack .relation-generation.compact-ancestors .relation-level{
    grid-template-columns:repeat(var(--rel-cols-small,4),minmax(0,1fr));
  }
}
@media(max-width:540px){
  .relation-visual-stack .relation-generation.compact-ancestors .relation-level{
    grid-template-columns:repeat(var(--rel-cols-mobile,2),minmax(0,1fr));
    gap:7px;
  }
  .relation-visual-stack .relation-generation.compact-ancestors .relation-tree-person{
    min-height:112px;
  }
}
/* Gør generationsoverskrifterne lige tydelige på mobil og desktop. */
.relation-visual-stack .relation-generation-label{
  display:flex;align-items:center;justify-content:center;gap:6px;
  width:max-content;max-width:100%;margin:6px auto 10px;
  color:#6f8178;font-weight:800;letter-spacing:.08em;text-transform:uppercase;
  font-size:.67rem;
}
.relation-visual-stack .relation-generation-label small{
  display:grid;place-items:center;min-width:20px;height:20px;
  padding:0 5px;border-radius:999px;background:#e5efe8;
  color:var(--green);font-size:.62rem;letter-spacing:0;
}

/* V10 – roligt administrationscenter og global online-footer */
.admin-fold{margin:14px 0;overflow:visible;padding:0!important;min-width:0;scroll-margin-top:76px}
.admin-fold>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:17px 21px;cursor:pointer;user-select:none}
.admin-fold>summary::-webkit-details-marker{display:none}
.admin-fold>summary:hover{background:#f4f8f4}
.admin-fold[open]>summary{border-bottom:1px solid var(--line);background:#f8fbf8;border-radius:inherit}
.admin-fold-title{display:grid;gap:4px;min-width:0}
.admin-fold-title strong{font-size:1.06rem;color:var(--ink,#213b2d)}
.admin-fold-title small{font-size:.78rem;color:var(--muted);font-weight:400}
.admin-fold-chevron{display:block;border:solid var(--green);border-width:0 2px 2px 0;width:10px;height:10px;flex:0 0 10px;transform:rotate(45deg);transition:transform .15s;margin:0 6px}
.admin-fold[open]>.admin-fold-chevron,.admin-fold[open]>summary .admin-fold-chevron{transform:rotate(225deg)}
.admin-fold-body{padding:16px 20px 22px}
.admin-fold-body>.section-head:first-child{margin-top:0}
.admin-fold-body>.section-head h2{font-size:1rem}
.admin-fold-body>.people-import-panel{margin:0;padding:0;border:0;box-shadow:none}
.admin-grid{grid-template-columns:minmax(0,1fr);gap:0;display:block}
.admin-grid>.admin-log{margin:14px 0}
.admin-grid>.admin-log>summary{padding:18px 20px}
.admin-shortcuts{position:relative;gap:8px}
.admin-profile-list{display:grid;gap:9px;margin-top:14px}
.admin-profile-item{border:1px solid #d5e2d8;border-radius:12px;background:#fff;min-width:0}
.admin-profile-item>summary{display:flex;align-items:center;justify-content:space-between;gap:10px;cursor:pointer;list-style:none;padding:12px 14px}
.admin-profile-item>summary::-webkit-details-marker{display:none}
.admin-profile-item[open]>summary{background:#f6faf7;border-bottom:1px solid var(--line)}
.admin-profile-identity{display:flex;align-items:center;gap:10px;min-width:0}
.admin-profile-identity>span:last-child{min-width:0}
.admin-profile-identity strong,.admin-profile-identity small{display:block;line-height:1.4;overflow-wrap:anywhere}
.admin-profile-identity strong em{font-size:.76rem;color:var(--muted);font-style:normal}
.admin-profile-identity small{color:var(--muted);font-size:.76rem}
.admin-profile-avatar{flex:0 0 40px}
.admin-profile-avatar .avatar{width:40px;height:40px}
.admin-profile-status{display:flex;align-items:center;gap:6px;white-space:nowrap;color:var(--muted);font-size:.78rem}
.admin-profile-item .admin-user-profile-form{margin:0;padding:14px}
.admin-member>.user-row label{display:grid;gap:5px;font-size:.78rem;font-weight:650}
.admin-member>.user-row label.check{display:flex}
.admin-member>.user-row label input,.admin-member>.user-row label select{width:100%;min-width:0}
.admin-legacy-cleanup{padding:12px 16px;margin-top:13px;border:1px solid #ecd9ac;border-radius:12px;background:#fffdf8}
.admin-legacy-cleanup>summary{cursor:pointer;font-weight:750}
.admin-legacy-cleanup p{font-size:.83rem;line-height:1.6;color:var(--muted)}
.admin-legacy-cleanup form{display:grid;justify-items:start;gap:12px}
.site-presence-footer{display:flex;align-items:center;flex-wrap:wrap;gap:12px 20px;margin:24px auto 78px;max-width:1440px;padding:14px clamp(16px,3vw,34px);border-top:1px solid var(--line);color:var(--muted);font-size:.79rem}
.presence-label{display:flex;align-items:center;gap:7px;white-space:nowrap;color:var(--green)}
.presence-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:#31966e;box-shadow:0 0 0 3px #e0f3e8;flex:none}
.presence-dot.is-offline{background:#a7b4ac;box-shadow:0 0 0 3px #e9eeea}
.presence-users{display:flex;flex-wrap:wrap;gap:6px;align-items:center;min-width:0}
.presence-user{padding:4px 9px;border:1px solid #d8e5da;border-radius:999px;background:#f4f8f5;color:var(--green);white-space:normal}
.presence-none{font-style:italic}
.site-presence-footer>small{margin-left:auto;white-space:nowrap}
@media(max-width:640px){.admin-fold>summary{padding:14px 15px}.admin-fold-body{padding:14px}.admin-profile-item>summary{padding:12px 10px}.admin-profile-status{font-size:.7rem}.site-presence-footer{margin-bottom:88px;gap:8px 12px}.site-presence-footer>small{margin-left:0;width:100%}}

/* V11 – import med søgbar forældervælger og brugernes profilportrætter */
.people-import-parent-picker{min-width:0}
.people-import-parent-picker .person-picker-chosen{font-size:.76rem}
.people-import-parent-clear{justify-self:start;border:0;background:none;color:var(--green);font-weight:700;font-size:.76rem;padding:2px 0;cursor:pointer}
.people-import-parent-clear:hover{text-decoration:underline}
.user-account-avatar{isolation:isolate}
.user-account-avatar img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block;border-radius:inherit;z-index:1}
.presence-user{display:inline-flex;align-items:center;gap:6px}
.presence-user .user-account-avatar{width:25px;height:25px;flex:0 0 25px;border-radius:50%}
.presence-user .user-menu-head{top:5px;left:9px;width:7px;height:7px}
.presence-user .user-menu-shoulders{left:5px;bottom:3px;width:15px;height:9px}
.admin-profile-avatar .user-account-avatar{width:40px;height:40px;border-radius:50%;flex:0 0 40px}
.admin-profile-avatar .user-menu-head{top:8px;left:15px;width:11px;height:11px}
.admin-profile-avatar .user-menu-shoulders{left:9px;bottom:5px;width:22px;height:15px}
.admin-member-identity>.admin-member-avatar{width:30px;height:30px;flex:0 0 30px;border-radius:50%;display:inline-block;vertical-align:middle;margin-right:8px}
.admin-member-identity>.admin-member-avatar .user-menu-head{top:6px;left:11px;width:9px;height:9px}
.admin-member-identity>.admin-member-avatar .user-menu-shoulders{left:7px;bottom:4px;width:17px;height:11px}
.account-portrait-heading{display:flex;align-items:center;gap:14px;margin-bottom:16px}
.account-portrait-heading h2{margin:0 0 5px}
.account-portrait-heading small{color:var(--muted)}
.account-portrait-heading .account-profile-avatar{width:64px;height:64px;flex:0 0 64px;border-radius:50%}
.account-portrait-heading .user-menu-head{top:12px;left:23px;width:18px;height:18px}
.account-portrait-heading .user-menu-shoulders{left:13px;bottom:7px;width:38px;height:24px}

.admin-member-identity{display:inline-flex;align-items:center;min-width:0;gap:8px}
.admin-member-identity strong{overflow-wrap:anywhere}
.admin-member-identity>.admin-member-avatar{margin-right:0}

/* Opdatering 13 — Historien som familiens fælles begivenhedsbog */
.history-view-tabs.page-shell{padding-top:20px;padding-bottom:0;display:flex;gap:8px;flex-wrap:wrap}
.history-view-tabs a{display:inline-flex;align-items:center;padding:10px 16px;background:#f4f8f5;border:1px solid #dce6df;color:#396751;border-radius:999px;text-decoration:none;font-size:.87rem;font-weight:750}
.history-view-tabs a:hover{background:#eaf2ec}
.history-view-tabs a.active{background:#19523d;color:#fff;border-color:#19523d}
.history-home{padding-top:21px}
.history-hero{display:flex;align-items:center;justify-content:space-between;gap:24px;border-radius:24px;background:linear-gradient(118deg,#e4f0e7,#f8faf5);border:1px solid #d4e6d9;padding:clamp(22px,4vw,46px);overflow:hidden}
.history-hero h1{font-size:clamp(2rem,4vw,3.1rem);line-height:1.08;margin:6px 0 15px;color:#163e31}
.history-hero p:not(.eyebrow){margin:0;max-width:670px;color:#4d6658;line-height:1.65}
.history-hero-highlights{display:flex;gap:12px 25px;flex-wrap:wrap;margin-top:20px}
.history-hero-highlights span{font-size:.85rem;color:#486453}
.history-hero-highlights strong{font-size:1.23rem;color:#18553e;margin-right:5px}
.history-hero-ornament{flex:0 0 175px;height:175px;align-self:center;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;border:3px solid rgba(55,111,75,.2);border-radius:50%;color:#578b70;transform:rotate(-12deg)}
.history-hero-ornament span{font-family:Georgia,serif;font-size:2.2rem;font-weight:700;line-height:1}
.history-hero-ornament i{width:65px;height:1px;background:#93b59d}
.history-category-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:20px 0 34px}
.history-category-card{min-width:0;display:grid;grid-template-columns:45px 1fr;grid-template-rows:auto auto;align-items:center;gap:2px 11px;background:#fff;border:1px solid var(--line);border-radius:16px;padding:16px;text-decoration:none;color:inherit;transition:border-color .15s,background .15s}
.history-category-card:hover,.history-category-card.active{border-color:#448d66;background:#f0f8f2}
.history-category-icon{grid-row:1/3;display:grid;place-items:center;width:42px;height:42px;border-radius:13px;background:#e9f4eb;color:#1b6348;font-size:1.3rem}
.history-category-card strong{font-size:1.4rem;line-height:1.1;color:#184a38;font-weight:800}
.history-category-card>span:last-child{font-size:.77rem;color:#526b60;line-height:1.3}
.history-results-head{display:flex;align-items:end;justify-content:space-between;gap:16px;margin-bottom:18px}
.history-results-head h2{margin:3px 0 5px;font-size:1.7rem}
.history-results-head .muted{max-width:780px;line-height:1.5}
.history-result-count{white-space:nowrap;font-size:.84rem;color:#326e4f;background:#e8f3eb;padding:8px 13px;border-radius:999px;font-weight:700}
.history-filters{display:grid;grid-template-columns:minmax(190px,2fr) minmax(150px,1.1fr) repeat(2,minmax(100px,.6fr)) minmax(130px,.95fr) minmax(130px,.95fr);gap:12px;background:#fff;border:1px solid var(--line);padding:18px;border-radius:18px;margin-bottom:26px;align-items:end}
.history-filters label{display:grid;min-width:0;gap:6px;font-size:.78rem;font-weight:700;color:#355b47}
.history-filters input,.history-filters select{min-width:0;width:100%;height:42px;border:1px solid #d8e2da;border-radius:10px;padding:8px 10px;background:#fff;color:#1e3428;font-family:inherit;font-size:.86rem}
.history-filter-actions{display:flex;align-items:center;justify-content:flex-end;gap:9px;grid-column:1/-1}
.history-event-timeline{position:relative;margin:12px 0 26px;padding-left:27px}
.history-event-timeline::before{content:'';position:absolute;left:10px;top:15px;bottom:12px;width:2px;background:#cfdfd4}
.history-decade{display:flex;align-items:center;gap:12px;position:relative;margin:22px 0 14px;color:#325a41;font-weight:800;font-size:1rem}
.history-decade::before{content:'';position:absolute;left:-22px;width:12px;height:12px;border:3px solid #eaf3ec;background:#58926a;border-radius:50%}
.history-decade span{background:#eaf4ed;border:1px solid #dbe9dd;border-radius:999px;padding:6px 13px}
.history-event-card{position:relative;display:flex;align-items:center;gap:17px;padding:18px 21px;background:#fff;border:1px solid var(--line);border-radius:17px;margin-bottom:12px;box-shadow:0 3px 13px rgba(24,72,43,.03);min-width:0}
.history-event-portraits{display:flex;flex:0 0 auto;align-items:center;padding-left:1px}
.history-event-portraits a{display:block;flex:0 0 54px;text-decoration:none}
.history-event-portraits a+a{margin-left:-14px}
.history-event-portraits .avatar{width:54px;height:54px;font-size:.77rem;border:3px solid #fff;box-shadow:0 0 0 1px #dbe7dd}
.history-event-main{flex:1;min-width:0}
.history-event-meta{display:flex;align-items:center;flex-wrap:wrap;gap:9px;margin-bottom:7px;font-size:.78rem;color:#61776a}
.history-kind{font-weight:800;color:#367455;background:#eaf5ee;border-radius:6px;padding:3px 8px}
.history-event-card h4{font-size:1.02rem;margin:0 0 6px;line-height:1.35}
.history-event-card h4 a{color:#174d38;text-decoration:none}
.history-event-card h4 a:hover{text-decoration:underline}
.history-place{font-size:.79rem;color:#66786c;margin:0 0 7px}
.history-event-links{display:flex;align-items:center;flex-wrap:wrap;gap:7px 14px;font-size:.75rem}
.history-event-links a{color:#317755;font-weight:750;text-decoration:none}
.history-event-links a:hover{text-decoration:underline}
.history-source-status{font-weight:700;border-radius:999px;padding:3px 9px}
.history-source-status.documented{background:#e9f4eb;color:#2b7148}
.history-source-status.undocumented{background:#f4f3ee;color:#7a796f}
.history-source-photo{display:block;flex:0 0 90px;align-self:stretch;max-height:95px;border-radius:10px;overflow:hidden;background:#eaf0ec}
.history-source-photo img{width:100%;height:100%;object-fit:cover}
.history-pagination{display:flex;align-items:center;justify-content:center;gap:16px;margin:27px 0 22px;font-size:.85rem;color:#52695b}
.history-note{font-size:.78rem;color:#708176;line-height:1.6;margin-top:25px}
.history-note a{color:#2c7051}
.history-empty{padding:35px;text-align:center}
@media(max-width:1100px){.history-filters{grid-template-columns:repeat(3,minmax(0,1fr))}.history-search{grid-column:span 2}.history-category-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:740px){.history-category-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.history-filters{grid-template-columns:repeat(2,minmax(0,1fr));padding:13px}.history-search{grid-column:1/-1}.history-hero{padding:22px}.history-hero-ornament{display:none}.history-event-card{padding:13px;gap:10px}.history-event-portraits a{flex-basis:42px}.history-event-portraits .avatar{width:42px;height:42px}.history-source-photo{flex-basis:68px;max-height:85px}.history-results-head{align-items:flex-start;flex-wrap:wrap}.history-view-tabs.page-shell{padding-top:15px}}
@media(max-width:450px){.history-filters{grid-template-columns:1fr 1fr}.history-filters label:nth-of-type(2){grid-column:1/-1}.history-category-card{padding:11px;grid-template-columns:36px 1fr;gap:2px 7px}.history-category-icon{width:35px;height:35px}.history-category-card strong{font-size:1.16rem}.history-event-card{flex-wrap:wrap}.history-event-main{flex-basis:calc(100% - 65px)}.history-source-photo{margin-left:52px;flex:0 0 75px;height:70px}.history-event-timeline{padding-left:21px}.history-event-timeline::before{left:6px}.history-decade::before{left:-20px}.history-filter-actions{justify-content:flex-start}.history-hero-highlights{gap:4px 12px}}

/* V14 · Personprofil: diskrete redigeringskontroller og sammenklappede værktøjer. */
.person-page .profile-biography-section{position:relative;min-width:0;margin:4px 0 23px;padding:15px 18px 15px;background:#f5f9f6;border:1px solid #dae8de;border-left:3px solid #90b49e;border-radius:10px;scroll-margin-top:110px}
.person-page .profile-biography-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:29px;margin-bottom:8px;padding-right:110px}
.person-page .profile-biography-heading h3{margin:0;font-size:1rem;color:var(--green)}
.person-page .profile-biography-section .profile-biography{margin:0;padding:0;border:0;border-radius:0;background:none;font-size:.93rem;max-width:100%}
.person-page .profile-biography-section .profile-biography>:last-child{margin-bottom:0}
.person-page .profile-bio-editor>summary{position:absolute;right:12px;top:12px;display:flex;align-items:center;justify-content:center;min-height:34px;padding:5px 9px;border:1px solid #bad3c1;background:#fff;border-radius:9px;cursor:pointer;list-style:none;font-size:.78rem;font-weight:800;color:var(--green)}
.person-page .profile-bio-editor>summary::-webkit-details-marker{display:none}
.person-page .profile-bio-editor>summary:hover,.person-page .profile-bio-editor>summary:focus-visible{background:#eaf3ed;outline-offset:2px}
.person-page .profile-bio-editor[open]>summary{background:#e6f0e9}
.person-page .profile-bio-editor>form{margin:15px 0 0;padding:16px;border:1px solid #dae6dd;border-radius:12px;background:#fff}
.person-page .profile-bio-editor .profile-bio-actions{display:flex;flex-wrap:wrap;gap:9px;align-items:center}
.person-page .profile-bio-editor .profile-bio-actions>button{justify-self:auto}
/* Blyantsikon i øverste højre hjørne; formularen åbner under posten. */
.person-page .timeline-item{padding-right:40px}
.person-page .timeline-inline-editor{margin:0;padding:0;border:0;max-width:none;position:static}
.person-page .timeline-inline-editor>summary,.person-page .timeline-edit-shortcut{position:absolute;right:0;top:0;width:35px;height:35px;display:grid;place-items:center;padding:0;margin:0;border:1px solid #d4e4da;background:#f8fbf9;color:var(--green);border-radius:9px;cursor:pointer;font-size:1.1rem;font-weight:700;text-decoration:none;list-style:none;line-height:1}
.person-page .timeline-inline-editor>summary::-webkit-details-marker{display:none}
.person-page .timeline-inline-editor>summary:hover,.person-page .timeline-inline-editor>summary:focus-visible,.person-page .timeline-edit-shortcut:hover{background:#e7f2eb;border-color:#a8c9b4}
.person-page .timeline-inline-editor[open]>summary{background:#e4f0e8;border-color:#7eae90}
.person-page .timeline-inline-editor-panel{margin:12px 0 6px;padding:14px;background:#f7faf7;border:1px solid #d5e5d9;border-radius:12px}
.person-page .timeline-inline-editor-panel .form-grid{margin:10px 0;gap:10px}
/* Kilder, redaktørtid og profilredigering deler samme rolige accordeon. */
.person-page .profile-more-disclosure{display:block;min-width:0;margin:12px 0;border:1px solid #d6e5db;border-radius:15px;background:#fff;scroll-margin-top:104px;overflow:clip}
.person-page .profile-more-disclosure>summary{display:flex;align-items:center;gap:13px;padding:17px 18px;list-style:none;cursor:pointer;transition:background .15s}
.person-page .profile-more-disclosure>summary::-webkit-details-marker{display:none}
.person-page .profile-more-disclosure>summary:hover,.person-page .profile-more-disclosure>summary:focus-visible{background:#f6faf7}
.person-page .profile-more-disclosure>summary>span:nth-child(2){display:grid;gap:4px;min-width:0;flex:1}
.person-page .profile-more-disclosure>summary strong{font-size:1rem;color:var(--ink)}
.person-page .profile-more-disclosure>summary small{font-size:.79rem;line-height:1.4;font-weight:400;color:var(--muted)}
.person-page .profile-more-summary-icon{display:grid;place-items:center;width:39px;height:39px;flex:0 0 39px;background:#eaf3ed;color:var(--green);border-radius:11px;font-size:1.2rem}
.person-page .profile-more-chevron{font-size:1.45rem;color:var(--green);transition:transform .15s;line-height:1}
.person-page .profile-more-disclosure[open] .profile-more-chevron{transform:rotate(180deg)}
.person-page .profile-more-disclosure>div{padding:0 14px 14px;border-top:1px solid #e2ebe4}
.person-page .profile-more-disclosure .profile-sources-section,.person-page .profile-more-disclosure .profile-time-section,.person-page .profile-more-disclosure .profile-links{margin:12px 0;padding:17px;border:1px solid #e3ece5;box-shadow:none;border-radius:12px}
.person-page .profile-more-disclosure .profile-two{margin-top:0;display:block}
.person-page .profile-resources-disclosure .profile-two>.profile-links{max-width:none}
.person-page .profile-more-disclosure .profile-editor-content{padding:12px;background:#fafcfb}
.person-page .profile-more-disclosure .editor-zone{margin:0;padding:15px;border:0;background:transparent;box-shadow:none}
.person-page .profile-editor-intro{font-size:.86rem;color:var(--muted);margin:0 0 12px}
.person-page .profile-more-disclosure .editor-zone .edit-existing-list{max-width:100%}
.person-page .profile-more-disclosure .profile-time-section .section-head{flex-wrap:wrap}
@media(max-width:640px){
 .person-page .profile-biography-section{padding:13px 12px}
 .person-page .profile-biography-heading{padding-right:100px}
 .person-page .timeline-item{padding-right:34px}
 .person-page .timeline-inline-editor>summary,.person-page .timeline-edit-shortcut{width:30px;height:30px}
 .person-page .timeline-inline-editor-panel{padding:10px;margin-left:-15px}
 .person-page .profile-more-disclosure>summary{padding:13px 12px;gap:9px}
 .person-page .profile-more-disclosure>div{padding:0 8px 8px}
 .person-page .profile-more-disclosure .profile-sources-section,.person-page .profile-more-disclosure .profile-time-section,.person-page .profile-more-disclosure .profile-links{padding:12px}
 .person-page .profile-more-disclosure .editor-zone{padding:9px}
}

/* V15 – roligere profilheader og redigering direkte ved oplysningerne. */
.person-page .profile-hero{
  display:grid;grid-template-columns:132px minmax(0,1fr) auto;align-items:center;
  gap:20px 24px;padding:26px 28px;position:relative;isolation:isolate;
  background:linear-gradient(115deg,#f2f8f3 0%,#fff 49%,#fff 100%);
  border:1px solid #d9e5dd;border-radius:23px;box-shadow:0 10px 32px rgba(26,63,42,.07);
}
.person-page .profile-hero-info{min-width:0;align-self:center}
.person-page .profile-hero-info .eyebrow{margin:0 0 5px;letter-spacing:.09em}
.person-page .profile-hero-title-row{display:flex;align-items:flex-start;gap:9px;min-width:0}
.person-page .profile-hero h1{font-size:clamp(1.7rem,2.6vw,2.45rem);line-height:1.13;letter-spacing:-.026em;overflow-wrap:break-word;min-width:0;margin:0}
.person-page .profile-hero .profile-age{font-size:.46em;line-height:1.3;letter-spacing:0;white-space:normal}
.person-page .profile-meta{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;margin-top:10px;font-size:.84rem}
.person-page .profile-meta>span{padding:4px 10px;border:1px solid #dfe9e0;border-radius:999px;background:#fff;overflow-wrap:anywhere}
/* Automatisk stjernetegn vises kun ved en præcis fødselsdato. */
.person-page .profile-meta>span.profile-zodiac{display:inline-flex;align-items:center;gap:6px;border-color:#cadbd0;background:#edf5ee;color:#1d5038;font-weight:600;white-space:nowrap}
.person-page .profile-meta .profile-zodiac-symbol{font-family:"Segoe UI Symbol","Apple Symbols","Noto Sans Symbols 2",system-ui,sans-serif;font-size:1.12em;line-height:1}

.person-page .profile-period-badges{margin-top:12px;gap:6px}
.person-page .profile-hero-actions{display:flex;align-items:stretch;justify-content:flex-end;gap:8px;max-width:175px;flex-direction:column}
.person-page .profile-hero-actions .btn{width:100%;text-align:center;white-space:normal;padding:8px 10px;font-size:.8rem;line-height:1.3}
.person-page .profile-portrait-wrap{position:relative;align-self:center;justify-self:center;width:132px;height:132px;flex:none;z-index:2}
.person-page .profile-portrait-wrap>.avatar.xl{width:100%;height:100%;border:5px solid white;box-shadow:0 6px 23px #1c513528;background:#dde8df;font-size:1.65rem}
.person-page .profile-portrait-edit{position:absolute;right:1px;bottom:0;z-index:20}
.person-page .profile-portrait-edit>summary{display:flex;align-items:center;justify-content:center;list-style:none;cursor:pointer;width:37px;height:37px;border:2px solid white;border-radius:50%;background:var(--green);color:white;box-shadow:0 4px 12px #102c2260;font-size:1.05rem;transition:background .16s,transform .16s}
.person-page .profile-portrait-edit>summary::-webkit-details-marker{display:none}
.person-page .profile-portrait-edit>summary:hover,.person-page .profile-portrait-edit[open]>summary{background:var(--green2);transform:translateY(-2px)}
.person-page .profile-portrait-edit>summary:focus-visible{outline:3px solid #739d85;outline-offset:2px}
.person-page .profile-portrait-menu{position:absolute;left:0;top:44px;min-width:245px;max-width:min(315px,80vw);padding:15px;z-index:30;border:1px solid var(--line);border-radius:14px;background:#fff;box-shadow:0 16px 40px #163d2533;color:var(--text)}
.person-page .profile-portrait-menu strong{display:block;margin-bottom:8px;font-size:.86rem}
.person-page .profile-portrait-upload{display:grid;gap:9px;margin:0 0 8px}
.person-page .profile-portrait-upload label{display:grid;gap:5px;font-size:.8rem;font-weight:700}
.person-page .profile-portrait-upload input[type=file]{width:100%;min-width:0;font-size:.76rem}
.person-page .profile-portrait-menu .btn{width:100%;padding:8px 9px;margin:0}
.person-page .profile-pencil{display:inline-grid;place-items:center;flex:0 0 auto;width:30px;height:30px;border:1px solid #d5e3d8;background:#f8fbf9;border-radius:9px;color:var(--green);font-size:1rem;cursor:pointer;line-height:1}
.person-page .profile-pencil:hover{background:#e4f1e7;border-color:#b0ccb7}
.person-page .profile-pencil:focus-visible{outline:3px solid #7eb394;outline-offset:2px}
.person-page .profile-name-pencil{margin-top:4px}
.person-page .profile-facts-section>h3{margin:0 0 12px}
.person-page .facts{grid-template-columns:57px minmax(0,1fr);gap:0;font-size:.85rem;margin:0}
.person-page .facts dt,.person-page .facts dd{padding:12px 0;border-bottom:1px solid #e8eee9}
.person-page .facts dt:last-of-type,.person-page .facts dd:last-child{border-bottom:0}
.person-page .facts dt{color:#425b4b}
.person-page .facts dd{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;min-width:0}
.person-page .facts dd>span{display:block;min-width:0;overflow-wrap:anywhere;color:#41524a}
.person-page .facts dd>span>small{display:block;color:var(--muted);font-size:.76rem;margin-top:3px}
.person-page .profile-fact-pencil{width:25px;height:25px;min-width:25px;border-radius:7px;font-size:.84rem;margin-top:-2px}
.profile-edit-dialog{width:min(92vw,660px);max-height:min(90dvh,850px);padding:24px;border:1px solid #d6e3d9;border-radius:19px;box-shadow:0 25px 90px #0d291c55;background:#fff;color:var(--text);overflow:auto}
.profile-edit-dialog::backdrop{background:rgba(16,35,23,.6)}
.profile-edit-dialog-header{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding-bottom:12px;border-bottom:1px solid var(--line)}
.profile-edit-dialog-header h2{margin:2px 0 0;font-size:1.25rem}
.profile-dialog-close{border:1px solid #dbe6df;background:#f9fcfa;border-radius:9px;min-width:35px;height:35px;cursor:pointer;font-size:1.3rem}
.profile-dialog-form{margin-top:17px}
.profile-dialog-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px;margin-top:5px}
.profile-dialog-actions .btn{width:auto;max-width:100%}
@media(max-width:980px){.person-page .profile-hero{grid-template-columns:108px minmax(0,1fr);padding:20px;gap:14px 19px}.person-page .profile-portrait-wrap{width:108px;height:108px}.person-page .profile-hero-actions{grid-column:2;max-width:none;flex-direction:row;justify-content:flex-start;flex-wrap:wrap}.person-page .profile-hero-actions .btn{width:auto;flex:0 1 auto}.person-page .profile-portrait-menu{left:auto;right:0}}
@media(max-width:640px){.person-page .profile-hero{grid-template-columns:84px minmax(0,1fr);padding:15px;gap:12px}.person-page .profile-portrait-wrap{width:84px;height:84px}.person-page .profile-portrait-wrap>.avatar.xl{width:100%;height:100%;font-size:1.1rem;border-width:3px}.person-page .profile-portrait-edit>summary{width:30px;height:30px;font-size:.92rem}.person-page .profile-hero h1{font-size:clamp(1.27rem,5vw,1.7rem)}.person-page .profile-hero .profile-age{display:inline;font-size:.56em}.person-page .profile-meta{font-size:.71rem;gap:5px}.person-page .profile-meta>span{padding:3px 8px}.person-page .profile-hero-actions{grid-column:1/-1;width:100%;justify-content:stretch}.person-page .profile-hero-actions .btn{width:auto;flex:1 1 125px}.person-page .profile-portrait-menu{left:-6px;right:auto;top:38px;min-width:min(270px,84vw)}.profile-edit-dialog{padding:15px;width:min(96vw,660px)}.profile-dialog-actions .btn{flex:1}}

/* V16: portrætfokus med ægte zoom, uden at røre originalfilen. */
.person-page .profile-portrait-wrap>.avatar img{width:100%;height:100%;object-fit:cover}
.image-focus-zoom-row[hidden]{display:none}
.image-focus-zoom-row{margin-top:12px;padding:8px 12px 10px;background:#f2f7f3;border:1px solid #deeadf;border-radius:12px}
.image-focus-zoom-row .small-note{margin:5px 0 0}
/* Samlet oprettelsesområde: skjulte formularer må aldrig vises af form-grid regler. */
.person-page .profile-entry-panel[hidden]{display:none!important}
.person-page .profile-combined-editor{scroll-margin-top:115px}
.person-page .profile-entry-selector{display:flex;gap:8px;flex-wrap:wrap;margin:13px 0 16px}
.person-page .profile-entry-selector button{font-size:.82rem}
.person-page .profile-entry-panel{padding:14px 15px;border:1px solid #dae7dc;border-radius:13px;background:#f9fbf9}
.person-page .profile-entry-panel h4{margin:0;font-size:.94rem;color:var(--green)}
.person-page .profile-entry-panel>.small-note{margin:5px 0 12px}
.person-page .profile-entry-panel .form-grid{margin-top:0}
@media(max-width:540px){.person-page .profile-entry-selector .btn{flex:1 1 120px}.person-page .profile-entry-panel{padding:12px}}

/* V17 – kildekontrol og redaktørtid som diskrete sidekort under forskningsstatus. */
.person-page .profile-sidebar-panel{min-width:0;margin:13px 0 0;padding:15px 13px;border:1px solid #dce8df;border-radius:14px;background:linear-gradient(135deg,#fff,#f9fcfa)}
.person-page .profile-sidebar-heading{display:flex;align-items:baseline;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-bottom:12px}
.person-page .profile-sidebar-heading h3{font-size:.98rem;line-height:1.3;margin:0}
.person-page .profile-sidebar-heading small{font-size:.7rem;color:var(--muted)}
.person-page .profile-sidebar-heading>strong{font-size:.88rem;font-variant-numeric:tabular-nums;color:var(--green)}
.person-page .profile-documentation-lights{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.person-page .profile-documentation-light{display:flex;min-width:0;align-items:center;gap:7px;font-size:.76rem;line-height:1.25;color:#65746a;border:1px solid #e5ebe7;border-radius:10px;padding:8px;background:#f8faf8}
.person-page .profile-documentation-light span:nth-child(2){overflow-wrap:anywhere}
.person-page .profile-documentation-bulb{width:11px;height:11px;border-radius:50%;flex:0 0 11px;background:#d3dbd6;box-shadow:inset 0 0 0 1px #b9c8bf}
.person-page .profile-documentation-light.is-on{color:#285e43;border-color:#cee4d4;background:#f1f8f2}
.person-page .profile-documentation-light.is-on .profile-documentation-bulb{background:#3da66d;box-shadow:0 0 0 3px #dcefe2,inset 0 0 0 1px #2f9159}
.person-page .profile-documentation-note{font-size:.71rem;line-height:1.45;margin:10px 0 0}
.person-page .profile-documentation-details,.person-page .profile-time-details{margin-top:12px;border-top:1px solid #e3ebe5;padding-top:10px}
.person-page .profile-documentation-details>summary,.person-page .profile-time-details>summary{cursor:pointer;font-size:.78rem;font-weight:750;color:var(--green);list-style:revert;padding:2px 0}
.person-page .profile-documentation-details-body,.person-page .profile-time-details-body{padding-top:10px}
.person-page .profile-documentation-details-body .verification-form{margin:12px 0;padding-top:12px;gap:9px}
.person-page .profile-documentation-details-body .verification-form label{font-size:.78rem}
.person-page .profile-documentation-source-list{margin:15px 0 12px;border-top:1px solid var(--line);padding-top:10px}
.person-page .profile-documentation-source-list h4{font-size:.84rem;margin:0 0 8px}
.person-page .profile-documentation-source{display:grid;gap:3px;padding:9px 0;border-bottom:1px solid #edf2ee;font-size:.79rem;overflow-wrap:anywhere}
.person-page .profile-documentation-source>small{font-size:.7rem;color:var(--muted)}
.person-page .profile-documentation-source>a{color:var(--green);font-weight:700}
.person-page .profile-documentation-source .profile-attachments{max-width:100%;min-width:0}
.person-page .profile-editor-time-panel .profile-time-editors>div{font-size:.78rem;gap:8px}
.person-page .profile-sidebar-panel .text-link{font-size:.78rem}
@media(min-width:1300px){.person-page .profile-documentation-lights{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:980px){.person-page .profile-documentation-lights{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:720px){.person-page .profile-documentation-lights{grid-template-columns:repeat(2,minmax(0,1fr))}}
.person-page .profile-documentation-light .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* Opdatering 18: Livslinjen som primært redigeringssted */
.person-page .timeline-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.person-page .timeline-heading h2{margin:0}
.person-page .timeline-add-disclosure{margin:14px 0 24px;padding:0;border:1px solid #d4e2d6;border-radius:14px;background:#f7faf8;overflow:hidden}
.person-page .timeline-add-disclosure>summary{display:flex;align-items:center;gap:9px;list-style:none;cursor:pointer;font-weight:750;padding:11px 16px;color:#1b5137;background:#eef5f0}
.person-page .timeline-add-disclosure>summary::-webkit-details-marker{display:none}
.person-page .timeline-add-disclosure>summary:hover{background:#e5f1e9}
.person-page .timeline-add-chevron{margin-left:auto;transition:transform .15s}
.person-page .timeline-add-disclosure[open] .timeline-add-chevron{transform:rotate(180deg)}
.person-page .timeline-add-content{padding:16px}
.person-page .timeline-add-selector{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:13px}
.person-page .timeline-add-selector .btn{font-size:.79rem}
.person-page .profile-entry-panel[hidden]{display:none!important}
.person-page .timeline-add-content .profile-entry-panel{background:white}
.person-page .timeline-undated-list{margin-top:20px;background:#f8faf8;border:1px solid #d9e5dc;border-radius:14px;padding:12px 16px}
.person-page .timeline-undated-list>summary{cursor:pointer;font-weight:750;color:#27583f}
.person-page .timeline-undated-list>summary small{display:block;font-weight:400;color:var(--muted);margin-top:4px}
.person-page .timeline-undated-list .timeline{margin-top:16px}
.person-page .timeline-record-editor .attachment-editor{min-width:0;max-width:100%}
.person-page .timeline-record-editor .edit-attachment-gallery{max-width:100%}
.person-page .timeline-linked-source .timeline-inline-editor{position:relative;margin:6px 0 0}
.person-page .timeline-linked-source .timeline-inline-editor>summary{position:relative;top:auto;right:auto;width:30px;height:30px}
.person-page .timeline-linked-source .timeline-inline-editor-panel{margin:8px 0}
.person-page .timeline-inline-editor .timeline-edit-source{margin:9px 0}
.person-page .timeline-inline-editor-panel h4{margin:0 0 9px;color:var(--green)}
.person-page #timeline-add,.person-page #udaterede-livsspor{scroll-margin-top:95px}
@media(max-width:640px){.person-page .timeline-add-content{padding:10px}.person-page .timeline-add-selector .btn{flex:1 1 125px}.person-page .timeline-add-disclosure>summary{padding:12px}.person-page .timeline-undated-list{padding:10px}}

/* V19: sikker, synlig beskæring i profilportrættets egen maske. */
.person-page .profile-portrait-wrap>.profile-portrait-avatar{display:block;position:relative;overflow:hidden;isolation:isolate}
.person-page .profile-portrait-wrap>.profile-portrait-avatar>img{display:block;width:100%;height:100%;max-width:none;max-height:none;object-fit:cover;object-position:var(--portrait-x,50%) var(--portrait-y,50%);transform-origin:var(--portrait-x,50%) var(--portrait-y,50%);transform:scale(var(--portrait-zoom,1));transition:none;will-change:auto}
/* Vielse og kilder – én tydelig sammenhæng på tværs af profilens to visninger. */
.marriage-sources{display:flex;flex-wrap:wrap;gap:6px 9px;align-items:flex-start;margin-top:10px;padding-top:10px;border-top:1px solid #dbe9df}
.marriage-source-entry{min-width:0;max-width:100%;font-size:.76rem}
.marriage-source-link,.marriage-source-label{display:inline-flex;align-items:center;gap:5px;max-width:100%;white-space:normal;overflow-wrap:anywhere;line-height:1.4;color:var(--green);font-weight:700;text-decoration:none}
.marriage-source-link:hover{text-decoration:underline}
.marriage-source-media{width:100%;margin:4px 0;font-weight:400}
.marriage-source-media>summary{cursor:pointer;font-size:.75rem;color:var(--muted)}
.marriage-source-media .profile-attachment{max-width:240px}
.profile-partner-marriage{margin-top:10px;padding:10px 11px;border:1px solid #d8e6dd;border-radius:11px;background:#fff;display:grid;gap:4px;min-width:0}
.profile-partner-marriage-label{font-size:.68rem;letter-spacing:.04em;text-transform:uppercase;font-weight:750;color:#5a7867}
.profile-partner-marriage>strong{font-size:.84rem;line-height:1.4}
.profile-partner-marriage>small{font-size:.76rem;color:var(--muted)}
.profile-partner-sources{padding-top:8px;margin-top:6px}
.profile-marriage-edit{margin-top:5px;border-top:1px solid #e2ede5;padding-top:7px}
.profile-marriage-edit>summary{cursor:pointer;color:var(--green);font-size:.76rem;font-weight:750;line-height:1.5}
.profile-marriage-form{grid-template-columns:minmax(0,1fr);gap:8px;margin:10px 0 8px}
.profile-marriage-form label{font-size:.76rem;min-width:0}
.profile-marriage-form input{width:100%;min-width:0}
.profile-marriage-source-add{margin-top:4px;font-size:.75rem}
.profile-marriage-edit .small-note{font-size:.7rem}
.timeline-marriage-sources{gap:8px;margin-top:9px}
@media(max-width:640px){.timeline-marriage-sources{flex-direction:column}.profile-partner-marriage{padding:9px}}

.person-page .profile-portrait-wrap>.profile-portrait-avatar>img{position:absolute;inset:0;width:100%;height:100%}
.person-page .profile-portrait-wrap>.profile-portrait-avatar>img[hidden]{display:none}

/* Opdatering 21 – folketællinger ligger kun under dokumentation.
   Hvert livslinjespor er ét samlet kort; blyanten er integreret i øverste højre hjørne. */
.person-page .timeline-item {padding-right:0}
.person-page .timeline-item>.timeline-item-content {
  position:relative; min-width:0; width:100%; box-sizing:border-box;
  padding:14px 58px 16px 16px;
  margin:6px 0 9px; border:1px solid #d8e5db; border-radius:16px;
  background:linear-gradient(120deg,#f5faf6,#fff);
  box-shadow:0 4px 14px rgba(24,67,43,.035);
}
.person-page .timeline-item>.timeline-item-content.has-relation-card {padding:0}
.person-page .timeline-item-content .timeline-relationship-card {
  box-sizing:border-box; width:100%; max-width:none; min-width:0;
  margin:0; padding:14px 58px 14px 16px;
  border:0; box-shadow:none; background:transparent;
}
.person-page .timeline-item-content .timeline-inline-editor>summary,
.person-page .timeline-item-content>.timeline-edit-shortcut {right:12px;top:12px;z-index:2}
.person-page .timeline-item-content.has-relation-card>.timeline-inline-editor[open]>.timeline-inline-editor-panel {margin:12px 14px 14px}
.person-page .timeline-item-content .timeline-linked-source .timeline-inline-editor>summary {top:auto;right:auto}
/* Gemte billedudsnit og zoom respekteres også i kildelister og andre vedhæftninger. */
.profile-attachment>a:hover img {transform:scale(calc(var(--image-zoom,1) * 1.04))}
.person-page .profile-documentation-source .profile-attachment>a {overflow:hidden}
.person-page .profile-documentation-census-fact strong {font-size:.82rem;color:var(--ink)}
.person-page .profile-documentation-census-fact span {font-size:.75rem;color:var(--muted)}
@media(max-width:640px) {
  .person-page .timeline-item {padding-right:0}
  .person-page .timeline-item>.timeline-item-content{padding:12px 48px 13px 12px}
  .person-page .timeline-item-content .timeline-relationship-card{padding:12px 47px 12px 12px}
  .person-page .timeline-item-content .timeline-inline-editor>summary,
  .person-page .timeline-item-content>.timeline-edit-shortcut{top:10px;right:9px}
}

/* V25: Personens interne forskningsvæg (indgår ikke i slægtsbogen). */
.person-page .profile-main>.person-wall{padding:22px 24px;min-width:0}
.wall-heading{align-items:flex-start;gap:14px}
.wall-heading h2{margin:0 0 5px}
.wall-post-count{font-size:.72rem;color:#557365;white-space:nowrap;padding:6px 9px;border-radius:20px;background:#eff6f0}
.wall-not-in-book{display:inline-flex;padding:7px 11px;background:#f3f7f2;color:#557164;border:1px solid #e1eadf;border-radius:10px;font-size:.74rem;margin:0 0 16px}
.wall-composer,.wall-edit-form{display:grid;grid-template-columns:1fr 1fr;gap:12px;min-width:0}
.wall-composer{padding:16px;border:1px solid #dbe8df;border-radius:15px;background:linear-gradient(135deg,#f7faf7,#fff);margin-bottom:18px}
.wall-field{display:grid;gap:6px;min-width:0;font-size:.78rem;font-weight:700}
.wall-field.wide{grid-column:1/-1}
.wall-field input,.wall-field select,.wall-field textarea{min-width:0;width:100%;font:inherit;font-weight:400;border:1px solid #ccdcd2;border-radius:10px;background:white;color:var(--ink);padding:10px}
.wall-field textarea{resize:vertical;min-height:94px;line-height:1.55}
.wall-field input[type=file]{font-size:.73rem}
.wall-composer-footer{grid-column:1/-1;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.wall-composer-footer .btn{margin-left:auto}
.wall-empty{text-align:center;padding:25px 12px;color:var(--muted);border-top:1px solid var(--line);font-size:.9rem}
.wall-post{padding:18px 0;border-top:1px solid #dfe9e0;min-width:0}
.wall-post-head{display:flex;align-items:center;gap:9px;min-width:0}
.wall-post-head .user-menu-avatar,.wall-composer-footer .user-menu-avatar{flex:0 0 38px;width:38px;height:38px;border-radius:50%}
.wall-post-author{min-width:0;flex:1;display:grid;gap:3px;font-size:.85rem;line-height:1.25}
.wall-post-author small{color:var(--muted);font-size:.7rem}
.wall-kind{padding:5px 9px;border-radius:100px;background:#edf5ef;color:#426d53;font-size:.7rem;font-weight:750;white-space:nowrap}
.wall-kind-question{background:#f2eef9;color:#74669c}
.wall-kind-task{background:#fff2da;color:#956b24}
.wall-post-body{white-space:normal;overflow-wrap:anywhere;font-size:.89rem;line-height:1.65;margin:12px 0}
.wall-link{display:flex;align-items:center;justify-content:space-between;gap:10px;border:1px solid #dbe9df;background:#f8fbf8;color:#1c6249;padding:11px 12px;border-radius:11px;max-width:100%;text-decoration:none;font-size:.78rem;overflow-wrap:anywhere}
.wall-link:hover{background:#eef6ee}
.wall-link small{flex:0 0 auto;color:#517b66}
.wall-images{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:8px;margin-top:12px}
.wall-images a{display:block;min-width:0;overflow:hidden;border-radius:12px;background:#e9f0e9;max-height:220px}
.wall-images img{width:100%;height:180px;display:block;object-fit:cover}
.wall-task-status{font-size:.74rem;color:#936f33;padding:7px 0;font-weight:700}
.wall-task-status.is-done{color:#25764c}
.wall-post-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin-top:12px}
.wall-post-actions form{margin:0}
.wall-like,.wall-secondary,.wall-edit summary{background:none;border:0;color:#456859;font-size:.76rem;font-weight:650;cursor:pointer;padding:5px 1px}
.wall-like.is-liked{color:#b64f5c}
.wall-like span{margin-left:3px}
.wall-secondary.danger{color:#a44f4f}
.wall-edit{position:relative}
.wall-edit[open]{width:100%;order:3;padding:12px;background:#f7faf7;border:1px solid #d7e4da;border-radius:12px}
.wall-edit summary{list-style:none}
.wall-edit summary::-webkit-details-marker{display:none}
.wall-edit-form{margin:8px 0 0}
.wall-edit-form>.btn{justify-self:start}
.wall-existing-images{display:flex;flex-wrap:wrap;gap:8px;border:1px solid #dce8dd;border-radius:10px;padding:10px}
.wall-existing-images legend{font-size:.78rem;font-weight:700}
.wall-existing-images label{display:grid;gap:3px;align-items:start;font-size:.76rem}
.wall-existing-images img{width:76px;height:76px;object-fit:cover;border-radius:8px}
.wall-delete{margin-left:auto!important}
@media(max-width:640px){.person-page .profile-main>.person-wall{padding:16px}.wall-composer,.wall-edit-form{grid-template-columns:1fr}.wall-field.wide,.wall-composer-footer{grid-column:1}.wall-post-head .user-menu-avatar{width:34px;height:34px;flex-basis:34px}.wall-post-count{font-size:.65rem}.wall-images img{height:150px}}

/* V26: links inline, previews, samtaler og indrykkede svar. */
.wall-post-body a,.wall-comment-bubble a{color:var(--green);text-decoration:underline;text-underline-offset:2px;overflow-wrap:anywhere}
.wall-field>small{color:var(--muted);font-size:.7rem;font-weight:400}
.wall-link-preview{display:grid;gap:5px;padding:12px 15px;margin-top:12px;text-decoration:none;color:var(--ink);border:1px solid #d7e5db;border-radius:12px;background:#f3f8f4;min-width:0;overflow-wrap:anywhere}
.wall-link-preview:hover{border-color:#a5c6b0;background:#eaf4ec}
.wall-link-preview>small{font-size:.68rem;color:#5b7765}
.wall-link-preview>strong{font-size:.9rem;line-height:1.4}
.wall-link-preview>span{font-size:.78rem;color:var(--muted);line-height:1.55}
.wall-link-preview>.wall-link-open{font-weight:700;color:var(--green)}
.wall-comments{margin-top:12px;border-top:1px solid #e4ebe4;padding-top:9px}
.wall-comments>summary{font-weight:700;font-size:.82rem;color:#386d50;cursor:pointer;list-style:none;padding:5px 0}
.wall-comments>summary::-webkit-details-marker{display:none}
.wall-comments>summary:before{content:'▸';display:inline-block;margin-right:7px;transition:transform .15s}
.wall-comments[open]>summary:before{transform:rotate(90deg)}
.wall-comments-list{display:grid;gap:9px;margin-top:10px}
.wall-comment-thread{margin-left:min(calc(var(--wall-depth,0) * 20px),60px);min-width:0}
.wall-comment{display:grid;grid-template-columns:30px minmax(0,1fr);gap:8px;min-width:0}
.wall-comment-avatar .user-menu-avatar,.wall-comment-avatar .avatar{width:30px;height:30px;min-width:30px;border-radius:50%}
.wall-comment-content{min-width:0}
.wall-comment-bubble{background:#f3f7f3;border-radius:13px;padding:9px 11px;line-height:1.5;overflow-wrap:anywhere}
.wall-comment-bubble strong{font-size:.76rem}
.wall-comment-bubble p{font-size:.79rem;margin:3px 0 0}
.wall-comment-meta{display:flex;flex-wrap:wrap;align-items:center;gap:9px;padding:4px 8px 2px;font-size:.71rem}
.wall-comment-meta>small{color:var(--muted)}
.wall-comment-meta summary,.wall-comment-meta button{font:inherit;font-weight:700;color:#527a61;cursor:pointer;border:0;background:none;padding:0}
.wall-comment-meta>details[open]{flex-basis:100%;order:2;background:#f8faf8;padding:9px;border:1px solid #dce8dc;border-radius:9px}
.wall-comment-meta>details>summary{list-style:none}
.wall-comment-meta>details>summary::-webkit-details-marker{display:none}
.wall-comment-meta form{display:grid;gap:7px}
.wall-comment-meta textarea,.wall-comment-compose textarea{width:100%;min-width:0;resize:vertical;min-height:48px;padding:8px 10px;border:1px solid #cdded1;border-radius:9px;background:white;color:var(--ink);font:inherit;font-size:.8rem}
.wall-comment-meta label,.wall-comment-compose label{display:grid;gap:6px;color:var(--muted);font-size:.75rem}
.wall-comment-meta button.btn,.wall-comment-compose button{justify-self:start}
.wall-comment-compose{display:grid;gap:8px;margin:12px 0 0 38px}
@media(max-width:640px){.wall-comment-thread{margin-left:min(calc(var(--wall-depth,0) * 12px),36px)}.wall-comment-compose{margin-left:0}}


/* V27: komprimeret forskning og manuel verificering i højrespalten. */
.person-page .profile-research-panel{padding:11px 13px}
.person-page .profile-research-details>summary{display:flex;align-items:center;justify-content:space-between;gap:10px;cursor:pointer;font-weight:750;font-size:.88rem;color:#345b44;list-style:revert}
.person-page .profile-research-details>summary strong{font-size:.84rem;color:var(--green);font-variant-numeric:tabular-nums}
.person-page .profile-research-body{padding-top:12px}
.person-page .profile-research-body .quality-checks,.person-page .profile-research-body .quality-suggestions{font-size:.78rem;gap:6px}
.person-page .profile-research-body h4{margin:13px 0 5px;font-size:.82rem}
.person-page .profile-research-body .quality-meter{height:7px}
.person-page .verification-toggle-form{margin:10px 0 0;padding-top:10px;display:block}
.person-page .verification-switch-label{display:flex;align-items:center;justify-content:space-between;gap:10px;cursor:pointer;font-size:.79rem;font-weight:700}
.person-page .verification-switch-input{position:absolute;opacity:0;width:1px;height:1px}
.person-page .verification-switch-track{position:relative;display:inline-block;flex:0 0 39px;width:39px;height:23px;border-radius:30px;background:#d3dfd6;box-shadow:inset 0 0 0 1px #b6c9bc;transition:background .18s}
.person-page .verification-switch-track::before{content:"";position:absolute;top:3px;left:3px;width:17px;height:17px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #163b2440;transition:transform .18s}
.person-page .verification-switch-input:checked+.verification-switch-track{background:#288353}
.person-page .verification-switch-input:checked+.verification-switch-track::before{transform:translateX(16px)}
.person-page .verification-switch-input:focus-visible+.verification-switch-track{outline:3px solid #8cbda1;outline-offset:3px}
.person-page .verification-switch-input:disabled+.verification-switch-track{opacity:.55;cursor:wait}
.wall-live-preview{margin:0;display:grid;gap:5px;padding:12px 15px;border:1px solid #d7e5db;border-radius:12px;background:#f3f8f4;overflow-wrap:anywhere}
.wall-live-preview[hidden],.wall-live-preview [hidden]{display:none!important}
.wall-live-preview>small{color:#5b7765;font-size:.68rem}
.wall-live-preview>strong{font-size:.88rem;line-height:1.4}
.wall-live-preview>span{font-size:.78rem;color:var(--muted);line-height:1.5}
.wall-live-preview>.wall-live-preview-open{font-size:.69rem;color:#497756;font-weight:700}
.wall-composer>.wall-live-preview,.wall-edit-form>.wall-live-preview{grid-column:1/-1}
.person-page .verification-legacy-note{margin:8px 0;font-size:.73rem}
.person-page .verification-legacy-note>summary{cursor:pointer;color:var(--muted)}

/* V28: personmærkning på kildebilleder, fortællinger og fritstående fotos. */
.photo-people-picker{position:relative;min-width:0;margin:.65rem 0;}
.photo-people-picker .photo-people-label{display:block;font-weight:600;font-size:.93rem;}
.photo-people-picker .photo-people-label small{display:block;font-weight:400;color:var(--muted,#6b7472);font-size:.79rem;}
.photo-people-picker input[type=search]{width:100%;max-width:100%;margin-top:.3rem;box-sizing:border-box;}
.photo-people-results{position:relative;z-index:6;background:var(--card,#fff);border:1px solid #c9d8d1;border-radius:.7rem;max-height:14rem;overflow:auto;box-shadow:0 8px 24px #00000014;margin-top:.2rem;}
.photo-people-results[hidden]{display:none!important;}
.photo-people-option{display:flex;width:100%;align-items:baseline;justify-content:space-between;gap:.6rem;padding:.65rem .8rem;text-align:left;border:0;border-bottom:1px solid #edf0ee;background:transparent;color:inherit;cursor:pointer;}
.photo-people-option:hover,.photo-people-option:focus{background:#eaf4ed;}
.photo-people-option small{opacity:.65;white-space:nowrap;}
.photo-people-empty{display:block;padding:.65rem .8rem;color:var(--muted,#6b7472);}
.photo-people-selected,.photo-people-links{display:flex;flex-wrap:wrap;gap:.4rem;margin-top:.45rem;}
.photo-people-chip,.photo-people-links a{display:inline-flex;gap:.35rem;align-items:center;border-radius:999px;padding:.32rem .55rem;background:#e7f2eb;color:#245c40;font-size:.81rem;max-width:100%;}
.photo-people-chip button{border:0;background:transparent;color:inherit;cursor:pointer;font-size:1.1rem;line-height:1;}
.photo-people-tags{margin:.55rem 0;}.photo-people-tags>small{display:block;color:var(--muted,#6b7472);font-size:.75rem;}
.photo-people-editor{margin:.65rem 0;padding:.5rem .65rem;border:1px solid #dfebe2;border-radius:.6rem;background:#fafcfb;}
.photo-people-editor>summary{font-size:.81rem;cursor:pointer;color:#276948;}
.photo-people-editor-form{display:grid;gap:.6rem;padding-top:.6rem;}
.timeline-shared-photo{display:grid;gap:.6rem;margin-top:.65rem;}
.timeline-shared-photo .shared-photo-link{display:block;width:100%;max-width:430px;overflow:hidden;border-radius:.8rem;}
.timeline-shared-photo img{display:block;width:100%;max-height:320px;object-fit:contain;background:#f0f3f0;}
.timeline-shared-photo p{margin:0;}
@media(max-width:600px){.photo-people-option{align-items:flex-start;flex-direction:column;gap:.1rem}}

/* V29 – samlet personmediegalleri med filtre. */
.profile-life-media .media-grid{margin-top:14px}
.profile-media-filters{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
.profile-media-filters[hidden],.profile-life-media [hidden]{display:none!important}
.profile-media-filter{border:1px solid var(--line);border-radius:999px;background:var(--surface,#fff);color:inherit;padding:8px 13px;cursor:pointer;font:inherit;font-size:.89rem}
.profile-media-filter span{opacity:.65;margin-left:3px;font-size:.82em}
.profile-media-filter.is-active{background:#e7f1eb;border-color:#79a892;color:#145536;font-weight:700}
.profile-media-filter:hover{border-color:#478565}
.profile-media-context{font-size:.88rem;line-height:1.3;color:var(--text,#1b3325)}
.profile-media-origin{display:block;font-size:.83rem;margin:3px 0 6px;color:var(--accent,#226947)}
.profile-life-media .media-card>.photo-people-tags,.profile-life-media .media-card>.photo-people-editor{padding:0 10px 10px}
.profile-media-empty{padding:20px 5px 8px}
/* V29 – indlæsningsfeltet forbliver et ægte file input (og virker uden drag/drop). */
.profile-media-dropzone{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:6px;border:2px dashed #9ab9a7;background:#f3f8f4;border-radius:13px;min-height:104px;padding:14px 12px;cursor:pointer;transition:border-color .15s,background-color .15s;max-width:100%;box-sizing:border-box}
.profile-media-dropzone:before{content:'↥';font-size:1.55rem;line-height:1;color:#376a4c}
.profile-media-dropzone-hint{font-weight:650;font-size:.88rem;line-height:1.35;color:#27583e;pointer-events:none}
.profile-media-dropzone-selection{font-weight:400;font-size:.78rem;overflow-wrap:anywhere;color:var(--muted,#65756a);pointer-events:none;max-width:100%}
.profile-media-dropzone input[type=file]{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;z-index:1}
.profile-media-dropzone:focus-within,.profile-media-dropzone.is-dragover{outline:2px solid #397a52;outline-offset:2px;background:#e2f2e8;border-color:#397a52}
.profile-media-dropzone.has-file{border-style:solid;background:#edf5ee}
@media (max-width:600px){.profile-media-filter{padding:8px 11px}.profile-media-dropzone{min-height:91px}}

/* V30 – samme diskrete medieblyant i galleri og livslinje. */
.profile-life-media .media-card,.timeline-shared-photo,.profile-attachment{position:relative}
.profile-media-quick-editor{position:relative;margin:7px 0;min-width:0}
.profile-media-quick-editor>summary{display:inline-grid;place-items:center;width:32px;height:32px;border:1px solid #bcd5c4;border-radius:9px;background:#f5faf6;color:#23613e;font-weight:750;cursor:pointer;list-style:none}
.profile-media-quick-editor>summary::-webkit-details-marker{display:none}
.profile-media-quick-editor>summary:hover{background:#e8f2e9}
.profile-media-quick-panel{background:#f8fbf9;border:1px solid #d5e5d9;border-radius:11px;padding:13px;margin-top:7px;min-width:0}
.profile-media-quick-panel .form-grid{display:grid;gap:10px;margin:0}
.profile-media-quick-panel .photo-people-picker{max-width:100%;min-width:0}
.profile-media-quick-panel>form:last-child{margin-top:12px}
.profile-media-quick-panel .image-focus-trigger{position:static!important;margin-top:10px!important}
.timeline-shared-photo video{display:block;width:min(100%,540px);max-height:360px;background:#101010;border-radius:10px}
.profile-life-media .media-card>.profile-media-quick-editor{margin:5px 10px 10px}
.profile-life-media .media-card .profile-media-quick-panel{overflow:visible}
@media(max-width:600px){.profile-media-quick-panel{padding:10px}.profile-media-quick-panel .form-grid{grid-template-columns:minmax(0,1fr)}}

/* Blyanten er inde i kortet, mens redigeringsformularen kan foldes ud under mediet. */
.profile-life-media .media-card>.profile-media-quick-editor{position:static}
.profile-life-media .media-card>.profile-media-quick-editor>summary{position:absolute;z-index:3;right:10px;top:10px;background:#f4faf6;box-shadow:0 2px 7px #0002}
.person-page .timeline-shared-photo>.profile-media-quick-editor{position:static}
.person-page .timeline-shared-photo>.profile-media-quick-editor>summary{position:absolute;z-index:3;right:8px;top:8px;background:#f4faf6;box-shadow:0 2px 7px #0002}

/* V31 – kompakte medieminiaturer med fælles lysbordsvisning. */
.profile-life-media .profile-gallery-tile{min-width:0;background:#fff;overflow:hidden}
.profile-life-media .profile-gallery-open{display:block;position:relative;width:100%;padding:0;border:0;background:#13221b;cursor:zoom-in;text-align:left;overflow:hidden}
.profile-life-media .profile-gallery-open>img,.profile-life-media .profile-gallery-open>video{display:block;width:100%;height:auto;aspect-ratio:4/3;object-fit:cover;transition:transform .18s ease}
.profile-life-media .profile-gallery-open:hover>img{transform:scale(1.025)}
.profile-life-media .profile-gallery-open:focus-visible{outline:3px solid #4a956a;outline-offset:-4px;z-index:1}
.profile-gallery-play{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:grid;place-items:center;width:54px;height:54px;border-radius:50%;background:#0b211abf;color:#fff;font-size:1.45rem;pointer-events:none;box-shadow:0 4px 20px #0005}
.profile-life-media .profile-gallery-caption{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;padding:9px 11px 11px;line-height:1.35;font-size:.83rem;color:var(--text,#203b2c);overflow-wrap:anywhere}
.profile-life-media .profile-gallery-tile>.profile-media-quick-editor{margin:0}
.profile-life-media .profile-gallery-tile .profile-media-quick-panel{margin:10px}
.profile-gallery-viewer{width:min(1100px,calc(100vw - 24px));max-width:1100px;max-height:calc(100dvh - 24px);padding:0;border:1px solid #bdcfc1;border-radius:16px;box-shadow:0 32px 110px #0008;background:#fff;color:var(--text,#1b3024);overflow:auto}
.profile-gallery-viewer::backdrop{background:rgba(8,23,16,.82);backdrop-filter:blur(4px)}
.profile-gallery-viewer-inner{min-width:0}
.profile-gallery-viewer-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 15px;border-bottom:1px solid #e0ebe3}
.profile-gallery-viewer-header [data-media-position]{font-size:.85rem;font-weight:650;color:#4b6656}
.profile-gallery-viewer-actions{display:flex;align-items:center;gap:7px}
.profile-gallery-viewer-actions>button{border:1px solid #cbdcd0;background:#f5faf6;color:#184c31;cursor:pointer;border-radius:9px;font-size:1.25rem;min-width:38px;min-height:36px;line-height:1}
.profile-gallery-viewer-actions>button:hover:not(:disabled){background:#e3f1e6}
.profile-gallery-viewer-actions>button:disabled{opacity:.35;cursor:default}
.profile-gallery-viewer-actions>button:focus-visible{outline:3px solid #317e4c;outline-offset:2px}
.profile-gallery-viewer-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(235px,285px);min-width:0}
.profile-gallery-viewer-stage{display:flex;align-items:center;justify-content:center;min-width:0;min-height:280px;height:min(72dvh,760px);background:#101a15;overflow:hidden}
.profile-gallery-viewer-media{display:block;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain}
.profile-gallery-viewer-stage>video{width:100%;height:100%;object-fit:contain}
.profile-gallery-viewer-info{display:flex;flex-direction:column;gap:14px;padding:22px 17px;min-width:0;max-height:min(72dvh,760px);overflow:auto}
.profile-gallery-viewer-info [data-media-info]{display:grid;gap:11px;overflow-wrap:anywhere}
.profile-gallery-detail-context{font-size:1.08rem;line-height:1.35}
.profile-gallery-detail-caption{line-height:1.55}
.profile-gallery-detail-date{font-size:.87rem;color:var(--muted,#5b6c61);margin:0}
.profile-gallery-viewer-info .photo-people-tags{margin:0;padding:13px 0;border-top:1px solid #e1eae2}
.profile-gallery-viewer-info .profile-media-origin{margin:0}
.profile-gallery-viewer-info [data-media-edit]{margin-top:auto;align-self:flex-start;white-space:normal}
@media(max-width:720px){
  .profile-gallery-viewer{width:calc(100vw - 16px);max-height:calc(100dvh - 16px)}
  .profile-gallery-viewer-layout{grid-template-columns:minmax(0,1fr)}
  .profile-gallery-viewer-stage{height:min(51dvh,490px);min-height:160px}
  .profile-gallery-viewer-info{max-height:none;padding:15px 17px 22px}
}
@media(max-width:600px){
  .profile-life-media .media-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
  .profile-life-media .profile-gallery-caption{font-size:.77rem;padding:7px 9px 9px}
  .profile-life-media .profile-gallery-tile>.profile-media-quick-editor>summary{width:30px;height:30px;right:7px;top:7px}
  .profile-gallery-viewer-header{padding:9px 12px}
}
@media(prefers-reduced-motion:reduce){.profile-life-media .profile-gallery-open>img{transition:none}}
/* Udvid redigeringskortet, så formularen ikke presses ned i en smal miniaturekolonne. */
@media(max-width:600px){
  .profile-life-media .profile-gallery-tile:has(>.profile-media-quick-editor[open]){grid-column:1/-1}
}

/* V32: klikbare dokumentationslamper og diskrete uploadflader */
.person-page a.profile-documentation-light{text-decoration:none;cursor:pointer;transition:background-color .15s,border-color .15s,transform .15s}
.person-page a.profile-documentation-light:hover{border-color:#80b995;background:#e6f3ea;transform:translateY(-1px)}
.person-page a.profile-documentation-light:focus-visible{outline:3px solid #5c9770;outline-offset:2px}
.person-page .profile-portrait-wrap[data-portrait-drop-target].is-dragover{outline:3px dashed #329259;outline-offset:4px;border-radius:50%}
.person-page .profile-portrait-wrap[data-portrait-drop-target].is-dragover::after{content:'Slip portræt her';position:absolute;inset:0;display:grid;place-items:center;z-index:15;border-radius:50%;background:rgba(24,81,48,.84);color:#fff;text-align:center;padding:12px;font-size:.76rem;font-weight:700;pointer-events:none;box-sizing:border-box}
.wall-textarea-area{position:relative;min-width:0;grid-column:1/-1}
.wall-textarea-area .wall-field textarea{padding-right:50px;min-height:120px}
.wall-inline-upload{position:absolute;right:10px;top:44px;z-index:2;width:31px;height:31px;display:grid;place-items:center;border:1px solid #c9dfd0;border-radius:9px;background:#f1f7f2;color:#2b6745;cursor:pointer;font-size:1.25rem;box-shadow:0 2px 6px #0000000b}
.wall-inline-upload:hover,.wall-inline-upload:focus-within{background:#dfefe4;outline:2px solid #98bfa3}
.wall-inline-upload input[type=file]{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.wall-textarea-area.is-dragover textarea{outline:3px dashed #378d59;outline-offset:1px;background:#edf8f0}
.wall-textarea-area.is-dragover::after{content:'Slip billeder her';position:absolute;inset:32px 45px 39px 3px;z-index:1;pointer-events:none;display:grid;place-items:center;text-align:center;background:#e3f4eae8;color:#225d3b;font-weight:750;border:2px dashed #4b9d69;border-radius:10px}
.wall-upload-status{display:flex;align-items:center;flex-wrap:wrap;gap:7px;font-weight:500;color:#3b6c4b;font-size:.72rem;margin-top:4px}
.wall-upload-status:empty{display:none}
.wall-upload-status img{width:49px;height:43px;object-fit:cover;border-radius:6px;border:1px solid #d1dfd5}
@media(max-width:640px){.wall-inline-upload{top:44px;right:9px}}

.wall-inline-upload svg{width:19px;height:19px;pointer-events:none}

/* V33: dødsfald registreres kun på profilen ved dokumentation eller manuel dato. */
.profile-facts-heading{display:flex;align-items:center;justify-content:space-between;gap:.65rem;flex-wrap:wrap}
.profile-facts-heading h3{margin:0}
.profile-register-death{font-size:.78rem;font-weight:600;color:var(--accent,#225d45);text-decoration:none}
.profile-register-death:hover{text-decoration:underline}
.profile-burial-manual{border:1px solid rgba(51,107,80,.22);background:rgba(51,107,80,.035);border-radius:12px;padding:13px}
.profile-burial-manual[hidden]{display:none!important}
.profile-burial-manual>strong{font-size:.92rem}
.profile-burial-manual p{margin:.3rem 0 .75rem}
.profile-burial-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.7rem}
@media(max-width:520px){.profile-burial-fields{grid-template-columns:1fr}}


/* Opdatering 34 – personlige notifikationer i userMenu. */
.user-notification-bell{position:relative;display:inline-flex;flex:0 0 24px;align-items:center;justify-content:center;color:var(--green)}
.user-notification-bell svg{width:22px;height:22px}
.user-notification-badge{position:absolute;right:-6px;top:-8px;min-width:18px;height:18px;padding:0 3px;border-radius:20px;background:#b13a35;color:#fff;font-size:10px;font-weight:800;line-height:18px;text-align:center;border:2px solid #fff;box-sizing:content-box}
.user-notification-badge[hidden],.user-notification-head button[hidden]{display:none!important}
.user-menu-popover.has-notifications{width:355px;max-width:calc(100vw - 16px);padding:8px}
.user-notification-panel{margin:3px 0 8px;border:1px solid #e1eae2;border-radius:12px;overflow:hidden;background:#fcfefc}
.user-notification-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:11px 10px;border-bottom:1px solid var(--line)}
.user-notification-head>span{display:flex;flex-direction:column;gap:2px;min-width:0}
.user-notification-head strong{font-size:.89rem;color:var(--ink)}
.user-notification-head small{font-size:.73rem;color:var(--muted)}
.user-notification-head button{appearance:none;border:0;background:transparent;color:var(--green);font-size:.71rem;font-weight:750;text-align:right;cursor:pointer;padding:5px 3px}
.user-notification-head button:disabled{opacity:.45;cursor:wait}
.user-notification-head button:hover{text-decoration:underline}
.user-notification-list{max-height:min(360px,52vh);overflow-y:auto;overscroll-behavior:contain}
.user-notification-list .user-notification-item{display:flex;align-items:flex-start;gap:10px;min-height:0;padding:11px 10px;border-radius:0;border-bottom:1px solid #eef2ee;text-decoration:none;white-space:normal}
.user-notification-list .user-notification-item:last-child{border-bottom:0}
.user-notification-list .user-notification-item.unread{background:#eaf5ec}
.user-notification-list .user-notification-item:hover{background:#dff0e3}
.user-notification-kind{font-size:15px;flex:0 0 10px;color:var(--green);line-height:1.45}
.user-notification-body{display:flex;flex-direction:column;gap:5px;min-width:0;overflow-wrap:anywhere}
.user-notification-body strong{font-size:.79rem;font-weight:600;line-height:1.38;color:var(--ink)}
.user-notification-item.unread .user-notification-body strong{font-weight:800}
.user-notification-body small{font-size:.7rem;color:var(--muted)}
.user-notification-empty{padding:16px 12px;margin:0;color:var(--muted);font-size:.79rem;line-height:1.5}
.wall-comment-like-form{display:inline-flex;margin:0;padding:0}
.wall-comment-like{background:transparent;border:0;color:var(--muted);padding:3px 4px;cursor:pointer;font-size:.74rem;font-weight:650}
.wall-comment-like:hover,.wall-comment-like.is-liked{color:var(--green)}
@media(max-width:980px){.user-menu-popover.has-notifications{right:-3px;max-width:calc(100vw - 16px)}}
@media(max-width:420px){.user-menu>summary{gap:6px}.user-notification-bell{flex-basis:22px}.user-menu-popover.has-notifications{width:min(355px,calc(100vw - 16px))}}
.wall-comment-meta .wall-comment-like-form{display:inline-flex;flex:0 0 auto;gap:0;margin:0;padding:0}
.wall-comment-meta .wall-comment-like{font-size:.74rem;color:var(--muted);padding:3px 4px;font-weight:650}
.wall-comment-meta .wall-comment-like.is-liked,.wall-comment-meta .wall-comment-like:hover{color:var(--green)}

/* V35: Præcis navigation fra brugermenuens notifikationer til opslag og kommentarer. */
.person-page .wall-post,.person-page .wall-comment{scroll-margin-top:112px}
.person-page .wall-post.wall-notification-target,.person-page .wall-post:target{
  outline:2px solid #91bea0;outline-offset:5px;border-radius:8px;background:#f5faf6
}
.person-page .wall-comment.wall-notification-target .wall-comment-bubble,
.person-page .wall-comment:target .wall-comment-bubble{
  background:#e5f3e9;box-shadow:0 0 0 2px #87b89a
}
@media(max-width:640px){
  .person-page .wall-post,.person-page .wall-comment{scroll-margin-top:90px}
  .person-page .wall-post.wall-notification-target,.person-page .wall-post:target{outline-offset:2px}
}

/* V37 · Familieoversigter med fokusperson og biologiske slægtskaber. */
.family-focus-panel{margin-bottom:18px}
.family-focus-panel h2{margin:0 0 8px}
.family-focus-form{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap;margin:20px 0 12px}
.family-focus-form>label{flex:1 1 280px;max-width:560px;display:grid;gap:7px;font-weight:600}
.family-focus-form .person-picker{width:100%;position:relative}
.family-focus-form .person-picker>input[type=search]{width:100%;min-height:44px}
.family-focus-form .person-picker-results{z-index:25}
.family-scope-switch{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}
.family-scope-switch .btn.is-active{background:var(--green,#287b50);border-color:transparent;color:white}
.family-scope-explanation{margin:12px 0 4px}
.family-kinship-overview{margin:0 0 20px}
.family-kinship-counter{font-size:.84rem;color:var(--muted,#607267)}
.family-kinship-search{display:grid;gap:6px;margin:16px 0;max-width:410px;font-size:.87rem}
.family-kinship-search input{width:100%}
.family-kinship-groups{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));gap:18px}
.family-kinship-group{min-width:0}
.family-kinship-group h3{font-size:1rem;margin:0 0 9px}
.family-kinship-list{display:grid;gap:7px}
.family-kinship-list a{display:flex;align-items:center;gap:9px;border:1px solid var(--line,#dce6df);border-radius:12px;padding:8px;text-decoration:none;min-width:0}
.family-kinship-list a:hover{background:var(--soft,#f3f7f4)}
.family-kinship-list a .avatar{width:34px;height:34px;flex:none}
.family-kinship-list a>span{display:grid;gap:2px;min-width:0}
.family-kinship-list a strong{overflow-wrap:anywhere;font-size:.87rem}
.family-kinship-list a small{font-size:.75rem;color:var(--muted,#607267)}
.family-directory-heading{display:flex;justify-content:space-between;align-items:baseline;gap:10px;margin:22px 0 11px}
.family-directory-heading h2{margin:0}
.family-directory-card .family-links a{min-width:0;flex-wrap:wrap}
.family-kinship-tag{font-size:.72rem;border-radius:999px;padding:3px 7px;background:#e5f3e9;color:#17623e;white-space:normal}
.family-no-results{margin:12px 0}
.profile-shared-census{border-left:3px solid #82b898}
.census-linked-people{margin-top:5px}
.census-linked-people .photo-people-tags{margin-top:2px}
@media(max-width:600px){.family-focus-form{display:grid;grid-template-columns:minmax(0,1fr)}.family-focus-form>label{min-width:0}.family-scope-switch .btn{flex:1 1 auto;text-align:center}.family-kinship-groups{grid-template-columns:minmax(0,1fr)}}


/* V39 · Familieoversigter: roligere hierarki, tydelige forældre/børn og bedre mobilvisning. */
.people-page .family-focus-panel{
  padding:clamp(20px,3vw,30px);
  background:linear-gradient(135deg,#ffffff 55%,#f4f9f5 100%);
  border:1px solid #d6e5d9;
  box-shadow:0 8px 26px rgba(26,66,45,.045);
}
.people-page .family-focus-panel h2{font-size:clamp(1.35rem,2.5vw,1.85rem);letter-spacing:-.025em;margin:0 0 8px}
.people-page .family-focus-panel>p.muted{max-width:70ch;line-height:1.55;margin:0}
.people-page .family-focus-form{margin:19px 0 0;align-items:end;gap:10px}
.people-page .family-focus-form>label{font-size:.83rem;max-width:620px}
.people-page .family-focus-form .person-picker>input[type=search]{min-height:46px;border-radius:12px;background:#fff;border:1px solid #bbd3c3;padding:12px}
.people-page .family-focus-form>.btn{min-height:46px;white-space:nowrap}
.people-page .family-focus-form>.family-focus-clear{color:var(--green);background:#f6faf7}
.people-page .family-focus-hint{font-size:.82rem;color:var(--muted);margin:15px 0 0}
.people-page .family-scope-switch{gap:8px;margin:18px 0 5px}
.people-page .family-scope-switch .btn{font-size:.82rem;min-height:40px;border-radius:999px;padding:9px 14px;white-space:normal;text-align:center}
.people-page .family-scope-switch .btn.is-active{background:#215a40;border-color:#215a40;color:#fff}
.people-page .family-scope-explanation{margin:12px 0 0}
.people-page .family-focus-panel .small-note{margin:15px 0 0;font-size:.77rem;line-height:1.5}
.people-page .family-kinship-overview{padding:clamp(18px,2.5vw,26px);box-shadow:0 6px 22px rgba(26,66,45,.045)}
.people-page .family-kinship-overview .section-head{align-items:center;flex-wrap:wrap}
.people-page .family-kinship-overview .section-head h2{margin:0;font-size:clamp(1.2rem,2vw,1.55rem)}
.people-page .family-kinship-counter,.people-page .family-directory-heading>small{display:inline-flex;align-items:center;border-radius:999px;border:1px solid #cbded0;background:#eaf4ec;color:#24563a;padding:6px 11px;font-weight:750;font-size:.78rem;white-space:nowrap}
.people-page .family-kinship-search{max-width:520px;font-weight:650;margin:18px 0}
.people-page .family-kinship-search input{border:1px solid #cbded0;border-radius:11px;padding:11px 13px;margin-top:3px}
.people-page .family-kinship-groups{gap:12px;grid-template-columns:repeat(auto-fit,minmax(min(100%,285px),1fr))}
.people-page .family-kinship-group{border:1px solid #e0e9e2;border-radius:13px;background:#fafcfa;padding:13px}
.people-page .family-kinship-group h3{color:#25553b;letter-spacing:-.01em;margin:0 0 11px}
.people-page .family-kinship-list a{background:#fff;border-color:#e1e9e3;padding:9px 10px;transition:background .15s,border-color .15s}
.people-page .family-kinship-list a:hover{background:#f2faf4;border-color:#a4c5af}
.people-page [data-family-relative][hidden],.people-page [data-family-kinship-group][hidden],.people-page [data-family-no-match][hidden]{display:none!important}
.people-page .family-directory-heading{align-items:center;margin:26px 0 14px}
.people-page .family-directory-heading h2{font-size:clamp(1.3rem,2.4vw,1.8rem);letter-spacing:-.02em}
.people-page .family-directory{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:start}
.people-page .family-directory-card{border:1px solid #dbe7dd;padding:0;overflow:hidden;box-shadow:0 7px 22px rgba(25,57,37,.047)}
.people-page .family-directory-card-head{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:16px 18px 0}
.people-page .family-record-label{font-weight:800;letter-spacing:.085em;color:#40694b;text-transform:uppercase;font-size:.69rem;overflow-wrap:anywhere}
.people-page .family-child-count{padding:5px 9px;white-space:nowrap;color:#41644d;background:#edf6ee;border:1px solid #d6e6d8;border-radius:999px;font-size:.74rem;font-weight:700}
.people-page .family-directory-card h3{padding:8px 18px 15px;margin:0;font-size:1.07rem;font-weight:750;letter-spacing:-.015em;line-height:1.4;overflow-wrap:anywhere}
.people-page .family-name-separator{color:#80a78b;font-weight:500;margin:0 3px}
.people-page .family-member-block{padding:13px 18px;border-top:1px solid #e5eee7}
.people-page .family-member-children{background:#fafcfb}
.people-page .family-member-block h4{color:#557161;margin:0 0 9px;font-size:.7rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.people-page .family-links{gap:7px}
.people-page .family-directory-card .family-links a{display:flex;flex-wrap:nowrap;align-items:center;gap:9px;max-width:none;min-width:0;padding:8px 9px;border-radius:11px;background:#fff;line-height:1.35;font-weight:650;font-size:.78rem}
.people-page .family-directory-card .family-links a:hover{border-color:#9fc8ac;background:#f3faf5}
.people-page .family-directory-card .family-links .avatar{width:34px;height:34px;flex:0 0 34px}
.people-page .family-directory-card .family-links a>span:not(.avatar){min-width:0;overflow-wrap:anywhere}
.people-page .family-directory-card .family-links a>span:not(.avatar) small{display:block;margin-top:3px}
.people-page .family-links-parents{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
.people-page .family-links-children{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
.people-page .family-kinship-tag{padding:3px 8px;background:#eaf6ee;color:#246447;line-height:1.35;font-size:.69rem}
.people-page .family-directory-card.typed-family-card{padding:18px;border-left:4px solid #479968}
.people-page .family-directory-card.typed-family-card h3{padding:6px 0 12px}
.people-page .family-directory-card.typed-family-card .family-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:1050px){.people-page .family-directory{grid-template-columns:1fr 1fr}.people-page .family-links-children,.people-page .family-links-parents{grid-template-columns:1fr}}
@media(max-width:760px){.people-page .family-directory{grid-template-columns:minmax(0,1fr)}.people-page .family-links-children,.people-page .family-links-parents{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:540px){
 .people-page .family-focus-form{display:grid;grid-template-columns:minmax(0,1fr)}
 .people-page .family-focus-form>label{width:100%;max-width:none}
 .people-page .family-focus-form>.btn{width:100%}
 .people-page .family-scope-switch{display:grid;grid-template-columns:minmax(0,1fr)}
 .people-page .family-directory-heading{align-items:start}
 .people-page .family-links-parents,.people-page .family-links-children{grid-template-columns:minmax(0,1fr)}
 .people-page .family-directory-card-head{padding:14px 15px 0}
 .people-page .family-directory-card h3{padding:8px 15px 13px}
 .people-page .family-member-block{padding:12px 15px}
}

/* V40: fødested og dødssted på slægtstræets personkort */
.tree-person .tree-place-line,.mobile-tree-person .tree-place-line{display:block;font-size:.63rem;color:#50675a;line-height:1.35;white-space:normal;overflow-wrap:anywhere;margin-top:3px;}
.mobile-tree-person .tree-place-line{font-size:.59rem;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.tree-person button>span:last-child,.mobile-tree-person button>span:last-child{min-width:0}
.place-picker{position:relative;display:block;min-width:0}.place-picker input[type=search]{width:100%}.place-picker-results{position:absolute;inset-inline:0;top:calc(100% + 4px);max-height:245px;overflow:auto;background:#fff;border:1px solid #d4dfd6;border-radius:10px;box-shadow:0 12px 26px #123b271e;z-index:120}.place-picker-results button{display:block;width:100%;background:#fff;border:0;border-bottom:1px solid #e9eee9;text-align:left;padding:9px 12px;cursor:pointer;color:#244a36}.place-picker-results button:hover,.place-picker-results button:focus{background:#edf5ef}.place-picker-results small{display:block;color:#677f70;margin-top:2px;font-size:.72rem}.place-picker-help{display:block;font-size:.72rem;color:#6d7e72;margin-top:5px}.place-directory-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(255px,1fr));gap:12px}.place-directory-list .card{padding:15px}.place-directory-list a{color:var(--green)}.place-directory-list small{display:block;color:var(--muted);margin-top:3px}.place-directory-search{display:flex;gap:9px;align-items:flex-end;flex-wrap:wrap;margin:15px 0}.place-directory-search label{min-width:190px;flex:1}.place-directory-search input{width:100%}.place-directory-meta{font-size:.81rem;color:var(--muted)}


/* V41: pænere trækort med harmoniseret stedvisning og verificeringskant */
.tree-person,.mobile-tree-person,.relation-visual-stack .relation-tree-person{
  background:linear-gradient(180deg,#ffffff 0%,#fcfdfc 100%);
  border-color:#d5e0d8;
  box-shadow:0 8px 20px rgba(24,56,44,.08);
  transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease,background-color .18s ease;
}
.tree-person{border-radius:16px;min-width:220px;}
.tree-person button{padding:12px 12px 12px 11px;gap:11px;}
.tree-person a{padding:0 11px;background:linear-gradient(180deg,#fbfdfb 0%,#f4f8f5 100%);}
.tree-person strong{font-size:.95rem;line-height:1.18;letter-spacing:-.01em;color:#173b2c;}
.tree-person small.tree-years{margin-top:4px;font-size:.74rem;line-height:1.3;color:#6d8174;font-weight:500;white-space:normal;}
.tree-person.verified{border:2px solid #2f8b57;box-shadow:0 10px 24px rgba(36,109,72,.14);}
.tree-person.focus{box-shadow:0 0 0 3px rgba(23,77,58,.10),0 12px 28px rgba(23,77,58,.16);transform:translateY(-1px);}
.tree-person.focus:not(.verified){border-color:#8db59c;}
.tree-person.verified.focus{border-color:#1f7447;}
.tree-person button>span:last-child,.mobile-tree-person button>span:last-child,.relation-tree-person button>span:last-child{min-width:0;}
.tree-place-list{display:grid;gap:3px;margin-top:7px;}
.tree-place-line{display:flex;align-items:flex-start;gap:5px;min-width:0;}
.tree-place-label{flex:0 0 auto;font-size:.66rem;line-height:1.35;font-weight:800;letter-spacing:.01em;color:#385445;text-transform:none;}
.tree-place-value{min-width:0;font-size:.66rem;line-height:1.35;color:#567064;font-weight:500;overflow-wrap:anywhere;}
.mobile-tree-person{border-radius:16px;}
.mobile-tree-person button{padding:10px 8px 10px 10px;}
.mobile-tree-person strong{font-size:.84rem;line-height:1.14;color:#173b2c;}
.mobile-tree-person small.tree-years{margin-top:4px;font-size:.62rem;white-space:normal;color:#6d8174;font-weight:500;line-height:1.28;}
.mobile-tree-person a{background:linear-gradient(180deg,#fbfdfb 0%,#f4f8f5 100%);}
.mobile-tree-person.verified{border:2px solid #2f8b57;box-shadow:0 8px 20px rgba(36,109,72,.13);}
.mobile-tree-person.focus{box-shadow:0 0 0 3px rgba(23,77,58,.10),0 11px 24px rgba(23,77,58,.15);transform:translateY(-1px);}
.mobile-tree-person.focus:not(.verified){border-color:#8db59c;}
.mobile-tree-person.verified.focus{border-color:#1f7447;}
.mobile-tree-person .tree-place-list{gap:2px;margin-top:6px;}
.mobile-tree-person .tree-place-label,.mobile-tree-person .tree-place-value{font-size:.58rem;line-height:1.28;}
.relation-visual-stack .relation-tree-person{border:1px solid #d5e0d8;border-left-width:4px;border-radius:15px;background:linear-gradient(180deg,#ffffff 0%,#fbfcfb 100%);box-shadow:0 7px 16px rgba(24,56,44,.07);}
.relation-visual-stack .relation-tree-person button{padding:11px 10px;gap:10px;}
.relation-visual-stack .relation-tree-person strong{font-size:.92rem;line-height:1.2;color:#173b2c;}
.relation-visual-stack .relation-tree-person small.tree-years{margin-top:4px;font-size:.7rem;color:#6d8174;font-weight:500;}
.relation-visual-stack .relation-tree-person .tree-place-list{gap:2px;margin-top:6px;}
.relation-visual-stack .relation-tree-person .tree-place-label,.relation-visual-stack .relation-tree-person .tree-place-value{font-size:.64rem;line-height:1.3;}
.relation-visual-stack .relation-tree-person.verified{box-shadow:inset 0 0 0 1px #2f8b57,0 8px 18px rgba(36,109,72,.11);}
@media (max-width:640px){
  .tree-person{min-width:0;}
}
@media (max-width:370px){
  .mobile-tree-person .tree-place-label,.mobile-tree-person .tree-place-value{font-size:.56rem;}
}


/* V42: kortere trækort og tydelig afstand mellem "Født/Død" og stednavn.
   Højere specificitet er bevidst: den ældre V40-regel havde display:block. */
@media (min-width:641px){
  .tree-page .tree-level{
    grid-template-columns:repeat(auto-fit,minmax(140px,1fr));
    gap:11px;
  }
  .tree-page .tree-level.focus-row{max-width:560px;}
  .tree-page .tree-level.dense{grid-template-columns:repeat(auto-fit,minmax(132px,1fr));gap:9px;}
  .tree-page .tree-level.very-dense{grid-template-columns:repeat(auto-fit,minmax(118px,1fr));gap:8px;}
}
.tree-page .tree-person{
  min-width:0;
  max-width:200px;
  border-radius:13px;
  box-shadow:0 4px 11px rgba(24,56,44,.06);
}
.tree-page .tree-person button{
  min-width:0;
  padding:9px 8px;
  gap:8px;
}
.tree-page .tree-person a{padding:0 7px;}
.tree-page .tree-person .avatar{width:34px;height:34px;flex:0 0 34px;}
.tree-page .tree-person strong{font-size:.83rem;line-height:1.17;}
.tree-page .tree-person small.tree-years{font-size:.67rem;line-height:1.25;margin-top:3px;}
.tree-page .tree-person .tree-place-list{display:grid;gap:3px;margin-top:6px;}
/* En reel to-kolonners-opstilling: gammel styling gjorde label og sted til sammenløbet tekst. */
.tree-page .tree-person .tree-place-list .tree-place-line{
  display:grid;
  grid-template-columns:34px minmax(0,1fr);
  align-items:start;
  column-gap:6px;
  margin:0;
  font-size:inherit;
  line-height:1.25;
  white-space:normal;
  min-width:0;
  overflow:visible;
}
.tree-page .tree-person .tree-place-label,
.tree-page .tree-person .tree-place-value{
  display:block;
  font-size:.65rem;
  line-height:1.28;
}
.tree-page .tree-person .tree-place-value{
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  line-clamp:2;
  overflow:hidden;
  overflow-wrap:anywhere;
  word-break:normal;
}
.tree-page .tree-person.verified{box-shadow:0 5px 13px rgba(36,109,72,.1);}
.tree-page .tree-person.focus{box-shadow:0 0 0 2px rgba(23,77,58,.09),0 7px 16px rgba(23,77,58,.1);}
.tree-page .tree-level.dense .tree-person button,
.tree-page .tree-level.very-dense .tree-person button{padding:7px 6px;gap:6px;}
.tree-page .tree-level.dense .tree-person .avatar{width:30px;height:30px;flex-basis:30px;}
.tree-page .tree-level.very-dense .tree-person .avatar{width:28px;height:28px;flex-basis:28px;}
.tree-page .tree-level.dense .tree-person .tree-place-list .tree-place-line,
.tree-page .tree-level.very-dense .tree-person .tree-place-list .tree-place-line{
  grid-template-columns:31px minmax(0,1fr);
  column-gap:4px;
}
.tree-page .tree-level.very-dense .tree-person .tree-place-label,
.tree-page .tree-level.very-dense .tree-person .tree-place-value{font-size:.6rem;}

/* Relationstræet bruger stadig venstrekanten til relationstypen. */
.relation-visual-stack .relation-tree-person button{padding:8px 8px;gap:8px;}
.relation-visual-stack .relation-tree-person .avatar{width:36px;height:36px;flex-basis:36px;}
.relation-visual-stack .relation-tree-person.has-photo .avatar{width:38px;height:38px;flex-basis:38px;}
.relation-visual-stack .relation-tree-person strong{font-size:.84rem;}
.relation-visual-stack .relation-tree-person .tree-place-list .tree-place-line{
  display:grid;
  grid-template-columns:34px minmax(0,1fr);
  column-gap:6px;
  margin:0;
  font-size:inherit;
  overflow:visible;
  white-space:normal;
}
.relation-visual-stack .relation-tree-person .tree-place-label,
.relation-visual-stack .relation-tree-person .tree-place-value{font-size:.64rem;line-height:1.3;}
.relation-visual-stack .relation-tree-person.verified{
  border-top-color:#2f8b57;
  border-right-color:#2f8b57;
  border-bottom-color:#2f8b57;
}
@media(max-width:640px){
  .mobile-tree-person{min-height:62px;}
  .mobile-tree-person button{padding:8px 7px;gap:7px;}
  .mobile-tree-person .avatar,
  .mobile-tree-person.has-photo .avatar{width:34px;height:34px;flex:0 0 34px;}
  .mobile-tree-person strong{font-size:.78rem;}
  .mobile-tree-person .tree-place-list{margin-top:5px;gap:2px;}
  .mobile-tree-person .tree-place-list .tree-place-line{
    display:grid;
    grid-template-columns:31px minmax(0,1fr);
    column-gap:4px;
    margin:0;
    font-size:inherit;
    overflow:visible;
    white-space:normal;
  }
  .mobile-tree-person .tree-place-value{
    display:-webkit-box;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:2;
    line-clamp:2;
    overflow:hidden;
    overflow-wrap:anywhere;
  }
  .mobile-tree-person .tree-place-label,
  .mobile-tree-person .tree-place-value{font-size:.59rem;line-height:1.25;}
}

/* V43: forsigtig gennemgang af gamle kirkers og sognes fritekstregistreringer */
.place-reconcile-page .card{margin-bottom:17px}
.place-reconcile-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.place-reconcile-summary>div{display:flex;flex-direction:column;gap:3px;background:#f6faf7;border:1px solid #dce8df;padding:14px;border-radius:12px}
.place-reconcile-summary strong{font-size:1.55rem;color:#18553c}
.place-reconcile-summary span{font-size:.75rem;color:#64766a}
.place-reconcile-section h2{margin-bottom:14px}
.place-reconcile-list{display:grid;gap:10px}
.place-reconcile-row{display:grid;grid-template-columns:minmax(170px,.9fr) minmax(240px,1.4fr);gap:16px;padding:14px;background:#fbfdfb;border:1px solid #dfe9e1;border-radius:13px;align-items:center}
.place-reconcile-old{min-width:0;display:grid;gap:5px;align-content:start}
.place-reconcile-old>strong{font-size:.91rem;overflow-wrap:anywhere}
.place-reconcile-old small{color:#6b8072;font-size:.69rem;line-height:1.4;overflow-wrap:anywhere}
.place-reconcile-count{color:#356f4b;font-size:.72rem;font-weight:700}
.place-reconcile-form{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:8px}
.place-reconcile-form label{grid-column:1/-1;font-size:.75rem;font-weight:700;color:#345640}
.place-reconcile-form .place-picker input[type=search]{padding:10px 12px;border:1px solid #cadbd0;border-radius:10px;background:#fff}
.place-reconcile-form .place-picker-help{display:none}
.place-reconcile-status{font-size:.67rem;font-weight:500;margin-left:5px}
.place-reconcile-status.place-safe{color:#1f7848}
.place-reconcile-status.place-review{color:#8b632b}
@media(max-width:680px){.place-reconcile-row{grid-template-columns:1fr;gap:9px}.place-reconcile-summary{grid-template-columns:1fr}.place-reconcile-form{grid-template-columns:1fr}.place-reconcile-form button{justify-self:start}}

/* Opdatering 44: gennemsigtigt og selektivt stedoprydningsværktøj */
.place-reconcile-summary{grid-template-columns:repeat(4,minmax(0,1fr));}
.place-reconcile-row{grid-template-columns:minmax(165px,.85fr) minmax(0,1.55fr);align-items:start;gap:18px;}
.place-reconcile-old{position:sticky;top:85px;padding:7px 0;}
.place-reconcile-old>strong{font-size:.95rem;line-height:1.35;}
.place-reconcile-form{display:grid;grid-template-columns:minmax(0,1fr);gap:11px;min-width:0;}
.place-reconcile-form label{grid-column:auto;}
.place-reconcile-target{min-width:0;display:grid;gap:5px;}
.place-reconcile-target>label{display:block;line-height:1.4;}
.place-reconcile-form .place-picker{display:block;}
.place-reconcile-form .place-picker-help{display:block;margin-top:4px;font-size:.67rem;}
.place-reconcile-metadata{display:grid;gap:4px;}
.place-reconcile-metadata>label{display:grid;gap:5px;font-size:.75rem;color:#345640;}
.place-reconcile-metadata input,.place-rule-years input{width:100%;min-width:0;background:#fff;padding:9px 11px;border:1px solid #cadbd0;border-radius:10px;color:#1c3f2b;font:inherit;}
.place-reconcile-metadata>small{font-size:.68rem;}
.place-reconcile-examples,.place-reconcile-rule{border:1px solid #dfe9e1;border-radius:10px;background:#fff;padding:0;min-width:0;}
.place-reconcile-examples>summary,.place-reconcile-rule>summary{display:flex;gap:8px;align-items:center;justify-content:space-between;cursor:pointer;padding:11px 12px;color:#275a3a;font-size:.76rem;font-weight:750;list-style:none;}
.place-reconcile-examples>summary::-webkit-details-marker,.place-reconcile-rule>summary::-webkit-details-marker{display:none;}
.place-reconcile-examples>summary:before,.place-reconcile-rule>summary:before{content:'+';display:inline-grid;place-items:center;flex:0 0 20px;width:20px;height:20px;border-radius:50%;background:#edf4ef;color:#286b49;font-size:.85rem;}
.place-reconcile-examples[open]>summary:before,.place-reconcile-rule[open]>summary:before{content:'−';}
.place-reconcile-examples>summary>span{margin-left:auto;color:#718b78;font-size:.67rem;white-space:nowrap;}
.place-reconcile-pick{padding:4px 12px 12px;border-top:1px solid #eef2ee;}
.place-reconcile-select-all{display:flex!important;gap:8px;align-items:center;padding:9px 0;color:#315943;}
.place-reconcile-occurrences{max-height:360px;overflow-y:auto;display:grid;gap:5px;}
.place-reconcile-occurrence{display:flex!important;align-items:flex-start;gap:9px;padding:9px;border-radius:8px;background:#f6faf7;font-weight:400!important;cursor:pointer;}
.place-reconcile-occurrence>input,.place-reconcile-select-all>input,.place-rule-toggle>input{flex:0 0 auto;width:16px;height:16px;margin-top:2px;accent-color:#20764a;}
.place-reconcile-occurrence>span{min-width:0;display:grid;gap:2px;}
.place-reconcile-occurrence strong{font-size:.72rem;font-weight:700;line-height:1.3;overflow-wrap:anywhere;}
.place-reconcile-occurrence small{font-size:.68rem;color:#6a7f71;line-height:1.3;overflow-wrap:anywhere;}
.place-reconcile-rule{padding-bottom:0;}
.place-reconcile-rule[open]{padding-bottom:12px;}
.place-reconcile-rule>.place-rule-toggle,.place-reconcile-rule>.place-rule-years,.place-reconcile-rule>small{margin:0 12px;}
.place-rule-toggle{display:flex!important;align-items:center;gap:8px;padding:7px 0 10px;}
.place-rule-years{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
.place-rule-years>label{display:grid;gap:5px;min-width:0;font-size:.72rem;}
.place-reconcile-rule>small{display:block;margin-top:8px!important;font-size:.67rem;}
.place-reconcile-submit{display:flex;align-items:center;gap:12px;flex-wrap:wrap;}
.place-reconcile-submit>button:disabled{opacity:.55;cursor:not-allowed;}
@media(max-width:900px){
  .place-reconcile-summary{grid-template-columns:repeat(2,minmax(0,1fr));}
  .place-reconcile-row{grid-template-columns:minmax(0,1fr);gap:12px;}
  .place-reconcile-old{position:static;border-bottom:1px solid #e6eee8;padding-bottom:11px;}
}
@media(max-width:480px){
  .place-reconcile-summary{grid-template-columns:repeat(2,minmax(0,1fr));}
  .place-reconcile-summary>div{padding:10px;}
  .place-reconcile-examples>summary{flex-wrap:wrap;}
  .place-rule-years{grid-template-columns:minmax(0,1fr);}
}

.place-reconcile-backfill{margin-top:14px;padding-top:12px;border-top:1px solid #e7eee9;display:flex;gap:10px;align-items:center;flex-wrap:wrap;}


/* V46: tydeligere verificeret border og fokusmarkering i træet */
.tree-page .tree-person.verified,
.tree-page .mobile-tree-person.verified,
.relation-visual-stack .relation-tree-person.verified{
  border-width:3px !important;
  border-color:#2f8b57 !important;
}
.tree-page .tree-person.verified{
  box-shadow:0 7px 18px rgba(36,109,72,.14) !important;
}
.tree-page .mobile-tree-person.verified{
  box-shadow:0 7px 18px rgba(36,109,72,.14) !important;
}
.relation-visual-stack .relation-tree-person.verified{
  box-shadow:inset 0 0 0 2px #2f8b57,0 8px 18px rgba(36,109,72,.12) !important;
}
.tree-page .tree-person.focus,
.tree-page .mobile-tree-person.focus,
.relation-visual-stack .relation-tree-person.focus{
  transform:translateY(-2px);
  background:#fff;
}
.tree-page .tree-person.focus{
  border-width:3px !important;
  border-color:#165a3e !important;
  box-shadow:0 0 0 5px rgba(47,139,87,.18),0 16px 34px rgba(23,77,58,.22) !important;
}
.tree-page .mobile-tree-person.focus{
  border-width:3px !important;
  border-color:#165a3e !important;
  box-shadow:0 0 0 4px rgba(47,139,87,.18),0 14px 28px rgba(23,77,58,.2) !important;
}
.relation-visual-stack .relation-tree-person.focus{
  border-left-width:5px;
  border-left-color:#165a3e !important;
  box-shadow:0 0 0 4px rgba(47,139,87,.14),0 12px 24px rgba(23,77,58,.16) !important;
}
.tree-page .tree-person.focus strong,
.tree-page .mobile-tree-person.focus strong,
.relation-visual-stack .relation-tree-person.focus strong{
  color:#0f3628;
}
.tree-page .tree-person.focus .tree-years,
.tree-page .mobile-tree-person.focus .tree-years,
.relation-visual-stack .relation-tree-person.focus .tree-years{
  color:#4f6f60;
}

/* Kirker og sogne (v50): stabile resultatkort og korrekt afstand på alle skærme. */
.place-directory-page{min-width:0}
.place-directory-page>.card{padding:clamp(16px,2vw,24px);margin-bottom:18px;min-width:0}
.place-directory-page>.card>h2:first-child{margin-top:0}
.place-directory-page .page-head{align-items:flex-start}
.place-directory-page .page-head>.btn{flex:0 0 auto}
.place-directory-page .place-directory-search{margin:0 0 12px;align-items:end;gap:12px}
.place-directory-page .place-directory-search label{display:grid;gap:7px;min-width:0;flex:1 1 280px;font-size:.85rem;font-weight:700}
.place-directory-page .place-directory-search input[type=search]{display:block;width:100%;min-width:0;min-height:43px;padding:10px 12px;border:1px solid #cbd8d0;border-radius:10px;background:#fff}
.place-directory-page .place-directory-search input[type=search]:focus-visible,.place-directory-page a:focus-visible,.place-directory-page summary:focus-visible{outline:2px solid #24784d;outline-offset:3px}
.place-directory-page .place-directory-search button{min-height:43px;flex:0 0 auto}
.place-directory-page .place-directory-meta{margin:0;line-height:1.5}
.place-directory-page .place-directory-list{grid-template-columns:repeat(auto-fill,minmax(min(100%,280px),1fr));gap:12px;margin-top:14px}
.place-directory-page .place-directory-list>.card{padding:15px 16px;margin:0;min-width:0;border-radius:12px;box-shadow:none;background:#fbfdfb}
.place-directory-page .place-directory-list>.card a{display:block;overflow-wrap:anywhere;text-decoration:none;line-height:1.4}
.place-directory-page .place-directory-list>.card a:hover{text-decoration:underline}
.place-directory-page .place-directory-list>.card small{font-size:.78rem;line-height:1.5;overflow-wrap:anywhere}
.place-directory-page .place-directory-result.is-selected{border-color:#2b8055;background:#f1f8f2}
.place-directory-page .place-directory-results-head{display:flex;justify-content:space-between;align-items:baseline;gap:12px;flex-wrap:wrap}
.place-directory-page .place-directory-results-head h2{margin-bottom:0}
.place-directory-page .place-directory-result-count{font-size:.8rem;font-weight:700;color:var(--muted)}
.place-directory-page .place-directory-result-id,.place-directory-page .place-directory-id{display:block;font-size:.73rem;line-height:1.5;color:#587365;overflow-wrap:anywhere}
.place-directory-page .place-directory-result-id{margin-top:7px}
.place-directory-page .place-directory-selected h2{margin:4px 0 8px}
.place-directory-page .place-directory-selected .muted{margin:0 0 9px}
.place-directory-page .place-directory-selected code{font-size:.82em}
.place-directory-page .place-directory-parish{font-size:.88rem;margin:9px 0 0}
.place-directory-page .place-directory-admin>summary{padding:0;cursor:pointer;font-weight:750;color:var(--green)}
.place-directory-page .place-directory-admin-body{padding:16px 0 0;min-width:0}
.place-directory-page .place-directory-admin-body .form-grid{min-width:0}
.place-directory-page .place-directory-admin-body input[type=file]{max-width:100%}
.place-directory-page .place-directory-people .small-note{line-height:1.55}
.place-reconcile-page>.place-reconcile-section{padding:clamp(14px,2vw,23px);min-width:0}
.place-reconcile-page>.place-reconcile-section>h2{margin:0 0 13px}
.place-reconcile-page>.card:not(.place-reconcile-summary){min-width:0}
@media(max-width:660px){
 .place-directory-page .page-head{flex-wrap:wrap;gap:12px}
 .place-directory-page .page-head>.btn{width:auto}
 .place-directory-page .place-directory-search{display:grid;grid-template-columns:minmax(0,1fr)}
 .place-directory-page .place-directory-search button{width:100%}
 .place-directory-page .place-directory-results-head{align-items:flex-start}
}

/* Rettelse 51: Husk login, stedoversigt og kilde-redigering på profil. */
.auth-card .auth-remember{display:flex;align-items:center;gap:10px;font-size:.88rem;font-weight:600;cursor:pointer;color:var(--green);min-width:0}
.auth-card .auth-remember input{width:17px;height:17px;flex:0 0 auto;accent-color:var(--green);margin:0}
.auth-card .auth-remember span{line-height:1.4}
.place-directory-page .people-switch{display:flex;flex-wrap:wrap;gap:8px;margin-top:15px}
.place-directory-page [hidden]{display:none!important}
.place-directory-page .place-directory-search-card .place-directory-meta{margin:0}
.place-directory-page .place-directory-usage-count{display:inline-block;margin-top:8px;color:#28563d;font-size:.77rem;font-weight:750}
.place-directory-page .place-directory-ranking{list-style:none;display:grid;gap:0;margin:15px 0 0;padding:0}
.place-directory-page .place-directory-ranking>li{display:grid;grid-template-columns:32px minmax(0,1fr) auto;gap:13px;align-items:center;padding:13px 0;border-top:1px solid var(--line);min-width:0}
.place-directory-page .place-directory-rank-number{font-size:.78rem;font-weight:750;color:#66806e;align-self:start;padding-top:3px;text-align:center}
.place-directory-page .place-directory-rank-info{min-width:0;display:grid;gap:4px}
.place-directory-page .place-directory-rank-info a{font-weight:750;color:var(--green);text-decoration:none;overflow-wrap:anywhere}
.place-directory-page .place-directory-rank-info a:hover{text-decoration:underline}
.place-directory-page .place-directory-rank-info small{font-size:.74rem;color:var(--muted);overflow-wrap:anywhere}
.place-directory-page .place-directory-rank-bar{width:100%;height:7px;margin-top:5px;border-radius:20px;overflow:hidden;background:#edf2ed}
.place-directory-page .place-directory-rank-bar>span{display:block;height:100%;background:#70a686;border-radius:20px}
.place-directory-page .place-directory-rank-count{color:#224b34;font-size:.96rem;white-space:nowrap;align-self:start;padding-top:2px;font-variant-numeric:tabular-nums}
.place-directory-page .place-directory-rank-count small{font-size:.68rem;font-weight:500;color:var(--muted)}
.person-page .profile-documentation-source>.timeline-record-editor{position:relative!important;display:block;margin:8px 0 0;padding:0;border:0;max-width:100%}
.person-page .profile-documentation-source>.timeline-record-editor>summary{position:static!important;display:inline-flex;width:auto;height:auto;align-items:center;gap:6px;padding:6px 10px;border:1px solid #cfded2;border-radius:8px;background:#f2f8f3;color:#285e43;font-size:.76rem;font-weight:750;line-height:1.3;list-style:none}
.person-page .profile-documentation-source>.timeline-record-editor>summary::after{content:'Redigér kilde'}
.person-page .profile-documentation-source>.timeline-record-editor>summary span{font-size:.92rem}
.person-page .profile-documentation-source>.timeline-record-editor>.timeline-inline-editor-panel{margin:9px 0 0;padding:13px;border:1px solid #d5e5d9;border-radius:10px;background:#f9fcfa;max-width:100%;min-width:0}
.person-page .profile-documentation-source .timeline-inline-editor-panel .form-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;margin:8px 0;max-width:100%}
.person-page .profile-documentation-source .timeline-inline-editor-panel .form-grid>*{grid-column:1;min-width:0;max-width:100%}
.person-page .profile-documentation-source .timeline-inline-editor-panel input:not([type=radio]):not([type=checkbox]):not([type=hidden]),.person-page .profile-documentation-source .timeline-inline-editor-panel textarea,.person-page .profile-documentation-source .timeline-inline-editor-panel select{min-width:0;max-width:100%;width:100%}
.person-page .profile-documentation-source .timeline-inline-editor-panel .attachment-editor{min-width:0;max-width:100%}
@media(max-width:640px){
 .place-directory-page .people-switch{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;gap:7px}
 .place-directory-page .people-switch .btn{white-space:normal;text-align:center;min-height:40px;padding:8px}
 .place-directory-page .place-directory-ranking>li{grid-template-columns:24px minmax(0,1fr) auto;gap:8px}
 .place-directory-page .place-directory-rank-count small{display:block;text-align:right}
}

/* V61 – Fælles opslag på tværs af personprofiler. */
.wall-feed-page{max-width:1230px}
.wall-feed-header{align-items:center}
.wall-feed-header h1{margin-bottom:4px}
.wall-feed-total{border:1px solid rgba(143,174,151,.38);border-radius:100px;background:rgba(235,242,233,.95);color:#315d42;padding:9px 14px;white-space:nowrap;font-size:.78rem;font-weight:750}
.wall-feed-layout{display:grid;grid-template-columns:minmax(0,1fr) 270px;align-items:start;gap:22px}
.wall-feed-list{display:grid;gap:18px;min-width:0}
.wall-feed-post{padding:20px 22px;border-radius:17px;scroll-margin-top:90px}
.wall-feed-post.wall-post{border-top:1px solid var(--line)}
.wall-feed-post:target{outline:3px solid rgba(84,143,101,.52);outline-offset:3px}
.wall-feed-person{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:-2px 0 15px;padding:0 0 13px;border-bottom:1px solid var(--line);font-size:.74rem;color:var(--muted)}
.wall-feed-person>a{display:inline-flex;align-items:center;gap:8px;min-width:0;text-decoration:none;color:var(--green);font-size:.84rem}
.wall-feed-person>a:hover strong{text-decoration:underline;text-underline-offset:2px}
.wall-feed-person .avatar{width:30px;height:30px;flex:0 0 30px;font-size:.62rem}
.wall-feed-person strong{min-width:0;overflow-wrap:anywhere}
.wall-feed-post .wall-post-head{gap:10px}
.wall-feed-post .wall-post-body{font-size:.92rem;line-height:1.7;margin:14px 0}
.wall-feed-post .wall-images a{max-height:260px}
.wall-feed-post .wall-images img{height:200px}
.wall-feed-actions{display:flex;align-items:center;gap:12px 20px;flex-wrap:wrap;padding:13px 0;margin-top:12px;border-top:1px solid var(--line)}
.wall-feed-actions form{margin:0}
.wall-feed-actions>a{font-size:.76rem;font-weight:750;color:#2f6548;text-decoration:none}
.wall-feed-actions>a:hover{text-decoration:underline}
.wall-feed-comment-summary{font-size:.75rem;font-weight:800;color:#516f5e;margin:1px 0 8px}
.wall-feed-comment{border-left:2px solid #c8dbc9;padding:7px 10px;margin:7px 0;background:#f3f7f0;border-radius:0 8px 8px 0;overflow-wrap:anywhere;font-size:.78rem;line-height:1.5}
.wall-feed-comment strong{font-weight:800;color:#2d563c}
.wall-feed-comment a{color:var(--green);text-decoration:underline}
.wall-feed-reply{border-top:1px solid var(--line);padding-top:12px;margin-top:13px}
.wall-feed-reply>summary{cursor:pointer;font-size:.81rem;color:#37694d;font-weight:750;list-style:none}
.wall-feed-reply>summary::-webkit-details-marker{display:none}
.wall-feed-reply>summary:before{content:'+';font-weight:900;margin-right:8px}
.wall-feed-reply[open]>summary:before{content:'−'}
.wall-feed-reply>form{display:grid;gap:9px;margin-top:12px}
.wall-feed-reply label{font-size:.75rem;font-weight:700;color:#426b50}
.wall-feed-reply textarea{display:block;width:100%;min-height:76px;padding:10px 12px;border:1px solid #cfdbcf;border-radius:10px;background:#fff;color:#1b3727;resize:vertical;line-height:1.55;font:inherit;font-size:.83rem}
.wall-feed-reply button{justify-self:start}
.wall-feed-aside{padding:21px;position:sticky;top:86px}
.wall-feed-aside h2{font-size:1.1rem;margin:5px 0 10px}
.wall-feed-aside p:not(.eyebrow){font-size:.84rem;line-height:1.65}
.wall-feed-aside .btn{margin:8px 0 9px}
.wall-feed-empty{padding:28px}
.wall-feed-empty h2{margin-top:0}
.wall-feed-empty p{color:var(--muted);line-height:1.6}
.wall-feed-pagination{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px;margin:2px 0 14px}
.wall-feed-pagination>span{color:#f1f4ef;font-size:.78rem;flex:1;text-align:center}
@media(max-width:1000px){.wall-feed-layout{grid-template-columns:minmax(0,1fr)}.wall-feed-aside{position:static;order:-1;display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:16px 19px}.wall-feed-aside h2{margin:0}.wall-feed-aside p{margin:0}.wall-feed-aside .eyebrow,.wall-feed-aside .small-note{display:none}.wall-feed-aside .btn{margin-left:auto}}
@media(max-width:640px){.wall-feed-page{padding-inline:14px}.wall-feed-header{align-items:flex-start;gap:6px}.wall-feed-header h1{font-size:2.2rem}.wall-feed-total{padding:7px 9px;font-size:.7rem}.wall-feed-list{gap:12px}.wall-feed-post{padding:15px 14px}.wall-feed-post .wall-images img{height:155px}.wall-feed-aside{padding:14px;align-items:flex-start}.wall-feed-aside .btn{margin:0 0 0 auto;font-size:.72rem}.wall-feed-aside p:not(.eyebrow){font-size:.75rem}.wall-feed-actions{gap:8px 14px}.wall-feed-pagination>span{order:-1;flex-basis:100%}}

/* Slægtsbog v63: tomme sektioner vælges ikke som standard. */
.book-options-help{font-size:.76rem;color:var(--muted);line-height:1.5;margin:-7px 0 13px}
.book-option:has(input:disabled){opacity:.56;background:#f2f5f1;cursor:not-allowed}
.book-option:has(input:disabled) b{color:#4d6055}

/* Slægtsbog v64: tydeligt og mobilvenligt layoutvalg */
.book-design-card{grid-column:1/-1}
.book-design-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:14px 0}
.book-design-choice{display:flex;align-items:start;gap:12px;padding:16px;border:1px solid #d5dfd8;border-radius:14px;background:#fafbf8;cursor:pointer}
.book-design-choice:has(input:checked){border-color:#397255;box-shadow:0 0 0 2px rgba(57,114,85,.12);background:#f0f6ef}
.book-design-choice input{margin-top:4px;accent-color:#24583f}
.book-design-choice span{display:grid;gap:5px}
.book-design-choice b{font-size:.94rem}
.book-design-choice small{color:#617268;font-size:.79rem;line-height:1.45}
@media(max-width:680px){.book-design-choices{grid-template-columns:1fr}}

/* V64 preview switches with the selected PDF design. */
.book-builder-form:has(input[name="design"][value="classic"]:checked) .book-preview-cover{
  background:#fff;border-bottom:1px solid #e3e8e1;
}
.book-builder-form:has(input[name="design"][value="classic"]:checked) .book-preview-cover>span,
.book-builder-form:has(input[name="design"][value="classic"]:checked) .book-preview-cover h2{color:#23372e}
.book-builder-form:has(input[name="design"][value="classic"]:checked) .book-preview-cover>small,
.book-builder-form:has(input[name="design"][value="classic"]:checked) .book-preview-cover em{color:#587363}
.book-builder-form:has(input[name="design"][value="classic"]:checked) .book-preview-cover>span{padding-bottom:12px;border-bottom:1px solid #b8cbbf;color:#215a41}
.book-builder-form:has(input[name="design"][value="classic"]:checked) .book-preview-cover .avatar.xl{border:3px solid #e5ebe5;box-shadow:none}

/* V65: bogforsiden i formularen afspejler den printervenlige PDF. */
.book-builder-form:has(input[name="design"][value="classic"]:checked) .book-preview-cover{
  min-height:344px;padding:25px 24px 165px;background:#fff;color:#21372b;
}
.book-builder-form:has(input[name="design"][value="classic"]:checked) .book-preview-cover h2{
  margin:22px 0 8px;max-width:100%;font-size:clamp(1.25rem,2vw,1.7rem);line-height:1.18;
}
.book-builder-form:has(input[name="design"][value="classic"]:checked) .book-preview-cover>small{
  margin:0;color:#245c43;font-size:.83rem;font-weight:500;letter-spacing:0;text-transform:none;
}
.book-builder-form:has(input[name="design"][value="classic"]:checked) .book-preview-cover em{
  display:block;margin-top:5px;color:#6b7971;
}
.book-builder-form:has(input[name="design"][value="classic"]:checked) .book-preview-cover .avatar.xl{
  right:50%;bottom:19px;transform:translateX(50%);width:100px;height:126px;
  border:0;border-radius:3px;background:#f0f1ed;box-shadow:none;
}
/* Forhåndsvisning og download skal begge være synlige på mobile skærme. */
@media(max-width:1080px){.book-builder-side{grid-template-columns:minmax(0,270px) 1fr;align-items:start}.book-builder-side .book-generate{grid-column:2}.book-builder-side .book-private-note{grid-column:2;margin:0}}
@media(max-width:760px){.book-builder-side{display:grid;grid-template-columns:1fr;gap:9px}.book-builder-side .book-generate{grid-column:1;position:static;bottom:auto;box-shadow:none;margin:0}.book-builder-side .book-private-note{grid-column:1;margin:0}}

/* V74: Tre tilstande for dokumentationslamper i personprofilen.
   Orange = manuel gennemgang af en konkret dato, ikke dokumentation med kilde. */
.person-page .profile-documentation-light.is-source{color:#285e43;border-color:#cee4d4;background:#f1f8f2}
.person-page .profile-documentation-light.is-source .profile-documentation-bulb{background:#3da66d;box-shadow:0 0 0 3px #dcefe2,inset 0 0 0 1px #2f9159}
.person-page .profile-documentation-light.is-manual{color:#8a510e;border-color:#edce97;background:#fff8e9}
.person-page .profile-documentation-light.is-manual .profile-documentation-bulb{background:#f4a331;box-shadow:0 0 0 3px #ffe4b4,inset 0 0 0 1px #d98215;animation:profile-documentation-amber-pulse 2.8s ease-in-out infinite}
@keyframes profile-documentation-amber-pulse{
  0%,100%{box-shadow:0 0 0 2px rgba(244,163,49,.23),inset 0 0 0 1px #d98215}
  50%{box-shadow:0 0 0 5px rgba(244,163,49,.43),0 0 11px rgba(244,163,49,.35),inset 0 0 0 1px #d98215}
}
@media(prefers-reduced-motion:reduce){.person-page .profile-documentation-light.is-manual .profile-documentation-bulb{animation:none}}
.person-page .profile-documentation-review{margin:12px 0;border:1px solid #d8e1da;border-radius:10px;padding:10px;background:#fafcf9}
.person-page .profile-documentation-review>summary{cursor:pointer;color:#254f3b;font-size:.78rem;font-weight:750}
.person-page .profile-documentation-review>p{margin:9px 0 10px}
.person-page .profile-documentation-review-list{display:grid;gap:0}
.person-page .profile-documentation-review-row{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:8px;padding:9px 0;border-top:1px solid #e1e8e1}
.person-page .profile-documentation-review-description{display:grid;min-width:0;gap:3px;line-height:1.3}
.person-page .profile-documentation-review-description strong{font-size:.79rem;color:#223d30}
.person-page .profile-documentation-review-description small{font-size:.69rem;color:#657369;overflow-wrap:anywhere}
.person-page .profile-documentation-review-form{margin:0;flex:0 0 auto}
.person-page .profile-documentation-review-form .btn{white-space:nowrap;font-size:.7rem;padding:6px 8px}
.person-page .profile-documentation-review-button{background:#fff0d2;border-color:#d9a859;color:#805012}
.person-page .profile-documentation-review-button:hover{background:#ffe3b1}
.person-page .profile-documentation-review-complete{flex:0 0 auto;font-size:.7rem;color:#647367}
@media(max-width:420px){.person-page .profile-documentation-review-row{align-items:flex-start;flex-wrap:wrap}}


/* Rettelse 75 – tydelig, tilgængelig livslinjehandling i begge temaer.
   Summary skal ikke arve .btn.primary, der gav hvid tekst på en lys baggrund. */
.person-page .timeline-add-disclosure > summary.timeline-add-summary {
  display:flex;
  align-items:center;
  gap:10px;
  width:100%;
  min-height:48px;
  margin:0;
  padding:13px 16px;
  border:0;
  border-radius:0;
  background:#18533c;
  color:#ffffff;
  font-size:.94rem;
  font-weight:750;
  line-height:1.4;
  text-align:left;
  cursor:pointer;
  list-style:none;
  text-decoration:none;
  transition:background-color .15s ease;
}
.person-page .timeline-add-disclosure > summary.timeline-add-summary:hover {
  background:#103f2d;
  color:#ffffff;
}
.person-page .timeline-add-disclosure > summary.timeline-add-summary:focus-visible {
  outline:3px solid #d2b775;
  outline-offset:-4px;
}
.person-page .timeline-add-disclosure > summary.timeline-add-summary .timeline-add-chevron {
  margin-left:auto;
  color:inherit;
}
@media (prefers-reduced-motion:reduce) {
  .person-page .timeline-add-disclosure > summary.timeline-add-summary {transition:none;}
}

/* Rettelse 77 – Stjernetegn som fælles personoversigt. */
.people-page .zodiac-directory,.people-page .zodiac-results{padding:clamp(16px,2.3vw,26px);min-width:0}
.zodiac-directory-intro{display:flex;align-items:flex-start;justify-content:space-between;gap:22px;margin-bottom:20px}
.zodiac-directory-intro h2{margin:0 0 7px}
.zodiac-directory-intro p.muted{max-width:65ch;margin:0;line-height:1.55}
.zodiac-directory-totals{flex:0 0 auto;display:flex;flex-direction:column;align-items:flex-end;gap:2px;padding:10px 0}
.zodiac-directory-totals strong{font-size:1.8rem;color:#1c593f;line-height:1.1;font-variant-numeric:tabular-nums}
.zodiac-directory-totals span{font-size:.81rem;font-weight:750;color:#314e3c}
.zodiac-directory-totals small{font-size:.73rem;color:#627467}
.zodiac-sign-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.zodiac-sign-tile{display:flex;align-items:center;gap:10px;min-width:0;padding:13px 12px;border:1px solid #d4dfd5;background:#f9faf6;border-radius:14px;text-decoration:none;color:#193a2b;transition:background .15s,border-color .15s,box-shadow .15s}
.zodiac-sign-tile:hover,.zodiac-sign-tile:focus-visible{background:#edf5ee;border-color:#87a991;box-shadow:0 3px 13px rgba(24,63,50,.07)}
.zodiac-sign-tile:focus-visible{outline:3px solid #83b59b;outline-offset:2px}
.zodiac-sign-tile.is-selected{border-color:#235b40;background:#e5f0e8;box-shadow:inset 0 0 0 1px #235b40}
.zodiac-tile-symbol{width:38px;min-width:38px;display:grid;place-items:center;font-family:'Segoe UI Symbol','Apple Symbols','Noto Sans Symbols 2',system-ui,sans-serif;font-size:1.75rem;line-height:1.2;color:#276447}
.zodiac-tile-description{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.zodiac-tile-description strong{color:#1c392b;font-size:.89rem;overflow-wrap:anywhere}
.zodiac-tile-description small{font-size:.73rem;color:#596c60;line-height:1.35}
.zodiac-tile-count{flex:0 0 auto;display:inline-flex;min-width:27px;min-height:27px;align-items:center;justify-content:center;border-radius:20px;padding:3px 7px;background:#e3ede5;color:#1d553d;font-weight:800;font-size:.82rem;font-variant-numeric:tabular-nums}
.zodiac-sign-missing{grid-column:span 2;background:#f5f2eb;border-color:#e3d8c5}
.zodiac-sign-missing .zodiac-tile-symbol{color:#8b7044}
.zodiac-sign-missing .zodiac-tile-count{background:#ebe0ce;color:#634e2d}
.zodiac-sign-missing.is-selected{border-color:#8e7652;box-shadow:inset 0 0 0 1px #8e7652;background:#f5eddf}
.zodiac-method-note{font-size:.75rem;color:#617164;margin:15px 0 0;line-height:1.5}
.people-page .zodiac-results{margin-top:16px;scroll-margin-top:84px}
.zodiac-results-header{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:18px}
.zodiac-results-header h2{display:flex;align-items:center;gap:9px;margin:0 0 7px}
.zodiac-result-symbol{font-family:'Segoe UI Symbol','Apple Symbols','Noto Sans Symbols 2',system-ui,sans-serif;color:#236347;font-size:1.3em;line-height:1}
.zodiac-results-header .muted{margin:0}
.zodiac-results-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.zodiac-results-counter{white-space:nowrap;font-weight:800;color:#1b543b;font-variant-numeric:tabular-nums;font-size:.83rem}
.zodiac-person-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.zodiac-person{display:flex;align-items:center;gap:11px;min-width:0;padding:10px;background:#f8faf6;border:1px solid #dbe6da;border-radius:12px;color:#213d30;text-decoration:none}
.zodiac-person:hover,.zodiac-person:focus-visible{border-color:#96b69c;background:#eff6ed}
.zodiac-person:focus-visible{outline:3px solid #83b59b;outline-offset:2px}
.zodiac-person .avatar{width:42px;height:42px;flex:0 0 42px;font-size:.75rem}
.zodiac-person-details{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px;overflow-wrap:anywhere}
.zodiac-person-details strong{font-size:.84rem;line-height:1.24;color:#1c392b}
.zodiac-person-details small{font-size:.72rem;line-height:1.33;color:#53685b}
.zodiac-person-arrow{align-self:center;color:#387253;font-size:1rem}
.zodiac-empty-selection{display:flex;align-items:center;gap:16px}
.zodiac-empty-selection h2{margin:0 0 4px;font-size:1.2rem}
.zodiac-empty-selection p{margin:0}
.zodiac-empty-icon{display:grid;place-items:center;width:56px;min-width:56px;height:56px;border-radius:15px;background:#e8f1e9;color:#296447;font-size:1.8rem;font-family:'Segoe UI Symbol','Apple Symbols',system-ui,sans-serif}
.zodiac-no-members{padding:15px;border:1px dashed #c5d5c8;background:#f8faf7;border-radius:10px;color:#4c6555}
@media(max-width:1180px){.zodiac-sign-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.zodiac-person-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.zodiac-sign-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.zodiac-sign-missing{grid-column:1/-1}.zodiac-directory-intro{gap:10px}.zodiac-person-grid{grid-template-columns:1fr}}
@media(max-width:480px){.zodiac-sign-grid{gap:7px}.zodiac-sign-tile{padding:10px 7px;gap:5px}.zodiac-tile-symbol{min-width:30px;width:30px;font-size:1.4rem}.zodiac-tile-description strong{font-size:.79rem}.zodiac-tile-description small{font-size:.67rem}.zodiac-tile-count{min-width:22px;min-height:22px;padding:2px 5px;font-size:.73rem}.zodiac-directory-totals strong{font-size:1.35rem}.zodiac-directory-totals span,.zodiac-directory-totals small{font-size:.67rem}.zodiac-results-header{flex-direction:column}}

/* Mobilrettelser 2026-11-02: fleksibel topbar og læsbare personkort. */
@media(max-width:980px){
  .topbar .brand{flex:1 1 auto;min-width:0;}
  .topbar .brand-mark{flex:0 0 34px;}
  .topbar .brand span:last-child{min-width:0;overflow:hidden;text-overflow:ellipsis;}
  .topbar .search-open{flex:0 0 44px;min-width:44px;width:44px;min-height:44px;padding:8px;text-align:center;}
  .topbar .user-menu{flex:0 0 auto;}
}
@media(max-width:640px){
  .mobile-family-tree .mobile-tree-toolbar{flex-wrap:wrap;}
  .mobile-family-tree .mobile-tree-toolbar>div:first-child{flex:1 1 140px;}
  .mobile-family-tree .mobile-tree-toolbar strong{white-space:normal;overflow-wrap:break-word;}
  .mobile-family-tree .mobile-tree-person strong{font-size:.9rem;line-height:1.3;white-space:normal;overflow-wrap:break-word;}
  .mobile-family-tree .mobile-tree-person button>span:last-child{flex:1;}
  .mobile-family-tree .mobile-tree-person small.tree-years{font-size:.75rem;line-height:1.4;}
  .mobile-family-tree .mobile-tree-person .tree-place-label,
  .mobile-family-tree .mobile-tree-person .tree-place-value{font-size:.75rem;line-height:1.4;}
  .mobile-family-tree .mobile-tree-person .tree-place-list .tree-place-line{grid-template-columns:34px minmax(0,1fr);}
  .mobile-family-tree .mobile-tree-person .tree-place-value{display:block;overflow:visible;overflow-wrap:break-word;-webkit-line-clamp:unset;line-clamp:unset;}
  .mobile-family-tree .mobile-tree-person a{flex-basis:44px;min-height:44px;}
  .mobile-family-tree .mobile-tree-label{font-size:.75rem;}
}
@media(max-width:480px){
  .mobile-family-tree .mobile-tree-grid,
  .mobile-family-tree .mobile-tree-grid.one{grid-template-columns:minmax(0,1fr);gap:10px;}
}

/* Mere-menu: sjette plads i bundnavigationen, uden ekstra bredde. */
.mobile-more{display:none;}
@media(max-width:980px){
  .mobile-nav{height:calc(66px + env(safe-area-inset-bottom));}
  .mobile-nav .mobile-more{display:block;flex:1;min-width:0;}
  .mobile-more>summary{height:100%;display:grid;place-items:center;align-content:center;gap:2px;list-style:none;cursor:pointer;font-size:1.05rem;}
  .mobile-more>summary::-webkit-details-marker{display:none;}
  .mobile-more>summary span:first-child{font-size:1.05rem;}
  .mobile-more>summary:focus-visible{outline:2px solid currentColor;outline-offset:-4px;}
  .mobile-more-panel{position:absolute;right:8px;bottom:calc(100% + 8px);width:260px;max-width:calc(100vw - 16px);max-height:calc(100dvh - 100px - env(safe-area-inset-bottom));overflow:auto;background:#fff;color:var(--ink);border:1px solid var(--line);border-radius:16px;padding:8px;box-shadow:0 8px 32px rgba(15,46,29,.22);}
  .mobile-more:not([open])>.mobile-more-panel{display:none;}
  .mobile-nav .mobile-more-panel a{display:flex;align-items:center;justify-content:flex-start;min-height:44px;padding:10px 12px;border-radius:9px;font-size:.9rem;font-weight:650;color:var(--ink);}
  .mobile-nav .mobile-more-panel a:hover,
  .mobile-nav .mobile-more-panel a:focus-visible,
  .mobile-nav .mobile-more-panel a[aria-current="page"]{background:var(--soft);color:var(--green);}
}

/* Små aktivitets-popups, der ikke ændrer de personlige notifikationer. */
.live-activity-stack{position:fixed;left:18px;bottom:82px;z-index:950;display:flex;flex-direction:column;align-items:flex-start;gap:9px;max-width:min(360px,calc(100vw - 32px));pointer-events:none}
.live-activity-toast{display:flex;align-items:center;gap:10px;max-width:100%;padding:11px 15px;border:1px solid var(--line,#dce6df);border-radius:13px;background:var(--card,#fff);color:var(--ink,#25392c);box-shadow:0 9px 28px rgba(15,28,21,.17);font-size:.83rem;font-weight:650;line-height:1.4;text-decoration:none;opacity:0;transform:translateY(9px);transition:opacity .22s ease,transform .22s ease;pointer-events:auto;overflow-wrap:anywhere}
.live-activity-toast.is-visible{opacity:1;transform:translateY(0)}
.live-activity-toast[href]:hover{border-color:var(--green,#49775d)}
.live-activity-icon{flex:0 0 24px;display:grid;place-items:center;width:24px;height:24px;border-radius:50%;color:#fff;background:var(--green,#427250);font-size:.85rem;font-weight:800}
@media(max-width:700px){.live-activity-stack{left:10px;bottom:calc(78px + env(safe-area-inset-bottom,0px));max-width:calc(100vw - 20px)}.live-activity-toast{font-size:.77rem;padding:9px 12px}}
@media(prefers-reduced-motion:reduce){.live-activity-toast{transition:none;transform:none}}

/* Aktivitets-popups: vis uddrag og tydelig genvej til den konkrete handling. */
.live-activity-toast{align-items:flex-start;min-width:220px;width:max-content;max-width:100%;font-weight:400;padding:12px 14px}
.live-activity-content{display:flex;flex-direction:column;gap:3px;min-width:0;overflow-wrap:anywhere}
.live-activity-content>strong{font-size:.84rem;font-weight:750;line-height:1.4}
.live-activity-detail{font-size:.79rem;line-height:1.4;white-space:normal}
.live-activity-context{font-size:.72rem;color:var(--muted,#66746b);line-height:1.4}
.live-activity-action{font-size:.72rem;font-weight:750;color:var(--green,#427250);margin-top:3px}
.live-activity-toast[href]:focus-visible{outline:3px solid var(--green,#427250);outline-offset:2px}
@media(max-width:700px){.live-activity-toast{min-width:0}.live-activity-content>strong{font-size:.79rem}}

/* Giv navigation, søgning og brugermenu plads på mindre computerskærme. */
@media (min-width: 981px) and (max-width: 1380px) {
  .topbar { gap: clamp(6px, 1vw, 14px); padding-inline: 14px; }
  .topbar .search-open { flex: 0 1 230px; min-width: max-content; }
}
@media (min-width: 981px) and (max-width: 1190px) {
  .topbar .search-open { flex: 0 0 44px; min-width: 44px; text-align: center; }
  .topbar .search-open span { display: none; }
  .desktop-nav .nav-link { padding-inline: 7px; }
}

/* Anetavle og viftevisning – to ekstra trævisninger (november 2026). */
.tree-toolbar .tree-view-toggle{white-space:nowrap;border:1px solid #c6d8ca;background:#fff;color:#365943;font-weight:750}
.tree-toolbar .tree-view-toggle:hover,.tree-toolbar .tree-view-toggle:focus-visible{border-color:#488b65;background:#eff8f1}
.tree-toolbar .tree-view-toggle.is-active{background:var(--green,#39724f);border-color:var(--green,#39724f);color:#fff}
.ancestor-view{min-width:0;margin-top:14px}
.ancestor-view-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:12px;flex-wrap:wrap}
.ancestor-view-title{min-width:0;display:grid;gap:4px}
.ancestor-view-title>strong{font-size:1.1rem;color:#2e5e41}
.ancestor-view-title>span{font-size:.82rem;line-height:1.45;color:#4d6658}
.ancestor-view-title>small{font-size:.72rem;color:#778b7d}
.ancestor-view-controls{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.ancestor-generation-switch{display:flex;align-items:center;gap:8px;padding:5px 7px 5px 12px;border-radius:11px;background:#eef5ef;border:1px solid #d4e4d8;color:#3e634d;font-size:.75rem;font-weight:700}
.ancestor-generation-switch button{width:30px;height:30px;border-radius:8px;border:1px solid #bdcfbf;background:#fff;color:#376448;font-size:1.1rem;cursor:pointer}
.ancestor-generation-switch button:disabled{opacity:.35;cursor:not-allowed}
.ancestor-generation-switch button:not(:disabled):hover{background:#dceee1}
.ancestor-generation-switch strong{min-width:1.2em;text-align:center;font-size:.93rem}
.ancestor-viewport{max-width:100%;max-height:min(76vh,980px);min-height:240px;overflow:auto;overscroll-behavior:contain;border:1px solid #d6e5da;border-radius:16px;background:#f8fbf8;box-shadow:inset 0 0 0 1px #fff;scrollbar-width:thin}
.ancestor-viewport:focus-visible{outline:3px solid #4f9770;outline-offset:2px}
.ancestor-svg{display:block;width:max(100%,1100px);height:auto;max-width:none}
.ancestor-fan-svg{width:max(100%,920px)}
.ancestor-svg [data-focus]:focus-visible .ancestor-shape{stroke:#246d47;stroke-width:3}
.ancestor-view-tip{margin:10px 3px 2px;color:#647e6b;font-size:.75rem;line-height:1.5}
@media(max-width:1000px){.tree-toolbar{flex-wrap:wrap}.tree-toolbar .tree-toolbar-actions{justify-content:flex-start}}
@media(max-width:640px){
  .tree-app.tree-app-alternate{overflow:visible}
  .tree-app-alternate .tree-desktop{display:block}
  .tree-app-alternate .mobile-family-tree{display:none}
  .tree-app-alternate .tree-canvas{margin:0;border:1px solid var(--line);border-radius:18px;overflow:visible;padding:13px}
  .tree-app-alternate .tree-toolbar{display:grid;gap:11px;min-width:0}
  .tree-app-alternate .tree-toolbar-copy{display:grid;gap:2px;min-width:0}
  .tree-app-alternate .tree-toolbar-copy strong{overflow-wrap:anywhere}
  .tree-app-alternate .tree-toolbar .tree-toolbar-actions{width:100%;display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-start}
  .tree-app-alternate .tree-toolbar-actions .btn{font-size:.72rem;padding:8px 9px}
  .ancestor-view-head{align-items:stretch}
  .ancestor-view-title>span{font-size:.78rem}
  .ancestor-view-controls{width:100%;justify-content:space-between}
  .ancestor-viewport{max-height:65vh}
  .ancestor-svg{width:max(100%,1000px)}
  .ancestor-fan-svg{width:max(100%,1050px)}
}

/* To synlige mobilgenveje, selv når det almindelige mobiltræ er aktivt. */
.mobile-tree-view-switch{display:none}
@media(max-width:640px){
  .mobile-family-tree .mobile-tree-view-switch{display:flex;gap:7px;flex-wrap:wrap;justify-content:center;margin:-3px 0 14px}
  .mobile-tree-view-switch .tree-view-toggle{flex:1 1 120px;min-height:41px;border:1px solid #c6d8ca;border-radius:10px;background:#fff;color:#365943;font-size:.8rem;font-weight:750}
  .mobile-tree-view-switch .tree-view-toggle:focus-visible,.mobile-tree-view-switch .tree-view-toggle:hover{background:#ecf5ee;border-color:#488b65}
  .mobile-tree-view-switch .tree-view-toggle.is-active{background:var(--green,#39724f);color:#fff}
}

/* Anetavle og vifte: fuld hoejde og tilpasning til sidens bredde. */
.ancestor-viewport{max-height:none;min-height:0;overflow:visible;overscroll-behavior:auto}
.ancestor-viewport .ancestor-svg{width:100%;max-width:100%;height:auto}

/* Børns konfirmationer i forældrenes livslinje (uden kopiering af medier). */
.person-page .timeline-child-confirmation{max-width:680px;margin:0 0 14px;min-width:0}
.person-page .timeline-child-confirmation>p{margin:6px 0 9px;line-height:1.5}
.person-page .timeline-child-confirmation a{overflow-wrap:anywhere}
.person-page .timeline-child-confirmation-source{font-size:.88rem}
.person-page .timeline-child-confirmation-media{margin:12px 0 0;max-width:100%}
.person-page .timeline-child-confirmation-media .profile-attachment video{display:block;width:100%;height:auto;max-height:170px;border-radius:9px;background:#15221b}
@media(max-width:540px){.person-page .timeline-child-confirmation{margin-bottom:11px}}
.profile-life-media .profile-gallery-child-caption{display:grid;gap:4px;line-height:1.4;overflow-wrap:anywhere}
.profile-life-media .profile-gallery-child-caption strong{font-size:.81rem;font-weight:720}
.profile-life-media .profile-gallery-child-caption span{font-size:.78rem;color:var(--muted,#637367)}

/* Opdatering 79 – nænsomt, men tydeligere løft af livslinjen.
   Bygger ovenpå versionen med fungerende børne-konfirmationer. */
.person-page .profile-timeline-section{
  position:relative;
  min-width:0;
  padding:clamp(18px,2.2vw,26px);
  background:linear-gradient(180deg,#fcfdfc 0%,#f6f8f6 100%);
}
.person-page .timeline-heading{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
  padding-bottom:12px;
  border-bottom:1px solid #dde6de;
}
.person-page .timeline-heading h2{
  margin:0;
  font-size:clamp(1.34rem,1.9vw,1.6rem);
  letter-spacing:-.02em;
}
.person-page .profile-timeline-section>.timeline,
.person-page .timeline-undated-list>.timeline{display:grid;gap:12px;margin-top:2px}
.person-page .profile-timeline-section>.timeline:before,
.person-page .timeline-undated-list>.timeline:before{
  left:8px;
  top:6px;
  bottom:6px;
  width:3px;
  border-radius:999px;
  background:linear-gradient(180deg,#d7e3da 0%,#9fbea9 52%,#d7e3da 100%);
}
.person-page .timeline-item{padding:0 0 0 38px}
.person-page .timeline-dot{
  left:0;
  top:22px;
  width:16px;
  height:16px;
  outline:5px solid #f8faf8;
  box-shadow:0 0 0 1px rgba(57,96,74,.16);
}
.person-page .timeline-item>.timeline-item-content{
  position:relative;
  min-width:0;
  width:100%;
  margin:0;
  padding:17px 58px 17px 17px;
  border:1px solid #d7e2da;
  border-radius:18px;
  background:linear-gradient(180deg,#ffffff 0%,#fbfcfb 100%);
  box-shadow:0 8px 22px rgba(18,38,28,.055);
}
.person-page .timeline-item>.timeline-item-content.has-relation-card{padding:0}
.person-page .timeline-item.auto-event>.timeline-item-content{border-left:4px solid #c8d8ce}
.person-page .timeline-item.manual-event>.timeline-item-content{border-left:4px solid #7aa084}
.person-page .timeline-item-content .timeline-relationship-card{
  width:100%;
  max-width:none;
  margin:0;
  padding:17px 58px 14px 17px;
  border:0;
  border-radius:18px;
  background:transparent;
  box-shadow:none;
}
.person-page .timeline-event-head{display:grid;gap:8px;margin-bottom:12px}
.person-page .timeline-item-meta,
.person-page .timeline-relationship-date{
  display:inline-flex;
  align-items:center;
  align-self:flex-start;
  gap:6px;
  min-height:28px;
  padding:4px 10px;
  border-radius:999px;
  background:#eef4f0;
  color:#5a7164;
  font-size:.73rem;
  font-weight:760;
  line-height:1.35;
}
.person-page .timeline-item.manual-event .timeline-item-meta{background:#e7f2ea;color:#1f5a3e}
.person-page .timeline-item-title,
.person-page .timeline-item h3,
.person-page .timeline-relationship-card h3{
  margin:0;
  color:#183a2b;
  font-size:1.04rem;
  line-height:1.38;
  overflow-wrap:anywhere;
}
.person-page .timeline-place,
.person-page .timeline-relationship-place{
  display:inline-flex;
  align-items:center;
  gap:6px;
  margin:0 0 11px;
  padding:6px 11px;
  border-radius:999px;
  background:#f3f7f4;
  color:#5c7265;
  font-size:.79rem;
  line-height:1.35;
}
.person-page .timeline-notes,
.person-page .timeline-relationship-note{
  margin:3px 0 0;
  padding:12px 14px;
  border:1px solid #e1e9e3;
  border-radius:14px;
  background:#f8fbf9;
}
.person-page .timeline-linked-source{
  margin-top:14px;
  padding:11px 12px;
  border:1px solid #dce6de;
  border-radius:14px;
  background:#f8fbf9;
}
.person-page .timeline-source-link,
.person-page .timeline-source-label,
.person-page .timeline-source-link-standalone,
.person-page .timeline-related-link,
.person-page .timeline-period-link{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:.83rem;
  font-weight:680;
  text-decoration:none;
}
.person-page .timeline-source-link:hover,
.person-page .timeline-source-link-standalone:hover,
.person-page .timeline-related-link:hover,
.person-page .timeline-period-link:hover{text-decoration:underline}
.person-page .timeline-linked-source .timeline-photo-gallery,
.person-page .timeline-child-confirmation-media{
  margin:10px 0 4px;
  max-width:none;
  grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
  gap:10px;
}
.person-page .profile-timeline-section .timeline-photo-gallery .profile-attachment{
  background:#fff;
  border:1px solid #dde6df;
  border-radius:15px;
  padding:6px;
  box-shadow:0 5px 16px rgba(19,34,27,.05);
}
.person-page .profile-timeline-section .timeline-photo-gallery .profile-attachment>a{border-radius:10px}
.person-page .profile-timeline-section .timeline-photo-gallery .profile-attachment img{
  height:150px;
  border-radius:10px;
}
.person-page .profile-timeline-section .timeline-photo-gallery .profile-attachment figcaption{
  padding:8px 5px 2px;
  font-size:.77rem;
  line-height:1.4;
}
.person-page .timeline-child-confirmation{
  margin:0 16px 16px;
  padding:13px 14px 14px;
  border:1px solid #dce7df;
  border-radius:16px;
  background:linear-gradient(180deg,#f9fbfa 0%,#f4f8f5 100%);
}
.person-page .timeline-child-confirmation>p{margin:0 0 9px;line-height:1.5}
.person-page .timeline-child-confirmation-source{font-size:.84rem;font-weight:680}
.person-page .timeline-inline-editor>summary,
.person-page .timeline-edit-shortcut{
  right:13px;
  top:13px;
  width:34px;
  height:34px;
  border-radius:10px;
  box-shadow:0 3px 10px rgba(18,34,25,.045);
}
.person-page .timeline-inline-editor-panel{
  margin:14px 0 0;
  padding:14px;
  border-radius:14px;
  background:#f7faf8;
}
.person-page .timeline-undated-list,
.person-page .timeline-hidden-list{
  margin-top:16px;
  border:1px solid #dbe5dd;
  border-radius:16px;
  background:#f8fbf9;
  overflow:hidden;
}
.person-page .timeline-undated-list>summary,
.person-page .timeline-hidden-list>summary{
  padding:13px 15px;
  cursor:pointer;
  font-weight:760;
  color:#214935;
  background:#f0f6f2;
}
.person-page .timeline-undated-list>.timeline,
.person-page .timeline-hidden-items{padding:14px 15px 15px}
@media(max-width:640px){
  .person-page .profile-timeline-section{padding:14px}
  .person-page .timeline-heading{margin-bottom:12px;padding-bottom:10px}
  .person-page .timeline-item{padding-left:32px}
  .person-page .timeline-dot{top:19px;width:14px;height:14px;outline-width:4px}
  .person-page .timeline-item>.timeline-item-content,
  .person-page .timeline-item-content .timeline-relationship-card{padding:14px 46px 14px 14px;border-radius:16px}
  .person-page .timeline-child-confirmation{margin:0 12px 12px;padding:11px 11px 12px}
  .person-page .profile-timeline-section .timeline-photo-gallery .profile-attachment img{height:128px}
  .person-page .timeline-inline-editor>summary,
  .person-page .timeline-edit-shortcut{right:9px;top:9px;width:30px;height:30px}
}

/* Verificering fra dokumentationslamper: lille, tilgængelig formular. */
.person-page .profile-documentation-light.is-verified{color:#285e43;border-color:#cee4d4;background:#f1f8f2}
.person-page .profile-documentation-light.is-verified .profile-documentation-bulb{background:#3da66d;box-shadow:0 0 0 3px #dcefe2,inset 0 0 0 1px #2f9159}
.person-page .profile-side .profile-review-dialog{width:min(440px,calc(100vw - 28px));max-height:min(90vh,700px);overflow:auto;padding:0;border:1px solid #d3e3d6;border-radius:19px;background:#fff;color:#233d2d;box-shadow:0 18px 60px #0003}
.person-page .profile-side .profile-review-dialog::backdrop{background:rgba(7,26,17,.58)}
.person-page .profile-review-form{display:grid;gap:14px;padding:22px}
.person-page .profile-review-head{display:flex;align-items:start;justify-content:space-between;gap:12px}
.person-page .profile-review-head small{font-size:.71rem;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:#927545}
.person-page .profile-review-head h3{margin:3px 0 0;font-size:1.3rem;line-height:1.3}
.person-page .profile-review-close{display:grid;place-items:center;flex:none;width:32px;height:32px;border:1px solid #dce6dd;border-radius:9px;background:#f7faf7;color:#294735;cursor:pointer;font-size:1.4rem}
.person-page .profile-review-form>label{display:grid;gap:7px;font-size:.83rem;font-weight:700}
.person-page .profile-review-form>label>input{width:100%;min-width:0;box-sizing:border-box;padding:11px 12px;border:1px solid #cbdcd0;border-radius:10px;background:white;color:#203a2a;font:inherit;font-weight:400}
.person-page .profile-review-form>label>input:focus-visible{outline:2px solid #498465;outline-offset:1px}
.person-page .profile-review-explainer{margin:0;font-size:.89rem;line-height:1.55;color:#566e5f}
.person-page .profile-review-form>.small-note{margin:0;line-height:1.5}
.person-page .profile-review-actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap;padding-top:10px;border-top:1px solid #e3ebe5}
.person-page .profile-review-actions [data-clear]{margin-right:auto}
@media(max-width:460px){.person-page .profile-review-form{padding:17px}.person-page .profile-review-actions>.btn{flex:1 1 auto}}
.person-page .profile-review-actions [hidden]{display:none!important}
