#visit-room {
  display: grid;
  grid-template-columns: minmax(0, 2.25fr) minmax(225px, 1fr);
  gap: clamp(14px, 2vw, 24px);
  align-items: start;
}
.visit-card,
.visit-wait {
  background: var(--paper);
  border: 1.5px solid #c9b9ae;
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.visit-stage,
.visit-wait {
  background: #e2eed9 url(clearing.svg) center/cover no-repeat;
}
.visit-stage {
  position: relative;
  isolation: isolate;
  aspect-ratio: 1.83;
  min-height: 240px;
  overflow: hidden;
}
.visit-stage.dream::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(#6c619056, transparent 85%);
  pointer-events: none;
}
.visit-sign {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 6px;
  left: 12px;
  top: 12px;
  z-index: 1;
  padding: 5px 10px 5px 6px;
  font-weight: 700;
  border: 1px solid #bb9c79;
  border-radius: 14px;
  background: #fffaecd9;
  box-shadow: 0 2px 0 #ab8d7950;
  max-width: 85%;
}
.visit-sign svg {
  width: 27px;
  height: 27px;
}
.visitors {
  position: absolute;
  bottom: 4%;
  left: 7%;
  width: 86%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 1.5%;
}
.visitor {
  display: flex;
  width: 43%;
  max-width: 260px;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}
.visitor-name {
  font:
    650 clamp(0.8rem, 1.7vw, 1.04rem) / 1.25 'Avenir Next',
    system-ui,
    sans-serif;
  margin-top: -2%;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 3px 11px;
  border: 1px solid #c1a6a0;
  background: #fffbebe8;
  border-radius: 20px;
}
.visit-actions,
.visit-give {
  display: grid;
  gap: 9px;
  padding: 12px;
}
.visit-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-bottom: 6px;
}
.visit-give {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-top: 3px;
}
.visit-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 55px;
  padding: 7px 5px;
  border: 1px solid #c9b9ad;
  border-radius: 16px;
  color: #503d4e;
  font-weight: 680;
  background: #f7e9c9;
}
.visit-action svg {
  width: clamp(30px, 4vw, 48px);
  height: clamp(30px, 4vw, 48px);
}
.visit-action.dance {
  background: #eee2f3;
}
.visit-action.play {
  background: #e1efe6;
}
.visit-give .visit-action {
  background: #fff6ed;
  min-height: 47px;
  font-size: 0.94rem;
}
.visit-give svg {
  width: 30px;
  height: 30px;
}
.visit-action:disabled {
  cursor: default;
  background: #f5f1e9;
  color: #6b5a64;
}
.visit-side {
  display: grid;
  gap: 14px;
}
.bond-card,
.visit-gifts {
  padding: clamp(14px, 2.4vw, 26px);
}
.bond-card {
  background: linear-gradient(125deg, #fff7ec, #fae7e7);
}
.bond-card > svg {
  width: 58px;
  height: 58px;
  margin-bottom: 5px;
}
.bond-card h2,
.visit-gifts h2 {
  font-size: clamp(1.25rem, 2.7vw, 1.75rem);
  margin-bottom: 7px;
}
.bond-card p {
  font-weight: 650;
}
.bond-hearts,
.bond-award,
.gift-summary,
.gift-summary span {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.bond-hearts {
  margin: 10px 0 0;
}
.bond-hearts svg {
  width: 29px;
  height: 29px;
}
.open-heart {
  filter: grayscale(0.9);
  opacity: 0.45;
}
.bond-award {
  font-weight: 650;
  color: #794765;
  margin-top: 12px;
}
.gift-summary {
  gap: 8px 14px;
}
.gift-summary span {
  font-weight: 600;
}
.gift-summary svg {
  width: 32px;
  height: 32px;
}
.visit-garland {
  position: absolute;
  right: 5px;
  top: 8px;
  display: flex;
  gap: 0;
  align-items: flex-start;
  border-top: 2px solid #a37a6d;
  rotate: 7deg;
}
.visit-garland svg {
  width: 24px;
  height: 28px;
}
.visit-prop {
  position: absolute;
  left: 50%;
  top: 62%;
  pointer-events: none;
  translate: -50% -50%;
}
.visit-prop > svg {
  width: clamp(38px, 6vw, 76px);
  height: auto;
  filter: drop-shadow(0 3px 2px #784d5a44);
}
.doing-play svg,
.doing-flower svg,
.doing-paperstar svg {
  animation: visit-pass 1.3s ease-in-out both;
}
.doing-dance svg {
  animation: visit-music 1.4s ease-out both;
}
@keyframes visit-pass {
  0% {
    transform: translateX(-95%) rotate(-18deg);
  }
  45% {
    transform: translateY(-55%) rotate(3deg);
  }
  100% {
    transform: translateX(95%) rotate(14deg);
  }
}
@keyframes visit-music {
  to {
    transform: translateY(-80%) rotate(9deg);
    opacity: 0.2;
  }
}
.visit-wait {
  grid-column: 1/-1;
  min-height: 290px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 4px;
  text-align: center;
  padding: 20px;
}
.visit-wait > svg {
  width: 62px;
  height: 62px;
}
.visit-wait h2,
.visit-wait p {
  padding: 6px 12px;
  background: #fffaeee8;
  border-radius: 14px;
}
#visit-note {
  margin-top: 10px;
  text-align: center;
  font-weight: 650;
  color: var(--plum);
}
@media (max-width: 760px) {
  #visit-room {
    grid-template-columns: 1fr;
  }
  .visit-side {
    grid-template-columns: 1.1fr 1fr;
    gap: 9px;
  }
  .bond-card > svg {
    width: 37px;
    height: 37px;
    margin: 0;
  }
  .visit-sign {
    top: 9px;
    left: 9px;
  }
  .visit-actions,
  .visit-give {
    gap: 6px;
  }
  .visit-actions .visit-action {
    flex-direction: column;
    min-height: 65px;
    gap: 2px;
  }
  .bond-hearts {
    gap: 2px;
  }
  .bond-hearts svg {
    width: 21px;
    height: 21px;
  }
  .visit-stage {
    min-height: 245px;
  }
  .visitors {
    width: 98%;
    left: 1%;
  }
  .visitor {
    width: 45%;
  }
  .visit-give .visit-action {
    font-size: 0.85rem;
  }
}
@media (max-width: 580px) {
  .head-inner .brand {
    font-size: 0;
    min-height: 46px;
    min-width: 46px;
    justify-content: center;
  }
  .head-inner .brand-icon {
    width: 38px;
    height: 38px;
  }
  .head-inner .nav-pick {
    min-width: 46px;
  }
  .visit-stage {
    aspect-ratio: 1.45;
  }
  .visit-gifts h2,
  .bond-card h2 {
    font-size: 1.14rem;
  }
  .visit-sign {
    font-size: 0.9rem;
  }
}
@media (max-width: 355px) {
  .visit-side {
    grid-template-columns: 1fr;
  }
  .visit-give .visit-action {
    flex-direction: column;
  }
  .visit-actions {
    padding-inline: 6px;
  }
  .visit-stage {
    min-height: 218px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .visit-prop > svg {
    animation: none;
  }
}

.visit-stage #visit-note:not(:empty) {
  position: absolute;
  left: 50%;
  top: 19%;
  translate: -50% 0;
  max-width: 90%;
  width: max-content;
  margin: 0;
  background: #fff9f0f0;
  color: #5a3c55;
  border: 1px solid #cfbbaa;
  border-radius: 14px;
  padding: 6px 11px;
  font-size: 0.91rem;
}

.gift-summary span {
  gap: 5px;
  flex-wrap: nowrap;
}
.gift-summary span b {
  font-variant-numeric: tabular-nums;
}
