/* A small illustrated gazetteer folds out inside the current room. */
#panel.has-places { container-type: inline-size; }
.has-places .panel-top { align-items: center; }
.has-places .panel-top h2 {
  flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; letter-spacing: .035em;
}
.has-places .panel-top .panel-close { margin-left: 0; flex: none; }
.has-places .panel-scroll { margin-top: 9px; }
.place-switcher {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  min-height: 32px; gap: 7px; padding: 4px 8px; border: 1px solid #a2af90;
  border-radius: 5px; color: #fff1ca; background: #3c5746; line-height: 1.1;
  font-weight: 650; font-size: 13px; white-space: nowrap;
}
.place-switcher:is(:hover,[aria-expanded="true"]) { background: #53684d; border-color: #dec692; }
.place-switcher:focus-visible { outline: 2px solid #f3d790; outline-offset: 1px; }
.place-switch-icon {
  display: block; width: 11px; height: 11px; position: relative;
}
.place-switch-icon::before {
  content: ""; width: 4px; height: 4px; display: block; background: currentColor;
  box-shadow: 6px 0 currentColor, 0 6px currentColor, 6px 6px currentColor;
}
#panel[data-choosing-place] :is(.panel-scroll,.panel-feedback) { display: none; }
#farmPlacesList:not([hidden]) {
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); align-content: start;
  gap: 5px; flex: 0 1 auto; min-width: 0; min-height: 0; overflow-x: hidden; overflow-y: auto;
  margin: 8px 0 0; padding: 0 2px 2px; border: 0; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: #a9885c transparent;
}
#farmPlacesList button {
  display: flex; align-items: center; text-align: left; gap: 5px;
  padding: 5px; min-height: 46px; min-width: 0; overflow: hidden;
  color: #334735; background: #f8efda; border: 1px solid #d4c29d; border-radius: 5px;
}
#farmPlacesList button::after { content: none; }
#farmPlacesList button:is(:hover,:focus-visible) { background: #f2e6c7; border-color: #ac9568; }
#farmPlacesList button[aria-current="location"] { background: #e3ead6; border-color: #829772; box-shadow: inset 3px 0 #5b7956; }
#farmPlacesList .place-art { flex: none; display: grid; place-items: center; width: 31px; height: 34px; }
#farmPlacesList .place-art img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
#farmPlacesList .place-copy { min-width: 0; display: grid; gap: 2px; line-height: 1.2; }
#farmPlacesList strong { font: 750 15px/1.15 var(--book); }
#farmPlacesList small { display: block; font: 500 12px/1.23 var(--font); color: #68644f; word-break: normal; }
#farmPlacesList .place-ready small { color: #7b4825; font-weight: 700; }
#farmPlacesList button:last-child { grid-column: 1/-1; }
#farmPlacesList button:last-child .place-copy { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 9px; }

@container (min-width: 334px) {
  #farmPlacesList:not([hidden]) { grid-template-columns: repeat(3,minmax(0,1fr)); }
  #farmPlacesList .place-art { width: 28px; }
}
@container (max-width: 235px) {
  .has-places .panel-top { gap: 4px; }
  .has-places .panel-top h2 { font-size: 16px; }
  .has-places .panel-top .panel-emblem { display: none; }
  .place-switcher { min-height: 28px; padding: 4px 6px; gap: 4px; font-size: 12px; }
  #farmPlacesList button { gap: 3px; padding: 3px; }
  #farmPlacesList .place-art { width: 21px; height: 26px; }
  #farmPlacesList strong { font-size: 14px; }
  #farmPlacesList small { font-size: 11px; }
}
@media (orientation: portrait) {
  .has-places .panel-scroll { margin-top: 5px; }
  .place-switcher { min-height: 31px; }
  #farmPlacesList:not([hidden]) { margin-top: 4px; }
}
@media (orientation: landscape) and (max-height: 500px) {
  .has-places .panel-scroll { margin-top: 3px; }
  #farmPlacesList:not([hidden]) { margin-top: 4px; }
  .place-switcher { min-height: 25px; }
}

/* A small landscape phone leaves only a narrow strip beside the field. */
@container (max-width: 195px) {
  .has-places .panel-top { gap: 3px; }
  .has-places .panel-top h2 {
    font-size: 15px; line-height: 1.15; letter-spacing: 0;
    white-space: normal; text-overflow: clip; overflow: visible;
  }
  .place-switcher { padding-inline: 4px; gap: 0; }
  .place-switch-icon { display: none; }
  #farmPlacesList:not([hidden]) { grid-template-columns: minmax(0,1fr); gap: 3px; }
  #farmPlacesList button { min-height: 34px; gap: 5px; padding: 3px 4px; }
  #farmPlacesList .place-copy, #farmPlacesList button:last-child .place-copy {
    flex: 1; display: grid; grid-template-columns: max-content minmax(0,1fr);
    align-items: center; gap: 4px;
  }
  #farmPlacesList strong { white-space: nowrap; }
  #farmPlacesList small { text-align: right; }
}
