.community-panel {
  min-width: 0;
  max-width: 100%;
}
.community-panel *,
.community-placement * {
  box-sizing: border-box;
}
.community-panel h3 {
  margin: 22px 0 10px;
  font-size: 16px;
}
.community-note {
  margin: 8px 0 14px;
  line-height: 1.6;
  color: #526b55;
  overflow-wrap: anywhere;
}
.community-panel button,
.community-placement button {
  min-height: 44px;
  min-width: 44px;
  font: inherit;
}
.community-panel button[aria-pressed="true"] {
  outline: 3px solid #659555;
  outline-offset: -3px;
  background: #e0edc8;
}
.community-panel button:focus-visible,
.community-placement button:focus-visible {
  outline: 3px solid #a1772e;
  outline-offset: 2px;
}
.community-characters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.community-character,
.community-option,
.community-furniture-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  padding: 8px;
  overflow-wrap: anywhere;
}
.community-character img {
  width: 72px;
  height: 88px;
  object-fit: contain;
  image-rendering: pixelated;
}
.community-wardrobe {
  margin-top: 20px;
}
.community-preview {
  width: 160px;
  height: 160px;
  margin: 0 auto 10px;
  border: 1px solid #b2c1a2;
  border-radius: 6px;
  background: #edf0dc;
  overflow: hidden;
}
.community-preview canvas,
.community-preview img {
  display: block;
  width: 160px;
  height: 160px;
  object-fit: contain;
  image-rendering: pixelated;
}
.community-preview [hidden] {
  display: none;
}
.community-slots {
  display: grid;
  gap: 12px;
}
.community-slot {
  min-width: 0;
  margin: 0;
  padding: 8px;
  border: 1px solid #bdc6ad;
  border-radius: 4px;
}
.community-slot legend {
  padding: 0 6px;
  font-weight: 700;
}
.community-option-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.community-option-thumb,
.community-option img {
  width: 64px;
  height: 72px;
  object-fit: contain;
  image-rendering: pixelated;
}
.community-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.community-actions button {
  flex: 1 1 120px;
}
.community-furniture {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.community-furniture-choice img {
  width: 80px;
  max-width: 100%;
  height: 72px;
  object-fit: contain;
  image-rendering: pixelated;
}
.community-directory,
.community-placements {
  display: grid;
  gap: 8px;
  margin: 10px 0;
  padding: 0;
  list-style: none;
}
.community-room,
.community-placements li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid #c6ceb9;
  border-radius: 4px;
}
.community-room span,
.community-placements li span {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.community-room button,
.community-placements li button {
  flex: 0 0 auto;
}
.community-placement {
  position: absolute;
  top: 42px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(390px, calc(100% - 24px));
  padding: 8px 10px;
  border: 1px solid #bdccab;
  border-radius: 6px;
  background: #edf3daee;
  color: #284a35;
  font-size: 13px;
  box-shadow: 0 3px 12px #18392a33;
}
.community-placement[hidden] {
  display: none;
}
.community-placement span {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.community-placement button {
  flex: 0 0 auto;
}
@media (max-width: 700px), (max-width: 1000px) and (max-height: 520px) {
  .community-panel {
    font-size: 14px;
  }
  .community-panel button {
    font-size: 14px;
    min-height: 44px;
  }
  .community-characters,
  .community-option-list,
  .community-furniture {
    gap: 6px;
  }
  .community-character,
  .community-option,
  .community-furniture-choice {
    padding: 6px 4px;
  }
  .community-character img {
    width: 60px;
    height: 72px;
  }
  .community-furniture-choice img {
    width: 70px;
  }
  .community-placement {
    top: 34px;
    font-size: 14px;
  }
}
