:root{font-family:system-ui,-apple-system,"Segoe UI",sans-serif;color:#18333a;background:#f3f6f5;font-synthesis:none;text-rendering:optimizeLegibility}*{box-sizing:border-box}body{margin:0;min-height:100vh}[hidden]{display:none !important}.topbar{height:64px;background:#173c45;color:#fff;display:flex;align-items:center;gap:1rem;padding:0 max(1rem,calc((100vw - 1080px)/2));box-shadow:0 2px 9px #102a3020}.brand{font-size:1.15rem;font-weight:750;color:white;text-decoration:none;margin-right:auto}.topbar button{color:white}.layout{max-width:1080px;margin:2.5rem auto;padding:0 1rem}.card{background:white;border:1px solid #dce6e3;border-radius:14px;padding:1.5rem;box-shadow:0 7px 28px #153c4510}.auth-card{max-width:470px;margin:7vh auto}.auth-card h1{margin:.1rem 0 .5rem}.auth-card>p{color:#536a6d}.tabs{display:flex;border-bottom:1px solid #dce6e3;margin:1.5rem 0 1rem}.tabs button{flex:1;padding:.75rem;border:0;background:none;color:#496268}.tabs button[aria-selected=true]{color:#087e67;border-bottom:3px solid #087e67;font-weight:700}label{display:block;font-size:.91rem;font-weight:650;margin:.8rem 0;color:#29464a}input{display:block;width:100%;margin-top:.35rem;border:1px solid #bacbc7;border-radius:8px;padding:.75rem;font:inherit;background:white}input:focus,button:focus-visible,a:focus-visible{outline:3px solid #f0b957;outline-offset:2px}button{font:inherit;cursor:pointer;border-radius:8px;padding:.65rem .9rem;border:1px solid transparent}.primary{background:#087e67;color:white;font-weight:700}.primary:hover{background:#066652}.quiet{background:transparent;border-color:#ffffff70}.auth-card .primary{width:100%;margin-top:.65rem}.message{min-height:1.4em;color:#a32d2d}.heading-row{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:1rem}.heading-row h1,.heading-row h2{margin:.1rem 0}.eyebrow{font-size:.75rem;letter-spacing:.1em;color:#64807e;font-weight:750;margin:.1rem 0}.tree-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:1rem;margin:1rem 0 2rem}.tree-card{width:100%;text-align:left;background:#fff;color:#173c45;border:1px solid #dce6e3;box-shadow:0 4px 14px #102a3010}.tree-card strong,.tree-card span{display:block}.tree-card span{margin-top:.4rem;color:#5c7275;font-size:.9rem}.tree-card[aria-pressed=true]{border:2px solid #087e67}.badge{background:#e7f4ef;color:#08674f;border-radius:99px;padding:.3rem .65rem;font-size:.82rem;font-weight:700}.person-form{display:grid;grid-template-columns:2fr 1fr auto;gap:.75rem;align-items:end}.person-form label{margin:0}.people-list{padding:0;list-style:none}.people-list li{padding:.75rem 0;border-bottom:1px solid #e6ecea}.muted{font-weight:400;color:#667b7d}@media(max-width:600px){.layout{margin:1.25rem auto}.card{padding:1.1rem}.heading-row{align-items:flex-start}.person-form{grid-template-columns:1fr}.person-form button{width:100%;min-height:46px}.primary,.quiet{min-height:44px}.tree-grid{grid-template-columns:1fr}}
.message.status-success { color: var(--app-success); }
.message.status-neutral { color: var(--app-muted); }
.message.status-error { color: var(--app-danger); }
.brand { display: inline-flex; align-items: center; gap: .5rem; }
.brand-mark { width: 32px; height: 32px; object-fit: contain; border-radius: 7px; background: #f3f6f5; }
.tree-actions { display: flex; align-items: center; gap: 0.75rem; }
.feature-section { margin: 1.5rem 0; padding: 1.1rem; border: 1px solid #dce6e3; border-radius: 12px; background: #f8fbfa; }
.feature-section h3 { margin: 0 0 1rem; }
.feature-section select { display: block; width: 100%; margin-top: .35rem; border: 1px solid #bacbc7; border-radius: 8px; padding: .75rem; font: inherit; background: white; }
.feature-section .quiet { border-color: #bacbc7; color: #29464a; }
.proposal-actions { display: flex; gap: .5rem; margin-top: .6rem; }
.proposal-actions button { min-width: 6rem; }
.upload-results { padding-left: 1.25rem; margin: .75rem 0 0; }
.upload-results li { padding: .35rem 0; overflow-wrap: anywhere; }
.admin-link { border: 1px solid #bacbc7; border-radius: 8px; padding: .65rem .9rem; color: #08674f; font-weight: 650; text-decoration: none; background: white; }
.invite-choice { display:flex; flex-wrap:wrap; align-items:center; gap:.6rem; margin:1rem 0; }
.invite-choice p { flex-basis:100%; margin:.2rem 0; color:#536a6d; }
.home-mode #tree-list{display:flex;gap:.5rem;overflow:auto;margin:.5rem 0 1rem}.home-mode #tree-list .tree-card{min-width:12rem;padding:.65rem;text-align:left}.home-mode #tree-view>.heading-row{margin-bottom:.25rem}.home-mode #selected-tree{display:none!important}
.timeline-shell{margin:0 0 1.5rem;padding:1rem;border:1px solid #dce6e3;border-radius:14px;background:#f8fbfa}.timeline-header{display:flex;align-items:center;justify-content:space-between;gap:1rem}.timeline-header h2{margin:.1rem 0}.timeline-actions{display:flex;gap:.5rem}.timeline-actions .quiet{border-color:#bacbc7;color:#29464a;background:white}.timeline-filters{display:grid;grid-template-columns:repeat(3,1fr) auto;gap:.75rem;align-items:end;border-top:1px solid #dce6e3;margin-top:1rem;padding-top:.75rem}.timeline-filters label{margin:0}.timeline-filters select{display:block;width:100%;margin-top:.35rem;border:1px solid #bacbc7;border-radius:8px;padding:.75rem;font:inherit;background:white}.timeline-list{display:grid;gap:.75rem;margin:1rem 0}.timeline-card{background:white;border:1px solid #dce6e3;border-radius:12px;padding:1rem}.timeline-card h3{margin:.15rem 0 .35rem;font-size:1.05rem}.timeline-card time,.timeline-meta{color:#5d7375;font-size:.88rem}.timeline-card p{margin:.45rem 0;white-space:pre-wrap}.timeline-more-sentinel{height:1px}.timeline-secondary{display:flex;gap:1rem;border-top:1px solid #dce6e3;padding-top:.8rem}.timeline-secondary a{color:#08674f;font-weight:650;text-decoration:none}.timeline-skeleton{height:5rem;border-radius:12px;background:linear-gradient(90deg,#edf3f1,#fff,#edf3f1);background-size:200% 100%;animation:timeline-shimmer 1.4s infinite}@keyframes timeline-shimmer{to{background-position:-200% 0}}@media(prefers-reduced-motion:reduce){.timeline-skeleton{animation:none}}
.home-mode .layout{width:min(1440px,calc(100% - 2rem));max-width:none;margin:1.5rem auto;padding:0}
.timeline-home-content{display:block}.timeline-list,.timeline-group-items{min-width:0;grid-template-columns:minmax(0,1fr)}
.timeline-card{min-width:0;overflow-wrap:anywhere}
.timeline-card .ft-person-pill{max-width:100%;min-width:0;white-space:normal}
.timeline-header,.timeline-header>div{min-width:0}
.timeline-feed-content{min-width:0}
.timeline-source-preview{margin:.65rem 0}.timeline-source-preview img{display:block;max-width:100%;max-height:32rem;object-fit:contain;border-radius:8px}
.timeline-source-preview{display:flex;justify-content:center;width:100%}.timeline-source-preview-image{margin-inline:auto}
.timeline-source-tag-host{position:relative;perspective:900px}
.timeline-source-preview-image{cursor:pointer;transform-style:preserve-3d;backface-visibility:hidden;transition:transform .55s cubic-bezier(.2,.75,.25,1),filter .2s ease;box-shadow:10mm 0 7mm -5mm rgb(15 36 40 / 48%)}
.timeline-source-preview-image.is-flipped{transform:rotateY(180deg);filter:saturate(.82) brightness(.96)}
.timeline-source-back-image{position:absolute;inset:.65rem 0;display:block;width:100%;height:calc(100% - 1.3rem);max-height:36rem;object-fit:contain;border-radius:8px;opacity:0;pointer-events:none;transform:rotateY(0);transition:opacity .35s ease;box-shadow:10mm 0 7mm -5mm rgb(15 36 40 / 48%)}
.timeline-source-back-image.is-visible{opacity:1}
.timeline-source-tag-host.has-back-image.is-flipped::after{display:none}
.timeline-source-tag-host.is-flipped::after{content:"Back of photo\A No back image uploaded yet\A Use the photo menu to add one";white-space:pre;position:absolute;inset:.65rem 0;display:grid;place-content:center;text-align:center;padding:1rem;border:1px dashed var(--app-border);border-radius:8px;background:var(--app-surface,var(--app-card));color:var(--app-muted);font-size:.9rem;line-height:1.55;pointer-events:none}
.timeline-photo-context-menu{position:fixed;z-index:1000;min-width:13rem;padding:.3rem;border:1px solid var(--app-border);border-radius:9px;background:var(--app-card);box-shadow:0 10px 26px rgb(0 0 0 / 22%)}
.timeline-photo-context-action{display:block;width:100%;padding:.55rem .7rem;border:0;border-radius:6px;background:transparent;color:var(--app-control-text);text-align:left;font:inherit;cursor:pointer}.timeline-photo-context-action:hover,.timeline-photo-context-action:focus-visible{background:var(--app-soft);outline:none}
.timeline-source-cover-image{margin-block:.9rem 1.1rem;padding:.65rem;border:1px solid var(--app-border);border-radius:10px;background:var(--app-surface,var(--bg-card))}.timeline-source-cover-image>figcaption,.timeline-source-cover-image>label{display:none}.timeline-source-privacy-label{display:inline-block;margin:0 .55rem .45rem 0;padding:.18rem .45rem;border-radius:999px;background:var(--app-soft);color:var(--app-text);font-size:.74rem;font-weight:600}.timeline-source-cover-image .timeline-source-preview-image{width:100%;max-height:36rem;object-fit:contain}.timeline-source-additional-image{margin-block:.75rem}
.timeline-source-association-label{display:block;margin-bottom:.4rem;color:var(--app-muted);font-size:.78rem}
.timeline-source-audio{display:block;width:100%;max-width:38rem;margin:.5rem 0}
.timeline-source-video,.timeline-archive-video{display:block;width:100%;max-width:42rem;max-height:32rem;margin:.6rem 0;background:#000;border-radius:8px}
.timeline-archive-card audio{display:block;width:100%;margin:.6rem 0}
.timeline-archive-panel{margin-top:1rem;padding:1rem;border:1px solid var(--app-border);border-radius:12px;background:var(--app-surface,var(--bg-card))}.timeline-archive-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem}.timeline-archive-heading h3{margin:.1rem 0 .35rem}.timeline-archive-heading p{max-width:58rem;margin:.25rem 0;color:var(--app-muted)}.timeline-archive-heading label{min-width:min(18rem,100%)}.timeline-archive-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,20rem),1fr));gap:.85rem;margin-block:1rem}.timeline-archive-card{min-width:0}.timeline-archive-card h4{margin:.1rem 0 .4rem;overflow-wrap:anywhere}.timeline-archive-preview{margin:.6rem 0}.timeline-archive-preview .timeline-source-tag-host{width:100%;min-height:10rem;display:grid;place-items:center}.timeline-archive-preview .timeline-source-preview-image{max-width:100%;max-height:24rem;object-fit:contain}.timeline-archive-pagination{display:flex;align-items:center;flex-wrap:wrap;gap:.75rem}.timeline-archive-pagination .message{margin:0}.timeline-archive-pagination button[hidden]{display:none}
.timeline-card.timeline-event-card{position:relative;padding:1.1rem 1.2rem;border-inline-start:3px solid var(--app-accent);box-shadow:0 2px 8px color-mix(in srgb,var(--app-text) 7%,transparent)}
.timeline-card.timeline-event-card>h3{margin:.15rem 0 .55rem;font-size:1.2rem;line-height:1.35}
.timeline-event-share-action{margin-top:.7rem}
@media(max-width:600px){.timeline-card.timeline-event-card{padding:1rem}}
.timeline-person-panel-slot{position:fixed;top:64px;right:0;bottom:0;width:440px;z-index:80;overflow:visible}
.timeline-person-panel-slot.is-collapsed{width:0}
.home-mode .topbar.app-topbar{position:sticky;top:0}
.home-mode.timeline-person-panel-open .layout{width:calc(100% - 440px - 3rem);max-width:1440px;margin-left:max(1.5rem,calc((100% - 440px - 1440px)/2));margin-right:calc(440px + 1.5rem)}
dialog[class~="associate-edit-dialog"][open]{position:fixed;top:50%;left:50%;right:auto;bottom:auto;margin:0;transform:translate(-50%,-50%)}
.embedded-viewer-runtime{width:100%;min-height:calc(100vh - 64px)}
.embedded-viewer-runtime.is-parked{position:fixed;left:-200vw;top:0;width:100vw;height:100vh;overflow:hidden}
.embedded-viewer-runtime.viewer-modal-open{position:fixed;inset:0;z-index:1300;width:100vw;height:100vh;min-height:0;overflow:hidden}
.embedded-viewer-runtime.viewer-modal-open>.sub-header,.embedded-viewer-runtime.viewer-modal-open>.main-content{visibility:hidden}
.embedded-viewer-runtime .sub-header{margin:0}
.embedded-viewer-runtime .main-content{min-height:calc(100vh - 64px)}
body.viewer-view-mode .layout{width:100%;max-width:none;margin:0;padding:0}
body.viewer-view-mode #tree-chooser,body.viewer-view-mode #tree-list,body.viewer-view-mode #timeline-home{display:none!important}
body:not(.viewer-view-mode) .canvas-controls{display:none!important}
.timeline-post-date-fields{display:grid;grid-template-columns:minmax(0,1fr) minmax(10rem,.55fr);gap:1rem;align-items:start}
.timeline-post-date-fields>label{min-width:0}
.timeline-post-date-fields input,.timeline-post-date-fields select{width:100%;box-sizing:border-box}
.timeline-post-date-inputs{display:grid;grid-template-columns:minmax(0,1fr) 3.2rem;align-items:center;gap:.4rem}
.timeline-post-date-inputs input[type=date]{width:3.2rem;height:2.8rem;padding:.35rem;color:var(--app-text);background:var(--app-card);border:1px solid var(--app-border);border-radius:.5rem}
.ft-person-picker{position:relative;display:grid;gap:.35rem}
.ft-person-picker-options{position:absolute;z-index:60;top:100%;left:0;right:0;max-height:16rem;overflow:auto;padding:.35rem;background:var(--app-surface,#fff);border:1px solid var(--app-border,#cbd5e1);border-radius:.65rem;box-shadow:0 8px 24px #0f172a2e}
.ft-person-picker-options[hidden]{display:none}
.ft-person-picker-option{display:flex;width:100%;align-items:stretch;gap:.65rem;text-align:left;padding:.5rem;border:0;border-radius:.45rem;background:transparent;color:inherit;cursor:pointer}
.ft-person-picker-option:hover,.ft-person-picker-option[aria-selected=true]{background:var(--app-soft,#eef4f3)}
.ft-person-picker-avatar{display:grid;place-items:center;align-self:stretch;flex:0 0 3rem;width:3rem;min-height:3.25rem;height:auto;aspect-ratio:auto;overflow:hidden;border-radius:.55rem;background:var(--app-soft,#eef4f3);font-size:1.25rem}
.ft-person-picker-avatar img{width:100%;height:100%;object-fit:cover}
.ft-person-picker-details{display:grid;gap:.1rem;min-width:0}
.ft-person-picker-details small{color:var(--app-muted,#64748b);font-size:.78rem;font-style:italic;line-height:1.2}
@media(max-width:600px){.timeline-post-date-fields{grid-template-columns:minmax(0,1fr) minmax(8rem,.7fr);gap:.65rem}}
@media(max-width:760px){.timeline-person-panel-slot{top:58px;width:min(440px,calc(100% - 26px))}.home-mode.timeline-person-panel-open .layout{width:calc(100% - 2rem);margin:1.5rem auto}.embedded-viewer-runtime .main-content{min-height:calc(100dvh - 64px)}}
.ft-export-dialog--timeline .ft-dialog-message,.ft-export-dialog--timeline .status-neutral{color:var(--app-muted)}.ft-export-dialog--timeline .status-success{color:var(--app-success)}.ft-export-dialog--timeline .status-error{color:var(--app-danger)}
@media (max-width: 680px) { .tree-actions { align-items: stretch; flex-direction: column; } }
@media (max-width:600px){.timeline-filters{grid-template-columns:1fr}.timeline-actions{flex-direction:column}.timeline-secondary{overflow:auto;white-space:nowrap}}
.offline-brand-mark { display: block; width: 64px; height: 64px; object-fit: contain; margin: 0 auto 1rem; }
.timeline-group{scroll-margin-top:1rem}.timeline-group-heading{position:sticky;top:0;z-index:1;margin:0;padding:.35rem .25rem;background:#f8fbfa;color:#536a6d;font-size:.82rem;letter-spacing:.06em}.timeline-group-items{display:grid;gap:.75rem}.timeline-scrubber{display:flex;gap:.35rem;overflow-x:auto;overscroll-behavior-inline:contain;padding:.4rem 0;scrollbar-width:thin}.timeline-decade{flex:none;border:1px solid #bacbc7;background:white;color:#29464a;padding:.45rem .65rem;font-size:.85rem}.timeline-decade:hover,.timeline-decade:focus-visible{border-color:#087e67;color:#08674f}.timeline-person-link{color:var(--app-accent);font-weight:650;text-decoration:underline;text-underline-offset:.12em}.timeline-person-link:hover,.timeline-person-link:focus-visible{text-decoration-thickness:2px}.timeline-person-link.ft-person-pill{text-decoration:none}#timeline-new-updates{display:block;margin:.65rem auto}@media(max-width:600px){.timeline-scrubber{position:sticky;bottom:.5rem;z-index:2;max-width:100%;padding:.45rem;border:1px solid #dce6e3;border-radius:.65rem;background:var(--app-soft);color:var(--app-text)}}
/* Bot trap: real visitors cannot focus or see it, but automated form fillers may. */
.honeypot{position:absolute!important;left:-10000px!important;top:auto!important;width:1px!important;height:1px!important;overflow:hidden!important}
.error-art img{display:block;width:100%;height:auto}
.error-page{box-sizing:border-box;min-height:100svh;max-width:38rem;margin:0 auto;padding:clamp(2rem,8vw,5rem) 1.5rem;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:var(--text-primary,#263238)}.error-art{width:min(14rem,55vw);margin-bottom:1rem}.error-art svg{display:block;width:100%;height:auto}.error-code{margin:0;color:var(--text-muted,#68777a);font-size:.9rem;font-weight:700;letter-spacing:.16em}.error-page h1{margin:.5rem 0;font-size:clamp(1.7rem,5vw,2.4rem);line-height:1.15}.error-page>p:not(.error-code){max-width:31rem;line-height:1.6}.error-caption{font-style:italic;color:var(--text-muted,#68777a)}.error-page .button{display:inline-flex;align-items:center;justify-content:center;margin-top:1rem;min-height:2.8rem;padding:.6rem 1rem;border-radius:.55rem;text-decoration:none}.error-page .button.primary{background:#425f45;color:#fff}
dialog.ft-dialog{width:min(32rem,calc(100vw - 2rem));max-width:100%;border:1px solid var(--app-border,#bacbc7);border-radius:1rem;padding:1.25rem;background:var(--app-card,#fff);color:var(--app-text,#18333a);box-shadow:0 1rem 3rem #06141670}dialog.ft-dialog::backdrop{background:#071719a8}.ft-dialog h2{margin-top:0}.ft-dialog-message{white-space:pre-wrap;overflow-wrap:anywhere}.ft-dialog input{margin:.75rem 0}.ft-dialog-actions{display:flex;justify-content:flex-end;gap:.6rem;margin-top:1.5rem}.ft-dialog-actions .quiet{border-color:var(--app-border,#bacbc7);color:var(--app-control-text,#29464a)}

/* The account shell shares theme preference and artwork with the full viewer. */
:root{color-scheme:light;--app-page:#f3f6f5;--app-card:#fff;--app-soft:#f8fbfa;--app-text:#18333a;--app-muted:#536a6d;--app-border:#dce6e3;--app-field:#fff;--app-control-text:#29464a;--app-accent:#087e67;--app-danger:#a32d2d;--app-success:#08674f;--app-notice:#fff8e8;--app-notice-text:#29464a}
:root[data-theme="dark"]{color-scheme:dark;--app-page:#0f172a;--app-card:#1e293b;--app-soft:#172235;--app-text:#f8fafc;--app-muted:#a8b6c7;--app-border:#334155;--app-field:#172235;--app-control-text:#e2e8f0;--app-accent:#62c9ad;--app-danger:#ff9b9b;--app-success:#74d6b6;--app-notice:#382f1c;--app-notice-text:#f7e6b5}
/* The shared dialogs remain centered while long copy scrolls independently of their actions. */
dialog.ft-dialog[open]{display:flex;flex-direction:column;overflow:hidden}
dialog.ft-dialog[open]>form{display:flex;flex:1 1 auto;flex-direction:column;min-height:0;width:100%}
.ft-dialog-message{flex:1 1 auto;min-height:0;max-height:min(55dvh,30rem);overflow:auto;overscroll-behavior:contain}
.ft-dialog-actions{flex:0 0 auto;flex-wrap:wrap;position:sticky;bottom:0;margin-top:.75rem;padding-top:.65rem;background:var(--app-card,#fff)}
.ft-dialog-actions button{min-height:44px}
@media(max-height:480px){dialog.ft-dialog[open]{padding:.85rem}.ft-dialog-message{max-height:38dvh}.ft-dialog-actions{margin-top:.5rem}}
body{background:var(--app-page);color:var(--app-text)}
.import-research-preview{margin:.75rem 0;padding:.85rem 1rem;border:1px solid var(--app-border);border-radius:10px;background:var(--app-soft);color:var(--app-text)}
.import-research-preview h4{margin:.1rem 0 .4rem;color:var(--app-text)}
.import-research-preview ul{margin:.25rem 0 .75rem;padding-left:1.25rem;color:var(--app-text)}
.import-research-preview li{margin:.2rem 0;overflow-wrap:anywhere}
.import-research-preview pre{max-width:100%;overflow-wrap:anywhere;white-space:pre-wrap;font:inherit}
.import-rehearsal-pending{margin:.5rem 0;padding:.55rem .7rem;border:1px dashed var(--app-border);border-radius:8px;background:var(--app-card);color:var(--app-control-text);overflow-wrap:anywhere}
.import-research-preview h5{margin:.75rem 0 .35rem;color:var(--app-text)}
ul.import-rehearsal-list{list-style:none;margin:.35rem 0 .5rem;padding:0;display:grid;gap:.5rem;min-width:0}
.import-rehearsal-item{min-width:0;margin:0;padding:.55rem .7rem;border:1px solid var(--app-border);border-left:3px solid var(--app-danger);border-radius:8px;background:var(--app-card);color:var(--app-text);overflow-wrap:anywhere}
.import-rehearsal-item strong{font-weight:650}
.import-rehearsal-count{margin-left:.4rem;color:var(--app-muted);font-variant-numeric:tabular-nums;white-space:nowrap}
.import-rehearsal-items{margin-top:.35rem;min-width:0;color:var(--app-muted)}
.import-rehearsal-items>summary{cursor:pointer;color:var(--app-control-text);font-weight:600}
.import-rehearsal-items ul{margin:.35rem 0 .25rem;padding-left:1.1rem;color:var(--app-text);font-size:.9rem}
.import-rehearsal-items li{margin:.2rem 0;min-width:0;overflow-wrap:anywhere}
.import-rehearsal-items p{margin:.25rem 0;color:var(--app-muted)}
.import-rehearsal-notes{margin-top:.85rem;padding-top:.6rem;border-top:1px solid var(--app-border)}
.import-rehearsal-notes .import-rehearsal-note{border-left:3px solid var(--app-muted);background:var(--app-soft);color:var(--app-control-text)}
.import-rehearsal-notes .import-rehearsal-count{color:var(--app-muted)}
.card,.tree-card,.timeline-shell,.timeline-card,.feature-section,dialog.ft-dialog{background:var(--app-card);color:var(--app-text);border-color:var(--app-border)}
.timeline-shell,.feature-section{background:var(--app-soft)}
.timeline-filters select{display:block;width:100%;margin-top:.35rem;border:1px solid var(--app-border);border-radius:8px;padding:.65rem .75rem;font:inherit;background:var(--app-field);color:var(--app-control-text)}
.timeline-discovery-date{display:block;margin-top:.35rem;color:var(--app-muted);font-size:.82rem}
.ft-file-input{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}
.ft-file-drop{display:grid;gap:.25rem;width:100%;margin-top:.45rem;padding:1rem;border:1px dashed var(--app-border);border-radius:10px;background:var(--app-soft);color:var(--app-control-text);text-align:center;cursor:pointer}
.ft-file-drop-instruction{font-weight:650}.ft-file-drop-names{color:var(--app-muted);font-size:.85rem;overflow-wrap:anywhere}
.ft-file-browse{justify-self:center;margin-top:.25rem;padding:.45rem .75rem;border:1px solid var(--app-border);border-radius:.5rem;background:var(--app-card);color:var(--app-text);font-weight:650}.ft-file-previews{display:flex;justify-content:center;gap:.35rem}.ft-file-preview{width:3rem;height:3rem;object-fit:cover;border-radius:.4rem}.ft-file-drop-names[data-state=error]{color:var(--app-danger,#a32d2d)}.ft-upload-status{display:grid;grid-template-columns:minmax(5rem,1fr) auto;align-items:center;gap:.4rem;margin:.4rem 0;color:var(--app-muted);font-size:.85rem}.ft-upload-status progress{grid-column:1/-1;width:100%;height:.45rem;accent-color:var(--app-accent)}
.ft-file-drop:hover,.ft-file-drop.is-dragging,.ft-file-drop.has-files{border-color:#087e67;background:color-mix(in srgb,#087e67 8%,var(--app-soft))}
.ft-file-input:focus + .ft-file-drop,.ft-file-drop:focus-visible{outline:3px solid #f0b957;outline-offset:2px}
.timeline-group-heading{background:var(--app-soft);color:var(--app-muted)}
label,.auth-card>p,.muted,.timeline-card time,.timeline-meta{color:var(--app-muted)}
input,select,.timeline-actions .quiet,.timeline-decade,.admin-link,.feature-section select,.ft-dialog input{background:var(--app-field);color:var(--app-control-text);border-color:var(--app-border)}
.tree-card{color:var(--app-text)}.tree-card span{color:var(--app-muted)}
.home-mode #tree-list,.home-mode #tree-view>.heading-row{display:none!important}
a.primary{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:.65rem .9rem;border:1px solid transparent;border-radius:8px;text-decoration:none}
.pwa-update{display:flex;align-items:center;justify-content:space-between;gap:.75rem;margin:0 auto 1rem;padding:.7rem 1rem;border:1px solid #f0b957;border-radius:10px;background:var(--app-notice);color:var(--app-notice-text)}.pwa-update-actions{display:flex;align-items:center;gap:.5rem;flex-shrink:0}.pwa-update .quiet{border-color:var(--app-border);color:var(--app-control-text);white-space:nowrap}
.topbar{position:sticky;top:0;z-index:5}.tree-switcher,.theme-control{max-width:min(15rem,30vw);min-height:40px;margin:0;padding:.45rem .6rem;border:1px solid #ffffff60;border-radius:8px;background:#ffffff14;color:white;font:inherit}.tree-switcher option,.theme-control option{background:#173c45;color:#fff}.topbar-action{min-height:40px;background:#fff;color:#173c45;font-weight:700}.topbar-action:hover{background:#e7f4ef}.timeline-scope-note{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem;margin:.75rem 0 0;line-height:1.5}.timeline-scope-note>span{flex:1 1 14rem;min-width:0}.timeline-scope-note>.admin-link{display:inline-flex;align-items:center;justify-content:center;max-width:100%;min-height:44px;white-space:normal;overflow-wrap:anywhere}.timeline-filters{grid-template-columns:1fr;align-items:start}.timeline-scope-chips{display:flex;flex-wrap:wrap;gap:.4rem}.timeline-scope-chips button{border:1px solid var(--app-border);border-radius:999px;background:var(--app-card);color:var(--app-control-text);min-height:40px;padding:.5rem .85rem}.timeline-scope-chips button[aria-pressed="true"]{background:#087e67;color:#fff;border-color:#087e67}.timeline-scope-chips button:disabled{opacity:.55;cursor:not-allowed}.timeline-date-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem}.timeline-date-filters label{margin:0}.timeline-date-filters input{margin-top:.35rem}
@media(max-width:650px){.topbar{height:auto;min-height:58px;gap:.4rem;padding:.45rem .6rem;flex-wrap:wrap}.brand{font-size:1rem}.brand-mark{width:28px;height:28px}.tree-switcher{flex:1;max-width:none;min-width:8rem}.theme-control{max-width:5.2rem}.topbar-action{padding:.45rem .55rem;min-height:40px}.topbar #account-label{display:none}.topbar #signout{padding:.45rem .55rem;min-height:40px}.timeline-header{align-items:flex-start;flex-direction:column}.timeline-actions{width:100%;flex-direction:row!important}.timeline-actions>*{flex:1}.timeline-scope-chips button{flex:1}.timeline-date-filters{grid-template-columns:1fr 1fr}}
@media(max-width:650px){.timeline-archive-heading{flex-direction:column}.timeline-archive-heading label{width:100%}}
.timeline-date-jump{display:grid;grid-template-columns:auto minmax(10rem,1fr) auto;align-items:end;gap:.55rem}.timeline-date-jump label{margin:0}.timeline-date-jump input{min-height:40px;border:1px solid var(--app-border);border-radius:8px;background:var(--app-card);color:var(--app-control-text);padding:.45rem .6rem}.timeline-date-jump button{min-height:40px}@media(max-width:650px){.timeline-date-jump{grid-template-columns:1fr auto}.timeline-date-jump label{grid-column:1/-1}}

/* Timeline posts: keep the composer calm on desktop and comfortable on phones. */
.timeline-post-composer{display:grid;gap:.75rem;margin-top:1rem;padding:1rem;border:1px solid var(--app-border);border-radius:14px;background:var(--app-card)}
.timeline-post-composer h3{margin:.1rem 0}.timeline-post-composer .timeline-post-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem}
.timeline-post-composer .timeline-post-form label{display:grid;gap:.35rem;margin:0}.timeline-post-composer .timeline-post-form label:nth-of-type(2),.timeline-post-composer .timeline-post-form label:nth-of-type(3){grid-column:1/-1}
.timeline-post-composer .timeline-post-form textarea{min-height:7rem;resize:vertical}.timeline-post-composer .timeline-post-form button,.timeline-post-composer .timeline-post-form .message{align-self:center;margin:0}.timeline-post-feed{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,18rem),1fr));gap:.75rem}.timeline-post{margin:0;padding:1rem;border:1px solid var(--app-border);border-radius:12px;background:var(--app-card)}.timeline-post h4{margin:.1rem 0 .45rem}.timeline-post p{white-space:pre-wrap}.timeline-post-composer [data-state="error"]{color:#a52b2b}.timeline-post-composer [data-state="success"]{color:#08674f}
@media(max-width:600px){.timeline-post-composer .timeline-post-form{grid-template-columns:1fr}.timeline-post-composer .timeline-post-form label:nth-of-type(2),.timeline-post-composer .timeline-post-form label:nth-of-type(3){grid-column:auto}.timeline-post-composer .timeline-post-form button{width:100%}}
.timeline-post-actions{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.75rem}.timeline-post-history,.timeline-post-edit{display:grid;gap:.6rem;margin-top:.75rem;padding:.75rem;border-top:1px solid var(--app-border)}.timeline-post-history h5{margin:0}.timeline-post-revision{padding:.65rem;border-radius:9px;background:var(--app-surface)}.timeline-post-edit label{display:grid;gap:.35rem}.timeline-post-edit textarea{min-height:6rem}
.timeline-post-attachment{margin:.75rem 0 0}.timeline-post-attachment img{display:block;width:100%;max-height:32rem;object-fit:contain;border-radius:10px;background:var(--app-surface)}.timeline-post-attachment figcaption{margin-top:.35rem;color:var(--text-muted)}.timeline-post-form input[type=file]{max-width:100%;padding:.55rem;border:1px solid var(--app-border);border-radius:8px;background:var(--app-surface)}.timeline-post-form input[type=file].ft-file-input{position:absolute!important;width:1px!important;height:1px!important;max-width:none!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;background:transparent!important}
.timeline-post-discussion{margin-top:1rem;padding-top:.75rem;border-top:1px solid var(--app-border)}.timeline-post-discussion h5{margin:0 0 .5rem}.timeline-post-comments{display:grid;gap:.5rem}.timeline-post-comment{padding:.55rem;border-radius:9px;background:var(--app-surface)}.timeline-post-comment p{margin:.1rem 0 .25rem}.timeline-post-comment-actions{display:flex;flex-wrap:wrap;gap:.35rem;margin-top:.4rem}.timeline-post-comment-actions button{font-size:.8rem}
.topbar button.topbar-action,.topbar button#signout{background:transparent!important;color:#fff!important;border:1px solid #ffffff80!important;font-weight:700}.topbar button.topbar-action:hover,.topbar button#signout:hover{background:#ffffff20!important}
.timeline-post-composer{display:flex;align-items:center;gap:.7rem;margin:.25rem 0 1rem;padding:.6rem 0;border:0;background:transparent}.timeline-post-composer h3,.timeline-post-composer>p{display:none}.timeline-post-open{min-height:44px}.timeline-post-dialog{width:min(92vw,38rem)}.timeline-post-dialog .ft-modal-body{display:grid;grid-template-columns:1fr 1fr;align-content:start;gap:.75rem}.timeline-post-dialog .ft-modal-body>label:nth-of-type(-n+6),.timeline-post-dialog .ft-modal-body>fieldset,.timeline-post-dialog .ft-modal-body>.timeline-photo-date-suggestion,.timeline-post-dialog .ft-modal-body>.timeline-background-upload-choice,.timeline-post-dialog .ft-modal-body>.timeline-background-upload-help,.timeline-post-dialog .ft-modal-body>.timeline-photo-gps-choice,.timeline-post-dialog .ft-modal-body>.timeline-photo-gps-help,.timeline-post-dialog .ft-modal-body>#timeline-post-media-help,.timeline-post-dialog .ft-modal-body>.timeline-post-dialog-status{grid-column:1/-1}.timeline-post-dialog textarea{min-height:7rem;resize:vertical}.timeline-post-pending{display:inline-block;margin:.2rem 0}.timeline-card.timeline-post{border-left:4px solid var(--app-accent,#087e67)}.timeline-post-comment-form textarea{min-height:4rem}
@media(max-width:600px){.timeline-post-dialog{width:calc(100vw - 1rem)}.timeline-post-dialog .ft-modal-body{grid-template-columns:1fr}}

.timeline-post-discussion>summary{cursor:pointer;color:var(--app-muted);font-weight:600}
.timeline-photo-date-suggestion{grid-column:1/-1;display:flex;align-items:center;gap:.6rem;flex-wrap:wrap;padding:.65rem;border-radius:9px;background:var(--app-surface);color:var(--app-muted)}.timeline-photo-date-suggestion[hidden]{display:none}.timeline-photo-date-suggestion button{margin:0}.timeline-photo-gps-choice{grid-column:1/-1;display:flex!important;align-items:center;gap:.5rem}.timeline-photo-gps-choice[hidden]{display:none!important}.timeline-photo-gps-choice input{width:auto}.timeline-photo-gps-help{grid-column:1/-1;margin-top:-.5rem}

.face-interest-notice{line-height:1.55}.face-interest-attestation{display:grid;grid-template-columns:auto 1fr;align-items:start;gap:.65rem;margin:1rem 0;padding:1rem;border:1px solid var(--app-border);border-radius:12px;background:var(--app-soft);color:var(--app-text);line-height:1.5}.face-interest-attestation input{width:1.1rem;height:1.1rem;margin:.15rem 0 0;accent-color:var(--app-accent)}

.timeline-post-composer{justify-content:flex-end}
.timeline-post-dialog .ft-modal-body>label{display:grid;gap:.35rem;margin:0;min-width:0}
.timeline-post-dialog .ft-modal-body>label>input,.timeline-post-dialog .ft-modal-body>label>select,.timeline-post-dialog .ft-modal-body>label>textarea{width:100%;min-width:0;margin:0}
.timeline-post-dialog .ft-modal-body>label>input,.timeline-post-dialog .ft-modal-body>label>select,.timeline-post-dialog .ft-modal-body>label>textarea{min-height:44px;padding:.65rem .75rem;border:1px solid var(--app-border);border-radius:8px;background:var(--app-field);color:var(--app-control-text);font:inherit}
.timeline-post-dialog .ft-modal-body>label>textarea{min-height:7rem;resize:vertical}
.import-research-states{margin:.8rem 0;padding:.75rem;border:1px solid var(--app-border);border-radius:10px;background:var(--app-soft);color:var(--app-text)}.import-research-states h5,.import-research-states p{margin:.2rem 0 .55rem}.import-research-states table{width:100%;border-collapse:collapse;text-align:left}.import-research-states caption{text-align:left;font-weight:650;margin-bottom:.35rem}.import-research-states th,.import-research-states td{padding:.35rem .45rem;border-top:1px solid var(--app-border)}.import-research-states th:last-child,.import-research-states td:last-child{text-align:right;font-variant-numeric:tabular-nums}
.timeline-post-composer>.timeline-post-result:empty{display:none}.timeline-post-composer>.timeline-post-result:not(:empty){display:block;flex-basis:100%;margin:.15rem 0}
.timeline-post-composer>.timeline-post-result.timeline-post-result-toast{position:fixed;z-index:12000;top:calc(env(safe-area-inset-top,0px) + .75rem);left:50%;width:min(36rem,calc(100vw - 2rem));transform:translateX(-50%);padding:.85rem 1rem;border:1px solid var(--app-border);border-radius:12px;background:var(--app-card);box-shadow:0 8px 28px #0003;color:var(--app-text)}
.timeline-card-after-share{outline:3px solid var(--app-accent,#087e67);outline-offset:3px;transition:outline-color .4s ease}
.timeline-upcoming-prompts{display:grid;gap:.45rem;flex:1 1 100%;min-width:0;padding:.7rem .9rem;border:1px solid var(--app-border);border-radius:12px;background:var(--app-soft);color:var(--app-text)}.timeline-upcoming-prompts[hidden]{display:none}.timeline-upcoming-prompt{display:flex;align-items:center;justify-content:space-between;gap:.75rem;margin:0}.timeline-upcoming-prompt button{flex:0 0 auto}@media(max-width:600px){.timeline-upcoming-prompt{align-items:stretch;flex-direction:column}.timeline-upcoming-prompt button{width:100%}}
.timeline-event-fields{display:grid;grid-template-columns:1fr 1fr;gap:.75rem;min-width:0;margin:0;padding:.75rem;border:1px solid var(--app-border);border-radius:12px;background:var(--app-surface);color:var(--app-text)}
.timeline-event-fields legend{padding:0 .35rem;font-weight:700}
.timeline-event-fields label{display:grid;gap:.35rem}
.timeline-event-fields label:first-of-type{grid-column:1/-1}
.timeline-event-participants{display:grid;gap:.5rem;grid-column:1/-1}

/* Keep the main stream focused like a social feed, with a clear author row. */
.timeline-card.timeline-post{position:relative;padding:1.1rem 1.2rem;border-inline-start:3px solid var(--app-accent);box-shadow:0 2px 8px color-mix(in srgb,var(--app-text) 7%,transparent)}
.timeline-post-author{float:right;display:flex;justify-content:flex-end;align-items:center;max-width:min(42%,18rem);margin:0 2.5rem .35rem 1rem;text-align:right}
.timeline-post-byline{display:grid;gap:.12rem;min-width:0;text-align:right}
.timeline-post-byline strong{color:var(--app-text);font-size:.95rem;line-height:1.25}
.timeline-post-shared-date{color:var(--app-muted);font-size:.8rem}
.timeline-post-signature{margin-top:-.3rem;color:var(--app-muted);font-style:italic;text-align:right}
.timeline-post-menu{position:absolute;top:.75rem;right:.8rem;z-index:5}
.timeline-post-menu>summary{display:grid;place-items:center;width:2.25rem;height:2.25rem;border:1px solid var(--app-border);border-radius:.5rem;background:var(--app-card);color:var(--app-text);font-size:1.2rem;cursor:pointer;list-style:none}
.timeline-post-menu>summary::-webkit-details-marker{display:none}
.timeline-post-menu-items{position:absolute;top:calc(100% + .3rem);right:0;display:grid;min-width:9rem;padding:.3rem;background:var(--app-card);border:1px solid var(--app-border);border-radius:.6rem;box-shadow:0 8px 24px #0f172a2e}
.timeline-post-menu-items button{padding:.55rem .65rem;border:0;border-radius:.35rem;background:transparent;color:var(--app-text);text-align:left;cursor:pointer}
.timeline-post-menu-items button:hover{background:var(--app-soft)}
.timeline-post-menu-items button.danger{background:var(--app-danger,#a32d2d);color:#fff;font-weight:700}
.timeline-card.timeline-post>h3{margin:.15rem 0 .55rem;font-size:1.2rem;line-height:1.35}
.timeline-card.timeline-post>p{line-height:1.6}
.timeline-card.timeline-post .timeline-post-discussion{margin-top:1rem;padding-top:.85rem}
@media(max-width:600px){.timeline-card.timeline-post{padding:1rem}}
.timeline-event-participant{display:grid;grid-template-columns:minmax(0,1fr) minmax(10rem,.7fr) auto;align-items:center;gap:.6rem;padding:.5rem;border:1px solid var(--app-border);border-radius:9px;background:var(--app-card)}
.timeline-event-type{display:inline-block;margin:.25rem 0;padding:.25rem .55rem}
.timeline-event-participant-list{display:flex;flex-wrap:wrap;gap:.25rem .4rem}
.timeline-place-picker{display:grid;grid-column:1/-1;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:end;gap:.6rem}
.timeline-place-create{display:grid;grid-column:1/-1;grid-template-columns:minmax(0,1.2fr) minmax(0,.7fr) minmax(0,1fr) auto auto;align-items:end;gap:.6rem;margin:0;padding:.75rem;border:1px solid var(--app-border);border-radius:10px;background:var(--app-card);color:var(--app-text)}
.timeline-place-create legend{padding:0 .35rem;font-weight:700}.timeline-place-create label{display:grid;gap:.35rem}.timeline-place-create button{min-height:40px}.timeline-place-status{grid-column:1/-1;margin:0}
@media(max-width:600px){.timeline-event-fields{grid-template-columns:1fr}.timeline-event-fields label:first-of-type,.timeline-event-participants{grid-column:1}.timeline-event-participant{grid-template-columns:1fr auto}.timeline-event-participant label{grid-column:1/-1}}
@media(max-width:600px){.timeline-place-picker,.timeline-place-create{grid-template-columns:1fr}.timeline-place-picker>*{grid-column:1}.timeline-place-create>*{grid-column:1}.timeline-place-picker>button{width:100%}}


/* Tree settings use addressable, responsive sections and the shared theme tokens. */
.tree-settings-nav{display:flex;flex-wrap:wrap;gap:.45rem;margin:1rem 0 1.25rem;padding-bottom:.75rem;border-bottom:1px solid var(--app-border);}
.tree-settings-nav a{display:inline-flex;align-items:center;min-height:2.5rem;padding:.55rem .8rem;border:1px solid var(--app-border);border-radius:999px;background:var(--app-field);color:var(--app-control-text);text-decoration:none;font-weight:600;}
.tree-settings-nav a[aria-current="page"]{border-color:#087e67;background:#087e67;color:#fff;}
.tree-settings-nav a:focus-visible{outline:3px solid #f0b957;outline-offset:2px;}
#selected-tree .heading-row .tree-actions{justify-content:flex-end;margin-left:auto;}
@media(max-width:640px){.tree-settings-nav{flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;padding-bottom:.6rem}.tree-settings-nav a{white-space:nowrap;}}

.timeline-post-heading{align-items:center}.timeline-post-heading .timeline-post-open{margin-left:auto;flex-shrink:0}
@media(max-width:520px){.timeline-post-heading{align-items:flex-start;gap:.75rem}.timeline-post-heading .timeline-post-open{margin-left:0}}

/* Compact, theme-aware membership controls. Keep both selectors aligned on desktop and stack them on phones. */
#invite-form select,
#admin-member-list select {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  border: 1px solid var(--app-border);
  border-radius: 8px;
  padding: .6rem .7rem;
  background: var(--app-field);
  color: var(--app-control-text);
  font: inherit;
}
#admin-member-list li {
  display: grid;
  grid-template-columns: minmax(10rem, 1fr) repeat(2, minmax(9rem, .8fr));
  align-items: center;
  gap: .55rem;
}
.admin-invitation-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.admin-invitation-row button { flex: 0 0 auto; }
@media (max-width: 640px) {
  #admin-member-list li { grid-template-columns: 1fr; gap: .5rem; }
  .admin-invitation-row { align-items: stretch; flex-direction: column; }
}
.viewer-research-books{margin:1.5rem 0;padding:1rem;border:1px solid var(--app-border);border-radius:12px;background:var(--app-card);color:var(--app-text)}.viewer-research-book-picker{display:block;color:var(--app-text)}.viewer-research-book-picker select{display:block;width:100%;margin-top:.4rem;padding:.7rem;border:1px solid var(--app-border);border-radius:8px;background:var(--app-field);color:var(--app-control-text);font:inherit}.research-book-source{max-height:min(65vh,48rem);overflow:auto;overflow-wrap:anywhere;padding:1rem;border:1px solid var(--app-border);border-radius:10px;background:var(--app-soft);color:var(--app-text);line-height:1.55}
.date-input-hint,.date-input-preview{display:block;margin-top:.25rem;font-size:.78rem;font-weight:400;color:var(--app-muted);line-height:1.4}
.timeline-post-dialog .timeline-background-upload-choice{display:flex!important;grid-column:1/-1;align-items:flex-start;gap:.55rem}.timeline-post-dialog .timeline-background-upload-choice input{margin-top:.25rem}.timeline-post-dialog .timeline-background-upload-help{grid-column:1/-1;margin-top:-.45rem}
.timeline-generated{border-inline-start:4px solid var(--app-accent);background:var(--app-soft)}.timeline-generated-label{display:inline-flex;width:max-content;margin:.25rem 0 .5rem}.timeline-generated-action{display:block;min-height:40px;margin:.2rem 0 0}
.timeline-claim-status{display:inline-flex;margin:.25rem .35rem .25rem 0}.timeline-source-citation,.timeline-item-notes{overflow-wrap:anywhere}.timeline-source-citation strong,.timeline-item-notes strong{color:var(--app-text)}
.timeline-occasion-settings{display:grid;gap:.4rem;min-width:0;margin:0;padding:.65rem .8rem;border:1px solid var(--app-border);border-radius:10px}.timeline-occasion-settings legend{padding:0 .3rem;font-weight:650}.timeline-occasion-settings p{margin:0;min-height:1.2em}.timeline-upcoming-heading{margin:0;font-size:.95rem}
.timeline-occasion-settings .checkbox-row{min-height:44px;padding:.2rem .1rem;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}.timeline-occasion-settings .checkbox-row input{width:20px;height:20px;min-width:20px;min-height:20px;accent-color:var(--app-accent);cursor:pointer}.timeline-occasion-settings select{min-height:44px;touch-action:manipulation}
.settings-form{display:grid;gap:1.25rem;margin:1.2rem 0;max-width:40rem}
.settings-form fieldset{display:grid;gap:1rem;margin:0;padding:1rem 1.1rem;border:1px solid var(--app-border);border-radius:10px}
.settings-form legend{padding:0 .4rem;font-weight:700;color:var(--app-text)}
.settings-form label{display:grid;gap:.35rem;margin:0}
.settings-form select,.settings-form input{width:100%;min-height:44px;box-sizing:border-box;margin:0}
.settings-form select{padding:.65rem .75rem;border:1px solid var(--app-border);border-radius:8px;font:inherit;background:var(--app-field);color:var(--app-control-text)}
.settings-form select[multiple]{min-height:0}
.settings-form button{min-height:44px}
.settings-form .upload-help,.settings-form .message{margin:0}
.checkbox-row{display:flex;align-items:center;gap:.6rem;font-weight:650}
.checkbox-row input,.settings-form .checkbox-row input{width:auto;min-height:0;margin:0;flex:none}
.settings-form .checkbox-row{display:flex;gap:.6rem}
.settings-form small{color:var(--app-muted)}
.settings-form-actions{max-width:40rem;display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:.75rem}
.settings-form-actions [role=status]{margin:0 auto 0 0}
.account-settings-tabs{display:flex;gap:.5rem;margin:1.1rem 0 0;border-bottom:1px solid var(--app-border);overflow-x:auto}
.account-settings-tabs [role=tab]{min-height:44px;padding:.65rem 1rem;border:1px solid transparent;border-bottom:0;border-radius:8px 8px 0 0;background:transparent;color:var(--app-text);font:inherit;font-weight:650;white-space:nowrap;cursor:pointer}
.account-settings-tabs [aria-selected=true]{border-color:var(--app-border);background:var(--app-card);color:var(--app-accent)}
.settings-form [role=tabpanel]{display:grid;gap:1.25rem}
.settings-form [role=tabpanel][hidden]{display:none}
.account-email-section{display:grid;gap:.7rem}
.account-email-section h2{margin:.3rem 0 0;font-size:1.05rem}
.account-email-list{display:grid;gap:.5rem;margin:0;padding:0;list-style:none}
.account-email-list li{display:flex;justify-content:space-between;align-items:center;gap:.75rem;flex-wrap:wrap;padding:.65rem;border:1px solid var(--app-border);border-radius:8px}
.account-email-actions{display:flex;gap:.4rem}
.account-email-add{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:.6rem}
.account-email-add label{grid-column:1/-1}
.account-email-add input{min-height:44px;padding:.65rem .75rem;border:1px solid var(--app-border);border-radius:8px;background:var(--app-field);color:var(--app-control-text);font:inherit}
.account-session-button{justify-self:start;min-width:200px;border:1px solid var(--app-accent)!important}
.account-data-export{margin:0}

/* Keep menus above the people canvas and place timeline controls on one row. */
.topbar.app-topbar{position:relative;z-index:300}
.ft-account-menu .ft-account-panel{z-index:310}
.timeline-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:nowrap;gap:.5rem;margin-left:auto}
.timeline-actions #timeline-filters-toggle{order:1;flex:0 0 auto}
.timeline-actions .timeline-post-open{order:2;flex:0 0 auto;margin-left:0}
.timeline-post-composer h3{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.timeline-post-composer:has(.timeline-post-heading:only-child),.timeline-post-composer>.timeline-post-heading:not(:has(.timeline-post-open)){display:none}
.timeline-post-composer{margin:0;padding:0;gap:.5rem}
#timeline-status{margin:.5rem 0 0}
.timeline-post-moderation[hidden]{display:none!important}
#timeline-post-moderation{scroll-margin-top:1rem}
body.timeline-post-moderation-view #timeline-home> :not(#timeline-post-moderation):not(#timeline-evidence-moderation){display:none!important}
body.timeline-post-moderation-view #timeline-post-moderation,
body.timeline-post-moderation-view #timeline-post-moderation[hidden],
body.timeline-post-moderation-view #timeline-evidence-moderation,
body.timeline-post-moderation-view #timeline-evidence-moderation[hidden]{display:block!important}
body.timeline-post-moderation-view #timeline-post-moderation{min-height:18rem;padding:1.25rem;border:1px solid var(--app-border);border-radius:12px;background:var(--app-surface,var(--bg-card))}
.evidence-moderation{margin-top:1rem}
.evidence-review-search{display:grid;gap:.35rem;max-width:36rem}
.evidence-review-search input{box-sizing:border-box;width:100%;min-height:44px;padding:.65rem .75rem;border:1px solid var(--app-border);border-radius:8px;background:var(--app-field);color:var(--app-control-text);font:inherit}
.evidence-review-list{display:grid;gap:1rem;margin-top:1rem}
.evidence-review-card{display:grid;grid-template-columns:minmax(0,1fr);gap:.5rem;padding:1rem;border:1px solid var(--app-border);border-radius:10px;background:var(--app-surface,var(--bg-card))}
.evidence-review-card h3,.evidence-review-details{margin:.1rem 0}
.evidence-review-preview{display:block;max-width:min(100%,44rem);max-height:32rem;margin-inline:auto;object-fit:contain;object-position:center;border-radius:6px}
.evidence-review-actions{display:flex;align-items:center;flex-wrap:wrap;gap:.75rem;margin-top:.35rem}
.proposal-actions,.timeline-post-actions,.panel-actions,.pwa-update-actions,.export-preview-actions{justify-content:flex-end}
.heading-row>.quiet,.timeline-header>.quiet{margin-left:auto}
.tree-actions{justify-content:flex-end}
@media(max-width:650px){.timeline-actions>*{flex:0 0 auto}.timeline-actions .timeline-post-open{margin-left:auto}}

/* The sharing dialog styles every nested field and keeps inline actions below inputs. */
dialog.timeline-post-dialog[open]{overflow:hidden}
.timeline-post-dialog .timeline-event-fields{grid-template-columns:minmax(0,1fr);gap:1rem}
.timeline-post-dialog label{min-width:0;margin:0}
.timeline-post-dialog input:not([type=checkbox]):not([type=file]),.timeline-post-dialog select,.timeline-post-dialog textarea{box-sizing:border-box;width:100%;min-width:0;min-height:44px;margin:0;padding:.65rem .75rem;border:1px solid var(--app-border);border-radius:8px;background:var(--app-field);color:var(--app-control-text);font:inherit}
.timeline-post-dialog [hidden]{display:none!important}
.timeline-post-dialog .timeline-place-picker{grid-template-columns:minmax(0,1fr);align-items:stretch}
.timeline-post-dialog .timeline-place-create,.timeline-post-dialog .timeline-event-type-create{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem;min-width:0;margin:0;padding:.75rem;border:1px solid var(--app-border);border-radius:10px;background:var(--app-card)}
.timeline-place-create>label:first-of-type,.timeline-event-type-create>*,.timeline-inline-actions{grid-column:1/-1}
.timeline-inline-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:.5rem}
.timeline-post-dialog .timeline-place-status:empty,.timeline-post-dialog .timeline-event-participants:empty,.timeline-event-type-create>p:empty{display:none}
.timeline-inline-actions .quiet,.timeline-event-participant .quiet{border:1px solid var(--app-border);background:var(--app-card);color:var(--app-control-text)}
.timeline-post-dialog .timeline-event-participant{grid-template-columns:minmax(0,1fr) minmax(8rem,1fr) auto;align-items:end}
.timeline-post-dialog .timeline-event-participant>label{grid-column:auto}
.timeline-event-participant>span{align-self:center;overflow-wrap:anywhere}
.timeline-smart-picker{min-width:0;grid-column:1/-1}
.timeline-smart-picker>label{display:grid;gap:.35rem}
.timeline-post-dialog .timeline-smart-picker input[role=combobox]{padding-right:2rem;background-image:linear-gradient(45deg,transparent 50%,var(--app-muted) 50%),linear-gradient(135deg,var(--app-muted) 50%,transparent 50%);background-position:calc(100% - 17px) 50%,calc(100% - 12px) 50%;background-size:5px 5px;background-repeat:no-repeat}
.timeline-smart-options{max-height:15rem;overflow-y:auto;border:1px solid var(--app-border);border-radius:8px;margin-top:.25rem;padding:.25rem;background:var(--app-card);color:var(--app-text)}
.timeline-smart-options>button{display:block;width:100%;min-height:40px;text-align:left;border:0;border-radius:5px;padding:.5rem .65rem;background:transparent;color:var(--app-text);font:inherit;cursor:pointer}
.timeline-smart-options>button:hover,.timeline-smart-options>button[aria-selected=true]{background:var(--app-soft);color:var(--app-accent)}
.timeline-smart-options>p{margin:.5rem;font-size:.85rem;color:var(--app-muted)}
@media(max-width:480px){.timeline-post-dialog .timeline-place-create,.timeline-post-dialog .timeline-event-participant{grid-template-columns:minmax(0,1fr)}.timeline-event-participant>button{justify-self:end}}

/* Shared disclosure control for extra modal fields. */
.ft-modal .ft-modal-advanced-toggle { border: 0; background: transparent; text-decoration: underline; text-underline-offset: .18em; padding-inline: 0; justify-self: start; }
.ft-modal-footer .ft-modal-advanced-toggle { margin-right: auto; }

.relationship-history-dialog { width: min(760px, calc(100vw - 1.5rem)); }
.relationship-history-dialog .ft-modal-body { display: block; }
.relationship-history-dialog label { display: block; margin-block: .75rem; font-weight: 600; }
.relationship-history-dialog label input, .relationship-history-dialog label select, .relationship-history-dialog textarea { display: block; width: 100%; margin-top: .3rem; }
.relationship-history-dialog [hidden] { display: none !important; }
.relationship-history-list { padding-left: 1.3rem; }
.relationship-history-list > li { padding: .8rem .25rem; border-bottom: 1px solid var(--border-color, var(--app-border)); overflow-wrap: anywhere; }
.relationship-history-list p { margin: .3rem 0; }
.relationship-history-meta, .relationship-history-summary { color: var(--text-secondary, var(--app-muted)); }
.relationship-history-tools { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; }
.relationship-history-dialog fieldset { min-width: 0; }
.relationship-history-dialog .ft-modal-footer { flex-wrap: wrap; }
/* Viewer export options move into the shared app dialog at runtime, outside
   the embedded-viewer stylesheet scope. Keep primary download actions clear. */
.ft-export-dialog--viewer .btn-action-primary {
  background: #087e67 !important;
  color: #fff !important;
  border: 1px solid #066652 !important;
}
.ft-export-dialog--viewer .btn-action-primary:hover,
.ft-export-dialog--viewer .btn-action-primary:focus-visible {
  background: #066652 !important;
  color: #fff !important;
}
/* Timeline event visibility controls */
.timeline-event-type-filters{grid-column:1/-1;display:grid;gap:.45rem;margin:0;padding:.75rem;border:1px solid var(--app-border);border-radius:10px;background:var(--app-surface);color:var(--app-text)}.timeline-event-type-options{display:flex;flex-wrap:wrap;gap:.35rem .75rem}.timeline-event-type-options .checkbox-row{white-space:nowrap}
.ft-person-pill{display:inline-flex;align-items:center;gap:.32rem;max-width:100%;vertical-align:middle;color:var(--app-accent);font-weight:650;text-decoration:none;white-space:nowrap}
.ft-person-pill:hover,.ft-person-pill:focus-visible{text-decoration:underline}
.ft-person-pill-avatar{display:grid;place-items:center;flex:0 0 1.45rem;width:1.45rem;height:1.45rem;overflow:hidden;border-radius:50%;background:var(--app-soft);font-size:.9rem;line-height:1}
.ft-person-pill-avatar img{display:block;width:100%;height:100%;object-fit:cover}
.timeline-event-participant-list{display:flex;flex-wrap:wrap;align-items:center;gap:.35rem .55rem}.timeline-event-participant-pills{display:inline-flex;flex-wrap:wrap;align-items:center;gap:0}
.timeline-post-author{float:right;display:flex;justify-content:flex-end;align-items:center;max-width:min(42%,18rem);margin:0 2.5rem .3rem 1rem;text-align:right}
.timeline-photo-preview-dialog{width:min(96vw,100rem);height:min(96dvh,70rem);max-width:96vw;max-height:96dvh}
.timeline-photo-preview-dialog .ft-modal-body{display:grid;place-items:center;min-height:0;padding:.35rem;overflow:hidden}
.timeline-photo-preview-dialog .ft-modal-body img{display:block;max-width:100%;max-height:calc(96dvh - 8rem);object-fit:contain}
.timeline-photo-preview-open{margin:.45rem 0 0;padding:.4rem .65rem;border:1px solid var(--app-border);border-radius:.5rem;background:var(--app-card);color:var(--app-accent);font-weight:650}
.timeline-attachment-status{margin:.6rem 0;padding:.55rem .7rem;border-radius:.5rem;background:var(--app-soft)}
@media(max-width:600px){.timeline-post-author{max-width:60%;margin-right:2.35rem;margin-left:.6rem}.ft-person-pill{gap:.2rem}.ft-person-pill-avatar{flex-basis:1.25rem;width:1.25rem;height:1.25rem;font-size:.78rem}}
.timeline-decade[aria-pressed="true"]{border-color:#087e67;background:var(--app-soft);color:#08674f;box-shadow:inset 0 0 0 1px #087e67}
.timeline-post-discussion,.timeline-card.timeline-post .timeline-post-discussion{margin-top:.45rem!important;padding:0!important;border:0!important}
.timeline-post-dialog .ft-modal-body>.timeline-post-date-fields{grid-column:1/-1}
.timeline-source-preview.timeline-world-image{flex-direction:column;align-items:center}
.timeline-world-image>img{display:block;max-width:100%;max-height:32rem;object-fit:contain}
.timeline-world-image>figcaption{align-self:stretch;margin-top:.45rem;text-align:center;overflow-wrap:anywhere}
.timeline-tag-crop-dialog{width:min(96vw,68rem);max-width:96vw;max-height:96dvh}
.timeline-tag-crop-dialog .ft-modal-body{display:block;max-height:calc(96dvh - 10rem);overflow:auto}
.timeline-tag-crop-counter{margin:0 0 .5rem;text-align:center}
.timeline-tag-crop-slide h3{margin:.25rem 0 .65rem;overflow-wrap:anywhere}
.timeline-tag-crop-slide[hidden]{display:none}
.timeline-tag-crop-slide .media-region-host{width:100%;max-height:calc(96dvh - 15rem)}
.timeline-tag-crop-slide .media-region-image>img{max-width:100%;max-height:calc(96dvh - 18rem);object-fit:contain}
.timeline-tag-crop-dialog .ft-modal-footer{flex-wrap:wrap}
