@font-face{font-family:"Inter";font-style:normal;font-weight:400;font-display:swap;src:url(fonts/inter-400.woff2) format("woff2")}@font-face{font-family:"Inter";font-style:normal;font-weight:500;font-display:swap;src:url(fonts/inter-500.woff2) format("woff2")}@font-face{font-family:"Inter";font-style:normal;font-weight:600;font-display:swap;src:url(fonts/inter-600.woff2) format("woff2")}@font-face{font-family:"Inter";font-style:normal;font-weight:700;font-display:swap;src:url(fonts/inter-700.woff2) format("woff2")}
/* One design system for every screen. Colours are variables; light and dark are two value sets. */
:root{--brand:#b45309;--brand-ink:#fff;--bg:#f6f4f0;--surface:#fff;--surface-2:#faf8f5;--ink:#1f2328;--muted:#667085;--line:#e4e0d8;--ok:#15803d;--warn:#b45309;--bad:#b91c1c;--info:#1d4ed8;
--radius:12px;--shadow:0 1px 2px rgba(16,24,40,.06),0 4px 14px rgba(16,24,40,.05);--side:256px;--font:"Inter","Noto Sans Devanagari","Noto Sans","Segoe UI",system-ui,-apple-system,Roboto,"Helvetica Neue",Arial,sans-serif}
[data-theme=dark]{--bg:#12151a;--surface:#1b1f26;--surface-2:#222831;--ink:#e7e9ee;--muted:#9aa4b2;--line:#2e3540;--shadow:0 1px 2px rgba(0,0,0,.5);--ok:#4ade80;--bad:#f87171;--info:#93c5fd;--warn:#fbbf24}
*{box-sizing:border-box}html{-webkit-text-size-adjust:100%}body{margin:0;background:var(--bg);color:var(--ink);font:15px/1.55 var(--font);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;font-synthesis:none;font-feature-settings:'kern','liga','calt'}h1,h2,h3,h4{font-weight:600;letter-spacing:-.01em}
a{color:var(--brand);text-decoration:none}a:hover{text-decoration:none}h1,h2,h3{margin:0;line-height:1.25}img{max-width:100%}
:focus-visible{outline:3px solid color-mix(in srgb,var(--brand) 55%,transparent);outline-offset:2px;border-radius:6px}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
/* layout */
.shell{display:grid;grid-template-columns:var(--side) 1fr;min-height:100vh}
.side{background:var(--surface);border-right:1px solid var(--line);position:sticky;top:0;height:100vh;overflow-y:auto;display:flex;flex-direction:column}
.brand{display:flex;gap:10px;align-items:center;padding:16px 18px;font-weight:700;font-size:17px;color:var(--ink);border-bottom:1px solid var(--line)}
.brand .logo{width:36px;height:36px;border-radius:10px;background:var(--brand);color:var(--brand-ink);display:grid;place-items:center;font-weight:700;flex:none;object-fit:cover}
.nav{padding:10px 10px 24px;flex:1}.nav h4{margin:16px 10px 6px;font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);font-weight:600}
.nav a{display:flex;align-items:center;gap:10px;padding:9px 10px;min-height:40px;border-radius:9px;color:var(--ink);font-weight:500}
.nav a:hover{background:var(--surface-2);text-decoration:none}.nav a.on{background:color-mix(in srgb,var(--brand) 13%,transparent);color:var(--brand);font-weight:600}
.nav svg,.btn svg,.ico{width:18px;height:18px;flex:none;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.nav .count{margin-left:auto;background:var(--bad);color:#fff;border-radius:99px;font-size:11px;padding:1px 7px}
.main{min-width:0;display:flex;flex-direction:column}
.top{display:flex;align-items:center;gap:8px;padding:10px 20px;background:var(--surface);border-bottom:1px solid var(--line);position:sticky;top:0;z-index:20}
.top .grow{flex:1}.content{padding:22px 24px 60px;max-width:1280px;width:100%;margin:0 auto}
.burger{display:none}.scrim{display:none}
/* page header: title + subtitle left, actions wrap right */
.gp-page-header{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-end;justify-content:space-between;margin-bottom:18px}
.gp-page-header h1{font-size:23px;display:flex;align-items:center;gap:8px}.gp-page-header p{margin:4px 0 0;color:var(--muted)}
.gp-page-header .actions{display:flex;flex-wrap:wrap;gap:8px}
.gear{display:inline-grid;place-items:center;width:30px;height:30px;border-radius:8px;color:var(--muted)}.gear:hover{background:var(--surface-2);color:var(--brand)}
/* components */
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}.card.pad{padding:18px}.card h3{font-size:16px;margin-bottom:10px}
.grid{display:grid;gap:16px}.g2{grid-template-columns:repeat(2,minmax(0,1fr))}.g3{grid-template-columns:repeat(3,minmax(0,1fr))}.g4{grid-template-columns:repeat(4,minmax(0,1fr))}
.cards{display:grid;gap:16px;grid-template-columns:repeat(auto-fill,minmax(260px,1fr))}
.stat{padding:16px;display:flex;gap:14px;align-items:center}.stat .ic{width:44px;height:44px;border-radius:12px;display:grid;place-items:center;background:color-mix(in srgb,var(--brand) 13%,transparent);color:var(--brand);flex:none}
.stat b{display:block;font-size:24px;line-height:1.1}.stat span{color:var(--muted);font-size:13px}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:40px;padding:8px 14px;border-radius:9px;border:1px solid var(--line);background:var(--surface);color:var(--ink);font:inherit;font-weight:600;cursor:pointer;white-space:nowrap}
.btn:hover{background:var(--surface-2);text-decoration:none}.btn.primary{background:var(--brand);border-color:var(--brand);color:var(--brand-ink)}.btn.primary:hover{filter:brightness(1.08)}
.btn.danger{color:var(--bad);border-color:color-mix(in srgb,var(--bad) 40%,var(--line))}.btn.ghost{border-color:transparent;background:transparent}.btn.sm{min-height:36px;padding:5px 10px;font-size:13px}.btn.icon{padding:8px;min-width:40px}
.btn[disabled]{opacity:.55;cursor:not-allowed}
.badge{display:inline-block;padding:2px 9px;border-radius:99px;font-size:12px;font-weight:600;background:var(--surface-2);border:1px solid var(--line);color:var(--muted)}
.badge.ok{color:var(--ok);border-color:color-mix(in srgb,var(--ok) 35%,var(--line))}.badge.warn{color:var(--warn);border-color:color-mix(in srgb,var(--warn) 35%,var(--line))}.badge.bad{color:var(--bad);border-color:color-mix(in srgb,var(--bad) 35%,var(--line))}
.toolbar{display:flex;flex-wrap:wrap;gap:10px;padding:12px 14px;border-bottom:1px solid var(--line);align-items:center}.toolbar .grow{flex:1 1 200px}
.table-wrap{overflow-x:auto}table{width:100%;border-collapse:collapse}th,td{padding:10px 14px;text-align:left;border-bottom:1px solid var(--line);vertical-align:middle}
th{font-size:12px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);font-weight:600;white-space:nowrap;background:var(--surface-2)}th.sortable{cursor:pointer}tbody tr:hover{background:var(--surface-2)}
td.act{white-space:nowrap;text-align:right}tr:last-child td{border-bottom:0}
.pager{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:space-between;padding:12px 14px;color:var(--muted);font-size:13px}
.empty{padding:44px 20px;text-align:center;color:var(--muted)}.empty svg{width:42px;height:42px;stroke:currentColor;fill:none;stroke-width:1.4;opacity:.6}.empty b{display:block;color:var(--ink);margin:8px 0 4px;font-size:16px}
.spinner{width:26px;height:26px;border:3px solid var(--line);border-top-color:var(--brand);border-radius:50%;animation:spin .7s linear infinite;margin:40px auto}@keyframes spin{to{transform:rotate(360deg)}}
label.f{display:block;margin-bottom:14px}label.f>span{display:block;font-weight:600;font-size:13px;margin-bottom:5px}label.f>span i{color:var(--bad);font-style:normal}
input,select,textarea{width:100%;font:inherit;font-size:16px;color:var(--ink);background:var(--surface);border:1px solid var(--line);border-radius:9px;padding:9px 11px;min-height:42px}
textarea{min-height:96px;resize:vertical}input[type=checkbox]{width:20px;height:20px;min-height:0;accent-color:var(--brand);vertical-align:middle}input[type=file]{padding:7px}
.check{display:flex;align-items:center;gap:9px;min-height:40px;font-weight:500}.err{color:var(--bad);font-size:13px;margin-top:4px}.invalid{border-color:var(--bad)}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 16px}.form-grid .wide{grid-column:1/-1}
.modal{position:fixed;inset:0;background:rgba(15,18,24,.55);display:grid;place-items:center;z-index:60;padding:14px}
.modal>.box{background:var(--surface);border-radius:14px;width:min(680px,100%);max-height:92vh;display:flex;flex-direction:column;box-shadow:0 20px 50px rgba(0,0,0,.3)}
.modal .hd{display:flex;align-items:center;justify-content:space-between;padding:14px 18px;border-bottom:1px solid var(--line)}.modal .hd h2{font-size:18px}
.modal .bd{padding:18px;overflow-y:auto}.modal .ft{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end;padding:12px 18px;border-top:1px solid var(--line)}.modal.sm>.box{width:min(420px,100%)}
.toasts{position:fixed;right:16px;bottom:16px;display:grid;gap:8px;z-index:80;max-width:min(380px,calc(100vw - 32px))}
.toast{background:var(--ink);color:var(--surface);padding:11px 15px;border-radius:10px;box-shadow:var(--shadow);border-left:4px solid var(--ok)}.toast.bad{border-left-color:var(--bad)}
.avatar{width:40px;height:40px;border-radius:50%;object-fit:cover;background:var(--surface-2);border:1px solid var(--line);display:inline-grid;place-items:center;font-weight:700;color:var(--muted);flex:none}.avatar.lg{width:96px;height:96px;font-size:30px}
.person{display:flex;gap:12px;align-items:center;padding:12px 14px}.person .meta{color:var(--muted);font-size:13px}.person b{display:block}
.list>*{border-bottom:1px solid var(--line)}.list>*:last-child{border-bottom:0}.row{display:flex;gap:12px;align-items:center;justify-content:space-between;padding:12px 14px;flex-wrap:wrap}
.kv{display:grid;grid-template-columns:150px 1fr;gap:6px 14px}.kv dt{color:var(--muted)}.kv dd{margin:0;word-break:break-word}
.muted{color:var(--muted)}.right{text-align:right}.mt{margin-top:16px}.thumb{width:100%;aspect-ratio:16/10;object-fit:cover;border-radius:var(--radius) var(--radius) 0 0;background:var(--surface-2)}
.tabs{display:flex;gap:4px;border-bottom:1px solid var(--line);margin-bottom:16px;overflow-x:auto}.tabs button{background:none;border:0;border-bottom:3px solid transparent;padding:10px 14px;min-height:42px;font:inherit;font-weight:600;color:var(--muted);cursor:pointer;white-space:nowrap}.tabs button.on{color:var(--brand);border-color:var(--brand)}
.bars div{display:grid;grid-template-columns:130px 1fr 44px;gap:10px;align-items:center;padding:4px 0;font-size:13px}.bars i{display:block;height:10px;border-radius:6px;background:var(--brand);min-width:3px}
.menu{position:relative}.menu .drop{position:absolute;right:0;top:46px;min-width:220px;background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow);padding:6px;z-index:30}
.menu .drop a,.menu .drop button{display:flex;gap:9px;align-items:center;width:100%;padding:9px 10px;min-height:40px;border-radius:8px;border:0;background:none;font:inherit;color:var(--ink);cursor:pointer;text-align:left}.menu .drop a:hover,.menu .drop button:hover{background:var(--surface-2);text-decoration:none}
/* family tree */
/* chat */
.chat{display:flex;flex-direction:column;gap:8px;padding:14px;max-height:56vh;overflow-y:auto}.bubble{max-width:78%;padding:9px 12px;border-radius:14px;background:var(--surface-2);border:1px solid var(--line);white-space:pre-wrap;word-break:break-word}
.bubble.me{align-self:flex-end;background:color-mix(in srgb,var(--brand) 14%,var(--surface));border-color:transparent}.bubble small{display:block;color:var(--muted);font-size:11px;margin-top:3px}
/* sign-in: split card with jaali pattern brand panel */
.auth{min-height:100vh;display:grid;place-items:center;padding:18px}.auth-card{display:grid;grid-template-columns:1fr 1fr;width:min(940px,100%);background:var(--surface);border-radius:18px;overflow:hidden;box-shadow:0 20px 60px rgba(16,24,40,.14);border:1px solid var(--line)}
.auth-brand{background:var(--brand);color:#fff;padding:38px 34px;position:relative;display:flex;flex-direction:column;justify-content:space-between;min-height:480px;overflow:hidden}
.auth-brand svg.jaali{position:absolute;inset:0;width:100%;height:100%;opacity:.16}.auth-brand>*{position:relative}.auth-brand h1{font-size:28px;margin:16px 0 8px}.auth-brand p{opacity:.92;margin:0}
.auth-brand .totals{display:flex;gap:22px;flex-wrap:wrap}.auth-brand .totals b{display:block;font-size:22px}.auth-brand a{color:#fff;text-decoration:underline}
.auth-form{padding:38px 34px;display:flex;flex-direction:column;justify-content:center}.auth-form h2{font-size:23px;margin-bottom:4px}.auth-form .sub{color:var(--muted);margin:0 0 20px}.auth-form .btn{width:100%}
.auth-links{display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px;margin-top:16px;font-size:14px}.pw{position:relative;display:block}.pw input{width:100%;padding-right:46px}.pw button.btn{position:absolute;right:6px;top:50%;transform:translateY(-50%);width:36px;min-width:36px;height:36px;min-height:36px;margin:0;padding:0;display:grid;place-items:center;border:0;background:transparent;color:var(--muted);box-shadow:none}.pw button.btn svg{width:20px;height:20px}
@media (max-width:1000px){.g4{grid-template-columns:repeat(2,minmax(0,1fr))}.g3{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:860px){.shell{grid-template-columns:1fr}.side{position:fixed;z-index:50;left:0;top:0;width:min(84vw,300px);transform:translateX(-102%);transition:transform .2s}
.nav-open .side{transform:none}.nav-open .scrim{display:block;position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:40}.burger{display:inline-flex}
.content{padding:16px 12px 70px}.top{padding:8px 12px}.g2,.g3,.form-grid{grid-template-columns:1fr}.kv{grid-template-columns:1fr;gap:0}.kv dt{font-size:12px;margin-top:8px}
.auth-card{grid-template-columns:1fr}.auth-brand{min-height:0;padding:24px 22px}.auth-brand h1{font-size:22px}.auth-form{padding:26px 22px}
.gp-page-header h1{font-size:20px}.gp-page-header .actions{width:100%}.stat{flex-direction:column;align-items:flex-start;gap:8px}.stat b{font-size:20px}
.btn.sm{min-height:36px}td,th{padding:9px 10px}.hide-sm{display:none}.bars div{grid-template-columns:96px 1fr 36px}.top .label{display:none}}
@media (max-width:420px){.g4{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.cards{grid-template-columns:1fr}small,.meta{font-size:12px}}
@media print{.side,.top,.actions,.toolbar,.pager,.btn{display:none!important}.shell{display:block}.card{box-shadow:none}}

/* home feed */
.feed-title{margin:0 0 10px}.feed-item{margin-bottom:12px}.feed-head{display:flex;gap:8px;align-items:baseline;flex-wrap:wrap;margin-bottom:6px}
.feed-body{overflow-wrap:anywhere;margin-bottom:8px}.feed-img{max-width:100%;max-height:480px;border-radius:var(--radius,10px);display:block;margin:8px 0}
.feed .center{text-align:center}
/* cropper, family book, map, face search, family photos, receipt */
.crop{display:flex;flex-direction:column;align-items:center;gap:12px}.crop canvas{width:300px;max-width:100%;height:auto;aspect-ratio:1;border:1px solid var(--line);border-radius:8px;touch-action:none;cursor:grab;background:#fff}.crop input{width:300px;max-width:100%}
.book .cover{text-align:center;padding:60px 20px;border-bottom:2px solid var(--line);margin-bottom:20px}.book .cover h1{font-size:2.2rem}.book .person-sheet{break-inside:avoid;padding:14px 0;border-bottom:1px solid var(--line)}
.cmap{width:100%;height:auto;background:var(--bg-soft,rgba(127,127,127,.06));border-radius:10px}.cmap .dot{fill:var(--brand,#2563eb);fill-opacity:.55;stroke:var(--brand,#2563eb)}.cmap text{font-size:12px;fill:currentColor}
.face-stage canvas{max-width:100%;height:auto;border-radius:10px}
.fphotos{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px;padding:14px}.fphotos figure{margin:0}.fphotos img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:8px;display:block}.fphotos figcaption{font-size:.85rem;padding-top:4px}
.receipt table{width:100%;border-collapse:collapse}.receipt th,.receipt td{border-bottom:1px solid var(--line);padding:6px;text-align:left}
@media print{.book .cover{page-break-after:always}.book .person-sheet{page-break-inside:avoid}}

/* phone: quick links bar at the bottom (thumb reach), safe areas for notched screens */
.bottom{display:none}
@media (max-width:860px){.bottom{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:30;background:var(--surface,#fff);border-top:1px solid var(--line);padding:4px 4px calc(4px + env(safe-area-inset-bottom))}
.bottom a,.bottom button{flex:1;display:flex;flex-direction:column;align-items:center;gap:2px;min-height:48px;justify-content:center;font-size:11px;color:inherit;text-decoration:none;background:none;border:0;cursor:pointer;border-radius:8px}
.bottom .on{color:var(--brand);font-weight:700}.content{padding-bottom:84px}.top{padding-top:calc(8px + env(safe-area-inset-top))}}
@media print{.bottom{display:none!important}}

/* home: today strip, nudges, pinned label */
.today-card h4{margin:12px 0 6px;font-size:.85rem;color:var(--muted,#6b7280);text-transform:uppercase;letter-spacing:.03em}.chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{display:inline-flex;align-items:center;gap:6px;padding:4px 6px 4px 8px;border:1px solid var(--line);border-radius:999px;background:var(--bg-soft,rgba(127,127,127,.06));text-decoration:none;color:inherit;min-height:40px}.chip a{display:inline-flex;align-items:center;gap:6px;text-decoration:none;color:inherit}.chip small{color:var(--muted,#6b7280)}
.nudge .bar{height:8px;border-radius:99px;background:var(--line);margin:8px 0;overflow:hidden}.nudge .bar i{display:block;height:100%;background:var(--brand)}.pill{display:inline-flex;gap:4px;align-items:center;font-size:.75rem;padding:1px 8px;border-radius:99px;background:var(--brand);color:#fff}

/* phone-first calm: feed first, short rows that scroll sideways instead of stacking */
.composer{display:flex;align-items:center;gap:10px;width:100%;margin:10px 0;padding:10px 14px;min-height:52px;border:1px solid var(--line);border-radius:999px;background:var(--surface,#fff);color:var(--muted,#6b7280);font-size:16px;text-align:left;cursor:pointer}.composer span{flex:1}
.glance>summary{cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 16px;border:1px solid var(--line);border-radius:999px;background:var(--surface,#fff);font-weight:500;font-size:14px;color:var(--muted);min-height:44px;list-style:none}
.glance>summary::-webkit-details-marker{display:none}
.glance>summary::after{content:"";width:8px;height:8px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg) translate(-2px,-2px);transition:transform .15s;flex:none}
.glance[open]>summary::after{transform:rotate(-135deg) translate(-2px,-2px)}
.glance.mt{margin-top:8px}
.nudges{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px}
.tabs{display:flex;gap:6px;overflow-x:auto;border-bottom:1px solid var(--line)}.tabs button{flex:0 0 auto;min-height:44px;padding:0 16px;border:0;background:none;color:inherit;font:inherit;border-bottom:3px solid transparent;cursor:pointer}.tabs button.on{border-color:var(--brand);color:var(--brand);font-weight:700}
.card .empty{padding:14px 10px}.card .empty svg{display:none}.card .empty h3,.card .empty b{font-size:.95rem;font-weight:500;color:var(--muted,#6b7280)}
@media (max-width:860px){.gp-page-header .actions{flex-wrap:wrap;gap:8px}.gp-page-header .actions .btn{flex:1 1 auto;justify-content:center;min-height:44px}
.chips{flex-wrap:nowrap;overflow-x:auto;padding-bottom:4px}.chip{flex:0 0 auto}
.nudges{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;gap:10px}.nudges>.card{flex:0 0 86%;scroll-snap-align:start}}
[hidden]{display:none!important}

.avatar.ph{background:hsl(var(--h) 55% 90%);border-color:hsl(var(--h) 40% 78%);overflow:hidden}.avatar.ph svg{width:78%;height:78%;fill:hsl(var(--h) 38% 48%);margin-top:14%}
.avatar.sq{border-radius:8px}.avatar.ph .ico{fill:none;stroke:hsl(var(--h) 38% 42%);width:55%;height:55%;margin:0}
.thumb.ph{display:grid;place-items:center;background:linear-gradient(135deg,hsl(var(--h) 60% 90%),hsl(calc(var(--h) + 40) 55% 82%));min-height:110px}.thumb.ph .ico{width:44px;height:44px;fill:none;stroke:hsl(var(--h) 40% 40%);opacity:.8}.thumb.wide:not(.ph){aspect-ratio:auto;height:auto;max-height:none;object-fit:contain}.thumb.wide{max-height:none}
.feed-head{display:flex;align-items:center;gap:10px}.feed-head .who{display:flex;flex-direction:column;line-height:1.25;flex:1;min-width:0}
[data-theme=dark] .avatar.ph{background:hsl(var(--h) 25% 24%);border-color:hsl(var(--h) 20% 34%)}[data-theme=dark] .avatar.ph svg{fill:hsl(var(--h) 35% 70%)}
[data-theme=dark] .thumb.ph{background:linear-gradient(135deg,hsl(var(--h) 25% 22%),hsl(calc(var(--h) + 40) 22% 18%))}[data-theme=dark] .thumb.ph .ico{stroke:hsl(var(--h) 35% 70%)}
.avatar{flex:none}.composer .avatar{width:36px;height:36px}

/* family tree: roomy cards with photos, even connectors, couples joined by a line (in the spirit of MyHeritage / FamilySearch) */
.tree-wrap{position:relative}.tree-bar{display:flex;gap:6px;justify-content:flex-end;padding:10px 12px 0}.tree-bar .btn{min-width:40px}
.tree{overflow:auto;padding:26px 28px 40px;cursor:grab;-webkit-overflow-scrolling:touch;background:radial-gradient(circle at 1px 1px,var(--line) 1px,transparent 0) 0 0/22px 22px}
.tree:active{cursor:grabbing}.tree ul{display:flex;justify-content:center;list-style:none;margin:0;padding:34px 0 0;position:relative}.tree>ul{padding-top:0;width:max-content;min-width:100%}
.tree li{position:relative;display:flex;flex-direction:column;align-items:center;padding:34px 16px 0}.tree>ul>li{padding-top:0}
.tree li::before,.tree li::after{content:"";position:absolute;top:0;right:50%;width:50%;height:34px;border-top:2px solid var(--line-2,#cfc8bc)}.tree li::after{right:auto;left:50%;border-left:2px solid var(--line-2,#cfc8bc)}
.tree li:first-child::before,.tree li:last-child::after{border:0}.tree li:last-child::before{border-right:2px solid var(--line-2,#cfc8bc);border-radius:0 14px 0 0}.tree li:first-child::after{border-radius:14px 0 0 0}
.tree li:only-child{padding-top:0}.tree li:only-child::before,.tree li:only-child::after,.tree>ul>li::before,.tree>ul>li::after{display:none}
.tree ul ul::before{content:"";position:absolute;top:0;left:50%;border-left:2px solid var(--line-2,#cfc8bc);height:34px}
.node{display:flex;align-items:center;position:relative}.node>*+*{margin-left:34px;position:relative}.node>*+*::before{content:"";position:absolute;left:-34px;top:50%;width:34px;border-top:2px solid #e0a0b8}
.tcard{display:flex;align-items:center;gap:12px;width:204px;min-height:74px;padding:10px 14px 10px 12px;background:var(--surface);border:1px solid var(--line);border-left:5px solid #4a8be8;border-radius:14px;color:var(--ink);box-shadow:0 1px 2px rgba(0,0,0,.06),0 4px 12px rgba(0,0,0,.05);text-align:left;transition:box-shadow .15s,transform .15s}
a.tcard:hover{box-shadow:0 6px 18px rgba(0,0,0,.14);transform:translateY(-2px)}.tcard.f{border-left-color:#e0558f}.tcard.d{background:var(--surface-2)}.tcard.d .tn b{color:var(--muted)}.tcard.d .avatar{filter:grayscale(.9);opacity:.85}
.tcard.root{box-shadow:0 0 0 3px color-mix(in srgb,var(--brand) 40%,transparent),0 6px 18px rgba(0,0,0,.12)}.tcard.ph{border-style:dashed;opacity:.65}
.tcard .tav{width:52px;height:52px;flex:none}.tn{display:flex;flex-direction:column;min-width:0;line-height:1.3}.tn b{font-size:14px;font-weight:650;overflow-wrap:anywhere}.tn small{color:var(--muted);font-weight:500;font-size:12.500px}
.avatar.pt{background:none;padding:0;overflow:hidden;border:1px solid var(--line);display:inline-block}.avatar.pt svg{display:block;width:100%;height:100%}
@media (max-width:640px){.tcard{width:150px;min-height:60px;gap:8px;padding:8px 10px 8px 9px}.tcard .tav{width:38px;height:38px}.tn b{font-size:13px}.tn small{font-size:11.500px}.tree li{padding-left:10px;padding-right:10px}.node>*+*{margin-left:24px}.node>*+*::before{left:-24px;width:24px}.tree{padding:18px 12px 30px}}
.ttag{color:var(--brand)!important;font-weight:650!important}
@media print{.tree-bar{display:none}.tree{overflow:visible;background:none;zoom:.6}}
:root{--line-2:#cfc8bc}[data-theme=dark]{--line-2:#47505e}

/* colour themes: each sets the same variables; data-mode marks light or dark for shared rules */
[data-mode=dark]{color-scheme:dark}
[data-theme=forest]{--brand:#15803d;--bg:#f2f6f2;--surface-2:#f6faf6;--line:#dbe5db}
[data-theme=ocean]{--brand:#0369a1;--bg:#f0f5f9;--surface-2:#f5f9fc;--line:#d8e3ec}
[data-theme=royal]{--brand:#6d28d9;--bg:#f5f3fa;--surface-2:#f9f7fd;--line:#e2ddef}
[data-theme=rose]{--brand:#be185d;--bg:#faf3f6;--surface-2:#fdf7fa;--line:#efdde5}
[data-theme=slate]{--brand:#334155;--bg:#f1f3f5;--surface-2:#f7f8f9;--line:#dde1e6}
[data-theme=night]{--brand:#f59e0b;--brand-ink:#1a1204;--bg:#12151a;--surface:#1b1f26;--surface-2:#222831;--ink:#e7e9ee;--muted:#9aa4b2;--line:#2e3540;--line-2:#47505e;--shadow:0 1px 2px rgba(0,0,0,.5);--ok:#4ade80;--bad:#f87171;--info:#93c5fd;--warn:#fbbf24}
[data-theme=midnight]{--brand:#60a5fa;--brand-ink:#06121f;--bg:#0b1220;--surface:#111a2c;--surface-2:#16213a;--ink:#e6ecf7;--muted:#93a2bd;--line:#24314d;--line-2:#3a4a6b;--shadow:0 1px 2px rgba(0,0,0,.55);--ok:#4ade80;--bad:#f87171;--info:#93c5fd;--warn:#fbbf24}
[data-theme=dark]{--brand:#f59e0b;--brand-ink:#1a1204}
[data-mode=dark] .avatar.ph{background:hsl(var(--h) 25% 24%);border-color:hsl(var(--h) 20% 34%)}[data-mode=dark] .avatar.ph svg{fill:hsl(var(--h) 35% 70%)}
[data-mode=dark] .thumb.ph{background:linear-gradient(135deg,hsl(var(--h) 25% 22%),hsl(calc(var(--h) + 40) 22% 18%))}[data-mode=dark] .thumb.ph .ico{stroke:hsl(var(--h) 35% 70%)}
.themes{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-top:12px}
.theme-tile{display:flex;flex-direction:column;gap:8px;align-items:flex-start;padding:10px;min-height:44px;border:2px solid var(--line);border-radius:12px;background:var(--surface);color:var(--ink);font:inherit;cursor:pointer;text-align:left}
.theme-tile.on{border-color:var(--brand)}.theme-tile .sw{display:flex;gap:4px;width:100%}.theme-tile .sw i{flex:1;height:22px;border-radius:6px;border:1px solid rgba(127,127,127,.3)}
.sw[data-sw=community] i:nth-child(1){background:#b45309}.sw[data-sw=forest] i:nth-child(1){background:#15803d}.sw[data-sw=ocean] i:nth-child(1){background:#0369a1}.sw[data-sw=royal] i:nth-child(1){background:#6d28d9}.sw[data-sw=rose] i:nth-child(1){background:#be185d}.sw[data-sw=slate] i:nth-child(1){background:#334155}.sw[data-sw=night] i:nth-child(1){background:#f59e0b}.sw[data-sw=midnight] i:nth-child(1){background:#60a5fa}
.sw[data-sw] i:nth-child(2){background:#fff}.sw[data-sw] i:nth-child(3){background:#f3f1ec}.sw[data-sw=night] i:nth-child(2),.sw[data-sw=midnight] i:nth-child(2){background:#1b1f26}.sw[data-sw=night] i:nth-child(3),.sw[data-sw=midnight] i:nth-child(3){background:#12151a}
.stat2{display:flex;flex-direction:column;gap:2px}.stat2 span{font-size:12px;color:var(--muted)}.stat2 b{font-size:22px}.stat2 small{color:var(--muted)}
.crumbs{margin-top:12px;font-size:14px}.plrow{display:flex;align-items:center;gap:10px;padding:10px 14px;border-bottom:1px solid var(--line)}.plrow .num{text-align:right;display:flex;flex-direction:column}.plrow .num small{color:var(--muted)}
.spark{display:flex;gap:6px;align-items:flex-end;height:120px}.spark>div{flex:1;display:flex;flex-direction:column;justify-content:flex-end;height:100%;align-items:center}.spark i{width:100%;background:var(--brand);border-radius:4px 4px 0 0}.spark small{font-size:10px;color:var(--muted)}
.spark{justify-content:center}.spark>div{max-width:48px}
.plrow .grow{min-width:0}.plrow .meta{display:block;color:var(--muted);font-size:13px}
/* relationship finder */
.rel-pick{display:grid;grid-template-columns:1fr auto 1fr;gap:12px;align-items:start}.rel-pick label{display:flex;gap:8px;align-items:center;font-weight:600;margin-bottom:8px}
.rel-n{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:50%;background:var(--brand);color:var(--brand-ink);font-size:12px}
.rel-swap{margin-top:30px}.rel-go{width:100%;margin-top:14px;min-height:46px}
.rp-in{width:100%;min-height:46px;font-size:16px}.rp-chosen{display:flex;gap:10px;align-items:center;border:1.5px solid var(--line);border-radius:12px;padding:8px 10px;background:var(--surface-2)}
.rp-chosen>span:not(.avatar),.rp-opt>span:not(.avatar){flex:1;min-width:0;display:flex;flex-direction:column}.rp-chosen small,.rp-opt small,.rel-card small{color:var(--muted);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rp-list{border:1px solid var(--line);border-radius:12px;background:var(--surface);box-shadow:var(--shadow);margin-top:6px;max-height:320px;overflow:auto}.rp-opt{display:flex;gap:10px;align-items:center;width:100%;text-align:left;border:0;border-bottom:1px solid var(--line);background:none;color:var(--ink);padding:9px 12px;min-height:48px;font:inherit;cursor:pointer}.rp-opt:hover{background:var(--surface-2)}
.rel-av{width:44px;height:44px}.rel-av.sm{width:34px;height:34px}
.rel-head h2{margin:4px 0}.rel-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.rel-count{margin:14px 2px 8px;color:var(--muted)}
.rel-conn{margin-bottom:14px;overflow:hidden}.rel-also{font-size:12px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin-bottom:6px}.rel-path{font-size:12px;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}
.rel-pill{display:inline-block;margin:8px 0 12px;padding:7px 14px;border-radius:99px;background:color-mix(in srgb,var(--brand) 14%,transparent);color:var(--brand)}.rel-pill .muted{color:inherit;opacity:.8}
.rel-card{display:flex;flex-direction:column;align-items:center;gap:3px;text-align:center;padding:10px 8px;border:2px solid var(--line);border-radius:14px;background:var(--surface);color:var(--ink);min-width:110px;max-width:170px;text-decoration:none}
.rel-card.m{border-color:#7aa7e6}.rel-card.f{border-color:#e68aab}.rel-card.apex{border-style:dashed}.rel-card.start,.rel-card.end{box-shadow:0 0 0 3px color-mix(in srgb,var(--brand) 30%,transparent)}.rel-card:hover{text-decoration:none;box-shadow:var(--shadow)}.rel-card b{font-size:14px;line-height:1.25}
.rel-chip{display:inline-block;align-self:center;font-size:12px;padding:3px 10px;border-radius:99px;border:1px solid var(--line);background:var(--surface-2);color:var(--muted);margin:2px 0}.rel-chip.mid{background:var(--brand);color:var(--brand-ink);border-color:var(--brand);font-weight:600;padding:5px 14px}
.rel-v,.rel-line{display:flex;flex-direction:column;align-items:center;gap:6px}.rel-top{display:flex;flex-direction:column;align-items:center;gap:6px;border-bottom:2px dotted var(--line);padding-bottom:12px;width:100%}
.rel-cols{display:grid;grid-template-columns:1fr 1fr;gap:10px;width:100%}.rel-col{display:flex;flex-direction:column;align-items:center;gap:6px}.rel-tie{margin-top:2px}
.rel-explain{margin-top:12px;padding:10px 12px;border-left:3px solid var(--brand);background:var(--surface-2);border-radius:8px;font-size:13px;line-height:1.5}
@media(max-width:640px){.rel-pick{grid-template-columns:1fr}.rel-swap{margin:0;justify-self:center}.rel-card{min-width:96px}.rel-conn{padding:12px}}
@media print{.side,.top,.rel-form,.rel-actions,.gp-page-header .actions,.burger{display:none!important}.shell{display:block}.rel-conn{break-inside:avoid;box-shadow:none}}
.meter{margin:0 0 14px;padding:10px 14px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}.meter .row{justify-content:space-between;gap:8px;flex-wrap:wrap;margin-bottom:6px;font-size:13px}
.meter i{display:block;height:8px;border-radius:99px;background:var(--ok)}.meter.warn i{background:var(--warn)}.meter.bad i{background:var(--bad)}.meter{position:relative}

/* profile: member number chip and life-facts timeline */
.chip{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--line);background:var(--surface-2);color:var(--muted);border-radius:99px;padding:3px 10px;font-size:.8rem;cursor:pointer}
.chip:hover{border-color:var(--brand);color:var(--brand)}.chip svg{width:13px;height:13px}
.ftl{position:relative;display:grid;gap:14px;padding:6px 0 0 0}
.ftl::before{content:"";position:absolute;left:73px;top:8px;bottom:8px;width:2px;background:var(--line)}
.fti{display:grid;grid-template-columns:56px 36px 1fr;gap:10px;align-items:start;position:relative}
.fty{text-align:right;line-height:1.2}.fty b{display:block}.fty small{color:var(--muted)}
.fti-ic{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:var(--surface);border:2px solid var(--line);z-index:1}
.fti-ic.birth{border-color:#2e9e5b}.fti-ic.marriage{border-color:#d9822b}.fti-ic.death{border-color:#8a8f98}.fti-ic.adoption,.fti-ic.adopted_child{border-color:var(--brand)}
.fti-card{border:1px solid var(--line);border-radius:10px;padding:8px 12px;background:var(--surface)}
.fti-tag{font-size:.72rem;font-weight:600;letter-spacing:.03em;color:var(--muted)}.fti-t{margin:2px 0}
@media(max-width:480px){.ftl::before{left:63px}.fti{grid-template-columns:46px 36px 1fr;gap:8px}}

/* family register (printed book style) */
.rpt-fam{margin-bottom:14px;padding:0;overflow:hidden}.rpt-hd{padding:10px 14px;background:var(--brand);color:#fff}.rpt-hd .muted{color:rgba(255,255,255,.85)}
.rpt-row{display:grid;grid-template-columns:64px 1.6fr 1fr 1.1fr .9fr 1.2fr 1fr;gap:8px;align-items:center;padding:8px 14px;border-top:1px solid var(--line)}
.rpt-ph{grid-row:span 1}.rpt-av{width:56px;height:56px;border-radius:6px}.rpt-ft{display:flex;justify-content:space-between;gap:12px;padding:10px 14px;border-top:1px solid var(--line);font-size:.85rem;color:var(--muted)}
@media(max-width:700px){.rpt-row{grid-template-columns:56px 1fr 1fr;grid-template-areas:"ph n n" "ph r d" "ph m o" "ph t t"}.rpt-ph{grid-area:ph}.rpt-n{grid-area:n}.rpt-r{grid-area:r}.rpt-d{grid-area:d}.rpt-m{grid-area:m}.rpt-o{grid-area:o}.rpt-t{grid-area:t}.rpt-ft{flex-direction:column}}
@media print{@page{size:A4;margin:12mm}.no-print,.sidebar,.topbar,.bottombar,.gp-page-header .actions,nav,header.top{display:none!important}.rpt-fam{break-inside:avoid;box-shadow:none;border:1px solid #999}.rpt-hd{background:#eee!important;color:#000!important;-webkit-print-color-adjust:exact}.rpt-hd .muted{color:#333}.rpt-row{padding:4px 8px;font-size:11px}.rpt-av{width:44px;height:44px}body{background:#fff}}

/* inline editing */
.inl-bar{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px;padding:10px 0;position:sticky;bottom:0;background:var(--surface);border-top:1px solid var(--line)}
@media(max-width:860px){.inl-bar{bottom:64px}}

/* add-to-family sheet and floating button (profile) */
.fab{position:fixed;right:18px;bottom:84px;width:56px;height:56px;border-radius:50%;background:var(--brand);color:#fff;border:0;box-shadow:0 6px 18px rgba(0,0,0,.25);display:grid;place-items:center;z-index:30;cursor:pointer}.fab svg{width:26px;height:26px}
@media(min-width:861px){.fab{bottom:28px}}
.modal.sheet{align-items:flex-end}.modal.sheet .box{width:100%;max-width:560px;border-radius:20px 20px 0 0;margin:0}
.tiles{display:grid;grid-template-columns:1fr 1fr;gap:12px}.tile{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;min-height:96px;border:1px solid var(--line);background:var(--surface);border-radius:14px;color:var(--brand);font-weight:600;font-size:1rem;cursor:pointer}.tile:hover{border-color:var(--brand);background:var(--surface-2)}.tile svg{width:22px;height:22px}
.lmap{height:420px;border-radius:12px;overflow:hidden;z-index:0}@media(max-width:600px){.lmap{height:320px}}

/* events page */
.chips{display:flex;gap:8px;flex-wrap:wrap}.chip.on{background:var(--brand);color:#fff;border-color:var(--brand)}
.up-legend{display:flex;gap:14px;flex-wrap:wrap;font-size:.9rem}.up-legend .birth{color:#2e7d32}.up-legend .marriage{color:#c2185b}.up-legend .death{color:#6a5acd}
.up-month{margin:18px 0 6px;color:var(--muted);font-size:.95rem;text-transform:uppercase;letter-spacing:.04em}
.up-card{display:flex;align-items:center;gap:12px;padding:10px 12px;border-left:4px solid var(--line);margin-bottom:8px;border-radius:10px;background:var(--surface)}.up-card.birth{border-left-color:#2e7d32}.up-card.marriage{border-left-color:#c2185b}.up-card.death{border-left-color:#6a5acd}
.up-card small{display:block}.up-date{width:46px;text-align:center;background:var(--surface-2);border-radius:10px;padding:4px 0}.up-date b{display:block;font-size:1.2rem;line-height:1.1}.up-date small{font-size:.7rem;text-transform:uppercase}.up-ic{font-size:1.4rem}
.cal{display:grid;grid-template-columns:repeat(7,1fr);gap:4px}.cal-h{text-align:center;font-size:.75rem;color:var(--muted)}.cal-d{min-height:64px;border:1px solid var(--line);border-radius:8px;padding:3px;font-size:.72rem;overflow:hidden}.cal-d.today{border-color:var(--brand);background:var(--surface-2)}.cal-d b{display:block}.cal-e{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* matrimony */
.mcard{overflow:hidden;padding:0}.mphoto{display:block;position:relative;aspect-ratio:4/5;background:var(--surface-2);overflow:hidden}.mphoto img{width:100%;height:100%;object-fit:cover}.mnone{display:grid;place-items:center;height:100%}.mcount{position:absolute;right:8px;bottom:8px;background:rgba(0,0,0,.6);color:#fff;border-radius:10px;padding:2px 8px}
.mt-photos{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:10px}.mt-ph{position:relative;aspect-ratio:4/5;border-radius:12px;overflow:hidden;border:2px solid var(--line)}.mt-ph.main{border-color:var(--brand)}.mt-ph img{width:100%;height:100%;object-fit:cover}.mt-ph .btn{position:absolute;bottom:6px;left:6px}.mt-ph .danger{left:auto;right:6px;top:6px;bottom:auto}.mt-badge{position:absolute;bottom:6px;left:6px;background:var(--brand);color:#fff;border-radius:10px;padding:2px 8px;font-size:.75rem}
.mt-add{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;aspect-ratio:4/5;border:2px dashed var(--line);border-radius:12px;color:var(--brand);cursor:pointer;font-weight:600}.mt-add svg{width:26px;height:26px}
.mt-hero{width:100%;border-radius:12px;max-height:520px;object-fit:cover}.mt-thumbs{display:flex;gap:8px;margin-top:10px;overflow-x:auto}.mt-thumbs img{width:64px;height:80px;object-fit:cover;border-radius:8px;cursor:pointer}

/* 2.1 */
.up-wrap{display:flex;align-items:center;gap:8px}.up-wrap>a{flex:1;min-width:0}.up-wish{flex:0 0 auto}
.hints .row.hint{gap:10px;padding:10px 0;border-bottom:1px solid var(--line);align-items:center}.hints .row.hint:last-child{border-bottom:0}.hint-ic{font-size:1.2rem}.hint.high .grow{font-weight:600}
.hint-ok{background:var(--surface-2)}.hmeter{height:8px;border-radius:99px;background:var(--surface-2);overflow:hidden;margin:8px 0}.hmeter i{display:block;height:100%;background:var(--ok);border-radius:99px}
.abars{display:grid;gap:8px}.abar{display:grid;grid-template-columns:minmax(90px,170px) 1fr minmax(70px,auto);gap:10px;align-items:center;font-size:.9rem}.abar .bl{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.abar .bt{background:var(--surface-2);border-radius:99px;height:12px;overflow:hidden}.abar .bt i{display:block;height:100%;background:var(--brand);border-radius:99px;min-width:3px}.abar .bn{text-align:right;white-space:nowrap}
.aspark{display:flex;gap:4px;align-items:flex-end;height:110px;margin-top:8px}.aspark i{flex:1;background:var(--brand);border-radius:3px 3px 0 0;min-width:3px;opacity:.85}
.lmap.tall{height:min(70vh,560px)}.tiles.big{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.tiles.big .tile{min-height:110px;font-size:1.1rem;justify-content:center;text-align:center;flex-direction:column;gap:8px}.tiles.big .tile .ico{width:34px;height:34px}
.shell.guided .btn{min-height:48px;font-size:1rem}.shell.guided .person{padding-top:14px;padding-bottom:14px}.chk{display:flex;gap:10px;align-items:center;font-size:1rem}.chk input{width:22px;height:22px}
.book .cover{text-align:center;padding:90px 20px;page-break-after:always}.book .cv-emoji{font-size:90px}.book .cover h1{font-size:2.4rem;margin:12px 0}
.book .person-sheet{page-break-inside:avoid;padding:22px 8px;border-bottom:1px solid var(--line)}.ps-head{display:flex;gap:16px;align-items:center;margin-bottom:10px}.ps-photo{width:84px;height:84px;border-radius:50%;object-fit:cover;flex:0 0 auto}.ps-photo.none{display:flex;align-items:center;justify-content:center;background:var(--surface-2);font-size:2rem;color:var(--brand)}
.gen{margin:12px 0}.gen-list{display:flex;flex-wrap:wrap;gap:8px}.gen-chip{background:var(--surface-2);border-radius:99px;padding:6px 12px}
@media print{.book .person-sheet{border:0}.up-wish,.hints .btn{display:none}}
@media (min-width:700px){.tiles.big{grid-template-columns:repeat(3,1fr)}}
.hints .row.hint .grow{text-align:left}#famTools .row{justify-content:flex-start}.ps-photo{background:var(--surface-2)}
.gset{display:flex;flex-wrap:wrap;align-items:flex-end;gap:6px 14px;padding:10px 0;border-bottom:1px solid var(--line)}.gset .form-grid{flex:1 1 320px;margin:0}.gset .gl{font-size:13px;color:var(--muted)}
.tempbox{font-size:1.4rem;letter-spacing:2px;text-align:center;padding:14px;background:var(--surface);border:1px dashed var(--line);border-radius:12px;user-select:all}.warn{border-left:4px solid #d97706}
.notice{display:flex;gap:10px;align-items:center;justify-content:space-between;padding:9px 16px;font-size:.95rem;border-bottom:1px solid rgba(0,0,0,.08)}.notice.info{background:#e0efff;color:#0b3a66}.notice.warning{background:#fff1cf;color:#6b4300}.notice.danger{background:#b42318;color:#fff;font-weight:600}.notice .btn{color:inherit;min-width:32px}#notices{position:sticky;top:0;z-index:60}
.g5{grid-template-columns:repeat(5,minmax(0,1fr))}@media(max-width:900px){.g5{grid-template-columns:repeat(2,minmax(0,1fr))}}
.adslot{display:flex;align-items:center;gap:12px;position:relative;text-decoration:none;color:inherit}.adslot img{height:44px;width:auto;max-width:120px;object-fit:cover;border-radius:8px}.adslot small{display:block;color:var(--muted)}.adslot em{position:absolute;right:8px;top:4px;font-size:10px;font-style:normal;text-transform:uppercase;letter-spacing:.06em;color:var(--muted)}
.adslot.strip{padding:8px 16px;background:var(--surface);border-bottom:1px solid var(--line)}.adrow{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px;margin-bottom:16px}.adslot.tile{padding:14px;border:1px solid var(--line);border-radius:14px;background:var(--surface)}.adslot.tile img{height:64px}
.featgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:8px}.feat{display:flex;gap:10px;align-items:center;padding:10px 12px;border:1px solid var(--line);border-radius:10px;cursor:pointer}.feat input{width:20px;height:20px}
.rte{border:1px solid var(--line);border-radius:12px;background:var(--surface);overflow:hidden}.rte:focus-within{border-color:var(--brand);box-shadow:0 0 0 3px color-mix(in srgb,var(--brand) 20%,transparent)}
.rte-bar{display:flex;flex-wrap:wrap;gap:6px;padding:8px;border-bottom:1px solid var(--line);background:rgba(0,0,0,.025)}.rte-bar .btn{min-width:40px}
.rte-body{min-height:180px;max-height:55vh;overflow:auto;padding:12px 14px;outline:0;line-height:1.55}
.rich p{margin:0 0 .7em}.rich h2,.rich h3,.rich h4{margin:.9em 0 .4em;line-height:1.25}.rich ul,.rich ol{margin:0 0 .7em;padding-left:1.4em}.rich blockquote{margin:0 0 .7em;padding:.2em 1em;border-left:4px solid var(--line);color:var(--muted)}.rich a{color:var(--brand);text-decoration:underline}.rich>:last-child{margin-bottom:0}

/* sidebar: on a phone it slides over the page; on a computer the burger hides it and gives the page the full width (remembered) */
@media (min-width:861px){.burger{display:inline-flex}.side-collapsed .shell{grid-template-columns:1fr}.side-collapsed .side{display:none}}
@media (max-width:860px){.nav-open{overflow:hidden}}
[data-mode=dark] .notice.info{background:#172a42;color:#cfe3ff}[data-mode=dark] .notice.warning{background:#3a2c0e;color:#ffe3a3}[data-mode=dark] .notice.danger{background:#8a1c13;color:#fff}
[data-mode=dark] .rte-bar{background:rgba(255,255,255,.04)}
.nmav{display:inline-flex;align-items:center;gap:10px;min-width:0}.nmav .avatar.xs{width:30px;height:30px;font-size:12px}.nmav .block{display:block}.nmav.big{margin-bottom:12px;font-size:1.1rem}.nmav.big .avatar{width:56px;height:56px}
.row>.avatar.xs,span>.avatar.xs{width:30px;height:30px;vertical-align:middle}
.inbox .inb{align-items:flex-start;gap:14px;padding:14px 16px}.inbox .inb.new{border-left:4px solid var(--brand);background:color-mix(in srgb,var(--brand) 6%,transparent)}.inb-h{margin-bottom:2px}.inb-m{font-size:13px;margin-bottom:6px;overflow-wrap:anywhere}.inb-t{white-space:pre-wrap;overflow-wrap:anywhere}
.captcha{margin-top:6px}.captcha .capt{display:flex;gap:8px;align-items:center;margin-bottom:6px}.captcha img{border:1px solid var(--line);border-radius:8px;background:#f5f3ee;max-width:100%;height:auto}.captcha input{text-transform:uppercase;letter-spacing:.2em;font-weight:700}
.hrow{display:flex;gap:10px;padding:8px 0;border-bottom:1px solid var(--line)}.hrow:last-child{border:0}.hdot{flex:none;width:24px;height:24px;border-radius:50%;display:inline-grid;place-items:center;font-size:13px;font-weight:700;color:#fff}.hdot.ok{background:#2e8b57}.hdot.warn{background:#d98e04}.hdot.fail{background:#c0392b}.hfix{font-size:.85em;margin-top:2px;color:var(--muted)}.hsum{display:flex;gap:14px;align-items:center}.hsum .hdot{width:38px;height:38px;font-size:20px}.hsum h3{margin:0}
.captcha .capt .btn{flex:none;width:auto;padding:8px 14px}
.auth-lang{text-align:right;margin:-8px 0 4px}.lgname{font-weight:600}.top .btn[data-lang]{white-space:nowrap}
/* A ghost button that is switched on (liked, shortlisted) stays readable: coloured text on a soft background, heart filled */
.btn.ghost.primary{color:var(--brand);background:color-mix(in srgb,var(--brand) 12%,transparent);border-color:transparent}.btn.ghost.primary .ico{fill:currentColor}
.person em.rel{font-style:normal;font-weight:600;color:var(--text)}
/* serial numbers */
.sn{color:var(--muted);font-size:.85em;font-variant-numeric:tabular-nums}
span.sn{flex:none;min-width:30px;padding:0 6px 0 14px;text-align:right;align-self:center}th.sn,td.sn{width:1%;white-space:nowrap;text-align:right}
.vchk{color:var(--ok,#15803d);font-weight:700}
/* plan and usage */
.plan-head{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap}.plan-head h2{margin:2px 0 6px;font-size:1.6rem}
.plan-tile .pt-head{display:flex;align-items:center;gap:8px;color:var(--muted);font-weight:600}.plan-tile .pt-num{font-size:2rem;font-weight:700;margin:8px 0 10px}.plan-tile .pt-num small{font-size:.9rem;font-weight:500;color:var(--muted)}
.pt-bar{height:10px;border-radius:99px;background:var(--surface-2,#eee);overflow:hidden;margin-bottom:6px}.pt-bar i{display:block;height:100%;background:var(--brand);border-radius:99px}.pt-bar.warn i{background:#d97706}.pt-bar.bad i{background:var(--bad,#b91c1c)}
.row>span.sn+*{flex:1;min-width:0}.row>span.sn{padding-left:14px}

.mt-gal .mt-main{display:block;width:100%;padding:0;border:0;background:var(--bg-soft,#f6f1f1);border-radius:14px;overflow:hidden;cursor:zoom-in}
.mt-gal .mt-main img{display:block;margin:0 auto;width:auto;max-width:100%;height:auto;max-height:460px;object-fit:contain}
.mt-gal .mt-thumbs{display:flex;gap:8px;margin-top:10px;overflow-x:auto;padding-bottom:4px}
.mt-gal .mt-thumbs img{width:64px;height:80px;object-fit:cover;border-radius:8px;cursor:pointer;opacity:.7;border:2px solid transparent;flex:none}
.mt-gal .mt-thumbs img.on{opacity:1;border-color:var(--primary,#b8520a)}
.mt-lb{position:fixed;inset:0;z-index:300;background:rgba(0,0,0,.88);display:flex;align-items:center;justify-content:center;cursor:zoom-out}
.mt-lb img{max-width:96vw;max-height:92vh;object-fit:contain;border-radius:6px}
.mt-lb .btn{position:absolute;top:14px;right:14px;font-size:22px;line-height:1;padding:6px 14px}

.avatar.xl{width:168px;height:168px;font-size:54px}.avatar.zoomable{cursor:zoom-in}

.rg-scroll{overflow-x:auto;padding:6px 0}.rg{position:relative;margin:0 auto}.rg>svg{position:absolute;left:0;top:0;z-index:0}
.rg-card{position:absolute;z-index:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:8px 8px;border:1px solid var(--line);border-radius:12px;background:var(--surface);box-shadow:0 2px 10px rgba(0,0,0,.08);color:var(--ink);text-align:center;text-decoration:none;overflow:hidden}
.rg-card:hover{text-decoration:none;box-shadow:0 4px 16px rgba(0,0,0,.16)}
.rg-card.start,.rg-card.end{border:2px solid var(--brand);background:color-mix(in srgb,var(--brand) 7%,var(--surface))}
.rg-card b{font-size:14px;line-height:1.2;font-weight:600;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.rg-card small{color:var(--muted);font-size:13px}
.rg-av{width:52px;height:52px}
.rg-arrow{stroke:var(--brand);stroke-width:2.2}.rg-head{fill:var(--brand)}.rg-tree{stroke:var(--line-strong,#cfc8c8);stroke-width:2}
.rg-lbl{font-size:13px;fill:var(--muted);paint-order:stroke;stroke:var(--surface);stroke-width:5px}.rg-mid{font-size:14px;font-weight:600;fill:var(--ink);paint-order:stroke;stroke:var(--surface);stroke-width:5px}
.rel-save{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0}

/* family statistics */
.fs-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(310px,1fr));gap:16px;align-items:start}.fs-wide{grid-column:1/-1}
.fs-card h3{margin:0 0 4px;font-size:17px}.fs-sub0{margin:0 0 14px;color:var(--muted);font-size:14px}.fs-note{margin:10px 2px}
.fs-none{margin:10px 0;font-weight:700}.fs-foot{margin-top:12px;padding-top:10px;border-top:1px solid var(--line);text-align:center;color:var(--muted);font-size:14px}
.fs-donut{display:block;width:190px;height:190px;margin:6px auto 12px}.fs-legend{display:grid;gap:6px;max-width:260px;margin:0 auto}.fs-legend div{display:grid;grid-template-columns:14px 1fr auto;gap:8px;align-items:center;font-size:14px}
.fs-dot{display:inline-block;width:11px;height:11px;border-radius:50%;margin-right:6px}.fs-legend .fs-dot{margin:0}
.fs-bars{display:grid;gap:10px}.fs-row{position:relative;display:grid;grid-template-columns:1fr auto;gap:2px 8px;font-size:14px}.fs-row i{grid-column:1/-1;display:block;height:9px;border-radius:6px;background:#7fb89a}.fs-row b{font-weight:600}
.fs-bars.one .fs-row{grid-template-columns:auto 1fr}.fs-cloud{display:flex;flex-wrap:wrap;gap:6px 12px;align-items:baseline;line-height:1.3}
.fs-avg{display:flex;gap:28px;justify-content:center;margin:6px 0 14px}.fs-avg div{text-align:center}.fs-avg b{display:block;font-size:34px;font-weight:500}.fs-avg span{font-size:13px;color:var(--muted)}.fs-avg.one{justify-content:flex-start}.fs-avgcap{text-align:center;color:var(--muted);font-size:13px}
.fs-pairs{display:grid;gap:10px}.fs-pr{display:grid;grid-template-columns:34px 1fr 34px;align-items:end;gap:8px;font-size:14px}.fs-pn:last-child{text-align:right}.fs-pm small{display:block;text-align:center;color:var(--ink)}
.fs-split{display:flex;height:9px;border-radius:6px;overflow:hidden;background:#eee}.fs-split i{background:#5fa8d3}.fs-split i.f{background:#f58f8f}
.fs-grp{margin-bottom:14px}.fs-gl{display:block;margin-bottom:8px;color:var(--muted)}
.fs-p{display:flex;gap:12px;align-items:center;margin:0 0 12px}.fs-p>div{display:grid;gap:1px;min-width:0}.fs-p b{font-size:15px}.fs-p a{font-weight:700;text-decoration:underline;color:var(--ink)}.fs-p small{color:var(--muted)}.fs-rel{text-decoration:underline dotted}
.fs-av{width:56px;height:56px;flex:0 0 56px}.fs-av.sm{width:36px;height:36px;flex-basis:36px}
.fs-stack{margin-bottom:14px}.fs-stack>b{display:block;margin-bottom:8px}.fs-mid{margin:0 0 10px 68px;color:var(--muted)}
.fs-gen{display:grid;grid-template-columns:repeat(6,minmax(70px,1fr));gap:14px;align-items:end}.fs-gen>div{text-align:center;display:grid;gap:6px;font-size:13px}.fs-colbar{height:130px;background:#e6e9ef;border-radius:8px 8px 0 0;display:flex;align-items:flex-end;overflow:hidden}.fs-colbar i{display:block;width:100%;background:#475f86}
.fs-scroll{overflow-x:auto}.fs-pyr{display:grid;gap:10px 8px;justify-content:start;padding:4px}.fs-cell{background:#f3e6f7;border-radius:10px;padding:10px 6px;text-align:center;min-height:80px;display:grid;gap:4px;align-content:center;font-size:13px}.fs-cell b{display:inline-block;margin:0 auto;background:#fff;border-radius:14px;padding:1px 14px;color:#a33bb0;font-size:16px}.fs-cell.me{background:#e8c4f0}
.fs-who{display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:space-between;margin-bottom:16px}.fs-who-t{display:flex;gap:10px;align-items:center}.fs-who-p{display:flex;gap:8px;align-items:flex-start;min-width:260px;flex:1;max-width:460px}.fs-who-p #fsPick{flex:1}
.fs-through{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:24px}.fs-through h4{margin:0 0 10px;font-size:15px;color:var(--muted)}.fs-th{display:grid;grid-template-columns:36px minmax(90px,170px) 1fr;gap:10px;align-items:center;margin-bottom:10px;font-size:14px}.fs-th a{font-weight:600;color:var(--ink)}.fs-sub{margin:4px 0 12px 14px}.fs-sub>small{display:block;margin-bottom:8px;color:var(--muted)}.fs-rest{font-size:13px;margin:6px 0}
@media (max-width:640px){.fs-grid{grid-template-columns:1fr}.fs-gen{grid-template-columns:repeat(3,1fr)}.fs-th{grid-template-columns:36px 1fr}.fs-th .fs-bars{grid-column:1/-1}}

/* Tree checker */
.ck-count{margin:.2rem 0 .8rem}
.ck-group{padding:0;margin-bottom:.7rem;overflow:hidden}
.ck-head{display:flex;justify-content:space-between;align-items:center;width:100%;padding:.8rem 1rem;background:none;border:0;font:inherit;cursor:pointer;text-align:left;min-height:48px}
.ck-head[aria-expanded=true] .ck-chev{transform:rotate(180deg)}
.ck-list{padding:0 1rem .8rem}
.ck-issue{display:flex;gap:.8rem;padding:.8rem 0;border-top:1px solid var(--line,#e5e7eb)}
.ck-av{display:flex;flex:none}.ck-a{width:44px;height:44px;border-radius:50%}.ck-a.two{margin-left:-14px;border:2px solid #fff}
.ck-body{display:flex;flex-direction:column;gap:.35rem;min-width:0}
.ck-i{font-size:.85rem}.ck-i.err{color:#c62828}.ck-i.warn{color:#e08a00}.ck-i.info{color:#1e6fd9}
.ck-viewmore{background:none;border:0;color:var(--primary,#1e6fd9);font:inherit;padding:.6rem 0;cursor:pointer;min-height:44px}
.ck-cap{margin:.2rem 0 0}

/* Messages: search + chat */
.msg-search{padding:12px 14px 4px}.msg-search input{width:100%}.msg-last{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tick{font-size:11px;letter-spacing:-2px;color:var(--muted);margin-left:2px}.tick.seen{color:#2563eb;font-weight:700}
.chat-wrap{display:flex;flex-direction:column;height:calc(100vh - 300px);height:calc(100dvh - 300px);min-height:380px;border-radius:16px;overflow:hidden;background:var(--surface);border:1px solid var(--line,#e5e7eb)}
.chat-head{display:flex;align-items:center;gap:10px;padding:10px 14px;background:var(--surface);border-bottom:1px solid var(--line,#e5e7eb);position:sticky;top:0;z-index:2}
.chat-head .avatar{width:44px;height:44px}.chat-who{flex:1;min-width:0;display:flex;flex-direction:column}.chat-who b{font-size:16px;color:var(--brand)}.chat-who a{text-decoration:none}
.chat-wrap .chat{flex:1;max-height:none;background:var(--surface-2,#f3f4f8);gap:6px;padding:12px 14px}
.chat-wrap .chat #msgs{display:flex;flex-direction:column;gap:6px}
.chat-wrap .bubble{max-width:80%;border-radius:18px;border:0;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.06);align-self:flex-start;border-bottom-left-radius:6px;word-wrap:break-word}
.chat-wrap .bubble.me{align-self:flex-end;background:#2563eb;color:#fff;border-bottom-left-radius:18px;border-bottom-right-radius:6px}
.chat-wrap .bubble.me small{color:rgba(255,255,255,.85);text-align:right}.chat-wrap .bubble.me .tick{color:rgba(255,255,255,.8)}.chat-wrap .bubble.me .tick.seen{color:#9fd0ff}
.chat-wrap .bubble.me a{color:#fff;text-decoration:underline}.msg-text{white-space:pre-wrap}.msg-about{display:block;margin-bottom:2px}
.msg-day{text-align:center;margin:8px 0 2px}.msg-day span{background:rgba(0,0,0,.07);border-radius:10px;padding:2px 10px;font-size:11px;color:var(--muted)}
.chat-form{display:flex;gap:8px;align-items:flex-end;padding:10px 12px;background:var(--surface);border-top:1px solid var(--line,#e5e7eb)}
.chat-form textarea{flex:1;resize:none;border-radius:20px;padding:10px 14px;max-height:140px;font:inherit}
.chat .center,#convMore{text-align:center}#convMore:not(:empty){padding:10px}
.chat-form textarea{min-height:44px;height:44px;box-sizing:border-box;margin:0}.chat-form .btn{height:44px}

/* Upcoming: photos */
.up-av{display:flex;flex:none}.up-a{width:42px;height:42px;border-radius:50%}.up-a.two{margin-left:-12px;border:2px solid var(--surface,#fff)}
.up-card>.up-av+span{flex:1;min-width:0;text-align:left}

/* Matrimony approval */
.mt-wait{border-left:4px solid #e08a00;margin-bottom:12px}.mt-wait.bad{border-left-color:#c62828}
.mt-badge.wait{background:#fff3d6;color:#8a5a00}
.mt-req{display:flex;gap:10px;align-items:center;margin-top:6px}.mt-req-ph{width:72px;height:72px;object-fit:cover;border-radius:10px}
.mt-badge.wait{top:8px;bottom:auto;left:8px;right:auto}

/* Tablets (iPad and similar, 600-1199px): roomier padding, rows that wrap instead of hiding buttons, more cards per row */
@media (min-width:600px) and (max-width:1199px){
  .content{padding-left:22px;padding-right:22px}
  td.act{white-space:normal}td.act .btn{margin:2px 0 2px 4px}
  .cards{grid-template-columns:repeat(auto-fill,minmax(210px,1fr))}
  .mphoto{aspect-ratio:1/1}
  .g2{grid-template-columns:repeat(2,minmax(0,1fr))}.form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .modal{max-width:min(92vw,640px)}
  td,th{padding:10px 12px}
}
/* Touch screens: every button, field and tab is at least 44px tall, so a finger can hit it */
@media (pointer:coarse){
  .btn,.btn.sm,input:not([type=checkbox]):not([type=radio]):not([type=file]),select,.check,.nav a,.tabs button,.bottom a{min-height:44px}
  input[type=checkbox],input[type=radio]{width:24px;height:24px}
  .btn.sm{padding-left:12px;padding-right:12px}
  td .btn.sm{min-height:40px}
}
@media (min-width:641px) and (max-width:1199px){.ut th:nth-child(3),.ut td:nth-child(3),.ut th:nth-child(6),.ut td:nth-child(6){display:none}}

.cfoot{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:10px;padding-top:8px;border-top:1px solid var(--line);font-size:13px;flex-wrap:wrap}.cfoot .btn{margin-left:auto}
.totop{position:fixed;right:22px;bottom:84px;width:44px;height:44px;border-radius:50%;background:var(--surface);color:var(--brand);border:1px solid var(--line);box-shadow:0 4px 14px rgba(0,0,0,.2);font-size:22px;line-height:1;cursor:pointer;z-index:29}.totop[hidden]{display:none}
body:has(.fab) .totop{bottom:150px}
@media(min-width:861px){.totop{bottom:28px}body:has(.fab) .totop{bottom:96px}}
@media print{.totop{display:none}}

.feed-end{text-align:center;padding:14px;min-height:20px}
.hero{display:flex;gap:18px;align-items:center;margin-bottom:14px}.hero .av.xl,.hero .avatar.xl{flex:none}.hero-t{min-width:0;display:grid;gap:6px}.hero-t h2{font-size:22px}
.hero-l{display:flex;flex-wrap:wrap;gap:6px 16px;align-items:center;color:var(--muted)}.hero-l span{display:inline-flex;gap:6px;align-items:center}.hero-l svg{width:16px;height:16px}
@media(max-width:600px){.hero{flex-direction:column;align-items:flex-start}}

.updbar{display:flex;gap:.5rem;align-items:center;padding:.65rem 1rem;background:#fff4d6;color:#5a3d00;border-bottom:1px solid #f0cf7a;text-decoration:none}.updbar:hover{text-decoration:none;background:#ffecb8}

.welcome{border-left:4px solid var(--brand,#b45309)}.welcome .actions{display:flex;gap:.6rem;flex-wrap:wrap;margin-top:.6rem}

/* member profile: the tabs stay in view under the top bar while the page scrolls */
.tabs-stick{position:sticky;top:var(--topbar-h,57px);z-index:15;background:var(--bg);margin-left:-12px;margin-right:-12px;padding:0 12px}
.feed-bar{gap:2px}.feed-bar .btn{min-width:44px;padding-left:10px;padding-right:10px}
.more-fields{grid-column:1/-1;margin-top:4px}.more-fields summary{cursor:pointer;font-weight:600;color:var(--brand);padding:6px 0}.more-fields .form-grid{margin-top:8px}

.bottom a{position:relative}.bn-badge{position:absolute;top:2px;left:calc(50% + 6px);min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:#d93025;color:#fff;font:700 11px/18px var(--font,inherit);font-style:normal;text-align:center;box-shadow:0 0 0 2px var(--surface,#fff)}.bn-badge[hidden]{display:none}

/* member profile: the photo is a square, in the centre */
.hero{flex-direction:column;align-items:center;text-align:center;gap:14px}.hero .avatar.xl{width:min(220px,64vw);height:min(220px,64vw);border-radius:22px;font-size:64px}.hero .avatar.xl img{border-radius:inherit;object-fit:cover}.hero-t{justify-items:center}.hero-l{justify-content:center}

/* home: Facebook-like, compact */
.bday-card{padding:10px 12px;margin:10px 0}.bday-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.bday-head a{font-size:13px}
.bday-row{display:flex;gap:12px;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch}.bday-row::-webkit-scrollbar{display:none}
.bday{flex:none;width:76px;display:grid;justify-items:center;gap:2px;text-align:center}.bday a:first-child{display:grid;justify-items:center;gap:3px;text-decoration:none;color:inherit}.bday .avatar{width:56px;height:56px;box-shadow:0 0 0 2px #fff,0 0 0 4px var(--brand,#2563eb)}.bday b{font-size:12px;max-width:76px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bday small{color:var(--muted);font-size:11px}.bday .btn.sm{padding:2px 10px;font-size:12px;min-height:0}
.tips>summary{cursor:pointer;font-size:13px;color:var(--muted);list-style:none;padding:4px 2px}.tips>summary::-webkit-details-marker{display:none}
#homeFeed .composer{margin-top:0}

/* chat: message box stays at the very bottom of the screen */
@media(max-width:860px){.chat-wrap{height:calc(100dvh - var(--topbar-h,56px) - 64px - env(safe-area-inset-bottom));min-height:0;border-radius:0;border-left:0;border-right:0}.chat-form{position:sticky;bottom:0}body:has(.chat-wrap) .bottom{display:none}body:has(.chat-wrap) .chat-wrap{height:calc(100dvh - var(--topbar-h,56px) - 8px)}}
@media(max-width:860px){body:has(.chat-wrap) .content{padding:0 0 env(safe-area-inset-bottom)}body:has(.chat-wrap) .chat-wrap{height:calc(100dvh - var(--topbar-h,56px) - env(safe-area-inset-bottom))}}

.updbar{font-size:13px;padding:.4rem .8rem;line-height:1.3}.updbar b{white-space:nowrap}
@media(max-width:860px){.updbar{display:block}.updbar svg{vertical-align:-3px}}
.bday-row{padding:5px 4px 2px}

/* Facebook-like full pages: search and menu */
@media(max-width:860px){body.fullpage .top{display:none}body.fullpage-search .bottom{display:none}}
.fb-bar{display:flex;align-items:center;gap:6px;padding:6px 0;position:sticky;top:0;background:var(--bg,#fff);z-index:5}.fb-bar h2{flex:1;margin:0;font-size:22px}
.fb-bar input{flex:1;height:42px;border-radius:21px;border:0;background:var(--surface-2,#eef0f3);padding:0 16px;font-size:16px}
.fb-head{display:flex;justify-content:space-between;align-items:center;padding:12px 4px}.fb-head h3{margin:0;font-size:20px}.fb-head a{font-size:16px}
.fb-row{display:flex;align-items:center;gap:14px;padding:9px 4px;text-decoration:none;color:inherit}.fb-row .avatar{width:56px;height:56px}.fb-name{display:grid;min-width:0}.fb-name b{font-size:17px;font-weight:500}
.fb-me{display:flex;align-items:center;gap:12px;padding:12px;margin:6px 0 10px;background:var(--surface,#fff);border:1px solid var(--line,#e5e7eb);border-radius:12px;text-decoration:none;color:inherit}.fb-me .avatar{width:48px;height:48px}.fb-me span{display:grid}
.fb-tiles{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:10px}.fb-tile{display:flex;flex-direction:column;align-items:flex-start;gap:6px;padding:12px;min-height:76px;background:var(--surface,#fff);border:1px solid var(--line,#e5e7eb);border-radius:12px;text-decoration:none;color:inherit}.fb-tile svg{width:26px;height:26px;color:var(--brand)}
.fb-sec{margin:6px 0}.fb-sec>summary{cursor:pointer;display:flex;gap:10px;align-items:center;padding:12px 4px;font-size:17px;font-weight:600;list-style:none}.fb-sec>summary::-webkit-details-marker{display:none}.fb-sec>summary svg{width:24px;height:24px}
.fb-lines{display:grid;gap:6px;margin-bottom:8px}.fb-line{display:flex;align-items:center;gap:14px;width:100%;padding:13px 14px;background:var(--surface,#fff);border:1px solid var(--line,#e5e7eb);border-radius:12px;font:inherit;font-size:16px;text-align:left;color:inherit;text-decoration:none;cursor:pointer}.fb-line svg{width:24px;height:24px}

.bday{width:92px;text-decoration:none;color:inherit}.bday b{white-space:normal;max-width:92px;overflow:visible;text-overflow:clip;line-height:1.25;font-weight:600}

/* go-to-top: small, on the left edge, never over Post / Send buttons */
.totop{right:auto;left:10px;width:38px;height:38px;font-size:18px;opacity:.9}body:has(.fab) .totop{bottom:84px}@media(min-width:861px){.totop{left:auto;right:22px}}

/* members list: the name gets the room, call button is a round icon on phones */
.mrow{display:flex;align-items:center;gap:8px;padding:0 12px 0 0}.mrow>.person{flex:1;min-width:0}.mrow>span{flex:none;display:flex;align-items:center;gap:6px}.mrow .person .meta{overflow-wrap:anywhere}
.mrow .btn.sm .num{margin-left:6px}
@media(max-width:640px){.mrow .btn.sm .num{display:none}.mrow .btn.sm{width:40px;height:40px;padding:0;border-radius:50%;justify-content:center}.mrow .person{padding:10px 8px 10px 12px}.mrow .person .avatar{width:48px;height:48px}}

.sel-filter{display:block;width:100%;margin-bottom:4px;height:36px;border-radius:18px;font-size:14px;padding:0 14px}

.msg-img{display:block;max-width:100%;max-height:260px;border-radius:12px;margin-bottom:4px;cursor:zoom-in}.chat-attach{flex:none;width:44px;height:44px;padding:0;justify-content:center;cursor:pointer}.chat-attach.on{background:var(--brand);color:#fff}

/* member profile, Facebook style: coloured cover, photo overlapping it, action buttons under the name */
.hero{position:relative;overflow:hidden;padding-top:84px}.hero::before{content:'';position:absolute;left:0;right:0;top:0;height:118px;background:linear-gradient(135deg,var(--brand,#2563eb),color-mix(in srgb,var(--brand,#2563eb) 40%,#fff))}
.hero .avatar.xl{position:relative;z-index:1;box-shadow:0 0 0 5px var(--surface,#fff)}
.hero-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;width:100%}.hero-actions .btn{flex:1 1 auto}

/* chat on phones: the whole screen under the top bar belongs to the chat, so the header never slips away and the message box is at the very bottom */
@media(max-width:860px){body:has(.chat-wrap){overflow:hidden}body:has(.chat-wrap) .chat-wrap{position:fixed;left:0;right:0;top:var(--chat-top,64px);bottom:0;height:auto;z-index:20;border-radius:0}body:has(.chat-wrap) .chat-head{position:static}}
/* profile photo stays a square */
.hero .avatar.xl,.hero .avatar.xl img{border-radius:22px!important}

/* profile buttons: one tidy row, icon over a short label */
.hero-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(56px,1fr));gap:6px;width:100%}
.hero-actions .btn{flex-direction:column;gap:2px;height:auto;min-height:54px;padding:8px 2px;font-size:12px;line-height:1.15;text-align:center;justify-content:center;white-space:normal}
.hero-actions .btn svg{width:22px;height:22px}.hero-actions .btn.icon{width:auto}

.photo-pick{display:flex;flex-direction:column;align-items:center;gap:8px;padding:14px;border:2px dashed var(--line,#cbd5e1);border-radius:14px;cursor:pointer;text-align:center}
.pp-add{display:inline-flex;gap:8px;align-items:center;font-weight:600;color:var(--brand)}.pp-add svg{width:26px;height:26px}.pp-prev{max-width:100%;max-height:220px;border-radius:12px;object-fit:cover}
.dash-msg{position:relative;padding-right:40px}.dash-x{position:absolute;top:6px;right:8px;width:30px;height:30px;border:0;border-radius:50%;background:transparent;font-size:24px;line-height:1;color:var(--muted);cursor:pointer}.dash-x:hover{background:var(--surface-2,#eef0f3)}

.by{color:inherit;text-decoration:none}.by:hover b{text-decoration:underline}
.feed-bar{position:relative}.pmenu{position:relative;margin-left:auto}.pmenu>summary{list-style:none;cursor:pointer}.pmenu>summary::-webkit-details-marker{display:none}
.pmenu-list{position:absolute;right:0;bottom:calc(100% + 4px);min-width:190px;z-index:6;background:var(--surface,#fff);border:1px solid var(--line,#e5e7eb);border-radius:12px;box-shadow:0 8px 24px rgba(0,0,0,.18);padding:6px;display:grid}
.pmenu-list a,.pmenu-list button{display:flex;gap:10px;align-items:center;padding:10px 12px;border:0;background:none;font:inherit;color:inherit;text-align:left;text-decoration:none;border-radius:8px;cursor:pointer}.pmenu-list a:hover,.pmenu-list button:hover{background:var(--surface-2,#eef0f3)}.pmenu-list svg{width:20px;height:20px}

.person{justify-content:flex-start;gap:12px;padding-left:10px}.person .avatar{flex:0 0 auto;margin-left:0}.person>span[style*="flex:1"]{min-width:0}.person .badges{display:flex;gap:6px;flex-wrap:wrap;margin-top:6px}
@media(max-width:860px){body:has(.chat-wrap) .chat-wrap{bottom:0;padding-bottom:max(8px,env(safe-area-inset-bottom))}}

.hero-photo{position:relative;display:inline-block}.hero-photo .cam{position:absolute;right:-4px;bottom:-4px;width:40px;height:40px;border-radius:50%;background:var(--brand);color:#fff;display:flex;align-items:center;justify-content:center;border:3px solid var(--surface,#fff);cursor:pointer;box-shadow:0 2px 6px rgba(0,0,0,.25)}.hero-photo .cam svg{width:20px;height:20px;fill:none;stroke:#fff}
.pmenu>summary{min-width:44px;min-height:40px;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--line,#d6d9de);border-radius:12px}.pmenu>summary svg{width:24px;height:24px;stroke-width:3.4}
.row.rel{flex-wrap:nowrap;padding:0 12px 0 0;align-items:center}.row.rel>.person{flex:1 1 auto;min-width:0}.row.rel>.badge{flex:none;white-space:nowrap}
.rec-btns{display:flex;gap:8px;flex-wrap:wrap}

.burger2{display:none}
@media(max-width:860px){.top .burger,.top .menu{display:none}.top .burger2{display:inline-flex}.bottom .bn-me .avatar{width:26px;height:26px;font-size:12px}.bottom .bn-me.on .avatar{outline:2px solid var(--brand)}}
/* phones: dialogs fill the whole screen like an app page (small confirm boxes stay small) */
@media(max-width:860px){
  .modal:not(.sm){padding:0;display:block;background:var(--surface)}
  .modal:not(.sm)>.box{width:100%;max-width:none;height:100%;max-height:none;border-radius:0;box-shadow:none}
  .modal:not(.sm) .hd{position:sticky;top:0;background:var(--surface);padding:calc(10px + env(safe-area-inset-top)) 14px 10px;z-index:2}
  .modal:not(.sm) .bd{flex:1;padding:16px 14px}
  .modal:not(.sm) .ft{position:sticky;bottom:0;background:var(--surface);padding:10px 14px calc(10px + env(safe-area-inset-bottom));justify-content:stretch}
  .modal:not(.sm) .ft .btn{flex:1}
  .modal:not(.sm) textarea{min-height:34vh}
  .modal.sheet{display:grid}
}
.hero-photo .cam{z-index:3}.hero-photo .avatar.xl{position:relative;z-index:1}

/* Today / Upcoming on phones: name gets the room, the wish buttons stay small beside the card */
.up-wrap{align-items:stretch}.up-wrap>a.up-card{margin-bottom:0}.up-list,.up-wrap{margin-bottom:8px}
.up-card .up-av+span{flex:1;min-width:0;overflow-wrap:anywhere}.up-card .up-ic{flex:none;font-size:22px}
.up-wish{align-self:center;min-width:44px;min-height:44px;padding:0 10px}
@media(max-width:520px){.up-wrap{flex-wrap:wrap}.up-wrap>a{flex:1 1 100%}.up-wrap .up-wish{margin-left:auto;min-height:40px}.up-wrap{justify-content:flex-end}}
@media(max-width:520px){.up-wrap .up-wish{margin-left:0}.up-wrap>button:first-of-type{margin-left:auto}}
.bubble.me{-webkit-touch-callout:none}.msg-del{font-style:italic;opacity:.75}

.top-brand{display:none;align-items:center;gap:10px;min-width:0;flex:1;text-decoration:none;color:inherit}.top-brand img{border-radius:8px;flex:none}.top-brand b{font-size:16px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(max-width:860px){.top-brand{display:flex}.top .grow{display:none}.top [data-lang],.top [data-theme-toggle]{display:none}.top{gap:6px}}

.ann{gap:12px;padding:10px 12px}.ann-av{display:flex;flex:none}.ann-av .avatar+.avatar{margin-left:-14px;border:2px solid var(--surface,#fff)}
.ann-t{flex:1;min-width:0;line-height:1.35;overflow-wrap:anywhere}.ann-t a{font-weight:600}.ann-t .badges{display:flex;margin-top:6px}
.mact{display:flex;gap:8px;align-items:stretch;margin-top:10px}.mact .btn{min-height:44px;justify-content:center}.mact .btn:first-child{flex:1}.mact .btn+.btn{flex:0 0 52px;padding:0}
.ord{display:flex;align-items:center;gap:10px;padding:8px 0;flex-wrap:nowrap}.ord-n{flex:1;min-width:0;display:flex;flex-direction:column}.ord .btn{min-width:44px}
@media(max-width:860px){.content .tabs{position:sticky;top:var(--top-h,56px);z-index:9;background:var(--bg)}}

/* 2.17.1: education / work records - text first, buttons on their own line, never hidden under the + button */
.rec{padding:12px 24px;border-bottom:1px solid var(--line,#e8e4dc)}.rec:last-child{border-bottom:0}
.rec-main b{display:block;font-size:1.02em}.rec-sub{display:block;color:var(--muted,#6b6b6b);font-size:.9em;margin-top:2px}
.rec-btns{display:flex;gap:8px;margin-top:8px}
body:has(.fab) #view,body:has(.fab) main{padding-bottom:120px}

.pickrow{display:flex;align-items:center;gap:10px;background:none;border:1px solid transparent;border-radius:10px;padding:8px;cursor:pointer;font:inherit;color:inherit}.pickrow:hover{background:var(--soft,#f6f2ea)}.pickrow.picked{border-color:var(--brand,#b5540d);background:#fff4e8}
/* upcoming: the card and its two buttons form one neat block on a phone */
@media (max-width:860px){.up-wrap{flex-wrap:wrap;gap:6px;margin-bottom:14px;padding-bottom:12px;border-bottom:1px solid var(--line)}.up-wrap>a{flex:1 1 100%}.up-wrap .up-wish{flex:1 1 0;justify-content:center;min-height:42px}.up-wrap .up-wish .hide-sm{display:inline}}

/* occupation and education cards: tighter, so the content is not far apart */
.rec{padding:8px 20px}.rec-main b{font-size:1em;line-height:1.3}.rec-sub{margin-top:1px;line-height:1.35}.rec-btns{margin-top:6px}.rec-btns .btn{min-height:34px;padding:4px 14px}

/* upcoming: the two tab rows are plain rows (they used to stick on top of each other), the kind names are buttons */
.content .tabs.flat{position:static;margin-bottom:8px}.up-kind{background:none;border:1px solid transparent;border-radius:999px;padding:6px 12px;font:inherit;font-size:.95rem;cursor:pointer;min-height:38px}.up-kind.on{background:#fff;border-color:currentColor;font-weight:700;box-shadow:0 1px 4px rgba(0,0,0,.12)}

.list>.row.note,.row.note{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center;gap:12px;justify-content:flex-start}.note-t{flex:1}.note-t b{display:block;font-weight:600}.row.note .avatar{width:44px;height:44px;flex:none}.note-t{display:flex;flex-direction:column;gap:2px;min-width:0}.note-t small{font-size:12px}
.fb-head{display:flex;align-items:center;gap:14px}.fb-head h3{margin-right:auto}.linkbtn{background:none;border:0;color:var(--brand);font:inherit;font-weight:600;cursor:pointer;padding:6px}
/* Events page: the kinds sit on one line; Upcoming / Month / Calendar / Year look like real tabs */
.up-legend{flex-wrap:nowrap;gap:6px;justify-content:space-between}.up-legend .up-kind{flex:1 1 0;min-width:0;padding:6px 4px;font-size:.82rem;white-space:nowrap;text-align:center;display:inline-flex;align-items:center;justify-content:center;gap:4px;border-color:var(--line);background:var(--surface,#fff)}.up-legend .up-kind.on{border-color:currentColor}
.content .tabs.flat.mt{display:flex;gap:0;border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--surface,#fff);padding:0}.content .tabs.flat.mt a{flex:1 1 0;text-align:center;padding:11px 4px;font-weight:600;font-size:.92rem;color:var(--muted);text-decoration:none;border-right:1px solid var(--line);min-height:44px;display:flex;align-items:center;justify-content:center}.content .tabs.flat.mt a:last-child{border-right:0}.content .tabs.flat.mt a.on{background:var(--brand);color:#fff}
/* a small light star in the corner of a family-tree card for a person who has passed away */
.tcard{position:relative}.tcard.d::after{content:"\2605";position:absolute;top:3px;right:8px;font-size:13px;line-height:1;color:#c9a227;opacity:.75;pointer-events:none}
.who-head{display:flex;align-items:center;gap:12px;padding:10px 12px;margin-bottom:14px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2)}.who-head .avatar{width:48px;height:48px;flex:none}.who-head span{display:flex;flex-direction:column;min-width:0}.who-head b{overflow-wrap:anywhere}.who-head small{font-size:12.5px}
.who-head.right{justify-content:space-between}.who-head.right span{text-align:right;align-items:flex-end}.who-head.right .avatar{width:56px;height:56px}
.already-here{background:var(--soft,#f4f6fb);border:1px solid var(--line,#dde3ee);border-radius:10px;padding:8px 10px;display:grid;gap:4px}.already-here .person{display:flex;gap:10px;align-items:center;text-decoration:none;color:inherit;padding:4px 0}.already-here .person small{display:block}
/* the member's own special day on the profile card */
.hero.occ{position:relative;overflow:hidden}
.occ-band{position:absolute;top:8px;left:50%;transform:translateX(-50%);z-index:2;max-width:calc(100% - 16px);padding:5px 12px;font-size:13px;white-space:nowrap;border-radius:10px;font-weight:700;display:flex;gap:8px;align-items:center;justify-content:center;text-align:center}
.occ-ic{font-size:1.3em}
.hero.occ-birthday{border:2px solid #f5b942;background:radial-gradient(circle at 12% 18%,#ffe9a8 0 3px,transparent 4px),radial-gradient(circle at 88% 22%,#ffc2d6 0 3px,transparent 4px),radial-gradient(circle at 70% 85%,#bfe3ff 0 3px,transparent 4px),radial-gradient(circle at 25% 80%,#d8c6ff 0 3px,transparent 4px),linear-gradient(180deg,#fff8e6,var(--surface,#fff) 60%)}
.occ-birthday .occ-band{background:linear-gradient(90deg,#ffd36b,#ff9fbf);color:#5a2a00}
.occ-birthday .avatar.xl,.occ-birthday .hero-photo img{box-shadow:0 0 0 4px #f5b942,0 0 18px #ffd36b}
.hero.occ-anniversary{border:2px solid #e58aa8;background:linear-gradient(180deg,#fff0f5,var(--surface,#fff) 60%)}
.occ-anniversary .occ-band{background:linear-gradient(90deg,#f7b6cb,#f0c987);color:#5a1033}
.occ-anniversary .avatar.xl,.occ-anniversary .hero-photo img{box-shadow:0 0 0 4px #e58aa8}
.hero.occ-remembrance{border:2px solid #b9b3a5;background:linear-gradient(180deg,#f3f1ec,var(--surface,#fff) 60%)}
.occ-remembrance .occ-band{background:#e6e2d8;color:#4a4638;font-weight:600}
.occ-remembrance .avatar.xl,.occ-remembrance .hero-photo img{box-shadow:0 0 0 3px #b9b3a5}
/* today's birthdays on home: tall photo cards, name on a dark strip at the bottom */
.bstory-row{gap:8px;padding:2px 2px 4px}
.bstory{flex:none;position:relative;width:112px;height:180px;border:0;padding:0;border-radius:12px;overflow:hidden;cursor:pointer;background:var(--soft,#eef1f6);font:inherit;text-align:left}
.bstory img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.bstory.on{box-shadow:0 0 0 3px var(--brand,#2563eb)}
.bs-ph{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:54px;font-weight:700;color:#fff}.bs-ph.m{background:#5b8def}.bs-ph.f{background:#e0709a}
.bs-name{position:absolute;left:0;right:0;bottom:0;padding:22px 8px 8px;background:rgba(0,0,0,.5);color:#fff;display:grid;gap:1px;line-height:1.25}.bs-name b{font-size:13px;font-weight:600;color:#fff}.bs-name small{font-size:11px;color:rgba(255,255,255,.85)}
.bs-pick{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-top:10px;padding:8px 10px;border:1px solid var(--line,#dde3ee);border-radius:12px}.bs-info{display:grid}.bs-act{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.bstory .bs-type{position:absolute;top:8px;left:8px;width:26px;height:26px;border-radius:50%;background:#fff;display:flex;align-items:center;justify-content:center;font-size:14px;line-height:1}
.bstory .bs-two{position:absolute;inset:0;display:grid;grid-template-columns:1fr 1fr;gap:2px;background:#fff}.bstory .bs-two img{position:static;width:100%;height:100%}.bstory .bs-two .bs-ph{position:static;font-size:34px}

/* family wall */
.wall-body { white-space: pre-wrap; word-break: break-word; margin: 8px 0; }
.wall-kinds { flex-wrap: wrap; margin-bottom: 8px; }
.wall-k { font-size: 1.1em; }
.wall-post .grow { flex: 1; min-width: 0; }
#wallText { width: 100%; box-sizing: border-box; margin: 8px 0; }

/* menu: language list and static line */
.fb-static { cursor: default; }
.fb-langs { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 14px 12px; }

/* balloons (birthday) or hearts (anniversary) floating up the sides of the profile card */
.occ-fx{position:absolute;inset:0;pointer-events:none;overflow:hidden;z-index:1}
.occ-fx i{position:absolute;bottom:-30px;font-style:normal;font-size:26px;opacity:.9;animation:occRise 9s linear infinite}
.occ-fx i:nth-child(1){left:3%;animation-delay:0s}.occ-fx i:nth-child(2){left:90%;animation-delay:1.5s;font-size:30px}.occ-fx i:nth-child(3){left:12%;animation-delay:3s;font-size:22px}
.occ-fx i:nth-child(4){left:80%;animation-delay:4.5s;font-size:24px}.occ-fx i:nth-child(5){left:6%;animation-delay:6s;font-size:28px}.occ-fx i:nth-child(6){left:93%;animation-delay:7.5s;font-size:22px}
@keyframes occRise{0%{transform:translateY(0) rotate(-6deg)}50%{transform:translateY(-140px) rotate(6deg)}100%{transform:translateY(-300px) rotate(-6deg);opacity:0}}
@media (prefers-reduced-motion:reduce){.occ-fx i{animation:none;bottom:12px}}
/* home strip: smaller cards, slow continuous scroll */
.bstory{width:92px;height:140px}.bs-name b{font-size:12px}.bs-name{padding:16px 6px 6px}
.bstory-row{overflow-x:auto;scrollbar-width:none}.bstory-row::-webkit-scrollbar{display:none}
.home-notices{margin:10px 0}

/* home strip, final look: equal cards, one gradient name area of the same height on every card */
.bstory{width:104px;height:150px}
.bstory .bs-name{position:absolute;left:0;right:0;bottom:0;height:78px;box-sizing:border-box;padding:0 8px 8px;background:linear-gradient(to top,rgba(0,0,0,.82) 0%,rgba(0,0,0,.55) 55%,rgba(0,0,0,0) 100%);display:flex;flex-direction:column;justify-content:flex-end;gap:1px;line-height:1.25}
.bstory .bs-name b{font-size:12px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-shadow:0 1px 2px rgba(0,0,0,.6)}
.bstory .bs-name small{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-shadow:0 1px 2px rgba(0,0,0,.6)}
.hint-off{opacity:.5}

/* roles page: one role at a time, groups that fold, one save bar */
.role-chips{display:flex;gap:8px;overflow-x:auto;padding:2px 0 6px;scrollbar-width:none}.role-chips::-webkit-scrollbar{display:none}
.role-chips button{flex:none;display:grid;gap:1px;text-align:left;padding:8px 14px;border:1px solid var(--line,#dde3ee);border-radius:14px;background:var(--surface,#fff);font:inherit;cursor:pointer}
.role-chips button small{color:var(--muted,#6b7280);font-size:12px}.role-chips button.on{background:var(--brand,#a8561f);border-color:var(--brand,#a8561f);color:#fff}.role-chips button.on small{color:rgba(255,255,255,.85)}
.perm-group{padding:0}.perm-group summary{display:flex;justify-content:space-between;align-items:center;padding:14px 16px;cursor:pointer;list-style:none}.perm-group summary::-webkit-details-marker{display:none}
.perm-list{border-top:1px solid var(--line,#e5e7eb)}.perm-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 16px;border-bottom:1px solid var(--line,#eef0f3);cursor:pointer}.perm-row:last-child{border-bottom:0}
.perm-row.off{opacity:.55;cursor:default}.perm-row input{width:22px;height:22px;flex:none;accent-color:var(--brand,#a8561f)}
.savebar{position:sticky;bottom:72px;z-index:5;display:flex;gap:8px;padding:10px;margin-top:12px;background:var(--surface,#fff);border:1px solid var(--line,#dde3ee);border-radius:14px;box-shadow:0 -2px 12px rgba(0,0,0,.08)}
@media (min-width:900px){.savebar{bottom:12px}}
.hero h2 .late{font-weight:500;color:var(--muted,#6b7280);font-size:.8em;margin-right:2px}

/* phones: tables as cards */
@media (max-width:640px){
  .table-wrap{overflow-x:visible}
  table.rt,table.rt tbody{display:block}
  table.rt thead{display:none}
  table.rt tr{display:block;margin:0 0 10px;border:1px solid var(--line,#e3e6ec);border-radius:12px;background:var(--surface,#fff);overflow:hidden}
  table.rt td{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;padding:8px 12px;border-bottom:1px solid var(--line,#eef0f3);text-align:right;word-break:break-word}
  table.rt td:last-child{border-bottom:0}
  table.rt td::before{content:attr(data-label);flex:none;max-width:38%;text-align:left;color:var(--muted,#6b7280);font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.02em;padding-top:2px}
  table.rt td.sn{display:none}
  table.rt td:empty{display:none}
  table.rt td.act{justify-content:flex-end}table.rt td.act::before{display:none}
  table.rt td:not([data-label])::before{display:none}
}
/* Tips page: cards stacked, not a sideways carousel */
@media (max-width:640px){#tipsList .nudges,.tips-page .nudges{display:grid;grid-template-columns:1fr;overflow:visible}#tipsList .nudges>.card,.tips-page .nudges>.card{flex:none}}

/* profile tabs: the new tab fades in softly instead of flashing */
[data-pane]:not([hidden]){animation:paneIn .18s ease-out}@keyframes paneIn{from{opacity:.0}to{opacity:1}}
@media (prefers-reduced-motion:reduce){[data-pane]:not([hidden]){animation:none}}

/* setup guide and welcome card */
.setup-step{display:flex;gap:12px;align-items:center;padding:10px 0;text-decoration:none;color:inherit;border-top:1px solid var(--line)}.setup-step:first-child{border-top:0}
.setup-step .tick{flex:none;width:22px;height:22px;border-radius:50%;border:2px solid var(--line);display:inline-flex;align-items:center;justify-content:center}
.setup-step.ok{color:var(--muted,#6b7280)}.setup-step.ok .tick{background:#16a34a;border-color:#16a34a;color:#fff}.setup-step .tick svg{width:14px;height:14px}
.card.welcome p{margin:6px 0 0}

/* owner: communities that need attention */
.att-row{display:flex;flex-direction:column;gap:2px;padding:10px 0 10px 12px;border-top:1px solid var(--line);border-left:4px solid #d97706;text-decoration:none;color:inherit;margin-top:-1px}
.att-row:first-child{border-top:0}.att-row.bad{border-left-color:#dc2626}.att-row.info{border-left-color:var(--line)}.att-row span{color:var(--muted,#6b7280);font-size:.9rem}
/* tabs made of links (overview pages) */
.tabs a[role=tab]{flex:0 0 auto;display:inline-flex;align-items:center;min-height:44px;padding:0 16px;border-bottom:3px solid transparent;font-weight:600;color:var(--muted,#6b7280);text-decoration:none;white-space:nowrap}
.tabs a[role=tab].on{color:var(--brand);border-bottom-color:var(--brand)}
/* getting-started steps on Home */
.start-step{display:flex;gap:12px;align-items:flex-start;padding:12px 0;border-top:1px solid var(--line)}.start-step:first-child{border-top:0}.start-step p{margin:2px 0 8px}.start-step .actions{display:flex;gap:8px;flex-wrap:wrap}
.start-step .tick{flex:none;width:28px;height:28px;border-radius:50%;border:2px solid var(--brand);color:var(--brand);font-weight:700;display:inline-flex;align-items:center;justify-content:center}
.start-step.ok .tick{background:#16a34a;border-color:#16a34a;color:#fff}.start-step .tick svg{width:16px;height:16px}.start-step.ok b,.start-step.locked{opacity:.65}
/* nothing may be wider than the phone screen: a long option text must not stretch a field or the whole page sideways */
select,input,textarea{max-width:100%;min-width:0}
.toolbar{flex-wrap:wrap}.toolbar select,.toolbar input{flex:1 1 140px;min-width:0;max-width:100%;text-overflow:ellipsis}
.modal,.sheet,dialog{max-width:100vw}
html,body{overflow-x:clip}
/* 2.45.6 Home on a phone: posts, photos and cards use the full width, like a social feed (no empty border all round). */
@media (max-width:600px){
  body:has(#homeFeed) .content{padding:0 0 84px}
  body:has(#homeFeed) .content>.card,body:has(#homeFeed) #homeFeed .card,body:has(#homeFeed) #homeFeed .feed-item{border-left:0;border-right:0;border-radius:0;box-shadow:none;margin-left:0;margin-right:0}
  body:has(#homeFeed) #homeFeed .feed-item{margin-bottom:8px;padding:14px 12px 8px}
  body:has(#homeFeed) #homeFeed .feed-img{max-width:none;width:calc(100% + 24px);margin:8px -12px;border-radius:0;max-height:none}
  body:has(#homeFeed) #homeFeed .composer{width:100%;border-left:0;border-right:0;border-radius:0;margin:0 0 8px;padding:10px 12px}
  body:has(#homeFeed) #homeFeed .bday-card{margin:0 0 8px;padding:10px 12px}
  body:has(#homeFeed) .home-notices{margin:0 0 8px}body:has(#homeFeed) .home-notices>*,body:has(#homeFeed) #homeMsg,body:has(#homeFeed) .content .start-steps,body:has(#homeFeed) .content .today-card{border-left:0;border-right:0;border-radius:0;box-shadow:none;margin-left:0;margin-right:0}
}
/* The two photos of an anniversary: smaller, side by side, whole faces visible */
.bstory .bs-two{inset:0 0 74px 0;padding:10px 8px 0;gap:6px;background:var(--soft,#eef1f6);align-items:start}
.bstory .bs-two img,.bstory .bs-two .bs-ph{width:100%;height:auto;aspect-ratio:1/1.15;border-radius:10px;object-fit:cover;object-position:50% 20%}
.bstory .bs-two .bs-ph{font-size:20px;display:flex}
@media (max-width:600px){body:has(#homeFeed) .content .adslot{border-left:0;border-right:0;border-radius:0;margin-left:0;margin-right:0}}
.bstory.couple .bs-type{top:auto;bottom:80px;left:50%;transform:translateX(-50%);width:24px;height:24px;font-size:13px}
[data-combo] [data-cadd]:not(:empty){margin-bottom:12px}[data-combo] input[data-ci]{width:100%}
.bellb{position:relative}.bellb .bellcount{position:absolute;top:0;right:0;min-width:18px;height:18px;padding:0 5px;border-radius:99px;background:var(--bad);color:#fff;font-size:11px;font-weight:700;line-height:18px;text-align:center;box-shadow:0 0 0 2px var(--surface,#fff)}
.muted.block{display:block}.row>span:first-child{min-width:0}

.cr-photos{display:flex;align-items:center;gap:12px;margin:8px 0}.cr-photos figure{margin:0;text-align:center}.cr-photos img{width:84px;height:84px;object-fit:cover;border-radius:12px;border:1px solid var(--line);display:block}.cr-photos figcaption{font-size:.8rem;color:var(--muted);margin-top:2px}
.gbtn{display:flex;align-items:center;justify-content:center;gap:10px;background:#fff;color:#3c4043;border:1px solid #dadce0;font-weight:600}.gbtn svg{flex:none}
.bs-act{display:flex;flex-wrap:wrap;gap:8px}.bs-act [data-cardwish]{background:#fff;border:1.5px dashed var(--primary);color:var(--primary)}.bs-act [data-sendwish]{background:var(--primary);color:#fff;border-color:var(--primary)}.bs-act .bs-prof{background:transparent;border:1.5px solid var(--line);color:var(--text)}
.fold{margin-left:auto;min-width:36px}.folded>:not(.row:first-child){display:none!important}
.person .badge{white-space:nowrap;flex:none}.att-go{flex:none}
.req-by{display:flex;align-items:center;gap:8px;margin:6px 0;flex-wrap:wrap}.req-by .btn{margin-left:auto}
.cat-tiles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:14px}@media(min-width:700px){.cat-tiles{grid-template-columns:repeat(4,minmax(0,1fr))}}.cat-tile{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;min-height:112px;padding:14px 8px;border:1px solid var(--line);border-radius:16px;background:var(--surface);cursor:pointer;font:inherit;color:inherit;text-align:center}.cat-tile:hover,.cat-tile:focus-visible{border-color:var(--primary);box-shadow:0 2px 10px rgba(0,0,0,.08)}.cat-ic{font-size:34px;line-height:1}.cat-tile.all{background:var(--surface-2)}
.act-tile{text-align:center}.act-tile b{display:block;font-size:1.5rem}
.auth-perks{list-style:none;margin:18px 0 0;padding:0;display:grid;gap:10px}.auth-perks li{display:flex;align-items:center;gap:10px;background:rgba(255,255,255,.14);border-radius:14px;padding:10px 12px;font-size:.95rem}.auth-perks li span{font-size:1.3rem}@media(max-width:700px){.auth-perks{display:none}}
.tree.grabbing{cursor:grabbing;user-select:none}.tree-pad{position:absolute;right:12px;bottom:14px;z-index:5;display:grid;grid-template-columns:repeat(3,46px);grid-template-rows:repeat(2,46px);gap:4px;grid-template-areas:". u ." "l d r";opacity:.92}.tree-pad button{border:1px solid var(--line);background:var(--surface,#fff);border-radius:12px;font-size:18px;box-shadow:0 2px 8px rgba(0,0,0,.18);touch-action:none}.tree-pad button:active{background:var(--line)}.tree-pad [data-pan="0,-1"]{grid-area:u}.tree-pad [data-pan="-1,0"]{grid-area:l}.tree-pad [data-pan="1,0"]{grid-area:r}.tree-pad [data-pan="0,1"]{grid-area:d}.tree-bar{flex-wrap:wrap}@media print{.tree-pad{display:none}}
.cnt-badge{position:absolute;top:-8px;right:-8px;min-width:22px;height:22px;padding:0 6px;border-radius:11px;background:#d9342b;color:#fff;font:700 12px/22px system-ui;text-align:center;box-shadow:0 0 0 2px var(--surface,#fff)}.cnt-ok{position:absolute;top:-6px;right:-6px;width:20px;height:20px;border-radius:50%;background:#1e8449;color:#fff;font:700 12px/20px system-ui;text-align:center;box-shadow:0 0 0 2px var(--surface,#fff)}.cnt-line{display:block;margin-top:4px;font-weight:700;font-size:13px}.cnt-line.need{color:#d9342b}.cnt-line.ok{color:#1e8449}
.stat .ic .cnt-badge,.stat .ic .cnt-ok{color:#fff!important;opacity:1!important;z-index:2;font-size:12px!important;font-weight:700}
.tree{touch-action:none;overscroll-behavior:contain;-webkit-user-select:none;user-select:none}.tree a,.tree .tcard{-webkit-user-drag:none;-webkit-touch-callout:none}.tree img{pointer-events:none}
.cat-tile{position:relative}.cat-tile small{display:block;margin-top:2px;font-weight:600}.cat-ic{position:relative;display:inline-block}.cat-n{position:absolute;top:-8px;right:-14px;min-width:22px;height:22px;padding:0 6px;border-radius:11px;background:var(--brand);color:var(--brand-ink,#fff);font:700 12px/22px system-ui;text-align:center;font-style:normal;box-shadow:0 0 0 2px var(--surface,#fff)}
form.ro input:not([type=checkbox]),form.ro select,form.ro textarea{border-color:transparent;background:transparent;box-shadow:none;padding-left:0;color:var(--ink);opacity:1;-webkit-text-fill-color:var(--ink);appearance:none;-webkit-appearance:none}form.ro input[type=checkbox]{opacity:.9}form.ro select{background-image:none}form.ro .f>span{color:var(--muted);font-size:12px}
.emp-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:12px}.emp{display:flex;gap:12px;align-items:center}.emp-b{flex:1;min-width:0;line-height:1.45}.emp-b .badge{white-space:normal}
.nav-find{padding:10px 12px 0}.nav-find input,.fb-find input{width:100%;padding:9px 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface-2,#f4f4f4)}.fb-find{padding:4px 0 12px}.nav a[hidden],.nav h4[hidden]{display:none}
.vol{display:flex;gap:12px;align-items:center;padding:12px}.vol-t{flex:1;min-width:0;display:grid;gap:1px;line-height:1.3}

.bs-pick{display:block;margin-top:12px;padding:14px;border:0;border-radius:16px;background:linear-gradient(135deg,#fff3e0,#ffe0b2)}.bs-pick.bsk-a{background:linear-gradient(135deg,#fde4ef,#f8bbd9)}
.bs-pick .bs-info{margin-bottom:12px;gap:2px}.bs-pick .bs-info b{font-size:18px;line-height:1.25}.bs-pick .bs-info small{font-weight:600;color:#8a4b00}.bs-pick.bsk-a .bs-info small{color:#a2185b}
.bs-pick .bs-act{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.bs-pick .bs-act .btn{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:60px;padding:8px 4px;border-radius:12px;font-size:13px;line-height:1.2;text-align:center;white-space:normal}
.bs-pick .bs-act .hide-sm{display:inline!important}
.bs-pick .bs-act [data-sendwish]{background:#2e7d32;border-color:#2e7d32;color:#fff}
.bs-pick .bs-act [data-cardwish]{background:#6a1b9a;border:0;color:#fff}
.bs-pick .bs-act .bs-prof{background:#fff;border:1.5px solid rgba(0,0,0,.18);color:var(--ink)}
.bs-pick .bs-act .ico{width:22px;height:22px}
.sbars{display:flex;gap:2px;align-items:flex-end;height:64px;padding:4px;background:var(--surface-2,#f4f4f4);border-radius:10px}.sbars i{flex:1;background:var(--brand);border-radius:2px 2px 0 0;min-width:3px}.sbars.hrs i{background:#6a1b9a}.bars-l{display:flex;justify-content:space-between;font-size:11px;color:var(--muted);padding:0 4px}.tl{max-height:360px;overflow:auto}.tl-day{font-weight:700;font-size:12px;color:var(--muted);margin:10px 0 4px;text-transform:uppercase;letter-spacing:.04em}.tl-row{display:flex;gap:10px;align-items:flex-start;padding:6px 0;border-bottom:1px solid var(--line)}.tl-t{width:42px;color:var(--muted);font-size:12px;flex:none}.tl-i{flex:none}.tl-x{min-width:0;word-break:break-word}
.tree{height:72vh;min-height:320px}@media print{.tree{height:auto}}

/* tables become cards on a phone */
@media (max-width:640px){.tbl-stack thead{display:none}.tbl-stack,.tbl-stack tbody,.tbl-stack tr,.tbl-stack td{display:block;width:100%}.tbl-stack tr{margin:10px 0;padding:6px 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}.tbl-stack td{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:7px 0;border:0;border-bottom:1px dashed var(--line);text-align:right;word-break:break-word}.tbl-stack td:last-child{border-bottom:0}.tbl-stack td::before{content:attr(data-label);flex:none;max-width:42%;text-align:left;font-size:12px;font-weight:600;color:var(--muted)}.tbl-stack td[data-label=""]::before{display:none}.tbl-stack td.act{justify-content:flex-end;flex-wrap:wrap}.table-wrap{overflow:visible}}
/* the Save / Cancel bar of an open form stays in reach */
.inl-bar{position:sticky;bottom:0;background:var(--surface);padding:10px 0;margin-top:12px;border-top:1px solid var(--line);z-index:4}@media (max-width:860px){.inl-bar{bottom:64px}}
.bulk-c{margin-right:6px}#bulk{position:sticky;top:0;z-index:5;background:var(--surface)}
/* dark mode for the colourful panels */
[data-theme=dark] .bs-pick{background:linear-gradient(135deg,#3a2a10,#4a3416)}[data-theme=dark] .bs-pick.bsk-a{background:linear-gradient(135deg,#3b1a2b,#4d2038)}[data-theme=dark] .bs-pick .bs-info small{color:#ffcc80}[data-theme=dark] .bs-pick .bs-act .bs-prof{background:var(--surface-2)}
[data-theme=dark] .cnt-line.ok{color:#4ade80}[data-theme=dark] .cnt-line.need{color:#f87171}
@media (prefers-reduced-motion:reduce){*{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
button,.btn,.chk{touch-action:manipulation}
#bulk .chk{white-space:nowrap}#bulk{flex-wrap:wrap}
.fold{margin-left:auto;min-width:44px;min-height:38px;padding:6px 12px;font-weight:600;border:1.5px solid var(--brand);color:var(--brand);background:var(--surface)}
.tree>*:first-child{padding:22vh 55vw;box-sizing:content-box}@media print{.tree>*:first-child{padding:0}}

.tact{display:flex;gap:6px;flex-wrap:wrap}@media (max-width:640px){.tact{flex-wrap:nowrap;width:100%}.tact .btn{flex:1;min-width:0;padding:10px 0;justify-content:center}.tact .lb{display:none}.tree{height:calc(100dvh - 330px);min-height:300px}}@media print{.tact{display:none}}

/* tree page 2.53: slim bar, chips, floating zoom, small map, bottom sheet */
.tbar,.tmenu{display:none}.tchips{position:absolute;top:54px;left:10px;right:64px;z-index:6;display:flex;gap:6px;overflow-x:auto;scrollbar-width:none}.tchips button{flex:none;border:1px solid var(--line);background:var(--surface);color:var(--ink);border-radius:18px;padding:7px 12px;font-size:13px;min-height:34px}.tchips .on{background:var(--brand);border-color:var(--brand);color:#fff}
.tree li.gh{display:none}.tree .nosp .node>.tcard:not(:first-child){display:none}
.mini{position:absolute;left:10px;bottom:10px;z-index:6;width:90px;height:60px;background:var(--surface);border:1px solid var(--line);border-radius:8px;opacity:.95;cursor:pointer;overflow:hidden}.mini canvas{width:100%;height:100%;display:block}
.tsheet{position:absolute;left:0;right:0;bottom:0;z-index:8;background:var(--surface);border-radius:16px 16px 0 0;padding:14px;box-shadow:0 -3px 14px rgba(0,0,0,.25)}.tsheet[hidden]{display:none}.tsheet .x{position:absolute;right:10px;top:6px;border:0;background:none;font-size:26px;color:var(--ink)}.tsheet .sh-h{display:flex;gap:12px;align-items:center;margin-right:30px}.tsheet .sh-h span{display:grid}.tsheet .sh-b{display:flex;gap:8px;margin-top:12px}.tsheet .sh-b .btn{flex:1;justify-content:center;min-height:44px}
.tree-wrap:has(.tsheet:not([hidden])) .mini{display:none}
@media (max-width:640px){
 .tph{display:none}
 .tree-wrap{margin:0 -4px}
 .tbar{display:flex;position:absolute;top:0;left:0;right:0;z-index:7;align-items:center;gap:8px;padding:7px 10px;background:var(--surface);border-bottom:1px solid var(--line);border-radius:12px 12px 0 0}.tbar b{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:15px}
 .tbar .ib{width:40px;height:40px;border-radius:50%;border:1px solid var(--line);background:var(--surface);color:var(--ink);display:grid;place-items:center;font-size:20px;text-decoration:none}
 .tmenu{position:absolute;right:10px;top:52px;z-index:9;background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:8px;box-shadow:0 6px 20px rgba(0,0,0,.25);gap:6px;flex-direction:column}.tmenu:not([hidden]){display:flex}
 .tree-bar{position:absolute;top:54px;right:8px;z-index:6;flex-direction:column;padding:0;gap:8px}.tree-bar .btn{min-width:44px;height:44px;padding:0;justify-content:center;box-shadow:0 1px 4px rgba(0,0,0,.25)}.tree-bar .lb{display:none}
 .tree{height:calc(100dvh - 190px)}
}
@media print{.tbar,.tchips,.mini,.tsheet,.tmenu{display:none!important}.tree li.gh{display:none}}

/* family view 2.54: hero card and information table */
.fam-hero{display:flex;gap:16px;align-items:flex-start;padding:18px;border-radius:16px;color:#fff;background:var(--brand);box-shadow:0 4px 14px rgba(0,0,0,.18);margin-bottom:16px}
.fam-hero small{display:block;text-transform:uppercase;letter-spacing:.06em;font-size:11px;opacity:.8;margin-bottom:2px}.fam-hero h2{margin:0 0 10px;font-size:24px;color:#fff}.fam-hero a{color:#fff}.fam-hero b{font-size:16px}
.fh-photo .avatar{width:84px;height:84px;border:3px solid rgba(255,255,255,.6);border-radius:14px}.fh-main{flex:1;min-width:0}.fh-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px}
.fh-pill{display:inline-block;background:rgba(255,255,255,.22);border-radius:14px;padding:2px 12px}.fh-addr{margin-top:10px}
.fh-btns{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}.fh-btns .btn{background:rgba(255,255,255,.18);color:#fff;border:1px solid rgba(255,255,255,.5)}.fh-btns .fh-tree{background:var(--surface);color:var(--brand);border-color:var(--surface);font-weight:600}
.fam-info .fi-h{display:flex;justify-content:space-between;align-items:center;padding:12px 14px;background:var(--surface);border-bottom:1px solid var(--line)}.fam-info h3{margin:0}.fh-count{background:var(--brand);color:#fff;border-radius:50%;min-width:32px;height:32px;display:grid;place-items:center;font-weight:700}
.fam-info table{width:100%;border-collapse:collapse}.fam-info th{background:var(--brand);color:#fff;text-align:left;padding:10px;font-size:13px;white-space:nowrap}.fam-info td{padding:10px;border-bottom:1px solid var(--line);vertical-align:middle}.rel-pill{display:inline-block;background:color-mix(in srgb,var(--brand) 14%,var(--surface));color:var(--brand);border-radius:14px;padding:2px 10px;font-weight:600;font-size:13px}
@media (max-width:640px){.fam-hero{flex-direction:column;padding:14px}.fh-photo .avatar{width:72px;height:72px}.fam-hero h2{font-size:20px}.fh-btns .btn{flex:1 1 45%;justify-content:center}.fam-info td:first-child{justify-content:flex-start}}
.bs-name b{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
@media (max-width:640px){.fam-info .tbl-stack td.e{display:none}}
.tree-wrap:not(:has(.tbar)) .tchips,.tree-wrap:not(:has(.tbar)) .tree-bar{top:10px}.tree-wrap:not(:has(.tbar)) .tchips{right:64px}
.bday-head a{padding:10px 6px;margin:-10px -6px}

/* notifications 2.55 */
.note-sec h4{margin:0;padding:12px 14px 6px;font-size:16px}.note-sec[hidden]{display:none}
.note-row{position:relative;display:flex;align-items:center;border-bottom:1px solid var(--line)}.note-row.un{background:color-mix(in srgb,var(--brand) 9%,var(--surface))}.note-row .note{flex:1;min-width:0}
.note-av{position:relative;display:inline-flex;flex:none}.note-bd{position:absolute;right:-4px;bottom:-4px;width:22px;height:22px;border-radius:50%;background:var(--brand);color:#fff;display:grid;place-items:center;font-size:12px;border:2px solid var(--surface);text-decoration:none}.note-bd svg{width:12px;height:12px}
.note-more{border:0;background:none;color:var(--muted);font-size:22px;width:44px;height:44px;cursor:pointer}
.note-menu{position:absolute;right:10px;top:46px;z-index:5;background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:6px;box-shadow:var(--shadow)}

.soc-pills{display:flex;gap:8px;padding:12px 14px 6px}.soc-pill{flex:1;display:flex;align-items:center;justify-content:center;gap:6px;min-height:44px;border-radius:24px;border:1px solid var(--line);background:var(--surface-2);color:var(--ink);font-weight:600;cursor:pointer}.soc-pill.on{background:var(--brand);border-color:var(--brand);color:#fff}.soc-pill svg{width:18px;height:18px}
.soc-sort{padding:4px 14px 8px;font-weight:600}.soc-sort select{border:0;background:none;color:var(--brand);font-weight:600;font-size:15px}

.fb-rowwrap{display:flex;align-items:center}.fb-rowwrap .fb-row{flex:1;min-width:0}
.sheet-wrap{position:fixed;inset:0;z-index:300}.sheet-shade{position:absolute;inset:0;background:rgba(0,0,0,.4)}.sheet-box{position:absolute;left:0;right:0;bottom:0;background:var(--surface);color:var(--ink);border-radius:18px 18px 0 0;padding:10px 16px 22px;box-shadow:0 -4px 20px rgba(0,0,0,.25)}.sheet-grip{display:block;width:44px;height:5px;border-radius:3px;background:var(--line);margin:0 auto 10px}
.sheet-act{display:flex;align-items:center;gap:12px;width:100%;padding:12px 0;border:0;border-top:1px solid var(--line);background:none;color:var(--ink);text-align:left;font:inherit;text-decoration:none;cursor:pointer}.sheet-act span{display:grid}

/* loading skeleton and pull to refresh */
.skel .sk{display:block;height:14px;margin:8px 0;border-radius:8px;background:linear-gradient(90deg,var(--surface-2),var(--line),var(--surface-2));background-size:200% 100%;animation:skel 1.3s linear infinite}.skel .w40{width:40%}.skel .w60{width:60%}.skel .w70{width:70%}.skel .w90{width:90%}.skel .h34{height:34px}.skel .h120{height:120px}.skel .round{width:48px;height:48px;border-radius:50%;flex:none;margin:0}.sk-row{display:flex;gap:12px;align-items:center}.sk-row span{flex:1}
@keyframes skel{to{background-position:-200% 0}}@media (prefers-reduced-motion:reduce){.skel .sk{animation:none}}
.ptr{position:fixed;top:0;left:50%;transform:translate(-50%,-60px);z-index:250;background:var(--surface);border:1px solid var(--line);border-radius:20px;padding:8px 16px;box-shadow:var(--shadow);font-size:14px;color:var(--brand);font-weight:600;transition:transform .15s}.ptr.on{transform:translate(-50%,70px)}
/* home: today strip and people you may know */
.today-strip{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 12px}.today-strip a{display:inline-flex;align-items:center;gap:6px;min-height:40px;padding:6px 14px;border-radius:22px;border:1px solid var(--line);background:var(--surface);color:var(--ink);text-decoration:none;font-weight:600}.today-strip a.hot{border-color:var(--brand);color:var(--brand)}
.know-row{display:flex;gap:10px;overflow-x:auto;padding:2px 2px 10px;scrollbar-width:none}.know-card{flex:none;width:150px;text-align:center;padding:12px 8px}.know-card .avatar{margin:0 auto 6px;width:56px;height:56px}.know-card b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.know-card small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.know-card .btn{margin-top:8px;width:100%;justify-content:center}
.today-strip a{min-height:36px;padding:4px 12px;font-size:14px}.soc-sort label{display:flex;align-items:center;gap:6px}
.composer .avatar{flex:none}
.today-strip{padding:8px 12px 0}.know-wrap{padding:0 12px}

/* feed card 2.56: more menu next to the name, three wide buttons, Facebook-like comments */
.feed-head .pmenu{margin-left:auto}.feed-head .pmenu>summary{min-width:40px;min-height:40px;border:0;background:none}.feed-head .pmenu-list{top:calc(100% + 4px);bottom:auto}.feed-item{position:relative}
.feed-bar.soc-pills{padding:10px 0 4px}
.cm-wrap{padding-bottom:10px}.cm-list{padding:4px 12px}.cm{display:flex;gap:8px;margin:10px 0}.cm-av .avatar{width:36px;height:36px}.cm-main{flex:1;min-width:0}
.cm-bub{display:inline-block;max-width:100%;background:var(--surface-2);border:1px solid var(--line);border-radius:18px;padding:8px 12px}.cm-bub b{display:block;font-size:14px}.cm-tx{white-space:pre-wrap;word-break:break-word}
.cm-meta{display:flex;gap:16px;align-items:center;padding:3px 12px;font-size:13px;color:var(--muted)}.cm-meta button{border:0;background:none;padding:6px 0;font:inherit;font-weight:700;color:var(--muted);cursor:pointer;min-height:30px}
.cm-more{display:block;border:0;background:none;padding:8px 14px;font-weight:700;color:var(--muted);cursor:pointer}
.cm-form{display:flex;gap:8px;align-items:center;padding:6px 12px 2px}.cm-form input{flex:1;min-width:0;border:1px solid var(--line);border-radius:22px;padding:11px 14px;background:var(--surface-2);color:var(--ink);font:inherit}.cm-send{width:42px;height:42px;border-radius:50%;border:0;background:var(--brand);color:#fff;font-size:18px;cursor:pointer;flex:none}
.cm-replying{display:flex;justify-content:space-between;align-items:center;margin:0 12px;padding:6px 12px;border-radius:12px;background:color-mix(in srgb,var(--brand) 10%,var(--surface));font-size:13px;color:var(--brand)}.cm-replying button{border:0;background:none;font-size:20px;color:var(--brand);cursor:pointer}
@media print{.cm-form,.soc-pills{display:none}}
.soc-sort label{white-space:nowrap;flex-wrap:nowrap}.soc-sort select{max-width:55%}

/* 2.57 phone header: logo + round buttons, icon tab-row under it; no bottom bar */
.toptabs,.fab-add{display:none}
@media(max-width:860px){
.top{flex-wrap:wrap;gap:8px;padding:8px 12px 0}
.top .top-brand b{font-size:22px;font-weight:800;color:var(--brand)}
.top .grow{display:block;flex:1}
.top>a.btn.icon{width:42px;height:42px;border-radius:50%;background:var(--surface-2)}
.top .bellb,.top .burger2,.top .menu{display:none}
.toptabs{display:flex;order:9;flex:0 0 100%;margin:4px -12px 0;border-top:1px solid var(--line)}
.toptabs a{flex:1;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;min-height:52px;color:var(--muted);font-size:11px;font-weight:600;text-decoration:none;border-bottom:3px solid transparent}
.toptabs a.on{color:var(--brand);border-bottom-color:var(--brand)}
.toptabs .bn-badge{top:3px;box-shadow:none}
.fab-add{display:flex;position:fixed;right:16px;bottom:calc(18px + env(safe-area-inset-bottom));width:54px;height:54px;border-radius:50%;background:var(--brand);color:#fff;align-items:center;justify-content:center;box-shadow:0 4px 14px rgba(0,0,0,.3);z-index:30}
.fab-add svg{width:26px;height:26px}
.content{padding-bottom:84px}
body:has(#homeFeed) #homeFeed .composer{border:1px solid var(--line);border-radius:999px;margin:10px 12px 8px;width:calc(100% - 24px);padding:8px 14px}
body:has(#homeFeed) #homeFeed .composer>span:not(.avatar){flex:1;text-align:left}
}
/* 2.57.1 compact phone header */
@media(max-width:860px){
.top{padding:4px 12px 0;gap:6px}.top .top-brand img{width:26px;height:26px}.top .top-brand b{font-size:19px}
.top>a.btn.icon{width:34px;height:34px;min-height:34px}.top>a.btn.icon svg{width:18px;height:18px}
.toptabs{margin-top:3px}.toptabs a{min-height:40px;gap:0;font-size:10px;border-bottom-width:2px}.toptabs a svg{width:20px;height:20px}.toptabs .bn-badge{top:0;min-width:16px;height:16px;font-size:10px;line-height:16px}
.fab-add{width:50px;height:50px}
}
/* 2.57.2 phone header: full-width tab row, smaller icons and text */
@media(max-width:860px){
.toptabs{flex:0 0 calc(100% + 24px);width:calc(100% + 24px);margin-left:-12px;margin-right:-12px;box-sizing:border-box}
.toptabs a{min-height:36px;font-size:9.5px;letter-spacing:0}.toptabs a svg{width:18px;height:18px}.toptabs .bn-badge{left:calc(50% + 4px);min-width:15px;height:15px;font-size:9px;line-height:15px;padding:0 4px}
.top .top-brand img{width:24px;height:24px}.top .top-brand b{font-size:17px}
.top>a.btn.icon{width:32px;height:32px;min-height:32px}.top>a.btn.icon svg{width:16px;height:16px}
}
/* 2.57.2 right-most icon sits at the screen edge */
@media(max-width:860px){.top{padding-right:4px}.toptabs{margin-right:-4px;flex-basis:calc(100% + 16px);width:calc(100% + 16px)}}
/* 2.57.2 clearer icons and text (darker, bolder), still compact */
@media(max-width:860px){
.toptabs a{min-height:44px;font-size:11px;font-weight:700;color:var(--ink)}.toptabs a svg{width:22px;height:22px;stroke-width:2.2}
.toptabs a.on{color:var(--brand)}.toptabs .bn-badge{left:calc(50% + 6px);min-width:17px;height:17px;font-size:10px;line-height:17px}
.top .top-brand b{font-size:19px}.top>a.btn.icon{width:36px;height:36px;min-height:36px;color:var(--ink)}.top>a.btn.icon svg{width:19px;height:19px}
}
/* 2.58.1 one round + button only: a page's own + (add to family) replaces the global Add family + */
@media(max-width:860px){body:has(.fab) .fab-add{display:none}.fab{bottom:calc(18px + env(safe-area-inset-bottom))}}
@media(max-width:860px){.totop,body:has(.fab) .totop{bottom:calc(18px + env(safe-area-inset-bottom))}}
