.selection-panel, .selection-floorplan, .selection-history { min-width: 0; overflow-wrap: anywhere; }
.selection-panel summary, .selection-floorplan summary, .selection-history summary { cursor: pointer; }
.selection-body { display: grid; gap: .85rem; margin-block-start: .8rem; }
.selection-body p, .selection-floorplan p { margin: .35rem 0; }
.selection-body fieldset { display: grid; gap: .55rem; min-width: 0; padding: .8rem; border: 1px solid var(--border, #b3bfb6); border-radius: .65rem; }
.selection-body legend { font-weight: 700; padding-inline: .3rem; }
.selection-ranges { display: grid; gap: .65rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); }
.selection-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.selection-pair { display: grid; gap: .35rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.selection-body label, .selection-body input, .selection-body select { min-width: 0; }
.selection-body :is(input:not([type=checkbox]), select) { width: 100%; box-sizing: border-box; }
.selection-body .selection-check, .selection-body .selection-unit { display: flex; align-items: center; gap: .55rem; cursor: pointer; margin: 0; }
.selection-body input[type=checkbox] { flex: none; width: 1rem; height: 1rem; margin: 0; }
.selection-check { padding: .3rem .6rem; border: 1px solid var(--border, #b3bfb6); border-radius: .45rem; }
.selection-units { max-height: 19rem; overflow: auto; }
.selection-body .selection-unit { padding: .55rem .2rem; border-bottom: 1px solid var(--border, #b3bfb6); }
.selection-unit > span { flex: 1; min-width: 0; }
.selection-unit small { display: block; }
.selection-floorplan, .selection-history { padding-block: .6rem; border-top: 1px solid var(--border, #b3bfb6); }
.selection-floorplan img { display: block; max-width: 100%; max-height: 22rem; object-fit: contain; margin: .5rem auto; }
.selection-floorplan input { display: block; max-width: 100%; }
@media (max-width: 800px) {
  .selection-body { gap: 12px; margin-top: 4px; }
  .selection-body .selection-check, .selection-body .selection-unit { min-height: 44px; }
  .selection-floorplan, .selection-history { padding-block: 0; }
}
@media (max-width: 480px) {
  .selection-ranges { grid-template-columns: minmax(0,1fr); }
  .selection-body .selection-unit {
    display: grid; grid-template-columns: auto minmax(0,1fr); gap: 2px 8px; padding-block: 8px;
  }
  .selection-unit > input { grid-row: span 2; }
  .selection-unit > strong { grid-column: 2; }
  .selection-history .selection-actions > .btn { flex: 1 1 10rem; }
  .selection-body form label:has(.date-input) { grid-column: 1 / -1; }
  .selection-body form label:has(input[type=time]) { grid-column: 1 / -1; }
}
