@charset "UTF-8";
/* Lock the page; keep scrolling scoped to sheets and the circle strip.
   The map and crop surfaces retain their own touch-action:none gestures. */
@media (any-pointer: coarse) {
  html, body, .app-shell { touch-action: none; }
  .modal, .person-panel { touch-action: pan-y; }
  .mobile-circles { touch-action: pan-x; }
}
.modal, .person-panel, .mobile-circles { overscroll-behavior: contain; }
/* Paint beyond iOS standalone safe areas; only the wallpaper grows, not the controls. */
:root{font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","PingFang SC","Microsoft YaHei",sans-serif;color:#f5f6ef;background-color:var(--browser-background,#2d2d2d);font-synthesis:none;--ink:#f5f6ef;--muted:#cfdbd2;--line:rgba(239,249,233,.19);--surface:rgba(40,61,49,.48);--lime:#dfe9be;--dark:#233629;--radius:26px;--shadow:0 14px 55px #081b1825}*{box-sizing:border-box}html{--photo-aspect:calc(1179 / 1929);--photo-scale:1;--photo-x:.5;--photo-y:.5;--photo-width:calc(max(100vw, var(--wallpaper-height) * var(--photo-aspect)) * var(--photo-scale));--photo-height:calc(max(var(--wallpaper-height), 100vw / var(--photo-aspect)) * var(--photo-scale));--photo-position-x:calc((100vw - var(--photo-width)) * var(--photo-x));--photo-position-y:calc((var(--wallpaper-height) - var(--photo-height)) * var(--photo-y));--safe-top:env(safe-area-inset-top,0px);--safe-bottom:env(safe-area-inset-bottom,0px);--wallpaper-height:calc(100lvh + var(--safe-top) + var(--safe-bottom));width:100%;height:100%;min-height:0;overflow:hidden;overscroll-behavior:none;background-image:url('./assets/lakeside.jpg');background-size:cover;background-position:center;background-repeat:no-repeat}body{position:fixed;inset:0;width:100%;height:100dvh;margin:0;overflow:hidden;min-height:0;overscroll-behavior:none;isolation:isolate}button,input,select,textarea{font:inherit}button,a,input,textarea,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button{color:inherit;border:0}button:disabled{cursor:wait;opacity:.55}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,[tabindex]:focus-visible{outline:2px solid #edf7c9;outline-offset:4px}button:hover{filter:brightness(1.1)}button:active{transform:translateY(1px)}a{color:inherit}svg{display:block;width:20px;height:20px;flex-shrink:0;stroke:currentColor;fill:none;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}h1,h2,h3,p{margin:0}h1{font-size:28px;letter-spacing:2px;font-weight:500}h2{font-size:24px;font-weight:500}h3{font-size:16px;font-weight:600}small{font-size:12px}button[hidden],[hidden]{display:none!important}.landscape{position:absolute;inset:0;background-image:url('./assets/lakeside.jpg');background-size:cover;background-position:50% 50%;z-index:0;pointer-events:none;transform:none;filter:none}.landscape-shade{position:absolute;inset:0;background:transparent;z-index:1;opacity:0;pointer-events:none}.landscape-shade:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,#122e3926,transparent 45%,#16303114),linear-gradient(0deg,#0b272e55,transparent 25%,#06273418)}.glass{background:var(--surface);border:1px solid var(--line);box-shadow:var(--shadow),inset 0 1px #ffffff12;backdrop-filter:blur(28px) saturate(1.15);-webkit-backdrop-filter:blur(28px) saturate(1.15)}.app-shell{position:relative;z-index:2;height:100dvh;min-height:0;display:flex;padding:22px;gap:30px}.sidebar{width:224px;flex-shrink:0;border-radius:28px;padding:27px 17px 15px;display:flex;flex-direction:column}.brand{display:flex;align-items:center;gap:12px;text-decoration:none;font-size:21px;letter-spacing:2px;margin:0 10px 31px}.brand small{display:block;font-size:12px;letter-spacing:3px;opacity:.63;margin-top:6px}.brand-mark{color:#eef3d2}.brand-mark svg{width:36px;height:36px;stroke-width:1}.workspace-switch{background:#142f2e38;padding:4px;border:1px solid #d1e6cd13;border-radius:13px;display:flex;margin-bottom:32px}.workspace-switch button{background:transparent;color:#d7e2d0;flex:1;border-radius:9px;font-size:13px;padding:9px 2px}.workspace-switch button.active{background:#e8f0d926;color:#fff;box-shadow:0 2px 9px #10281c18}.sidebar-label{display:flex;align-items:center;justify-content:space-between;margin:0 12px 9px;color:var(--muted);font-size:12px;letter-spacing:2px}.circle-button{width:100%;display:flex;align-items:center;gap:12px;padding:14px 13px;border-radius:14px;background:transparent;font-size:14px;margin:3px 0;text-align:left;color:#eef2e9}.circle-button.active{background:#e9f1df21;border:1px solid #fff2;padding:13px 12px}.circle-button .count{margin-left:auto;opacity:.5;font-size:12px}.circle-dot{width:7px;height:7px;border-radius:50%;background:var(--circle-color,#e1e8cf);box-shadow:0 0 0 4px color-mix(in srgb,var(--circle-color,#e1e8cf) 12%,transparent);margin:0 5px}.sidebar-spacer{flex:1;min-height:20px}.sidebar-memory{padding:18px 13px 30px;color:#e2e9d9}.mini-label{font-size:11px;letter-spacing:2px;opacity:.6}.sidebar-memory p{font-size:17px;font-weight:300;line-height:1.9;letter-spacing:2px;margin-top:13px}.side-action{display:flex;gap:12px;align-items:center;width:100%;text-align:left;background:none;font-size:13px;padding:14px 13px;border-top:1px solid #f0ffef12;color:#e2eadc}.side-action small{display:block;margin-top:5px;opacity:.5;font-size:11px}.side-action svg{width:18px;height:18px;opacity:.75}#main{position:relative;flex:1;min-width:0}.topbar{height:87px;display:flex;justify-content:space-between;align-items:center;gap:15px}.eyebrow{display:block;font-size:11px;letter-spacing:3px;color:#e5ecdcbb;margin:0 0 11px}.page-title{padding-left:3px}#people-count{font-size:12px;letter-spacing:0;vertical-align:middle;margin-left:10px;opacity:.55;font-weight:400}.top-actions{display:flex;align-items:center;gap:13px}.search-wrap{display:flex;align-items:center;gap:10px;border-radius:15px;padding:12px 14px;width:260px;background:#33493944}.search-wrap svg{width:17px;height:17px;opacity:.7}.search-wrap input{width:100%;min-width:0;background:transparent;border:0;color:#fff;font-size:13px;outline:none}.search-wrap input::placeholder{color:#e2e8d4a8}.search-wrap kbd{font-family:inherit;font-size:11px;white-space:nowrap;opacity:.4}.button{display:inline-flex;align-items:center;justify-content:center;gap:9px;padding:13px 17px;border-radius:15px;font-size:14px;white-space:nowrap;transition:background .2s}.button svg{width:18px;height:18px}.primary{background:var(--lime);color:var(--dark);box-shadow:0 6px 24px #15271c19}.secondary{background:#e6edda16;border:1px solid #e6edda25}.danger{background:#dd817728;color:#ffd9d5;border:1px solid #edbcb32b}.text-button{background:transparent;font-size:13px;color:#e1eac9;padding:6px}.icon-button{display:inline-flex;justify-content:center;align-items:center;width:38px;height:38px;border-radius:12px;background:transparent;flex-shrink:0}.icon-button:hover{background:#eaf4df16}.icon-button.small{width:25px;height:25px}.icon-button.small svg{width:15px;height:15px}.map-stage{position:absolute;inset:94px 0 87px;touch-action:none;overflow:hidden;border-radius:26px;cursor:grab;outline:none}.map-stage:active{cursor:grabbing}.map-stage.with-panel{right:337px}#connections,#nodes{position:absolute;inset:0;width:100%;height:100%;overflow:visible}#connections{pointer-events:none;stroke:none}.edge{stroke:#edf5e1;stroke-width:1;opacity:.27;transition:opacity .25s}.edge.related{stroke:#f1f5d9;stroke-width:1.4;opacity:.72}.edge.dimmed{opacity:.08}.edge-text{fill:#edf3e3;stroke:none;font:12px -apple-system,"PingFang SC",sans-serif;opacity:.7;text-anchor:middle;paint-order:stroke;stroke:#223d37;stroke-width:4;stroke-linejoin:round}.node{position:absolute;width:var(--size);height:var(--size);margin:calc(var(--size) / -2) 0 0 calc(var(--size) / -2);padding:0;background:none;border-radius:50%;outline:none;touch-action:none;cursor:grab;transition:opacity .2s;isolation:isolate;user-select:none;-webkit-user-select:none}.node:active{transform:none;cursor:grabbing}.node-face{width:100%;height:100%;border-radius:50%;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#bac7a9,#536e61);background-size:cover;background-position:center;border:2px solid #eff2dfb3;box-shadow:0 5px 20px #06292355,0 0 0 6px #e4f0db08;overflow:hidden;transition:transform .28s cubic-bezier(.2,.8,.2,1),box-shadow .28s;font-size:calc(var(--size) * .32);color:white;font-weight:300}.node.selected{z-index:4}.node.selected .node-face{transform:scale(1.09);box-shadow:0 8px 30px #0e281c66,0 0 0 7px #ebf3db26,0 0 0 8px #f6ffe454;border-color:#eff5d7}.node:hover .node-face{transform:scale(1.06)}.node.selected:hover .node-face{transform:scale(1.09)}.node-name{position:absolute;left:50%;top:calc(100% + 10px);transform:translateX(-50%);font-size:13px;font-weight:400;white-space:nowrap;letter-spacing:1px;text-shadow:0 2px 7px #062824,0 0 12px #0b291d;background:#17392c36;padding:3px 8px;border-radius:8px;pointer-events:none}.node.selected .node-name{background:#edf3d9;color:#23392d;text-shadow:none}.node.dimmed{opacity:.34}.node .self-tag{position:absolute;bottom:0;right:-4px;border:2px solid #d7e3c4;border-radius:50%;width:20px;height:20px;background:#435e4a;display:grid;place-items:center;font-size:10px}.person-panel{position:absolute;right:0;top:108px;width:310px;max-height:calc(100% - 205px);border-radius:27px;overflow:auto;scrollbar-width:thin;scrollbar-color:#d4dec155 transparent;animation:panel-in .3s ease;background:rgba(45,62,48,.62)}@keyframes panel-in{from{opacity:0;transform:translateX(12px)}to{opacity:1;transform:translateX(0)}}.panel-top{display:flex;align-items:center;justify-content:space-between;padding:16px 17px 0}.panel-top .eyebrow{margin:0;font-size:10px;letter-spacing:2px}.panel-profile{text-align:center;padding:4px 22px 22px}.profile-photo{width:79px;height:79px;border-radius:50%;margin:0 auto 14px;background:#728a73;display:grid;place-items:center;font-size:26px;overflow:hidden;border:3px solid #e4edcf77;background-size:cover;background-position:center}.panel-profile h2{font-size:23px;letter-spacing:3px}.panel-profile p{font-size:13px;color:#d2ddc7;line-height:1.7;margin-top:8px}.tags{display:flex;gap:6px;flex-wrap:wrap;align-items:center;justify-content:center;margin-top:13px}.tag{font-size:11px;padding:5px 9px;border-radius:7px;background:#dee5cb18;color:#e5edce;letter-spacing:.5px}.panel-section{padding:20px 23px;border-top:1px solid #edf5e316}.panel-section-title{display:flex;align-items:center;gap:8px;color:#f0f3e5;font-size:13px;margin-bottom:12px}.panel-section-title svg{width:15px;height:15px;opacity:.75}.panel-section p{color:#e0e7d9;font-size:13px;line-height:1.9;white-space:pre-wrap;overflow-wrap:anywhere}.panel-meta{font-size:11px;color:#cbd7c099;display:block;margin-top:8px}.panel-actions{display:flex;gap:8px;padding:0 22px 20px}.panel-actions .button{font-size:12px;padding:10px 13px;flex:1}.panel-actions .button svg{width:15px;height:15px}.relation-row{display:flex;align-items:center;gap:9px;margin-top:11px;font-size:13px}.relation-row button{background:transparent;padding:4px 0;text-align:left}.relation-row small{margin-left:auto;max-width:110px;overflow-wrap:anywhere;opacity:.55}.tiny-avatar{width:28px;height:28px;flex-shrink:0;background:#72806b;border-radius:50%;background-size:cover;display:grid;place-items:center;font-size:12px;overflow:hidden}.memory-row{padding:10px 0}.memory-row+.memory-row{border-top:1px solid #eff8e411}.memory-row p{font-size:13px}.memory-row small{font-size:11px;opacity:.5;display:block;margin-top:7px}.bottom-bar{position:absolute;bottom:38px;left:0;right:0;display:flex;align-items:center;gap:12px}.map-hint{display:flex;gap:7px;align-items:center;font-size:11px;letter-spacing:.5px;color:#e8edd4b3;margin-right:auto}.map-hint svg{width:15px;height:15px}.map-tools{display:flex;align-items:center;border-radius:15px;padding:3px 5px;font-size:11px}.map-tools #zoom-label{width:38px;text-align:center;opacity:.75}.divider{height:20px;width:1px;background:#ebf4dc26;margin:0 5px}.background-button{padding:13px 17px;background:#43503a60;font-size:13px}.photo-credit{position:absolute;right:2px;bottom:5px;font-size:9px;letter-spacing:.3px;color:#e1e8d586}.photo-credit a{text-decoration:none}.photo-credit a:hover{text-decoration:underline}.mobile-circles{display:none}.empty-state{position:absolute;left:50%;top:45%;transform:translate(-50%,-50%);width:min(370px,90%);padding:35px;text-align:center;border-radius:26px}.empty-state h2{font-size:23px;margin-bottom:14px}.empty-state p{font-size:14px;color:var(--muted);line-height:1.8;margin-bottom:22px}.modal{color:var(--ink);background:rgba(38,58,48,.95);border:1px solid #e7f3d838;border-radius:27px;padding:0;width:min(550px,calc(100vw - 32px));max-height:calc(100dvh - 48px);box-shadow:0 25px 100px #061c2855;backdrop-filter:blur(36px);scrollbar-color:#d5e3c444 transparent;overflow:auto}.modal::backdrop{background:#08252975;backdrop-filter:blur(6px)}.modal-head{display:flex;align-items:center;justify-content:space-between;padding:23px 26px 16px;position:sticky;top:0;background:#2a4035f2;z-index:3}.modal-head h2{font-size:21px;letter-spacing:1px}.modal-body{padding:0 26px 26px}.modal-description{font-size:13px;line-height:1.8;color:#cedcc8;margin-bottom:22px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.field{display:flex;flex-direction:column;gap:8px;margin-bottom:17px;font-size:13px}.field input,.field textarea,.field select,.plain-input{width:100%;background:#132e2544;border:1px solid #ddebd32b;border-radius:11px;color:#fafcf3;padding:12px;font-size:14px;min-width:0;line-height:1.5}.field textarea{resize:vertical;min-height:82px}.field input::placeholder,.field textarea::placeholder{color:#c7d3bd66}.field select option{background:#304b3b}.field input[type=color]{height:42px;padding:5px}.field input[type=range]{padding:0;accent-color:#dfe9be}.field input[type=checkbox]{width:auto;accent-color:#dfe9be}.field-help{font-size:12px;color:#c6d4bc;line-height:1.7}.form-footer{display:flex;justify-content:flex-end;gap:10px;margin-top:22px}.form-footer .danger{margin-right:auto}.upload-person{display:flex;gap:17px;align-items:center;margin-bottom:24px}.upload-person .profile-photo{margin:0;flex-shrink:0}.upload-person .field-help{margin-top:9px}.check-group{display:flex;flex-wrap:wrap;gap:10px}.check-pill{display:flex;align-items:center;gap:7px;padding:9px 12px;background:#e3efce12;border:1px solid #e3efce24;border-radius:10px;font-size:13px;cursor:pointer}.check-pill input{accent-color:#dfe9be}.background-preview{height:205px;border-radius:18px;overflow:hidden;border:1px solid #e3edcf33;position:relative;touch-action:none;cursor:move;margin:16px 0}.background-preview-image{position:absolute;inset:-8px;background-size:cover;background-position:center}.background-preview-shade{position:absolute;inset:0;pointer-events:none;display:grid;place-items:center}.background-preview-shade span{border:1px solid #ffffff4d;background:#ffffff15;backdrop-filter:blur(10px);border-radius:16px;padding:16px 22px;font-size:15px;color:white;text-shadow:0 1px 6px #0007}.range-title{display:flex;justify-content:space-between;gap:10px}.range-title output{opacity:.6}.preset-option{display:flex;align-items:center;gap:13px;background:#e4edcb13;padding:12px;border:1px solid #d6e4be25;border-radius:14px;margin-bottom:14px;width:100%;text-align:left;font-size:14px}.preset-option img{width:70px;height:44px;object-fit:cover;border-radius:8px}.preset-option small{display:block;color:#c9d7c4;margin-top:6px}.data-card{border:1px solid #dfecc327;border-radius:17px;padding:19px;margin-top:15px}.data-card p{font-size:13px;line-height:1.8;color:#cbdac1;margin:9px 0 16px}.data-card .button{font-size:13px}.note{border-radius:13px;background:#c7dcb918;padding:13px 15px;font-size:12px;line-height:1.8;color:#d3dfc9;margin:15px 0}.circle-edit-row{display:grid;grid-template-columns:32px 1fr 32px;gap:8px;align-items:center;margin-bottom:12px}.circle-edit-row input[type=color]{border:0;background:transparent;width:30px;height:34px;padding:0}#toast{position:fixed;bottom:36px;left:50%;transform:translate(-50%,15px);opacity:0;pointer-events:none;border:1px solid #e7f0d742;border-radius:15px;padding:13px 23px;background:#233e30f5;box-shadow:0 8px 36px #0b201b55;font-size:14px;z-index:100;transition:.25s;max-width:90vw;text-align:center}#toast.show{opacity:1;transform:translate(-50%,0)}.save-error{position:fixed;top:8px;left:50%;transform:translateX(-50%);max-width:90vw;z-index:100;background:#642f26;color:#fff1e2;padding:13px 18px;border-radius:12px;font-size:13px}.list-empty{color:#cdd8c6;font-size:13px;padding:10px 0;line-height:1.7}.full-width{width:100%}.danger-text{color:#ffd1c6}.modal a{color:#e8eecd}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
@media(min-width:1550px){.app-shell{padding:30px;gap:38px}.sidebar{width:244px}.topbar{height:98px}.map-stage{top:113px}.person-panel{top:123px;width:326px}.map-stage.with-panel{right:350px}}
@media(max-width:1150px){.sidebar{width:190px;padding:24px 12px 13px}.app-shell{gap:20px;padding:18px}.brand{font-size:19px;margin-left:8px}.brand-mark svg{width:30px}.search-wrap{width:208px}.map-stage.with-panel{right:290px}.person-panel{width:275px}.panel-section{padding:18px}.map-hint{max-width:165px;line-height:1.5}.sidebar-memory p{font-size:15px}}
@media(max-width:900px){.sidebar{width:160px;padding:21px 8px 12px}.brand{font-size:17px;gap:8px;margin-bottom:25px}.brand small{font-size:10px;letter-spacing:2px}.brand-mark svg{width:26px}.workspace-switch button{font-size:12px}.circle-button{font-size:13px;gap:8px}.sidebar-memory{padding-left:10px}.sidebar-memory p{font-size:14px;letter-spacing:1px}.side-action{font-size:12px;padding:12px 8px;gap:8px}.side-action small{font-size:10px}.topbar{align-items:flex-start;padding-top:12px}.search-wrap{width:175px}.search-wrap kbd{display:none}.top-actions{gap:8px}.top-actions .button{padding:12px}.page-title h1{font-size:23px}.eyebrow{font-size:10px}.map-stage.with-panel{right:0}.person-panel{z-index:6;background:#293e31e8;top:101px;width:280px;max-height:calc(100% - 195px)}.map-hint{display:none}.bottom-bar{justify-content:space-between}}
@media(max-width:650px){body{overflow:hidden}.app-shell{padding:0;min-height:0;height:100dvh;display:block}.sidebar{position:absolute;top:0;left:0;right:0;width:auto;height:64px;padding:12px 18px;flex-direction:row;align-items:center;border:0;border-radius:0;box-shadow:none;background:transparent;backdrop-filter:none;z-index:3}.brand{margin:0;font-size:18px;gap:9px;letter-spacing:1px}.brand-mark svg{width:28px;height:28px}.brand small{display:none}.workspace-switch{margin:0 0 0 auto;width:155px;padding:3px;background:#233e3659;backdrop-filter:blur(20px);border-color:#edfad422}.workspace-switch button{padding:8px 0;font-size:12px}.sidebar-label,.sidebar nav,.sidebar-spacer,.sidebar-memory,.side-action{display:none}#main{height:100%;padding:0 18px}.topbar{position:absolute;top:67px;left:18px;right:18px;height:97px;display:block;padding:0}.page-title{display:flex;align-items:center;justify-content:space-between;padding:0;margin-bottom:16px}.page-title h1{font-size:23px;letter-spacing:1px;order:-1}.eyebrow{font-size:10px;margin:0;letter-spacing:2px}#people-count{font-size:11px;margin-left:6px}.top-actions{gap:10px}.search-wrap{flex:1;width:auto;padding:12px;border-radius:13px}.top-actions .button{padding:12px 13px;font-size:12px;border-radius:13px}.top-actions .button svg{width:15px;height:15px}.mobile-circles{display:flex;position:absolute;left:18px;right:0;top:170px;gap:7px;overflow-x:auto;padding:0 18px 10px 0;scrollbar-width:none;z-index:2}.mobile-chip{flex-shrink:0;background:#293e3155;border:1px solid #e5f0d32e;border-radius:20px;padding:9px 14px;font-size:12px;backdrop-filter:blur(18px);color:#e3ebd5}.mobile-chip.active{background:#e8edcd;color:#2c4433;border-color:transparent}.map-stage,.map-stage.with-panel{top:216px;bottom:112px;left:6px;right:6px;border-radius:0}.node-name{font-size:12px;top:calc(100% + 8px)}.bottom-bar{left:18px;right:18px;bottom:calc(40px + var(--safe-bottom));gap:8px}.map-tools{padding:2px;border-radius:13px}.map-tools .icon-button{width:32px;height:36px}.map-tools #zoom-label{font-size:10px;width:31px}.background-button{font-size:12px;padding:12px;gap:7px;border-radius:13px}.background-button svg{width:16px;height:16px}.photo-credit{right:18px;left:18px;text-align:center;bottom:calc(16px + var(--safe-bottom));font-size:8px}.person-panel{position:fixed;top:auto;bottom:0;left:0;right:0;width:100%;max-height:63dvh;border-radius:28px 28px 0 0;background:#273f34f2;backdrop-filter:blur(34px);z-index:10;padding-bottom:var(--safe-bottom);animation:sheet-in .25s ease}.panel-top{position:sticky;top:0;background:#2b4136f8;padding:11px 20px 0;z-index:2}.panel-profile{display:grid;grid-template-columns:64px 1fr;text-align:left;column-gap:16px;padding:2px 24px 20px}.panel-profile .profile-photo{width:64px;height:64px;grid-row:1/4;margin:0}.panel-profile h2{font-size:22px;letter-spacing:2px;align-self:end}.panel-profile p{font-size:12px;margin-top:5px}.panel-profile .tags{justify-content:flex-start;margin-top:8px}.panel-section{padding:18px 24px}.panel-actions{padding:0 24px 18px}.panel-actions .button{font-size:13px}.modal{max-height:calc(100dvh - 24px);border-radius:24px}.modal-head{padding:18px 20px 14px}.modal-body{padding:0 20px 22px}.modal-head h2{font-size:20px}.form-grid{gap:12px}.field input,.field textarea,.field select{font-size:16px;padding:10px}.background-preview{height:190px}.form-footer .button{font-size:13px;padding:12px}.mobile-data{padding:8px 11px!important}.mobile-data svg{width:15px;height:15px}#toast{bottom:88px;width:max-content;max-width:90vw;font-size:13px}@keyframes sheet-in{from{transform:translateY(35px);opacity:0}to{transform:translateY(0);opacity:1}}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@media(min-width:651px) and (max-height:850px){.sidebar-memory{display:none}.sidebar-spacer{min-height:10px}.sidebar{min-height:0}.sidebar nav{overflow-y:auto;scrollbar-width:thin;scrollbar-color:#d4dec133 transparent}.brand{margin-bottom:24px}.workspace-switch{margin-bottom:23px}.side-action{flex-shrink:0}.circle-button{padding-top:12px;padding-bottom:12px}.circle-button.active{padding-top:11px;padding-bottom:11px}}
@media(min-width:651px) and (max-height:650px){.brand{margin-bottom:16px}.workspace-switch{margin-bottom:14px}.side-action small{display:none}.sidebar{padding-top:20px}.circle-button{padding-top:9px;padding-bottom:9px}.circle-button.active{padding-top:8px;padding-bottom:8px}}

/* A separate top-layer crop dialog preserves the unfinished person form. */
.avatar-crop-dialog{width:min(430px,calc(100vw - 24px))}.avatar-crop-dialog .modal-description{margin-bottom:16px}.avatar-crop-stage{position:relative;width:min(100%,320px);aspect-ratio:1;margin:0 auto 16px;overflow:hidden;border-radius:18px;background:#16221e;touch-action:none;cursor:grab;user-select:none;-webkit-user-select:none;isolation:isolate}.avatar-crop-stage:active{cursor:grabbing}.avatar-crop-image{position:absolute;max-width:none;pointer-events:none;background:#fff}.avatar-crop-circle{position:absolute;inset:0;border-radius:50%;border:2px solid #f1f5df;box-shadow:0 0 0 180px #0a1419a6;pointer-events:none;z-index:1}.avatar-crop-loading{position:absolute;inset:0;display:grid;place-items:center;background:#203129;z-index:2;font-size:14px;color:var(--muted)}.avatar-crop-controls{display:flex;align-items:center;gap:9px;margin:3px 0 7px}.avatar-crop-controls input{flex:1;min-width:0;accent-color:var(--lime);height:28px}.avatar-crop-controls output{min-width:45px;font-size:12px;color:var(--muted);text-align:right}.avatar-crop-tip{margin:8px 0 0;font-size:11px}.avatar-crop-dialog .form-footer{margin-top:18px}.avatar-crop-dialog .icon-button{font-size:24px}.avatar-crop-dialog .modal-head{padding-bottom:12px}

.person-connect,.birthday-fields{border:1px solid var(--line);border-radius:15px;padding:15px;margin-bottom:20px;background:#e1edcb08}.person-connect .field{margin:12px 0 0}.birthday-fields .form-grid .field{margin-bottom:12px}.birthday-lead{margin:12px 0}.birthday-fields .field-help{font-size:11px}.birthday-fields .field-help span{display:block;margin-top:5px}.birthday-reminder{position:absolute;top:95px;left:4px;display:flex;align-items:center;gap:10px;padding:10px 14px;border-radius:13px;font-size:12px;z-index:2;max-width:calc(100% - 12px)}.birthday-reminder svg{width:17px;height:17px}.birthday-reminder span:not(.birthday-reminder-arrow){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.birthday-reminder-arrow{font-size:18px;opacity:.6}.has-birthday-reminder .map-stage{margin-top:49px}.birthday-list{display:grid;gap:10px}.birthday-row{display:flex;width:100%;align-items:center;gap:12px;border-radius:15px;text-align:left;padding:14px;background:#e9efda0d;border:1px solid var(--line)}.birthday-row.is-due{background:#e4edc91f;border-color:#e9f0c44f}.birthday-row .tiny-avatar{width:39px;height:39px}.birthday-row-name{min-width:0;flex:1}.birthday-row-name strong{display:block;font-size:14px;font-weight:500;overflow-wrap:anywhere}.birthday-row-name small{display:block;margin-top:6px;font-size:11px;opacity:.65}.birthday-row-when{font-size:11px;color:var(--lime);white-space:nowrap}.mobile-birthdays{display:inline-flex;align-items:center;gap:6px}.mobile-birthdays svg{width:14px;height:14px}@media(min-width:1550px){.birthday-reminder{top:109px}}@media(max-width:650px){.birthday-reminder{top:218px;left:18px;right:18px;padding:8px 12px;max-width:none}.has-birthday-reminder .map-stage{margin-top:46px}.birthday-reminder-arrow{margin-left:auto}.person-connect,.birthday-fields{padding:12px}}

@media(max-width:650px){.app-shell{padding-top:var(--safe-top)}.sidebar{top:var(--safe-top)}}
/* Safari zooms small focused fields, including search and circle names.
   Cover narrow windows and touch devices in landscape as well. */
@media (max-width: 650px), (any-pointer: coarse) {
  .search-wrap input,
  .field input,
  .field textarea,
  .field select,
  .plain-input {
    font-size: 16px;
  }
}

/* Search anchors stay recognizable; distant overviews prioritize the connection pattern. */
.node.search-match .node-face{border-color:#f5ffcc;box-shadow:0 0 0 5px #edf7c944,0 5px 20px #06292355}
.node.search-match .node-name{background:#edf3d9;color:#23392d;text-shadow:none}
.map-stage.overview .node:not(.selected):not(.search-match) .node-name,
.map-stage.overview .node:not(.selected):not(.search-match) .self-tag{display:none}
.map-stage.overview .node-face{border-width:1px;box-shadow:0 2px 8px #06292355}
.map-stage.overview .edge-text{display:none}
/* Keep the photograph untouched; give text its own contrast on bright scenery. */
.brand,.page-title,.photo-credit{text-shadow:0 1px 3px #0b292fcc,0 0 10px #0b292f99}
.brand-mark{filter:drop-shadow(0 1px 2px #0b292faa)}
.edge{filter:drop-shadow(0 1px 1px #12382e88)}

/* Use identical crop dimensions on the root canvas and the wallpaper layer. */
html,.landscape{background-size:var(--photo-width) var(--photo-height);background-position:var(--photo-position-x) var(--photo-position-y);background-repeat:no-repeat}

/* Wallpaper overscan does not increase the fixed page height. */
.landscape,.landscape-shade{height:var(--wallpaper-height)}
