dialog[open]{position:fixed;inset:0;margin:auto;box-sizing:border-box;max-width:calc(100vw - 1rem);max-height:min(90dvh,48rem);overflow:auto;overscroll-behavior:contain}
.app-topbar [hidden],.viewer-topbar [hidden]{display:none!important}
.topbar.app-topbar,.topbar.viewer-topbar{padding-inline:1rem}
.app-topbar,.viewer-topbar{gap:.65rem;justify-content:space-between;min-width:0}
.app-topbar .brand,.viewer-topbar .brand{flex:0 0 auto;margin-right:.2rem;white-space:nowrap}
.ft-standalone .app-topbar>#brand-home{display:none}
@media (display-mode:standalone){.app-topbar>#brand-home{display:none}}
.app-view-nav{display:flex;align-items:center;justify-content:center;gap:.15rem;min-width:0;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none}
.app-view-nav::-webkit-scrollbar{display:none}
.app-view-nav a{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:.45rem .58rem;border-radius:8px;color:#fff;text-decoration:none;font-size:.9rem;font-weight:650;white-space:nowrap}
.app-view-nav a:hover,.app-view-nav a:focus-visible,.app-view-nav a[aria-current=page]{background:#ffffff20;outline-color:#f4c568}
.shell-view-menu{display:contents}.shell-view-menu>summary{display:none}
.tree-switcher{flex:0 1 13rem;min-width:8rem;max-width:13rem;background:#fff;color:#173c45;border:1px solid #ffffff80;border-radius:8px;padding:.45rem .55rem}
.shell-actions{display:flex;align-items:center;gap:.5rem;flex:0 0 auto;margin-left:auto}
.account-menu-host{flex:0 0 auto}
/* Shared back button and title row used by every page below a top-level view. */
.ft-title-row{display:flex;align-items:center;flex-wrap:wrap;gap:.5rem .85rem;min-width:0}.ft-title-row h1,.ft-title-row h2{margin-block:0}.ft-title-row>.ft-back{order:2;margin-left:auto}
.ft-back{display:inline-flex;align-items:center;gap:.3rem;flex:0 0 auto;min-height:40px;padding:.4rem .75rem .4rem .5rem;border:1px solid var(--ft-line,var(--app-border,#bacbc7));border-radius:8px;background:var(--ft-card,var(--app-card,#fff));color:var(--ft-ink,var(--app-control-text,#29464a));font:inherit;font-size:.92rem;font-weight:650;text-decoration:none;white-space:nowrap}
.ft-back svg{width:1.1rem;height:1.1rem}.ft-back:hover{background:var(--app-soft,color-mix(in srgb,var(--ft-green,#087e67) 10%,var(--ft-card,#fff)))}.ft-back:focus-visible{outline:3px solid var(--ft-green,var(--app-accent,#087e67));outline-offset:2px}
.shell-search{position:relative;flex:1 1 12rem;max-width:18rem;min-width:7rem;margin:0}
.shell-search-input{display:flex;align-items:center;gap:.4rem;min-width:0;min-height:40px;padding:0 .55rem;border:1px solid #ffffff80;border-radius:9px;background:#ffffff15;color:#fff}
.shell-search-icon{width:1rem;height:1rem;flex:0 0 auto;opacity:.86}
.shell-search-toggle{display:none;align-items:center;justify-content:center;width:38px;height:38px;padding:0;border:0;background:transparent;color:#fff}
.shell-search-toggle svg{width:1.15rem;height:1.15rem}
.shell-search-input input{width:100%;min-width:0;min-height:36px;margin:0;padding:.3rem .1rem;border:0;background:transparent;color:#fff;font:inherit;box-shadow:none}
.shell-search-input input::placeholder{color:#ffffffc9}.shell-search-input input:focus{outline:0}.shell-search-input:focus-within{outline:2px solid #f4c568;outline-offset:2px}
.shell-search-input .search-clear-btn{display:block;border:0;background:transparent;color:#fff;font-size:1.25rem;cursor:pointer}
.shell-search .search-dropdown{position:absolute;z-index:12;top:calc(100% + .35rem);left:0;right:0;max-height:min(70vh,28rem);overflow:auto;border:1px solid var(--app-border);border-radius:10px;background:var(--app-card);color:var(--app-text);box-shadow:0 .75rem 2rem #0003}
.shell-search .search-dropdown:empty{display:none}
.shell-export,.shell-install{display:inline-flex;align-items:center;justify-content:center;gap:.4rem;min-height:40px;padding:.4rem .7rem;border:1px solid #ffffff80;border-radius:8px;background:#ffffff12;color:#fff;font:inherit;font-weight:650;white-space:nowrap;cursor:pointer}
.shell-export svg,.shell-install svg{width:1rem;height:1rem}.shell-export:hover,.shell-export:focus-visible,.shell-install:hover,.shell-install:focus-visible{background:#ffffff24;outline-color:#f4c568}
.topbar.app-topbar .ft-theme-picker{display:inline-flex;align-items:center;gap:.4rem;flex:0 0 auto;margin:0 0 0 auto;color:#fff;font-size:.85rem}
.topbar.app-topbar .ft-theme-picker select{width:auto;min-width:6.2rem;min-height:36px;margin:0;padding:.4rem .55rem;border:1px solid #ffffff80;border-radius:8px;background:#ffffff14;color:#fff;font:inherit}
.topbar.app-topbar .ft-theme-picker option{background:#173c45;color:#fff}
.viewer-pwa-update{max-width:min(1080px,calc(100% - 2rem));margin:.5rem auto}
.ft-export-dialog--timeline{width:min(32rem,calc(100vw - 2rem))}.ft-export-dialog--timeline .ft-export-body{padding:1.25rem}.ft-export-dialog--viewer{width:min(940px,calc(100vw - 1.5rem));max-width:none}
.ft-export-option{display:flex;min-width:0;flex-direction:column;gap:.9rem;padding:1rem;border:1px solid var(--app-border);border-radius:12px;background:var(--app-card);color:var(--app-text)}.ft-export-option-header{display:flex;min-width:0;flex-direction:column;gap:.35rem}.ft-export-option-header h3{margin:0;color:var(--app-text);font-size:1rem}.ft-export-option-header p{margin:0;color:var(--app-muted);line-height:1.5}.ft-export-option-badge{align-self:flex-start;padding:.2rem .5rem;border-radius:999px;background:var(--app-soft);color:var(--app-muted);font-size:.72rem;font-weight:700;letter-spacing:.03em}.ft-export-option-body{min-width:0}
.app-loading{display:flex;align-items:center;justify-content:center;gap:.65rem;min-height:8rem;color:var(--app-muted)}
.ft-modal{box-sizing:border-box;width:min(38rem,calc(100vw - 2rem));max-width:100%;max-height:min(90dvh,48rem);padding:0;overflow:hidden;border:1px solid var(--ft-line,var(--app-border,#bacbc7));border-radius:1rem;background:var(--ft-card,var(--app-card,#fff));color:var(--ft-ink,var(--app-text,#18333a));box-shadow:0 1rem 3rem #06141670}
.ft-modal::backdrop{background:#071719a8;backdrop-filter:blur(2px)}
.ft-modal[open]{display:flex;flex-direction:column}
body.ft-modal-fallback-host{overflow:hidden}
body.ft-modal-fallback-host::before{position:fixed;inset:0;z-index:9998;background:#071719a8;content:""}
.ft-modal.ft-modal-fallback-open{position:fixed;inset:50% auto auto 50%;z-index:9999;transform:translate(-50%,-50%);margin:0}
.ft-modal-form,.ft-modal-content{display:flex;flex:1 1 auto;flex-direction:column;min-height:0;max-height:inherit;width:100%;margin:0}
.ft-modal-header{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.9rem 1.15rem;border-bottom:1px solid var(--ft-line,var(--app-border,#bacbc7))}
.ft-modal-header h2{margin:0;font-size:1.2rem;line-height:1.3}
.ft-modal-close{display:grid;place-items:center;flex:0 0 2.75rem;min-width:2.75rem;min-height:2.75rem;border:1px solid var(--ft-line,var(--app-border,#bacbc7));border-radius:.6rem;background:transparent;color:inherit;font:inherit;font-size:1.6rem;line-height:1;cursor:pointer}
.ft-modal-body{flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain;padding:1rem 1.15rem}
.ft-modal-footer{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:.6rem;padding:.8rem 1.15rem;border-top:1px solid var(--ft-line,var(--app-border,#bacbc7));background:var(--ft-card,var(--app-card,#fff))}
.ft-modal-footer button{min-height:44px}
.ft-modal-footer .quiet{border-color:var(--ft-line,var(--app-border,#bacbc7));background:var(--ft-card,var(--app-card,#fff));color:var(--ft-ink,var(--app-control-text,#29464a))}
.ft-modal-footer .primary{background:var(--ft-green,var(--app-accent,#087e67));color:#fff}
.ft-onboarding-dialog .ft-modal-body{display:grid;align-content:start;gap:.75rem}.ft-onboarding-dialog .ft-modal-body label{display:grid;gap:.3rem;margin:0}.ft-onboarding-dialog input,.ft-onboarding-dialog select{width:100%;min-height:44px;box-sizing:border-box;border:1px solid var(--ft-line,var(--app-border,#bacbc7));border-radius:8px;background:var(--app-field,var(--ft-card,#fff));color:var(--app-control-text,inherit);padding:.65rem;font:inherit}.ft-onboarding-dialog .ft-dialog-message{margin:0}
.ft-modal :focus-visible{outline:3px solid var(--ft-green,var(--app-accent,#087e67));outline-offset:2px}
.ft-dialog-message{white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:520px){.ft-modal{width:calc(100vw - 1rem);max-height:calc(100dvh - 1rem)}.ft-modal-header{padding:.75rem .9rem}.ft-modal-body{padding:.85rem .9rem}.ft-modal-footer{padding:.7rem .9rem}}
.loading-mark{width:1rem;height:1rem;border:2px solid var(--app-border);border-top-color:var(--app-accent);border-radius:50%;animation:app-loading-spin .8s linear infinite}
@keyframes app-loading-spin{to{transform:rotate(360deg)}}
.visually-hidden{position:absolute!important;width:1px!important;height:1px!important;margin:-1px!important;padding:0!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;clip-path:inset(50%)!important;white-space:nowrap!important;border:0!important}
.tree-settings-danger{color:var(--app-danger)!important}
.tree-settings-danger[aria-current=page]{background:var(--app-danger)!important;border-color:var(--app-danger)!important;color:#fff!important}
button.danger{border:1px solid var(--app-danger);border-radius:.55rem;background:var(--app-danger);color:#fff;padding:.65rem .95rem;font:inherit;font-weight:700}
button.danger:hover{filter:brightness(.92)}
.account-details{display:grid;gap:.7rem;margin:1.2rem 0}.account-details>div{display:grid;grid-template-columns:minmax(7rem,.35fr) 1fr;gap:1rem;padding:.7rem 0;border-bottom:1px solid var(--app-border)}.account-details dt{color:var(--app-muted);font-weight:650}.account-details dd{margin:0;overflow-wrap:anywhere}
#account-panel-hidden-people .people-list li{display:flex;align-items:center;justify-content:space-between;gap:1rem}#account-panel-hidden-people .people-list button{flex:0 0 auto}
/* Import and encrypted-backup uploads use the shared accessible drop target. */
#admin-data-tools .upload-help{margin:.3rem 0 .75rem;font-size:.85rem}
#admin-data-tools .ft-file-drop{min-height:7rem;align-content:center;border-width:2px;border-style:dashed;border-color:var(--app-border);background:var(--app-soft);color:var(--app-control-text);transition:border-color .15s ease,background-color .15s ease}
#admin-data-tools .ft-file-drop:hover,#admin-data-tools .ft-file-drop.is-dragging{border-color:var(--app-accent);background:color-mix(in srgb,var(--app-accent) 12%,var(--app-soft))}
#admin-data-tools .ft-file-input:focus + .ft-file-drop,#admin-data-tools .ft-file-drop:focus-visible{outline:3px solid var(--app-accent);outline-offset:3px}
#admin-data-tools .ft-file-browse{border-color:var(--app-border);background:var(--app-card);color:var(--app-control-text)}
#admin-data-tools .ft-file-drop-names[data-state=error]{color:var(--app-danger)}
@media(prefers-reduced-motion:reduce){#admin-data-tools .ft-file-drop{transition:none}}
@media(max-width:760px){.topbar.app-topbar,.topbar.viewer-topbar{height:58px;min-height:58px;gap:.3rem;padding:.4rem .45rem;flex-wrap:nowrap;overflow:visible}.app-topbar .brand,.viewer-topbar .brand{font-size:.95rem;gap:.3rem;margin-right:0}.app-topbar .brand-mark,.viewer-topbar .brand-mark{width:27px;height:27px}.shell-view-menu{display:block;position:relative;order:3;flex:0 0 auto}.shell-view-menu>summary{display:block;list-style:none;min-height:38px;padding:.55rem .55rem;border:1px solid #ffffff70;border-radius:8px;color:#fff;font-weight:650;cursor:pointer}.shell-view-menu>summary::-webkit-details-marker{display:none}.app-view-nav{display:none;position:absolute;z-index:10;top:calc(100% + .35rem);right:0;flex-direction:column;align-items:stretch;min-width:10rem;padding:.35rem;border:1px solid var(--app-border);border-radius:10px;background:var(--app-card);box-shadow:0 .75rem 2rem #0003}.shell-view-menu[open] .app-view-nav:not([hidden]){display:flex}.app-view-nav a{justify-content:flex-start;min-height:42px;color:var(--app-text);font-size:.88rem}.app-view-nav a:hover,.app-view-nav a[aria-current=page]{background:var(--app-soft)}.shell-search{order:2;flex:1 1 4rem;max-width:12rem}.tree-switcher{order:4;flex:0 1 7rem;min-width:4.5rem;max-width:7rem;font-size:.8rem}.shell-export,.shell-install{min-height:38px;padding:.35rem .55rem;font-size:.82rem}.shell-actions{order:5;gap:.3rem}.account-details>div{grid-template-columns:1fr;gap:.2rem}}
@media(max-width:440px){.topbar.app-topbar,.topbar.viewer-topbar{gap:.2rem}.app-topbar .brand,.viewer-topbar .brand{font-size:0;flex:0 0 30px;padding:0}.app-topbar .brand-mark,.viewer-topbar .brand-mark{width:30px;height:30px}.shell-search{order:2;flex:0 0 38px;width:38px;max-width:38px;margin:0}.shell-search-input{min-height:38px;padding:0}.shell-search-icon,.shell-search-input input,.shell-search-input .search-clear-btn{display:none}.shell-search-toggle{display:inline-flex;flex:0 0 38px}.shell-search.search-expanded{position:absolute;left:.45rem;right:.45rem;top:.4rem;z-index:30;width:auto;max-width:none}.shell-search.search-expanded .shell-search-input{padding:0 .4rem}.shell-search.search-expanded .shell-search-input input{display:block;font-size:.8rem}.shell-search.search-expanded .shell-search-icon{display:none}.shell-search.search-expanded .search-clear-btn{display:block}.shell-search.search-expanded .shell-search-toggle{flex-basis:32px;width:32px}.shell-actions{gap:.2rem}.shell-export,.shell-install{font-size:0;gap:0;padding:.4rem .5rem}.shell-export svg,.shell-install svg{width:1.15rem;height:1.15rem}.tree-switcher{flex:0 1 5rem;min-width:0;width:5rem;max-width:5rem;padding:.4rem .15rem;font-size:.72rem}}
.app-notice{margin:0 0 1rem}
/* Flex items must be able to shrink below the desktop search minimum. */
@media(max-width:760px){.shell-search{min-width:0}.shell-view-menu .app-view-nav{left:0;right:auto;min-width:min(10rem,calc(100vw - 1rem));max-width:calc(100vw - 1rem)}}
@media(max-width:650px){.timeline-header .timeline-actions{flex-wrap:wrap;align-items:stretch}.timeline-header .timeline-actions>*{flex:1 1 auto;min-width:0;max-width:100%;white-space:normal}}
.home-mode.no-trees #tree-view>.heading-row{display:flex!important}.home-mode.no-trees #tree-list{display:block!important}
