:root{--paper:#f6f9ff;--white:#fff;--ink:#071b45;--muted:#526580;--line:#dce6f5;--blue:#063da8;--pale:#e8f1ff;--shadow:0 18px 55px #08256712;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:var(--paper);font-synthesis:none}
*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:wait;opacity:.55}:focus-visible{outline:3px solid #1761d6;outline-offset:3px}
.topbar{min-height:80px;padding:16px clamp(20px,5vw,72px);background:#061b4a;border-bottom:1px solid #315382;display:flex;justify-content:space-between;align-items:center;gap:12px}.brand{display:inline-flex;align-items:center;gap:10px;color:#fff;min-width:0}.brand-mark{width:43px;height:43px;object-fit:contain;flex:none}.brand-word{font:400 1.75rem Georgia,serif;letter-spacing:-.065em;white-space:nowrap}.brand-word span{color:#b5d8ff}
.main{max-width:1200px;margin:0 auto;padding:clamp(28px,5vw,60px) 20px 80px}h1,h2{font-family:Georgia,'Times New Roman',serif;font-weight:400;letter-spacing:-.045em}h1{font-size:clamp(34px,4.8vw,58px);line-height:1.1;margin:14px 0}h2{font-size:25px;line-height:1.2;margin:0 0 16px}p{line-height:1.6}.eyebrow{font-size:.67rem;letter-spacing:.17em;font-weight:750;color:#285aa8}.muted{color:var(--muted);font-size:14px}.heading{margin-bottom:30px}.panel{background:var(--white);border:1px solid var(--line);border-radius:8px;padding:24px;box-shadow:var(--shadow);margin-bottom:20px;min-width:0}
.auth-layout{min-height:65vh;display:grid;grid-template-columns:1.1fr .9fr;gap:clamp(30px,8vw,120px);align-items:center}.intro h1{max-width:620px}.intro>p{color:var(--muted);max-width:500px;font-size:17px}.intro .intro-note{font-size:13px;margin-top:36px;color:#285aa8}.auth-panel{max-width:470px;width:100%;padding:36px}.form{display:grid;gap:14px;margin-top:16px}.field{display:grid;gap:7px;font-size:13px;font-weight:700;color:#29446c}.field input,.field select,.field textarea{border:1px solid #bacbe3;border-radius:6px;background:#fff;color:var(--ink);padding:12px;min-width:0;width:100%}.field textarea{min-height:90px;resize:vertical}
.button{display:inline-flex;align-items:center;justify-content:center;min-height:48px;background:var(--blue);color:#fff;border:1px solid var(--blue);padding:10px 19px;border-radius:6px;font-size:.84rem;font-weight:700;justify-self:start}.button:hover:not(:disabled){background:#002b80}.quiet{background:transparent;color:#fff;border-color:#b5d8ff}.quiet:hover:not(:disabled){background:#163d79}.link{border:0;padding:4px 0;background:transparent;color:#063da8;font-weight:700;text-decoration:underline;text-underline-offset:3px}.auth-links{display:flex;justify-content:space-between;flex-wrap:wrap;gap:14px;margin-top:20px}.notice{padding:12px 14px;background:#e8f1ff;color:#173d70;border-radius:6px;font-size:14px;line-height:1.5}.notice.error{background:#fff0ed;color:#8a2c23}.empty{color:var(--muted);padding:16px 0}.section-title{display:flex;justify-content:space-between;align-items:center;gap:20px}.count{font-size:12px;color:#174c91;background:var(--pale);padding:8px 12px;border-radius:100px;white-space:nowrap}.grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.detail{border-top:1px solid var(--line);padding:14px 0}.detail summary{font-weight:600;cursor:pointer;overflow-wrap:anywhere}.notes{white-space:pre-wrap;overflow-wrap:anywhere}.relationship{border-top:1px solid var(--line);padding:12px 0;display:flex;justify-content:space-between;gap:12px;overflow-wrap:anywhere}.future{background:#e8f1ff}.future p{margin-bottom:0;color:var(--muted)}
.tree-scroll{overflow:auto;max-width:100%;padding-bottom:10px}.tree-board{position:relative;min-width:max-content;padding:18px 20px}.tree-lines{position:absolute;left:0;top:0;pointer-events:none;overflow:visible}.tree-lines path{stroke:#8caed8;stroke-width:2;fill:none}.generation{display:flex;justify-content:center;gap:20px;position:relative;margin-bottom:65px}.generation:last-child{margin-bottom:0}.person-card{background:#fff;border:1px solid #c6d8ef;border-radius:8px;box-shadow:0 4px 14px #08256712;display:flex;gap:10px;align-items:center;min-width:180px;max-width:230px;padding:14px;position:relative;overflow-wrap:anywhere}.person-card strong,.person-card small{display:block}.person-card small{font-size:12px;color:#526580;margin-top:5px}.avatar{width:38px;height:38px;flex:none;display:grid;place-items:center;background:#e8f1ff;border-radius:50%;color:#063da8;font-weight:700}.loading{padding:30px}.tree-board>.notice{max-width:500px;margin-bottom:20px}
.support-actions{display:flex;gap:10px;flex-wrap:wrap}.support .quiet{color:var(--blue);border-color:#8baad5}.support .quiet:hover:not(:disabled){background:#e8f1ff}.support-ticket{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-top:1px solid var(--line);overflow-wrap:anywhere}.support-ticket span{min-width:0}.support-detail{margin-top:20px;border-top:1px solid var(--line);padding-top:16px}.support-message{background:var(--paper);border-radius:6px;padding:12px;margin:10px 0}.support-message p{white-space:pre-wrap;overflow-wrap:anywhere}.support h3{overflow-wrap:anywhere}
.tree-person{color:inherit;font:inherit;text-align:left}.tree-person:hover{border-color:#1761d6}.tree-focus{padding:12px 0;min-width:0}.tree-focus h3{overflow-wrap:anywhere}.tree-back{min-height:44px}.tree-related{margin-top:24px}.tree-related-cards{display:flex;flex-wrap:wrap;gap:12px}.tree-related-cards .tree-person{min-height:64px;max-width:min(100%,230px)}
.family-nav{display:flex;flex-wrap:wrap;justify-content:center;gap:4px;background:#0d1b2a;padding:6px;border-radius:6px;margin:0 0 20px}.family-tab{border:0;border-bottom:3px solid transparent;background:transparent;color:#e4edf7;min-height:48px;padding:10px 14px;font-size:.85rem}.family-tab[aria-current=page]{border-bottom-color:#e2c87a;color:white}.family-tab:focus-visible{outline:3px solid #e2c87a}.family-load{margin-top:20px}.family-request{border-top:1px solid var(--line);padding:14px 0;overflow-wrap:anywhere}.family-request-body{white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:720px){.auth-layout,.grid{grid-template-columns:1fr}.auth-layout{gap:20px}.intro>p{font-size:15px}.intro .intro-note{margin-top:18px}.auth-panel{padding:24px}.topbar{min-height:70px;padding:12px 16px}.brand-mark{width:38px;height:38px}.brand-word{font-size:1.5rem}.main{padding:30px 16px 60px}.panel{padding:19px}.generation{gap:12px}.person-card{min-width:155px;max-width:190px}}

.gallery-album{border-top:1px solid var(--line);padding:18px 0}.gallery-album h3{overflow-wrap:anywhere}.gallery-form{display:flex;flex-wrap:wrap;align-items:end;gap:12px;margin:16px 0}.gallery-form .field{flex:1 1 220px}.gallery-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr));gap:14px}.gallery-card{border:1px solid var(--line);border-radius:6px;padding:12px;display:flex;flex-wrap:wrap;gap:8px;align-content:start;min-width:0}.gallery-card img{width:100%;height:180px;object-fit:contain;background:#f6f9ff}.gallery-card .button{padding:8px 12px;font-size:.78rem}

.person-photo { object-fit: cover; width: 42px; height: 42px; border-radius: 50%; }
.person-photo-controls { display: grid; gap: .5rem; margin: .75rem 0; }
