/* The archive room uses the same real records and interaction targets. */
.overview-wordmark,.family-wordmark{display:none;position:absolute;left:25px;top:18px;width:clamp(190px,23vw,340px);max-width:calc(100% - 90px);height:auto;z-index:16000;pointer-events:none;user-select:none}
.overview-mode>.overview-wordmark,.compact-family>.family-wordmark{display:block}
.compact-family>.canvas-heading{display:none}
.overview-mode>.canvas-heading,.overview-mode .room-heading{display:none}
@media(max-width:700px){.overview-wordmark,.family-wordmark{left:17px;top:18px;width:230px}}
.tree-viewport.room-active,.tree-viewport[data-dimension="2d"]{
  --gallery-image:url("familiengalerie.png");
  background:#f8f5ef;
  isolation:isolate;
}
.tree-viewport.room-active::before,.tree-viewport[data-dimension="2d"]::before{
  content:"";
  position:absolute;
  inset:-24px;
  z-index:-1;
  background:var(--gallery-image) center / cover no-repeat;
  opacity:.48;
  filter:blur(5px);
  pointer-events:none;
}
.tree-viewport.room-active.compact-family::before{
  inset:-9px;
  opacity:1;
  filter:blur(3px);
}
.room-active>#tree-world,.room-active>.canvas-heading,.room-active>.canvas-help,.room-active>.tree-legend{display:none}
#family-room{position:absolute;inset:0;overflow:hidden;isolation:isolate;user-select:none;color:#48463c}
.archive-vault{position:absolute;width:130%;height:150%;top:-82%;border:70px solid #b7b2a343;border-radius:50%;box-shadow:inset 0 -5px 12px #fffc,inset 0 7px 35px #8b80651a,0 8px 19px #81796017;transform:rotate(-25deg);pointer-events:none}
.archive-vault{display:none}
.vault-left{left:-80%}.vault-right{right:-80%;transform:rotate(25deg)}
/* Keep the projected portrait shadows on the floor of the centred photo. */
.archive-shadows{position:absolute;inset:0;width:100%;height:100%;clip-path:inset(49% 0 0);pointer-events:none}
.archive-shadows[hidden]{display:none}
.room-environment,.room-scene-shadows,.room-links,.room-glass-tubes{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:hidden}
.room-glass-tubes{z-index:3}
.room-environment{z-index:0}.room-environment path{fill:none;stroke-linecap:round;stroke-linejoin:round}
.room-scene-shadows{z-index:1;fill:#655b50}
.room-card-shadows{filter:blur(8px);opacity:.14}
.room-tube-shadows{filter:blur(2.7px);opacity:.24}
.room-environment[hidden]{display:none}
.room-environment .vault-rib{stroke:#a79d826b;stroke-width:2;filter:drop-shadow(0 1px 2px #fff9)}
.floor-ring{stroke:#fffbe9;stroke-width:1.3;filter:drop-shadow(0 1px 1px #8b826c55)}.floor-aisle{stroke:#9d95815e;stroke-width:.7}.vault-rib{stroke:#b6ae9780;stroke-width:22;filter:drop-shadow(1px 3px 2px #fff7)}
.room-links{z-index:1}.room-marriage{font:12px Georgia,serif;fill:#70694e;text-anchor:middle;paint-order:stroke;stroke:#f6f0e5;stroke-width:5px;stroke-linejoin:round}
.room-cards,.room-branches{position:absolute;inset:0;pointer-events:none}
/* Bound the paint surface to the viewport. A shared CSS mask over moving,
   filtered portraits caused horizontal raster cuts in Chrome. */
.room-cards{z-index:2;overflow:hidden;contain:paint}
.room-card[hidden]{display:none!important}
.room-family-frames{position:absolute;inset:0;z-index:1;pointer-events:none}
.room-family-frame{position:absolute;border:1px solid #afa68a45;border-radius:5px;background:#fffaf014;box-shadow:0 5px 15px #6f664609}
.room-family-frame>span{position:absolute;top:2px;padding:2px 6px;background:#f5f0e2ed;color:#827759;font:10px/16px "Segoe UI",sans-serif;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border-radius:3px}
.room-family-bridge{position:absolute;left:200px;bottom:6px;font:9px "Segoe UI",sans-serif;color:#8a775d;border-top:1px solid #b7ab8c;padding-top:3px}
.room-card{transition:opacity .65s,box-shadow .25s,background .25s}
.room-card{position:absolute;left:0;top:0;width:350px;height:210px;transform-origin:50% 50%;display:flex;gap:15px;text-align:left;padding:10px;background:linear-gradient(115deg,#fffdf6,#eee7db);border:1px solid #fffcef;border-left:3px solid var(--person-border,#87acc1);border-radius:7px;box-shadow:-5px 4px 0 #c2beae,-9px 7px 0 #aaa9939c,0 18px 24px -11px #534f3b73,0 3px 6px #5c57472b,inset 0 0 0 1px #c4baa442;pointer-events:auto;cursor:pointer;transition:opacity .65s,box-shadow .25s,background .25s}
.room-card:after{content:"";position:absolute;bottom:-27px;left:10%;width:80%;height:16px;background:#615b4340;filter:blur(12px);border-radius:50%;pointer-events:none}
.room-card.female{--person-border:#c78fa5}.room-card.male{--person-border:#7ba4bf}.room-card.unknown{--person-border:#b1aa95}
.room-card:not(.room-cuboid-face):not(.outside-focus):hover,.room-card:not(.room-cuboid-face):not(.outside-focus):focus-visible{background:linear-gradient(110deg,#fffef8,#f4edde);box-shadow:-5px 4px 0 #c2beae,-9px 7px 0 #aaa9939c,0 20px 38px -8px #534f3b80,0 0 0 3px #fff9;filter:blur(0)!important}
.room-card.selected{box-shadow:-5px 4px 0 #c1b9a3,-9px 7px 0 #a7a58f9c,0 0 0 3px #fcf7e9,0 0 0 5px #ab9465,0 20px 30px -8px #534f3b73}
.room-photo{flex:none;width:178px;height:188px;background:#d5d0c0;border:2px solid var(--person-border);display:grid;place-items:center;overflow:hidden;box-shadow:0 0 0 3px #fff9;border-radius:2px}
.room-photo img{width:100%;height:100%;display:block;object-fit:cover;object-position:center 40%;filter:saturate(.13) sepia(.12) contrast(.94);pointer-events:none}
.room-initials{font:54px Georgia,serif;color:#85816f;text-shadow:0 1px #fff8}
.room-copy{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:center;padding:15px 0 5px}
.room-relation{font:italic 13px/1.25 Georgia,serif;min-height:22px;color:#706e5c;margin-bottom:8px;max-height:35px;overflow:hidden}
.compact-family .room-relation{font-size:21px;line-height:1.15;min-height:25px;max-height:49px;flex-shrink:0;margin-bottom:6px;color:#535642;overflow-wrap:normal;word-break:normal;hyphens:none}
.compact-family .person-card{width:calc(var(--card-width,320px) + 32px)}
.compact-family .person-card .card-relation{left:202px;top:17px;width:140px;font-size:18px;line-height:21px;max-height:42px;white-space:normal;overflow-wrap:normal;word-break:normal;hyphens:none;color:#535642}
.compact-family .person-card .card-copy{left:202px;width:140px}
.room-copy strong{font:23px/1.04 Georgia,serif;overflow-wrap:anywhere;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;overflow:hidden;max-height:96px;color:#34342d}
.room-copy em{font-style:normal;font-size:22px}.room-dates{font:14px Georgia,serif;letter-spacing:1px;color:#746c5a;border-top:1px solid #99917c;width:fit-content;padding-top:9px;margin-top:12px}
.room-index{position:absolute;right:10px;top:9px;min-width:25px;text-align:center;padding:2px 5px;background:#a29f87;color:#fffdf2;border-radius:1px;font:13px Georgia,serif}.room-photo-count{position:absolute;bottom:9px;right:10px;font-size:9px;color:#9f947c}
.room-branches{z-index:12002}.room-branch{position:absolute;left:0;top:0;background:#f7f4e8ed;border:1px solid #b8b39e;border-radius:20px;padding:5px 12px;white-space:nowrap;font:12px Georgia,serif;box-shadow:0 2px 6px #736d4820;pointer-events:auto}.room-branch:hover{background:#fffdf3}.room-branch:disabled{opacity:.75;pointer-events:none}
.room-heading{position:absolute;left:30px;top:23px;z-index:15000;pointer-events:none;text-shadow:0 1px 8px #fff,0 0 16px #fff}
.room-heading>span{font-size:9px;letter-spacing:3px;color:#8a8471}.room-heading h2{font:italic 26px Georgia,serif;margin-top:8px;color:#615e4d}.room-heading p{font:11px Georgia,serif;color:#9a8f78;margin-top:8px}
.room-compass{position:absolute;right:29px;top:24px;display:flex;align-items:center;gap:8px;font-size:8px;letter-spacing:1.5px;color:#8b8872;z-index:15000;pointer-events:none}.compass-orbit{font-size:33px;color:#aba58d}.room-compass i{padding:0 6px;font-size:16px;font-style:normal}
.room-depth{position:absolute;left:25px;top:135px;z-index:15000;display:flex;flex-direction:column;align-items:center;gap:10px;pointer-events:none}.room-depth>span{font-size:8px;letter-spacing:1.4px;writing-mode:vertical-rl;color:#9b947f}.room-depth button{width:34px;height:43px;border-radius:18px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:1px;color:#8b8570}.room-depth button b{font:15px Georgia,serif}.room-depth button small{font-size:7px;color:#b0a78d}.room-depth button.active{background:#969b7c;color:white;box-shadow:0 3px 7px #5c69432a}.room-depth button.active small{color:#ffffcf}.room-depth output{font-size:8px;color:#99927c;writing-mode:vertical-rl;max-height:100px}
.room-depth nav,.room-generation-numbers{display:flex;flex-direction:column}
.room-depth nav{gap:8px;pointer-events:auto}
.room-generation-numbers,.room-depth [data-select-all-generations]{border:1px solid #f8f5e2;background:#eeeaddb8;border-radius:22px;box-shadow:0 3px 20px #655e3915;backdrop-filter:blur(8px)}
.room-depth [data-select-all-generations]{width:100%}
.room-depth [data-select-all-generations]:hover:not([aria-disabled="true"]){background:#f9f6ed}

.room-depth button:disabled{opacity:1}
.room-depth [data-select-all-generations][aria-disabled="true"]{cursor:default}
.room-view-tools{position:absolute;right:23px;top:78px;z-index:15000;display:flex;gap:6px}.room-view-tools button{height:32px;width:32px;border:1px solid #d4cdb8;background:#faf7ecd4;border-radius:50%;color:#8c866b;font-size:19px}
.room-minimap{position:absolute;right:80px;bottom:24px;width:248px;border:1px solid #fff9;border-radius:16px;box-shadow:0 3px 25px #6660401b,inset 0 0 0 1px #b0a88d77;background:#f4f0e6ed;backdrop-filter:blur(8px);z-index:15000;overflow:hidden;color:#514b39}
.room-minimap header{padding:0}.room-orientation-toggle{display:flex;align-items:baseline;gap:8px;width:100%;padding:11px 12px 6px;border:0;background:transparent;color:inherit;text-align:left;cursor:pointer}.room-minimap header b{font:600 14px Georgia,serif}.room-minimap header small{margin-left:auto;font-size:9px;color:#79725f}.room-orientation-toggle>span{margin-left:auto;font-size:15px;line-height:1}.room-orientation-toggle:hover{background:#fff6}.room-minimap.is-collapsed{width:166px;bottom:80px}.room-minimap.is-collapsed header small{display:none}.room-minimap.is-collapsed .room-orientation-toggle{padding-bottom:11px}.room-orientation-content[hidden]{display:none}
.room-orientation-map{display:block;width:100%;height:190px;border:0;background:transparent;padding:0;cursor:grab;touch-action:none;user-select:none}.room-orientation-map.is-dragging{cursor:grabbing}.room-minimap svg{display:block;width:100%;height:100%;overflow:hidden}.orientation-front{stroke:#a69b8377;stroke-width:.7;stroke-dasharray:3 4;pointer-events:none}.orientation-space-label{font:8px Arial,sans-serif;fill:#79725f;pointer-events:none}
.room-orientation-canvas{position:relative}.room-orientation-aim{position:absolute;transform:translate(-50%,-50%);display:grid;place-items:center;width:24px;height:24px;padding:0;border:1px solid #927539;border-radius:50%;background:#fff9e9;color:#715822;box-shadow:0 1px 5px #4e402844;font:16px/1 Arial,sans-serif;cursor:grab;touch-action:none;user-select:none}.room-orientation-aim:hover{background:#f7e9bf}.room-orientation-aim.is-dragging{cursor:grabbing;background:#eed7a0}.orientation-aim-line{stroke:#96783c;stroke-width:.9;stroke-dasharray:3 3;pointer-events:none}
.orientation-areas path{fill-opacity:.1;stroke:#fff9;stroke-width:.7}.orientation-cone{fill:#647b5e;fill-opacity:.16;stroke:#647b5e;stroke-opacity:.6;stroke-width:1;pointer-events:none}.orientation-nodes circle{opacity:.48}.orientation-nodes circle.in-view{opacity:1;stroke:#fff;stroke-width:.35}.orientation-selection{fill:#c39a42;stroke:#fff;stroke-width:1.4;pointer-events:none}.orientation-destination{fill:none;stroke:#514b39;stroke-width:1;stroke-dasharray:2 2;pointer-events:none}.orientation-camera{pointer-events:none}.orientation-camera circle{fill:#fff;stroke:#506547;stroke-width:1}.orientation-camera path{fill:#506547}.orientation-camera.outside circle{stroke-dasharray:2 1}
.room-minimap button:focus-visible{outline:2px solid #806c3c;outline-offset:-2px}.room-minimap p{margin:0;padding:2px 8px 9px;text-align:center;font-size:9px;color:#79725f}.room-minimap .orientation-status{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.room-active>.zoom-tools,.room-active>.focus-button{z-index:16000;background:#faf7eee8;border-color:#cbc4ac}.room-active .zoom-tools output{font-size:8px}.room-active>.zoom-tools{bottom:70px}.room-active>.focus-button{bottom:26px}
.fact-symbol .wedding-rings{display:block;margin-top:3px;object-fit:contain}
@media(max-width:1050px){.room-heading h2{font-size:21px}.room-heading p{font-size:10px}.room-compass{display:none}.room-minimap{width:210px;right:70px}.room-orientation-map{height:164px}.room-depth{left:12px}}
@media(max-width:700px){.room-heading{left:20px;top:20px}.room-heading h2{font-size:20px}.room-heading p{display:none}.room-minimap{display:none}.room-depth{top:100px}.room-depth>span,.room-depth output{display:none}.room-heading>span{font-size:8px}.room-view-tools{right:14px}}
@media(prefers-reduced-motion:reduce){.room-card{transition:none}}
.room-view-tools .room-overview-button{width:auto;padding:0 12px;border-radius:18px;font-size:11px}
.room-view-tools .room-arrangement{height:32px;max-width:148px;padding:0 8px;border:1px solid #d4cdb8;background:#faf7ec;color:#514b39;border-radius:18px;font-size:11px}
.room-family-frames{z-index:3}
.flight-family-label{position:absolute;padding:2px 6px;background:#f8f4e8e8;border:1px solid #c3b89e66;border-radius:3px;color:#887a5d;font-size:10px;line-height:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.room-environment .flight-shell-edge{fill:none;stroke:#859475a6;stroke-width:1.25;stroke-linejoin:round}
.room-shell-glow{filter:drop-shadow(0 0 1.5px #afc795d0) drop-shadow(0 0 3px #d4e5bba8)}

.room-junction{fill:#f8f4e8;stroke:#8c8977;stroke-width:1.4}.room-junction.focus-junction{stroke:#778453;stroke-width:2}
@media(max-width:1050px){.room-view-tools .room-overview-button{font-size:10px;padding:0 9px}}

#family-room,.room-active,.room-cards{overflow:clip}
.room-wire,.room-flange-wall{fill:color-mix(in srgb,var(--tube-colour) 74%,#373832);fill-opacity:.54}
.room-tube-body,.room-flange-hub{fill:var(--tube-colour);fill-opacity:.56}
.room-tube-light,.room-flange-face{fill:color-mix(in srgb,var(--tube-colour) 24%,#fffbf2);fill-opacity:.82}
.room-flange-face{stroke:var(--tube-colour);stroke-opacity:.65;stroke-width:.65}
.room-view-tools{top:20px;bottom:auto}
@media(max-width:1050px){.room-heading h2{font-size:21px}.room-heading p{max-width:190px;line-height:1.4}}
@media(max-width:700px){.room-heading{display:none}}
.room-depth{top:135px;gap:4px;width:64px}
.room-depth>span{writing-mode:horizontal-tb;font-size:7px;letter-spacing:.5px}
.room-generation-numbers{padding:4px}.room-depth nav button{height:30px;gap:0}
.room-depth output{writing-mode:horizontal-tb;max-height:none;max-width:64px;font-size:9px;line-height:1.4;text-align:center}
.room-card.outside-focus{transition:opacity .18s;cursor:default}.room-card:not(.outside-focus){transition:opacity .18s,box-shadow .25s,background .25s}
.room-environment .sharp-generation-plane{stroke:#899969a0;stroke-width:1.6;fill:#e6ebd50b}
@media(max-width:700px){.room-depth{left:8px;top:135px}.room-depth>span{display:block}.room-depth output{display:block}}
.room-depth{width:152px;align-items:flex-start}
.room-depth>span{width:48px;max-width:62px;text-align:center}
.room-depth-controls{display:flex;align-items:stretch;gap:8px;pointer-events:none}
.room-focus-quick{display:flex;flex-direction:column;align-items:center;gap:3px;min-height:188px;width:92px;padding:7px 6px;border:1px solid #d2cbb8;border-radius:12px;background:#f9f6edeb;box-shadow:0 3px 18px #655e3912;backdrop-filter:blur(8px);pointer-events:auto;color:#6b7452}
.room-focus-quick b{font:600 11px "Segoe UI",sans-serif}.room-focus-quick small{font:9px "Segoe UI",sans-serif;color:#938a72;white-space:nowrap}
.room-focus-scope{font:9px/1.25 "Segoe UI",sans-serif;color:#585e49;text-align:center;margin-bottom:4px}
.room-focus-quick input{writing-mode:vertical-lr;direction:rtl;width:26px;height:112px;flex:1;min-height:60px;margin:0;accent-color:#7b8b60;cursor:ns-resize;touch-action:none}
.room-focus-quick input:focus-visible{outline:2px solid #a87743;outline-offset:2px;border-radius:12px}
.room-focus-quick output{writing-mode:horizontal-tb;max-width:none;max-height:none;font:600 11px "Segoe UI",sans-serif;font-variant-numeric:tabular-nums;color:#65714c}


@media(max-height:700px){.room-depth{top:110px}.room-depth nav button{height:25px}.room-focus-quick{min-height:158px}.room-focus-quick input{height:85px}}

.room-generation-hint{display:block;width:152px;font:9px/1.4 "Segoe UI",sans-serif;color:#8d856e;margin:3px 0}

/* Rounded world-space bodies with two fixed picture faces. */
.room-cuboid{position:absolute;left:0;top:0;display:block;padding:0;margin:0;border:0;background:none;box-shadow:none;transform-origin:0 0;cursor:pointer;pointer-events:auto;outline:none;transition:opacity .18s}
.room-cuboid:hover{background:none}
.room-cuboid:focus-visible{outline:none}
.room-cuboid[hidden],.room-cuboid-face[hidden],.room-portrait-preview[hidden]{display:none!important}
.room-cuboid-content{position:absolute;inset:0;z-index:1}
.room-portrait-preview{display:none}
.room-miniature .room-cuboid-face{display:none!important}
.room-miniature .room-portrait-preview{display:block;position:absolute;top:0;left:0;transform-origin:0 0;overflow:hidden;border-radius:26px;background:#bacad3}
.room-portrait-preview.female{background:#d4bdc8}
.room-portrait-preview.unknown{background:#cfc7b8}
.room-miniature .room-portrait-preview.silhouette,.room-photo>.silhouette{background:var(--silhouette-paper)}
.room-photo>.silhouette{display:block;width:100%;height:100%}
.room-portrait-preview img{display:block;width:100%;height:100%;object-fit:cover}
.room-cuboid .room-cuboid-face,.room-cuboid:hover .room-cuboid-face{position:absolute;left:0;top:0;display:block;transform-origin:0 0;padding:0;gap:0;background:linear-gradient(135deg,#f6f2e8,#e6e0d2);border:2px solid #c4bcaa;border-left:6px solid var(--person-border,#87acc1);border-radius:26px;box-shadow:inset 0 2px 0 #fff9,inset 0 -3px 1px #71695438;filter:brightness(var(--face-shade,1));transition:none;pointer-events:none;overflow:hidden}
.room-cuboid .room-cuboid-face:after{display:none}
.room-cuboid .room-disc-cap:has(>.mourning-ribbon){overflow:clip;overflow-clip-margin:border-box}
.room-disc-cap>.mourning-ribbon{
  /* The face has a 6 px left border and 2 px borders on the other sides. */
  --ribbon-card-width:calc(100% + 8px);
  --ribbon-card-height:calc(100% + 4px);
  left:-6px;
  top:-2px;
  z-index:13;
}
.tree-viewport:not(.compact-family) .room-cuboid:focus-visible .room-cuboid-face{outline:3px solid #c8dfb5;outline-offset:-3px}
.room-person-outline{position:absolute;inset:0;width:100%;height:100%;overflow:visible;z-index:0;fill:none;stroke-linejoin:round;pointer-events:none}
.room-person-outline:empty{display:none}
.room-cuboid .room-cuboid-face .room-photo{position:absolute;left:var(--photo-left,0px);top:var(--photo-top,0px);width:var(--photo-width,100%);height:var(--photo-height,100%);display:block;border:0;border-radius:22px;box-shadow:none;background:#d7d1c2;overflow:hidden}
.room-face-image{display:block;width:100%;height:100%;filter:saturate(.2) sepia(.1) contrast(.95)}
.room-cuboid-face .room-copy{position:absolute;left:var(--copy-left,56%);right:9px;top:18px;bottom:13px;padding:0;opacity:var(--detail-mix,1);pointer-events:none}
.room-cuboid-face .room-index,.room-cuboid-face .room-photo-count{opacity:var(--detail-mix,1)}
.room-nameplates{position:absolute;inset:0;z-index:4;overflow:hidden;pointer-events:none}
.room-nameplate,.room-nameplate-rim,.room-nameplate-face{position:absolute}
.room-nameplate-rim{inset:0;width:100%;height:100%;overflow:visible}
.room-nameplate-face{top:0;left:0;transform-origin:0 0;display:grid;align-content:center;padding:2px 10px;text-align:center;background:linear-gradient(#fff9eb,#e8dcc3);box-shadow:inset 0 0 0 2px #b9a380;color:#383125;font:600 var(--room-name-size,34px)/1.1 Georgia,serif}
.room-nameplate-face>span{position:absolute;inset-inline:0;top:50%;height:1.1em;transform:translateY(-50%)}
.room-nameplate-face>.room-nameplate-given{font-size:var(--room-given-size,36px)}
.room-nameplate-given:has(+.room-nameplate-surname){margin-top:calc(-19.8px*min(1,4*var(--room-surname-opacity,1)))}
.room-nameplate-face>.room-nameplate-surname{opacity:var(--room-surname-opacity,1)}
.room-nameplate-given+.room-nameplate-surname{margin-top:19.8px}
.room-nameplate-face>span>span{position:absolute;left:50%;white-space:nowrap;transform:translateX(-50%) scaleX(var(--name-stretch,1))}
.room-nameplate-face::before{content:"";position:absolute;bottom:100%;left:24%;width:52%;height:var(--hanger-length,13px);border-inline:7px solid #8f7d59}
.room-nameplate[data-hangs="above"] .room-nameplate-face::before{bottom:auto;top:100%}
.room-links{z-index:3}.room-family-frames{z-index:4}
@media(prefers-reduced-motion:reduce){.room-cuboid{transition:none}}

/* Thin matte edges carry no pictures. Cap lighting is fixed in world space. */
.room-disc-rim{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}
.room-cuboid .room-disc-cap:before{content:"";position:absolute;inset:0;border-radius:inherit;box-shadow:inset 2px 3px 5px #fff9,inset -2px -4px 7px #655d4a40;z-index:12;pointer-events:none}
.room-face-shadows{position:absolute;inset:0;overflow:hidden;border-radius:inherit;pointer-events:none;z-index:10;mix-blend-mode:multiply}
.room-face-shadows>span{position:absolute;display:block;background:#514a3d;pointer-events:none}
.room-face-shadows>span[hidden]{display:none}
.room-tube-cast-shadow{position:absolute;inset:0;width:100%;height:100%;filter:blur(4px);opacity:.38}
.room-tube-cast-shadow path{fill:none;stroke:#51483a;stroke-width:15;stroke-linecap:round;stroke-linejoin:round}
.room-dust{position:absolute;inset:0;width:100%;height:100%;z-index:5;pointer-events:none;filter:blur(.3px)}
.compact-family .room-minimap,.compact-family .room-overview-button,.compact-family .room-arrangement{display:none}
.compact-family .room-depth{top:135px}
.compact-family .room-depth:has(.room-history-settings[open]){z-index:15001}
.room-history-settings{
  box-sizing:border-box;width:214px;max-width:calc(100vw - 34px);margin-top:4px;padding:8px 10px;
  border:1px solid #d2cbb8;border-radius:12px;background:#fbf6ecf5;box-shadow:0 3px 18px #655e3920;
  color:#484137;font:11px/1.3 "Segoe UI",sans-serif;pointer-events:auto;cursor:default;
}
.room-history-settings summary{font-weight:650;cursor:pointer;color:#355b4e}
.room-history-settings fieldset{display:grid;gap:2px;margin:6px 0 0;padding:0;border:0}
.room-history-settings legend{padding:0;margin-bottom:3px;color:#746752}
.room-history-settings label{display:flex;align-items:flex-start;gap:6px;padding:4px 0;cursor:pointer}
.room-history-settings .room-history-base{cursor:default}
.room-history-settings .room-history-local{margin-left:19px}
.room-history-settings input{flex:none;width:13px;height:13px;margin:1px 0 0;accent-color:#466757}
.room-history-settings :focus-visible{outline:2px solid #6f7e62;outline-offset:2px}
@media(max-height:590px){
  .compact-family>.family-wordmark{width:210px}
  .compact-family .room-depth{top:100px}
  .compact-family .room-depth nav button{height:22px}
  .compact-family .room-generation-hint{display:none}
}
.room-life-timeline {
  position:absolute;z-index:15000;left:50%;bottom:18px;transform:translateX(-50%);
  display:grid;grid-template-columns:minmax(185px,22%) minmax(0,1fr);align-items:center;gap:14px;
  width:min(1100px,calc(100% - 156px));padding:12px 16px;
  border:1px solid #fff9;border-radius:16px;background:#fbf6eced;
  box-shadow:0 6px 26px #67563c27,inset 0 0 0 1px #b5a18231;
  backdrop-filter:blur(12px);cursor:default;
}
.room-life-timeline[hidden],.room-life-controls[hidden],.room-life-scroll [hidden]{display:none}
.room-life-timeline header>div>span {font-size:8px;letter-spacing:1.2px;color:#796b52}
.room-life-timeline h2 {font:italic 19px/1.12 Georgia,serif;color:#50483a;margin:4px 0}
.room-life-span {color:#746752;font-size:10px}
.room-life-controls {display:flex;gap:5px;margin-top:7px}
.room-life-controls button {width:28px;height:24px;border:1px solid #bfb197;border-radius:6px;background:#fff9;color:#615843;font-size:15px}
.room-life-controls button:hover:not(:disabled) {background:#ede3d2}
.room-life-controls button:disabled {opacity:.4;cursor:default}
.room-life-controls .room-life-play {
  display:grid;place-items:center;width:32px;background:#e7eee2;border-color:#889b83;color:#294437
}
.room-life-controls .room-life-play:hover {background:#d7e4d5}
.room-life-play svg {display:block;width:18px;height:18px;fill:currentColor}
.room-life-play[data-playing] .room-life-play-icon,
.room-life-play:not([data-playing]) .room-life-pause-icon {display:none}
.room-life-scroll {min-width:0;overflow-x:auto;overscroll-behavior-inline:contain;scrollbar-width:thin;scrollbar-color:#bbab91 transparent}
.room-life-scroll:focus-visible,.room-life-controls button:focus-visible {outline:2px solid #6f7e62;outline-offset:2px}
.room-life-scroll ol {position:relative;display:flex;width:max-content;min-width:100%;gap:14px;list-style:none;margin:0;padding:0 6px 4px}
.room-life-scroll ol::before {content:"";position:absolute;top:22px;left:6px;right:6px;border-top:1px solid #bfb39c}
.room-life-scroll li {--milestone:#976b44;position:relative;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:29px;align-content:start;width:142px;min-height:78px}
.room-life-scroll li.room-life-history {--milestone:#557467}
.room-life-personal::before,.room-life-history button::before {content:"";position:absolute;top:19px;left:0;width:7px;height:7px;border-radius:50%;background:var(--milestone)}
.room-life-scroll time {font-size:10px;color:var(--milestone);font-variant-numeric:tabular-nums}
.room-life-scroll strong,.room-life-history button {font:14px/1.15 Georgia,serif;color:#484137;hyphens:auto;overflow-wrap:anywhere}
.room-life-history button {position:relative;margin-top:-15px;padding:15px 0 0;text-align:left;border-radius:3px;color:#355b4e}
.room-life-history button::before {top:5px;box-shadow:0 0 0 3px #5574672a}
.room-life-history button:hover {text-decoration:underline;text-underline-offset:2px}
.room-life-history button:focus-visible {outline:2px solid #6f7e62;outline-offset:1px}
.room-life-history button span {display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}
.room-life-scroll small {margin-top:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px;color:#756854}
.room-life-scroll .room-life-age {font-weight:650;color:#484137}
.room-life-history .room-life-age {color:#355b4e}
.room-life-scroll p {font:14px Georgia,serif;color:#746752;padding:12px 6px}
.room-history-dialog {
  width:min(640px,calc(100% - 28px));max-height:calc(100dvh - 28px);margin:auto;padding:0;
  border:1px solid #e1d5bf;border-radius:16px;background:#fcf8ef;color:#453c30;
  box-shadow:0 16px 70px #22170e66;overflow:auto;overscroll-behavior:contain;
  cursor:auto;user-select:text;
}
.room-history-dialog::backdrop {background:#28201982}
.room-history-dialog article {position:relative;display:grid;gap:14px;padding:clamp(17px,4vw,28px)}
.room-history-dialog header {display:block;padding-right:28px;margin:0}
.room-history-dialog .room-history-kicker {font-size:10px;font-weight:700;letter-spacing:1px;color:#466757}
.room-history-dialog h3 {font:clamp(21px,4vw,28px)/1.15 Georgia,serif;margin:5px 0}
.room-history-age,.room-history-category {font-size:12px;color:#466757}
.room-history-summary {font-size:14px;line-height:1.55}
.room-history-summary>p {margin:0}
.room-history-images {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:12px}
.room-history-images figure {margin:0;display:grid;align-content:start;gap:6px}
.room-history-images img {display:block;max-width:100%;max-height:min(34dvh,310px);object-fit:contain;justify-self:center;border-radius:8px}
.room-history-images figcaption {font-size:11px;line-height:1.4;color:#695a48}
.room-history-images details {margin-top:4px}
.room-history-images summary {width:fit-content;cursor:pointer}
.room-history-image-credit {margin-top:4px;overflow-wrap:anywhere}
.room-history-dialog a {color:#36584a;text-underline-offset:2px}
.room-history-sources {display:flex;flex-wrap:wrap;gap:6px 16px;font-size:13px;font-weight:650}
@media(max-width:700px){
  .compact-family .room-depth{top:110px}
  .compact-family .room-depth-controls{gap:4px}
  .compact-family .room-focus-quick{width:55px;padding-inline:2px}
  .compact-family .room-focus-quick b{font-size:9px}
  .compact-family .room-focus-scope{font-size:8px}
  .compact-family .room-focus-quick small,.compact-family .room-generation-hint{display:none}
  .room-life-timeline {left:10px;right:60px;bottom:12px;transform:none;width:auto;display:block;padding:8px 10px}
  .room-life-timeline>header {display:flex;align-items:center;justify-content:space-between;gap:5px;margin-bottom:8px}
  .room-life-timeline header>div>span {letter-spacing:.7px}
  .room-life-timeline h2 {font-size:15px}
  .room-life-controls {margin-top:0;gap:3px}
  .room-life-controls button {width:23px}
  .room-life-scroll li {width:121px}
}
