/* Minimal layout repair for the existing r6-2 chamber plan DOM. */
.chamber-plan-grid {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.chamber-plan-row {
  display: grid !important;
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: stretch;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.chamber-plan-row > h4 {
  position: sticky;
  left: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 8px;
  background: #fff;
  border-right: 1px solid #e2e9e0;
}

.chamber-plan-row-cells {
  display: grid !important;
  grid-auto-rows: minmax(68px, auto);
  gap: 5px;
  width: 100%;
  min-width: 0;
}

.chamber-plan-row-cells > .chamber-plan-cell {
  min-width: 92px;
  box-sizing: border-box;
  overflow-wrap: anywhere;
}

@media (max-width: 620px) {
  .chamber-plan-grid {
    max-width: calc(100vw - 54px);
  }

  .chamber-plan-row {
    grid-template-columns: 66px minmax(0, 1fr);
    gap: 6px;
  }
}
