/* Family site: Wall, Pictures, Recipes, Stories (family.js, pictures.js, recipes.js, stories.js) */
button.link { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font: inherit; }
button.link:hover { text-decoration: underline; }
.avatar.lg { width: 40px; height: 40px; font-size: 14px; }
.fm-empty { text-align: center; padding: 36px 16px; }
.fm-empty .big { font-size: 44px; }
.fm-filter { padding: 10px 12px; }

/* ---------- Wall */
.fm-wall { display: grid; grid-template-columns: minmax(0, 640px) 300px; gap: 18px; justify-content: center; align-items: start; }
.fm-side { position: sticky; top: calc(var(--head-h, 64px) + 12px); }
.fm-side h3 { margin-bottom: 10px; }
@media (max-width: 980px) { .fm-wall { grid-template-columns: minmax(0, 1fr); } .fm-side { position: static; order: -1; display: none; } }
.fm-compose textarea { flex: 1; border: 0; background: var(--soft); border-radius: 20px; padding: 10px 14px; resize: none; min-height: 56px; font: inherit; font-size: 15px; }
.fm-compose textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; background: #fff; }
.fm-compose.dragging { outline: 2px dashed var(--accent); }
.fm-compose-bar { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.fm-compose-bar .pickers { display: flex; gap: 6px; flex-wrap: wrap; }
.fm-pending { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.fm-pend { position: relative; width: 84px; height: 84px; border-radius: 8px; overflow: hidden; background: var(--soft); display: grid; place-items: center; font-size: 28px; }
.fm-pend img { width: 100%; height: 100%; object-fit: cover; }
.fm-pend .x { position: absolute; top: 3px; right: 3px; padding: 0 6px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; border: 0; font-size: 12px; }
.fm-post { padding: 14px 16px 6px; }
.fm-post-head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.fm-post-body { font-size: 15px; white-space: normal; word-wrap: break-word; margin-bottom: 10px; }
.fm-menu { position: relative; }
.fm-menu-pop { position: absolute; right: 0; top: 100%; z-index: 20; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); min-width: 170px; padding: 4px; }
.fm-menu-pop button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 6px; }
.fm-menu-pop button:hover { background: var(--soft); }
.fm-menu-pop .danger-t { color: var(--danger); }
.fm-photos { display: grid; gap: 3px; margin: 0 -16px 8px; grid-template-columns: repeat(6, 1fr); }
.fm-ph { position: relative; padding: 0; border: 0; background: var(--soft); aspect-ratio: 1; overflow: hidden; cursor: zoom-in; grid-column: span 3; border-radius: 0; }
.fm-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fm-photos.n1 .fm-ph { grid-column: span 6; aspect-ratio: auto; max-height: 560px; }
.fm-photos.n1 .fm-ph img { object-fit: contain; max-height: 560px; background: #111; }
.fm-photos.n3 .fm-ph:first-child { grid-column: span 6; aspect-ratio: 2 / 1; }
.fm-photos.n5 .fm-ph:nth-child(n+3) { grid-column: span 2; }
.fm-more { position: absolute; inset: 0; background: rgba(0,0,0,.45); color: #fff; font-size: 28px; font-weight: 700; display: grid; place-items: center; }
.fm-play { position: absolute; inset: 0; display: grid; place-items: center; font-size: 34px; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.6); pointer-events: none; z-index: 1; }
.fm-act-card .fm-post-head { margin-bottom: 10px; }
.fm-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; margin: 0 -16px 10px; text-decoration: none; position: relative; }
.fm-strip span { aspect-ratio: 1; background: var(--soft); overflow: hidden; }
.fm-strip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fm-strip-more { position: absolute; right: 0; bottom: 0; width: calc(100% / 6); display: grid; place-items: center; background: rgba(0,0,0,.45) !important; color: #fff; font-weight: 700; font-size: 18px; }
.fm-link-card { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 8px; text-decoration: none; color: inherit; margin-bottom: 10px; }
.fm-link-card:hover { background: var(--soft); }
.fm-link-card img { width: 86px; height: 86px; object-fit: cover; border-radius: 8px; flex: none; }
.fm-link-card > span:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fm-link-ico { width: 86px; height: 86px; border-radius: 8px; background: var(--soft); display: grid; place-items: center; font-size: 34px; flex: none; }
.fm-clip2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* likes + comments */
.fm-counts { display: flex; justify-content: space-between; align-items: center; padding: 4px 0 6px; font-size: 13px; color: var(--muted); }
.fm-rx-sum { letter-spacing: -2px; } .fm-rx-sum span { letter-spacing: 0; margin-left: 4px; }
.fm-actions { display: flex; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -4px; }
.fm-actions > * { flex: 1; }
.fm-act { width: 100%; border: 0; background: none; padding: 7px; border-radius: 6px; color: var(--muted); font-weight: 600; cursor: pointer; }
.fm-act:hover { background: var(--soft); }
.fm-act.on { color: #e11d48; }
.fm-like-wrap { position: relative; }
.fm-emojis { position: absolute; bottom: 100%; left: 4px; display: none; gap: 2px; background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 4px 6px; box-shadow: var(--shadow); z-index: 5; }
.fm-like-wrap:hover .fm-emojis, .fm-like-wrap:focus-within .fm-emojis { display: flex; }
.fm-emojis button { border: 0; background: none; font-size: 22px; padding: 2px 4px; cursor: pointer; transition: transform .1s; }
.fm-emojis button:hover { transform: scale(1.3); }
.fm-comments { padding: 6px 0 8px; display: flex; flex-direction: column; gap: 8px; }
.fm-cm { display: flex; gap: 8px; align-items: flex-start; }
.fm-cm-b { min-width: 0; }
.fm-cm-bubble { background: var(--soft); border-radius: 14px; padding: 6px 12px; word-wrap: break-word; }
.fm-cm-new { display: flex; gap: 8px; align-items: flex-start; }
.fm-cm-new textarea { flex: 1; border-radius: 16px; border: 1px solid var(--line); padding: 6px 12px; resize: none; font: inherit; min-height: 34px; }

/* side panels */
.fm-up { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.fm-up-ico { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-size: 17px; flex: none; }
.fm-up.today { background: #fff7ed; border-radius: 8px; padding: 4px; }
.fm-today { color: #c2410c; }
.fm-latest { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-bottom: 8px; }
.fm-latest button { padding: 0; border: 0; aspect-ratio: 1; overflow: hidden; border-radius: 6px; background: var(--soft); cursor: zoom-in; }
.fm-latest img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fm-family { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.fm-fam { display: flex; gap: 8px; align-items: center; }

/* ---------- picture viewer */
.fm-lb { position: fixed; inset: 0; z-index: 1000; background: rgba(10,10,12,.94); display: grid; grid-template-columns: 1fr 340px; }
.fm-lb-stage { display: grid; place-items: center; min-width: 0; min-height: 0; padding: 20px 56px; }
.fm-lb-stage img, .fm-lb-stage video { max-width: 100%; max-height: calc(100vh - 40px); object-fit: contain; border-radius: 4px; }
.fm-lb-file { color: #fff; text-align: center; font-size: 60px; } .fm-lb-file div { font-size: 14px; }
.fm-lb-side { background: #fff; overflow: auto; padding: 16px; }
.fm-lb-who { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.fm-lb-cap { font-size: 15px; }
.fm-lb-x { position: absolute; top: 12px; left: 12px; z-index: 2; background: rgba(255,255,255,.15); color: #fff; border: 0; border-radius: 50%; width: 40px; height: 40px; font-size: 18px; }
.fm-lb-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; background: rgba(255,255,255,.15); color: #fff; border: 0; border-radius: 50%; width: 46px; height: 46px; font-size: 30px; line-height: 1; }
.fm-lb-nav.prev { left: 10px; } .fm-lb-nav.next { right: 350px; }
.fm-lb .spinner { border-color: rgba(255,255,255,.2); border-top-color: #fff; }
@media (max-width: 800px) {
  .fm-lb { grid-template-columns: 1fr; grid-template-rows: minmax(0, 62vh) auto; overflow: auto; }
  .fm-lb-stage { padding: 50px 8px 8px; }
  .fm-lb-stage img, .fm-lb-stage video { max-height: 58vh; }
  .fm-lb-nav { top: 31vh; } .fm-lb-nav.next { right: 10px; }
}

/* ---------- Pictures */
.fm-pics { position: relative; min-height: 60vh; }
.fm-drop-hint { display: none; }
.fm-pics.dragging { outline: 3px dashed var(--accent); outline-offset: 4px; border-radius: 10px; }
.fm-pics.dragging .fm-drop-hint { display: grid; place-items: center; position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%); background: var(--accent); color: #fff; padding: 12px 22px; border-radius: 30px; font-weight: 700; z-index: 50; }
.fm-pics .page-head .pickers { display: flex; gap: 6px; flex-wrap: wrap; }
.fm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.fm-tile { position: relative; padding: 0; border: 0; aspect-ratio: 1; overflow: hidden; border-radius: 8px; background: var(--soft); cursor: zoom-in; }
.fm-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.fm-tile:hover img { transform: scale(1.04); }
.fm-tile-who { position: absolute; left: 6px; bottom: 6px; opacity: 0; transition: opacity .15s; }
.fm-tile:hover .fm-tile-who { opacity: 1; }
.fm-tile-who .avatar { width: 24px; height: 24px; font-size: 10px; border: 2px solid #fff; }
.fm-check { display: none; position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; background: rgba(0,0,0,.3); color: transparent; font-weight: 700; place-items: center; }
.fm-grid.selecting .fm-tile { cursor: pointer; } .fm-grid.selecting .fm-check { display: grid; }
.fm-tile.picked { outline: 3px solid var(--accent); outline-offset: -3px; }
.fm-tile.picked .fm-check { background: var(--accent); color: #fff; }
.fm-selbar { position: sticky; top: calc(var(--head-h, 64px) + 6px); z-index: 5; display: flex; gap: 8px; align-items: center; background: #fff; border: 1px solid var(--accent); border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; box-shadow: var(--shadow); }
.fm-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.fm-col { display: flex; flex-direction: column; text-decoration: none; color: inherit; background: var(--panel); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); transition: transform .15s; }
.fm-col:hover { transform: translateY(-2px); }
.fm-col-cover { aspect-ratio: 4 / 3; background: var(--soft); display: block; overflow: hidden; }
.fm-col-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fm-col-empty { display: grid; place-items: center; height: 100%; font-size: 40px; }
.fm-col-t { padding: 10px 12px; display: flex; flex-direction: column; }

/* ---------- Recipes */
.fm-recipes { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.fm-rcard { display: flex; flex-direction: column; text-decoration: none; color: inherit; background: var(--panel); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); transition: transform .15s; }
.fm-rcard:hover { transform: translateY(-2px); }
.fm-rcover { position: relative; aspect-ratio: 16 / 10; background: linear-gradient(135deg, #fef3c7, #fde68a); display: grid; place-items: center; font-size: 46px; overflow: hidden; }
.fm-rcover img { width: 100%; height: 100%; object-fit: cover; }
.fm-heart { position: absolute; top: 8px; right: 10px; color: #e11d48; font-style: normal; font-size: 20px; text-shadow: 0 0 4px #fff; }
.fm-rbody { padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.fm-rby { display: flex; gap: 6px; align-items: center; margin-top: auto; color: var(--muted); }
.fm-rby .avatar { width: 20px; height: 20px; font-size: 9px; }
.drawer.fm-rdrawer { width: min(720px, 100vw); }
.fm-recipe h3 { margin-top: 16px; }
.fm-rphotos { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 12px; }
.fm-rphotos button { padding: 0; border: 0; flex: none; width: 160px; height: 120px; border-radius: 8px; overflow: hidden; background: var(--soft); cursor: zoom-in; }
.fm-rphotos img { width: 100%; height: 100%; object-fit: cover; }
.fm-rfacts { display: flex; gap: 10px; flex-wrap: wrap; }
.fm-rfacts div { background: var(--soft); border-radius: 8px; padding: 6px 12px; display: flex; flex-direction: column; }
.fm-rfacts span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.fm-ing { list-style: none; padding: 0; margin: 0; columns: 2 220px; }
.fm-ing li { break-inside: avoid; padding: 3px 0; }
.fm-ing label { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.fm-ing li.done span { text-decoration: line-through; color: var(--muted); }
.fm-steps { padding-left: 22px; } .fm-steps li { margin-bottom: 8px; font-size: 15px; }

/* ---------- Stories */
.fm-stories { display: grid; gap: 14px; }
.fm-scard { display: block; text-decoration: none; color: inherit; transition: transform .15s; }
.fm-scard:hover { transform: translateY(-2px); }
.fm-scard h2 { font-family: Georgia, "Times New Roman", serif; font-size: 22px; margin-bottom: 2px; }
.fm-sx { font-family: Georgia, serif; font-size: 15px; color: #374151; }
.fm-scard .avatar { width: 22px; height: 22px; font-size: 9px; }
.fm-drafts { display: flex; gap: 10px; flex-wrap: wrap; }
.fm-draft { display: flex; flex-direction: column; border: 1px dashed var(--line); border-radius: 10px; padding: 8px 12px; text-decoration: none; color: inherit; min-width: 180px; }
.fm-draft:hover { border-color: var(--accent); }
.fm-read, .fm-write { max-width: 760px; margin: 0 auto; }
.fm-story { padding: 28px 36px; }
.fm-story h1 { font-family: Georgia, "Times New Roman", serif; font-size: 32px; line-height: 1.2; margin-bottom: 10px; }
.fm-byline { display: flex; gap: 8px; align-items: center; color: var(--muted); margin-bottom: 10px; }
.fm-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; color: var(--muted); }
.fm-story-body, .fm-editor { font-family: Georgia, "Times New Roman", serif; font-size: 18px; line-height: 1.7; color: #1f2933; }
.fm-story-body blockquote, .fm-editor blockquote { border-left: 3px solid var(--accent); margin: 12px 0; padding: 2px 16px; color: #4b5563; font-style: italic; }
.fm-story-body h2, .fm-editor h2 { font-size: 22px; margin: 20px 0 6px; }
.fm-title-in { width: 100%; border: 0; font: 700 26px Georgia, serif; padding: 4px 0 10px; outline: none; background: none; }
.fm-tools { display: flex; gap: 4px; flex-wrap: wrap; border: 1px solid var(--line); border-bottom: 0; border-radius: 8px 8px 0 0; padding: 6px; background: var(--soft); }
.fm-tools button { min-width: 34px; padding: 4px 8px; }
.fm-editor { min-height: 340px; border: 1px solid var(--line); border-radius: 0 0 8px 8px; padding: 14px 18px; outline: none; margin-bottom: 14px; background: #fff; }
.fm-editor:focus { border-color: var(--accent); }
.fm-editor:empty::before { content: attr(data-ph); color: #9ca3af; }
.fm-write-bar { position: sticky; bottom: 0; background: var(--bg); padding: 10px 0; }
@media (max-width: 600px) { .fm-story { padding: 18px 16px; } .fm-story h1 { font-size: 26px; } .fm-story-body, .fm-editor { font-size: 17px; } }

/* ---------- Family Address Book (familybook.js, SQL 057) */
.fb-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; }
.fb-bar input[type=search] { flex: 1 1 240px; min-width: 180px; }
.fb-bar select { width: auto; max-width: 240px; }
.fb-group { margin-bottom: 18px; }
.fb-ghead { display: flex; gap: 10px; align-items: baseline; margin: 6px 2px 8px; padding-bottom: 4px; border-bottom: 2px solid var(--accent); font-size: 15px; }
.fb-ghead[data-hh] { cursor: pointer; }
.fb-ghead[data-hh]:hover b { color: var(--accent); }
.fb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.fb-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: flex; gap: 12px; cursor: pointer; min-width: 0; }
.fb-card:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.fb-card.mem { background: #f8fafc; }
.fb-card .fb-main { min-width: 0; flex: 1; }
.fb-card .nm { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fb-card .nick { font-weight: 400; color: var(--muted); font-size: 13px; }
.fb-card .sub { font-size: 12px; color: var(--muted); }
.fb-card .ln { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fb-card .ln a { text-decoration: none; }
.fb-rel { display: inline-block; font-size: 11px; font-weight: 700; color: #92400e; background: #fef3c7; border-radius: 999px; padding: 1px 8px; margin: 2px 0; }
.fb-av { width: 48px; height: 48px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 17px; overflow: hidden; background: #94a3b8; }
.fb-av img { width: 100%; height: 100%; object-fit: cover; }
.fb-av.mem { filter: grayscale(.85); opacity: .85; }
.fb-av.big { width: 88px; height: 88px; font-size: 30px; }
.fb-av.sm { width: 32px; height: 32px; font-size: 12px; }
.fb-av.xs { width: 22px; height: 22px; font-size: 9px; }
.fb-dhead { display: flex; gap: 16px; align-items: center; margin-bottom: 6px; }
.fb-dhead h2 { margin: 0; font-size: 20px; }
.fb-act { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 6px; }
.fb-act a { text-decoration: none; }
.fb-q { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; padding: 6px 10px; min-width: 58px; }
.fb-q span { font-size: 18px; line-height: 1; }
.fb-sec { border-top: 1px solid var(--line); padding: 12px 0; }
.fb-sec > h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 8px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fb-sec > h3 button { text-transform: none; letter-spacing: 0; }
.fb-kv { display: grid; grid-template-columns: 110px 1fr auto; gap: 5px 10px; align-items: baseline; font-size: 14px; }
.fb-kv .k { font-size: 12px; color: var(--muted); }
.fb-kv .v { min-width: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.fb-kv .v a { text-decoration: none; }
.fb-kv .x a, .fb-kv .x button { padding: 2px 6px; font-size: 12px; border: 0; background: none; text-decoration: none; }
.fb-chips { display: flex; flex-wrap: wrap; gap: 6px; white-space: normal; }
.fb-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px 2px 3px; background: var(--panel); font-size: 13px; }
.fb-chip:hover { border-color: var(--accent); }
.fb-pill { display: inline-block; border-radius: 999px; padding: 1px 8px; font-size: 12px; background: var(--soft); margin: 1px 2px; text-transform: none; letter-spacing: 0; }
.fb-hhbtn { border: 0; background: var(--soft); border-radius: 8px; padding: 8px 12px; text-align: left; width: 100%; margin-bottom: 8px; }
.fb-notes { white-space: pre-wrap; font-size: 14px; }
.fb-health { background: #fff7f7; margin: 0 -16px; padding: 12px 16px; }
.fb-ed h4 { margin: 16px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.fb-ed h4 .muted, .fb-ed h4 button { text-transform: none; letter-spacing: 0; font-weight: 400; }
.fb-photo { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.fb-li { display: grid; grid-template-columns: 130px 1fr auto; gap: 6px; margin-bottom: 6px; }
.fb-md { display: grid; grid-template-columns: 1.4fr .8fr 1fr; gap: 6px; }
.fb-check { display: flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 600; margin: 6px 0; }
.fb-check input { width: auto; }
.fb-box { border: 1px dashed var(--line); border-radius: 8px; padding: 10px; margin: 6px 0 10px; }
.fb-addr { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 6px; }
.fb-addr input[name$=city] { grid-column: span 1; }
.fb-rel-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.fb-rel-row select { width: auto; max-width: 230px; }
.fb-rel-row .fb-md { display: inline-grid; width: 260px; }
.fb-sizes { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0 8px; }
.fb-hgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.fb-hcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; }
.fb-hcard:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.fb-hcard .nm { font-size: 15px; }
.fb-addrtxt { font-size: 14px; line-height: 1.35; }
.fb-addrtxt.big { font-size: 16px; }
.fb-faces { display: flex; align-items: center; gap: 0; flex-wrap: wrap; margin-top: 4px; }
.fb-faces > span[title] .fb-av { border: 2px solid var(--panel); margin-right: -6px; }
.fb-faces .small { margin-left: 12px; }
.fb-mlist { display: flex; flex-direction: column; gap: 6px; }
.fb-mrow { display: flex; gap: 10px; align-items: center; text-align: left; border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 8px 10px; }
.fb-mrow:hover { border-color: var(--accent); }
.fb-treewrap { overflow: auto; padding: 16px 8px; }
.fb-tree { display: inline-block; min-width: 100%; }
.fb-tree ul { padding-top: 22px; position: relative; display: flex; justify-content: center; margin: 0; padding-left: 0; }
.fb-tree > ul { padding-top: 0; }
.fb-tree li { list-style: none; position: relative; padding: 22px 6px 0; display: flex; flex-direction: column; align-items: center; }
.fb-tree > ul > li { padding-top: 0; }
.fb-tree li::before, .fb-tree li::after { content: ''; position: absolute; top: 0; right: 50%; width: 50%; height: 22px; border-top: 2px solid #cbd5e1; }
.fb-tree li::after { right: auto; left: 50%; border-left: 2px solid #cbd5e1; }
.fb-tree li:only-child::before, .fb-tree li:only-child::after { display: none; }
.fb-tree li:only-child { padding-top: 22px; }
.fb-tree li:only-child::after { display: block; border-top: 0; width: 0; left: 50%; }
.fb-tree > ul > li:only-child { padding-top: 0; }
.fb-tree > ul > li:only-child::after { display: none; }
.fb-tree li:first-child::before, .fb-tree li:last-child::after { border: 0 none; }
.fb-tree li:last-child::before { border-right: 2px solid #cbd5e1; border-radius: 0 6px 0 0; }
.fb-tree li:first-child::after { border-radius: 6px 0 0 0; }
.fb-tree li:only-child::after { border-left: 2px solid #cbd5e1; border-radius: 0; }
.fb-tree > ul > li:only-child::after { display: none; }
.fb-tree ul ul::before { content: ''; position: absolute; top: 0; left: 50%; border-left: 2px solid #cbd5e1; width: 0; height: 22px; }
.fb-couple { display: flex; align-items: center; gap: 2px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 4px; white-space: nowrap; }
.fb-node { display: flex; gap: 6px; align-items: center; text-align: left; border: 0; background: none; padding: 4px 8px 4px 4px; border-radius: 8px; line-height: 1.15; font-size: 13px; }
.fb-node:hover { background: var(--soft); }
.fb-node.focus { outline: 3px solid #f59e0b; }
.fb-node.mem { color: var(--muted); }
.fb-heart { color: #db2777; font-size: 14px; }
.fb-answer { font-size: 16px; padding: 10px 2px 0; }
.fb-cols { display: grid; grid-template-columns: 1fr 1.2fr; gap: 18px; align-items: start; }
@media (max-width: 900px) { .fb-cols { grid-template-columns: 1fr; } }
.fb-up { display: flex; flex-direction: column; gap: 6px; }
.fb-up .ev { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); cursor: pointer; }
.fb-up .ev:hover { border-color: var(--accent); }
.fb-up .ev.today { border-color: #f59e0b; background: #fffbeb; }
.fb-up .dt { width: 46px; text-align: center; flex: none; }
.fb-up .dt small { display: block; font-size: 11px; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.fb-up .dt b { font-size: 20px; line-height: 1.1; }
.fb-up .tx { flex: 1; min-width: 0; }
.fb-up .when { font-size: 12px; color: var(--muted); white-space: nowrap; }
.fb-months { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-top: 10px; }
.fb-month { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.fb-month > b { display: block; border-bottom: 2px solid var(--accent); margin-bottom: 4px; }
.fb-month div[data-open] { cursor: pointer; padding: 1px 0; }
.fb-month div[data-open]:hover { color: var(--accent); }
.fb-month .d { display: inline-block; width: 18px; font-weight: 700; }
.fb-cell { display: flex; gap: 8px; align-items: center; }
.fb-warn { color: #b91c1c; font-weight: 600; }
.fb-prt { display: grid; gap: 8px; }
.fb-prt button { text-align: left; padding: 12px; }
@media (max-width: 640px) {
  .fb-li { grid-template-columns: 1fr auto; }
  .fb-li .lab { grid-column: 1 / -1; }
  .fb-addr, .fb-sizes { grid-template-columns: 1fr 1fr; }
  .fb-kv { grid-template-columns: 90px 1fr auto; }
  .fb-rel-row select { max-width: 100%; }
}
