.neighbor-dialog {
  width:min(31rem, calc(100vw - 2rem));
  max-height:min(46rem, calc(100dvh - 2rem));
  padding:clamp(.85rem,4vw,1.6rem);
  color:#302820;
  border:1px solid #d9c7a8;
  border-radius:1.25rem;
  background:#fff9eb;
  box-shadow:0 1.1rem 4rem #27241455;
}
.neighbor-dialog::backdrop {background:#1b281c85}
.neighbor-dismiss {display:flex;justify-content:flex-end;margin-bottom:.3rem}
.neighbor-dismiss button {
  width:2.5rem;height:2.5rem;border:1px solid #cebb9e;border-radius:50%;background:#f8eedc;
  color:#3a3628;font-size:1.3rem;cursor:pointer;
}
.neighbor-card header,.neighbor-edit-top {display:flex;gap:1rem;align-items:center}
.neighbor-card header h2 {margin:.15rem 0;line-height:1.2}
.neighbor-card header p {margin:.25rem 0;color:#584f3f}
.neighbor-portrait {
  display:inline-block;flex:0 0 auto;width:4.3rem;height:4.3rem;
  overflow:hidden;object-fit:cover;border:2px solid #fff3d8;border-radius:50%;
  background-repeat:no-repeat;background-color:#e7ddc3;box-shadow:0 0 0 1px #bfa88466;
}
.neighbor-portrait.small {width:2.8rem;height:2.8rem}
.neighbor-anonymous {display:grid;place-items:center;color:#585438}
.neighbor-demo-label {
  display:inline-block;background:#e2e8d3;color:#31452b;border-radius:2rem;
  padding:.12rem .62rem;font-weight:700;font-size:.82rem;
}
.neighbor-about {line-height:1.55;overflow-wrap:anywhere}
.neighbor-theme {color:#66532f}
.neighbor-card h3 {margin:.4rem 0}
.neighbor-pets,.neighbor-gifts,.neighbor-inbox,.neighbor-directory {list-style:none;margin:.75rem 0;padding:0}
.neighbor-pets li,.neighbor-inbox li {display:flex;gap:.8rem;align-items:flex-start;padding:.65rem 0;border-bottom:1px solid #dccfb5}
.neighbor-pets small,.neighbor-inbox small,.neighbor-directory small {display:block;color:#635849}
.neighbor-pets p,.neighbor-inbox .row {margin:.35rem 0}
.neighbor-gifts {
  display:grid;grid-template-columns:repeat(auto-fit,minmax(5.5rem,1fr));gap:.5rem;
}
.neighbor-gifts button,.neighbor-directory button {
  width:100%;min-height:3.1rem;height:100%;padding:.55rem;
  background:#f6ebd5;color:#3d382a;border:1px solid #d8c7a7;border-radius:.75rem;cursor:pointer;
}
.neighbor-gifts button:hover,.neighbor-directory button:hover {background:#f1e1bb;border-color:#997c46}
.neighbor-gifts button:focus-visible,.neighbor-directory button:focus-visible,.neighbor-dismiss button:focus-visible {
  outline:3px solid #4b6744;outline-offset:2px;
}
.neighbor-gifts img {display:block;margin:auto;width:3.5rem;height:3.15rem;object-fit:contain}
.neighbor-gifts strong {display:block;font-size:.83rem;line-height:1.2}
.neighbor-manage {margin-top:.65rem}
.neighbor-option {display:flex!important;align-items:center;gap:.55rem}
.neighbor-option input[type=checkbox] {width:auto}
.neighbor-inbox img {width:3.1rem;height:3.1rem;object-fit:contain}
.neighbor-directory {display:grid;grid-template-columns:repeat(auto-fill,minmax(14rem,1fr));gap:.55rem}
.neighbor-directory button {display:flex;align-items:center;gap:.7rem;text-align:start}
.neighbor-directory small {margin-top:.18rem}
.neighbor-visit {display:grid;grid-template-columns:minmax(0,1fr) minmax(17.5rem,24rem);gap:1rem}
.neighbor-visit .scene {width:100%;display:block}
.neighbor-visit aside {margin:0;align-self:start}
.unified-visit {grid-template-areas:"landscape profile"}
.unified-visit .scene {grid-area:landscape}
.unified-visit aside {grid-area:profile}
[data-neighbor-feedback]:empty {margin:0}
.unified-pet-card .neighbor-demo-label {margin-bottom:.65rem}
.unified-pet-heading .neighbor-portrait {width:5.4rem;height:5.4rem}
.unified-pet-heading h2 {font-size:clamp(1.55rem,4vw,2.05rem)}
.unified-pet-origin {font-size:.95rem}
.unified-pet-intro {margin:1rem 0;color:#433b2d;white-space:pre-wrap}
.unified-pet-place {padding:.35rem .8rem;margin:.85rem 0;background:#f3ebd8;border:1px solid #e4d5b9;border-radius:.75rem}
.unified-pet-place div {display:grid;gap:.8rem;grid-template-columns:minmax(4.75rem,30%) minmax(0,1fr);padding:.35rem 0}
.unified-pet-place div+div {border-top:1px solid #e6d9bd}
.unified-pet-place dt {color:#675b45}
.unified-pet-place dd {margin:0;overflow-wrap:anywhere;font-weight:650}
.unified-companion-choice {display:grid;gap:.3rem;margin:.8rem 0;font-weight:600}
.unified-companion-choice select {min-width:0;padding:.5rem;border-radius:.4rem;border:1px solid #cbb894;background:#fffaf0;color:#332e22}
.unified-pet-actions {position:sticky;bottom:-.25rem;margin-top:.85rem;padding:.65rem 0 .25rem;background:#fff9eb}
.unified-pet-buttons {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.5rem}
.unified-pet-buttons button {min-height:2.7rem;white-space:normal;line-height:1.25}
.unified-card-fields {border:1px solid #dacaa9;border-radius:.6rem;padding:.6rem .85rem}
.unified-card-fields label {margin:.5rem 0}
.unified-card-fields small {text-align:right;color:#5c5143}
.pet-private {padding:.45rem 0;border-top:1px solid var(--line)}
@media(max-width:720px){
 .neighbor-dialog {width:calc(100vw - 1.2rem);max-height:calc(100dvh - 1.4rem);padding:.85rem}
 .neighbor-visit {grid-template-columns:1fr}
 .unified-visit {grid-template-areas:"profile" "landscape"}
 .neighbor-visit .scene {min-height:52vh}
 .neighbor-directory {grid-template-columns:repeat(2,minmax(0,1fr))}
 .neighbor-directory button {align-items:flex-start}
 .neighbor-directory .neighbor-portrait {width:2.2rem;height:2.2rem}
 .unified-pet-heading .neighbor-portrait {width:4.6rem;height:4.6rem}
 .unified-pet-buttons {gap:.35rem}
}
