:root {
  --ink: #1c2b24;          /* deep evergreen */
  --ink-2: #2c4136;
  --cream: #f7f2e8;
  --paper: #fbf8f2;
  --card: #ffffff;
  --gold: #b88a3e;
  --gold-soft: #d4b06a;
  --rose: #a4524a;
  --sage: #7d8f74;
  --text: #24302a;
  --muted: #6f7a72;
  --line: #e4dccd;
  --shadow: 0 1px 2px rgba(28,43,36,.06), 0 8px 24px rgba(28,43,36,.08);
  --shadow-lg: 0 2px 6px rgba(28,43,36,.08), 0 24px 60px rgba(28,43,36,.16);
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 16px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 15.5px/1.55 var(--sans); color: var(--text); background: var(--paper);
  -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: .2px; color: var(--ink); }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 28px;
  padding: 14px clamp(16px, 4vw, 48px); background: rgba(251,248,242,.86);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s, background .2s; }
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar.dark { background: transparent; }
.topbar.dark .brandtext, .topbar.dark nav a { color: #f3ecdd; }
.topbar.dark nav a.on { color: #fff; }
.topbar.dark.scrolled { background: rgba(28,43,36,.92); border-bottom-color: rgba(255,255,255,.08); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.monogram { width: 36px; height: 36px; border-radius: 10px; background: var(--ink); color: var(--gold-soft);
  display: grid; place-items: center; font: 600 22px/1 var(--serif); box-shadow: inset 0 0 0 1px rgba(212,176,106,.35); }
.brandtext { font: 600 21px/1 var(--serif); color: var(--ink); letter-spacing: .3px; }
#nav { display: flex; gap: 4px; margin-left: auto; }
#nav a { text-decoration: none; color: var(--muted); font-weight: 500; font-size: 14.5px; padding: 8px 14px;
  border-radius: 999px; transition: background .15s, color .15s; }
#nav a:hover { color: var(--ink); background: rgba(28,43,36,.05); }
.topbar.dark nav a:hover { background: rgba(255,255,255,.08); }
#nav a.on { color: var(--ink); background: rgba(184,138,62,.14); }
.signbtn { border: 1px solid var(--gold); background: transparent; color: var(--ink); border-radius: 999px;
  padding: 8px 16px; font-weight: 500; font-size: 14px; cursor: pointer; transition: all .15s; white-space: nowrap; }
.signbtn:hover { background: var(--gold); color: #fff; }
.topbar.dark .signbtn { color: #f3ecdd; border-color: var(--gold-soft); }
.menubtn { display: none; }

/* ---------- layout ---------- */
main { min-height: 70vh; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.section { padding: 56px 0 8px; }
.eyebrow { font: 600 11.5px var(--sans); letter-spacing: 2.4px; text-transform: uppercase; color: var(--gold); margin: 0 0 8px; }
.h-page { font-size: clamp(38px, 5vw, 56px); line-height: 1.05; margin: 0 0 10px; }
.lede { color: var(--muted); font-size: 17px; max-width: 640px; margin: 0 0 28px; }
.h-sec { font-size: 32px; margin: 0 0 18px; display: flex; align-items: baseline; gap: 14px; }
.h-sec small { font: 500 13px var(--sans); color: var(--muted); }
.btn { display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer; text-decoration: none;
  background: var(--ink); color: #f7f2e8; padding: 12px 22px; border-radius: 999px; font-weight: 500; font-size: 15px;
  transition: transform .15s, box-shadow .15s, background .15s; box-shadow: 0 6px 18px rgba(28,43,36,.18); }
.btn:hover { transform: translateY(-1px); background: var(--ink-2); }
.btn.gold { background: var(--gold); color: #fff; box-shadow: 0 6px 18px rgba(184,138,62,.35); }
.btn.gold:hover { background: #a67a32; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.btn.ghost:hover { border-color: var(--gold); }
.btn.light { background: rgba(255,255,255,.1); color: #f7f2e8; border: 1px solid rgba(255,255,255,.25); box-shadow: none; }
.btn.light:hover { background: rgba(255,255,255,.18); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }

/* ---------- hero ---------- */
.hero { position: relative; margin-top: -65px; padding: 150px 0 110px; color: #f3ecdd; overflow: hidden;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(212,176,106,.22), transparent 60%),
    radial-gradient(900px 500px at 0% 110%, rgba(125,143,116,.25), transparent 60%),
    linear-gradient(160deg, #1c2b24 0%, #22362c 55%, #1a2721 100%); }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.06'/%3E%3C/svg%3E"); }
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero .eyebrow { color: var(--gold-soft); }
.hero h1 { color: #fbf6ea; font-size: clamp(52px, 8vw, 96px); line-height: .95; margin: 0 0 22px; font-weight: 500; }
.hero h1 em { font-style: italic; color: var(--gold-soft); font-weight: 400; }
.hero p.sub { font: italic 400 24px/1.4 var(--serif); color: #d9d0bd; max-width: 520px; margin: 0 0 34px; }
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.12); border-radius: 20px; overflow: hidden; }
.stat { background: rgba(20,32,26,.55); padding: 26px 24px; }
.stat b { display: block; font: 500 54px/1 var(--serif); color: var(--gold-soft); }
.stat span { font-size: 13px; letter-spacing: 1.4px; text-transform: uppercase; color: #bfb6a2; }
.tree-art { position: absolute; right: -60px; bottom: -40px; width: 520px; opacity: .08; z-index: 0; }

/* ---------- coming up ---------- */
.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.ev { display: flex; gap: 16px; align-items: center; padding: 16px 18px; }
.ev.today { border-color: var(--gold-soft); background: linear-gradient(135deg, #fffaf0, #fff); box-shadow: 0 0 0 3px rgba(212,176,106,.18), var(--shadow); }
.datebadge { flex: none; width: 58px; height: 64px; border-radius: 12px; background: var(--cream); border: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: center; }
.datebadge small { font: 600 10.5px var(--sans); letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold); }
.datebadge b { font: 600 28px/1 var(--serif); color: var(--ink); }
.ev.an .datebadge { background: #fbf0ee; border-color: #efd5d0; } .ev.an .datebadge small { color: var(--rose); }
.ev .nm { font: 600 21px/1.15 var(--serif); color: var(--ink); }
.ev .what { font-size: 13.5px; color: var(--muted); }
.ev .what b { color: var(--rose); font-weight: 600; }
.pill { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; background: rgba(184,138,62,.14); color: #8a6526; }

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tile { padding: 28px; position: relative; overflow: hidden; }
.tile h3 { font-size: 28px; margin: 6px 0 8px; }
.tile p { color: var(--muted); margin: 0 0 20px; }
.tile .ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--cream); color: var(--gold); }
.tile.darkt { background: var(--ink); color: #e9e1cf; border-color: var(--ink); }
.tile.darkt h3 { color: #fbf6ea; } .tile.darkt p { color: #bfb6a2; } .tile.darkt .ico { background: rgba(255,255,255,.08); color: var(--gold-soft); }

.locked { text-align: center; padding: 48px 24px; }
.locked h3 { font-size: 30px; margin: 0 0 8px; }
.locked p { color: var(--muted); max-width: 460px; margin: 0 auto 22px; }

/* ---------- family tree ---------- */
.treebar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.treebar .spacer { flex: 1; }
.zoom { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; background: #fff; overflow: hidden; }
.zoom button { border: 0; background: transparent; padding: 8px 14px; cursor: pointer; color: var(--ink); font-weight: 500; }
.zoom button:hover { background: var(--cream); }
.zoom button + button { border-left: 1px solid var(--line); }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--muted); }
.treeport { position: relative; height: calc(100vh - 220px); min-height: 520px; overflow: auto; cursor: grab;
  border-radius: 22px; border: 1px solid var(--line);
  background:
    radial-gradient(circle at 1px 1px, rgba(28,43,36,.09) 1px, transparent 0) 0 0/22px 22px,
    linear-gradient(180deg, #fdfbf6, #f6f0e4); box-shadow: inset 0 2px 12px rgba(28,43,36,.05); }
.treeport.grabbing { cursor: grabbing; }
.treeport::-webkit-scrollbar { height: 10px; width: 10px; } .treeport::-webkit-scrollbar-thumb { background: #d9cfbd; border-radius: 10px; }
.treeinner { display: inline-block; min-width: 100%; padding: 48px 60px 80px; transform-origin: top left; transition: transform .25s ease; }

.tree, .tree ul { display: flex; justify-content: center; margin: 0; padding: 0; position: relative; }
.tree ul { padding-top: 34px; }
.tree li { list-style: none; position: relative; padding: 34px 10px 0; display: flex; flex-direction: column; align-items: center; }
.tree > li { padding-top: 0; }
/* connectors */
.tree li::before, .tree li::after { content: ""; position: absolute; top: 0; right: 50%; width: 50%; height: 34px;
  border-top: 1.5px solid var(--lc, #c9b99c); }
.tree li::after { right: auto; left: 50%; border-left: 1.5px solid var(--lc, #c9b99c); }
.tree li:only-child::before, .tree li:only-child::after { display: none; }
.tree li:only-child { padding-top: 0; }
.tree li:first-child::before, .tree li:last-child::after { border: 0 none; }
.tree li:last-child::before { border-right: 1.5px solid var(--lc, #c9b99c); border-radius: 0 10px 0 0; }
.tree li:first-child::after { border-radius: 10px 0 0 0; }
.tree ul::before { content: ""; position: absolute; top: 0; left: 50%; height: 34px; border-left: 1.5px solid var(--lc, #c9b99c); }
.tree > li::before, .tree > li::after { display: none; }
.tree ul > li:only-child { padding-top: 0; }

.node { position: relative; display: inline-flex; align-items: stretch; background: #fff; border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow); cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s;
  border-top: 3px solid var(--bc, var(--gold)); }
.node:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.node.open { border-color: var(--bc, var(--gold)); }
.node .per { display: flex; flex-direction: column; align-items: center; padding: 14px 14px 12px; min-width: 112px; max-width: 150px; text-align: center; }
.node .per + .per { border-left: 1px dashed var(--line); }
.node .ring { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 1px solid var(--line); display: grid; place-items: center; color: var(--rose); font-size: 11px; z-index: 1; }
.node.trio .ring { display: none; }
.av { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; font: 600 19px/1 var(--serif); color: #fff;
  background: linear-gradient(140deg, var(--bc, var(--gold)), color-mix(in srgb, var(--bc, var(--gold)) 70%, #000)); margin-bottom: 8px;
  box-shadow: 0 0 0 3px #fff, 0 0 0 4px color-mix(in srgb, var(--bc, var(--gold)) 35%, transparent); }
.per.spouse .av { background: linear-gradient(140deg, #cfc4ae, #a99d85); box-shadow: 0 0 0 3px #fff, 0 0 0 4px #e4dccd; }
.per.mem .av { filter: grayscale(1); opacity: .75; }
.per .fn { font: 600 18px/1.1 var(--serif); color: var(--ink); }
.per .ln { font: 500 10.5px var(--sans); letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.per .yr { font-size: 12px; color: var(--muted); margin-top: 4px; }
.node .kids { position: absolute; bottom: -12px; left: 50%; transform: translateX(-50%); background: var(--bc, var(--gold)); color: #fff;
  font: 600 11px var(--sans); border-radius: 999px; padding: 3px 10px; white-space: nowrap; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.node.open .kids { background: var(--ink); }
.root .node { border-top-width: 4px; }
.root .node .per { min-width: 150px; padding: 20px 20px 16px; }
.root .av { width: 64px; height: 64px; font-size: 24px; }
.root .per .fn { font-size: 24px; }
/* compact family card */
.fam { position: relative; width: 162px; padding: 16px 10px 18px; text-align: center; background: #fff; border: 1px solid var(--line);
  border-top: 3px solid var(--bc, var(--gold)); border-radius: 16px; box-shadow: var(--shadow); cursor: pointer;
  transition: transform .15s, box-shadow .15s, border-color .15s; }
.fam:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.fam.open { border-color: var(--bc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bc) 18%, transparent), var(--shadow); }
.fam .avs { display: flex; justify-content: center; margin-bottom: 9px; }
.fam .av { margin: 0; width: 46px; height: 46px; font-size: 17px; }
.fam .av.sp { margin-left: -12px; background: linear-gradient(140deg, #d6ccb8, #ad9f86); box-shadow: 0 0 0 3px #fff, 0 0 0 4px #e4dccd; }
.fam .nm { font: 600 18px/1.12 var(--serif); color: var(--ink); }
.fam .sn { font: 500 10px var(--sans); letter-spacing: 1.6px; text-transform: uppercase; color: var(--bc, var(--muted)); margin-top: 3px; }
.fam .yrs { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.fam.mem .av { filter: grayscale(1); opacity: .75; }
.fam.anon { cursor: default; width: 104px; padding: 14px 8px 12px; border-top-color: #d9d0bf; }
.fam.anon:hover { transform: none; box-shadow: var(--shadow); }
.fam.anon .av { width: 38px; height: 38px; background: repeating-linear-gradient(135deg, #e8e1d3 0 6px, #efe9dd 6px 12px); box-shadow: 0 0 0 3px #fff, 0 0 0 4px #e4dccd; }
.fam.anon .nm { font: 500 10.5px var(--sans); letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); }
.fam .kids, .node .kids { cursor: pointer; }
.fam .kids { position: absolute; bottom: -11px; left: 50%; transform: translateX(-50%); background: var(--bc, var(--gold)); color: #fff;
  font: 600 10.5px var(--sans); border-radius: 999px; padding: 3px 10px; white-space: nowrap; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.fam.open .kids { background: var(--ink); }
.tree li > .fam + ul, .tree li > .node + ul { margin-top: 6px; }
/* great-grandkids stack */
.stack { margin-top: 26px; position: relative; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.stack::before { content: ""; position: absolute; top: -26px; left: 50%; height: 26px; border-left: 1.5px solid var(--lc, #c9b99c); }
.chip { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 14px 5px 5px; min-width: 150px; box-shadow: 0 1px 3px rgba(0,0,0,.05); cursor: pointer; transition: transform .12s; }
.chip:hover { transform: translateX(2px); border-color: var(--bc); }
.chip .av { width: 30px; height: 30px; font-size: 12px; margin: 0; box-shadow: none; }
.chip .fn { font: 600 15px/1.1 var(--serif); color: var(--ink); }
.chip .yr { font-size: 11.5px; color: var(--muted); }
.child-anon .av, .chip.anon .av { background: repeating-linear-gradient(135deg, #e8e1d3 0 6px, #efe9dd 6px 12px); color: transparent; box-shadow: 0 0 0 3px #fff, 0 0 0 4px #e4dccd; }
.chip.anon { cursor: default; } .chip.anon .fn { font: 500 12px var(--sans); color: var(--muted); letter-spacing: 1px; text-transform: uppercase; }

/* ---------- the wall ---------- */
.wallroom { border-radius: 24px; padding: 34px clamp(14px, 3vw, 36px) 20px; position: relative; overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,.35), transparent 30%),
    repeating-linear-gradient(90deg, #ede3d1 0 58px, #e8dcc7 58px 60px);
  box-shadow: inset 0 0 80px rgba(80,60,30,.12), var(--shadow); border: 1px solid #e0d3bb; }
.wallroom::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 18px; background: linear-gradient(#cdbb9b, #b9a582); }
.shelfwrap { margin-bottom: 30px; }
.shelftitle { font: 600 12px var(--sans); letter-spacing: 2.6px; text-transform: uppercase; color: #8a6a3e; margin: 0 0 10px 6px; display: flex; gap: 10px; align-items: center; }
.shelftitle::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(138,106,62,.35), transparent); }
.shelf { display: flex; gap: 18px; align-items: flex-end; overflow-x: auto; overflow-y: hidden; padding: 14px 10px 8px; scrollbar-width: thin; }
.ledge { height: 16px; border-radius: 3px; background: linear-gradient(#a27a4f, #7a5634 60%, #5f4128);
  box-shadow: 0 10px 14px -6px rgba(60,40,20,.45), inset 0 1px 0 rgba(255,255,255,.25); }
.wf { flex: none; width: 108px; cursor: pointer; transition: transform .2s; }
.wf.wide { width: 170px; }
.wf:hover { transform: translateY(-5px) rotate(0) !important; }
.wf .mat { background: #fffdf8; padding: 9px; border: 8px solid #3a2a1d; box-shadow: 3px 5px 10px rgba(40,25,10,.35), inset 0 0 0 1px rgba(0,0,0,.06); }
.wf:nth-child(3n+2) .mat { border-color: #b8925a; }
.wf:nth-child(4n+3) .mat { border-color: #f3eee4; box-shadow: 3px 5px 10px rgba(40,25,10,.25), 0 0 0 1px #d8cdb8; }
.wf:nth-child(5n+4) .mat { border-color: #1f1f1f; }
.wf .ph { aspect-ratio: 4/5; background: linear-gradient(160deg, #e6dfd0, #cfc4ae) center/cover; display: flex; align-items: center; justify-content: center; gap: 4px; flex-wrap: wrap; }
.wf.wide .ph { aspect-ratio: 4/3; }
.wf .ph span { font: 600 15px var(--serif); color: #7d6f57; background: rgba(255,255,255,.55); border-radius: 50%; width: 32px; height: 32px; display: inline-grid; place-items: center; }
.wf .cap { font-size: 12px; line-height: 1.3; text-align: center; margin-top: 8px; color: #4a3a2b; min-height: 32px; }
.wf .cap b { font: 600 14.5px/1.1 var(--serif); display: block; color: #2b2118; }
.wf.mem .ph { filter: grayscale(1) sepia(.2); }
.wf.mystery .mat { border-color: #c9a227; box-shadow: 0 0 0 3px rgba(201,162,39,.25), 3px 5px 10px rgba(40,25,10,.35); }
.wf.mystery .ph { background: radial-gradient(circle, #fff6d8, #f0dfa8); }
.wf.mystery .ph span { font-size: 30px; width: 50px; height: 50px; color: #a97c12; background: rgba(255,255,255,.7); }
.wf.mystery { animation: sway 4s ease-in-out infinite; }
@keyframes sway { 0%,100% { transform: rotate(-1.2deg); } 50% { transform: rotate(1.2deg); } }
.newbanner { display: flex; gap: 16px; align-items: center; padding: 18px 22px; margin-bottom: 20px;
  background: linear-gradient(120deg, #fff8e4, #fff); border-color: #ecd9a4; }
.newbanner .ico { font-size: 26px; color: #b8860b; }

/* ---------- calendar ---------- */
.calhead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.calhead h2 { font-size: 40px; margin: 0 12px 0 0; min-width: 260px; }
.cal { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
.cal th { font: 600 11px var(--sans); letter-spacing: 1.8px; color: var(--gold); text-transform: uppercase; padding: 12px 0; background: var(--cream); border-bottom: 1px solid var(--line); }
.cal td { height: 112px; vertical-align: top; padding: 8px; border-right: 1px solid #f0ebe0; border-bottom: 1px solid #f0ebe0; font-size: 12.5px; }
.cal td:last-child { border-right: 0; } .cal tr:last-child td { border-bottom: 0; }
.cal td.x { background: #fbf9f4; }
.cal td.now { background: #fffaf0; } .cal td.now .n { background: var(--gold); color: #fff; }
.cal .n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-weight: 600; font-size: 12.5px; color: var(--ink); margin-bottom: 4px; }
.cal .e { padding: 2px 7px; border-radius: 6px; margin-bottom: 3px; background: #f4efe4; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal .e.an { background: #fbeceb; color: var(--rose); font-style: italic; }
.cal .e i { font-style: normal; color: var(--muted); font-size: 11px; }
.subscribe { margin-top: 26px; padding: 26px 28px; display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; }
.subscribe h3 { font-size: 26px; margin: 0 0 4px; }
.subscribe p { margin: 0; color: var(--muted); }
.copyrow { display: flex; gap: 8px; margin-top: 12px; }
.copyrow input { flex: 1; font: 13px ui-monospace, Consolas, monospace; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--cream); color: var(--ink); min-width: 0; }

/* ---------- directory ---------- */
.search { width: 100%; max-width: 440px; font-size: 16px; padding: 14px 18px 14px 46px; border-radius: 999px; border: 1px solid var(--line); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%236f7a72' stroke-width='2'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='M13 13l4 4'/%3E%3C/svg%3E") 18px 50% no-repeat; box-shadow: var(--shadow); outline: none; }
.search:focus { border-color: var(--gold); }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-top: 22px; }
.pcard { display: flex; gap: 14px; align-items: center; padding: 14px 16px; cursor: pointer; transition: transform .12s, border-color .12s; }
.pcard:hover { transform: translateY(-2px); border-color: var(--gold-soft); }
.pcard .av { margin: 0; width: 46px; height: 46px; font-size: 17px; }
.pcard .fn { font: 600 19px/1.1 var(--serif); color: var(--ink); }
.pcard .sm { font-size: 12.5px; color: var(--muted); }

/* ---------- dialog ---------- */
dialog { border: 0; border-radius: 22px; padding: 0; width: min(520px, 94vw); box-shadow: var(--shadow-lg); background: var(--paper); color: var(--text); }
dialog::backdrop { background: rgba(20,30,25,.55); backdrop-filter: blur(4px); }
.dlg { padding: 30px 30px 26px; }
.dlg h2 { font-size: 34px; margin: 0 0 6px; }
.dlg .x { position: absolute; top: 14px; right: 16px; border: 0; background: transparent; font-size: 26px; color: var(--muted); cursor: pointer; }
.field { width: 100%; font-size: 17px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: #fff; outline: none; }
.field:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(184,138,62,.15); }
.err { color: var(--rose); font-size: 14px; min-height: 20px; margin: 8px 0; }
.prof-head { display: flex; gap: 18px; align-items: center; padding: 30px 30px 20px; background: linear-gradient(140deg, var(--bc, var(--ink)), color-mix(in srgb, var(--bc, var(--ink)) 60%, #000)); color: #fff; }
.prof-head .av { width: 76px; height: 76px; font-size: 28px; margin: 0; background: rgba(255,255,255,.18); box-shadow: 0 0 0 3px rgba(255,255,255,.4); }
.prof-head h2 { color: #fff; margin: 0; font-size: 34px; line-height: 1.05; }
.prof-head p { margin: 4px 0 0; opacity: .8; font-size: 14px; }
.facts { padding: 18px 30px 8px; }
.facts dl { display: grid; grid-template-columns: 110px 1fr; gap: 10px 14px; margin: 0; }
.facts dt { font: 600 11px var(--sans); letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold); padding-top: 3px; }
.facts dd { margin: 0; }
.facts a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--gold-soft); }
.photo-ph { margin: 14px 30px 0; border: 1.5px dashed var(--line); border-radius: 14px; padding: 22px; text-align: center; color: var(--muted); font-size: 14px; }

.foot { text-align: center; padding: 70px 20px 50px; color: var(--muted); }
.foot .ornament { font-size: 26px; color: var(--gold-soft); }
.foot p { margin: 6px 0; font: italic 19px var(--serif); color: var(--ink); }
.foot .small { font: 13px var(--sans); color: var(--muted); }
.fade { animation: fade .35s ease both; }
@keyframes fade { from { opacity: .4; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- mobile ---------- */
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: 1fr; }
  .subscribe { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .topbar { gap: 12px; }
  .menubtn { display: grid; gap: 5px; border: 0; background: transparent; padding: 8px; cursor: pointer; margin-left: auto; }
  .menubtn span { width: 22px; height: 2px; background: currentColor; display: block; }
  .topbar.dark .menubtn { color: #f3ecdd; }
  #nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: var(--paper); padding: 10px 16px 16px; border-bottom: 1px solid var(--line); }
  #nav.show { display: flex; }
  .topbar.dark nav a { color: var(--ink); }
  .signbtn { padding: 7px 12px; font-size: 13px; }
  .brandtext { font-size: 18px; }
  .hero { padding: 120px 0 70px; }
  .cal td { height: 76px; padding: 4px; font-size: 10.5px; }
  .cal .e { padding: 1px 4px; }
  .calhead h2 { font-size: 30px; min-width: 0; }
}
.fam .av { position: relative; z-index: 1; } .fam .av.sp { z-index: 0; }
html, body { overflow-x: hidden; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .stat { padding: 18px 16px; } .stat b { font-size: 42px; } .stat span { font-size: 11px; letter-spacing: 1px; } .hero p.sub { font-size: 20px; } .h-page { font-size: 40px; } }

/* ---------- app shell: bottom tabs on phones ---------- */
.tabbar { display: none; }
.agenda { display: none; }
.menubtn { color: var(--ink); }
.topbar.dark .menubtn { color: #f3ecdd; }
@media (max-width: 760px) {
  .topbar { padding-top: calc(10px + env(safe-area-inset-top)); padding-bottom: 10px; }
  nav#nav { display: none !important; }
  .menubtn { display: grid; place-items: center; margin-left: auto; padding: 6px; border: 0; background: transparent; }
  .menubtn span { display: none; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; justify-content: space-around;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: rgba(251,248,242,.94);
    backdrop-filter: saturate(1.4) blur(16px); -webkit-backdrop-filter: saturate(1.4) blur(16px); border-top: 1px solid var(--line); }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0 2px; text-decoration: none;
    color: var(--muted); font: 600 10.5px var(--sans); letter-spacing: .3px; border-radius: 12px; }
  .tabbar a.on { color: var(--ink); }
  .tabbar a.on svg { color: var(--gold); }
  body { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .foot { padding: 40px 20px 30px; }
  .section { padding-top: 28px; }
  .hero { margin-top: -60px; padding: 110px 0 56px; }
  .hero h1 { font-size: 58px; }
  .hero .ctas .btn { flex: 1; justify-content: center; }
  .treeport { height: calc(100vh - 300px); min-height: 420px; border-radius: 16px; }
  .treeinner { padding: 30px 24px 60px; }
  .treebar .btn.ghost { padding: 9px 14px; font-size: 13.5px; }
  .ev-grid { grid-template-columns: 1fr; }
  .cal { display: none; }
  .agenda { display: flex; flex-direction: column; gap: 10px; }
  .calhead h2 { width: 100%; }
  .calhead .btn.gold { width: 100%; justify-content: center; }
  .subscribe { padding: 22px; }
  .lede { font-size: 15.5px; }
  .wf { width: 92px; } .wf.wide { width: 140px; }
  .people { grid-template-columns: 1fr; }
  dialog { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 22px 22px 0 0; max-height: 88vh; }
}
.ag-day { display: flex; gap: 14px; align-items: flex-start; padding: 12px 14px; }
.ag-day.today { border-color: var(--gold-soft); box-shadow: 0 0 0 3px rgba(212,176,106,.18), var(--shadow); }
.ag-list { flex: 1; display: flex; flex-direction: column; gap: 6px; padding-top: 4px; }
.ag-e { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; cursor: pointer; }
.ag-e span { font: 600 18px/1.2 var(--serif); color: var(--ink); }
.ag-e i { font-style: normal; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.ag-e.an span { color: var(--rose); font-style: italic; }

/* ---------- flashcards ---------- */
.quizwrap { max-width: 720px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; scrollbar-width: none; }
.chipbtn { flex: none; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px; padding: 8px 15px; font-size: 14px; font-weight: 500; cursor: pointer; }
.chipbtn.on { background: var(--ink); color: #f7f2e8; border-color: var(--ink); }
.qsel { margin-bottom: 18px; max-width: 360px; font-size: 15px; padding: 11px 14px; }
.qprog { height: 6px; border-radius: 6px; background: #ebe4d6; overflow: hidden; }
.qprog div { height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-soft)); transition: width .3s; }
.qmeta { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin: 8px 2px 14px; }
.qcard { perspective: 1400px; cursor: pointer; height: 380px; -webkit-tap-highlight-color: transparent; }
.qinner { position: relative; width: 100%; height: 100%; transition: transform .55s cubic-bezier(.2,.7,.2,1); transform-style: preserve-3d; }
.qcard.flip .qinner { transform: rotateY(180deg); }
.qface { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 24px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px 26px; box-shadow: var(--shadow-lg); }
.qfront { background: #fff; border: 1px solid var(--line); }
.qfront::before { content: ""; position: absolute; inset: 12px; border: 1px solid #efe7d7; border-radius: 16px; pointer-events: none; }
.qback { transform: rotateY(180deg); background: linear-gradient(160deg, #1c2b24, #24392e); color: #f3ecdd; }
.qback .eyebrow { color: var(--gold-soft); }
.qq { font: 500 30px/1.25 var(--serif); color: var(--ink); max-width: 520px; }
.qq b { font-weight: 600; color: #8a6526; }
.qhint { position: absolute; bottom: 26px; font-size: 12.5px; color: var(--muted); letter-spacing: .4px; }
.qa { font: 500 34px/1.2 var(--serif); color: #fbf6ea; }
.qa b { font: 600 54px/1 var(--serif); color: var(--gold-soft); }
.qa .muted-s { display: block; font: 500 12px var(--sans); letter-spacing: 1.6px; text-transform: uppercase; color: #bfb6a2; margin-top: 6px; }
.qx { margin-top: 8px; font-size: 13px; color: #bfb6a2; }
.qfaces { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; }
.qf { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11.5px; color: #d9d0bd; }
.qf .av { width: 38px; height: 38px; font-size: 14px; margin: 0; box-shadow: 0 0 0 2px rgba(255,255,255,.25); }
.qbtns { display: flex; gap: 10px; justify-content: center; margin-top: 20px; }
.qbtns .btn { flex: 1; max-width: 240px; justify-content: center; padding: 15px 22px; font-size: 16px; }
.qdone { text-align: center; padding: 44px 24px; }
.qdone h3 { font-size: 34px; margin: 0 0 8px; }
.qdone p { color: var(--muted); }
@media (max-width: 760px) { .qcard { height: 400px; } .qq { font-size: 27px; } .qa { font-size: 30px; } }
.section.wrap { padding-left: clamp(16px, 4vw, 40px); padding-right: clamp(16px, 4vw, 40px); }
.av.has { background-size: cover; background-position: center; color: transparent; }
.prof-head .av.has { background-color: rgba(255,255,255,.18); }
.wf.mystery.revealed { animation: none; }
.wf.mystery.revealed .mat { border-color: #b8925a; }
.photo-ph img { display: block; }
.hearthead { margin: 70px auto 6px; text-align: center; font: 600 13px var(--sans); letter-spacing: 2.4px; text-transform: uppercase; color: var(--rose); }
.hearthead small { display: block; font: italic 400 17px var(--serif); letter-spacing: 0; text-transform: none; color: var(--muted); margin-top: 2px; }
.heartrow { display: flex; justify-content: center; gap: 50px; flex-wrap: wrap; margin-top: 22px; }
@media (max-width: 1180px) and (min-width: 761px) { #nav a { padding: 8px 9px; font-size: 13.5px; } .brandtext { display: none; } }

/* living tree */
.treeinner { position: relative; }
.treeinner > svg.branches { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 0; overflow: visible; }
.treeinner > .tree, .treeinner > .hearthead, .treeinner > .heartrow { position: relative; z-index: 1; }
.tree li::before, .tree li::after, .tree ul::before, .stack::before { display: none !important; }
.tree ul { padding-top: 46px; }
.tree li { padding-top: 46px; }
.tree > li { padding-top: 0; }
.tree ul > li:only-child { padding-top: 0; }
.root .node { margin: 46px 40px 0; box-shadow: 0 0 0 6px rgba(251,248,242,.9), var(--shadow-lg); }
.treeinner { padding-top: 70px; }
.stack { margin-top: 40px; }
.treeport { background:
    radial-gradient(ellipse at 50% 0%, rgba(122,158,92,.10), transparent 55%),
    radial-gradient(circle at 1px 1px, rgba(28,43,36,.07) 1px, transparent 0) 0 0/22px 22px,
    linear-gradient(180deg, #fdfbf6, #f4eedf); }

.tree ul { padding-top: 92px; }
.tree li, .tree ul > li:only-child { padding-top: 0; }
.tree ul > li { padding-left: 10px; padding-right: 10px; }
.stack { margin-top: 44px; }
.tree > li > ul { padding-top: 150px; } .tree ul ul { padding-top: 110px; }

/* ---------- tree theme across the whole site ---------- */
.topbar, .topbar.dark, .topbar.scrolled, .topbar.dark.scrolled {
  background: linear-gradient(180deg, #213429 0%, #1b2a22 100%); border-bottom: 0;
  backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: 0 6px 18px rgba(20,32,26,.18); }
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -13px; height: 16px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='16'%3E%3Cpath d='M0 3 Q35 11 70 3 T140 3' stroke='%23b88a3e' stroke-width='1.3' fill='none' opacity='.9'/%3E%3Cpath d='M16 6 c4-5 10-5 14 0 c-4 5-10 5-14 0z' fill='%236b9152'/%3E%3Cpath d='M44 7 c3 4 3 8 0 11 c-3-3-3-7 0-11z' fill='%234c7344' transform='rotate(-25 44 12)'/%3E%3Cpath d='M86 6 c4-5 10-5 14 0 c-4 5-10 5-14 0z' fill='%238fae6a'/%3E%3Cpath d='M112 4 c3 4 3 8 0 11 c-3-3-3-7 0-11z' fill='%235f8a4e' transform='rotate(30 112 9)'/%3E%3Ccircle cx='62' cy='8' r='2.2' fill='%23d4b06a'/%3E%3C/svg%3E") repeat-x; }
.topbar .brandtext, .topbar.dark .brandtext { color: #f3ead6; }
.topbar .monogram { background: #2c4136; color: #e2c27e; box-shadow: inset 0 0 0 1px rgba(212,176,106,.55); }
.topbar #nav a, .topbar.dark #nav a { color: #e6dcc6; font-weight: 500; }
.topbar #nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.topbar #nav a.on, .topbar.dark #nav a.on { color: #f6dca0; background: rgba(212,176,106,.18); box-shadow: inset 0 0 0 1px rgba(212,176,106,.35); }
.topbar .signbtn, .topbar.dark .signbtn { color: #f3ead6; border-color: #d4b06a; }
.topbar .signbtn:hover { background: #b88a3e; color: #fff; border-color: #b88a3e; }
.topbar .menubtn, .topbar.dark .menubtn { color: #f3ead6; }
.hero { margin-top: 0; padding: 104px 0 110px; }
.eyebrow::before { content: ""; display: inline-block; width: 15px; height: 10px; margin-right: 8px; vertical-align: -1px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='10'%3E%3Cpath d='M1 5 c4-6 10-6 13 0 c-3 6-9 6-13 0z' fill='%237a9e5c'/%3E%3Cpath d='M2 5 L12 5' stroke='%23fff' stroke-opacity='.5' stroke-width='.8'/%3E%3C/svg%3E") no-repeat; }
.foot { background: linear-gradient(180deg, #1b2a22, #15211b); color: #bfb6a2; margin-top: 60px; position: relative; }
.foot::before { content: ""; position: absolute; left: 0; right: 0; top: -3px; height: 16px; transform: scaleY(-1);
  background: inherit; }
.foot p { color: #f3ead6; } .foot .small { color: #a99f8a; }
@media (max-width: 760px) {
  .hero { margin-top: 0; padding: 70px 0 56px; }
  .tabbar { background: linear-gradient(180deg, #213429, #1a2821); border-top: 1px solid rgba(212,176,106,.35); }
  .tabbar a { color: #b9b09c; }
  .tabbar a.on { color: #f6dca0; }
  .tabbar a.on svg { color: #e2c27e; }
}
.monogram img { width: 30px; height: 30px; display: block; } .topbar .monogram { width: 40px; height: 40px; border-radius: 12px; }

/* ---------- grandchildren column ---------- */
.col { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: 74px 0 10px 30px; }
.citem { display: flex; flex-direction: column; align-items: flex-start; }
.fam.ccard { width: 210px; display: flex; align-items: center; gap: 10px; text-align: left; padding: 11px 12px 14px; border-top-width: 1px; border-left: 3px solid var(--bc, var(--gold)); }
.fam.ccard .avs { margin: 0; flex: none; }
.fam.ccard .av { width: 38px; height: 38px; font-size: 14px; }
.fam.ccard .av.sp { margin-left: -10px; }
.fam.ccard .nm { font-size: 16.5px; }
.fam.ccard .sn { margin-top: 1px; }
.fam.ccard .kids { left: auto; right: 10px; transform: none; bottom: -10px; }
.fam.ccard.anon { width: 120px; padding: 9px 10px; }
.strip { display: flex; flex-wrap: wrap; gap: 6px; width: 210px; margin: 16px 0 0 14px; }
.strip .chip { min-width: 0; padding: 3px 10px 3px 3px; gap: 7px; }
.strip .chip .av { width: 24px; height: 24px; font-size: 10px; }
.strip .chip .fn { font-size: 14px; }
.strip .chip .yr { display: none; }

/* ---------- header: sticky, clean edge (no garland) ---------- */
html, body { overflow-x: clip; }
.topbar::after { display: none; }
.topbar, .topbar.dark, .topbar.scrolled, .topbar.dark.scrolled { position: sticky; top: 0; border-bottom: 1px solid rgba(212,176,106,.45); }

/* ---------- wall shelves: no scrollbar, drag or use arrows ---------- */
.shelfbox { position: relative; }
.shelf { scrollbar-width: none; cursor: grab; scroll-behavior: smooth; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%); }
.shelf::-webkit-scrollbar { display: none; }
.shelf.dragging { cursor: grabbing; scroll-behavior: auto; }
.shelf.dragging .wf { pointer-events: none; }
.sarrow { position: absolute; top: 50%; transform: translateY(-60%); z-index: 3; width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(212,176,106,.6);
  background: rgba(28,43,36,.88); color: #f3ead6; font-size: 20px; line-height: 1; cursor: pointer; display: grid; place-items: center; box-shadow: 0 4px 12px rgba(0,0,0,.25); transition: opacity .2s, transform .15s; }
.sarrow:hover { background: #2c4136; }
.sarrow.l { left: -6px; } .sarrow.r { right: -6px; }
.sarrow[disabled] { opacity: 0; pointer-events: none; }
@media (max-width: 760px) { .sarrow { width: 34px; height: 34px; font-size: 16px; } }
.fam.ccard { width: 232px; } .strip { width: 232px; }

/* ---------- From Grandma ---------- */
.gnote { display: flex; gap: 20px; padding: 28px; background: linear-gradient(135deg, #fffaf0, #fff); border-color: #ecdcb6; }
.gnote .ico { flex: none; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: #1c2b24; color: #e2c27e; }
.gnote h3 { font-size: 30px; margin: 4px 0 8px; } .gnote p { color: var(--muted); margin: 0 0 18px; }
.notes { max-width: 820px; }
.bigbtn { font-size: 18px; padding: 16px 28px; margin-bottom: 22px; }
.note { padding: 34px 38px 28px; margin-bottom: 22px; }
.note h2 { font-size: 36px; margin: 2px 0 14px; line-height: 1.1; }
.nbody { font: 19px/1.7 var(--serif); color: #2b2a24; }
.nbody h2 { font-size: 28px; margin: 18px 0 8px; } .nbody p { margin: 0 0 14px; }
.nbody img { max-width: 100%; border-radius: 12px; margin: 8px 0; box-shadow: var(--shadow); }
.nbody blockquote { margin: 14px 0; padding: 4px 18px; border-left: 3px solid var(--gold-soft); font-style: italic; color: #4a4536; }
.nbody a { color: #8a6526; }
.nsign { font: italic 24px var(--serif); color: var(--gold); margin-top: 10px; }
.nactions { display: flex; gap: 10px; margin-top: 18px; border-top: 1px solid var(--line); padding-top: 16px; }
.nfiles { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.nfile { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--cream); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 14.5px; }
.nfile button { border: 0; background: none; font-size: 18px; color: var(--muted); cursor: pointer; }
.writer { max-width: 860px; }
.wtitle { font: 500 26px var(--serif); padding: 14px 18px; margin-bottom: 14px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 14px 14px 0 0; position: sticky; top: 70px; z-index: 5; }
.tb { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 10px; padding: 10px 14px; font: 500 15.5px var(--sans); cursor: pointer; }
.tb:hover { border-color: var(--gold); background: #fff; }
.tb.gold { background: #fff6e2; border-color: #e3c98f; }
.editor { min-height: 360px; background: #fff; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 14px 14px; padding: 24px 26px; font: 20px/1.7 var(--serif); color: #2b2a24; outline: none; }
.editor:empty::before { content: attr(data-ph); color: #aaa196; }
.editor img { max-width: 100%; border-radius: 12px; }
.editor blockquote { margin: 14px 0; padding: 4px 18px; border-left: 3px solid var(--gold-soft); font-style: italic; }
.wbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 18px; }
.wbar .bigbtn { margin: 0; }
.muted-s2 { color: var(--muted); font-size: 14px; }
@media (max-width: 760px) { .note { padding: 24px 20px; } .gnote { flex-direction: column; padding: 22px; } .toolbar { top: 62px; } .tb { padding: 9px 11px; font-size: 14.5px; } .editor { padding: 18px; } }
.treeinner { display: block; min-width: 0; width: max-content; margin: 0 auto; }
#nav a { white-space: nowrap; } @media (max-width: 1420px) and (min-width: 761px) { #nav a { padding: 8px 9px; font-size: 13.5px; } .topbar .brandtext { display: none; } } @media (max-width: 1040px) and (min-width: 761px) { #nav a { padding: 7px 6px; font-size: 12.5px; } }

/* ---------- add-to-home-screen helper ---------- */
#install { position: fixed; z-index: 40; }
#install.iwidget { right: 22px; bottom: 22px; }
#install.ipill { left: 12px; right: 12px; bottom: calc(78px + env(safe-area-inset-bottom)); }
#install > div, #install { display: flex; }
#install:empty { display: none; }
#install .igo { flex: 1; display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer; border: 1px solid rgba(212,176,106,.55);
  background: linear-gradient(135deg, #213429, #1a2821); color: #f3ead6; border-radius: 16px; padding: 10px 44px 10px 10px; box-shadow: 0 10px 30px rgba(20,32,26,.35); font: inherit; animation: rise .4s ease both; }
#install .igo img { width: 42px; height: 42px; border-radius: 11px; flex: none; }
#install .igo b { display: block; font: 600 15px var(--sans); }
#install .igo small { display: block; font-size: 12.5px; color: #c9bfa9; }
#install .ix { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: #c9bfa9; font-size: 22px; cursor: pointer; padding: 6px 8px; }
#install.iwidget .igo { max-width: 300px; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.isteps { list-style: none; padding: 0; margin: 18px 0 4px; display: grid; gap: 14px; }
.isteps li { display: flex; gap: 14px; align-items: flex-start; font-size: 15.5px; }
.ibadge { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--cream); border: 1px solid var(--line); display: grid; place-items: center; color: #2f6fd6; font-size: 22px; font-weight: 700; }
.ibadge img { width: 34px; height: 34px; border-radius: 8px; }
.iqr { display: flex; gap: 18px; align-items: center; margin-top: 8px; }
.iqr img { width: 150px; height: 150px; border-radius: 12px; border: 1px solid var(--line); flex: none; }
@media (max-width: 760px) { .iqr { flex-direction: column; } }
@media print { #install { display: none; } }

/* ---------- iPhone home-screen app polish ---------- */
html { background: #1c2b24; }
body { background: var(--paper); }
body::before { content: ""; position: fixed; left: 0; right: 0; top: 0; height: env(safe-area-inset-top); background: #1c2b24; z-index: 50; }
@media (max-width: 760px) {
  .topbar, .topbar.dark, .topbar.scrolled, .topbar.dark.scrolled { padding-top: calc(16px + env(safe-area-inset-top)); padding-bottom: 12px; }
  /* dialogs open near the top so the keyboard never covers the password box */
  dialog { margin: calc(14px + env(safe-area-inset-top)) auto auto; width: calc(100vw - 20px); max-width: 520px; border-radius: 20px; max-height: calc(100vh - 40px - env(safe-area-inset-top)); overflow: auto; }
}

/* Grandma's editing tools */
.gtools { margin: 18px 30px 0; padding: 16px; border-radius: 14px; background: #fff8e8; border: 1px solid #ecdcb6; display: flex; flex-wrap: wrap; gap: 8px; }
.gtools .eyebrow { width: 100%; margin: 0 0 2px; }
.gtools .btn { padding: 10px 16px; font-size: 15px; }
.btn.danger { color: var(--rose); border-color: #e7c4bf; }
.gform form { display: grid; gap: 14px; margin-top: 14px; }
.gform label { display: grid; gap: 6px; font-weight: 600; font-size: 15px; color: var(--ink); }
.gform label small { font-weight: 400; color: var(--muted); }
.gform .field { font-size: 18px; }

/* today stands out in Grandma's Calendar */
.ag-day.today { background: linear-gradient(135deg, #213429, #1a2821); border-color: #d4b06a; box-shadow: 0 0 0 3px rgba(212,176,106,.35), var(--shadow-lg); }
.ag-day.today .datebadge { background: #d4b06a; border-color: #d4b06a; }
.ag-day.today .datebadge small, .ag-day.today .datebadge b { color: #1c2b24; }
.ag-day.today .ag-e span { color: #fbf6ea; } .ag-day.today .ag-e i { color: #d9cfb8; } .ag-day.today .ag-e.an span { color: #f0b4a8; }
.ag-today { font: 700 11px var(--sans); letter-spacing: 2px; text-transform: uppercase; color: #e2c27e; margin-bottom: 2px; }
.cal td.now { background: #fff6dd; box-shadow: inset 0 0 0 2px #d4b06a; }
.cal td.now .n { width: auto; padding: 0 9px; border-radius: 999px; }
.cal td.now .n::after { content: " Today"; font-weight: 600; font-size: 11px; letter-spacing: .5px; }
@media (max-width: 760px) { .tabbar a { font-size: 10px; } .tabbar a svg { width: 21px; height: 21px; } }

/* "N children" tags sit inside the cards (no hanging off the edge), so zooming on phones can't push them over the names */
.node { flex-direction: column; align-items: center; padding-bottom: 12px; }
.node .pair { display: flex; align-items: stretch; }
.node .ring { position: static; transform: none; align-self: center; flex: none; margin: 0 -11px; z-index: 1; }
.node .kids, .fam .kids, .fam.ccard .kids { position: static; transform: none; display: inline-block; margin-top: 8px; left: auto; right: auto; bottom: auto; }
.fam { padding-bottom: 12px; }
.fam.ccard .txt { min-width: 0; }
.fam.ccard .kids { margin-top: 5px; }
.btn { text-align: center; } @media (max-width: 760px) { .hero .ctas .btn { justify-content: center; align-items: center; text-align: center; padding: 14px 16px; line-height: 1.25; } }

/* photo slots on a person's page */
.pslots { margin: 16px 30px 0; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.pslot { display: flex; flex-direction: column; gap: 6px; }
.pimg { display: grid; place-items: center; aspect-ratio: 4/3; border-radius: 12px; cursor: pointer; background: var(--cream) center/cover no-repeat;
  border: 1.5px dashed #d8ccb3; color: var(--gold); font: 300 34px var(--sans); }
.pimg[style*="url"] { border: 0; box-shadow: var(--shadow); }
.pslot.sq .pimg { aspect-ratio: 1; }
.pcap b { display: block; font-size: 14px; color: var(--ink); } .pcap small { color: var(--muted); font-size: 12px; }
@media (max-width: 760px) { .pslots { margin: 14px 18px 0; } .pgrid { grid-template-columns: 1fr 1fr; } }
/* crop and zoom */
.crop h2 { font-size: 24px; }
.cframe { position: relative; width: 100%; overflow: hidden; border-radius: 14px; background: #111; touch-action: none; cursor: grab; margin-top: 10px; }
.cframe img { position: absolute; left: 0; top: 0; transform-origin: 0 0; user-select: none; -webkit-user-drag: none; max-width: none; }
.czoom { width: 100%; margin: 16px 0 8px; accent-color: var(--gold); height: 28px; }
.cbtns { display: flex; gap: 10px; justify-content: flex-end; }
.cbtns .btn { flex: 1; justify-content: center; }

/* round photo tiles, circular crop lens, Wall photos */
.pimg, .pslot.sq .pimg { aspect-ratio: 1; border-radius: 50%; }
.pgrid { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.pslot { align-items: center; text-align: center; }
.prm { margin-top: 4px; border: 0; background: none; color: var(--rose); font: 600 13px var(--sans); cursor: pointer; padding: 4px 8px; }
.cframe .lens { position: absolute; inset: 0; pointer-events: none; border-radius: 50%; box-shadow: 0 0 0 9999px rgba(10,16,13,.62); outline: 2px solid rgba(255,255,255,.85); outline-offset: -2px; }
.chint { text-align: center; color: var(--muted); font-size: 13px; margin: 8px 0 0; }
.wf .ph.has { aspect-ratio: 1; padding: 0; overflow: hidden; }
.wf .ph.has img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* a clear, roomy close button on every pop-up */
dialog .x { position: absolute; top: 12px; right: 12px; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(28,43,36,.08); color: var(--ink); font-size: 26px; line-height: 1; border: 0; cursor: pointer; z-index: 3; }
dialog .x:hover { background: rgba(28,43,36,.16); }
dialog .prof-head ~ .x, dialog div > .x[style] { background: rgba(0,0,0,.32); color: #fff !important; }
.prof-head { padding-right: 64px; }
/* photo spots: fixed true circles (Safari was shrinking them) */
.pslot .pimg, .pslot.sq .pimg { width: 120px; height: 120px; min-width: 120px; aspect-ratio: auto; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background-size: cover; background-position: center; padding: 0; line-height: 1; }
.pslot .pimg span { display: block; font: 300 40px/1 var(--sans); margin-top: -4px; }
@media (max-width: 760px) { .pslot .pimg, .pslot.sq .pimg { width: 108px; height: 108px; min-width: 108px; } }
