.house-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}

.lot-unit { position: relative; min-width: 0; display: flex; flex-direction: column; }
.lot-unit .lot-tile { flex: 1; width: 100%; border-top-left-radius: 0; cursor: grab; }
.lot-drag-handle { align-self: flex-start; padding: 7px 13px; border-radius: 8px 8px 0 0; border-bottom: 0; background: #e8f3ed; color: #216d5d; font-size: 12px; touch-action: none; cursor: grab; user-select: none; }
.lot-drag-handle:focus-visible { outline: 3px solid #318cdb; outline-offset: 1px; }
.lot-dragging, .lot-dragging .lot-tile, .lot-dragging .lot-drag-handle { cursor: grabbing; user-select: none; }
.lot-drag-source { opacity: .45; border-style: dashed; }
.lot-dragging .floor-row { outline: 2px dashed #a6cbbb; outline-offset: -4px; }
.lot-dragging .floor-row.lot-drop-active { background: #e6f6ed; outline: 3px solid #158461; outline-offset: -4px; }
.lot-drop-active .floor-label { background: #d4ecdf; }
.lot-saving .lot-unit { opacity: .65; pointer-events: none; }
.drag-help { color: #61786c; font-size: 12px; line-height: 1.7; margin: 0 0 18px; }

.house-card {
  min-width: 0;
  background: #fff;
  border: 1px solid #deebe7;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 8px 26px #164b3708;
}

.house-open {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 0;
  border-radius: 0;
  background: linear-gradient(180deg, #edf7f3, #fff 80%);
  padding: 28px 22px 20px;
  white-space: normal;
  text-align: center;
}

.house-open:hover { background: linear-gradient(180deg, #def0e9, #fff); }
.house-open h2 { font-size: 21px; margin: 20px 0 8px; overflow-wrap: anywhere; }
.house-open p { font-size: 13px; margin: 0 0 12px; color: #657b74; }
.house-count { background: #edf5f2; padding: 7px 13px; border-radius: 20px; font-size: 12px; color: #215f51; }
.house-enter { color: #087f70; margin-top: 20px; font-size: 13px; }
.house-actions { display: flex; justify-content: center; gap: 10px; border-top: 1px solid #edf2ef; padding: 14px; }
.house-art { width: 170px; height: 146px; position: relative; filter: drop-shadow(8px 10px 0 #d7e9e1); }
.house-roof { position: absolute; top: 0; left: 0; width: 170px; height: 65px; background: #216d5d; clip-path: polygon(50% 0,100% 90%,100% 100%,0 100%,0 90%); }
.house-body { position: absolute; bottom: 0; left: 17px; right: 17px; height: 86px; background: #fff; border: 3px solid #388874; border-radius: 0 0 6px 6px; display: flex; justify-content: space-between; padding: 12px; }
.house-window { height: 25px; width: 27px; border: 3px solid #79b7a4; background: #e1f1eb; }
.house-door { position: absolute; bottom: 0; left: 49px; height: 40px; width: 33px; background: #388874; color: #fff; display: grid; place-items: center; font-size: 17px; border-radius: 4px 4px 0 0; }
.unassigned-symbol { min-height: 146px; display: grid; place-items: center; font-size: 70px; color: #8ba59b; }
.warehouse-section { border: 1px solid #d5e4dd; border-radius: 18px; overflow: hidden; background: #fff; }
.warehouse-roofline { height: 12px; background: linear-gradient(90deg, #16594c, #47a48b); }
.floor-row { display: grid; grid-template-columns: 170px minmax(0, 1fr); border-bottom: 6px solid #e0eae5; }
.floor-row:last-child { border-bottom: 0; }
.floor-label { background: #f1f7f4; border-right: 1px solid #dfeae5; padding: 24px 20px; }
.floor-label h2 { font-size: 32px; margin: 12px 0; overflow-wrap: anywhere; }
.floor-label p { font-size: 12px; color: #6a7e76; }
.floor-label .eyebrow { font-size: 10px; }
.floor-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.floor-actions button { font-size: 12px; padding: 7px 10px; }
.floor-lots { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; padding: 22px; align-content: start; }
.lot-tile { display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding: 17px; border: 1px solid #e0e9e5; border-radius: 12px; text-align: left; background: #fff; white-space: normal; min-width: 0; }
.lot-tile:hover { border-color: #73b5a0; background: #f4faf7; box-shadow: 0 4px 12px #19523e0d; }
.lot-tile-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.lot-icon { display: grid; place-items: center; background: #e2f2ea; width: 32px; height: 32px; border-radius: 8px; color: #207860; }
.lot-tile strong { font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.lot-tile > span:not(.lot-tile-top) { font-size: 12px; color: #63766e; overflow-wrap: anywhere; }
.lot-stock { display: flex; justify-content: space-between; gap: 8px; border-top: 1px solid #e9efeb; padding-top: 12px; }
.lot-stock span { color: #087f70; }
.floor-empty { color: #7a8c83; font-size: 13px; line-height: 1.7; grid-column: 1 / -1; }
.batch-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; margin-top: 20px; }
.batch-facts > div { min-width: 0; padding: 13px 0; border-bottom: 1px solid #e6eee9; }
.batch-facts dt { font-size: 12px; color: #73867b; margin-bottom: 7px; }
.batch-facts dd { margin: 0; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.house-open:focus-visible, .lot-tile:focus-visible { outline: 3px solid #318cdb; outline-offset: -3px; }

@media (max-width: 760px) {
  .house-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
  .floor-row { grid-template-columns: 1fr; }
  .floor-label { border-right: 0; border-bottom: 1px solid #dfeae5; display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; padding: 15px; }
  .floor-label .eyebrow { width: 100%; }
  .floor-label h2 { font-size: 24px; margin: 0; }
  .floor-label p { margin: 0; }
  .floor-actions { margin-left: auto; }
  .floor-lots { padding: 14px; grid-template-columns: 1fr; }
  .batch-facts { grid-template-columns: 1fr; }
}
