:root{--corner-radius:9px;--paper:#f8f7f2;--forest:#4b5b2b;--muted:#60694f;--accent:#ad744d;--canvas:#f0f1e9;--line:#d9dfd3;--shadow:0 6px 28px #4b5b2b10;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Tahoma,Arial,sans-serif;color:var(--forest);background:var(--canvas);font-size:14px}*{box-sizing:border-box}body{margin:0;overflow:hidden}button,input,select{font:inherit;color:inherit}button,a,select,input{touch-action:manipulation}button{cursor:pointer;border:0;background:none}button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible{outline:2px solid var(--accent);outline-offset:3px}button:hover{background:#e7ebe0}button:disabled{opacity:.6;cursor:wait}button,select{border-radius:var(--corner-radius)}button{min-height:40px}input{min-width:0}button svg{pointer-events:none}[hidden]{display:none!important}#workspace,#map{position:absolute;inset:0;width:100%;height:100dvh}#map{background:radial-gradient(ellipse at 45% 38%,#f7f7f0 0%,#f0f1e9 74%);touch-action:none}.toolbar{position:absolute;inset-block-start:20px;inset-inline:24px;display:flex;align-items:center;gap:12px;background:#f8f7f2f5;border:1px solid #fff9;box-shadow:var(--shadow);padding:9px 12px;border-radius:var(--corner-radius);max-width:1050px;margin-inline:auto}.brand{display:flex;gap:10px;align-items:center;font:28px Georgia,"Times New Roman",serif;padding:0 10px 0 0;flex-shrink:0}.brand svg{width:34px;height:34px;fill:var(--paper);stroke:var(--forest);stroke-width:1.5}.search-wrap{position:relative;flex:1;min-width:120px}.search-icon{position:absolute;inset-inline-start:12px;top:1px;font-size:27px;color:var(--muted)}#search{width:100%;height:42px;padding:0 32px 0 38px;border:1px solid var(--line);border-radius:var(--corner-radius);background:#eceee580}html[dir=rtl] #search{padding:0 38px 0 32px}#families{max-width:180px;width:160px;padding:10px;border:0;background:transparent}.language{white-space:nowrap;padding:0 12px}.icon{width:40px;flex-shrink:0;font-size:20px}.layout-bar{position:absolute;top:100px;inset-inline-start:24px;display:flex;padding:5px;gap:3px;border-radius:var(--corner-radius);background:#f8f7f2ee;box-shadow:var(--shadow);border:1px solid #fff8}.layout-bar button{padding:0 15px;color:var(--muted);min-height:37px}.layout-bar button[aria-pressed=true]{color:var(--paper);background:var(--forest)}.layout-bar button span:first-child{margin-inline-end:5px;font-size:17px}.map-caption{position:absolute;top:116px;inset-inline-end:28px;display:flex;align-items:center;gap:8px;font-size:12px;color:var(--muted);pointer-events:none}.dot{width:6px;height:6px;border-radius:100%;background:#729378}.zoom-controls{position:absolute;bottom:30px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:3px;background:var(--paper);border:1px solid #dce2d4;box-shadow:var(--shadow);padding:5px;border-radius:var(--corner-radius);direction:ltr}.zoom-controls button{min-width:40px;font-size:23px}.zoom-controls #home{font-size:13px;padding:0 14px}.separator{height:22px;width:1px;background:var(--line);margin:0 5px}#zoom-value{font-size:11px;min-width:40px;text-align:center;font-variant-numeric:tabular-nums}#mini-wrap{position:absolute;bottom:25px;inset-inline-start:24px;width:190px;height:135px;background:#f8f7f2df;border:1px solid #d9dfd3;border-radius:var(--corner-radius);overflow:hidden;padding:7px;box-shadow:var(--shadow)}#minimap{width:100%;height:100px;display:block}#mini-wrap span{display:block;font-size:10px;color:var(--muted);margin-top:3px}#hint{position:absolute;bottom:8px;inset-inline-end:24px;margin:0;font-size:11px;color:var(--muted);pointer-events:none}.popover{position:absolute;top:50px;inset-inline:0;min-width:280px;max-height:min(60vh,460px);overflow:auto;border-radius:var(--corner-radius);background:var(--paper);border:1px solid var(--line);box-shadow:0 16px 40px #4b5b2b24;z-index:10}.result{width:100%;text-align:start;padding:11px 16px;display:block;border-bottom:1px solid #dde3d455;border-radius:0}.result strong{display:block;font-size:15px}.result small{display:block;color:var(--muted);margin-top:4px}.empty{padding:20px;color:var(--muted)}.card{position:absolute;top:165px;inset-inline-end:24px;width:330px;max-height:calc(100dvh - 235px);overflow:auto;border:1px solid #ffffffb8;border-radius:var(--corner-radius);padding:24px;background:#f8f7f2f7;box-shadow:0 12px 50px #4b5b2b20;z-index:5}.eyebrow{font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:var(--muted);display:block;margin-bottom:12px}.card h1{font:32px/1.2 Georgia,"Times New Roman",serif;margin:10px 30px 5px 0;overflow-wrap:anywhere}html[dir=rtl] .card h1{margin:10px 0 5px 30px;font-family:"Noto Sans Arabic",Tahoma,Arial,sans-serif;font-size:29px}.alternate{font-size:17px;color:var(--muted);margin:7px 0}.spelling-note{font-size:10px;color:#8a765d;line-height:1.5;margin:6px 0 18px}.relations{margin-top:22px}.relation-group{margin-top:18px}.relation-group h2{font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);font-weight:500;margin:0 0 8px}.relative{display:inline-flex;gap:8px;align-items:center;background:#e7ebe050;border:1px solid #d9dfd3;border-radius:var(--corner-radius);padding:6px 10px;min-height:34px;margin-inline-end:5px;margin-bottom:6px;font-size:13px}.relative:hover{border-color:#8b9a88}.card-footer{border-top:1px solid var(--line);margin-top:18px;padding-top:12px}.text-button{font-size:12px;color:var(--muted);padding:0 4px}.card label{display:block;font-size:12px;margin:18px 0 8px}.card input{display:block;width:100%;padding:10px;border:1px solid var(--line);border-radius:var(--corner-radius);background:#fffdf8}.help{font-size:12px;color:var(--muted);line-height:1.6}.form-actions{display:flex;gap:9px;margin-top:22px}.primary{background:var(--forest);color:var(--paper);padding:11px 17px;border-radius:var(--corner-radius);display:inline-block;text-decoration:none;text-align:center}.primary:hover{background:#3f4e24}.error{font-size:12px;color:#975335;line-height:1.5}.card .root{font-size:12px;color:var(--muted)}#loading{position:absolute;inset:45% 20% auto;text-align:center;color:var(--muted);padding:20px;background:#f8f7f2e8;border-radius:var(--corner-radius);pointer-events:none}#toast{position:absolute;bottom:96px;left:50%;transform:translateX(-50%);background:var(--forest);color:var(--paper);border-radius:var(--corner-radius);padding:12px 20px;z-index:20;white-space:nowrap}dialog{border:1px solid var(--line);border-radius:var(--corner-radius);padding:36px;max-width:490px;width:calc(100% - 32px);color:var(--forest);background:var(--paper);box-shadow:0 20px 80px #4b5b2b44}dialog::backdrop{background:#4b5b2b55;backdrop-filter:blur(3px)}dialog h1{font:42px Georgia,serif;margin:8px 0 20px}dialog p{font-size:13px;line-height:1.7;color:var(--muted)}dialog .lead{font-size:17px;color:var(--forest)}dialog .credits{border-top:1px solid var(--line);padding-top:20px;margin-top:22px;font-size:12px}.download{margin-top:12px;font-size:13px}html[dir=rtl] .eyebrow,html[dir=rtl] .relation-group h2{letter-spacing:0}html[dir=rtl] .brand,html[dir=rtl] dialog h1{font-family:"Noto Sans Arabic",Tahoma,Arial,sans-serif}
@media(max-width:700px){.toolbar{inset-inline:10px;top:10px;gap:4px;padding:7px;border-radius:var(--corner-radius);flex-wrap:wrap}.brand{font-size:22px;gap:5px;padding:0 6px}.brand svg{width:27px;height:27px}.search-wrap{order:5;flex-basis:100%;margin-top:3px}#search{height:39px}#families{margin-inline-start:auto;width:118px;max-width:118px;font-size:12px;padding:8px 2px}.language{font-size:12px;padding:0 8px}.toolbar .icon{width:32px}.layout-bar{top:128px;inset-inline-start:10px;gap:0;padding:4px}.layout-bar button{font-size:12px;padding:0 10px;min-height:34px}.layout-bar button span:first-child{display:none}.map-caption{top:177px;inset-inline-start:16px;inset-inline-end:auto;font-size:10px}.card{top:auto;bottom:87px;inset-inline:10px;width:auto;max-height:47dvh;padding:20px;border-radius:var(--corner-radius)}.card h1{font-size:27px}.card .relations{margin-top:14px}.relation-group{margin-top:12px}.card .spelling-note{margin-bottom:12px}.zoom-controls{bottom:max(26px,env(safe-area-inset-bottom));padding:4px}.zoom-controls button{min-width:36px}.zoom-controls #home{padding:0 10px}#mini-wrap{bottom:92px;inset-inline-start:10px;width:110px;height:82px;padding:4px}#minimap{height:57px}#mini-wrap span{font-size:8px}body.has-card #mini-wrap{display:none}#hint{display:none}.popover{max-height:50dvh;min-width:0}.card input{font-size:16px}dialog{padding:27px;max-height:85dvh}#toast{bottom:92px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
.bilingual-names{margin-top:15px;border-block:1px solid var(--line);padding:10px 0}.name-row{display:flex;justify-content:space-between;align-items:baseline;gap:12px;padding:5px 0}.name-row small{font-size:10px;color:var(--muted)}.name-row span{font-size:18px;overflow-wrap:anywhere}.facts{display:grid;grid-template-columns:auto 1fr;gap:8px 18px;font-size:12px;margin:18px 0}.facts dt{color:var(--muted)}.facts dd{margin:0;text-align:end}.card.editing{top:100px;max-height:calc(100dvh - 125px);width:370px}.card.editing h1{font-size:26px}.card select{width:100%;padding:10px;border:1px solid var(--line);background:#fffdf8}.card input[type=checkbox]{width:22px;height:22px;accent-color:var(--forest)}.card .form-actions{position:sticky;bottom:-24px;padding:12px 0;background:var(--paper);margin-bottom:-12px}.suggestion-button{font-size:12px;color:var(--accent);text-align:start}.conflict-row{padding:8px;border:1px solid var(--accent);border-radius:var(--corner-radius);margin-bottom:8px}.conflict-row button{font-size:12px;text-decoration:underline}.relative-results{max-height:200px;overflow:auto}.card-footer{display:flex;justify-content:space-between}.card .error:empty{display:none}
@media(max-width:700px){.card.editing{top:auto;bottom:10px;max-height:84dvh;width:auto;z-index:12}.card.editing select{font-size:16px}.card .form-actions{bottom:-20px}.toolbar .brand{font-size:20px;padding:0 3px}.toolbar .language{padding:0 4px}#families{width:100px;max-width:100px}.name-row span{font-size:17px}}

.layout-bar{max-width:calc(100vw - 30px);overflow-x:auto;white-space:nowrap}.card-views{display:flex;gap:14px;margin:16px 0}.map-caption{max-width:calc(100vw - 40px)}#timeline-axis{position:absolute;bottom:85px;left:0;right:0;height:22px;border-top:1px solid #b4bbaa;pointer-events:none;color:var(--muted);font-size:11px;background:#f0f1e9cc}#timeline-axis span{position:absolute;transform:translateX(-50%);padding-top:5px}#timeline-note{position:absolute;top:139px;inset-inline:26px;font-size:11px;color:var(--muted);max-width:570px;pointer-events:none}@media(max-width:700px){.layout-bar{width:calc(100vw - 20px);}.layout-bar button{flex-shrink:0;padding:0 9px}#timeline-note{top:191px;inset-inline:16px;font-size:10px;max-width:calc(100vw - 32px)}#timeline-axis{bottom:78px}.map-caption{font-size:10px}}

@media(max-width:700px){body.scope-view #mini-wrap{display:none}}

/* Context belongs to a person, while layout controls belong to the whole tree. */
body.scope-view .layout-bar{display:none}
#person-view{position:absolute;top:100px;inset-inline-start:24px;display:flex;align-items:center;gap:12px;max-width:calc(100vw - 48px);padding:5px 12px 5px 5px;border:1px solid #b5c2b4;border-radius:var(--corner-radius);background:var(--paper);box-shadow:var(--shadow)}

#view-person{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#view-kind{font-size:12px;color:var(--muted);padding-inline-start:12px;border-inline-start:1px solid #b5c2b4}
.card-views{gap:8px}.card-views button{flex:1;border:1px solid #829888;color:var(--forest);background:#e6ecdf;font-weight:600;font-size:13px;padding:9px}
.card-views button:hover{background:#d7e2ce}
#timeline-note{color:#354b40;background:var(--paper);padding:6px 9px;border-radius:var(--corner-radius);font-size:12px;line-height:1.4}
.spelling-note{color:#68513b}.suggestion-button{color:#795033}.map-caption{color:#42594b}
@media(max-width:700px){.layout-bar{width:auto}#person-view{top:128px;inset-inline-start:10px;max-width:calc(100vw - 20px);gap:9px;padding:4px 9px 4px 4px;font-size:12px}#view-kind{font-size:11px;padding-inline-start:9px}#timeline-note{top:191px;font-size:11px}.map-caption{font-size:11px}}


#about{width:40px;height:40px;min-height:40px;padding:8px;display:grid;place-items:center}#about .info-dot{fill:currentColor;stroke:none}#about-dialog{max-width:610px;max-height:88dvh;overflow:hidden}#about-dialog h1{margin-bottom:12px}#about-dialog .lead{margin-top:0}.history-timeline{list-style:none;padding:0;margin:24px 0}.history-timeline li{position:relative;border-inline-start:2px solid #c1cfb7;padding:0 0 22px 20px;margin-inline-start:5px}.history-timeline li::before{content:'';position:absolute;inset-inline-start:-5px;top:3px;width:8px;height:8px;background:var(--accent);border-radius:50%}.history-timeline li:last-child{padding-bottom:0}.history-date{font-size:11px;font-weight:600;color:#765035}.history-timeline h2{font-size:17px;margin:7px 0}.history-timeline p{margin:0}.managed-credit{padding:15px 0;border-block:1px solid var(--line);color:var(--forest)!important}.managed-credit a{color:var(--forest);font-weight:700;text-underline-offset:3px}.owner-context{display:block;font-size:11px;color:var(--muted)}.about-policy{border-bottom:1px solid var(--line);padding:14px 0}.about-policy summary{cursor:pointer;font-weight:600;min-height:24px}.about-policy li{font-size:13px;line-height:1.7;margin-bottom:10px}.about-policy ol{padding-inline-start:20px}.preview-notice{background:#eee7da;padding:12px;border-radius:var(--corner-radius);color:#594630}.policy-date{font-size:11px!important}.about-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:12px}html[dir=rtl] .history-timeline li{padding:0 20px 22px 0}html[dir=rtl] .history-timeline li:last-child{padding-bottom:0}

/* Family collaboration stays in one dialog, leaving the map as the centerpiece. */
.community-dialog{width:min(720px,calc(100vw - 24px));max-height:90dvh;padding:24px;border:1px solid #c7cdc1;border-radius:var(--corner-radius);background:#f8f8f1;color:var(--forest);box-sizing:border-box;overflow:auto}
.community-dialog::backdrop{background:rgba(21,44,35,.42)}
.space-heading{display:flex;align-items:center;gap:12px;position:sticky;top:-24px;background:#f8f8f1;padding:12px 0;z-index:2}
.space-heading h1{font-size:28px;margin:0;flex:1}.space-heading button{font-size:14px;padding:8px}
.space-tabs{display:flex;gap:6px;flex-wrap:wrap;margin:12px 0 22px}.space-tabs button{border-radius:var(--corner-radius);padding:9px 12px;background:#e9ede3;color:#29463a}.space-tabs [aria-pressed=true]{background:var(--forest);color:white}
.space-content p{line-height:1.6}.space-field{display:block;font-size:15px;margin:16px 0}.space-field input,.community-dialog textarea{display:block;width:100%;box-sizing:border-box;margin-top:7px;padding:12px;background:#fffef8;color:var(--forest);border:1px solid #9daea0;border-radius:var(--corner-radius);font:inherit}
.community-dialog textarea{min-height:85px}.space-check{display:flex;align-items:flex-start;gap:10px;margin:18px 0;line-height:1.5}.space-check input{width:20px;height:20px;flex-shrink:0;accent-color:var(--forest)}
.community-dialog .primary{background:var(--forest);color:#fff;border-radius:var(--corner-radius);padding:12px 18px;margin:8px 4px;min-height:44px}.community-dialog .text-button{padding:10px;min-height:44px;color:#244d3b}.community-dialog .error{background:#fff0e9;padding:12px;border-radius:var(--corner-radius);color:#8a3020}
.request-item{padding:16px 0;border-bottom:1px solid #cdd4c8}.request-item>summary{cursor:pointer;line-height:1.5}.request-item>summary strong{font-size:18px}.request-item>summary span,.request-item>summary small{display:block;margin-top:5px}.request-item h3{font-size:18px;margin-top:20px}.status-label{color:#52654b;font-size:14px}
.change-diff{margin:12px 0}.change-diff dt{font-weight:600;margin:12px 0 4px}.change-diff dd{margin:0;padding:9px 12px;background:#eef0e7;border-radius:var(--corner-radius);overflow-wrap:anywhere}.before-value,.after-value{display:block;line-height:1.65}.before-value{color:#616d5c}.after-value{color:#1b4230}.connection-diff{margin:10px 0;line-height:1.8}.connection-diff button{font-size:14px;padding:4px 8px!important}
.review-note{border-inline-start:3px solid #a67f53;padding-inline-start:14px}.undo-control,.membership-confirm{margin:16px 0}.undo-control summary,.membership-confirm summary{cursor:pointer;text-decoration:underline}.invite-row{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin:14px 0;padding:12px;background:#eff1e8;border-radius:var(--corner-radius)}
.contributor{border-bottom:1px solid #ccd3c7;padding:12px 0}.contributor h2{font-size:21px}.contributor-stats{display:grid;grid-template-columns:1fr auto;gap:8px}.contributor-stats dd{font-weight:bold;margin:0}.gate-terms{font-size:14px}.space-content .help{color:#58664f}
@media(max-width:600px){.community-dialog{padding:18px;max-height:94dvh;border-radius:var(--corner-radius)}.space-heading{top:-18px;flex-wrap:wrap}.space-heading h1{font-size:25px}.space-tabs{gap:3px}.space-tabs button{font-size:14px;padding:9px}.card-footer{flex-wrap:wrap}.about-actions{flex-wrap:wrap}}
.community-dialog .space-tabs [aria-pressed=true]{color:#fff}

/* Shared Birzeit identity; the olive tree remains vector at every size. */
.brand img{width:46px;height:46px;object-fit:contain;flex:none}.brand .wordmark{display:flex;flex-direction:column;text-align:start;gap:2px}.brand .wordmark small{font:11px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:1.1px;text-transform:uppercase;color:#53684c}.signin-logo{display:block;margin:0 auto 8px}html[lang=ar],:lang(ar){font-family:"Noto Sans Arabic",Tahoma,Arial,sans-serif}html[lang=ar] .brand,html[lang=ar] h1,html[lang=ar] h2,html[lang=ar] h3,html[lang=ar] .brand .wordmark small{font-family:"Noto Sans Arabic",Tahoma,Arial,sans-serif}.bilingual-names [lang=ar],.name-row [lang=ar]{font-family:"Noto Sans Arabic",Tahoma,Arial,sans-serif}.community-dialog[lang=ar]{font-family:"Noto Sans Arabic",Tahoma,Arial,sans-serif}.community-dialog[lang=ar] h1{font-family:inherit;font-weight:500;line-height:1.6}.community-dialog .space-field select{display:block;width:100%;padding:12px;margin-top:7px;background:#fffef8;border:1px solid #9daea0;border-radius:var(--corner-radius);font:inherit}html[lang=ar] .brand .wordmark small{letter-spacing:0;font-size:12px}@media(max-width:700px){.brand img{width:38px;height:38px}.brand .wordmark small{font-size:9px}.brand{gap:5px}.signin-logo{width:64px;height:64px}.community-dialog .space-heading h1{font-size:24px}}
.brand .wordmark{line-height:1.15}.brand .wordmark small{line-height:1.3}.toolbar .brand{min-height:46px}html[lang=ar] .brand .wordmark{font-size:24px;line-height:1.35}html[lang=ar] .brand .wordmark small{line-height:1.4}
/* Shared policy: one language, concise essentials and one full-text disclosure. */
.policy-document{direction:ltr;text-align:left;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif}.policy-section{border-top:1px solid var(--line);padding:12px 0}.policy-section h3{font:600 16px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif!important;margin:0 0 6px}.policy-section p{font-size:14px;line-height:1.7;margin:0}.policy-full{margin-top:8px;border-top:1px solid var(--line);padding-top:12px}.policy-full>summary{cursor:pointer;min-height:44px;font-weight:600;text-decoration:underline;text-underline-offset:3px}.policy-full .policy-section p+p{margin-top:12px}.policy-page{overflow:auto}.policy-page main{max-width:740px;margin:40px auto;padding:0 24px 48px}.policy-page h1{font:34px Georgia,serif}.policy-language{float:inline-end}.terms-consent{border:1px solid var(--line);border-radius:var(--corner-radius);padding:12px;margin-top:16px}

/* One primary olive green across app controls, identity and email. */
.community-dialog{color:var(--forest)}.community-dialog .primary,.space-tabs [aria-pressed=true]{background:var(--forest)}.space-tabs button,.community-dialog .text-button{color:var(--forest)}
.auth-modes{display:flex;gap:6px;padding:4px;background:#e7ebe0;border-radius:var(--corner-radius);margin:8px 0 18px}.auth-modes button{flex:1;min-height:46px;font-size:16px;color:var(--forest);border-radius:var(--corner-radius)}.auth-modes [aria-pressed=true]{background:var(--forest);color:white}.sent-address{display:block;overflow-wrap:anywhere;font-size:17px}.next-step{font-size:17px!important;color:var(--forest)!important}.profile-hint{position:absolute;bottom:90px;left:50%;transform:translateX(-50%);display:flex;gap:8px;background:var(--paper);border:1px solid var(--line);border-radius:var(--corner-radius);padding:5px;z-index:4;max-width:calc(100vw - 24px);box-shadow:var(--shadow)}.profile-hint button{font-size:13px;padding:8px 12px}.profile-hint button:first-child{white-space:nowrap}.profile-hint button:last-child{min-width:34px}body.has-card .profile-hint{display:none}
#toast{white-space:normal;max-width:calc(100vw - 24px);width:max-content;text-align:center}

@media(max-width:600px){.community-dialog.joining .signin-logo{width:46px;height:46px;margin-bottom:0}.community-dialog.joining .space-heading h1{font-size:22px}.community-dialog.joining .space-heading{padding:8px 0}.joining .auth-modes{margin-bottom:12px}.joining .space-field{margin:10px 0;font-size:14px}.joining .space-field input{padding:9px;margin-top:4px;font-size:16px}.joining .space-check{margin:12px 0;font-size:13px}.joining .about-policy{padding:9px 0}.joining form>.primary{position:sticky;bottom:0;width:100%;margin-inline:0;box-shadow:0 5px 0 6px #f8f8f1}.joining .space-content>p{margin:10px 0}}

.map-key{position:absolute;z-index:5;inset-inline-end:24px;bottom:24px;max-width:260px;background:#f8f7f2f5;border:1px solid #b4c0af;border-radius:var(--corner-radius);padding:12px 16px;color:#4b5b2b;font-size:13px;box-shadow:0 8px 24px #4b5b2b10}.map-key summary{cursor:pointer;font-weight:600}.map-key label{display:flex;gap:8px;align-items:center;margin-top:14px}.map-key input{width:18px;height:18px;accent-color:#4b5b2b}.map-key p{margin:10px 0 0}.key-male{color:#62743c}.key-female{color:#ad744d}.has-card .map-key{display:none}@media(max-width:700px){.map-key{bottom:92px;inset-inline-end:12px;padding:8px 12px;max-width:230px}.scope-view .map-key{bottom:92px}}

#loading{inset:50% auto auto 50%;transform:translate(-50%,-50%);width:min(320px,calc(100% - 40px));padding:26px 22px;display:flex;flex-direction:column;align-items:center;gap:14px;color:var(--forest);background:var(--paper);border:1px solid var(--line);box-shadow:var(--shadow);z-index:10;pointer-events:auto}#loading strong{font-size:15px;font-weight:500}#loading-note{font-size:12px;color:var(--muted)}#loading-note:empty{display:none}.loading-spinner{width:30px;height:30px;border:3px solid var(--line);border-top-color:var(--forest);border-radius:50%;animation:loading-turn .9s linear infinite}#loading[data-error="true"] .loading-spinner{display:none}@keyframes loading-turn{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.loading-spinner{animation:none;border-style:dotted}}

/* Keep controls in document flow: translated text and phone wrapping change height. */
.map-header{position:absolute;top:max(20px,env(safe-area-inset-top));inset-inline:24px;display:flex;flex-direction:column;gap:12px;pointer-events:none;z-index:6}
.map-header .toolbar{position:relative;inset:auto;width:100%;pointer-events:auto;z-index:2}
.map-navigation{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.map-header .layout-bar,.map-header #person-view{position:relative;inset:auto;margin:0;max-width:100%;pointer-events:auto}
.map-header .map-caption{position:static;margin-inline-start:auto;max-width:100%}
.map-header #timeline-note{position:static;margin:0;align-self:flex-start;max-width:min(570px,100%)}
.zoom-controls #home{white-space:nowrap}
@media(max-width:700px){
 .map-header{top:max(10px,env(safe-area-inset-top));inset-inline:10px;gap:10px}
 .map-header .toolbar{display:grid;grid-template-columns:minmax(0,1fr) 64px 32px 44px 38px;grid-template-areas:"brand brand language language about" "search search search families families";gap:6px 4px}
 .toolbar .brand{grid-area:brand;min-width:0;justify-self:start}
 .toolbar .search-wrap{grid-area:search;min-width:0;margin:0}
 .toolbar #search{font-size:16px;height:40px}
 .toolbar #families{grid-area:families;min-width:0;width:100%;max-width:none;margin:0;height:40px}
 .toolbar #language{grid-area:language}.toolbar #about{grid-area:about}
 .map-navigation{gap:7px}.map-header .map-caption{flex-basis:100%;margin:0;padding-inline:6px}
 .map-header #timeline-note{font-size:11px}
 .zoom-controls{max-width:calc(100vw - 20px)}

}

/* Readable community controls; keep mobile rows in normal flow. */
:root{font-size:16px}
body{line-height:1.55}
button,input,select,textarea{font-size:1rem}
button,.text-button{min-height:44px}
.help,.space-content .help,.history-timeline p,.community-rights{font-size:1rem;line-height:1.65}
.space-field,.edit-form label,.person-facts{font-size:1rem}
.layout-bar button{min-height:44px;font-size:15px}
.spouse-toggle{display:flex;align-items:center;gap:8px;min-height:44px;padding:6px 12px;background:var(--paper,#f8f8f1);border-radius:var(--corner-radius);pointer-events:auto;font-size:15px}
.spouse-toggle input{width:20px;height:20px;accent-color:var(--ink)}
.map-key{display:flex;align-items:center;gap:12px;padding:6px 12px;font-size:15px;line-height:1.5}
.map-key>span{white-space:nowrap}.map-key .key-help{font-size:20px;padding:0 6px;min-width:36px}
#key-explanation{position:absolute;bottom:100%;inset-inline-end:0;width:min(280px,80vw);padding:16px;background:#fafaf4;border:1px solid #a5ad99;border-radius:var(--corner-radius);font-size:16px;box-shadow:0 5px 20px #0002}
.community-guide h2{font-size:1.25rem;margin-top:24px}.community-guide p{font-size:1rem;line-height:1.65}
.community-rights{border-top:1px solid #ccd2c4;padding-top:20px}.share-fallback{display:block;overflow-wrap:anywhere}
@media(max-width:700px){.layout-bar button{font-size:14px;padding:8px 10px}.map-navigation{gap:8px}.map-caption{font-size:13px}.spouse-toggle{font-size:14px}.map-key{bottom:94px;inset-inline-end:10px;gap:8px;font-size:14px}.map-key .key-help{min-width:30px}#mini-wrap{width:104px}.toolbar input,.toolbar select{font-size:16px}.space-tabs button{font-size:15px;min-height:44px}.card .help{font-size:16px}.card-footer{flex-wrap:wrap}}

.facts{font-size:16px}.card label,.history-date,.owner-context{font-size:14px}.map-key .key-help{touch-action:manipulation}.spouse-toggle input{accent-color:var(--forest)}
.card-footer button,.card-views button,.space-tabs button{font-size:16px;min-height:44px}.join-ancestry{margin:16px 0}.join-ancestry summary,.community-guide summary{cursor:pointer;min-height:44px;padding:8px 0;font-weight:600}

.share-button svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8}.share-button{min-width:40px}.advanced-backup,.profile-privacy{margin:24px 0;padding:16px;border:1px solid var(--line);border-radius:var(--corner-radius)}.advanced-backup summary,.profile-privacy summary{min-height:44px;cursor:pointer;font-weight:600}.space-tabs{gap:6px}.space-tabs button{padding:8px 12px;font-size:15px}.public-stewards{font-weight:600}
@media(max-width:700px){.map-header .toolbar{grid-template-columns:minmax(0,1fr) 32px 44px 36px 36px;grid-template-areas:"brand brand language share about" "search search search families families"}.toolbar #share-tree{grid-area:share;min-width:36px;padding:4px}.toolbar .wordmark{min-width:0}.toolbar .brand{font-size:20px}.toolbar #families{font-size:14px}.toolbar .brand img{width:30px;height:36px}.toolbar .wordmark small{font-size:8px}.space-tabs{display:flex;flex-wrap:wrap}.space-tabs button{font-size:14px}}

/* Keep mobile navigation to one row; the count uses the wordmark's second line. */
.mobile-label,.brand .wordmark .mobile-count{display:none}
@media(max-width:700px){
 .map-header{gap:6px}
 .map-header .toolbar{padding:5px 7px;row-gap:4px}
 .toolbar .brand{min-height:44px}
 .brand .wordmark .brand-subtitle,.layout-bar .desktop-label{display:none}
 .brand .wordmark .mobile-count{display:block;font-size:10px;letter-spacing:0;text-transform:none;white-space:nowrap}
 .layout-bar .mobile-label{display:inline}
 .map-navigation{flex-wrap:nowrap;gap:4px}
 .map-header .layout-bar{flex:1;min-width:0;padding:3px}
 .layout-bar button{flex:1 0 auto;min-width:0;min-height:44px;padding:5px 6px;white-space:nowrap}
 .spouse-toggle{flex:none;gap:4px;min-height:44px;padding:3px 5px;font-size:14px;white-space:nowrap}
 .spouse-toggle input{width:18px;height:18px;margin:0}
 .map-header .map-caption{display:none}
 .map-header #person-view{flex:1;min-width:0;flex-wrap:wrap;font-size:13px;padding:3px;gap:5px}
 #person-view button{font-size:13px;padding:5px 7px}
 .zoom-controls{bottom:max(12px,env(safe-area-inset-bottom))}
 #mini-wrap{bottom:74px;width:94px;height:70px}
 #minimap{height:46px}
 .map-key{bottom:74px;padding:3px 8px;gap:6px}
}
/* Public example uses fictional people only, never an anonymous archive view. */
.preview-page{height:auto;overflow:auto;background:var(--paper);color:var(--forest)}
.preview-header{max-width:1180px;margin:auto;padding:20px 28px;display:flex;align-items:center;justify-content:space-between;gap:12px}
.preview-brand{display:flex;align-items:center;gap:12px;text-decoration:none;color:inherit;font-size:20px}.preview-header>div{display:flex;align-items:center;gap:10px}.preview-header a.text-button{display:inline-flex;align-items:center}
.preview-main{max-width:1180px;margin:auto;padding:0 28px}.preview-intro{max-width:790px;margin:40px 0 34px}.preview-intro h1{font:clamp(34px,5vw,60px)/1.12 Georgia,serif;margin:16px 0}.preview-page .eyebrow{font-size:13px;letter-spacing:.06em}.preview-intro .lead{font-size:21px;line-height:1.6}.preview-actions,.share-actions{display:flex;align-items:center;gap:16px;flex-wrap:wrap}.preview-actions a{color:inherit}.preview-actions .primary{color:var(--paper)}
.preview-demo{border:1px solid var(--line);border-radius:var(--corner-radius);overflow:hidden;background:#f0f1e9}.preview-demo-heading{padding:20px 24px;display:flex;align-items:center;justify-content:space-between;gap:18px}.preview-demo-heading h2{margin:0;font-size:21px}.preview-demo-heading p{font-size:14px;margin:4px 0}.preview-layouts{display:flex;flex:none;background:var(--paper);border-radius:var(--corner-radius);padding:4px}.preview-layouts button{padding:6px 12px;font-size:14px}.preview-layouts button[aria-pressed=true]{background:var(--forest);color:var(--paper)}.preview-map-wrap{position:relative}#preview-map{height:470px;width:100%}.preview-map-controls{position:absolute;bottom:12px;inset-inline-end:12px;background:var(--paper);border:1px solid var(--line);border-radius:var(--corner-radius);display:flex}.preview-map-controls button{min-width:44px}.preview-hint{padding:0 24px 12px;font-size:14px}#preview-person{position:absolute;top:12px;inset-inline-start:16px;width:min(320px,calc(100% - 32px));padding:22px;border-radius:var(--corner-radius);box-shadow:var(--shadow);background:var(--paper);border:1px solid var(--line)}#preview-person h3{margin:8px 0}#preview-person p{font-size:16px;line-height:1.6}#preview-person small{font-size:13px;color:var(--muted)}
.preview-story{display:grid;grid-template-columns:1fr 1fr;gap:48px;margin:54px 0}.preview-story h2{font-size:28px;line-height:1.3}.preview-story p,.preview-story li{font-size:18px;line-height:1.7}.preview-benefits{padding:24px;background:#e9edde;border-radius:var(--corner-radius)}.preview-benefits h2{margin-top:0}.preview-benefits ul{padding-inline-start:22px}.preview-benefits li{margin-bottom:12px}.preview-footer{max-width:1180px;margin:auto;padding:24px 28px;display:flex;gap:22px;flex-wrap:wrap;border-top:1px solid var(--line);font-size:14px}.preview-page a{color:inherit}.preview-page a.primary{color:var(--paper)}html[lang=ar] .preview-intro h1{font-family:'Noto Sans Arabic',sans-serif;line-height:1.5;font-size:clamp(30px,4vw,46px)}
.share-dialog{max-width:660px;max-height:90dvh;overflow:auto}.share-dialog h1{font-size:30px;margin-inline-end:20px}.share-dialog p{font-size:16px}.share-image{display:block;width:100%;height:auto;border:1px solid var(--line);border-radius:var(--corner-radius)}.share-actions{gap:8px}.share-actions a,.share-actions button{font-size:16px;padding:10px;min-height:44px}.community-call{padding:18px;background:#e9edde;border-radius:var(--corner-radius)}.community-call h2{margin:0;font-size:22px}.community-call p{font-size:17px;line-height:1.7}.community-call .free-note{font-weight:600}
@media(max-width:700px){.preview-header{padding:12px 16px}.preview-brand{font-size:15px;gap:6px}.preview-brand img{width:30px;height:30px}.preview-header>div{gap:4px}.preview-header button,.preview-header .text-button{font-size:14px;padding:5px}.preview-main{padding:0 16px}.preview-intro{margin:26px 0}.preview-intro .lead{font-size:18px}.preview-actions{gap:14px}.preview-demo-heading{display:block;padding:16px}.preview-layouts{margin-top:12px;width:max-content}.preview-layouts button{padding:6px 10px}#preview-map{height:380px}.preview-story{grid-template-columns:1fr;gap:16px;margin:30px 0}.preview-story h2{font-size:25px}.preview-benefits{padding:20px}.share-dialog{padding:24px}.share-dialog h1{font-size:25px}}

.sample-relatives{margin:8px 0}.sample-relatives strong{display:block;font-size:13px;color:var(--muted)}.sample-relatives button{font-size:15px;min-height:40px;background:#e9edde;margin:4px;padding:6px 10px}#preview-person{max-height:calc(100% - 24px);overflow:auto}.preview-hint button{padding:6px 12px;background:var(--paper);border:1px solid var(--line)}

/* One small dock on phones; retain the full overview on desktop. */
.map-bottom{display:contents}
.mobile-key-labels{display:none}
.brand-mark{display:flex;flex-direction:column;align-items:center;flex:none;gap:1px}
.beta-badge{display:inline-block;background:#e6ebda;color:var(--forest);border:1px solid #bbc6a5;border-radius:var(--corner-radius);padding:1px 4px;font:10px/1.2 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:.02em;white-space:nowrap}
.feedback-note{margin:20px 0;padding:16px;border:1px solid var(--line);border-radius:var(--corner-radius)}
.feedback-note h2{font-size:20px;margin:0 0 8px}.feedback-note p{font-size:16px;margin:0 0 8px;line-height:1.65}.feedback-note a{display:inline-flex;align-items:center;min-height:44px;color:var(--forest);font-size:16px}
@media(max-width:700px){
 #mini-wrap{display:none}
 .toolbar .brand-mark img{height:27px;width:30px}
 .toolbar .beta-badge{font-size:9px;padding:0 3px;line-height:1.3}
 .map-bottom{display:flex;flex-flow:row nowrap;align-items:center;position:absolute;z-index:5;bottom:max(12px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);max-width:calc(100vw - 20px);padding:3px;background:var(--paper);border:1px solid var(--line);border-radius:var(--corner-radius);box-shadow:var(--shadow)}
 .map-bottom .map-key{position:relative;inset:auto;bottom:auto;max-width:none;padding:0;gap:0;border:0;border-radius:0;box-shadow:none;background:none;font-size:14px;min-height:36px}
 .map-bottom .map-key>span,.map-bottom .desktop-key-help{display:none}
 .map-bottom .key-help{min-height:44px;min-width:0;padding:0 1px}
 .map-bottom .mobile-key-labels{display:flex;gap:3px;align-items:center;font-size:13px;white-space:nowrap}
 .map-bottom .zoom-controls{flex-wrap:nowrap;position:static;transform:none;max-width:none;padding:0;box-shadow:none;background:none;border:0;border-radius:0;gap:2px}
 .map-bottom .zoom-controls button{min-height:44px;min-width:44px;padding:0}
 .map-bottom .zoom-controls #home{padding:0;font-size:0}
 .map-bottom .zoom-controls #home::before{content:"⌂";font-size:25px}
 .map-bottom #zoom-value,.map-bottom .separator{display:none}
 .map-bottom .separator{margin:0 2px}
 .map-bottom #key-explanation{inset-inline-start:0;inset-inline-end:auto}
}

.share-layout{display:flex;align-items:center;gap:12px;margin:12px 0}.share-layout select{flex:1;min-width:0;min-height:44px;padding:8px;border:1px solid var(--line);background:var(--paper)}.share-note{display:block;width:100%;box-sizing:border-box;margin:8px 0;font:inherit;padding:12px;border:1px solid var(--line);border-radius:var(--corner-radius)}.social-share{border:1px solid var(--forest);border-radius:var(--corner-radius);font-weight:600}.share-dialog{max-width:860px}

/* Public exploration stays on the same map; no full-screen gate. */
#public-access{position:fixed;z-index:15;bottom:90px;left:50%;transform:translateX(-50%);max-width:calc(100vw - 24px);width:max-content;display:flex;align-items:center;gap:12px;background:#fafaf5;border:1px solid #bdc5b1;border-radius:var(--corner-radius);padding:8px 14px;box-shadow:0 4px 18px #4b5b2b15;font-size:14px}
#public-access[hidden]{display:none}#public-access button{padding:8px 12px;white-space:nowrap;min-height:40px}
@media(max-width:700px){#public-access{bottom:76px;gap:6px;padding:6px 8px;font-size:12px}#public-access-text{max-width:135px;line-height:1.35}#public-access button{padding:6px 9px}.has-card #public-access{display:none}}
.share-actions.social-icons{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-block:18px}.social-icon{width:48px;height:48px;min-height:48px;display:inline-flex;align-items:center;justify-content:center;border:1px solid #b5bea5;border-radius:var(--corner-radius);background:transparent;color:#4b5b2b;padding:12px;cursor:pointer}.social-icon:hover{background:#e3e8d9}.social-icon svg{width:24px;height:24px;fill:currentColor}.social-icon:disabled{opacity:.45;cursor:wait}.share-note-details{margin-block:16px}.share-note-details summary{cursor:pointer}.share-disclosure{font-size:14px;line-height:1.5}.share-image{max-height:55vh;object-fit:contain;background:#f0f1e9}

@media(max-width:700px){.share-actions.social-icons{gap:6px}.share-actions .social-icon{width:44px;height:44px;min-height:44px;padding:10px}.share-dialog{padding:18px}.share-dialog .share-disclosure{font-size:14px}}

/* One shared desktop baseline; the mobile dock remains one row. */
#hint{display:none}
@media(min-width:701px){.zoom-controls,#mini-wrap,.map-key{bottom:24px}}
.steward-profile{display:block;margin-block:12px}.steward-profile a{font-weight:600;color:var(--forest);text-underline-offset:3px}.steward-lineage{display:block;margin-top:4px;line-height:1.6;color:var(--muted);font-size:14px}.history-timeline a{display:inline-block;margin-top:10px;color:var(--forest);line-height:1.6}

/* Joining is a focused form, with optional recognition and contact preferences. */
.auth-dialog{position:fixed;padding-top:42px}
.auth-dialog .space-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.auth-dialog .space-heading h1{flex:1;min-width:0}
.auth-dialog .space-heading button{flex:none;margin-inline-start:auto}
.join-ancestry{background:#e9eddf;border:1px solid #c9d1b9;border-radius:var(--corner-radius);padding:18px;margin:24px 0}
.join-ancestry h2{font-size:19px;line-height:1.5;margin:0 0 14px}
.join-ancestry .space-field:last-child{margin-bottom:0}
.contact-help{margin-top:0}.contact-preference{border-top:1px solid var(--line);margin-top:24px;padding-top:12px}
.contact-person{padding:16px 0;border-bottom:1px solid var(--line);overflow-wrap:anywhere}
.contact-person h2{font-size:20px;margin:0 0 8px}.contact-person a{color:var(--forest);display:inline-block;min-height:44px;line-height:44px}.contact-person button{display:block}
.join-card h1{font-size:clamp(25px,4vw,34px);line-height:1.25;margin-top:18px;padding-inline-end:16px}
.join-card p{font-size:17px;line-height:1.65}.join-card>.text-button{display:block;margin-top:10px}
#public-access{background:#f0e4bf;border-color:#b5a16a;box-shadow:0 4px 20px #66551c25;color:#3f4d23}
#public-access-text{font-weight:600}
@media(max-width:700px){.auth-dialog{padding:42px 20px 24px}.auth-dialog .space-heading h1{font-size:25px}.join-ancestry{padding:14px}.join-ancestry h2{font-size:18px}#public-access-text{font-size:12px;max-width:145px}}

/* Header and footer share edge alignment; controls participate in layout. */
.map-header{inset-inline:16px;top:max(12px,env(safe-area-inset-top));gap:8px}
.map-header .toolbar{max-width:none;margin:0;padding:6px 10px;gap:10px;min-width:0}
.toolbar .brand{font-size:27px;gap:8px;padding:0;min-height:44px}
.toolbar .brand-mark img{width:54px;height:44px;object-fit:cover}
.brand .wordmark{display:grid;grid-template-columns:auto auto;align-items:center;column-gap:7px;line-height:1.05}.brand-meta{display:flex;align-items:center;margin:0}
.brand .wordmark .brand-subtitle{font-size:9px;letter-spacing:.1em;line-height:1.2}
.brand .beta-badge{font-size:9px;line-height:1.1;padding:1px 3px}
.toolbar .search-wrap{flex:1 1 240px;min-width:0;margin:0}
.toolbar #families{flex:0 1 160px;width:clamp(110px,14vw,160px);max-width:160px;min-width:0;padding:6px;font-size:15px}
.toolbar #search{height:42px;font-size:16px}.toolbar .language{padding:0 6px;font-size:15px}
.map-header .layout-bar button{padding:0 12px;min-height:40px}.spouse-toggle{min-height:44px;padding:3px 8px}
.map-header .map-caption{font-size:12px}
.map-footer{position:absolute;inset-inline:16px;bottom:max(12px,env(safe-area-inset-bottom));z-index:5;display:grid;grid-template-columns:160px minmax(0,1fr) auto;align-items:end;gap:10px 16px;pointer-events:none}
.invite-compact{display:none}.map-footer>*{pointer-events:auto}.map-footer .map-bottom{display:contents}
.map-footer #mini-wrap{position:static;grid-column:1;grid-row:1 / 3;align-self:end;width:160px;height:110px;margin:0;padding:5px}
.map-footer #minimap{height:80px}
.map-footer #public-access{position:static;transform:none;grid-column:2;grid-row:1;justify-self:center;max-width:100%;padding:6px 10px;gap:8px;font-size:14px}
.map-footer .zoom-controls{position:static;transform:none;grid-column:2;grid-row:2;justify-self:center;max-width:100%;margin:0;pointer-events:auto}
.map-footer .map-key{position:relative;inset:auto;grid-column:3;grid-row:2;margin:0;max-width:none;pointer-events:auto}
.map-footer .zoom-controls button{min-height:44px}.map-footer #public-access button{min-height:40px}
@media(min-width:701px) and (max-width:1100px){
 .map-footer{grid-template-columns:130px minmax(0,1fr)}
 .map-footer #mini-wrap{width:130px;height:98px}.map-footer #minimap{height:69px}
 .map-footer .map-bottom{grid-column:2;grid-row:2;justify-self:end;display:flex;align-items:center;background:var(--paper);border:1px solid var(--line);border-radius:var(--corner-radius);padding:3px;gap:8px;pointer-events:auto}
 .map-footer .zoom-controls,.map-footer .map-key{border:0;background:none;box-shadow:none;padding:0}
 .map-footer #public-access{justify-self:end}
 .map-footer #public-access-text{font-size:14px;max-width:none}.invite-full{display:none}.invite-compact{display:inline}
 .map-footer #zoom-value{display:none}.map-footer .zoom-controls #home{font-size:0;padding:0;min-width:44px}.map-footer .zoom-controls #home::before{content:'⌂';font-size:25px}
}
@media(min-width:701px) and (max-width:800px){
 .map-header .toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto auto auto auto;grid-template-areas:'brand brand language share about' 'search search search families families';gap:5px 8px}
 .toolbar .brand{grid-area:brand;justify-self:start}.toolbar .search-wrap{grid-area:search}.toolbar #families{grid-area:families;justify-self:end;width:140px;max-width:140px}
 .toolbar #language{grid-area:language}.toolbar #share-tree{grid-area:share}.toolbar #about{grid-area:about}
}
@media(max-width:700px){
 .map-header{inset-inline:10px;top:max(8px,env(safe-area-inset-top));gap:5px}
 .map-header .toolbar{grid-template-columns:minmax(0,1fr) 32px 44px 36px 36px;padding:4px 6px;gap:3px 4px}
 .toolbar .brand{font-size:22px;gap:5px}.toolbar .brand-mark img{width:44px;height:44px;object-fit:contain}
 .brand .wordmark{display:grid;grid-template-columns:auto auto;align-items:center;column-gap:4px}.brand-meta{position:static;grid-column:2;grid-row:1;margin:0}.brand .wordmark .mobile-count{grid-column:1 / 3}.brand .wordmark .brand-subtitle{display:none}
 .toolbar .brand{position:relative;padding:0;font-size:20px}.brand .beta-badge{font-size:8px}
 .toolbar #families{width:100%;max-width:110px;justify-self:end;font-size:14px;padding:3px;flex:none}
 .toolbar #search{height:38px}.toolbar .language{font-size:13px;padding:0 3px}
 .map-header .layout-bar button{padding:3px 5px;font-size:14px;min-height:40px}.spouse-toggle{font-size:13px;padding:3px 4px;gap:3px}
 .map-footer{inset-inline:10px;grid-template-columns:minmax(0,1fr);gap:8px;bottom:max(10px,env(safe-area-inset-bottom))}
 .map-footer #mini-wrap{display:none}
 .map-footer #public-access{grid-column:1;grid-row:1;justify-self:center;gap:5px;padding:4px 7px;max-width:100%}
 .map-footer #public-access-text{font-size:13px;max-width:none;white-space:nowrap}.invite-full{display:none}.invite-compact{display:inline}
 .map-footer #public-access button{font-size:14px;padding:5px 8px}
 .map-footer .map-bottom{display:flex;position:relative;inset:auto;transform:none;grid-column:1;grid-row:2;justify-self:center;gap:2px;max-width:100%;pointer-events:auto}
 .map-footer .map-key,.map-footer .zoom-controls{position:relative;inset:auto;transform:none;background:none;box-shadow:none;border:0;padding:0;gap:2px}
 .map-footer .map-key{font-size:13px;gap:0}.map-footer .zoom-controls #home{padding:0;font-size:0}
 .map-footer .zoom-controls button{min-width:40px}.map-footer .mobile-key-labels{font-size:12px;gap:3px}
 .map-footer .key-help{padding:0 1px;min-width:0}.map-footer #public-access[hidden]+.map-bottom{grid-row:1}
}

/* An invitation works immediately; the optional picture never blocks sharing. */
.share-dialog{max-width:540px;padding:28px}.share-dialog h1{font-size:30px;margin:10px 30px 18px}.share-dialog p{font-size:18px}.share-invitation{display:grid;gap:12px;margin-block:24px 8px}.share-invitation a,.share-invitation button,.share-picture button{font-size:18px;min-height:52px;padding:12px 16px}.share-copy,.share-picture-action{border:1px solid var(--line);background:#e9edde;border-radius:var(--corner-radius)}.share-picture{border-top:1px solid var(--line);padding-top:16px;margin-top:18px}.share-picture>summary{font-size:18px;min-height:48px;cursor:pointer;padding-block:10px}.share-picture .share-image{margin-top:12px}.share-picture .share-disclosure{font-size:15px}.share-picture .share-actions{display:grid;grid-template-columns:1fr;gap:10px;margin-block:14px}.share-invitation~.help:empty{display:none}@media(max-width:700px){.share-dialog{padding:22px}.share-dialog h1{font-size:26px}}

.share-facebook{display:block;border:1px solid #486b95;background:#eef3fa;color:#234f80;border-radius:var(--corner-radius);text-align:center;text-decoration:none}.share-facebook:hover{background:#e0eafa}
/* Arabic needs room for its letterforms, including in small-screen forms. */
.community-dialog[lang=ar] .space-check,.community-dialog[lang=ar] .space-field{font-size:16px;line-height:1.8}.policy-document[lang=ar]{direction:rtl;text-align:right;font-family:"Noto Sans Arabic",Tahoma,Arial,sans-serif}.policy-document[lang=ar] h3{font-family:"Noto Sans Arabic",Tahoma,Arial,sans-serif!important;line-height:1.8}.policy-document [lang=en]{direction:ltr;text-align:left}.policy-document[lang=ar] details>summary{font-size:16px;line-height:1.8}

/* Keep the smallest signed-in header clear of Add person. Beta remains in About. */
@media(max-width:360px){.brand .brand-meta{display:none}.brand .wordmark{grid-template-columns:auto}.brand .wordmark .mobile-count{grid-column:1}}

/* The header wordmark is just the name, with the count beneath it on phones. */
.brand .wordmark{grid-template-columns:auto;column-gap:0}.brand .wordmark .mobile-count{grid-column:1}

/* Clearly visible legend swatches with breathing room inside the compact dock. */
.map-key .key-male,.map-key .key-female{display:inline-block;width:12px;height:12px;flex:none;border-radius:50%;font-size:0;vertical-align:middle;background:currentColor}
@media(max-width:700px){
 .map-footer .key-help{padding-inline:10px}
 .map-footer .mobile-key-labels{gap:8px}
 .mobile-key-labels>span{display:inline-flex;align-items:center;gap:4px}
}

/* Keep the centered identity outside the scrollable authentication form. */
.auth-dialog[open]{display:flex;flex-direction:column;overflow:hidden;padding:16px 20px;max-height:94dvh}
.auth-dialog .space-heading{position:relative;top:auto;flex:none;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 12px;padding:0 0 12px;background:#f8f8f1;z-index:3}
.auth-dialog .space-heading h1{grid-row:2;grid-column:1;font-size:28px;line-height:1.25}
.auth-dialog .space-heading .signin-logo{grid-row:1;grid-column:1/-1;width:88px;height:88px;margin:0 auto 4px}
.auth-dialog .space-heading button{grid-row:2;grid-column:2;margin:0}
.auth-dialog .space-content{min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding-inline-end:4px}
.auth-dialog .auth-modes{margin:0 0 10px}.auth-dialog .join-help{font-size:14px;line-height:1.5;margin:8px 0 12px}
.inline-link{text-decoration:underline;text-underline-offset:3px;color:inherit}
.join-fields{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:8px 10px}
.joining .join-fields .space-field{display:grid;grid-column:1/-1;grid-template-columns:subgrid;align-items:center;margin:0;font-size:15px;line-height:1.4}
.join-fields .field-label{white-space:nowrap}
.joining .join-fields .space-field[hidden]{display:none}
.joining .join-fields input,.joining .join-fields select,.joining .join-fields textarea{margin:0;min-width:0;min-height:44px;padding:9px 10px;font-size:16px}
.joining .join-fields .join-note{display:flex;flex-direction:column;align-items:stretch;gap:6px;margin-top:4px}
.joining .join-fields .join-note textarea{min-height:88px;line-height:1.45;resize:vertical}
.join-note textarea::placeholder{color:#68725b;opacity:1}
.required-marker{display:none;color:#b33125;font-weight:700}
.space-field:has(:required) .required-marker,.space-check:has(:required)>.required-marker{display:inline}
.joining .space-check{margin:12px 0;font-size:14px}.joining .about-policy{padding:0;font-size:14px}
.joining form>.primary{position:static;width:100%;margin:12px 0 0;box-shadow:none}
@media(max-width:600px){.auth-dialog[open]{padding:12px}.auth-dialog .space-heading{gap:6px;padding-bottom:10px}.auth-dialog .space-heading h1{font-size:22px}.auth-dialog .space-heading .signin-logo{width:80px;height:80px}.auth-dialog .space-heading button{padding:6px;font-size:13px}.joining .join-fields .space-field{font-size:14px}.auth-dialog[lang=ar] .space-heading h1{font-size:21px}}

.auth-diagnostics .request-item,.community-dialog .error{overflow-wrap:anywhere}
.auth-diagnostics{margin-top:24px;border-top:1px solid var(--line);padding-top:12px}
/* Family space: a stable heading/navigation and one scrolling work area. */
.community-dialog:not(.auth-dialog){width:min(1120px,calc(100vw - 24px));height:min(860px,94dvh);max-height:94dvh;overflow:hidden;padding:24px}
.community-dialog:not(.auth-dialog)[open]{display:flex;flex-direction:column}
.community-dialog:not(.auth-dialog) .space-heading{position:relative;top:0;flex:none;padding:0 0 14px;background:#f8f8f1}
.community-dialog:not(.auth-dialog) .space-tabs{flex:none;margin:0 0 14px}
.community-dialog:not(.auth-dialog) .space-content{overflow:auto;min-height:0;padding:0 6px 20px}
.space-table{width:100%;border-collapse:collapse;table-layout:auto;margin:12px 0 24px;font-size:15px}
.space-table th{text-align:start;padding:12px;background:#e9ede3;font-weight:600}
.space-table td{padding:12px;border-bottom:1px solid #d3dacb;vertical-align:top;overflow-wrap:anywhere;max-width:360px;line-height:1.6}
.space-table td .primary,.space-table td .text-button{margin:0;white-space:nowrap}
.request-detail,.member-detail:has(h2){padding:20px;background:#fffef8;border:1px solid #cbd3c2;border-radius:var(--corner-radius);margin:12px 0 24px}
.request-detail>header{display:flex;gap:12px;flex-wrap:wrap;align-items:center}.request-detail>header strong{font-size:22px}
.decision-confirm{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:16px;margin-top:16px;background:#e9ede3;border:1px solid #899777;border-radius:var(--corner-radius)}
.invitation-form{border-top:1px solid #cbd3c2;padding-top:16px}.language-preference{padding-block:16px;border-bottom:1px solid #cbd3c2}

@media(max-width:600px){.community-dialog:not(.auth-dialog){padding:16px 12px;width:calc(100vw - 12px);height:96dvh;max-height:96dvh}.community-dialog:not(.auth-dialog) .space-heading h1{font-size:22px}.space-table,.space-table tbody,.space-table tr,.space-table td{display:block}.space-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.space-table tr{padding:10px 0;border-bottom:1px solid #b9c4ac}.space-table td{border:0;max-width:none;padding:5px 8px;display:grid;grid-template-columns:110px minmax(0,1fr);gap:10px}.space-table td::before{content:attr(data-label);font-weight:600;font-size:13px}.space-table td button{justify-self:start;white-space:normal}.request-detail,.member-detail:has(h2){padding:12px}.community-dialog:not(.auth-dialog) .space-tabs{gap:4px}.community-dialog:not(.auth-dialog) .space-tabs button{padding:7px 10px}}

.community-dialog .suggested-action{outline:3px solid #a78039;outline-offset:2px}
.community-dialog:not(.auth-dialog){max-width:min(1120px,calc(100vw - 24px))}
@media(max-width:600px){.community-dialog:not(.auth-dialog){max-width:calc(100vw - 12px)}}

@media(max-width:600px){.detail-table tr{display:grid;grid-template-columns:minmax(100px,.8fr) minmax(0,1.2fr);gap:8px}.detail-table td{display:block;padding:6px 0}.detail-table td:first-child{font-weight:600}.detail-table td::before{display:none}}

/* Keep the map behind an opaque surface and a fixed breathing space around scrolling details. */
.card{background:#fffef8;border-color:#a8b599;box-shadow:0 12px 40px #27381830}
.card{display:flex;flex-direction:column;overflow:hidden;padding:20px 20px 22px}
.card-scroll{overflow:auto;min-height:0;overscroll-behavior:contain;padding-inline:4px;scroll-padding-block:16px}
.card-scroll>.text-button{display:block;margin-top:10px}.person-contact:empty{display:none}
.member-email{display:block;overflow-wrap:anywhere;padding:10px 0;color:var(--forest);text-underline-offset:3px}
/* Account is an icon within the existing header, not a third phone row. */
#family-space-shortcut{width:40px;min-width:40px;height:40px;min-height:40px;padding:8px;display:grid;place-items:center}
@media(max-width:1100px){
 .map-header .toolbar #family-space-shortcut{grid-area:account;justify-self:end}
 .map-header .toolbar:has(#family-space-shortcut:not([hidden])){grid-template-columns:minmax(0,1fr) 32px 68px 40px 40px;grid-template-areas:'brand brand language share about' 'search search families families account'}
 .toolbar #families{width:100%;max-width:100%;min-width:0}
}
/* Everyday member options and administration are distinct navigation groups. */
.community-dialog.account-workspace[open]{display:grid;grid-template-columns:210px minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);column-gap:22px}
.account-workspace .space-heading{grid-column:1/-1}
.account-nav{overflow:auto;border-inline-end:1px solid #c7d0bc;padding-inline-end:16px}
.account-nav section+section{margin-top:26px}.account-nav h2{font:600 13px/1.5 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:var(--muted);margin:8px 8px 10px}
.account-nav button{display:block;width:100%;text-align:start;min-height:44px;padding:10px 12px;margin-block:4px;font-size:15px;color:var(--forest)}
.account-nav [aria-current=page]{background:var(--forest);color:#fffef8}.account-navigation{display:none}
.contact-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(240px,100%),1fr));gap:12px}
.contact-person{background:#fffef8;border:1px solid #bac6af;border-radius:var(--corner-radius);padding:18px}.contact-person h2{margin:0 0 12px;font-size:20px}.contact-person a{display:block;color:var(--forest);overflow-wrap:anywhere;margin-block:10px}.contact-person button{margin-top:8px}
@media(max-width:700px){
 .community-dialog.account-workspace[open]{display:flex;gap:0}
 .account-nav{display:none}.account-navigation{display:flex;align-items:center;gap:10px;flex:none;padding-bottom:14px;border-bottom:1px solid #c7d0bc;margin-bottom:12px;font-size:14px}
 .account-navigation span{white-space:nowrap}.account-navigation select{width:100%;min-width:0;min-height:44px;background:#fffef8;border:1px solid #93a481;padding:8px;font-size:16px}
 .community-dialog:not(.auth-dialog) .space-content{padding-block:10px 20px}
}

/* Shared controls: filled commitments, outlined actions, pill-shaped person navigation.
   Utilities and selected view/account navigation remain separate from these actions. */
:root{--action-border:#82916d;--action-surface:#f0f3e8;--action-hover:#e1e8d5;--action-radius:var(--corner-radius)}
:is(.primary,.text-button,.suggestion-button,.share-copy,.share-picture-action,.share-facebook),
.community-dialog :is(.primary,.text-button),.card-views button,.card-footer button,
.share-invitation :is(a,button),.share-picture .share-actions :is(a,button){
 display:inline-flex;align-items:center;justify-content:center;gap:8px;
 min-height:44px;padding:10px 14px;border:1px solid var(--action-border);border-radius:var(--action-radius);
 background:var(--action-surface);color:var(--forest);font-size:16px;font-weight:600;line-height:1.45;
 text-align:center;text-decoration:none;overflow-wrap:anywhere;
}
.primary,.card-footer .primary,.community-dialog .primary,.share-invitation .primary,.share-picture .share-actions .primary{background:var(--forest);border-color:var(--forest);color:#fffef8}
:is(.text-button,.suggestion-button,.share-copy,.share-picture-action,.share-facebook):hover,.card-views button:hover{background:var(--action-hover)}
.primary:hover,.card-footer .primary:hover,.community-dialog .primary:hover,.share-invitation .primary:hover,.share-picture .share-actions .primary:hover{background:#3f4e24;border-color:#3f4e24}
button:disabled{cursor:default}
:is(button,a):focus-visible{outline:3px solid #98702e;outline-offset:3px}
.utility-button,.community-dialog .space-heading .utility-button,.toolbar .language{
 min-height:44px;padding:6px 8px;font-size:16px;font-weight:500;line-height:1.5;white-space:nowrap;
}
.community-dialog .space-heading .language{font-family:"Noto Sans Arabic",Tahoma,Arial,sans-serif}
.card-footer{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding-block:16px 2px}
.card-footer>button:last-child:nth-child(odd){grid-column:1/-1}
.card-views{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,145px),1fr));gap:8px}
.card-views button{padding:10px 8px;white-space:nowrap;min-height:44px}
.form-actions{flex-wrap:wrap}.community-dialog .form-actions :is(.primary,.text-button){margin:0}
.relative,.sample-relatives button{
 display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:7px 13px;
 border:1px solid #c5cfb8;border-radius:999px;background:#f6f8f0;color:var(--forest);font-size:14px;font-weight:400;
}
.relative:hover,.sample-relatives button:hover{background:#e8edde;border-color:#82916d}
.relative-arrow{font-size:18px;line-height:1;flex:none}
.person-names{display:flex;align-items:baseline;flex-wrap:wrap;gap:8px 16px;margin:0 0 10px}
.card .person-names h1,html[dir=rtl] .card .person-names h1{margin:0;max-width:100%;font-size:28px;line-height:1.4}
.person-names .alternate-name{font-size:24px;line-height:1.5;overflow-wrap:anywhere;max-width:100%;color:var(--forest)}
.person-names [lang=ar]{font-family:"Noto Sans Arabic",Tahoma,Arial,sans-serif}
.person-self{font-size:13px;font-weight:600;border-radius:var(--corner-radius);background:#e7eddb;padding:3px 9px;align-self:center}
@media(max-width:1100px){
 .toolbar .language{padding-inline:2px}
}

.spelling-note .text-button{display:flex;margin-top:6px}

/* Window dismissal: one component, fixed outside each scrollable body. */
.close-button{position:absolute;inset-block-start:10px;inset-inline-end:10px;z-index:5;display:inline-flex;align-items:center;justify-content:center;flex:none;width:44px;height:44px;min-width:44px;min-height:44px;margin:0;padding:10px;color:var(--forest)}
:is(#about,#family-space-shortcut,.close-button){border:1px solid var(--action-border);border-radius:var(--corner-radius);background:#e8edde;color:var(--forest)}
:is(#about,#family-space-shortcut,.close-button) svg{display:block;width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
:is(#about,#family-space-shortcut,.close-button):hover{background:#dce5cf;border-color:var(--forest)}
dialog.dismiss-surface{padding:20px 24px 24px;overflow:hidden;max-height:90dvh}
dialog.dismiss-surface[open]{display:flex;flex-direction:column}
.dismiss-content{min-height:0;overflow:auto;overscroll-behavior:contain;padding-inline:4px;scroll-padding-block:16px}
.community-dialog:not(.auth-dialog) .space-heading{padding-inline-end:52px;min-height:48px;flex-wrap:nowrap}
.community-dialog .space-heading h1{min-width:0;overflow-wrap:anywhere}
.auth-dialog>.close-button{z-index:6}

.toolbar #language[lang=en]{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif}
.toolbar #families{padding-inline:6px 22px;text-overflow:ellipsis}
.profile-identity{overflow-wrap:anywhere}.profile-identity-form{display:grid;gap:8px}

/* Person exploration uses the same secondary action and context pattern in both views. */
.map-header #person-view{flex:1;min-width:0;flex-wrap:nowrap;gap:12px;padding:6px;border-color:var(--line);border-radius:var(--action-radius);background:var(--paper)}
#person-view .return-button{flex:none;min-height:44px;padding:10px 12px;font-size:16px;white-space:nowrap}
.return-button::before{content:'←';font-size:20px;line-height:1}
html[dir=rtl] .return-button::before{content:'→'}
.view-context{display:flex;flex-direction:column;gap:2px;min-width:0;padding-inline-end:6px}
#view-kind{padding:0;border:0;font-size:13px;line-height:1.4;font-weight:400;color:var(--muted)}
#view-person{font-size:16px;line-height:1.4;font-weight:600}
@media(max-width:700px){.map-header #person-view{gap:8px}#person-view .return-button{padding-inline:8px}}
@media(max-width:360px){.scope-view .map-navigation{flex-wrap:wrap}.scope-view #person-view{flex-basis:100%}.scope-view .spouse-toggle{margin-inline-start:auto}}

/* Account display names and genealogy are distinct identities. */
.member-tree-link{display:grid;gap:6px;margin-block:8px;min-width:0}
.member-tree-link:empty{display:none}
.member-tree-link .tree-identity-link{white-space:normal;text-align:start;overflow-wrap:anywhere;line-height:1.5}
.member-tree-link .eyebrow{font-size:12px}
.profile-identity-form{margin-block:20px 28px}

.profile-unlink{margin-block:16px}

/* Compact, persistent headings share the close row; the content alone scrolls. */
.window-heading{flex:none;min-width:0;min-height:34px;padding-inline-end:44px;margin-bottom:12px}
.window-heading>.eyebrow{margin:0 0 6px}
.window-heading h1,.share-dialog .window-heading h1{font-size:28px;line-height:1.3;margin:0;overflow-wrap:anywhere}
.window-heading .person-names{margin:0;gap:4px 12px}
.card .window-heading{padding-inline-start:4px}
.card .window-heading .person-names h1{font-size:28px}
#about-dialog .window-heading h1{margin:0;font-size:30px}
.community-dialog:not(.auth-dialog) .space-heading{min-height:44px;padding-block:0 12px;padding-inline-end:44px}
.auth-dialog .space-heading{grid-template-columns:minmax(0,1fr)}
.auth-dialog .space-heading h1{grid-column:1/-1;text-align:center}
.tree-identity-link{display:inline;color:var(--forest);text-decoration:underline;text-underline-offset:3px;line-height:1.5}
.member-tree-link .eyebrow{margin-bottom:0}
